=============================================================================== 0200a474 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200a474: 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; 200a478: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 200a47c: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 200a480: 84 00 bf ff add %g2, -1, %g2 200a484: 80 a0 a0 06 cmp %g2, 6 200a488: 18 80 00 14 bgu 200a4d8 <== NEVER TAKEN 200a48c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200a490: 85 28 a0 02 sll %g2, 2, %g2 200a494: 07 00 80 28 sethi %hi(0x200a000), %g3 200a498: 86 10 e3 f8 or %g3, 0x3f8, %g3 ! 200a3f8 200a49c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a4a0: 81 c0 80 00 jmp %g2 200a4a4: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200a4a8: 10 80 00 0b b 200a4d4 200a4ac: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200a4b0: 03 00 80 66 sethi %hi(0x2019800), %g1 200a4b4: 10 80 00 08 b 200a4d4 200a4b8: 82 10 60 6c or %g1, 0x6c, %g1 ! 201986c break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200a4bc: 03 00 80 66 sethi %hi(0x2019800), %g1 200a4c0: 10 80 00 05 b 200a4d4 200a4c4: 82 10 60 dc or %g1, 0xdc, %g1 ! 20198dc break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200a4c8: 10 80 00 03 b 200a4d4 200a4cc: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200a4d0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a4d4: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200a4d8: 81 c3 e0 08 retl 200a4dc: 90 10 20 00 clr %o0 =============================================================================== 0200a28c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200a28c: 9d e3 bf a0 save %sp, -96, %sp 200a290: 82 10 00 18 mov %i0, %g1 200a294: 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 ) 200a298: 80 a0 60 00 cmp %g1, 0 200a29c: 02 80 00 45 be 200a3b0 <== NEVER TAKEN 200a2a0: b0 10 20 00 clr %i0 return NULL; parent = parent_loc->node_access; 200a2a4: e0 00 40 00 ld [ %g1 ], %l0 fs_info = parent_loc->mt_entry->fs_info; 200a2a8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200a2ac: 80 a6 60 07 cmp %i1, 7 200a2b0: 12 80 00 08 bne 200a2d0 200a2b4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 200a2b8: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a2bc: 03 00 80 65 sethi %hi(0x2019400), %g1 200a2c0: 82 10 63 e4 or %g1, 0x3e4, %g1 ! 20197e4 200a2c4: 80 a0 80 01 cmp %g2, %g1 200a2c8: 02 80 00 3a be 200a3b0 200a2cc: 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 ); 200a2d0: 03 00 80 6a sethi %hi(0x201a800), %g1 200a2d4: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 201aa3c 200a2d8: 90 10 00 19 mov %i1, %o0 200a2dc: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200a2e0: 7f ff ff d1 call 200a224 200a2e4: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200a2e8: b0 92 20 00 orcc %o0, 0, %i0 200a2ec: 02 80 00 31 be 200a3b0 200a2f0: 80 a6 60 01 cmp %i1, 1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200a2f4: 12 80 00 08 bne 200a314 200a2f8: 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 ); 200a2fc: 82 06 20 50 add %i0, 0x50, %g1 200a300: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; 200a304: c0 26 20 54 clr [ %i0 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200a308: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; tail->previous = head; 200a30c: 10 80 00 21 b 200a390 200a310: c2 26 20 58 st %g1, [ %i0 + 0x58 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200a314: 22 80 00 06 be,a 200a32c 200a318: c2 07 00 00 ld [ %i4 ], %g1 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200a31c: 80 a6 60 04 cmp %i1, 4 200a320: 12 80 00 05 bne 200a334 200a324: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; 200a328: c2 07 00 00 ld [ %i4 ], %g1 200a32c: 10 80 00 19 b 200a390 200a330: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else if ( type == IMFS_DEVICE ) { 200a334: 12 80 00 07 bne 200a350 200a338: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; 200a33c: c2 07 00 00 ld [ %i4 ], %g1 200a340: c2 26 20 50 st %g1, [ %i0 + 0x50 ] node->info.device.minor = info->device.minor; 200a344: c2 07 20 04 ld [ %i4 + 4 ], %g1 200a348: 10 80 00 12 b 200a390 200a34c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { 200a350: 12 80 00 06 bne 200a368 200a354: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; 200a358: c0 26 20 50 clr [ %i0 + 0x50 ] 200a35c: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.linearfile.direct = 0; 200a360: 10 80 00 0c b 200a390 200a364: c0 26 20 58 clr [ %i0 + 0x58 ] } else if ( type == IMFS_MEMORY_FILE ) { 200a368: 12 80 00 08 bne 200a388 200a36c: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; 200a370: c0 26 20 50 clr [ %i0 + 0x50 ] 200a374: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200a378: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200a37c: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; 200a380: 10 80 00 04 b 200a390 200a384: c0 26 20 60 clr [ %i0 + 0x60 ] } else if ( type == IMFS_FIFO ) { 200a388: 22 80 00 02 be,a 200a390 <== ALWAYS TAKEN 200a38c: 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; 200a390: c2 07 60 04 ld [ %i5 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200a394: e0 26 20 08 st %l0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200a398: 82 00 60 01 inc %g1 200a39c: c2 27 60 04 st %g1, [ %i5 + 4 ] 200a3a0: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200a3a4: 90 04 20 50 add %l0, 0x50, %o0 200a3a8: 7f ff f2 bd call 2006e9c <_Chain_Append> 200a3ac: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200a3b0: 81 c7 e0 08 ret 200a3b4: 81 e8 00 00 restore =============================================================================== 0200a570 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a570: 9d e3 bf 70 save %sp, -144, %sp 200a574: f2 27 a0 48 st %i1, [ %fp + 0x48 ] int i = 0; 200a578: 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 ) ) { 200a57c: 80 8e bf f8 btst -8, %i2 200a580: 02 80 00 06 be 200a598 <== ALWAYS TAKEN 200a584: ba 10 00 18 mov %i0, %i5 rtems_set_errno_and_return_minus_one( EIO ); 200a588: 40 00 0d db call 200dcf4 <__errno> <== NOT EXECUTED 200a58c: 01 00 00 00 nop <== NOT EXECUTED 200a590: 10 80 00 19 b 200a5f4 <== NOT EXECUTED 200a594: 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; 200a598: 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; 200a59c: 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) ) { 200a5a0: 10 80 00 8d b 200a7d4 200a5a4: 33 00 80 6a sethi %hi(0x201a800), %i1 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200a5a8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a5ac: 90 07 40 08 add %i5, %o0, %o0 200a5b0: 94 07 bf d0 add %fp, -48, %o2 200a5b4: 40 00 02 25 call 200ae48 200a5b8: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; 200a5bc: c2 07 bf fc ld [ %fp + -4 ], %g1 200a5c0: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 200a5c4: 84 20 80 01 sub %g2, %g1, %g2 200a5c8: c4 27 a0 48 st %g2, [ %fp + 0x48 ] i += len; 200a5cc: c4 07 bf f8 ld [ %fp + -8 ], %g2 200a5d0: 82 00 80 01 add %g2, %g1, %g1 200a5d4: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !pathloc->node_access ) 200a5d8: c2 06 c0 00 ld [ %i3 ], %g1 200a5dc: 80 a0 60 00 cmp %g1, 0 200a5e0: 12 80 00 08 bne 200a600 <== ALWAYS TAKEN 200a5e4: a0 10 00 08 mov %o0, %l0 rtems_set_errno_and_return_minus_one( ENOENT ); 200a5e8: 40 00 0d c3 call 200dcf4 <__errno> 200a5ec: 01 00 00 00 nop 200a5f0: 82 10 20 02 mov 2, %g1 ! 2 200a5f4: c2 22 00 00 st %g1, [ %o0 ] 200a5f8: 81 c7 e0 08 ret 200a5fc: 91 e8 3f ff restore %g0, -1, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a600: 80 a2 20 00 cmp %o0, 0 200a604: 02 80 00 10 be 200a644 200a608: 80 a4 20 03 cmp %l0, 3 if ( node->type == IMFS_DIRECTORY ) 200a60c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a610: 80 a0 60 01 cmp %g1, 1 200a614: 12 80 00 0c bne 200a644 200a618: 80 a4 20 03 cmp %l0, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a61c: 90 10 00 1b mov %i3, %o0 200a620: 7f ff ff b0 call 200a4e0 200a624: 92 10 20 01 mov 1, %o1 200a628: 80 a2 20 00 cmp %o0, 0 200a62c: 12 80 00 06 bne 200a644 200a630: 80 a4 20 03 cmp %l0, 3 rtems_set_errno_and_return_minus_one( EACCES ); 200a634: 40 00 0d b0 call 200dcf4 <__errno> 200a638: 01 00 00 00 nop 200a63c: 10 bf ff ee b 200a5f4 200a640: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200a644: 02 80 00 1c be 200a6b4 200a648: f8 06 c0 00 ld [ %i3 ], %i4 200a64c: 80 a4 20 04 cmp %l0, 4 200a650: 02 80 00 5d be 200a7c4 200a654: 80 a4 20 02 cmp %l0, 2 200a658: 12 80 00 60 bne 200a7d8 200a65c: 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 ) 200a660: c2 06 62 3c ld [ %i1 + 0x23c ], %g1 200a664: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200a668: 80 a7 00 01 cmp %i4, %g1 200a66c: 02 80 00 5b be 200a7d8 200a670: 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; 200a674: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200a678: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200a67c: 80 a0 40 1c cmp %g1, %i4 200a680: 32 80 00 05 bne,a 200a694 200a684: 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; 200a688: 90 10 00 1b mov %i3, %o0 200a68c: 10 80 00 5f b 200a808 200a690: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200a694: 80 a7 20 00 cmp %i4, 0 200a698: 32 80 00 4f bne,a 200a7d4 200a69c: f8 26 c0 00 st %i4, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200a6a0: 40 00 0d 95 call 200dcf4 <__errno> 200a6a4: b0 10 3f ff mov -1, %i0 200a6a8: e0 22 00 00 st %l0, [ %o0 ] 200a6ac: 81 c7 e0 08 ret 200a6b0: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200a6b4: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a6b8: 80 a0 60 03 cmp %g1, 3 200a6bc: 12 80 00 07 bne 200a6d8 200a6c0: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 200a6c4: 90 10 00 1b mov %i3, %o0 200a6c8: 7f ff ff 97 call 200a524 200a6cc: 92 10 20 00 clr %o1 node = pathloc->node_access; 200a6d0: 10 80 00 0b b 200a6fc 200a6d4: 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 ) { 200a6d8: 32 80 00 0a bne,a 200a700 200a6dc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 200a6e0: 90 10 00 1b mov %i3, %o0 200a6e4: 40 00 00 67 call 200a880 200a6e8: 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; 200a6ec: f8 06 c0 00 ld [ %i3 ], %i4 if ( result == -1 ) 200a6f0: 80 a2 3f ff cmp %o0, -1 200a6f4: 02 80 00 61 be 200a878 <== NEVER TAKEN 200a6f8: b0 10 00 08 mov %o0, %i0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200a6fc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a700: 80 a0 60 01 cmp %g1, 1 200a704: 22 80 00 06 be,a 200a71c 200a708: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a70c: 40 00 0d 7a call 200dcf4 <__errno> 200a710: 01 00 00 00 nop 200a714: 10 bf ff b8 b 200a5f4 200a718: 82 10 20 14 mov 0x14, %g1 ! 14 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200a71c: 40 00 01 ac call 200adcc 200a720: 92 07 bf d0 add %fp, -48, %o1 if ( !node ) 200a724: b8 92 20 00 orcc %o0, 0, %i4 200a728: 02 bf ff b0 be 200a5e8 200a72c: 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 )) { 200a730: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a734: 80 a0 60 01 cmp %g1, 1 200a738: 32 80 00 27 bne,a 200a7d4 200a73c: f8 26 c0 00 st %i4, [ %i3 ] 200a740: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200a744: 80 a0 60 00 cmp %g1, 0 200a748: 02 80 00 1d be 200a7bc 200a74c: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( pathname, &pathnamelen, &i); 200a750: 92 07 a0 48 add %fp, 0x48, %o1 200a754: 7f ff ff 30 call 200a414 200a758: 94 07 bf f8 add %fp, -8, %o2 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200a75c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a760: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200a764: 80 a0 a0 2e cmp %g2, 0x2e 200a768: 12 80 00 06 bne 200a780 200a76c: b0 07 40 01 add %i5, %g1, %i0 200a770: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200a774: 80 a0 a0 2e cmp %g2, 0x2e 200a778: 22 80 00 0c be,a 200a7a8 200a77c: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a780: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a784: 90 10 00 1b mov %i3, %o0 200a788: 92 02 60 1c add %o1, 0x1c, %o1 200a78c: 40 00 0f b6 call 200e664 200a790: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200a794: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a798: 90 10 00 18 mov %i0, %o0 200a79c: c2 00 40 00 ld [ %g1 ], %g1 200a7a0: 10 80 00 24 b 200a830 200a7a4: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200a7a8: 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; 200a7ac: c2 27 bf f8 st %g1, [ %fp + -8 ] pathnamelen -= 2; 200a7b0: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200a7b4: 82 00 7f fe add %g1, -2, %g1 200a7b8: c2 27 a0 48 st %g1, [ %fp + 0x48 ] /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200a7bc: 10 80 00 06 b 200a7d4 200a7c0: 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 ); 200a7c4: 40 00 0d 4c call 200dcf4 <__errno> 200a7c8: 01 00 00 00 nop 200a7cc: 10 bf ff 8a b 200a5f4 200a7d0: 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) ) { 200a7d4: 80 a4 20 04 cmp %l0, 4 200a7d8: 02 80 00 04 be 200a7e8 <== NEVER TAKEN 200a7dc: 80 a4 20 00 cmp %l0, 0 200a7e0: 32 bf ff 72 bne,a 200a5a8 200a7e4: 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 ) { 200a7e8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a7ec: 80 a0 60 01 cmp %g1, 1 200a7f0: 12 80 00 15 bne 200a844 200a7f4: 90 10 00 1b mov %i3, %o0 if ( node->info.directory.mt_fs != NULL ) { 200a7f8: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a7fc: 80 a2 60 00 cmp %o1, 0 200a800: 02 80 00 11 be 200a844 <== ALWAYS TAKEN 200a804: 92 02 60 1c add %o1, 0x1c, %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a808: 40 00 0f 97 call 200e664 200a80c: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200a810: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a814: c4 07 bf fc ld [ %fp + -4 ], %g2 200a818: d0 07 bf f8 ld [ %fp + -8 ], %o0 200a81c: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a820: c2 00 40 00 ld [ %g1 ], %g1 200a824: 90 22 00 02 sub %o0, %g2, %o0 200a828: 92 00 80 09 add %g2, %o1, %o1 200a82c: 90 07 40 08 add %i5, %o0, %o0 200a830: 94 10 00 1a mov %i2, %o2 200a834: 9f c0 40 00 call %g1 200a838: 96 10 00 1b mov %i3, %o3 200a83c: 81 c7 e0 08 ret 200a840: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a844: 7f ff ff 0c call 200a474 200a848: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a84c: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a850: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a854: 7f ff ff 23 call 200a4e0 200a858: 90 10 00 1b mov %i3, %o0 200a85c: 80 a2 20 00 cmp %o0, 0 200a860: 12 80 00 06 bne 200a878 200a864: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a868: 40 00 0d 23 call 200dcf4 <__errno> 200a86c: b0 10 3f ff mov -1, %i0 ! ffffffff 200a870: 82 10 20 0d mov 0xd, %g1 200a874: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a878: 81 c7 e0 08 ret 200a87c: 81 e8 00 00 restore =============================================================================== 0200a9c0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200a9c0: 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; 200a9c4: 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; 200a9c8: c0 27 bf f4 clr [ %fp + -12 ] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a9cc: 90 10 00 18 mov %i0, %o0 200a9d0: 40 00 12 61 call 200f354 200a9d4: 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 ) 200a9d8: 37 00 80 6a sethi %hi(0x201a800), %i3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a9dc: 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 ); 200a9e0: d0 07 bf f4 ld [ %fp + -12 ], %o0 200a9e4: d2 07 bf fc ld [ %fp + -4 ], %o1 200a9e8: 90 07 40 08 add %i5, %o0, %o0 200a9ec: 94 07 bf d0 add %fp, -48, %o2 200a9f0: 40 00 01 16 call 200ae48 200a9f4: 96 07 bf f8 add %fp, -8, %o3 pathlen -= len; 200a9f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a9fc: c4 07 bf fc ld [ %fp + -4 ], %g2 200aa00: 84 20 80 01 sub %g2, %g1, %g2 200aa04: c4 27 bf fc st %g2, [ %fp + -4 ] i += len; 200aa08: c4 07 bf f4 ld [ %fp + -12 ], %g2 200aa0c: 82 00 80 01 add %g2, %g1, %g1 200aa10: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( !pathloc->node_access ) 200aa14: c2 06 40 00 ld [ %i1 ], %g1 200aa18: 80 a0 60 00 cmp %g1, 0 200aa1c: 02 80 00 99 be 200ac80 <== NEVER TAKEN 200aa20: b0 10 00 08 mov %o0, %i0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200aa24: 80 a2 20 00 cmp %o0, 0 200aa28: 02 80 00 10 be 200aa68 200aa2c: 80 a6 20 02 cmp %i0, 2 if ( node->type == IMFS_DIRECTORY ) 200aa30: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200aa34: 80 a0 60 01 cmp %g1, 1 200aa38: 12 80 00 0c bne 200aa68 200aa3c: 80 a6 20 02 cmp %i0, 2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200aa40: 90 10 00 19 mov %i1, %o0 200aa44: 7f ff fe a7 call 200a4e0 200aa48: 92 10 20 01 mov 1, %o1 200aa4c: 80 a2 20 00 cmp %o0, 0 200aa50: 12 80 00 06 bne 200aa68 200aa54: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EACCES ); 200aa58: 40 00 0c a7 call 200dcf4 <__errno> 200aa5c: 01 00 00 00 nop 200aa60: 10 80 00 9d b 200acd4 200aa64: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200aa68: 02 80 00 0f be 200aaa4 200aa6c: f8 06 40 00 ld [ %i1 ], %i4 200aa70: 80 a6 20 02 cmp %i0, 2 200aa74: 18 80 00 07 bgu 200aa90 200aa78: 80 a6 20 03 cmp %i0, 3 200aa7c: 80 a6 20 00 cmp %i0, 0 200aa80: 02 80 00 6e be 200ac38 200aa84: 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 ); 200aa88: 10 bf ff d7 b 200a9e4 200aa8c: 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 ) { 200aa90: 02 80 00 21 be 200ab14 200aa94: 80 a6 20 04 cmp %i0, 4 200aa98: 32 bf ff d3 bne,a 200a9e4 <== NEVER TAKEN 200aa9c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 200aaa0: 30 80 00 6a b,a 200ac48 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200aaa4: c2 06 e2 3c ld [ %i3 + 0x23c ], %g1 200aaa8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200aaac: 80 a7 00 01 cmp %i4, %g1 200aab0: 02 bf ff cd be 200a9e4 200aab4: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aab8: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200aabc: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200aac0: 80 a0 40 1c cmp %g1, %i4 200aac4: 32 80 00 0d bne,a 200aaf8 200aac8: 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; 200aacc: 90 10 00 19 mov %i1, %o0 200aad0: 92 02 60 08 add %o1, 8, %o1 200aad4: 40 00 0e e4 call 200e664 200aad8: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200aadc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200aae0: c4 07 bf f8 ld [ %fp + -8 ], %g2 200aae4: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aae8: c2 00 60 04 ld [ %g1 + 4 ], %g1 200aaec: 90 22 00 02 sub %o0, %g2, %o0 200aaf0: 10 80 00 46 b 200ac08 200aaf4: 90 07 40 08 add %i5, %o0, %o0 } } else { if ( !node->Parent ) 200aaf8: 80 a7 20 00 cmp %i4, 0 200aafc: 32 bf ff b9 bne,a 200a9e0 200ab00: f8 26 40 00 st %i4, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200ab04: 40 00 0c 7c call 200dcf4 <__errno> 200ab08: 01 00 00 00 nop 200ab0c: 10 80 00 73 b 200acd8 200ab10: f0 22 00 00 st %i0, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200ab14: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ab18: 80 a0 60 03 cmp %g1, 3 200ab1c: 12 80 00 0a bne 200ab44 200ab20: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 200ab24: 90 10 00 19 mov %i1, %o0 200ab28: 7f ff ff 78 call 200a908 200ab2c: 92 10 20 00 clr %o1 if ( result == -1 ) 200ab30: 80 a2 3f ff cmp %o0, -1 200ab34: 12 80 00 0c bne 200ab64 <== ALWAYS TAKEN 200ab38: b0 10 00 08 mov %o0, %i0 200ab3c: 81 c7 e0 08 ret <== NOT EXECUTED 200ab40: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200ab44: 32 80 00 09 bne,a 200ab68 200ab48: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 200ab4c: 90 10 00 19 mov %i1, %o0 200ab50: 7f ff ff 6e call 200a908 200ab54: 92 10 20 00 clr %o1 if ( result == -1 ) 200ab58: 80 a2 3f ff cmp %o0, -1 200ab5c: 02 bf ff f8 be 200ab3c <== NEVER TAKEN 200ab60: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 200ab64: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200ab68: 80 a2 20 00 cmp %o0, 0 200ab6c: 02 80 00 57 be 200acc8 <== NEVER TAKEN 200ab70: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200ab74: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200ab78: 80 a0 60 01 cmp %g1, 1 200ab7c: 12 80 00 53 bne 200acc8 200ab80: 01 00 00 00 nop /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200ab84: 40 00 00 92 call 200adcc 200ab88: 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 ) 200ab8c: b8 92 20 00 orcc %o0, 0, %i4 200ab90: 02 80 00 32 be 200ac58 200ab94: c2 07 bf f8 ld [ %fp + -8 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200ab98: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ab9c: 80 a0 60 01 cmp %g1, 1 200aba0: 32 bf ff 90 bne,a 200a9e0 200aba4: f8 26 40 00 st %i4, [ %i1 ] 200aba8: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200abac: 80 a0 60 00 cmp %g1, 0 200abb0: 02 80 00 20 be 200ac30 200abb4: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( path, &pathlen, &i); 200abb8: 92 07 bf fc add %fp, -4, %o1 200abbc: 7f ff fe 16 call 200a414 200abc0: 94 07 bf f4 add %fp, -12, %o2 if ((path[i] != '.') || (path[i + 1] != '.')) { 200abc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 200abc8: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200abcc: 80 a0 a0 2e cmp %g2, 0x2e 200abd0: 12 80 00 06 bne 200abe8 200abd4: b0 07 40 01 add %i5, %g1, %i0 200abd8: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200abdc: 80 a0 a0 2e cmp %g2, 0x2e 200abe0: 02 80 00 0f be 200ac1c <== ALWAYS TAKEN 200abe4: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200abe8: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200abec: 90 10 00 19 mov %i1, %o0 200abf0: 92 02 60 1c add %o1, 0x1c, %o1 200abf4: 40 00 0e 9c call 200e664 200abf8: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i], 200abfc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ac00: 90 10 00 18 mov %i0, %o0 200ac04: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ac08: 92 10 00 19 mov %i1, %o1 200ac0c: 9f c0 40 00 call %g1 200ac10: 94 10 00 1a mov %i2, %o2 200ac14: 81 c7 e0 08 ret 200ac18: 91 e8 00 08 restore %g0, %o0, %o0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200ac1c: 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; 200ac20: c2 27 bf f4 st %g1, [ %fp + -12 ] pathlen -= 2; 200ac24: c2 07 bf fc ld [ %fp + -4 ], %g1 200ac28: 82 00 7f fe add %g1, -2, %g1 200ac2c: c2 27 bf fc st %g1, [ %fp + -4 ] node = node->Parent; } pathloc->node_access = node; 200ac30: 10 bf ff 6c b 200a9e0 200ac34: f8 26 40 00 st %i4, [ %i1 ] } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200ac38: 40 00 0c 2f call 200dcf4 <__errno> 200ac3c: 01 00 00 00 nop 200ac40: 10 80 00 25 b 200acd4 200ac44: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200ac48: 40 00 0c 2b call 200dcf4 <__errno> 200ac4c: 01 00 00 00 nop 200ac50: 10 80 00 21 b 200acd4 200ac54: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200ac58: c4 07 bf f4 ld [ %fp + -12 ], %g2 200ac5c: 82 20 80 01 sub %g2, %g1, %g1 200ac60: 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++) { 200ac64: 10 80 00 0d b 200ac98 200ac68: c2 26 80 00 st %g1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 200ac6c: 7f ff e4 1b call 2003cd8 200ac70: 01 00 00 00 nop 200ac74: 80 a2 20 00 cmp %o0, 0 200ac78: 32 80 00 06 bne,a 200ac90 200ac7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 200ac80: 40 00 0c 1d call 200dcf4 <__errno> 200ac84: 01 00 00 00 nop 200ac88: 10 80 00 13 b 200acd4 200ac8c: 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++) { 200ac90: 82 00 60 01 inc %g1 200ac94: c2 27 bf f4 st %g1, [ %fp + -12 ] 200ac98: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ac9c: d0 4f 40 01 ldsb [ %i5 + %g1 ], %o0 200aca0: 80 a2 20 00 cmp %o0, 0 200aca4: 12 bf ff f2 bne 200ac6c 200aca8: 01 00 00 00 nop /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200acac: 7f ff fd f2 call 200a474 200acb0: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200acb4: c2 06 40 00 ld [ %i1 ], %g1 200acb8: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200acbc: 80 a0 60 01 cmp %g1, 1 200acc0: 02 80 00 08 be 200ace0 <== ALWAYS TAKEN 200acc4: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200acc8: 40 00 0c 0b call 200dcf4 <__errno> 200accc: 01 00 00 00 nop 200acd0: 82 10 20 14 mov 0x14, %g1 ! 14 200acd4: c2 22 00 00 st %g1, [ %o0 ] 200acd8: 81 c7 e0 08 ret 200acdc: 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 ) ) 200ace0: 90 10 00 19 mov %i1, %o0 200ace4: 7f ff fd ff call 200a4e0 200ace8: 92 10 20 03 mov 3, %o1 200acec: 80 a2 20 00 cmp %o0, 0 200acf0: 12 80 00 06 bne 200ad08 200acf4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200acf8: 40 00 0b ff call 200dcf4 <__errno> 200acfc: b0 10 3f ff mov -1, %i0 ! ffffffff 200ad00: 82 10 20 0d mov 0xd, %g1 200ad04: c2 22 00 00 st %g1, [ %o0 ] return result; } 200ad08: 81 c7 e0 08 ret 200ad0c: 81 e8 00 00 restore =============================================================================== 0200a4e0 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200a4e0: 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 ) ) 200a4e4: 80 8e 7f f8 btst -8, %i1 200a4e8: 22 80 00 08 be,a 200a508 <== ALWAYS TAKEN 200a4ec: c2 06 00 00 ld [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 200a4f0: 40 00 0e 01 call 200dcf4 <__errno> <== NOT EXECUTED 200a4f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a4f8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a4fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a500: 81 c7 e0 08 ret <== NOT EXECUTED 200a504: 81 e8 00 00 restore <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200a508: b3 2e 60 06 sll %i1, 6, %i1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200a50c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 return 1; 200a510: b2 2e 40 01 andn %i1, %g1, %i1 200a514: 80 a0 00 19 cmp %g0, %i1 200a518: b0 60 3f ff subx %g0, -1, %i0 return 0; } 200a51c: 81 c7 e0 08 ret 200a520: 81 e8 00 00 restore =============================================================================== 020034f4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 20034f4: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 20034f8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 20034fc: 92 10 00 19 mov %i1, %o1 2003500: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2003504: 98 10 00 18 mov %i0, %o4 2003508: 94 10 00 1a mov %i2, %o2 200350c: 40 00 27 7a call 200d2f4 2003510: 96 10 00 1b mov %i3, %o3 2003514: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 2003518: 80 a6 20 00 cmp %i0, 0 200351c: 16 80 00 08 bge 200353c <== NEVER TAKEN 2003520: b2 10 00 08 mov %o0, %i1 2003524: 40 00 2f 7d call 200f318 <__errno> 2003528: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200352c: 82 20 00 19 neg %i1, %g1 2003530: c2 22 00 00 st %g1, [ %o0 ] 2003534: b0 16 23 ff or %i0, 0x3ff, %i0 2003538: b2 10 00 18 mov %i0, %i1 } 200353c: 81 c7 e0 08 ret 2003540: 81 e8 00 00 restore =============================================================================== 02003544 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2003544: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2003548: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200354c: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 2003550: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 2003554: 92 10 00 19 mov %i1, %o1 2003558: 40 00 26 e0 call 200d0d8 200355c: 94 10 00 1a mov %i2, %o2 if (err > 0) { 2003560: b0 92 20 00 orcc %o0, 0, %i0 2003564: 04 80 00 09 ble 2003588 2003568: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 200356c: 40 00 04 18 call 20045cc 2003570: 92 10 20 00 clr %o1 2003574: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003578: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200357c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003580: 81 c7 e0 08 ret 2003584: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003588: 80 a6 20 00 cmp %i0, 0 200358c: 02 80 00 06 be 20035a4 <== NEVER TAKEN 2003590: 01 00 00 00 nop 2003594: 40 00 2f 61 call 200f318 <__errno> 2003598: b0 20 00 18 neg %i0 200359c: f0 22 00 00 st %i0, [ %o0 ] 20035a0: b0 10 3f ff mov -1, %i0 } 20035a4: 81 c7 e0 08 ret 20035a8: 81 e8 00 00 restore =============================================================================== 0200adcc : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200adcc: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200add0: 13 00 80 66 sethi %hi(0x2019800), %o1 200add4: 90 10 00 19 mov %i1, %o0 200add8: 40 00 0f 6e call 200eb90 200addc: 92 12 60 50 or %o1, 0x50, %o1 200ade0: 80 a2 20 00 cmp %o0, 0 200ade4: 02 80 00 09 be 200ae08 <== NEVER TAKEN 200ade8: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200adec: 13 00 80 66 sethi %hi(0x2019800), %o1 200adf0: 40 00 0f 68 call 200eb90 200adf4: 92 12 60 58 or %o1, 0x58, %o1 ! 2019858 200adf8: 80 a2 20 00 cmp %o0, 0 200adfc: 32 80 00 05 bne,a 200ae10 <== ALWAYS TAKEN 200ae00: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; 200ae04: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200ae08: 81 c7 e0 08 ret 200ae0c: 81 e8 00 00 restore the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200ae10: 10 80 00 08 b 200ae30 200ae14: 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 ) ) 200ae18: 40 00 0f 5e call 200eb90 200ae1c: 92 07 60 0c add %i5, 0xc, %o1 200ae20: 80 a2 20 00 cmp %o0, 0 200ae24: 22 bf ff f9 be,a 200ae08 200ae28: 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 ) { 200ae2c: 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 ); 200ae30: 80 a7 40 18 cmp %i5, %i0 200ae34: 12 bf ff f9 bne 200ae18 200ae38: 90 10 00 19 mov %i1, %o0 200ae3c: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200ae40: 81 c7 e0 08 ret 200ae44: 81 e8 00 00 restore =============================================================================== 0200ad10 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200ad10: 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; 200ad14: 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; 200ad18: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 loc = temp_mt_entry->mt_fs_root; 200ad1c: b8 07 bf ec add %fp, -20, %i4 200ad20: 92 06 20 1c add %i0, 0x1c, %o1 200ad24: 40 00 0e 50 call 200e664 200ad28: 90 10 00 1c mov %i4, %o0 200ad2c: c0 26 20 1c clr [ %i0 + 0x1c ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200ad30: f0 07 60 08 ld [ %i5 + 8 ], %i0 loc.node_access = (void *)jnode; 200ad34: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200ad38: 7f ff fd cf call 200a474 200ad3c: 90 10 00 1c mov %i4, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200ad40: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ad44: 80 a0 60 01 cmp %g1, 1 200ad48: 32 80 00 08 bne,a 200ad68 200ad4c: 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 ) ) { 200ad50: 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 ); 200ad54: 82 07 60 54 add %i5, 0x54, %g1 200ad58: 80 a0 80 01 cmp %g2, %g1 200ad5c: 12 80 00 09 bne 200ad80 200ad60: 80 a7 60 00 cmp %i5, 0 result = IMFS_unlink( NULL, &loc ); 200ad64: 90 10 20 00 clr %o0 200ad68: 7f ff de 59 call 20026cc 200ad6c: 92 10 00 1c mov %i4, %o1 if (result != 0) 200ad70: 80 a2 20 00 cmp %o0, 0 200ad74: 12 80 00 12 bne 200adbc <== NEVER TAKEN 200ad78: ba 10 00 18 mov %i0, %i5 return -1; jnode = next; } if ( jnode != NULL ) { 200ad7c: 80 a7 60 00 cmp %i5, 0 200ad80: 02 80 00 11 be 200adc4 200ad84: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200ad88: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ad8c: 80 a0 60 01 cmp %g1, 1 200ad90: 32 bf ff e9 bne,a 200ad34 <== NEVER TAKEN 200ad94: 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; 200ad98: 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 ); 200ad9c: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200ada0: 80 a0 40 02 cmp %g1, %g2 200ada4: 02 bf ff e3 be 200ad30 200ada8: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200adac: 12 bf ff e1 bne 200ad30 <== ALWAYS TAKEN 200adb0: ba 10 00 01 mov %g1, %i5 return 0; 200adb4: 81 c7 e0 08 ret <== NOT EXECUTED 200adb8: 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; 200adbc: 81 c7 e0 08 ret <== NOT EXECUTED 200adc0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 200adc4: 81 c7 e0 08 ret 200adc8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200ae48 : const char *path, int pathlen, char *token, int *token_len ) { 200ae48: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200ae4c: 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) ) { 200ae50: 10 80 00 06 b 200ae68 200ae54: f8 0e 00 00 ldub [ %i0 ], %i4 token[i] = c; if ( i == IMFS_NAME_MAX ) 200ae58: 02 80 00 32 be 200af20 200ae5c: 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]; 200ae60: ba 07 60 01 inc %i5 200ae64: 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) ) { 200ae68: 91 2f 20 18 sll %i4, 0x18, %o0 200ae6c: 7f ff e3 9b call 2003cd8 200ae70: 91 3a 20 18 sra %o0, 0x18, %o0 200ae74: 80 a2 20 00 cmp %o0, 0 200ae78: 12 80 00 04 bne 200ae88 200ae7c: 80 a7 40 19 cmp %i5, %i1 200ae80: 06 bf ff f6 bl 200ae58 <== ALWAYS TAKEN 200ae84: 80 a7 60 20 cmp %i5, 0x20 /* * Copy a seperator into token. */ if ( i == 0 ) { 200ae88: 80 a7 60 00 cmp %i5, 0 200ae8c: 12 80 00 0e bne 200aec4 200ae90: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; 200ae94: f8 2e 80 00 stb %i4, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200ae98: b9 2f 20 18 sll %i4, 0x18, %i4 200ae9c: 80 a7 20 00 cmp %i4, 0 200aea0: 02 80 00 07 be 200aebc 200aea4: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; 200aea8: b0 10 20 01 mov 1, %i0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200aeac: 80 a6 60 00 cmp %i1, 0 200aeb0: 12 80 00 0a bne 200aed8 200aeb4: ba 10 20 01 mov 1, %i5 200aeb8: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200aebc: 10 80 00 07 b 200aed8 200aec0: b0 10 20 00 clr %i0 } } else if (token[ i-1 ] != '\0') { 200aec4: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200aec8: 80 a0 60 00 cmp %g1, 0 200aecc: 02 80 00 03 be 200aed8 <== NEVER TAKEN 200aed0: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200aed4: 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 ) { 200aed8: 80 a6 20 03 cmp %i0, 3 200aedc: 12 80 00 0f bne 200af18 200aee0: fa 26 c0 00 st %i5, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200aee4: 90 10 00 1a mov %i2, %o0 200aee8: 13 00 80 66 sethi %hi(0x2019800), %o1 200aeec: 40 00 0f 29 call 200eb90 200aef0: 92 12 60 60 or %o1, 0x60, %o1 ! 2019860 200aef4: 80 a2 20 00 cmp %o0, 0 200aef8: 02 80 00 0c be 200af28 200aefc: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200af00: 13 00 80 66 sethi %hi(0x2019800), %o1 200af04: 40 00 0f 23 call 200eb90 200af08: 92 12 60 68 or %o1, 0x68, %o1 ! 2019868 200af0c: 80 a2 20 00 cmp %o0, 0 200af10: 22 80 00 02 be,a 200af18 200af14: b0 10 20 01 mov 1, %i0 200af18: 81 c7 e0 08 ret 200af1c: 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; 200af20: 81 c7 e0 08 ret 200af24: 91 e8 20 04 restore %g0, 4, %o0 200af28: b0 10 20 02 mov 2, %i0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200af2c: 81 c7 e0 08 ret 200af30: 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 6a sethi %hi(0x201a800), %g1 20022e8: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201a954 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 6c sethi %hi(0x201b000), %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 6c sethi %hi(0x201b000), %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 28 call 200a3b8 200231c: c2 20 a0 cc st %g1, [ %g2 + 0xcc ] ! 201b0cc 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 66 sethi %hi(0x2019800), %o1 200233c: 40 00 30 ca call 200e664 2002340: 92 12 60 1c or %o1, 0x1c, %o1 ! 201981c /* * 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 6c sethi %hi(0x201b000), %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 2e 64 call 200dcf4 <__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 60 d0 ld [ %g1 + 0xd0 ], %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 60 d0 st %g2, [ %g1 + 0xd0 ] 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 =============================================================================== 0200cd24 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200cd24: 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 ) 200cd28: 03 00 80 6c sethi %hi(0x201b000), %g1 200cd2c: fa 00 60 cc ld [ %g1 + 0xcc ], %i5 ! 201b0cc 200cd30: b9 37 60 02 srl %i5, 2, %i4 200cd34: 92 10 00 1c mov %i4, %o1 200cd38: 40 00 27 2f call 20169f4 <.umul> 200cd3c: 90 07 20 01 add %i4, 1, %o0 200cd40: 92 10 00 1c mov %i4, %o1 200cd44: 40 00 27 2c call 20169f4 <.umul> 200cd48: 90 02 20 01 inc %o0 200cd4c: 92 10 00 1d mov %i5, %o1 200cd50: 40 00 27 29 call 20169f4 <.umul> 200cd54: 90 02 3f ff add %o0, -1, %o0 200cd58: 82 10 20 00 clr %g1 200cd5c: 80 a0 40 19 cmp %g1, %i1 200cd60: 34 80 00 0b bg,a 200cd8c 200cd64: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 200cd68: 80 a0 40 19 cmp %g1, %i1 200cd6c: 12 80 00 04 bne 200cd7c <== NEVER TAKEN 200cd70: 80 a2 00 1a cmp %o0, %i2 200cd74: 38 80 00 06 bgu,a 200cd8c 200cd78: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200cd7c: 40 00 03 de call 200dcf4 <__errno> 200cd80: 01 00 00 00 nop 200cd84: 10 80 00 29 b 200ce28 200cd88: 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 ) 200cd8c: 80 a6 40 1c cmp %i1, %i4 200cd90: 14 80 00 07 bg 200cdac <== NEVER TAKEN 200cd94: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200cd98: 80 a6 40 1c cmp %i1, %i4 200cd9c: 12 80 00 37 bne 200ce78 200cda0: 80 a6 80 10 cmp %i2, %l0 200cda4: 08 80 00 35 bleu 200ce78 200cda8: 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; 200cdac: b7 3f 60 1f sra %i5, 0x1f, %i3 200cdb0: 96 10 00 1d mov %i5, %o3 200cdb4: 94 10 00 1b mov %i3, %o2 200cdb8: 90 10 00 19 mov %i1, %o0 200cdbc: 40 00 28 a0 call 201703c <__divdi3> 200cdc0: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cdc4: 90 10 00 1c mov %i4, %o0 200cdc8: 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; 200cdcc: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cdd0: 94 10 00 1b mov %i3, %o2 200cdd4: 40 00 28 9a call 201703c <__divdi3> 200cdd8: 92 10 00 10 mov %l0, %o1 200cddc: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200cde0: 10 80 00 15 b 200ce34 200cde4: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200cde8: 7f ff ff 48 call 200cb08 200cdec: 92 10 00 1d mov %i5, %o1 200cdf0: 80 a2 20 00 cmp %o0, 0 200cdf4: 22 80 00 10 be,a 200ce34 200cdf8: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200cdfc: 10 80 00 06 b 200ce14 200ce00: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200ce04: 90 10 00 18 mov %i0, %o0 200ce08: 7f ff ff bb call 200ccf4 200ce0c: 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-- ) { 200ce10: 80 a7 40 1c cmp %i5, %i4 200ce14: 1a bf ff fc bcc 200ce04 200ce18: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200ce1c: 40 00 03 b6 call 200dcf4 <__errno> 200ce20: 01 00 00 00 nop 200ce24: 82 10 20 1c mov 0x1c, %g1 ! 1c 200ce28: c2 22 00 00 st %g1, [ %o0 ] 200ce2c: 81 c7 e0 08 ret 200ce30: 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++ ) { 200ce34: 80 a7 40 11 cmp %i5, %l1 200ce38: 08 bf ff ec bleu 200cde8 200ce3c: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200ce40: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200ce44: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200ce48: 92 10 20 00 clr %o1 200ce4c: 7f ff d8 0c call 2002e7c 200ce50: 90 07 bf f8 add %fp, -8, %o0 200ce54: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200ce58: 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); 200ce5c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200ce60: 7f ff d8 07 call 2002e7c 200ce64: 92 10 20 00 clr %o1 200ce68: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ce6c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200ce70: 81 c7 e0 08 ret 200ce74: 91 e8 20 00 restore %g0, 0, %o0 } 200ce78: 81 c7 e0 08 ret 200ce7c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200c67c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200c67c: 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 ) { 200c680: 03 00 80 6c sethi %hi(0x201b000), %g1 200c684: f8 00 60 cc ld [ %g1 + 0xcc ], %i4 ! 201b0cc 200c688: b9 37 20 02 srl %i4, 2, %i4 200c68c: 82 07 3f ff add %i4, -1, %g1 200c690: 80 a6 40 01 cmp %i1, %g1 200c694: 18 80 00 18 bgu 200c6f4 200c698: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200c69c: 80 a6 a0 00 cmp %i2, 0 200c6a0: 02 80 00 0f be 200c6dc 200c6a4: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200c6a8: 80 a0 60 00 cmp %g1, 0 200c6ac: 32 80 00 09 bne,a 200c6d0 200c6b0: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200c6b4: 7f ff ff e5 call 200c648 200c6b8: b0 10 20 00 clr %i0 if ( !p ) 200c6bc: 80 a2 20 00 cmp %o0, 0 200c6c0: 02 80 00 8a be 200c8e8 <== NEVER TAKEN 200c6c4: 01 00 00 00 nop return 0; info->indirect = p; 200c6c8: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200c6cc: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200c6d0: b3 2e 60 02 sll %i1, 2, %i1 200c6d4: 81 c7 e0 08 ret 200c6d8: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200c6dc: 80 a0 60 00 cmp %g1, 0 200c6e0: 02 80 00 82 be 200c8e8 <== NEVER TAKEN 200c6e4: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200c6e8: b3 2e 60 02 sll %i1, 2, %i1 200c6ec: 81 c7 e0 08 ret 200c6f0: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200c6f4: 90 07 20 01 add %i4, 1, %o0 200c6f8: 40 00 28 bf call 20169f4 <.umul> 200c6fc: 92 10 00 1c mov %i4, %o1 200c700: 82 02 3f ff add %o0, -1, %g1 200c704: 80 a6 40 01 cmp %i1, %g1 200c708: 18 80 00 2f bgu 200c7c4 200c70c: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200c710: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c714: 92 10 00 1c mov %i4, %o1 200c718: 40 00 29 9d call 2016d8c <.urem> 200c71c: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c720: 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; 200c724: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c728: 40 00 28 ed call 2016adc <.udiv> 200c72c: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200c730: 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; 200c734: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200c738: 02 80 00 18 be 200c798 200c73c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200c740: 80 a2 20 00 cmp %o0, 0 200c744: 32 80 00 08 bne,a 200c764 200c748: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200c74c: 7f ff ff bf call 200c648 200c750: b0 10 20 00 clr %i0 if ( !p ) 200c754: 80 a2 20 00 cmp %o0, 0 200c758: 02 80 00 64 be 200c8e8 <== NEVER TAKEN 200c75c: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200c760: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200c764: ba 02 00 1c add %o0, %i4, %i5 200c768: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200c76c: 80 a2 20 00 cmp %o0, 0 200c770: 12 80 00 4f bne 200c8ac 200c774: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200c778: 7f ff ff b4 call 200c648 200c77c: b0 10 20 00 clr %i0 if ( !p1 ) 200c780: 80 a2 20 00 cmp %o0, 0 200c784: 02 80 00 59 be 200c8e8 <== NEVER TAKEN 200c788: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200c78c: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200c790: 10 80 00 47 b 200c8ac 200c794: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200c798: 80 a2 20 00 cmp %o0, 0 200c79c: 02 80 00 53 be 200c8e8 <== NEVER TAKEN 200c7a0: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200c7a4: b9 2f 20 02 sll %i4, 2, %i4 200c7a8: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200c7ac: 80 a0 60 00 cmp %g1, 0 200c7b0: 02 80 00 4e be 200c8e8 <== NEVER TAKEN 200c7b4: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200c7b8: b1 2e e0 02 sll %i3, 2, %i0 200c7bc: 81 c7 e0 08 ret 200c7c0: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200c7c4: 90 02 20 01 inc %o0 200c7c8: 40 00 28 8b call 20169f4 <.umul> 200c7cc: 92 10 00 1c mov %i4, %o1 200c7d0: 90 02 3f ff add %o0, -1, %o0 200c7d4: 80 a6 40 08 cmp %i1, %o0 200c7d8: 18 80 00 44 bgu 200c8e8 <== NEVER TAKEN 200c7dc: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200c7e0: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c7e4: 92 10 00 1c mov %i4, %o1 200c7e8: 40 00 29 69 call 2016d8c <.urem> 200c7ec: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c7f0: 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; 200c7f4: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c7f8: 40 00 28 b9 call 2016adc <.udiv> 200c7fc: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200c800: 92 10 00 1c mov %i4, %o1 200c804: 40 00 28 b6 call 2016adc <.udiv> 200c808: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c80c: 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; 200c810: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c814: 40 00 29 5e call 2016d8c <.urem> 200c818: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200c81c: 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; 200c820: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200c824: 02 80 00 24 be 200c8b4 200c828: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200c82c: 80 a2 20 00 cmp %o0, 0 200c830: 12 80 00 08 bne 200c850 200c834: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200c838: 7f ff ff 84 call 200c648 200c83c: 01 00 00 00 nop if ( !p ) 200c840: 80 a2 20 00 cmp %o0, 0 200c844: 02 80 00 29 be 200c8e8 <== NEVER TAKEN 200c848: 01 00 00 00 nop return 0; info->triply_indirect = p; 200c84c: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200c850: ba 02 00 1b add %o0, %i3, %i5 200c854: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200c858: 80 a2 20 00 cmp %o0, 0 200c85c: 32 80 00 08 bne,a 200c87c 200c860: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200c864: 7f ff ff 79 call 200c648 200c868: b0 10 20 00 clr %i0 if ( !p1 ) 200c86c: 80 a2 20 00 cmp %o0, 0 200c870: 02 80 00 1e be 200c8e8 <== NEVER TAKEN 200c874: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200c878: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200c87c: ba 02 00 1c add %o0, %i4, %i5 200c880: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200c884: 80 a2 20 00 cmp %o0, 0 200c888: 12 80 00 09 bne 200c8ac 200c88c: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200c890: 7f ff ff 6e call 200c648 200c894: b0 10 20 00 clr %i0 if ( !p2 ) 200c898: 80 a2 20 00 cmp %o0, 0 200c89c: 02 80 00 13 be 200c8e8 <== NEVER TAKEN 200c8a0: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200c8a4: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200c8a8: b1 2c 20 02 sll %l0, 2, %i0 200c8ac: 81 c7 e0 08 ret 200c8b0: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200c8b4: 80 a2 20 00 cmp %o0, 0 200c8b8: 02 80 00 0c be 200c8e8 <== NEVER TAKEN 200c8bc: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200c8c0: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200c8c4: 80 a0 60 00 cmp %g1, 0 200c8c8: 02 80 00 08 be 200c8e8 <== NEVER TAKEN 200c8cc: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200c8d0: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200c8d4: 80 a0 60 00 cmp %g1, 0 200c8d8: 02 80 00 04 be 200c8e8 <== NEVER TAKEN 200c8dc: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200c8e0: b1 2c 20 02 sll %l0, 2, %i0 200c8e4: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200c8e8: 81 c7 e0 08 ret 200c8ec: 81 e8 00 00 restore =============================================================================== 0200c8f0 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c8f0: 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) { 200c8f4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c8f8: ba 10 00 18 mov %i0, %i5 200c8fc: 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) { 200c900: 80 a0 60 06 cmp %g1, 6 200c904: 12 80 00 1c bne 200c974 200c908: 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)) 200c90c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200c910: 82 10 20 00 clr %g1 200c914: 86 a3 40 1a subcc %o5, %i2, %g3 200c918: 84 63 00 19 subx %o4, %i1, %g2 200c91c: 80 a0 40 02 cmp %g1, %g2 200c920: 14 80 00 07 bg 200c93c <== NEVER TAKEN 200c924: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200c928: 80 a0 40 02 cmp %g1, %g2 200c92c: 12 80 00 06 bne 200c944 <== NEVER TAKEN 200c930: 80 a7 00 03 cmp %i4, %g3 200c934: 28 80 00 05 bleu,a 200c948 <== NEVER TAKEN 200c938: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200c93c: 10 80 00 03 b 200c948 200c940: 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; 200c944: 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); 200c948: 92 02 40 11 add %o1, %l1, %o1 200c94c: 94 10 00 18 mov %i0, %o2 200c950: 40 00 07 45 call 200e664 200c954: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200c958: 90 07 bf f8 add %fp, -8, %o0 200c95c: 7f ff d9 48 call 2002e7c 200c960: 92 10 20 00 clr %o1 200c964: c2 07 bf f8 ld [ %fp + -8 ], %g1 200c968: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200c96c: 81 c7 e0 08 ret 200c970: 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 ) 200c974: 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; 200c978: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200c97c: 88 10 20 00 clr %g4 200c980: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200c984: 80 a1 00 03 cmp %g4, %g3 200c988: 14 80 00 08 bg 200c9a8 <== NEVER TAKEN 200c98c: b4 07 00 1a add %i4, %i2, %i2 200c990: 80 a1 00 03 cmp %g4, %g3 200c994: 32 80 00 07 bne,a 200c9b0 <== NEVER TAKEN 200c998: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200c99c: 80 a6 80 02 cmp %i2, %g2 200c9a0: 28 80 00 04 bleu,a 200c9b0 200c9a4: 03 00 80 6c sethi %hi(0x201b000), %g1 my_length = the_jnode->info.file.size - start; 200c9a8: 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; 200c9ac: 03 00 80 6c sethi %hi(0x201b000), %g1 200c9b0: f4 00 60 cc ld [ %g1 + 0xcc ], %i2 ! 201b0cc 200c9b4: 90 10 00 10 mov %l0, %o0 200c9b8: b1 3e a0 1f sra %i2, 0x1f, %i0 200c9bc: 92 10 00 11 mov %l1, %o1 200c9c0: 94 10 00 18 mov %i0, %o2 200c9c4: 40 00 2a 84 call 20173d4 <__moddi3> 200c9c8: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c9cc: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200c9d0: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c9d4: 94 10 00 18 mov %i0, %o2 200c9d8: 92 10 00 11 mov %l1, %o1 200c9dc: 40 00 29 98 call 201703c <__divdi3> 200c9e0: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200c9e4: 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; 200c9e8: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200c9ec: 80 a6 60 00 cmp %i1, 0 200c9f0: 02 80 00 14 be 200ca40 200c9f4: 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 ); 200c9f8: 90 10 00 1d mov %i5, %o0 200c9fc: 7f ff ff 20 call 200c67c 200ca00: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ca04: 80 a2 20 00 cmp %o0, 0 200ca08: 02 bf ff d9 be 200c96c <== NEVER TAKEN 200ca0c: 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; 200ca10: 80 a7 00 1a cmp %i4, %i2 200ca14: 08 80 00 03 bleu 200ca20 200ca18: b0 10 00 1c mov %i4, %i0 200ca1c: 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 ); 200ca20: d2 02 00 00 ld [ %o0 ], %o1 200ca24: 94 10 00 18 mov %i0, %o2 200ca28: 90 10 00 1b mov %i3, %o0 200ca2c: 92 02 40 19 add %o1, %i1, %o1 200ca30: 40 00 07 0d call 200e664 200ca34: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200ca38: a0 04 20 01 inc %l0 my_length -= to_copy; 200ca3c: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200ca40: 35 00 80 6c sethi %hi(0x201b000), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200ca44: 10 80 00 0f b 200ca80 200ca48: f6 06 a0 cc ld [ %i2 + 0xcc ], %i3 ! 201b0cc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ca4c: 92 10 00 10 mov %l0, %o1 200ca50: 7f ff ff 0b call 200c67c 200ca54: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ca58: 82 92 20 00 orcc %o0, 0, %g1 200ca5c: 02 bf ff c4 be 200c96c <== NEVER TAKEN 200ca60: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200ca64: d2 00 40 00 ld [ %g1 ], %o1 200ca68: 94 10 00 1b mov %i3, %o2 200ca6c: 40 00 06 fe call 200e664 200ca70: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200ca74: a0 04 20 01 inc %l0 my_length -= to_copy; 200ca78: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200ca7c: 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 ) { 200ca80: c2 06 a0 cc ld [ %i2 + 0xcc ], %g1 200ca84: 80 a7 00 01 cmp %i4, %g1 200ca88: 1a bf ff f1 bcc 200ca4c 200ca8c: 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 ) { 200ca90: 80 a7 20 00 cmp %i4, 0 200ca94: 02 80 00 0e be 200cacc 200ca98: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ca9c: 90 10 00 1d mov %i5, %o0 200caa0: 92 10 00 10 mov %l0, %o1 200caa4: 7f ff fe f6 call 200c67c 200caa8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200caac: 82 92 20 00 orcc %o0, 0, %g1 200cab0: 02 bf ff af be 200c96c <== NEVER TAKEN 200cab4: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200cab8: d2 00 40 00 ld [ %g1 ], %o1 200cabc: 94 10 00 1c mov %i4, %o2 200cac0: 40 00 06 e9 call 200e664 200cac4: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200cac8: 90 07 bf f8 add %fp, -8, %o0 200cacc: 7f ff d8 ec call 2002e7c 200cad0: 92 10 20 00 clr %o1 200cad4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200cad8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200cadc: 81 c7 e0 08 ret 200cae0: 81 e8 00 00 restore =============================================================================== 0200cbc4 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200cbc4: 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; 200cbc8: 03 00 80 6c sethi %hi(0x201b000), %g1 200cbcc: fa 00 60 cc ld [ %g1 + 0xcc ], %i5 ! 201b0cc * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200cbd0: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200cbd4: 80 a0 60 00 cmp %g1, 0 200cbd8: 02 80 00 05 be 200cbec 200cbdc: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200cbe0: 90 06 20 58 add %i0, 0x58, %o0 200cbe4: 7f ff ff e5 call 200cb78 200cbe8: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200cbec: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200cbf0: b8 10 20 00 clr %i4 200cbf4: 80 a0 60 00 cmp %g1, 0 200cbf8: 12 80 00 0d bne 200cc2c 200cbfc: 37 00 80 6c sethi %hi(0x201b000), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200cc00: 10 80 00 15 b 200cc54 200cc04: 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( 200cc08: 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] ) { 200cc0c: 90 00 80 01 add %g2, %g1, %o0 200cc10: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200cc14: 80 a0 60 00 cmp %g1, 0 200cc18: 22 80 00 05 be,a 200cc2c <== NEVER TAKEN 200cc1c: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200cc20: 7f ff ff d6 call 200cb78 200cc24: 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 200cc3c: 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 ); 200cc40: 90 06 20 5c add %i0, 0x5c, %o0 200cc44: 7f ff ff cd call 200cb78 200cc48: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200cc4c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200cc50: b8 10 20 00 clr %i4 200cc54: 80 a0 60 00 cmp %g1, 0 200cc58: 12 80 00 1c bne 200ccc8 200cc5c: 33 00 80 6c sethi %hi(0x201b000), %i1 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200cc60: 81 c7 e0 08 ret 200cc64: 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( 200cc68: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200cc6c: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200cc70: 80 a6 e0 00 cmp %i3, 0 200cc74: 02 80 00 1b be 200cce0 <== NEVER TAKEN 200cc78: 90 06 20 60 add %i0, 0x60, %o0 200cc7c: 10 80 00 09 b 200cca0 200cc80: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200cc8c: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200cc90: 7f ff ff ba call 200cb78 200cc94: 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 200ccb0: 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( 200ccb4: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200ccb8: 92 10 00 1d mov %i5, %o1 200ccbc: 90 02 00 10 add %o0, %l0, %o0 200ccc0: 7f ff ff ae call 200cb78 200ccc4: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200ccd8: 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( 200ccdc: 90 06 20 60 add %i0, 0x60, %o0 200cce0: 7f ff ff a6 call 200cb78 200cce4: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return 0; } 200cce8: b0 10 20 00 clr %i0 200ccec: 81 c7 e0 08 ret 200ccf0: 81 e8 00 00 restore =============================================================================== 0200ce80 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce80: 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 ) { 200ce84: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce88: 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 ) { 200ce8c: 80 a0 60 00 cmp %g1, 0 200ce90: 06 80 00 09 bl 200ceb4 <== NEVER TAKEN 200ce94: 94 07 00 1a add %i4, %i2, %o2 200ce98: 80 a0 60 00 cmp %g1, 0 200ce9c: 12 80 00 12 bne 200cee4 <== NEVER TAKEN 200cea0: 03 00 80 6c sethi %hi(0x201b000), %g1 200cea4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200cea8: 80 a0 40 0a cmp %g1, %o2 200ceac: 1a 80 00 0e bcc 200cee4 200ceb0: 03 00 80 6c sethi %hi(0x201b000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200ceb4: 90 10 00 1d mov %i5, %o0 200ceb8: 7f ff ff 9b call 200cd24 200cebc: 92 10 20 00 clr %o1 if ( status ) 200cec0: 80 a2 20 00 cmp %o0, 0 200cec4: 02 80 00 08 be 200cee4 200cec8: 03 00 80 6c sethi %hi(0x201b000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200cecc: 40 00 03 8a call 200dcf4 <__errno> 200ced0: b0 10 3f ff mov -1, %i0 200ced4: 82 10 20 1c mov 0x1c, %g1 200ced8: c2 22 00 00 st %g1, [ %o0 ] 200cedc: 81 c7 e0 08 ret 200cee0: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200cee4: e0 00 60 cc ld [ %g1 + 0xcc ], %l0 200cee8: 92 10 00 1a mov %i2, %o1 200ceec: b1 3c 20 1f sra %l0, 0x1f, %i0 200cef0: 96 10 00 10 mov %l0, %o3 200cef4: 94 10 00 18 mov %i0, %o2 200cef8: 40 00 29 37 call 20173d4 <__moddi3> 200cefc: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf00: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf04: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf08: 90 10 00 19 mov %i1, %o0 200cf0c: 92 10 00 1a mov %i2, %o1 200cf10: 40 00 28 4b call 201703c <__divdi3> 200cf14: 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; 200cf18: 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 ) { 200cf1c: 80 a4 60 00 cmp %l1, 0 200cf20: 02 80 00 14 be 200cf70 200cf24: 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 ); 200cf28: 90 10 00 1d mov %i5, %o0 200cf2c: 7f ff fd d4 call 200c67c 200cf30: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf34: 80 a2 20 00 cmp %o0, 0 200cf38: 02 80 00 36 be 200d010 <== NEVER TAKEN 200cf3c: 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; 200cf40: b0 24 00 11 sub %l0, %l1, %i0 200cf44: 80 a6 00 1c cmp %i0, %i4 200cf48: 38 80 00 02 bgu,a 200cf50 200cf4c: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200cf50: d0 02 00 00 ld [ %o0 ], %o0 200cf54: 92 10 00 1b mov %i3, %o1 200cf58: 90 02 00 11 add %o0, %l1, %o0 200cf5c: 94 10 00 18 mov %i0, %o2 200cf60: 40 00 05 c1 call 200e664 200cf64: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200cf68: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cf6c: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf70: 21 00 80 6c sethi %hi(0x201b000), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200cf74: 10 80 00 0f b 200cfb0 200cf78: f2 04 20 cc ld [ %l0 + 0xcc ], %i1 ! 201b0cc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cf7c: 92 10 00 1a mov %i2, %o1 200cf80: 7f ff fd bf call 200c67c 200cf84: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf88: 80 a2 20 00 cmp %o0, 0 200cf8c: 02 bf ff d4 be 200cedc <== NEVER TAKEN 200cf90: 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 ); 200cf94: d0 02 00 00 ld [ %o0 ], %o0 200cf98: 94 10 00 19 mov %i1, %o2 200cf9c: 40 00 05 b2 call 200e664 200cfa0: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200cfa4: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cfa8: 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( 200cfac: 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 ) { 200cfb0: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 200cfb4: 80 a7 00 01 cmp %i4, %g1 200cfb8: 1a bf ff f1 bcc 200cf7c 200cfbc: 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 ) { 200cfc0: 80 a7 20 00 cmp %i4, 0 200cfc4: 02 80 00 0e be 200cffc 200cfc8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cfcc: 90 10 00 1d mov %i5, %o0 200cfd0: 92 10 00 1a mov %i2, %o1 200cfd4: 7f ff fd aa call 200c67c 200cfd8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cfdc: 80 a2 20 00 cmp %o0, 0 200cfe0: 02 bf ff bf be 200cedc <== NEVER TAKEN 200cfe4: 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 ); 200cfe8: d0 02 00 00 ld [ %o0 ], %o0 200cfec: 94 10 00 1c mov %i4, %o2 200cff0: 40 00 05 9d call 200e664 200cff4: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200cff8: 90 07 bf f8 add %fp, -8, %o0 200cffc: 7f ff d7 a0 call 2002e7c 200d000: 92 10 20 00 clr %o1 200d004: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d008: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200d00c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200d010: 81 c7 e0 08 ret 200d014: 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 2d e2 call 200dcf4 <__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 88 sethi %hi(0x2022000), %i5 2004e78: c2 07 63 30 ld [ %i5 + 0x330 ], %g1 ! 2022330 <_impure_ptr> 2004e7c: 90 06 20 0c add %i0, 0xc, %o0 2004e80: 40 00 35 92 call 20124c8 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 63 30 ld [ %i5 + 0x330 ], %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 63 30 ld [ %i5 + 0x330 ], %g1 2004eb8: 90 10 20 2f mov 0x2f, %o0 2004ebc: 40 00 35 4e call 20123f4 2004ec0: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 2004ec4: 10 80 00 27 b 2004f60 2004ec8: 31 00 80 81 sethi %hi(0x2020400), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2004ecc: c2 07 63 30 ld [ %i5 + 0x330 ], %g1 2004ed0: 13 00 80 81 sethi %hi(0x2020400), %o1 2004ed4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ed8: 92 12 61 40 or %o1, 0x140, %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 63 30 ld [ %i5 + 0x330 ], %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 81 sethi %hi(0x2020400), %o1 2004ef8: 92 12 61 58 or %o1, 0x158, %o1 ! 2020558 2004efc: 40 00 35 22 call 2012384 2004f00: 31 00 80 81 sethi %hi(0x2020400), %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 63 30 ld [ %i5 + 0x330 ], %g1 2004f0c: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 2004f10: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004f14: 13 00 80 81 sethi %hi(0x2020400), %o1 2004f18: 40 00 35 1b call 2012384 2004f1c: 92 12 61 68 or %o1, 0x168, %o1 ! 2020568 (uint32_t)the_jnode->info.file.size ); #endif break; 2004f20: 10 80 00 10 b 2004f60 2004f24: 31 00 80 81 sethi %hi(0x2020400), %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 81 sethi %hi(0x2020400), %i0 2004f2c: c2 07 63 30 ld [ %i5 + 0x330 ], %g1 2004f30: 10 80 00 05 b 2004f44 2004f34: b0 16 21 78 or %i0, 0x178, %i0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004f38: c2 07 63 30 ld [ %i5 + 0x330 ], %g1 2004f3c: 31 00 80 81 sethi %hi(0x2020400), %i0 2004f40: b0 16 21 90 or %i0, 0x190, %i0 ! 2020590 2004f44: f2 00 60 08 ld [ %g1 + 8 ], %i1 2004f48: 40 00 35 60 call 20124c8 2004f4c: 81 e8 00 00 restore return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2004f50: 33 00 80 81 sethi %hi(0x2020400), %i1 <== NOT EXECUTED 2004f54: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED 2004f58: 40 00 35 0b call 2012384 <== NOT EXECUTED 2004f5c: 93 ee 61 a8 restore %i1, 0x1a8, %o1 <== NOT EXECUTED return; } puts(""); 2004f60: 40 00 3c 45 call 2014074 2004f64: 91 ee 20 f0 restore %i0, 0xf0, %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 33 8d call 200f418 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 33 call 2006ec8 <_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 23 call 2006e9c <_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 =============================================================================== 0200a414 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 200a414: 9d e3 bf a0 save %sp, -96, %sp while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a418: 10 80 00 07 b 200a434 200a41c: c2 06 80 00 ld [ %i2 ], %g1 ++(*index); 200a420: c2 26 80 00 st %g1, [ %i2 ] --(*len); 200a424: c2 06 40 00 ld [ %i1 ], %g1 200a428: 82 00 7f ff add %g1, -1, %g1 200a42c: 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 ) { 200a430: c2 06 80 00 ld [ %i2 ], %g1 200a434: 7f ff e6 29 call 2003cd8 200a438: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0 200a43c: 80 a2 20 00 cmp %o0, 0 200a440: 02 80 00 0b be 200a46c 200a444: 01 00 00 00 nop 200a448: c2 06 80 00 ld [ %i2 ], %g1 200a44c: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 200a450: 80 a0 a0 00 cmp %g2, 0 200a454: 02 80 00 06 be 200a46c 200a458: 01 00 00 00 nop 200a45c: c4 06 40 00 ld [ %i1 ], %g2 200a460: 80 a0 a0 00 cmp %g2, 0 200a464: 12 bf ff ef bne 200a420 <== ALWAYS TAKEN 200a468: 82 00 60 01 inc %g1 200a46c: 81 c7 e0 08 ret 200a470: 81 e8 00 00 restore =============================================================================== 0200b038 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200b038: 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; 200b03c: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200b040: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200b044: 84 00 bf fe add %g2, -2, %g2 200b048: 80 a0 a0 05 cmp %g2, 5 200b04c: 18 80 00 12 bgu 200b094 <== NEVER TAKEN 200b050: 85 28 a0 02 sll %g2, 2, %g2 200b054: 07 00 80 2c sethi %hi(0x200b000), %g3 200b058: 86 10 e0 20 or %g3, 0x20, %g3 ! 200b020 200b05c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200b060: 81 c0 80 00 jmp %g2 200b064: 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 ); 200b068: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200b06c: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 200b070: c4 26 60 1c st %g2, [ %i1 + 0x1c ] break; 200b074: 10 80 00 0e b 200b0ac 200b078: c6 26 60 18 st %g3, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200b07c: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200b080: 10 80 00 0b b 200b0ac 200b084: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200b088: c0 26 60 20 clr [ %i1 + 0x20 ] break; 200b08c: 10 80 00 08 b 200b0ac 200b090: c0 26 60 24 clr [ %i1 + 0x24 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200b094: 40 00 0b 18 call 200dcf4 <__errno> 200b098: b0 10 3f ff mov -1, %i0 200b09c: 82 10 20 86 mov 0x86, %g1 200b0a0: c2 22 00 00 st %g1, [ %o0 ] 200b0a4: 81 c7 e0 08 ret 200b0a8: 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; 200b0ac: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b0b0: 07 00 00 3f sethi %hi(0xfc00), %g3 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200b0b4: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b0b8: 86 10 e3 fe or %g3, 0x3fe, %g3 200b0bc: 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 = 200b0c0: 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; 200b0c4: 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 = 200b0c8: 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; 200b0cc: c4 26 60 0c st %g2, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; 200b0d0: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200b0d4: c4 36 60 10 sth %g2, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; 200b0d8: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 200b0dc: c4 26 60 08 st %g2, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; 200b0e0: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 200b0e4: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; 200b0e8: c4 10 60 3e lduh [ %g1 + 0x3e ], %g2 200b0ec: c4 36 60 14 sth %g2, [ %i1 + 0x14 ] buf->st_atime = the_jnode->stat_atime; 200b0f0: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 200b0f4: c4 26 60 28 st %g2, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200b0f8: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 buf->st_ctime = the_jnode->stat_ctime; 200b0fc: 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; 200b100: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200b104: c2 26 60 38 st %g1, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200b108: 03 00 80 6a sethi %hi(0x201a800), %g1 200b10c: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201a954 200b110: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200b114: 81 c7 e0 08 ret 200b118: 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 2d 80 call 200dcf4 <__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 2f d5 call 200e664 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 56 call 200a474 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 2d 50 call 200dcf4 <__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 2d 49 call 200dcf4 <__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 =============================================================================== 02001e84 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2001e84: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 2001e88: 80 a6 3f ff cmp %i0, -1 2001e8c: 32 80 00 0a bne,a 2001eb4 2001e90: e0 06 21 40 ld [ %i0 + 0x140 ], %l0 if (!Stack_check_Interrupt_stack.area) 2001e94: 33 00 80 53 sethi %hi(0x2014c00), %i1 2001e98: b2 16 60 fc or %i1, 0xfc, %i1 ! 2014cfc 2001e9c: c2 06 60 04 ld [ %i1 + 4 ], %g1 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 2001ea0: 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) 2001ea4: 80 a0 60 00 cmp %g1, 0 2001ea8: 12 80 00 04 bne 2001eb8 <== ALWAYS TAKEN 2001eac: b0 10 20 00 clr %i0 2001eb0: 30 80 00 4f b,a 2001fec <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 2001eb4: b2 06 20 b4 add %i0, 0xb4, %i1 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2001eb8: c4 06 60 04 ld [ %i1 + 4 ], %g2 size = Stack_check_usable_stack_size(stack); 2001ebc: f4 06 40 00 ld [ %i1 ], %i2 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2001ec0: 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); 2001ec4: 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) 2001ec8: 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++) 2001ecc: 88 0e bf fc and %i2, -4, %g4 if (*base != U32_PATTERN) 2001ed0: 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++) 2001ed4: 10 80 00 06 b 2001eec 2001ed8: 88 00 40 04 add %g1, %g4, %g4 if (*base != U32_PATTERN) 2001edc: 80 a7 40 03 cmp %i5, %g3 2001ee0: 12 80 00 08 bne 2001f00 2001ee4: 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++) 2001ee8: 82 00 60 04 add %g1, 4, %g1 2001eec: 80 a0 40 04 cmp %g1, %g4 2001ef0: 2a bf ff fb bcs,a 2001edc <== ALWAYS TAKEN 2001ef4: 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; 2001ef8: 10 80 00 07 b 2001f14 <== NOT EXECUTED 2001efc: 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 ) 2001f00: 02 80 00 05 be 2001f14 <== NEVER TAKEN 2001f04: 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); 2001f08: 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 ); 2001f0c: ba 07 40 1a add %i5, %i2, %i5 2001f10: ba 27 40 01 sub %i5, %g1, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2001f14: 80 a6 20 00 cmp %i0, 0 2001f18: 02 80 00 12 be 2001f60 2001f1c: 03 00 80 52 sethi %hi(0x2014800), %g1 #endif { (*print_handler)( 2001f20: f6 06 20 08 ld [ %i0 + 8 ], %i3 2001f24: f8 00 62 60 ld [ %g1 + 0x260 ], %i4 2001f28: 03 00 80 52 sethi %hi(0x2014800), %g1 2001f2c: e2 00 62 64 ld [ %g1 + 0x264 ], %l1 ! 2014a64 2001f30: 94 07 bf f8 add %fp, -8, %o2 2001f34: 90 10 00 1b mov %i3, %o0 2001f38: 40 00 10 04 call 2005f48 2001f3c: 92 10 20 05 mov 5, %o1 2001f40: 13 00 80 4d sethi %hi(0x2013400), %o1 2001f44: 96 10 00 08 mov %o0, %o3 2001f48: 92 12 62 10 or %o1, 0x210, %o1 2001f4c: 90 10 00 11 mov %l1, %o0 2001f50: 9f c7 00 00 call %i4 2001f54: 94 10 00 1b mov %i3, %o2 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2001f58: 10 80 00 0a b 2001f80 2001f5c: 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 ); 2001f60: 05 00 80 52 sethi %hi(0x2014800), %g2 2001f64: c2 00 62 60 ld [ %g1 + 0x260 ], %g1 2001f68: d0 00 a2 64 ld [ %g2 + 0x264 ], %o0 2001f6c: 13 00 80 4d sethi %hi(0x2013400), %o1 2001f70: 94 10 3f ff mov -1, %o2 2001f74: 9f c0 40 00 call %g1 2001f78: 92 12 62 20 or %o1, 0x220, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2001f7c: d4 06 60 04 ld [ %i1 + 4 ], %o2 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2001f80: 37 00 80 52 sethi %hi(0x2014800), %i3 2001f84: 39 00 80 52 sethi %hi(0x2014800), %i4 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2001f88: d6 06 40 00 ld [ %i1 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2001f8c: c2 06 e2 60 ld [ %i3 + 0x260 ], %g1 2001f90: d0 07 22 64 ld [ %i4 + 0x264 ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2001f94: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2001f98: 13 00 80 4d sethi %hi(0x2013400), %o1 2001f9c: 96 02 80 0b add %o2, %o3, %o3 2001fa0: 92 12 62 30 or %o1, 0x230, %o1 2001fa4: 98 10 00 10 mov %l0, %o4 2001fa8: 9f c0 40 00 call %g1 2001fac: 9a 10 00 1a mov %i2, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2001fb0: 03 00 80 52 sethi %hi(0x2014800), %g1 2001fb4: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 2014a5c (*print_handler)( print_context, "Unavailable\n" ); 2001fb8: d0 07 22 64 ld [ %i4 + 0x264 ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2001fbc: 80 a0 60 00 cmp %g1, 0 2001fc0: 12 80 00 07 bne 2001fdc <== ALWAYS TAKEN 2001fc4: c2 06 e2 60 ld [ %i3 + 0x260 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 2001fc8: 13 00 80 4d sethi %hi(0x2013400), %o1 <== NOT EXECUTED 2001fcc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001fd0: 92 12 62 50 or %o1, 0x250, %o1 ! 2013650 <== NOT EXECUTED 2001fd4: 81 c7 e0 08 ret <== NOT EXECUTED 2001fd8: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2001fdc: 13 00 80 4d sethi %hi(0x2013400), %o1 2001fe0: 94 10 00 1d mov %i5, %o2 2001fe4: 9f c0 40 00 call %g1 2001fe8: 92 12 62 60 or %o1, 0x260, %o1 2001fec: 81 c7 e0 08 ret 2001ff0: 81 e8 00 00 restore =============================================================================== 02001ff4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 2001ff4: 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 ) 2001ff8: 03 00 80 52 sethi %hi(0x2014800), %g1 2001ffc: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 2014a5c 2002000: 80 a0 60 00 cmp %g1, 0 2002004: 12 80 00 21 bne 2002088 2002008: 05 00 80 53 sethi %hi(0x2014c00), %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 ]; 200200c: 07 3f bb 7c sethi %hi(0xfeedf000), %g3 2002010: 82 10 a0 ec or %g2, 0xec, %g1 2002014: 86 10 e0 0d or %g3, 0xd, %g3 2002018: c6 20 a0 ec st %g3, [ %g2 + 0xec ] 200201c: 05 02 eb 43 sethi %hi(0xbad0c00), %g2 2002020: 84 10 a1 06 or %g2, 0x106, %g2 ! bad0d06 2002024: c4 20 60 04 st %g2, [ %g1 + 4 ] 2002028: 05 37 ab 7c sethi %hi(0xdeadf000), %g2 200202c: 84 10 a0 0d or %g2, 0xd, %g2 ! deadf00d 2002030: c4 20 60 08 st %g2, [ %g1 + 8 ] 2002034: 05 18 03 43 sethi %hi(0x600d0c00), %g2 2002038: 84 10 a1 06 or %g2, 0x106, %g2 ! 600d0d06 200203c: 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) { 2002040: 03 00 80 54 sethi %hi(0x2015000), %g1 2002044: d0 00 61 00 ld [ %g1 + 0x100 ], %o0 ! 2015100 <_Per_CPU_Information> 2002048: 80 a2 20 00 cmp %o0, 0 200204c: 02 80 00 0c be 200207c <== NEVER TAKEN 2002050: 84 10 61 00 or %g1, 0x100, %g2 2002054: d4 00 a0 04 ld [ %g2 + 4 ], %o2 2002058: 80 a2 a0 00 cmp %o2, 0 200205c: 02 80 00 08 be 200207c <== NEVER TAKEN 2002060: 03 00 80 53 sethi %hi(0x2014c00), %g1 Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 2002064: 84 10 60 fc or %g1, 0xfc, %g2 ! 2014cfc Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 2002068: 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; 200206c: d0 20 a0 04 st %o0, [ %g2 + 4 ] Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 2002070: d4 20 60 fc st %o2, [ %g1 + 0xfc ] (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 2002074: 40 00 30 b7 call 200e350 2002078: 92 10 20 a5 mov 0xa5, %o1 } #endif Stack_check_Initialized = 1; 200207c: 84 10 20 01 mov 1, %g2 2002080: 03 00 80 52 sethi %hi(0x2014800), %g1 2002084: c4 20 62 5c st %g2, [ %g1 + 0x25c ] ! 2014a5c 2002088: 81 c7 e0 08 ret 200208c: 81 e8 00 00 restore =============================================================================== 020020f0 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 20020f0: 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"); 20020f4: 11 00 80 4d sethi %hi(0x2013400), %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); 20020f8: fa 06 20 b8 ld [ %i0 + 0xb8 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 20020fc: 40 00 06 2d call 20039b0 2002100: 90 12 22 68 or %o0, 0x268, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2002104: 92 10 00 18 mov %i0, %o1 2002108: 11 00 80 4d sethi %hi(0x2013400), %o0 200210c: 40 00 06 29 call 20039b0 2002110: 90 12 22 78 or %o0, 0x278, %o0 ! 2013678 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2002114: d2 06 20 08 ld [ %i0 + 8 ], %o1 2002118: 11 00 80 4d sethi %hi(0x2013400), %o0 200211c: 40 00 06 25 call 20039b0 2002120: 90 12 22 98 or %o0, 0x298, %o0 ! 2013698 printk( 2002124: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2002128: 11 00 80 4d sethi %hi(0x2013400), %o0 200212c: 40 00 06 21 call 20039b0 2002130: 90 12 22 b0 or %o0, 0x2b0, %o0 ! 20136b0 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2002134: d0 06 20 08 ld [ %i0 + 8 ], %o0 2002138: 94 07 bf e0 add %fp, -32, %o2 200213c: 40 00 0f 83 call 2005f48 2002140: 92 10 20 20 mov 0x20, %o1 2002144: 92 10 00 08 mov %o0, %o1 2002148: 11 00 80 4d sethi %hi(0x2013400), %o0 200214c: 40 00 06 19 call 20039b0 2002150: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 20136c8 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2002154: d4 06 20 b8 ld [ %i0 + 0xb8 ], %o2 2002158: d2 06 20 b4 ld [ %i0 + 0xb4 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 200215c: 11 00 80 4d sethi %hi(0x2013400), %o0 2002160: 96 02 80 09 add %o2, %o1, %o3 2002164: 40 00 06 13 call 20039b0 2002168: 90 12 22 e0 or %o0, 0x2e0, %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) { 200216c: 80 a6 60 00 cmp %i1, 0 2002170: 12 80 00 07 bne 200218c <== NEVER TAKEN 2002174: 11 00 80 4d sethi %hi(0x2013400), %o0 printk( 2002178: 92 10 20 10 mov 0x10, %o1 200217c: 90 12 23 18 or %o0, 0x318, %o0 2002180: 94 07 60 08 add %i5, 8, %o2 2002184: 40 00 06 0b call 20039b0 2002188: 96 07 60 18 add %i5, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 200218c: 40 00 11 a4 call 200681c 2002190: 90 10 20 81 mov 0x81, %o0 =============================================================================== 0200fbf4 <_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 ) { 200fbf4: 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; 200fbf8: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 200fbfc: c0 26 20 48 clr [ %i0 + 0x48 ] the_message_queue->maximum_message_size = maximum_message_size; 200fc00: f6 26 20 4c st %i3, [ %i0 + 0x4c ] /* * 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)) { 200fc04: 80 8e e0 03 btst 3, %i3 200fc08: 02 80 00 07 be 200fc24 <_CORE_message_queue_Initialize+0x30> 200fc0c: ba 10 00 1b mov %i3, %i5 allocated_message_size += sizeof(uint32_t); 200fc10: ba 06 e0 04 add %i3, 4, %i5 allocated_message_size &= ~(sizeof(uint32_t) - 1); 200fc14: ba 0f 7f fc and %i5, -4, %i5 } if (allocated_message_size < maximum_message_size) 200fc18: 80 a7 40 1b cmp %i5, %i3 200fc1c: 0a 80 00 24 bcs 200fcac <_CORE_message_queue_Initialize+0xb8><== NEVER TAKEN 200fc20: 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( 200fc24: ba 07 60 10 add %i5, 0x10, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 200fc28: 90 10 20 00 clr %o0 200fc2c: 92 10 00 1a mov %i2, %o1 200fc30: 94 10 20 00 clr %o2 200fc34: 96 10 00 1d mov %i5, %o3 200fc38: 40 00 3e fc call 201f828 <__muldi3> 200fc3c: b8 10 20 00 clr %i4 if ( x > SIZE_MAX ) 200fc40: 80 a2 20 00 cmp %o0, 0 200fc44: 34 80 00 1b bg,a 200fcb0 <_CORE_message_queue_Initialize+0xbc> 200fc48: 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 ); 200fc4c: 40 00 0c 15 call 2012ca0 <_Workspace_Allocate> 200fc50: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 200fc54: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 200fc58: 80 a2 20 00 cmp %o0, 0 200fc5c: 02 80 00 14 be 200fcac <_CORE_message_queue_Initialize+0xb8><== NEVER TAKEN 200fc60: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 200fc64: 90 06 20 60 add %i0, 0x60, %o0 200fc68: 94 10 00 1a mov %i2, %o2 200fc6c: 40 00 13 f9 call 2014c50 <_Chain_Initialize> 200fc70: 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 ); 200fc74: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 200fc78: 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( 200fc7c: 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 ); 200fc80: 84 06 20 54 add %i0, 0x54, %g2 200fc84: 82 18 60 01 xor %g1, 1, %g1 200fc88: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 200fc8c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 200fc90: c0 26 20 54 clr [ %i0 + 0x54 ] 200fc94: 90 10 00 18 mov %i0, %o0 200fc98: 92 60 3f ff subx %g0, -1, %o1 200fc9c: 94 10 20 80 mov 0x80, %o2 200fca0: 96 10 20 06 mov 6, %o3 200fca4: 40 00 09 ab call 2012350 <_Thread_queue_Initialize> 200fca8: b8 10 20 01 mov 1, %i4 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 200fcac: b0 0f 20 01 and %i4, 1, %i0 200fcb0: 81 c7 e0 08 ret 200fcb4: 81 e8 00 00 restore =============================================================================== 020072a8 <_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 ) { 20072a8: 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)) ) { 20072ac: 90 10 00 18 mov %i0, %o0 20072b0: 40 00 07 47 call 2008fcc <_Thread_queue_Dequeue> 20072b4: ba 10 00 18 mov %i0, %i5 20072b8: 80 a2 20 00 cmp %o0, 0 20072bc: 12 80 00 0e bne 20072f4 <_CORE_semaphore_Surrender+0x4c> 20072c0: 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 ); 20072c4: 7f ff eb ae call 200217c 20072c8: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20072cc: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 20072d0: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 20072d4: 80 a0 40 02 cmp %g1, %g2 20072d8: 1a 80 00 05 bcc 20072ec <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 20072dc: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20072e0: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 20072e4: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20072e8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20072ec: 7f ff eb a8 call 200218c 20072f0: 01 00 00 00 nop } return status; } 20072f4: 81 c7 e0 08 ret 20072f8: 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 6d sethi %hi(0x201b400), %g4 2006058: 88 11 23 50 or %g4, 0x350, %g4 ! 201b750 <_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 6d sethi %hi(0x201b400), %g4 2006080: f2 01 23 b0 ld [ %g4 + 0x3b0 ], %i1 ! 201b7b0 <_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 b0 ld [ %g4 + 0x3b0 ], %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 6d sethi %hi(0x201b400), %g1 20060d0: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] ! 201b7b0 <_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 8f call 2009b80 <_Watchdog_Remove> 2006148: 90 07 60 48 add %i5, 0x48, %o0 200614c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006150: 40 00 09 ed call 2008904 <_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 d5 call 2008cbc <_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 6d sethi %hi(0x201b400), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 200618c: c2 00 63 5c ld [ %g1 + 0x35c ], %g1 ! 201b75c <_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 6d sethi %hi(0x201b400), %g1 20061a0: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201b7b0 <_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 b0 st %g2, [ %g1 + 0x3b0 ] } 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 cd call 2008904 <_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 6d sethi %hi(0x201b400), %g1 20061dc: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201b520 <_Thread_Dispatch_disable_level> 20061e0: 84 00 bf ff add %g2, -1, %g2 20061e4: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 20061e8: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 20061ec: 81 c7 e0 08 ret 20061f0: 81 e8 00 00 restore =============================================================================== 0200bccc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200bccc: 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; 200bcd0: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200bcd4: 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; 200bcd8: 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; 200bcdc: 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; 200bce0: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200bce4: 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; 200bce8: 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 ) { 200bcec: 80 a7 40 19 cmp %i5, %i1 200bcf0: 0a 80 00 9f bcs 200bf6c <_Heap_Extend+0x2a0> 200bcf4: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200bcf8: 90 10 00 19 mov %i1, %o0 200bcfc: 92 10 00 1a mov %i2, %o1 200bd00: 94 10 00 11 mov %l1, %o2 200bd04: 98 07 bf f8 add %fp, -8, %o4 200bd08: 7f ff ed 3b call 20071f4 <_Heap_Get_first_and_last_block> 200bd0c: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200bd10: 80 8a 20 ff btst 0xff, %o0 200bd14: 02 80 00 96 be 200bf6c <_Heap_Extend+0x2a0> 200bd18: b4 10 00 10 mov %l0, %i2 200bd1c: aa 10 20 00 clr %l5 200bd20: ac 10 20 00 clr %l6 200bd24: b8 10 20 00 clr %i4 200bd28: a8 10 20 00 clr %l4 200bd2c: 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 ( 200bd30: 80 a0 40 1d cmp %g1, %i5 200bd34: 1a 80 00 05 bcc 200bd48 <_Heap_Extend+0x7c> 200bd38: e6 06 80 00 ld [ %i2 ], %l3 200bd3c: 80 a6 40 13 cmp %i1, %l3 200bd40: 2a 80 00 8b bcs,a 200bf6c <_Heap_Extend+0x2a0> 200bd44: 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 ) { 200bd48: 80 a7 40 01 cmp %i5, %g1 200bd4c: 02 80 00 06 be 200bd64 <_Heap_Extend+0x98> 200bd50: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200bd54: 2a 80 00 05 bcs,a 200bd68 <_Heap_Extend+0x9c> 200bd58: ac 10 00 1a mov %i2, %l6 200bd5c: 10 80 00 04 b 200bd6c <_Heap_Extend+0xa0> 200bd60: 90 10 00 13 mov %l3, %o0 200bd64: a8 10 00 1a mov %i2, %l4 200bd68: 90 10 00 13 mov %l3, %o0 200bd6c: 40 00 15 fd call 2011560 <.urem> 200bd70: 92 10 00 11 mov %l1, %o1 200bd74: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200bd78: 80 a4 c0 19 cmp %l3, %i1 200bd7c: 12 80 00 05 bne 200bd90 <_Heap_Extend+0xc4> 200bd80: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200bd84: 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 ) 200bd88: 10 80 00 04 b 200bd98 <_Heap_Extend+0xcc> 200bd8c: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200bd90: 2a 80 00 02 bcs,a 200bd98 <_Heap_Extend+0xcc> 200bd94: 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; 200bd98: f4 02 20 04 ld [ %o0 + 4 ], %i2 200bd9c: 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); 200bda0: 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 ); 200bda4: 80 a6 80 10 cmp %i2, %l0 200bda8: 12 bf ff e2 bne 200bd30 <_Heap_Extend+0x64> 200bdac: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200bdb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bdb4: 80 a6 40 01 cmp %i1, %g1 200bdb8: 3a 80 00 04 bcc,a 200bdc8 <_Heap_Extend+0xfc> 200bdbc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200bdc0: 10 80 00 05 b 200bdd4 <_Heap_Extend+0x108> 200bdc4: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200bdc8: 80 a0 40 1d cmp %g1, %i5 200bdcc: 2a 80 00 02 bcs,a 200bdd4 <_Heap_Extend+0x108> 200bdd0: 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; 200bdd4: c4 07 bf f8 ld [ %fp + -8 ], %g2 200bdd8: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200bddc: 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 = 200bde0: 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; 200bde4: 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; 200bde8: 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 = 200bdec: 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 ) { 200bdf0: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200bdf4: 80 a0 c0 02 cmp %g3, %g2 200bdf8: 08 80 00 04 bleu 200be08 <_Heap_Extend+0x13c> 200bdfc: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200be00: 10 80 00 06 b 200be18 <_Heap_Extend+0x14c> 200be04: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200be08: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200be0c: 80 a0 80 01 cmp %g2, %g1 200be10: 2a 80 00 02 bcs,a 200be18 <_Heap_Extend+0x14c> 200be14: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200be18: 80 a5 20 00 cmp %l4, 0 200be1c: 02 80 00 14 be 200be6c <_Heap_Extend+0x1a0> 200be20: 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; 200be24: 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; 200be28: 92 10 00 1a mov %i2, %o1 200be2c: 40 00 15 cd call 2011560 <.urem> 200be30: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200be34: 80 a2 20 00 cmp %o0, 0 200be38: 02 80 00 04 be 200be48 <_Heap_Extend+0x17c> 200be3c: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200be40: b2 06 40 1a add %i1, %i2, %i1 200be44: 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 = 200be48: 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; 200be4c: 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 = 200be50: 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; 200be54: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200be58: 90 10 00 18 mov %i0, %o0 200be5c: 7f ff ff 92 call 200bca4 <_Heap_Free_block> 200be60: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200be64: 10 80 00 08 b 200be84 <_Heap_Extend+0x1b8> 200be68: 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 ) { 200be6c: 80 a5 a0 00 cmp %l6, 0 200be70: 02 80 00 04 be 200be80 <_Heap_Extend+0x1b4> 200be74: 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; 200be78: 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 = 200be7c: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200be80: 80 a7 20 00 cmp %i4, 0 200be84: 02 80 00 15 be 200bed8 <_Heap_Extend+0x20c> 200be88: 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); 200be8c: 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( 200be90: ba 27 40 1c sub %i5, %i4, %i5 200be94: 40 00 15 b3 call 2011560 <.urem> 200be98: 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) 200be9c: c4 07 20 04 ld [ %i4 + 4 ], %g2 200bea0: 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 = 200bea4: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200bea8: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200beac: 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 = 200beb0: 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; 200beb4: 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 ); 200beb8: 90 10 00 18 mov %i0, %o0 200bebc: 82 08 60 01 and %g1, 1, %g1 200bec0: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200bec4: ba 17 40 01 or %i5, %g1, %i5 200bec8: 7f ff ff 77 call 200bca4 <_Heap_Free_block> 200becc: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200bed0: 10 80 00 0f b 200bf0c <_Heap_Extend+0x240> 200bed4: 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 ) { 200bed8: 80 a5 60 00 cmp %l5, 0 200bedc: 02 80 00 0b be 200bf08 <_Heap_Extend+0x23c> 200bee0: 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; 200bee4: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200bee8: c2 07 bf fc ld [ %fp + -4 ], %g1 200beec: 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 ); 200bef0: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200bef4: 84 10 c0 02 or %g3, %g2, %g2 200bef8: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200befc: c4 00 60 04 ld [ %g1 + 4 ], %g2 200bf00: 84 10 a0 01 or %g2, 1, %g2 200bf04: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200bf08: 80 a7 20 00 cmp %i4, 0 200bf0c: 32 80 00 09 bne,a 200bf30 <_Heap_Extend+0x264> 200bf10: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200bf14: 80 a5 20 00 cmp %l4, 0 200bf18: 32 80 00 06 bne,a 200bf30 <_Heap_Extend+0x264> 200bf1c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200bf20: d2 07 bf f8 ld [ %fp + -8 ], %o1 200bf24: 7f ff ff 60 call 200bca4 <_Heap_Free_block> 200bf28: 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 200bf2c: 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( 200bf30: 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; 200bf34: 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( 200bf38: 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; 200bf3c: 86 08 e0 01 and %g3, 1, %g3 block->size_and_flag = size | flag; 200bf40: 84 10 c0 02 or %g3, %g2, %g2 200bf44: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200bf48: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200bf4c: 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; 200bf50: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200bf54: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200bf58: 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; 200bf5c: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200bf60: 02 80 00 03 be 200bf6c <_Heap_Extend+0x2a0> <== NEVER TAKEN 200bf64: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200bf68: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200bf6c: b0 0f 20 01 and %i4, 1, %i0 200bf70: 81 c7 e0 08 ret 200bf74: 81 e8 00 00 restore =============================================================================== 0200c0dc <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c0dc: 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; 200c0e0: 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 ) { 200c0e4: 80 a6 60 00 cmp %i1, 0 200c0e8: 02 80 00 77 be 200c2c4 <_Heap_Free+0x1e8> 200c0ec: 90 10 00 19 mov %i1, %o0 200c0f0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c0f4: 40 00 2b 26 call 2016d8c <.urem> 200c0f8: 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 200c0fc: 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); 200c100: 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; 200c104: 80 a7 40 0d cmp %i5, %o5 200c108: 0a 80 00 05 bcs 200c11c <_Heap_Free+0x40> 200c10c: 82 10 20 00 clr %g1 200c110: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c114: 80 a0 40 1d cmp %g1, %i5 200c118: 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 ) ) { 200c11c: 80 a0 60 00 cmp %g1, 0 200c120: 02 80 00 69 be 200c2c4 <_Heap_Free+0x1e8> 200c124: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c128: 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; 200c12c: 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); 200c130: 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; 200c134: 80 a0 40 0d cmp %g1, %o5 200c138: 0a 80 00 05 bcs 200c14c <_Heap_Free+0x70> <== NEVER TAKEN 200c13c: 86 10 20 00 clr %g3 200c140: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c144: 80 a0 c0 01 cmp %g3, %g1 200c148: 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 ) ) { 200c14c: 80 a0 e0 00 cmp %g3, 0 200c150: 02 80 00 5d be 200c2c4 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c154: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c158: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200c15c: 80 8b e0 01 btst 1, %o7 200c160: 02 80 00 59 be 200c2c4 <_Heap_Free+0x1e8> 200c164: 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 200c168: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200c16c: 80 a0 40 04 cmp %g1, %g4 200c170: 02 80 00 07 be 200c18c <_Heap_Free+0xb0> 200c174: 98 10 20 00 clr %o4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c178: 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; 200c17c: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200c180: 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 )); 200c184: 80 a0 00 03 cmp %g0, %g3 200c188: 98 60 3f ff subx %g0, -1, %o4 if ( !_Heap_Is_prev_used( block ) ) { 200c18c: 80 8a e0 01 btst 1, %o3 200c190: 12 80 00 25 bne 200c224 <_Heap_Free+0x148> 200c194: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200c198: 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); 200c19c: 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; 200c1a0: 80 a0 c0 0d cmp %g3, %o5 200c1a4: 0a 80 00 04 bcs 200c1b4 <_Heap_Free+0xd8> <== NEVER TAKEN 200c1a8: 94 10 20 00 clr %o2 200c1ac: 80 a1 00 03 cmp %g4, %g3 200c1b0: 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 ) ) { 200c1b4: 80 a2 a0 00 cmp %o2, 0 200c1b8: 02 80 00 43 be 200c2c4 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c1bc: 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; 200c1c0: 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) ) { 200c1c4: 80 8b 60 01 btst 1, %o5 200c1c8: 02 80 00 3f be 200c2c4 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c1cc: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200c1d0: 02 80 00 0e be 200c208 <_Heap_Free+0x12c> 200c1d4: 88 00 80 0b add %g2, %o3, %g4 uintptr_t const size = block_size + prev_size + next_block_size; 200c1d8: 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; 200c1dc: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200c1e0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 prev->next = next; 200c1e4: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200c1e8: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200c1ec: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 200c1f0: 82 00 7f ff add %g1, -1, %g1 200c1f4: 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; 200c1f8: 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; 200c1fc: 82 13 e0 01 or %o7, 1, %g1 200c200: 10 80 00 27 b 200c29c <_Heap_Free+0x1c0> 200c204: 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; 200c208: 9e 11 20 01 or %g4, 1, %o7 200c20c: de 20 e0 04 st %o7, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c210: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200c214: 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; 200c218: 86 08 ff fe and %g3, -2, %g3 200c21c: 10 80 00 20 b 200c29c <_Heap_Free+0x1c0> 200c220: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200c224: 22 80 00 0d be,a 200c258 <_Heap_Free+0x17c> 200c228: 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; 200c22c: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200c230: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200c234: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200c238: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200c23c: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200c240: 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; 200c244: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c248: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200c24c: 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; 200c250: 10 80 00 13 b 200c29c <_Heap_Free+0x1c0> 200c254: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200c258: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200c25c: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200c260: 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; 200c264: 86 10 a0 01 or %g2, 1, %g3 200c268: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c26c: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200c270: 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; 200c274: 86 08 ff fe and %g3, -2, %g3 200c278: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c27c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200c280: 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; 200c284: 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; 200c288: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200c28c: 80 a0 c0 01 cmp %g3, %g1 200c290: 1a 80 00 03 bcc 200c29c <_Heap_Free+0x1c0> 200c294: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200c298: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200c29c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200c2a0: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c2a4: 82 00 7f ff add %g1, -1, %g1 200c2a8: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200c2ac: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c2b0: 82 00 60 01 inc %g1 200c2b4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200c2b8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200c2bc: 84 00 40 02 add %g1, %g2, %g2 200c2c0: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200c2c4: b0 09 20 01 and %g4, 1, %i0 200c2c8: 81 c7 e0 08 ret 200c2cc: 81 e8 00 00 restore =============================================================================== 0201885c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 201885c: 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); 2018860: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2018864: 7f ff f9 4a call 2016d8c <.urem> 2018868: 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 201886c: 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); 2018870: 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); 2018874: 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; 2018878: 80 a2 00 03 cmp %o0, %g3 201887c: 0a 80 00 05 bcs 2018890 <_Heap_Size_of_alloc_area+0x34> 2018880: 84 10 20 00 clr %g2 2018884: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018888: 80 a0 40 08 cmp %g1, %o0 201888c: 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 ) ) { 2018890: 80 a0 a0 00 cmp %g2, 0 2018894: 02 80 00 15 be 20188e8 <_Heap_Size_of_alloc_area+0x8c> 2018898: 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; 201889c: fa 02 20 04 ld [ %o0 + 4 ], %i5 20188a0: 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); 20188a4: 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; 20188a8: 80 a7 40 03 cmp %i5, %g3 20188ac: 0a 80 00 05 bcs 20188c0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 20188b0: 84 10 20 00 clr %g2 20188b4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20188b8: 80 a0 40 1d cmp %g1, %i5 20188bc: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 20188c0: 80 a0 a0 00 cmp %g2, 0 20188c4: 02 80 00 09 be 20188e8 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 20188c8: 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; 20188cc: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 20188d0: 80 88 a0 01 btst 1, %g2 20188d4: 02 80 00 05 be 20188e8 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 20188d8: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 20188dc: 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; 20188e0: ba 07 60 04 add %i5, 4, %i5 20188e4: fa 26 80 00 st %i5, [ %i2 ] return true; } 20188e8: b0 08 60 01 and %g1, 1, %i0 20188ec: 81 c7 e0 08 ret 20188f0: 81 e8 00 00 restore =============================================================================== 020080f0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 20080f0: 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; 20080f4: 3b 00 80 20 sethi %hi(0x2008000), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 20080f8: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 20080fc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 2008100: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 2008104: 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; 2008108: 80 a6 a0 00 cmp %i2, 0 200810c: 02 80 00 04 be 200811c <_Heap_Walk+0x2c> 2008110: ba 17 60 9c or %i5, 0x9c, %i5 2008114: 3b 00 80 20 sethi %hi(0x2008000), %i5 2008118: ba 17 60 a4 or %i5, 0xa4, %i5 ! 20080a4 <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 200811c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008120: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 ! 2017444 <_System_state_Current> 2008124: 80 a0 a0 03 cmp %g2, 3 2008128: 12 80 01 24 bne 20085b8 <_Heap_Walk+0x4c8> 200812c: 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)( 2008130: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 2008134: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2008138: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200813c: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 2008140: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 2008144: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008148: 90 10 00 19 mov %i1, %o0 200814c: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 2008150: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008154: 92 10 20 00 clr %o1 2008158: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 200815c: 15 00 80 52 sethi %hi(0x2014800), %o2 2008160: 96 10 00 1c mov %i4, %o3 2008164: 94 12 a1 f8 or %o2, 0x1f8, %o2 2008168: 9f c7 40 00 call %i5 200816c: 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 ) { 2008170: 80 a7 20 00 cmp %i4, 0 2008174: 12 80 00 07 bne 2008190 <_Heap_Walk+0xa0> 2008178: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 200817c: 15 00 80 52 sethi %hi(0x2014800), %o2 2008180: 90 10 00 19 mov %i1, %o0 2008184: 92 10 20 01 mov 1, %o1 2008188: 10 80 00 32 b 2008250 <_Heap_Walk+0x160> 200818c: 94 12 a2 90 or %o2, 0x290, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2008190: 22 80 00 08 be,a 20081b0 <_Heap_Walk+0xc0> 2008194: 90 10 00 10 mov %l0, %o0 (*printer)( 2008198: 15 00 80 52 sethi %hi(0x2014800), %o2 200819c: 90 10 00 19 mov %i1, %o0 20081a0: 92 10 20 01 mov 1, %o1 20081a4: 94 12 a2 a8 or %o2, 0x2a8, %o2 20081a8: 10 80 01 0b b 20085d4 <_Heap_Walk+0x4e4> 20081ac: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20081b0: 7f ff e6 4c call 2001ae0 <.urem> 20081b4: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20081b8: 80 a2 20 00 cmp %o0, 0 20081bc: 22 80 00 08 be,a 20081dc <_Heap_Walk+0xec> 20081c0: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 20081c4: 15 00 80 52 sethi %hi(0x2014800), %o2 20081c8: 90 10 00 19 mov %i1, %o0 20081cc: 92 10 20 01 mov 1, %o1 20081d0: 94 12 a2 c8 or %o2, 0x2c8, %o2 20081d4: 10 80 01 00 b 20085d4 <_Heap_Walk+0x4e4> 20081d8: 96 10 00 10 mov %l0, %o3 20081dc: 7f ff e6 41 call 2001ae0 <.urem> 20081e0: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 20081e4: 80 a2 20 00 cmp %o0, 0 20081e8: 22 80 00 08 be,a 2008208 <_Heap_Walk+0x118> 20081ec: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20081f0: 15 00 80 52 sethi %hi(0x2014800), %o2 20081f4: 90 10 00 19 mov %i1, %o0 20081f8: 92 10 20 01 mov 1, %o1 20081fc: 94 12 a2 f0 or %o2, 0x2f0, %o2 2008200: 10 80 00 f5 b 20085d4 <_Heap_Walk+0x4e4> 2008204: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2008208: 80 88 60 01 btst 1, %g1 200820c: 32 80 00 07 bne,a 2008228 <_Heap_Walk+0x138> 2008210: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 2008214: 15 00 80 52 sethi %hi(0x2014800), %o2 2008218: 90 10 00 19 mov %i1, %o0 200821c: 92 10 20 01 mov 1, %o1 2008220: 10 80 00 0c b 2008250 <_Heap_Walk+0x160> 2008224: 94 12 a3 28 or %o2, 0x328, %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; 2008228: 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); 200822c: 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; 2008230: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2008234: 80 88 60 01 btst 1, %g1 2008238: 12 80 00 0a bne 2008260 <_Heap_Walk+0x170> 200823c: 80 a6 80 1b cmp %i2, %i3 (*printer)( 2008240: 15 00 80 52 sethi %hi(0x2014800), %o2 2008244: 90 10 00 19 mov %i1, %o0 2008248: 92 10 20 01 mov 1, %o1 200824c: 94 12 a3 58 or %o2, 0x358, %o2 2008250: 9f c7 40 00 call %i5 2008254: 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; 2008258: 10 80 00 d8 b 20085b8 <_Heap_Walk+0x4c8> 200825c: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 2008260: 02 80 00 06 be 2008278 <_Heap_Walk+0x188> 2008264: 15 00 80 52 sethi %hi(0x2014800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2008268: 90 10 00 19 mov %i1, %o0 200826c: 92 10 20 01 mov 1, %o1 2008270: 10 bf ff f8 b 2008250 <_Heap_Walk+0x160> 2008274: 94 12 a3 70 or %o2, 0x370, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2008278: 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; 200827c: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2008280: 10 80 00 33 b 200834c <_Heap_Walk+0x25c> 2008284: 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; 2008288: 80 a0 80 0b cmp %g2, %o3 200828c: 18 80 00 05 bgu 20082a0 <_Heap_Walk+0x1b0> 2008290: 82 10 20 00 clr %g1 2008294: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008298: 80 a0 40 0b cmp %g1, %o3 200829c: 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 ) ) { 20082a0: 80 a0 60 00 cmp %g1, 0 20082a4: 32 80 00 07 bne,a 20082c0 <_Heap_Walk+0x1d0> 20082a8: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 20082ac: 15 00 80 52 sethi %hi(0x2014800), %o2 20082b0: 90 10 00 19 mov %i1, %o0 20082b4: 92 10 20 01 mov 1, %o1 20082b8: 10 80 00 c7 b 20085d4 <_Heap_Walk+0x4e4> 20082bc: 94 12 a3 a0 or %o2, 0x3a0, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20082c0: d6 27 bf f8 st %o3, [ %fp + -8 ] 20082c4: 7f ff e6 07 call 2001ae0 <.urem> 20082c8: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 20082cc: 80 a2 20 00 cmp %o0, 0 20082d0: 02 80 00 07 be 20082ec <_Heap_Walk+0x1fc> 20082d4: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20082d8: 15 00 80 52 sethi %hi(0x2014800), %o2 20082dc: 90 10 00 19 mov %i1, %o0 20082e0: 92 10 20 01 mov 1, %o1 20082e4: 10 80 00 bc b 20085d4 <_Heap_Walk+0x4e4> 20082e8: 94 12 a3 c0 or %o2, 0x3c0, %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; 20082ec: c2 02 e0 04 ld [ %o3 + 4 ], %g1 20082f0: 82 08 7f fe and %g1, -2, %g1 block = next_block; } while ( block != first_block ); return true; } 20082f4: 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; 20082f8: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20082fc: 80 88 60 01 btst 1, %g1 2008300: 22 80 00 07 be,a 200831c <_Heap_Walk+0x22c> 2008304: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2008308: 15 00 80 52 sethi %hi(0x2014800), %o2 200830c: 90 10 00 19 mov %i1, %o0 2008310: 92 10 20 01 mov 1, %o1 2008314: 10 80 00 b0 b 20085d4 <_Heap_Walk+0x4e4> 2008318: 94 12 a3 f0 or %o2, 0x3f0, %o2 ); return false; } if ( free_block->prev != prev_block ) { 200831c: 80 a3 00 12 cmp %o4, %l2 2008320: 22 80 00 0a be,a 2008348 <_Heap_Walk+0x258> 2008324: a4 10 00 0b mov %o3, %l2 (*printer)( 2008328: 15 00 80 53 sethi %hi(0x2014c00), %o2 200832c: 90 10 00 19 mov %i1, %o0 2008330: 92 10 20 01 mov 1, %o1 2008334: 94 12 a0 10 or %o2, 0x10, %o2 2008338: 9f c7 40 00 call %i5 200833c: 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; 2008340: 10 80 00 9e b 20085b8 <_Heap_Walk+0x4c8> 2008344: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 2008348: 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 ) { 200834c: 80 a2 c0 18 cmp %o3, %i0 2008350: 32 bf ff ce bne,a 2008288 <_Heap_Walk+0x198> 2008354: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2008358: 2d 00 80 53 sethi %hi(0x2014c00), %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)( 200835c: 2f 00 80 53 sethi %hi(0x2014c00), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008360: ac 15 a1 d0 or %l6, 0x1d0, %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)( 2008364: ae 15 e1 b8 or %l7, 0x1b8, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2008368: 2b 00 80 53 sethi %hi(0x2014c00), %l5 block = next_block; } while ( block != first_block ); return true; } 200836c: 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; 2008370: 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; 2008374: 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); 2008378: 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; 200837c: 80 a0 c0 13 cmp %g3, %l3 2008380: 18 80 00 05 bgu 2008394 <_Heap_Walk+0x2a4> <== NEVER TAKEN 2008384: 84 10 20 00 clr %g2 2008388: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200838c: 80 a0 80 13 cmp %g2, %l3 2008390: 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 ) ) { 2008394: 80 a0 a0 00 cmp %g2, 0 2008398: 12 80 00 07 bne 20083b4 <_Heap_Walk+0x2c4> 200839c: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 20083a0: 15 00 80 53 sethi %hi(0x2014c00), %o2 20083a4: 90 10 00 19 mov %i1, %o0 20083a8: 92 10 20 01 mov 1, %o1 20083ac: 10 80 00 2c b 200845c <_Heap_Walk+0x36c> 20083b0: 94 12 a0 48 or %o2, 0x48, %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; 20083b4: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20083b8: c2 27 bf fc st %g1, [ %fp + -4 ] 20083bc: a8 40 20 00 addx %g0, 0, %l4 20083c0: 90 10 00 12 mov %l2, %o0 20083c4: 7f ff e5 c7 call 2001ae0 <.urem> 20083c8: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 20083cc: 80 a2 20 00 cmp %o0, 0 20083d0: 02 80 00 0c be 2008400 <_Heap_Walk+0x310> 20083d4: c2 07 bf fc ld [ %fp + -4 ], %g1 20083d8: 80 8d 20 ff btst 0xff, %l4 20083dc: 02 80 00 0a be 2008404 <_Heap_Walk+0x314> 20083e0: 80 a4 80 10 cmp %l2, %l0 (*printer)( 20083e4: 15 00 80 53 sethi %hi(0x2014c00), %o2 20083e8: 90 10 00 19 mov %i1, %o0 20083ec: 92 10 20 01 mov 1, %o1 20083f0: 94 12 a0 78 or %o2, 0x78, %o2 20083f4: 96 10 00 1a mov %i2, %o3 20083f8: 10 bf ff d0 b 2008338 <_Heap_Walk+0x248> 20083fc: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2008400: 80 a4 80 10 cmp %l2, %l0 2008404: 1a 80 00 0d bcc 2008438 <_Heap_Walk+0x348> 2008408: 80 a4 c0 1a cmp %l3, %i2 200840c: 80 8d 20 ff btst 0xff, %l4 2008410: 02 80 00 0a be 2008438 <_Heap_Walk+0x348> <== NEVER TAKEN 2008414: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2008418: 15 00 80 53 sethi %hi(0x2014c00), %o2 200841c: 90 10 00 19 mov %i1, %o0 2008420: 92 10 20 01 mov 1, %o1 2008424: 94 12 a0 a8 or %o2, 0xa8, %o2 2008428: 96 10 00 1a mov %i2, %o3 200842c: 98 10 00 12 mov %l2, %o4 2008430: 10 80 00 3d b 2008524 <_Heap_Walk+0x434> 2008434: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2008438: 38 80 00 0c bgu,a 2008468 <_Heap_Walk+0x378> 200843c: a8 08 60 01 and %g1, 1, %l4 2008440: 80 8d 20 ff btst 0xff, %l4 2008444: 02 80 00 09 be 2008468 <_Heap_Walk+0x378> 2008448: a8 08 60 01 and %g1, 1, %l4 (*printer)( 200844c: 15 00 80 53 sethi %hi(0x2014c00), %o2 2008450: 90 10 00 19 mov %i1, %o0 2008454: 92 10 20 01 mov 1, %o1 2008458: 94 12 a0 d8 or %o2, 0xd8, %o2 200845c: 96 10 00 1a mov %i2, %o3 2008460: 10 bf ff b6 b 2008338 <_Heap_Walk+0x248> 2008464: 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; 2008468: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200846c: 80 88 60 01 btst 1, %g1 2008470: 12 80 00 40 bne 2008570 <_Heap_Walk+0x480> 2008474: 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 ? 2008478: 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)( 200847c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008480: 05 00 80 52 sethi %hi(0x2014800), %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; 2008484: c8 06 20 0c ld [ %i0 + 0xc ], %g4 2008488: 80 a3 40 01 cmp %o5, %g1 200848c: 02 80 00 07 be 20084a8 <_Heap_Walk+0x3b8> 2008490: 86 10 a1 b8 or %g2, 0x1b8, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2008494: 80 a3 40 18 cmp %o5, %i0 2008498: 12 80 00 04 bne 20084a8 <_Heap_Walk+0x3b8> 200849c: 86 15 61 80 or %l5, 0x180, %g3 20084a0: 07 00 80 52 sethi %hi(0x2014800), %g3 20084a4: 86 10 e1 c8 or %g3, 0x1c8, %g3 ! 20149c8 <_Status_Object_name_errors_to_status+0x48> block->next, block->next == last_free_block ? 20084a8: 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)( 20084ac: 1f 00 80 52 sethi %hi(0x2014800), %o7 20084b0: 80 a0 80 04 cmp %g2, %g4 20084b4: 02 80 00 07 be 20084d0 <_Heap_Walk+0x3e0> 20084b8: 82 13 e1 d8 or %o7, 0x1d8, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 20084bc: 80 a0 80 18 cmp %g2, %i0 20084c0: 12 80 00 04 bne 20084d0 <_Heap_Walk+0x3e0> 20084c4: 82 15 61 80 or %l5, 0x180, %g1 20084c8: 03 00 80 52 sethi %hi(0x2014800), %g1 20084cc: 82 10 61 e8 or %g1, 0x1e8, %g1 ! 20149e8 <_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)( 20084d0: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 20084d4: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 20084d8: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 20084dc: 90 10 00 19 mov %i1, %o0 20084e0: 92 10 20 00 clr %o1 20084e4: 15 00 80 53 sethi %hi(0x2014c00), %o2 20084e8: 96 10 00 1a mov %i2, %o3 20084ec: 94 12 a1 10 or %o2, 0x110, %o2 20084f0: 9f c7 40 00 call %i5 20084f4: 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 ) { 20084f8: da 04 c0 00 ld [ %l3 ], %o5 20084fc: 80 a4 80 0d cmp %l2, %o5 2008500: 02 80 00 0d be 2008534 <_Heap_Walk+0x444> 2008504: 80 a5 20 00 cmp %l4, 0 (*printer)( 2008508: 15 00 80 53 sethi %hi(0x2014c00), %o2 200850c: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2008510: 90 10 00 19 mov %i1, %o0 2008514: 92 10 20 01 mov 1, %o1 2008518: 94 12 a1 48 or %o2, 0x148, %o2 200851c: 96 10 00 1a mov %i2, %o3 2008520: 98 10 00 12 mov %l2, %o4 2008524: 9f c7 40 00 call %i5 2008528: 01 00 00 00 nop 200852c: 10 80 00 23 b 20085b8 <_Heap_Walk+0x4c8> 2008530: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 2008534: 32 80 00 0a bne,a 200855c <_Heap_Walk+0x46c> 2008538: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 200853c: 15 00 80 53 sethi %hi(0x2014c00), %o2 2008540: 90 10 00 19 mov %i1, %o0 2008544: 92 10 20 01 mov 1, %o1 2008548: 10 80 00 22 b 20085d0 <_Heap_Walk+0x4e0> 200854c: 94 12 a1 88 or %o2, 0x188, %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 ) { 2008550: 02 80 00 17 be 20085ac <_Heap_Walk+0x4bc> 2008554: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 2008558: 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 ) { 200855c: 80 a0 40 18 cmp %g1, %i0 2008560: 12 bf ff fc bne 2008550 <_Heap_Walk+0x460> 2008564: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008568: 10 80 00 17 b 20085c4 <_Heap_Walk+0x4d4> 200856c: 15 00 80 53 sethi %hi(0x2014c00), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2008570: 80 a5 20 00 cmp %l4, 0 2008574: 02 80 00 08 be 2008594 <_Heap_Walk+0x4a4> 2008578: 92 10 20 00 clr %o1 (*printer)( 200857c: 94 10 00 17 mov %l7, %o2 2008580: 96 10 00 1a mov %i2, %o3 2008584: 9f c7 40 00 call %i5 2008588: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 200858c: 10 80 00 08 b 20085ac <_Heap_Walk+0x4bc> 2008590: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008594: da 06 80 00 ld [ %i2 ], %o5 2008598: 94 10 00 16 mov %l6, %o2 200859c: 96 10 00 1a mov %i2, %o3 20085a0: 9f c7 40 00 call %i5 20085a4: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 20085a8: 80 a4 c0 1b cmp %l3, %i3 20085ac: 12 bf ff 70 bne 200836c <_Heap_Walk+0x27c> 20085b0: b4 10 00 13 mov %l3, %i2 return true; 20085b4: 82 10 20 01 mov 1, %g1 } 20085b8: b0 08 60 01 and %g1, 1, %i0 20085bc: 81 c7 e0 08 ret 20085c0: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085c4: 90 10 00 19 mov %i1, %o0 20085c8: 92 10 20 01 mov 1, %o1 20085cc: 94 12 a1 f8 or %o2, 0x1f8, %o2 20085d0: 96 10 00 1a mov %i2, %o3 20085d4: 9f c7 40 00 call %i5 20085d8: 01 00 00 00 nop 20085dc: 10 bf ff f7 b 20085b8 <_Heap_Walk+0x4c8> 20085e0: 82 10 20 00 clr %g1 ! 0 =============================================================================== 020078cc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20078cc: 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 ) 20078d0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20078d4: 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 ) 20078d8: 80 a0 60 00 cmp %g1, 0 20078dc: 02 80 00 20 be 200795c <_Objects_Allocate+0x90> <== NEVER TAKEN 20078e0: 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 ); 20078e4: b8 07 60 20 add %i5, 0x20, %i4 20078e8: 7f ff fd 81 call 2006eec <_Chain_Get> 20078ec: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 20078f0: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 20078f4: 80 a0 60 00 cmp %g1, 0 20078f8: 02 80 00 19 be 200795c <_Objects_Allocate+0x90> 20078fc: 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 ) { 2007900: 80 a2 20 00 cmp %o0, 0 2007904: 32 80 00 0a bne,a 200792c <_Objects_Allocate+0x60> 2007908: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 200790c: 40 00 00 1d call 2007980 <_Objects_Extend_information> 2007910: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2007914: 7f ff fd 76 call 2006eec <_Chain_Get> 2007918: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 200791c: b0 92 20 00 orcc %o0, 0, %i0 2007920: 02 80 00 0f be 200795c <_Objects_Allocate+0x90> 2007924: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007928: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 200792c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2007930: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 2007934: 40 00 3c 6a call 2016adc <.udiv> 2007938: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 200793c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2007940: 91 2a 20 02 sll %o0, 2, %o0 2007944: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2007948: 84 00 bf ff add %g2, -1, %g2 200794c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2007950: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 2007954: 82 00 7f ff add %g1, -1, %g1 2007958: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 200795c: 81 c7 e0 08 ret 2007960: 81 e8 00 00 restore =============================================================================== 02007cd8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2007cd8: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007cdc: 80 a6 60 00 cmp %i1, 0 2007ce0: 02 80 00 17 be 2007d3c <_Objects_Get_information+0x64> 2007ce4: 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 ); 2007ce8: 40 00 11 7a call 200c2d0 <_Objects_API_maximum_class> 2007cec: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007cf0: 80 a2 20 00 cmp %o0, 0 2007cf4: 02 80 00 12 be 2007d3c <_Objects_Get_information+0x64> 2007cf8: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007cfc: 18 80 00 10 bgu 2007d3c <_Objects_Get_information+0x64> 2007d00: 03 00 80 6d sethi %hi(0x201b400), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007d04: b1 2e 20 02 sll %i0, 2, %i0 2007d08: 82 10 60 88 or %g1, 0x88, %g1 2007d0c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2007d10: 80 a0 60 00 cmp %g1, 0 2007d14: 02 80 00 0a be 2007d3c <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d18: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007d1c: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2007d20: 80 a7 60 00 cmp %i5, 0 2007d24: 02 80 00 06 be 2007d3c <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d28: 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 ) 2007d2c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2007d30: 80 a0 00 01 cmp %g0, %g1 2007d34: 82 60 20 00 subx %g0, 0, %g1 2007d38: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 2007d3c: 81 c7 e0 08 ret 2007d40: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02008828 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008828: 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; 200882c: 92 96 20 00 orcc %i0, 0, %o1 2008830: 12 80 00 06 bne 2008848 <_Objects_Id_to_name+0x20> 2008834: 83 32 60 18 srl %o1, 0x18, %g1 2008838: 03 00 80 72 sethi %hi(0x201c800), %g1 200883c: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 201cb4c <_Per_CPU_Information+0xc> 2008840: d2 00 60 08 ld [ %g1 + 8 ], %o1 2008844: 83 32 60 18 srl %o1, 0x18, %g1 2008848: 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 ) 200884c: 84 00 7f ff add %g1, -1, %g2 2008850: 80 a0 a0 02 cmp %g2, 2 2008854: 18 80 00 12 bgu 200889c <_Objects_Id_to_name+0x74> 2008858: 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 ] ) 200885c: 10 80 00 12 b 20088a4 <_Objects_Id_to_name+0x7c> 2008860: 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 ]; 2008864: 85 28 a0 02 sll %g2, 2, %g2 2008868: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200886c: 80 a2 20 00 cmp %o0, 0 2008870: 02 80 00 0b be 200889c <_Objects_Id_to_name+0x74> <== NEVER TAKEN 2008874: 01 00 00 00 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 2008878: 7f ff ff ce call 20087b0 <_Objects_Get> 200887c: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2008880: 80 a2 20 00 cmp %o0, 0 2008884: 02 80 00 06 be 200889c <_Objects_Id_to_name+0x74> 2008888: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200888c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008890: 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(); 2008894: 40 00 03 76 call 200966c <_Thread_Enable_dispatch> 2008898: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 200889c: 81 c7 e0 08 ret 20088a0: 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 ] ) 20088a4: 05 00 80 72 sethi %hi(0x201c800), %g2 20088a8: 84 10 a0 78 or %g2, 0x78, %g2 ! 201c878 <_Objects_Information_table> 20088ac: c2 00 80 01 ld [ %g2 + %g1 ], %g1 20088b0: 80 a0 60 00 cmp %g1, 0 20088b4: 12 bf ff ec bne 2008864 <_Objects_Id_to_name+0x3c> 20088b8: 85 32 60 1b srl %o1, 0x1b, %g2 20088bc: 30 bf ff f8 b,a 200889c <_Objects_Id_to_name+0x74> =============================================================================== 0200ced4 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200ced4: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200ced8: 80 a6 60 00 cmp %i1, 0 200cedc: 02 80 00 73 be 200d0a8 <_RBTree_Extract_unprotected+0x1d4> 200cee0: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200cee4: c2 06 20 08 ld [ %i0 + 8 ], %g1 200cee8: 80 a6 40 01 cmp %i1, %g1 200ceec: 32 80 00 0d bne,a 200cf20 <_RBTree_Extract_unprotected+0x4c> 200cef0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 200cef4: c2 06 60 08 ld [ %i1 + 8 ], %g1 200cef8: 80 a0 60 00 cmp %g1, 0 200cefc: 22 80 00 04 be,a 200cf0c <_RBTree_Extract_unprotected+0x38> 200cf00: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200cf04: 10 80 00 06 b 200cf1c <_RBTree_Extract_unprotected+0x48> 200cf08: 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, 200cf0c: 80 a6 00 01 cmp %i0, %g1 200cf10: 12 80 00 03 bne 200cf1c <_RBTree_Extract_unprotected+0x48> 200cf14: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200cf18: 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]) { 200cf1c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200cf20: 80 a6 40 01 cmp %i1, %g1 200cf24: 12 80 00 0b bne 200cf50 <_RBTree_Extract_unprotected+0x7c> 200cf28: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 200cf2c: 80 a0 60 00 cmp %g1, 0 200cf30: 22 80 00 04 be,a 200cf40 <_RBTree_Extract_unprotected+0x6c> 200cf34: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 200cf38: 10 80 00 06 b 200cf50 <_RBTree_Extract_unprotected+0x7c> 200cf3c: 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, 200cf40: 80 a6 00 02 cmp %i0, %g2 200cf44: 12 80 00 03 bne 200cf50 <_RBTree_Extract_unprotected+0x7c> 200cf48: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200cf4c: 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]) { 200cf50: ba 90 60 00 orcc %g1, 0, %i5 200cf54: 02 80 00 36 be 200d02c <_RBTree_Extract_unprotected+0x158> 200cf58: f8 06 60 08 ld [ %i1 + 8 ], %i4 200cf5c: 80 a7 20 00 cmp %i4, 0 200cf60: 32 80 00 05 bne,a 200cf74 <_RBTree_Extract_unprotected+0xa0> 200cf64: c2 07 60 08 ld [ %i5 + 8 ], %g1 200cf68: 10 80 00 35 b 200d03c <_RBTree_Extract_unprotected+0x168> 200cf6c: 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]; 200cf70: c2 07 60 08 ld [ %i5 + 8 ], %g1 200cf74: 80 a0 60 00 cmp %g1, 0 200cf78: 32 bf ff fe bne,a 200cf70 <_RBTree_Extract_unprotected+0x9c> 200cf7c: 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]; 200cf80: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200cf84: 80 a7 20 00 cmp %i4, 0 200cf88: 02 80 00 05 be 200cf9c <_RBTree_Extract_unprotected+0xc8> 200cf8c: 01 00 00 00 nop leaf->parent = target->parent; 200cf90: c2 07 40 00 ld [ %i5 ], %g1 200cf94: 10 80 00 04 b 200cfa4 <_RBTree_Extract_unprotected+0xd0> 200cf98: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200cf9c: 7f ff ff 53 call 200cce8 <_RBTree_Extract_validate_unprotected> 200cfa0: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200cfa4: 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; 200cfa8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 200cfac: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200cfb0: 86 1f 40 03 xor %i5, %g3, %g3 200cfb4: 80 a0 00 03 cmp %g0, %g3 200cfb8: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 200cfbc: 87 28 e0 02 sll %g3, 2, %g3 200cfc0: 84 00 80 03 add %g2, %g3, %g2 200cfc4: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200cfc8: c4 06 40 00 ld [ %i1 ], %g2 200cfcc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200cfd0: 86 1e 40 03 xor %i1, %g3, %g3 200cfd4: 80 a0 00 03 cmp %g0, %g3 200cfd8: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 200cfdc: 87 28 e0 02 sll %g3, 2, %g3 200cfe0: 84 00 80 03 add %g2, %g3, %g2 200cfe4: 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]; 200cfe8: c4 06 60 08 ld [ %i1 + 8 ], %g2 200cfec: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200cff0: c4 06 60 08 ld [ %i1 + 8 ], %g2 200cff4: 80 a0 a0 00 cmp %g2, 0 200cff8: 32 80 00 02 bne,a 200d000 <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 200cffc: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200d000: c4 06 60 04 ld [ %i1 + 4 ], %g2 200d004: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200d008: c4 06 60 04 ld [ %i1 + 4 ], %g2 200d00c: 80 a0 a0 00 cmp %g2, 0 200d010: 32 80 00 02 bne,a 200d018 <_RBTree_Extract_unprotected+0x144> 200d014: 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; 200d018: c4 06 40 00 ld [ %i1 ], %g2 200d01c: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200d020: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200d024: 10 80 00 14 b 200d074 <_RBTree_Extract_unprotected+0x1a0> 200d028: 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 ) { 200d02c: 80 a7 20 00 cmp %i4, 0 200d030: 32 80 00 04 bne,a 200d040 <_RBTree_Extract_unprotected+0x16c> 200d034: c2 06 40 00 ld [ %i1 ], %g1 200d038: 30 80 00 04 b,a 200d048 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 200d03c: c2 06 40 00 ld [ %i1 ], %g1 200d040: 10 80 00 04 b 200d050 <_RBTree_Extract_unprotected+0x17c> 200d044: 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); 200d048: 7f ff ff 28 call 200cce8 <_RBTree_Extract_validate_unprotected> 200d04c: 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]; 200d050: 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; 200d054: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200d058: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200d05c: 86 1e 40 03 xor %i1, %g3, %g3 200d060: 80 a0 00 03 cmp %g0, %g3 200d064: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 200d068: 87 28 e0 02 sll %g3, 2, %g3 200d06c: 84 00 80 03 add %g2, %g3, %g2 200d070: 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 */ 200d074: 80 a0 60 00 cmp %g1, 0 200d078: 32 80 00 06 bne,a 200d090 <_RBTree_Extract_unprotected+0x1bc> 200d07c: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200d080: 80 a7 20 00 cmp %i4, 0 200d084: 32 80 00 02 bne,a 200d08c <_RBTree_Extract_unprotected+0x1b8> 200d088: 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; 200d08c: 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; 200d090: c0 26 60 08 clr [ %i1 + 8 ] 200d094: c0 26 60 04 clr [ %i1 + 4 ] 200d098: 80 a0 60 00 cmp %g1, 0 200d09c: 02 80 00 03 be 200d0a8 <_RBTree_Extract_unprotected+0x1d4> 200d0a0: c0 26 40 00 clr [ %i1 ] 200d0a4: c0 20 60 0c clr [ %g1 + 0xc ] 200d0a8: 81 c7 e0 08 ret 200d0ac: 81 e8 00 00 restore =============================================================================== 0200cce8 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200cce8: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200ccec: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 200ccf0: c2 07 40 00 ld [ %i5 ], %g1 200ccf4: 80 a0 60 00 cmp %g1, 0 200ccf8: 02 80 00 6e be 200ceb0 <_RBTree_Extract_validate_unprotected+0x1c8> 200ccfc: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 200cd00: 7f ff ff ca call 200cc28 <_RBTree_Sibling> 200cd04: 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) { 200cd08: 10 80 00 5d b 200ce7c <_RBTree_Extract_validate_unprotected+0x194> 200cd0c: 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); 200cd10: 22 80 00 15 be,a 200cd64 <_RBTree_Extract_validate_unprotected+0x7c><== NEVER TAKEN 200cd14: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 200cd18: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200cd1c: 80 a0 60 01 cmp %g1, 1 200cd20: 32 80 00 11 bne,a 200cd64 <_RBTree_Extract_validate_unprotected+0x7c> 200cd24: 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; 200cd28: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200cd2c: 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; 200cd30: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 200cd34: 82 1e 00 01 xor %i0, %g1, %g1 200cd38: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 200cd3c: 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]; 200cd40: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 200cd44: 7f ff ff ca call 200cc6c <_RBTree_Rotate> 200cd48: 92 10 00 1c mov %i4, %o1 sibling = parent->child[!dir]; 200cd4c: 80 a0 00 1c cmp %g0, %i4 200cd50: 82 60 3f ff subx %g0, -1, %g1 200cd54: 83 28 60 02 sll %g1, 2, %g1 200cd58: 82 07 40 01 add %i5, %g1, %g1 200cd5c: 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]) && 200cd60: c4 02 20 08 ld [ %o0 + 8 ], %g2 200cd64: 80 a0 a0 00 cmp %g2, 0 200cd68: 02 80 00 06 be 200cd80 <_RBTree_Extract_validate_unprotected+0x98> 200cd6c: 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( 200cd70: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200cd74: 82 18 60 01 xor %g1, 1, %g1 200cd78: 80 a0 00 01 cmp %g0, %g1 200cd7c: 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]) && 200cd80: 80 a0 60 00 cmp %g1, 0 200cd84: 32 80 00 14 bne,a 200cdd4 <_RBTree_Extract_validate_unprotected+0xec> 200cd88: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200cd8c: c4 02 20 04 ld [ %o0 + 4 ], %g2 200cd90: 80 a0 a0 00 cmp %g2, 0 200cd94: 02 80 00 07 be 200cdb0 <_RBTree_Extract_validate_unprotected+0xc8> 200cd98: 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( 200cd9c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200cda0: 82 18 60 01 xor %g1, 1, %g1 200cda4: 80 a0 00 01 cmp %g0, %g1 200cda8: 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]) && 200cdac: 80 a0 60 00 cmp %g1, 0 200cdb0: 32 80 00 09 bne,a 200cdd4 <_RBTree_Extract_validate_unprotected+0xec> 200cdb4: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 200cdb8: f4 22 20 0c st %i2, [ %o0 + 0xc ] 200cdbc: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cdc0: 80 a0 60 01 cmp %g1, 1 200cdc4: 32 80 00 3d bne,a 200ceb8 <_RBTree_Extract_validate_unprotected+0x1d0> 200cdc8: f8 07 40 00 ld [ %i5 ], %i4 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 200cdcc: 10 80 00 33 b 200ce98 <_RBTree_Extract_validate_unprotected+0x1b0> 200cdd0: 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]; 200cdd4: 82 1e 00 01 xor %i0, %g1, %g1 200cdd8: 80 a0 00 01 cmp %g0, %g1 200cddc: b8 40 20 00 addx %g0, 0, %i4 if (!_RBTree_Is_red(sibling->child[!dir])) { 200cde0: 80 a0 00 1c cmp %g0, %i4 200cde4: b6 60 3f ff subx %g0, -1, %i3 200cde8: 83 2e e0 02 sll %i3, 2, %g1 200cdec: 82 02 00 01 add %o0, %g1, %g1 200cdf0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200cdf4: 80 a0 a0 00 cmp %g2, 0 200cdf8: 02 80 00 06 be 200ce10 <_RBTree_Extract_validate_unprotected+0x128> 200cdfc: 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( 200ce00: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200ce04: 82 18 60 01 xor %g1, 1, %g1 200ce08: 80 a0 00 01 cmp %g0, %g1 200ce0c: 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])) { 200ce10: 80 a0 60 00 cmp %g1, 0 200ce14: 32 80 00 0e bne,a 200ce4c <_RBTree_Extract_validate_unprotected+0x164> 200ce18: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 200ce1c: 82 10 20 01 mov 1, %g1 200ce20: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 200ce24: 83 2f 20 02 sll %i4, 2, %g1 200ce28: 82 02 00 01 add %o0, %g1, %g1 200ce2c: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, !dir); 200ce30: 92 1f 20 01 xor %i4, 1, %o1 200ce34: 7f ff ff 8e call 200cc6c <_RBTree_Rotate> 200ce38: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[!dir]; 200ce3c: 83 2e e0 02 sll %i3, 2, %g1 200ce40: 82 07 40 01 add %i5, %g1, %g1 200ce44: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 200ce48: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 200ce4c: 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; 200ce50: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 200ce54: 90 02 00 1b add %o0, %i3, %o0 200ce58: 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; 200ce5c: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[!dir]->color = RBT_BLACK; 200ce60: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 200ce64: 90 10 00 1d mov %i5, %o0 200ce68: 7f ff ff 81 call 200cc6c <_RBTree_Rotate> 200ce6c: 92 10 00 1c mov %i4, %o1 break; /* done */ 200ce70: 10 80 00 0b b 200ce9c <_RBTree_Extract_validate_unprotected+0x1b4> 200ce74: 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) { 200ce78: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200ce7c: 80 a0 60 01 cmp %g1, 1 200ce80: 22 80 00 07 be,a 200ce9c <_RBTree_Extract_validate_unprotected+0x1b4> 200ce84: c2 06 00 00 ld [ %i0 ], %g1 200ce88: c2 07 40 00 ld [ %i5 ], %g1 200ce8c: 80 a0 60 00 cmp %g1, 0 200ce90: 12 bf ff a0 bne 200cd10 <_RBTree_Extract_validate_unprotected+0x28> 200ce94: 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; 200ce98: c2 06 00 00 ld [ %i0 ], %g1 200ce9c: c2 00 40 00 ld [ %g1 ], %g1 200cea0: 80 a0 60 00 cmp %g1, 0 200cea4: 12 80 00 0a bne 200cecc <_RBTree_Extract_validate_unprotected+0x1e4> 200cea8: 01 00 00 00 nop 200ceac: c0 26 20 0c clr [ %i0 + 0xc ] 200ceb0: 81 c7 e0 08 ret 200ceb4: 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); 200ceb8: 90 10 00 1d mov %i5, %o0 200cebc: 7f ff ff 5b call 200cc28 <_RBTree_Sibling> 200cec0: b0 10 00 1d mov %i5, %i0 200cec4: 10 bf ff ed b 200ce78 <_RBTree_Extract_validate_unprotected+0x190> 200cec8: ba 10 00 1c mov %i4, %i5 200cecc: 81 c7 e0 08 ret 200ced0: 81 e8 00 00 restore =============================================================================== 02009c48 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 2009c48: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 2009c4c: 80 a6 20 00 cmp %i0, 0 2009c50: 02 80 00 10 be 2009c90 <_RBTree_Initialize+0x48> <== NEVER TAKEN 2009c54: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 2009c58: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 2009c5c: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 2009c60: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 2009c64: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 2009c68: f2 26 20 10 st %i1, [ %i0 + 0x10 ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 2009c6c: 10 80 00 06 b 2009c84 <_RBTree_Initialize+0x3c> 2009c70: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 2009c74: 90 10 00 18 mov %i0, %o0 2009c78: 7f ff ff ef call 2009c34 <_RBTree_Insert> 2009c7c: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 2009c80: b6 06 ff ff add %i3, -1, %i3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 2009c84: 80 a6 e0 00 cmp %i3, 0 2009c88: 12 bf ff fb bne 2009c74 <_RBTree_Initialize+0x2c> 2009c8c: 92 10 00 1a mov %i2, %o1 2009c90: 81 c7 e0 08 ret 2009c94: 81 e8 00 00 restore =============================================================================== 0200cc28 <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; 200cc28: 80 a2 20 00 cmp %o0, 0 200cc2c: 02 80 00 0e be 200cc64 <_RBTree_Sibling+0x3c> 200cc30: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 200cc34: c4 02 00 00 ld [ %o0 ], %g2 200cc38: 80 a0 a0 00 cmp %g2, 0 200cc3c: 02 80 00 0a be 200cc64 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 200cc40: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 200cc44: c6 00 80 00 ld [ %g2 ], %g3 200cc48: 80 a0 e0 00 cmp %g3, 0 200cc4c: 02 80 00 06 be 200cc64 <_RBTree_Sibling+0x3c> 200cc50: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 200cc54: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200cc58: 80 a2 00 01 cmp %o0, %g1 200cc5c: 22 80 00 02 be,a 200cc64 <_RBTree_Sibling+0x3c> 200cc60: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 200cc64: 81 c3 e0 08 retl 200cc68: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200d150 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 200d150: 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))) { 200d154: 10 80 00 1f b 200d1d0 <_RBTree_Validate_insert_unprotected+0x80> 200d158: 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; 200d15c: 80 a0 60 00 cmp %g1, 0 200d160: 02 80 00 27 be 200d1fc <_RBTree_Validate_insert_unprotected+0xac><== NEVER TAKEN 200d164: 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]) 200d168: 80 a2 00 01 cmp %o0, %g1 200d16c: 22 80 00 02 be,a 200d174 <_RBTree_Validate_insert_unprotected+0x24> 200d170: 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); 200d174: 80 a0 60 00 cmp %g1, 0 200d178: 22 80 00 21 be,a 200d1fc <_RBTree_Validate_insert_unprotected+0xac> 200d17c: c2 07 60 04 ld [ %i5 + 4 ], %g1 200d180: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200d184: 80 a0 a0 01 cmp %g2, 1 200d188: 32 80 00 1d bne,a 200d1fc <_RBTree_Validate_insert_unprotected+0xac> 200d18c: 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; 200d190: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 200d194: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200d198: c4 27 60 0c st %g2, [ %i5 + 0xc ] 200d19c: 10 80 00 0d b 200d1d0 <_RBTree_Validate_insert_unprotected+0x80> 200d1a0: 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); 200d1a4: 7f ff ff cc call 200d0d4 <_RBTree_Rotate> 200d1a8: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200d1ac: 83 2f 20 02 sll %i4, 2, %g1 200d1b0: b0 06 00 01 add %i0, %g1, %i0 200d1b4: f0 06 20 04 ld [ %i0 + 4 ], %i0 } the_node->parent->color = RBT_BLACK; 200d1b8: 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)); 200d1bc: 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; 200d1c0: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200d1c4: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200d1c8: 7f ff ff c3 call 200d0d4 <_RBTree_Rotate> 200d1cc: 92 26 c0 1c sub %i3, %i4, %o1 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 200d1d0: 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; 200d1d4: fa 02 00 00 ld [ %o0 ], %i5 200d1d8: 80 a7 60 00 cmp %i5, 0 200d1dc: 22 80 00 14 be,a 200d22c <_RBTree_Validate_insert_unprotected+0xdc> 200d1e0: 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); 200d1e4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200d1e8: 80 a0 60 01 cmp %g1, 1 200d1ec: 12 80 00 10 bne 200d22c <_RBTree_Validate_insert_unprotected+0xdc> 200d1f0: 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; 200d1f4: 10 bf ff da b 200d15c <_RBTree_Validate_insert_unprotected+0xc> 200d1f8: 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]; 200d1fc: 82 1a 00 01 xor %o0, %g1, %g1 200d200: 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]; 200d204: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 200d208: 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]; 200d20c: 82 1e 00 01 xor %i0, %g1, %g1 200d210: 80 a0 00 01 cmp %g0, %g1 200d214: 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) { 200d218: 80 a0 40 1c cmp %g1, %i4 200d21c: 12 bf ff e2 bne 200d1a4 <_RBTree_Validate_insert_unprotected+0x54> 200d220: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 200d224: 10 bf ff e6 b 200d1bc <_RBTree_Validate_insert_unprotected+0x6c> 200d228: c2 06 00 00 ld [ %i0 ], %g1 200d22c: 81 c7 e0 08 ret 200d230: 81 e8 00 00 restore =============================================================================== 0200bac8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200bac8: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200bacc: fa 06 21 58 ld [ %i0 + 0x158 ], %i5 if ( !api ) 200bad0: 80 a7 60 00 cmp %i5, 0 200bad4: 02 80 00 1c be 200bb44 <_RTEMS_tasks_Post_switch_extension+0x7c><== NEVER TAKEN 200bad8: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200badc: 7f ff d9 a8 call 200217c 200bae0: 01 00 00 00 nop signal_set = asr->signals_posted; 200bae4: f6 07 60 14 ld [ %i5 + 0x14 ], %i3 asr->signals_posted = 0; 200bae8: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 200baec: 7f ff d9 a8 call 200218c 200baf0: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200baf4: 80 a6 e0 00 cmp %i3, 0 200baf8: 02 80 00 13 be 200bb44 <_RTEMS_tasks_Post_switch_extension+0x7c> 200bafc: 94 07 bf fc add %fp, -4, %o2 return; asr->nest_level += 1; 200bb00: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb04: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bb08: 82 00 60 01 inc %g1 200bb0c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb10: 39 00 00 3f sethi %hi(0xfc00), %i4 200bb14: 40 00 07 3b call 200d800 200bb18: 92 17 23 ff or %i4, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200bb1c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200bb20: 9f c0 40 00 call %g1 200bb24: 90 10 00 1b mov %i3, %o0 asr->nest_level -= 1; 200bb28: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb2c: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200bb30: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb34: 92 17 23 ff or %i4, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200bb38: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb3c: 40 00 07 31 call 200d800 200bb40: 94 07 bf fc add %fp, -4, %o2 200bb44: 81 c7 e0 08 ret 200bb48: 81 e8 00 00 restore =============================================================================== 020076f4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20076f4: 9d e3 bf 98 save %sp, -104, %sp 20076f8: 11 00 80 74 sethi %hi(0x201d000), %o0 20076fc: 92 10 00 18 mov %i0, %o1 2007700: 90 12 22 64 or %o0, 0x264, %o0 2007704: 40 00 07 c4 call 2009614 <_Objects_Get> 2007708: 94 07 bf fc add %fp, -4, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 200770c: c2 07 bf fc ld [ %fp + -4 ], %g1 2007710: 80 a0 60 00 cmp %g1, 0 2007714: 12 80 00 25 bne 20077a8 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 2007718: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 200771c: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2007720: 03 00 00 10 sethi %hi(0x4000), %g1 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 2007724: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007728: 80 88 80 01 btst %g2, %g1 200772c: 22 80 00 0b be,a 2007758 <_Rate_monotonic_Timeout+0x64> 2007730: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2007734: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007738: c2 07 60 08 ld [ %i5 + 8 ], %g1 200773c: 80 a0 80 01 cmp %g2, %g1 2007740: 32 80 00 06 bne,a 2007758 <_Rate_monotonic_Timeout+0x64> 2007744: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007748: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200774c: 40 00 0a 85 call 200a160 <_Thread_Clear_state> 2007750: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 2007754: 30 80 00 06 b,a 200776c <_Rate_monotonic_Timeout+0x78> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 2007758: 80 a0 60 01 cmp %g1, 1 200775c: 12 80 00 0d bne 2007790 <_Rate_monotonic_Timeout+0x9c> 2007760: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007764: 82 10 20 03 mov 3, %g1 2007768: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 200776c: 7f ff fe 65 call 2007100 <_Rate_monotonic_Initiate_statistics> 2007770: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007774: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007778: 11 00 80 75 sethi %hi(0x201d400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200777c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007780: 90 12 20 8c or %o0, 0x8c, %o0 2007784: 40 00 0f 1e call 200b3fc <_Watchdog_Insert> 2007788: 92 07 60 10 add %i5, 0x10, %o1 200778c: 30 80 00 02 b,a 2007794 <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007790: c2 27 60 38 st %g1, [ %i5 + 0x38 ] * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2007794: 03 00 80 74 sethi %hi(0x201d000), %g1 2007798: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 201d3d0 <_Thread_Dispatch_disable_level> 200779c: 84 00 bf ff add %g2, -1, %g2 20077a0: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ] return _Thread_Dispatch_disable_level; 20077a4: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 20077a8: 81 c7 e0 08 ret 20077ac: 81 e8 00 00 restore =============================================================================== 02009f7c <_Scheduler_CBS_Budget_callout>: #include void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 2009f7c: 9d e3 bf 98 save %sp, -104, %sp Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 2009f80: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1 if ( the_thread->real_priority != new_priority ) 2009f84: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2009f88: 80 a0 40 09 cmp %g1, %o1 2009f8c: 32 80 00 02 bne,a 2009f94 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 2009f90: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 2009f94: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2009f98: 80 a0 40 09 cmp %g1, %o1 2009f9c: 02 80 00 04 be 2009fac <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 2009fa0: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 2009fa4: 40 00 01 91 call 200a5e8 <_Thread_Change_priority> 2009fa8: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 2009fac: f0 06 20 8c ld [ %i0 + 0x8c ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 2009fb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2009fb4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2009fb8: 80 a0 a0 00 cmp %g2, 0 2009fbc: 02 80 00 09 be 2009fe0 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 2009fc0: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 2009fc4: d0 00 40 00 ld [ %g1 ], %o0 2009fc8: 7f ff ff d7 call 2009f24 <_Scheduler_CBS_Get_server_id> 2009fcc: 92 07 bf fc add %fp, -4, %o1 sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 2009fd0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2009fd4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2009fd8: 9f c0 40 00 call %g1 2009fdc: d0 07 bf fc ld [ %fp + -4 ], %o0 2009fe0: 81 c7 e0 08 ret 2009fe4: 81 e8 00 00 restore =============================================================================== 02009b98 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 2009b98: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 2009b9c: c2 06 20 04 ld [ %i0 + 4 ], %g1 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 2009ba0: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 2009ba4: 80 a0 60 00 cmp %g1, 0 2009ba8: 04 80 00 1c ble 2009c18 <_Scheduler_CBS_Create_server+0x80> 2009bac: b0 10 3f ee mov -18, %i0 2009bb0: c2 07 40 00 ld [ %i5 ], %g1 2009bb4: 80 a0 60 00 cmp %g1, 0 2009bb8: 04 80 00 18 ble 2009c18 <_Scheduler_CBS_Create_server+0x80> 2009bbc: 03 00 80 77 sethi %hi(0x201dc00), %g1 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 2009bc0: c6 00 63 60 ld [ %g1 + 0x360 ], %g3 ! 201df60 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list[i] ) 2009bc4: 03 00 80 7a sethi %hi(0x201e800), %g1 2009bc8: c4 00 60 58 ld [ %g1 + 0x58 ], %g2 ! 201e858 <_Scheduler_CBS_Server_list> 2009bcc: 10 80 00 15 b 2009c20 <_Scheduler_CBS_Create_server+0x88> 2009bd0: 82 10 20 00 clr %g1 2009bd4: c8 00 80 1b ld [ %g2 + %i3 ], %g4 2009bd8: 80 a1 20 00 cmp %g4, 0 2009bdc: 32 80 00 11 bne,a 2009c20 <_Scheduler_CBS_Create_server+0x88> 2009be0: 82 00 60 01 inc %g1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 2009be4: 39 00 80 7a sethi %hi(0x201e800), %i4 2009be8: f0 07 20 58 ld [ %i4 + 0x58 ], %i0 ! 201e858 <_Scheduler_CBS_Server_list> } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 2009bec: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 2009bf0: 40 00 07 ed call 200bba4 <_Workspace_Allocate> 2009bf4: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 2009bf8: c2 06 80 00 ld [ %i2 ], %g1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 2009bfc: d0 26 00 1b st %o0, [ %i0 + %i3 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 2009c00: c4 07 20 58 ld [ %i4 + 0x58 ], %g2 2009c04: 83 28 60 02 sll %g1, 2, %g1 2009c08: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 2009c0c: 80 a0 60 00 cmp %g1, 0 2009c10: 12 80 00 09 bne 2009c34 <_Scheduler_CBS_Create_server+0x9c><== ALWAYS TAKEN 2009c14: b0 10 3f ef mov -17, %i0 2009c18: 81 c7 e0 08 ret 2009c1c: 81 e8 00 00 restore params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 2009c20: 80 a0 40 03 cmp %g1, %g3 2009c24: 12 bf ff ec bne 2009bd4 <_Scheduler_CBS_Create_server+0x3c> 2009c28: b7 28 60 02 sll %g1, 2, %i3 if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 2009c2c: 81 c7 e0 08 ret 2009c30: 91 e8 3f e6 restore %g0, -26, %o0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 2009c34: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 2009c38: b0 10 20 00 clr %i0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 2009c3c: c4 20 60 04 st %g2, [ %g1 + 4 ] 2009c40: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 2009c44: f2 20 60 0c st %i1, [ %g1 + 0xc ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 2009c48: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 2009c4c: 84 10 3f ff mov -1, %g2 2009c50: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 2009c54: 81 c7 e0 08 ret 2009c58: 81 e8 00 00 restore =============================================================================== 02009cd0 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 2009cd0: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 2009cd4: 90 10 00 19 mov %i1, %o0 2009cd8: 40 00 03 78 call 200aab8 <_Thread_Get> 2009cdc: 92 07 bf fc add %fp, -4, %o1 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 2009ce0: b8 92 20 00 orcc %o0, 0, %i4 2009ce4: 22 80 00 06 be,a 2009cfc <_Scheduler_CBS_Detach_thread+0x2c> 2009ce8: 03 00 80 77 sethi %hi(0x201dc00), %g1 _Thread_Enable_dispatch(); 2009cec: 40 00 03 66 call 200aa84 <_Thread_Enable_dispatch> 2009cf0: 01 00 00 00 nop sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 2009cf4: fa 07 20 8c ld [ %i4 + 0x8c ], %i5 } if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 2009cf8: 03 00 80 77 sethi %hi(0x201dc00), %g1 2009cfc: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 201df60 <_Scheduler_CBS_Maximum_servers> 2009d00: 80 a6 00 02 cmp %i0, %g2 2009d04: 1a 80 00 1a bcc 2009d6c <_Scheduler_CBS_Detach_thread+0x9c> 2009d08: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 2009d0c: 80 a7 20 00 cmp %i4, 0 2009d10: 02 80 00 17 be 2009d6c <_Scheduler_CBS_Detach_thread+0x9c> 2009d14: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 2009d18: 03 00 80 7a sethi %hi(0x201e800), %g1 2009d1c: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 201e858 <_Scheduler_CBS_Server_list> 2009d20: b1 2e 20 02 sll %i0, 2, %i0 2009d24: c4 00 40 18 ld [ %g1 + %i0 ], %g2 2009d28: 80 a0 a0 00 cmp %g2, 0 2009d2c: 02 80 00 10 be 2009d6c <_Scheduler_CBS_Detach_thread+0x9c> 2009d30: 82 10 3f e7 mov -25, %g1 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 2009d34: c6 00 80 00 ld [ %g2 ], %g3 2009d38: 80 a0 c0 19 cmp %g3, %i1 2009d3c: 12 80 00 0c bne 2009d6c <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 2009d40: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 2009d44: 82 10 3f ff mov -1, %g1 2009d48: c2 20 80 00 st %g1, [ %g2 ] sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 2009d4c: c2 07 20 a4 ld [ %i4 + 0xa4 ], %g1 /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info->cbs_server = NULL; 2009d50: c0 27 60 18 clr [ %i5 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 2009d54: c2 27 20 7c st %g1, [ %i4 + 0x7c ] the_thread->budget_callout = the_thread->Start.budget_callout; 2009d58: c2 07 20 a8 ld [ %i4 + 0xa8 ], %g1 2009d5c: c2 27 20 80 st %g1, [ %i4 + 0x80 ] the_thread->is_preemptible = the_thread->Start.is_preemptible; 2009d60: c2 0f 20 a0 ldub [ %i4 + 0xa0 ], %g1 2009d64: c2 2f 20 74 stb %g1, [ %i4 + 0x74 ] return SCHEDULER_CBS_OK; 2009d68: 82 10 20 00 clr %g1 } 2009d6c: 81 c7 e0 08 ret 2009d70: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 02009db8 <_Scheduler_CBS_Get_execution_time>: int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { 2009db8: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 2009dbc: 03 00 80 77 sethi %hi(0x201dc00), %g1 2009dc0: c2 00 63 60 ld [ %g1 + 0x360 ], %g1 ! 201df60 <_Scheduler_CBS_Maximum_servers> int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { 2009dc4: ba 10 00 18 mov %i0, %i5 Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 2009dc8: 80 a7 40 01 cmp %i5, %g1 2009dcc: 1a 80 00 22 bcc 2009e54 <_Scheduler_CBS_Get_execution_time+0x9c> 2009dd0: b0 10 3f ee mov -18, %i0 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 2009dd4: 39 00 80 7a sethi %hi(0x201e800), %i4 2009dd8: c2 07 20 58 ld [ %i4 + 0x58 ], %g1 ! 201e858 <_Scheduler_CBS_Server_list> 2009ddc: bb 2f 60 02 sll %i5, 2, %i5 2009de0: c2 00 40 1d ld [ %g1 + %i5 ], %g1 2009de4: 80 a0 60 00 cmp %g1, 0 2009de8: 02 80 00 1b be 2009e54 <_Scheduler_CBS_Get_execution_time+0x9c> 2009dec: b0 10 3f e7 mov -25, %i0 return SCHEDULER_CBS_ERROR_NOSERVER; if ( !_Scheduler_CBS_Server_list[server_id]->task_id ) { 2009df0: d0 00 40 00 ld [ %g1 ], %o0 2009df4: 80 a2 20 00 cmp %o0, 0 2009df8: 12 80 00 04 bne 2009e08 <_Scheduler_CBS_Get_execution_time+0x50><== ALWAYS TAKEN 2009dfc: 01 00 00 00 nop *exec_time = 0; 2009e00: 10 80 00 0f b 2009e3c <_Scheduler_CBS_Get_execution_time+0x84><== NOT EXECUTED 2009e04: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( 2009e08: 40 00 03 2c call 200aab8 <_Thread_Get> 2009e0c: 92 07 bf fc add %fp, -4, %o1 _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 2009e10: b6 92 20 00 orcc %o0, 0, %i3 2009e14: 02 80 00 0c be 2009e44 <_Scheduler_CBS_Get_execution_time+0x8c> 2009e18: c2 07 20 58 ld [ %i4 + 0x58 ], %g1 _Thread_Enable_dispatch(); 2009e1c: 40 00 03 1a call 200aa84 <_Thread_Enable_dispatch> 2009e20: 01 00 00 00 nop *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - 2009e24: c2 07 20 58 ld [ %i4 + 0x58 ], %g1 2009e28: c2 00 40 1d ld [ %g1 + %i5 ], %g1 2009e2c: c4 00 60 08 ld [ %g1 + 8 ], %g2 2009e30: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1 2009e34: 82 20 80 01 sub %g2, %g1, %g1 2009e38: c2 26 40 00 st %g1, [ %i1 ] the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; } return SCHEDULER_CBS_OK; 2009e3c: 81 c7 e0 08 ret 2009e40: 91 e8 20 00 restore %g0, 0, %o0 2009e44: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; 2009e48: c2 00 40 1d ld [ %g1 + %i5 ], %g1 2009e4c: c2 00 60 08 ld [ %g1 + 8 ], %g1 2009e50: c2 26 40 00 st %g1, [ %i1 ] } return SCHEDULER_CBS_OK; } 2009e54: 81 c7 e0 08 ret 2009e58: 81 e8 00 00 restore =============================================================================== 02009fe8 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 2009fe8: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); 2009fec: 3b 00 80 77 sethi %hi(0x201dc00), %i5 2009ff0: d0 07 63 60 ld [ %i5 + 0x360 ], %o0 ! 201df60 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 2009ff4: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 2009ff8: 40 00 06 eb call 200bba4 <_Workspace_Allocate> 2009ffc: 91 2a 20 02 sll %o0, 2, %o0 200a000: 05 00 80 7a sethi %hi(0x201e800), %g2 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200a004: 80 a2 20 00 cmp %o0, 0 200a008: 02 80 00 0c be 200a038 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN 200a00c: d0 20 a0 58 st %o0, [ %g2 + 0x58 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200a010: c6 07 63 60 ld [ %i5 + 0x360 ], %g3 200a014: 10 80 00 05 b 200a028 <_Scheduler_CBS_Initialize+0x40> 200a018: 82 10 20 00 clr %g1 _Scheduler_CBS_Server_list[i] = NULL; 200a01c: 89 28 60 02 sll %g1, 2, %g4 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200a020: 82 00 60 01 inc %g1 _Scheduler_CBS_Server_list[i] = NULL; 200a024: c0 27 40 04 clr [ %i5 + %g4 ] unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200a028: 80 a0 40 03 cmp %g1, %g3 200a02c: 12 bf ff fc bne 200a01c <_Scheduler_CBS_Initialize+0x34> 200a030: fa 00 a0 58 ld [ %g2 + 0x58 ], %i5 _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200a034: b0 10 20 00 clr %i0 } 200a038: 81 c7 e0 08 ret 200a03c: 81 e8 00 00 restore =============================================================================== 02008b44 <_Scheduler_CBS_Release_job>: { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 2008b44: c2 02 20 8c ld [ %o0 + 0x8c ], %g1 if (deadline) { 2008b48: 80 a2 60 00 cmp %o1, 0 2008b4c: 02 80 00 10 be 2008b8c <_Scheduler_CBS_Release_job+0x48> 2008b50: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 2008b54: 80 a0 60 00 cmp %g1, 0 2008b58: 02 80 00 08 be 2008b78 <_Scheduler_CBS_Release_job+0x34> 2008b5c: 05 00 80 74 sethi %hi(0x201d000), %g2 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 2008b60: d2 00 a0 3c ld [ %g2 + 0x3c ], %o1 ! 201d03c <_Watchdog_Ticks_since_boot> 2008b64: c4 00 60 04 ld [ %g1 + 4 ], %g2 2008b68: 92 02 40 02 add %o1, %g2, %o1 2008b6c: 05 20 00 00 sethi %hi(0x80000000), %g2 2008b70: 10 80 00 0a b 2008b98 <_Scheduler_CBS_Release_job+0x54> 2008b74: 92 2a 40 02 andn %o1, %g2, %o1 & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 2008b78: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 2008b7c: 92 02 40 01 add %o1, %g1, %o1 2008b80: 03 20 00 00 sethi %hi(0x80000000), %g1 2008b84: 10 80 00 07 b 2008ba0 <_Scheduler_CBS_Release_job+0x5c> 2008b88: 92 2a 40 01 andn %o1, %g1, %o1 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) 2008b8c: 80 a0 60 00 cmp %g1, 0 2008b90: 02 80 00 04 be 2008ba0 <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN 2008b94: d2 02 20 b0 ld [ %o0 + 0xb0 ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; 2008b98: c2 00 60 08 ld [ %g1 + 8 ], %g1 2008b9c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] the_thread->real_priority = new_priority; 2008ba0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 2008ba4: 94 10 20 01 mov 1, %o2 2008ba8: 82 13 c0 00 mov %o7, %g1 2008bac: 40 00 01 36 call 2009084 <_Thread_Change_priority> 2008bb0: 9e 10 40 00 mov %g1, %o7 =============================================================================== 02008bb4 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 2008bb4: 9d e3 bf a0 save %sp, -96, %sp Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 2008bb8: 40 00 00 57 call 2008d14 <_Scheduler_EDF_Enqueue> 2008bbc: 90 10 00 18 mov %i0, %o0 /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 2008bc0: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 2008bc4: fa 00 60 18 ld [ %g1 + 0x18 ], %i5 * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 2008bc8: 80 a7 60 00 cmp %i5, 0 2008bcc: 02 80 00 18 be 2008c2c <_Scheduler_CBS_Unblock+0x78> 2008bd0: 03 00 80 74 sethi %hi(0x201d000), %g1 time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 2008bd4: d2 07 60 04 ld [ %i5 + 4 ], %o1 */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 2008bd8: d0 00 60 3c ld [ %g1 + 0x3c ], %o0 2008bdc: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 2008be0: 40 00 3d 76 call 20181b8 <.umul> 2008be4: 90 27 00 08 sub %i4, %o0, %o0 2008be8: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 2008bec: b6 10 00 08 mov %o0, %i3 2008bf0: 40 00 3d 72 call 20181b8 <.umul> 2008bf4: d0 07 60 08 ld [ %i5 + 8 ], %o0 2008bf8: 80 a6 c0 08 cmp %i3, %o0 2008bfc: 24 80 00 0d ble,a 2008c30 <_Scheduler_CBS_Unblock+0x7c> 2008c00: 3b 00 80 74 sethi %hi(0x201d000), %i5 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 2008c04: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1 if ( the_thread->real_priority != new_priority ) 2008c08: 80 a7 00 09 cmp %i4, %o1 2008c0c: 32 80 00 02 bne,a 2008c14 <_Scheduler_CBS_Unblock+0x60> 2008c10: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 2008c14: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008c18: 80 a0 40 09 cmp %g1, %o1 2008c1c: 02 80 00 04 be 2008c2c <_Scheduler_CBS_Unblock+0x78> 2008c20: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 2008c24: 40 00 01 18 call 2009084 <_Thread_Change_priority> 2008c28: 94 10 20 01 mov 1, %o2 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 2008c2c: 3b 00 80 74 sethi %hi(0x201d000), %i5 2008c30: ba 17 61 60 or %i5, 0x160, %i5 ! 201d160 <_Per_CPU_Information> 2008c34: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2008c38: 03 00 80 70 sethi %hi(0x201c000), %g1 2008c3c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 2008c40: c2 00 62 e4 ld [ %g1 + 0x2e4 ], %g1 2008c44: 9f c0 40 00 call %g1 2008c48: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 2008c4c: 80 a2 20 00 cmp %o0, 0 2008c50: 04 80 00 0f ble 2008c8c <_Scheduler_CBS_Unblock+0xd8> 2008c54: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2008c58: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 2008c5c: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 2008c60: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1 2008c64: 80 a0 60 00 cmp %g1, 0 2008c68: 12 80 00 06 bne 2008c80 <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN 2008c6c: 84 10 20 01 mov 1, %g2 2008c70: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 2008c74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2008c78: 12 80 00 05 bne 2008c8c <_Scheduler_CBS_Unblock+0xd8> <== NOT EXECUTED 2008c7c: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2008c80: 03 00 80 74 sethi %hi(0x201d000), %g1 2008c84: 82 10 61 60 or %g1, 0x160, %g1 ! 201d160 <_Per_CPU_Information> 2008c88: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 2008c8c: 81 c7 e0 08 ret 2008c90: 81 e8 00 00 restore =============================================================================== 02008c94 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 2008c94: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 2008c98: 40 00 06 71 call 200a65c <_Workspace_Allocate> 2008c9c: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 2008ca0: 80 a2 20 00 cmp %o0, 0 2008ca4: 02 80 00 05 be 2008cb8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 2008ca8: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 2008cac: d0 26 20 8c st %o0, [ %i0 + 0x8c ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 2008cb0: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 2008cb4: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 2008cb8: 81 c7 e0 08 ret 2008cbc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02008ccc <_Scheduler_EDF_Release_job>: uint32_t deadline ) { Priority_Control new_priority; if (deadline) { 2008ccc: 80 a2 60 00 cmp %o1, 0 2008cd0: 22 80 00 07 be,a 2008cec <_Scheduler_EDF_Release_job+0x20><== NEVER TAKEN 2008cd4: d2 02 20 b0 ld [ %o0 + 0xb0 ], %o1 <== NOT EXECUTED /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 2008cd8: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008cdc: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201cf8c <_Watchdog_Ticks_since_boot> 2008ce0: 92 02 40 01 add %o1, %g1, %o1 2008ce4: 03 20 00 00 sethi %hi(0x80000000), %g1 2008ce8: 92 2a 40 01 andn %o1, %g1, %o1 else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 2008cec: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 2008cf0: 94 10 20 01 mov 1, %o2 2008cf4: 82 13 c0 00 mov %o7, %g1 2008cf8: 40 00 00 b9 call 2008fdc <_Thread_Change_priority> 2008cfc: 9e 10 40 00 mov %g1, %o7 =============================================================================== 02008d28 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 2008d28: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 2008d2c: 7f ff ff a6 call 2008bc4 <_Scheduler_EDF_Enqueue> 2008d30: 90 10 00 18 mov %i0, %o0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( 2008d34: 3b 00 80 74 sethi %hi(0x201d000), %i5 2008d38: ba 17 60 b0 or %i5, 0xb0, %i5 ! 201d0b0 <_Per_CPU_Information> 2008d3c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2008d40: 03 00 80 70 sethi %hi(0x201c000), %g1 2008d44: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 2008d48: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 2008d4c: 9f c0 40 00 call %g1 2008d50: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2008d54: 80 a2 20 00 cmp %o0, 0 2008d58: 16 80 00 0f bge 2008d94 <_Scheduler_EDF_Unblock+0x6c> 2008d5c: 01 00 00 00 nop _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2008d60: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 2008d64: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 2008d68: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1 2008d6c: 80 a0 60 00 cmp %g1, 0 2008d70: 12 80 00 06 bne 2008d88 <_Scheduler_EDF_Unblock+0x60> 2008d74: 84 10 20 01 mov 1, %g2 2008d78: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008d7c: 80 a0 60 00 cmp %g1, 0 2008d80: 12 80 00 05 bne 2008d94 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN 2008d84: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2008d88: 03 00 80 74 sethi %hi(0x201d000), %g1 2008d8c: 82 10 60 b0 or %g1, 0xb0, %g1 ! 201d0b0 <_Per_CPU_Information> 2008d90: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 2008d94: 81 c7 e0 08 ret 2008d98: 81 e8 00 00 restore =============================================================================== 02007160 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007160: 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(); 2007164: 03 00 80 73 sethi %hi(0x201cc00), %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; 2007168: 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) || 200716c: 80 a6 20 00 cmp %i0, 0 2007170: 02 80 00 2b be 200721c <_TOD_Validate+0xbc> <== NEVER TAKEN 2007174: d2 00 63 a8 ld [ %g1 + 0x3a8 ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 2007178: 11 00 03 d0 sethi %hi(0xf4000), %o0 200717c: 40 00 46 7f call 2018b78 <.udiv> 2007180: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2007184: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2007188: 80 a0 40 08 cmp %g1, %o0 200718c: 3a 80 00 25 bcc,a 2007220 <_TOD_Validate+0xc0> 2007190: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2007194: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007198: 80 a0 60 3b cmp %g1, 0x3b 200719c: 38 80 00 21 bgu,a 2007220 <_TOD_Validate+0xc0> 20071a0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20071a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20071a8: 80 a0 60 3b cmp %g1, 0x3b 20071ac: 38 80 00 1d bgu,a 2007220 <_TOD_Validate+0xc0> 20071b0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20071b4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20071b8: 80 a0 60 17 cmp %g1, 0x17 20071bc: 38 80 00 19 bgu,a 2007220 <_TOD_Validate+0xc0> 20071c0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 20071c4: 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) || 20071c8: 80 a0 60 00 cmp %g1, 0 20071cc: 02 80 00 14 be 200721c <_TOD_Validate+0xbc> <== NEVER TAKEN 20071d0: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 20071d4: 38 80 00 13 bgu,a 2007220 <_TOD_Validate+0xc0> 20071d8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 20071dc: 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) || 20071e0: 80 a0 e7 c3 cmp %g3, 0x7c3 20071e4: 28 80 00 0f bleu,a 2007220 <_TOD_Validate+0xc0> 20071e8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 20071ec: 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) || 20071f0: 80 a0 a0 00 cmp %g2, 0 20071f4: 02 80 00 0a be 200721c <_TOD_Validate+0xbc> <== NEVER TAKEN 20071f8: 80 88 e0 03 btst 3, %g3 20071fc: 07 00 80 6f sethi %hi(0x201bc00), %g3 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2007200: 12 80 00 03 bne 200720c <_TOD_Validate+0xac> 2007204: 86 10 e0 b8 or %g3, 0xb8, %g3 ! 201bcb8 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2007208: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 200720c: 83 28 60 02 sll %g1, 2, %g1 2007210: 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( 2007214: 80 a0 40 02 cmp %g1, %g2 2007218: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 200721c: b0 0f 60 01 and %i5, 1, %i0 2007220: 81 c7 e0 08 ret 2007224: 81 e8 00 00 restore =============================================================================== 020087ec <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 20087ec: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 20087f0: 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 ); 20087f4: 40 00 03 59 call 2009558 <_Thread_Set_transient> 20087f8: 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 ) 20087fc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008800: 80 a0 40 19 cmp %g1, %i1 2008804: 02 80 00 05 be 2008818 <_Thread_Change_priority+0x2c> 2008808: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 200880c: 90 10 00 18 mov %i0, %o0 2008810: 40 00 03 39 call 20094f4 <_Thread_Set_priority> 2008814: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 2008818: 7f ff e6 59 call 200217c 200881c: 01 00 00 00 nop 2008820: 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; 2008824: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 2008828: 80 a6 60 04 cmp %i1, 4 200882c: 02 80 00 10 be 200886c <_Thread_Change_priority+0x80> 2008830: 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 ) ) 2008834: 80 a7 20 00 cmp %i4, 0 2008838: 12 80 00 03 bne 2008844 <_Thread_Change_priority+0x58> <== NEVER TAKEN 200883c: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2008840: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2008844: 7f ff e6 52 call 200218c 2008848: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200884c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008850: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008854: 80 8e 40 01 btst %i1, %g1 2008858: 02 80 00 29 be 20088fc <_Thread_Change_priority+0x110> 200885c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2008860: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2008864: 40 00 02 f6 call 200943c <_Thread_queue_Requeue> 2008868: 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 ) ) { 200886c: 80 a7 20 00 cmp %i4, 0 2008870: 12 80 00 0b bne 200889c <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2008874: 03 00 80 6a sethi %hi(0x201a800), %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 ); 2008878: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 200887c: 80 a6 a0 00 cmp %i2, 0 2008880: 02 80 00 04 be 2008890 <_Thread_Change_priority+0xa4> 2008884: 82 10 61 14 or %g1, 0x114, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2008888: 10 80 00 03 b 2008894 <_Thread_Change_priority+0xa8> 200888c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2008890: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008894: 9f c0 40 00 call %g1 2008898: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 200889c: 7f ff e6 3c call 200218c 20088a0: 90 10 00 1b mov %i3, %o0 20088a4: 7f ff e6 36 call 200217c 20088a8: 01 00 00 00 nop 20088ac: 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(); 20088b0: 03 00 80 6a sethi %hi(0x201a800), %g1 20088b4: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201a91c <_Scheduler+0x8> 20088b8: 9f c0 40 00 call %g1 20088bc: 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 ); 20088c0: 03 00 80 6d sethi %hi(0x201b400), %g1 20088c4: 82 10 63 50 or %g1, 0x350, %g1 ! 201b750 <_Per_CPU_Information> 20088c8: 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() && 20088cc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 20088d0: 80 a0 80 03 cmp %g2, %g3 20088d4: 02 80 00 08 be 20088f4 <_Thread_Change_priority+0x108> 20088d8: 01 00 00 00 nop 20088dc: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2 20088e0: 80 a0 a0 00 cmp %g2, 0 20088e4: 02 80 00 04 be 20088f4 <_Thread_Change_priority+0x108> 20088e8: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 20088ec: 84 10 20 01 mov 1, %g2 ! 1 20088f0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 20088f4: 7f ff e6 26 call 200218c 20088f8: 81 e8 00 00 restore 20088fc: 81 c7 e0 08 ret 2008900: 81 e8 00 00 restore =============================================================================== 02008af0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008af0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008af4: 90 10 00 18 mov %i0, %o0 2008af8: 40 00 00 71 call 2008cbc <_Thread_Get> 2008afc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008b00: c2 07 bf fc ld [ %fp + -4 ], %g1 2008b04: 80 a0 60 00 cmp %g1, 0 2008b08: 12 80 00 09 bne 2008b2c <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2008b0c: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008b10: 7f ff ff 7d call 2008904 <_Thread_Clear_state> 2008b14: 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--; 2008b18: 03 00 80 6d sethi %hi(0x201b400), %g1 2008b1c: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201b520 <_Thread_Dispatch_disable_level> 2008b20: 84 00 bf ff add %g2, -1, %g2 2008b24: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 2008b28: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 2008b2c: 81 c7 e0 08 ret 2008b30: 81 e8 00 00 restore =============================================================================== 02008b34 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008b34: 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++; 2008b38: 03 00 80 6d sethi %hi(0x201b400), %g1 2008b3c: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201b520 <_Thread_Dispatch_disable_level> 2008b40: 84 00 a0 01 inc %g2 2008b44: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 2008b48: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2008b4c: 33 00 80 6d sethi %hi(0x201b400), %i1 2008b50: b4 16 63 50 or %i1, 0x350, %i2 ! 201b750 <_Per_CPU_Information> _ISR_Disable( level ); 2008b54: 7f ff e5 8a call 200217c 2008b58: 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; 2008b5c: 21 00 80 6d sethi %hi(0x201b400), %l0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008b60: b4 06 a0 1c add %i2, 0x1c, %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b64: 31 00 80 6d sethi %hi(0x201b400), %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 ) { 2008b68: 10 80 00 38 b 2008c48 <_Thread_Dispatch+0x114> 2008b6c: 37 00 80 6d sethi %hi(0x201b400), %i3 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2008b70: 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 ) 2008b74: 80 a7 00 1d cmp %i4, %i5 2008b78: 02 80 00 39 be 2008c5c <_Thread_Dispatch+0x128> 2008b7c: 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 ) 2008b80: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 2008b84: 80 a0 60 01 cmp %g1, 1 2008b88: 12 80 00 03 bne 2008b94 <_Thread_Dispatch+0x60> 2008b8c: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008b90: c2 27 20 78 st %g1, [ %i4 + 0x78 ] _ISR_Enable( level ); 2008b94: 7f ff e5 7e call 200218c 2008b98: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008b9c: 40 00 0c c4 call 200beac <_TOD_Get_uptime> 2008ba0: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( 2008ba4: 90 10 00 1a mov %i2, %o0 2008ba8: 92 07 bf f0 add %fp, -16, %o1 2008bac: 40 00 02 de call 2009724 <_Timespec_Subtract> 2008bb0: 94 07 bf f8 add %fp, -8, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008bb4: 90 07 60 84 add %i5, 0x84, %o0 2008bb8: 40 00 02 c2 call 20096c0 <_Timespec_Add_to> 2008bbc: 92 07 bf f8 add %fp, -8, %o1 _Thread_Time_of_last_context_switch = uptime; 2008bc0: c4 07 bf f0 ld [ %fp + -16 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008bc4: c2 06 21 a8 ld [ %i0 + 0x1a8 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008bc8: c4 26 80 00 st %g2, [ %i2 ] 2008bcc: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008bd0: 80 a0 60 00 cmp %g1, 0 2008bd4: 02 80 00 06 be 2008bec <_Thread_Dispatch+0xb8> <== NEVER TAKEN 2008bd8: c4 26 a0 04 st %g2, [ %i2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2008bdc: c4 00 40 00 ld [ %g1 ], %g2 2008be0: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2008be4: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 2008be8: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008bec: 90 10 00 1d mov %i5, %o0 2008bf0: 40 00 03 7b call 20099dc <_User_extensions_Thread_switch> 2008bf4: 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 ); 2008bf8: 90 07 60 c8 add %i5, 0xc8, %o0 2008bfc: 40 00 04 a1 call 2009e80 <_CPU_Context_switch> 2008c00: 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) && 2008c04: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2008c08: 80 a0 60 00 cmp %g1, 0 2008c0c: 02 80 00 0c be 2008c3c <_Thread_Dispatch+0x108> 2008c10: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 2008c14: 80 a7 40 08 cmp %i5, %o0 2008c18: 02 80 00 09 be 2008c3c <_Thread_Dispatch+0x108> 2008c1c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008c20: 02 80 00 04 be 2008c30 <_Thread_Dispatch+0xfc> 2008c24: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008c28: 40 00 04 5c call 2009d98 <_CPU_Context_save_fp> 2008c2c: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2008c30: 40 00 04 77 call 2009e0c <_CPU_Context_restore_fp> 2008c34: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2008c38: fa 26 e1 a4 st %i5, [ %i3 + 0x1a4 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2008c3c: 82 16 63 50 or %i1, 0x350, %g1 _ISR_Disable( level ); 2008c40: 7f ff e5 4f call 200217c 2008c44: 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 ) { 2008c48: 82 16 63 50 or %i1, 0x350, %g1 2008c4c: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 2008c50: 80 a0 a0 00 cmp %g2, 0 2008c54: 32 bf ff c7 bne,a 2008b70 <_Thread_Dispatch+0x3c> 2008c58: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 2008c5c: 7f ff e5 4c call 200218c 2008c60: 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--; 2008c64: 03 00 80 6d sethi %hi(0x201b400), %g1 2008c68: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201b520 <_Thread_Dispatch_disable_level> 2008c6c: 84 00 bf ff add %g2, -1, %g2 2008c70: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 2008c74: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 2008c78: 7f ff f8 40 call 2006d78 <_API_extensions_Run_postswitch> 2008c7c: 01 00 00 00 nop } 2008c80: 81 c7 e0 08 ret 2008c84: 81 e8 00 00 restore =============================================================================== 0200db30 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200db30: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200db34: 03 00 80 6d sethi %hi(0x201b400), %g1 200db38: fa 00 63 5c ld [ %g1 + 0x35c ], %i5 ! 201b75c <_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(); 200db3c: 3f 00 80 36 sethi %hi(0x200d800), %i7 200db40: be 17 e3 30 or %i7, 0x330, %i7 ! 200db30 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200db44: d0 07 60 ac ld [ %i5 + 0xac ], %o0 _ISR_Set_level(level); 200db48: 7f ff d1 91 call 200218c 200db4c: 91 2a 20 08 sll %o0, 8, %o0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200db50: 03 00 80 6c sethi %hi(0x201b000), %g1 doneConstructors = true; 200db54: 84 10 20 01 mov 1, %g2 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200db58: f8 08 61 e0 ldub [ %g1 + 0x1e0 ], %i4 doneConstructors = true; 200db5c: c4 28 61 e0 stb %g2, [ %g1 + 0x1e0 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200db60: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200db64: 80 a0 60 00 cmp %g1, 0 200db68: 02 80 00 0c be 200db98 <_Thread_Handler+0x68> 200db6c: 03 00 80 6d sethi %hi(0x201b400), %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 ); 200db70: d0 00 61 a4 ld [ %g1 + 0x1a4 ], %o0 ! 201b5a4 <_Thread_Allocated_fp> 200db74: 80 a7 40 08 cmp %i5, %o0 200db78: 02 80 00 08 be 200db98 <_Thread_Handler+0x68> 200db7c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200db80: 22 80 00 06 be,a 200db98 <_Thread_Handler+0x68> 200db84: fa 20 61 a4 st %i5, [ %g1 + 0x1a4 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200db88: 7f ff f0 84 call 2009d98 <_CPU_Context_save_fp> 200db8c: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200db90: 03 00 80 6d sethi %hi(0x201b400), %g1 200db94: fa 20 61 a4 st %i5, [ %g1 + 0x1a4 ] ! 201b5a4 <_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 ); 200db98: 7f ff ef 22 call 2009820 <_User_extensions_Thread_begin> 200db9c: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200dba0: 7f ff ec 3a call 2008c88 <_Thread_Enable_dispatch> 200dba4: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { 200dba8: 80 8f 20 ff btst 0xff, %i4 200dbac: 32 80 00 05 bne,a 200dbc0 <_Thread_Handler+0x90> 200dbb0: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 INIT_NAME (); 200dbb4: 40 00 33 0d call 201a7e8 <_init> 200dbb8: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200dbbc: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 200dbc0: 80 a0 60 00 cmp %g1, 0 200dbc4: 12 80 00 06 bne 200dbdc <_Thread_Handler+0xac> <== NEVER TAKEN 200dbc8: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200dbcc: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200dbd0: 9f c0 40 00 call %g1 200dbd4: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200dbd8: 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 ); 200dbdc: 7f ff ef 22 call 2009864 <_User_extensions_Thread_exitted> 200dbe0: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200dbe4: 90 10 20 00 clr %o0 200dbe8: 92 10 20 01 mov 1, %o1 200dbec: 7f ff e7 0c call 200781c <_Internal_error_Occurred> 200dbf0: 94 10 20 05 mov 5, %o2 =============================================================================== 02008d6c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008d6c: 9d e3 bf a0 save %sp, -96, %sp 2008d70: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 2008d74: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 2008d78: e0 00 40 00 ld [ %g1 ], %l0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 2008d7c: c0 26 61 58 clr [ %i1 + 0x158 ] 2008d80: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008d84: c0 26 61 54 clr [ %i1 + 0x154 ] /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2008d88: 90 10 00 19 mov %i1, %o0 2008d8c: 40 00 02 02 call 2009594 <_Thread_Stack_Allocate> 2008d90: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008d94: 80 a2 00 1b cmp %o0, %i3 2008d98: 0a 80 00 61 bcs 2008f1c <_Thread_Initialize+0x1b0> 2008d9c: 80 a2 20 00 cmp %o0, 0 2008da0: 02 80 00 5f be 2008f1c <_Thread_Initialize+0x1b0> <== NEVER TAKEN 2008da4: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008da8: c2 06 60 c0 ld [ %i1 + 0xc0 ], %g1 the_stack->size = size; 2008dac: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008db0: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2008db4: 02 80 00 07 be 2008dd0 <_Thread_Initialize+0x64> 2008db8: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008dbc: 40 00 03 db call 2009d28 <_Workspace_Allocate> 2008dc0: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008dc4: b6 92 20 00 orcc %o0, 0, %i3 2008dc8: 02 80 00 46 be 2008ee0 <_Thread_Initialize+0x174> 2008dcc: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008dd0: 03 00 80 6d sethi %hi(0x201b400), %g1 2008dd4: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0 ! 201b5b4 <_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; 2008dd8: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2008ddc: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008de0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008de4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008de8: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2008dec: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008df0: 80 a2 20 00 cmp %o0, 0 2008df4: 02 80 00 08 be 2008e14 <_Thread_Initialize+0xa8> 2008df8: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 2008dfc: 90 02 20 01 inc %o0 2008e00: 40 00 03 ca call 2009d28 <_Workspace_Allocate> 2008e04: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2008e08: b8 92 20 00 orcc %o0, 0, %i4 2008e0c: 22 80 00 36 be,a 2008ee4 <_Thread_Initialize+0x178> 2008e10: 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 ) { 2008e14: 80 a7 20 00 cmp %i4, 0 2008e18: 02 80 00 0c be 2008e48 <_Thread_Initialize+0xdc> 2008e1c: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008e20: 03 00 80 6d sethi %hi(0x201b400), %g1 2008e24: c4 00 61 b4 ld [ %g1 + 0x1b4 ], %g2 ! 201b5b4 <_Thread_Maximum_extensions> 2008e28: 10 80 00 05 b 2008e3c <_Thread_Initialize+0xd0> 2008e2c: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2008e30: 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++ ) 2008e34: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2008e38: 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++ ) 2008e3c: 80 a0 40 02 cmp %g1, %g2 2008e40: 28 bf ff fc bleu,a 2008e30 <_Thread_Initialize+0xc4> 2008e44: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008e48: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008e4c: f4 2e 60 a0 stb %i2, [ %i1 + 0xa0 ] the_thread->Start.budget_algorithm = budget_algorithm; 2008e50: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] the_thread->Start.budget_callout = budget_callout; 2008e54: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 2008e58: c0 26 60 44 clr [ %i1 + 0x44 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008e5c: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008e60: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2008e64: c0 26 60 1c clr [ %i1 + 0x1c ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008e68: c2 26 60 ac st %g1, [ %i1 + 0xac ] the_thread->current_state = STATES_DORMANT; 2008e6c: 82 10 20 01 mov 1, %g1 2008e70: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2008e74: 03 00 80 6a sethi %hi(0x201a800), %g1 2008e78: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 201a92c <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; 2008e7c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2008e80: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ] 2008e84: 9f c0 40 00 call %g1 2008e88: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2008e8c: b4 92 20 00 orcc %o0, 0, %i2 2008e90: 02 80 00 15 be 2008ee4 <_Thread_Initialize+0x178> 2008e94: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2008e98: 40 00 01 97 call 20094f4 <_Thread_Set_priority> 2008e9c: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008ea0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2008ea4: 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 ); 2008ea8: c0 26 60 84 clr [ %i1 + 0x84 ] 2008eac: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008eb0: 83 28 60 02 sll %g1, 2, %g1 2008eb4: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008eb8: e0 26 60 0c st %l0, [ %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 ); 2008ebc: 90 10 00 19 mov %i1, %o0 2008ec0: 40 00 02 8a call 20098e8 <_User_extensions_Thread_create> 2008ec4: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008ec8: 80 8a 20 ff btst 0xff, %o0 2008ecc: 02 80 00 06 be 2008ee4 <_Thread_Initialize+0x178> 2008ed0: 01 00 00 00 nop 2008ed4: b0 0e 20 01 and %i0, 1, %i0 2008ed8: 81 c7 e0 08 ret 2008edc: 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; 2008ee0: 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 ); 2008ee4: 40 00 03 99 call 2009d48 <_Workspace_Free> 2008ee8: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 2008eec: 40 00 03 97 call 2009d48 <_Workspace_Free> 2008ef0: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 2008ef4: 40 00 03 95 call 2009d48 <_Workspace_Free> 2008ef8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 2008efc: 40 00 03 93 call 2009d48 <_Workspace_Free> 2008f00: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 2008f04: 40 00 03 91 call 2009d48 <_Workspace_Free> 2008f08: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 2008f0c: 40 00 03 8f call 2009d48 <_Workspace_Free> 2008f10: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 2008f14: 40 00 01 b7 call 20095f0 <_Thread_Stack_Free> 2008f18: 90 10 00 19 mov %i1, %o0 * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 2008f1c: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 2008f20: b0 0e 20 01 and %i0, 1, %i0 2008f24: 81 c7 e0 08 ret 2008f28: 81 e8 00 00 restore =============================================================================== 0200943c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200943c: 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 ) 2009440: 80 a6 20 00 cmp %i0, 0 2009444: 02 80 00 19 be 20094a8 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009448: 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 ) { 200944c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 2009450: 80 a7 20 01 cmp %i4, 1 2009454: 12 80 00 15 bne 20094a8 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009458: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200945c: 7f ff e3 48 call 200217c 2009460: 01 00 00 00 nop 2009464: ba 10 00 08 mov %o0, %i5 2009468: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200946c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009470: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009474: 80 88 80 01 btst %g2, %g1 2009478: 02 80 00 0a be 20094a0 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 200947c: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 2009480: 92 10 00 19 mov %i1, %o1 2009484: 94 10 20 01 mov 1, %o2 2009488: 40 00 0b f8 call 200c468 <_Thread_queue_Extract_priority_helper> 200948c: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2009490: 90 10 00 18 mov %i0, %o0 2009494: 92 10 00 19 mov %i1, %o1 2009498: 7f ff ff 50 call 20091d8 <_Thread_queue_Enqueue_priority> 200949c: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 20094a0: 7f ff e3 3b call 200218c 20094a4: 90 10 00 1d mov %i5, %o0 20094a8: 81 c7 e0 08 ret 20094ac: 81 e8 00 00 restore =============================================================================== 020094b0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 20094b0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 20094b4: 90 10 00 18 mov %i0, %o0 20094b8: 7f ff fe 01 call 2008cbc <_Thread_Get> 20094bc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20094c0: c2 07 bf fc ld [ %fp + -4 ], %g1 20094c4: 80 a0 60 00 cmp %g1, 0 20094c8: 12 80 00 09 bne 20094ec <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 20094cc: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 20094d0: 40 00 0c 1d call 200c544 <_Thread_queue_Process_timeout> 20094d4: 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--; 20094d8: 03 00 80 6d sethi %hi(0x201b400), %g1 20094dc: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201b520 <_Thread_Dispatch_disable_level> 20094e0: 84 00 bf ff add %g2, -1, %g2 20094e4: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 20094e8: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 20094ec: 81 c7 e0 08 ret 20094f0: 81 e8 00 00 restore =============================================================================== 020171e4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20171e4: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20171e8: 27 00 80 e8 sethi %hi(0x203a000), %l3 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20171ec: a8 07 bf e8 add %fp, -24, %l4 20171f0: a4 07 bf ec add %fp, -20, %l2 20171f4: b6 07 bf f4 add %fp, -12, %i3 20171f8: b4 07 bf f8 add %fp, -8, %i2 20171fc: e4 27 bf e8 st %l2, [ %fp + -24 ] head->previous = NULL; 2017200: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2017204: e8 27 bf f0 st %l4, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017208: f4 27 bf f4 st %i2, [ %fp + -12 ] head->previous = NULL; 201720c: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2017210: f6 27 bf fc st %i3, [ %fp + -4 ] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017214: b2 06 20 30 add %i0, 0x30, %i1 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 2017218: b8 06 20 68 add %i0, 0x68, %i4 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201721c: a2 06 20 08 add %i0, 8, %l1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017220: a0 06 20 40 add %i0, 0x40, %l0 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 2017224: e8 26 20 78 st %l4, [ %i0 + 0x78 ] static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2017228: 2b 00 80 e8 sethi %hi(0x203a000), %l5 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 201722c: c2 04 e1 7c ld [ %l3 + 0x17c ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2017230: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017234: 94 10 00 1b mov %i3, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017238: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201723c: 90 10 00 19 mov %i1, %o0 2017240: 40 00 11 91 call 201b884 <_Watchdog_Adjust_to_chain> 2017244: 92 20 40 09 sub %g1, %o1, %o1 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2017248: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 201724c: fa 05 60 fc ld [ %l5 + 0xfc ], %i5 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 2017250: 80 a7 40 0a cmp %i5, %o2 2017254: 08 80 00 06 bleu 201726c <_Timer_server_Body+0x88> 2017258: 92 27 40 0a sub %i5, %o2, %o1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201725c: 90 10 00 1c mov %i4, %o0 2017260: 40 00 11 89 call 201b884 <_Watchdog_Adjust_to_chain> 2017264: 94 10 00 1b mov %i3, %o2 2017268: 30 80 00 06 b,a 2017280 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 201726c: 1a 80 00 05 bcc 2017280 <_Timer_server_Body+0x9c> 2017270: 90 10 00 1c mov %i4, %o0 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 2017274: 92 10 20 01 mov 1, %o1 2017278: 40 00 11 5c call 201b7e8 <_Watchdog_Adjust> 201727c: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2017280: fa 26 20 74 st %i5, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017284: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017288: 40 00 02 bd call 2017d7c <_Chain_Get> 201728c: 01 00 00 00 nop if ( timer == NULL ) { 2017290: 92 92 20 00 orcc %o0, 0, %o1 2017294: 02 80 00 0c be 20172c4 <_Timer_server_Body+0xe0> 2017298: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 201729c: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 20172a0: 80 a0 60 01 cmp %g1, 1 20172a4: 02 80 00 05 be 20172b8 <_Timer_server_Body+0xd4> 20172a8: 90 10 00 19 mov %i1, %o0 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 20172ac: 80 a0 60 03 cmp %g1, 3 20172b0: 12 bf ff f5 bne 2017284 <_Timer_server_Body+0xa0> <== NEVER TAKEN 20172b4: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20172b8: 40 00 11 a5 call 201b94c <_Watchdog_Insert> 20172bc: 92 02 60 10 add %o1, 0x10, %o1 20172c0: 30 bf ff f1 b,a 2017284 <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 20172c4: 7f ff e3 7f call 20100c0 20172c8: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20172cc: c2 07 bf e8 ld [ %fp + -24 ], %g1 20172d0: 80 a0 40 12 cmp %g1, %l2 20172d4: 12 80 00 0a bne 20172fc <_Timer_server_Body+0x118> <== NEVER TAKEN 20172d8: 01 00 00 00 nop ts->insert_chain = NULL; 20172dc: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 20172e0: 7f ff e3 7c call 20100d0 20172e4: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 20172e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20172ec: 80 a0 40 1a cmp %g1, %i2 20172f0: 12 80 00 06 bne 2017308 <_Timer_server_Body+0x124> 20172f4: 01 00 00 00 nop 20172f8: 30 80 00 18 b,a 2017358 <_Timer_server_Body+0x174> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20172fc: 7f ff e3 75 call 20100d0 <== NOT EXECUTED 2017300: 01 00 00 00 nop <== NOT EXECUTED 2017304: 30 bf ff ca b,a 201722c <_Timer_server_Body+0x48> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2017308: 7f ff e3 6e call 20100c0 201730c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017310: fa 07 bf f4 ld [ %fp + -12 ], %i5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2017314: 80 a7 40 1a cmp %i5, %i2 2017318: 02 80 00 0d be 201734c <_Timer_server_Body+0x168> 201731c: 01 00 00 00 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 2017320: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 2017324: f6 20 60 04 st %i3, [ %g1 + 4 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 2017328: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 201732c: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 2017330: 7f ff e3 68 call 20100d0 2017334: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 2017338: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 201733c: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 2017340: 9f c0 40 00 call %g1 2017344: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 2017348: 30 bf ff f0 b,a 2017308 <_Timer_server_Body+0x124> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 201734c: 7f ff e3 61 call 20100d0 2017350: 01 00 00 00 nop 2017354: 30 bf ff b4 b,a 2017224 <_Timer_server_Body+0x40> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017358: c0 2e 20 7c clrb [ %i0 + 0x7c ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 201735c: 7f ff ff 73 call 2017128 <_Thread_Disable_dispatch> 2017360: 01 00 00 00 nop _Thread_Set_state( ts->thread, STATES_DELAYING ); 2017364: d0 06 00 00 ld [ %i0 ], %o0 2017368: 40 00 0f ac call 201b218 <_Thread_Set_state> 201736c: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017370: 7f ff ff 75 call 2017144 <_Timer_server_Reset_interval_system_watchdog> 2017374: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017378: 7f ff ff 87 call 2017194 <_Timer_server_Reset_tod_system_watchdog> 201737c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017380: 40 00 0d 60 call 201a900 <_Thread_Enable_dispatch> 2017384: 01 00 00 00 nop ts->active = true; 2017388: 82 10 20 01 mov 1, %g1 ! 1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201738c: 90 10 00 11 mov %l1, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 2017390: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017394: 40 00 11 c8 call 201bab4 <_Watchdog_Remove> 2017398: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 201739c: 40 00 11 c6 call 201bab4 <_Watchdog_Remove> 20173a0: 90 10 00 10 mov %l0, %o0 20173a4: 30 bf ff a0 b,a 2017224 <_Timer_server_Body+0x40> =============================================================================== 020173a8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 20173a8: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 20173ac: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 20173b0: 80 a0 60 00 cmp %g1, 0 20173b4: 12 80 00 49 bne 20174d8 <_Timer_server_Schedule_operation_method+0x130> 20173b8: ba 10 00 19 mov %i1, %i5 * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 20173bc: 7f ff ff 5b call 2017128 <_Thread_Disable_dispatch> 20173c0: 01 00 00 00 nop if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 20173c4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 20173c8: 80 a0 60 01 cmp %g1, 1 20173cc: 12 80 00 1f bne 2017448 <_Timer_server_Schedule_operation_method+0xa0> 20173d0: 80 a0 60 03 cmp %g1, 3 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 20173d4: 7f ff e3 3b call 20100c0 20173d8: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 20173dc: 03 00 80 e8 sethi %hi(0x203a000), %g1 20173e0: c4 00 61 7c ld [ %g1 + 0x17c ], %g2 ! 203a17c <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20173e4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 20173e8: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 20173ec: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 20173f0: 80 a0 40 03 cmp %g1, %g3 20173f4: 02 80 00 08 be 2017414 <_Timer_server_Schedule_operation_method+0x6c> 20173f8: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 20173fc: de 00 60 10 ld [ %g1 + 0x10 ], %o7 if (delta_interval > delta) { 2017400: 80 a3 c0 04 cmp %o7, %g4 2017404: 08 80 00 03 bleu 2017410 <_Timer_server_Schedule_operation_method+0x68> 2017408: 86 10 20 00 clr %g3 delta_interval -= delta; 201740c: 86 23 c0 04 sub %o7, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2017410: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2017414: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2017418: 7f ff e3 2e call 20100d0 201741c: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017420: 90 06 20 30 add %i0, 0x30, %o0 2017424: 40 00 11 4a call 201b94c <_Watchdog_Insert> 2017428: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 201742c: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017430: 80 a0 60 00 cmp %g1, 0 2017434: 12 80 00 27 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 2017438: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 201743c: 7f ff ff 42 call 2017144 <_Timer_server_Reset_interval_system_watchdog> 2017440: 90 10 00 18 mov %i0, %o0 2017444: 30 80 00 23 b,a 20174d0 <_Timer_server_Schedule_operation_method+0x128> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017448: 12 80 00 22 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 201744c: 01 00 00 00 nop /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017450: 7f ff e3 1c call 20100c0 2017454: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017458: c4 06 20 68 ld [ %i0 + 0x68 ], %g2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 201745c: de 06 20 74 ld [ %i0 + 0x74 ], %o7 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2017460: 03 00 80 e8 sethi %hi(0x203a000), %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2017464: 86 06 20 6c add %i0, 0x6c, %g3 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017468: 80 a0 80 03 cmp %g2, %g3 201746c: 02 80 00 0d be 20174a0 <_Timer_server_Schedule_operation_method+0xf8> 2017470: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2017474: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 if ( snapshot > last_snapshot ) { 2017478: 80 a0 40 0f cmp %g1, %o7 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 201747c: 86 01 00 0f add %g4, %o7, %g3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 2017480: 08 80 00 07 bleu 201749c <_Timer_server_Schedule_operation_method+0xf4> 2017484: 86 20 c0 01 sub %g3, %g1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017488: 9e 20 40 0f sub %g1, %o7, %o7 if (delta_interval > delta) { 201748c: 80 a1 00 0f cmp %g4, %o7 2017490: 08 80 00 03 bleu 201749c <_Timer_server_Schedule_operation_method+0xf4><== NEVER TAKEN 2017494: 86 10 20 00 clr %g3 delta_interval -= delta; 2017498: 86 21 00 0f sub %g4, %o7, %g3 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 201749c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 20174a0: c2 26 20 74 st %g1, [ %i0 + 0x74 ] _ISR_Enable( level ); 20174a4: 7f ff e3 0b call 20100d0 20174a8: 01 00 00 00 nop _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20174ac: 90 06 20 68 add %i0, 0x68, %o0 20174b0: 40 00 11 27 call 201b94c <_Watchdog_Insert> 20174b4: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 20174b8: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 20174bc: 80 a0 60 00 cmp %g1, 0 20174c0: 12 80 00 04 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 20174c4: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 20174c8: 7f ff ff 33 call 2017194 <_Timer_server_Reset_tod_system_watchdog> 20174cc: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 20174d0: 40 00 0d 0c call 201a900 <_Thread_Enable_dispatch> 20174d4: 81 e8 00 00 restore * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 20174d8: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 20174dc: 40 00 02 14 call 2017d2c <_Chain_Append> 20174e0: 81 e8 00 00 restore =============================================================================== 02009768 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009768: 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; 200976c: 03 00 80 6a sethi %hi(0x201a800), %g1 2009770: 82 10 60 2c or %g1, 0x2c, %g1 ! 201a82c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009774: 05 00 80 6d sethi %hi(0x201b400), %g2 initial_extensions = Configuration.User_extension_table; 2009778: 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; 200977c: f6 00 60 38 ld [ %g1 + 0x38 ], %i3 2009780: 82 10 a3 08 or %g2, 0x308, %g1 2009784: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009788: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200978c: 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; 2009790: c6 20 a3 08 st %g3, [ %g2 + 0x308 ] 2009794: 05 00 80 6d sethi %hi(0x201b400), %g2 2009798: 82 10 a1 24 or %g2, 0x124, %g1 ! 201b524 <_User_extensions_Switches_list> 200979c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 20097a0: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20097a4: c6 20 a1 24 st %g3, [ %g2 + 0x124 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 20097a8: 80 a6 a0 00 cmp %i2, 0 20097ac: 02 80 00 1b be 2009818 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 20097b0: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 20097b4: 83 2e e0 02 sll %i3, 2, %g1 20097b8: bb 2e e0 04 sll %i3, 4, %i5 20097bc: ba 27 40 01 sub %i5, %g1, %i5 20097c0: ba 07 40 1b add %i5, %i3, %i5 20097c4: 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 *) 20097c8: 40 00 01 66 call 2009d60 <_Workspace_Allocate_or_fatal_error> 20097cc: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20097d0: 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 *) 20097d4: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20097d8: 92 10 20 00 clr %o1 20097dc: 40 00 13 de call 200e754 20097e0: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20097e4: 10 80 00 0b b 2009810 <_User_extensions_Handler_initialization+0xa8> 20097e8: 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; 20097ec: 90 07 20 14 add %i4, 0x14, %o0 20097f0: 92 06 80 09 add %i2, %o1, %o1 20097f4: 40 00 13 9c call 200e664 20097f8: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 20097fc: 90 10 00 1c mov %i4, %o0 2009800: 40 00 0b 75 call 200c5d4 <_User_extensions_Add_set> 2009804: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 2009808: 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++ ) { 200980c: 80 a7 40 1b cmp %i5, %i3 2009810: 12 bf ff f7 bne 20097ec <_User_extensions_Handler_initialization+0x84> 2009814: 93 2f 60 05 sll %i5, 5, %o1 2009818: 81 c7 e0 08 ret 200981c: 81 e8 00 00 restore =============================================================================== 0200b4d8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b4d8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b4dc: 7f ff de c7 call 2002ff8 200b4e0: 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; 200b4e4: 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 ); 200b4e8: 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 ) ) { 200b4ec: 80 a0 40 1c cmp %g1, %i4 200b4f0: 02 80 00 1f be 200b56c <_Watchdog_Adjust+0x94> 200b4f4: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b4f8: 02 80 00 1a be 200b560 <_Watchdog_Adjust+0x88> 200b4fc: b6 10 20 01 mov 1, %i3 200b500: 80 a6 60 01 cmp %i1, 1 200b504: 12 80 00 1a bne 200b56c <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b508: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b50c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b510: 10 80 00 07 b 200b52c <_Watchdog_Adjust+0x54> 200b514: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b518: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b51c: 80 a6 80 02 cmp %i2, %g2 200b520: 3a 80 00 05 bcc,a 200b534 <_Watchdog_Adjust+0x5c> 200b524: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b528: b4 20 80 1a sub %g2, %i2, %i2 break; 200b52c: 10 80 00 10 b 200b56c <_Watchdog_Adjust+0x94> 200b530: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200b534: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b538: 7f ff de b4 call 2003008 200b53c: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b540: 40 00 00 90 call 200b780 <_Watchdog_Tickle> 200b544: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200b548: 7f ff de ac call 2002ff8 200b54c: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b550: c2 07 40 00 ld [ %i5 ], %g1 200b554: 80 a0 40 1c cmp %g1, %i4 200b558: 02 80 00 05 be 200b56c <_Watchdog_Adjust+0x94> 200b55c: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b560: 80 a6 a0 00 cmp %i2, 0 200b564: 32 bf ff ed bne,a 200b518 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b568: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200b56c: 7f ff de a7 call 2003008 200b570: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009b80 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009b80: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009b84: 7f ff e1 7e call 200217c 2009b88: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 2009b8c: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009b90: 80 a6 20 01 cmp %i0, 1 2009b94: 22 80 00 1d be,a 2009c08 <_Watchdog_Remove+0x88> 2009b98: c0 27 60 08 clr [ %i5 + 8 ] 2009b9c: 0a 80 00 1c bcs 2009c0c <_Watchdog_Remove+0x8c> 2009ba0: 03 00 80 6d sethi %hi(0x201b400), %g1 2009ba4: 80 a6 20 03 cmp %i0, 3 2009ba8: 18 80 00 19 bgu 2009c0c <_Watchdog_Remove+0x8c> <== NEVER TAKEN 2009bac: 01 00 00 00 nop 2009bb0: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009bb4: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009bb8: c4 00 40 00 ld [ %g1 ], %g2 2009bbc: 80 a0 a0 00 cmp %g2, 0 2009bc0: 02 80 00 07 be 2009bdc <_Watchdog_Remove+0x5c> 2009bc4: 05 00 80 6d sethi %hi(0x201b400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009bc8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009bcc: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2009bd0: 84 00 c0 02 add %g3, %g2, %g2 2009bd4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2009bd8: 05 00 80 6d sethi %hi(0x201b400), %g2 2009bdc: c4 00 a2 28 ld [ %g2 + 0x228 ], %g2 ! 201b628 <_Watchdog_Sync_count> 2009be0: 80 a0 a0 00 cmp %g2, 0 2009be4: 22 80 00 07 be,a 2009c00 <_Watchdog_Remove+0x80> 2009be8: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009bec: 05 00 80 6d sethi %hi(0x201b400), %g2 2009bf0: c6 00 a3 58 ld [ %g2 + 0x358 ], %g3 ! 201b758 <_Per_CPU_Information+0x8> 2009bf4: 05 00 80 6d sethi %hi(0x201b400), %g2 2009bf8: c6 20 a1 c8 st %g3, [ %g2 + 0x1c8 ] ! 201b5c8 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009bfc: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 2009c00: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 2009c04: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009c08: 03 00 80 6d sethi %hi(0x201b400), %g1 2009c0c: c2 00 62 2c ld [ %g1 + 0x22c ], %g1 ! 201b62c <_Watchdog_Ticks_since_boot> 2009c10: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 2009c14: 7f ff e1 5e call 200218c 2009c18: 01 00 00 00 nop return( previous_state ); } 2009c1c: 81 c7 e0 08 ret 2009c20: 81 e8 00 00 restore =============================================================================== 0200acd0 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200acd0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200acd4: 7f ff df 99 call 2002b38 200acd8: ba 10 00 18 mov %i0, %i5 200acdc: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200ace0: 11 00 80 6d sethi %hi(0x201b400), %o0 200ace4: 94 10 00 19 mov %i1, %o2 200ace8: 90 12 21 70 or %o0, 0x170, %o0 200acec: 7f ff e6 49 call 2004610 200acf0: 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; 200acf4: 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 ); 200acf8: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200acfc: 80 a7 00 19 cmp %i4, %i1 200ad00: 12 80 00 04 bne 200ad10 <_Watchdog_Report_chain+0x40> 200ad04: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200ad08: 10 80 00 0d b 200ad3c <_Watchdog_Report_chain+0x6c> 200ad0c: 11 00 80 6d sethi %hi(0x201b400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200ad10: 40 00 00 0f call 200ad4c <_Watchdog_Report> 200ad14: 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 ) 200ad18: 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 ) ; 200ad1c: 80 a7 00 19 cmp %i4, %i1 200ad20: 12 bf ff fc bne 200ad10 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200ad24: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200ad28: 11 00 80 6d sethi %hi(0x201b400), %o0 200ad2c: 92 10 00 1d mov %i5, %o1 200ad30: 7f ff e6 38 call 2004610 200ad34: 90 12 21 88 or %o0, 0x188, %o0 200ad38: 30 80 00 03 b,a 200ad44 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200ad3c: 7f ff e6 35 call 2004610 200ad40: 90 12 21 98 or %o0, 0x198, %o0 } _ISR_Enable( level ); 200ad44: 7f ff df 81 call 2002b48 200ad48: 81 e8 00 00 restore =============================================================================== 020182c0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 20182c0: 81 c3 e0 08 retl <== NOT EXECUTED 20182c4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02012ca8 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012ca8: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012cac: 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; 2012cb0: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2012cb4: 10 80 00 18 b 2012d14 <_fat_block_read+0x6c> 2012cb8: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012cbc: 92 10 00 19 mov %i1, %o1 2012cc0: 94 10 20 01 mov 1, %o2 2012cc4: 7f ff ff 20 call 2012944 2012cc8: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012ccc: 80 a2 20 00 cmp %o0, 0 2012cd0: 12 80 00 16 bne 2012d28 <_fat_block_read+0x80> <== NEVER TAKEN 2012cd4: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012cd8: e0 17 40 00 lduh [ %i5 ], %l0 2012cdc: a0 24 00 1a sub %l0, %i2, %l0 2012ce0: 80 a4 00 1b cmp %l0, %i3 2012ce4: 38 80 00 02 bgu,a 2012cec <_fat_block_read+0x44> 2012ce8: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2012cec: c2 07 bf fc ld [ %fp + -4 ], %g1 2012cf0: 90 07 00 18 add %i4, %i0, %o0 2012cf4: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012cf8: 94 10 00 10 mov %l0, %o2 2012cfc: 92 02 40 1a add %o1, %i2, %o1 2012d00: 40 00 24 8f call 201bf3c 2012d04: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012d08: b0 04 00 18 add %l0, %i0, %i0 blk++; 2012d0c: b2 06 60 01 inc %i1 ofs = 0; 2012d10: 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) 2012d14: 80 a6 e0 00 cmp %i3, 0 2012d18: 12 bf ff e9 bne 2012cbc <_fat_block_read+0x14> 2012d1c: 90 10 00 1d mov %i5, %o0 2012d20: 81 c7 e0 08 ret 2012d24: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2012d28: 81 c7 e0 08 ret <== NOT EXECUTED 2012d2c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02012dc8 <_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); 2012dc8: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 2012dcc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2012dd0: 7f ff ff 5c call 2012b40 <== NOT EXECUTED 2012dd4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02012d30 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012d30: 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; 2012d34: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012d38: 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; 2012d3c: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2012d40: 10 80 00 1b b 2012dac <_fat_block_write+0x7c> 2012d44: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012d48: a0 20 40 1a sub %g1, %i2, %l0 2012d4c: 80 a4 00 1b cmp %l0, %i3 2012d50: 38 80 00 02 bgu,a 2012d58 <_fat_block_write+0x28> 2012d54: 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); 2012d58: 90 10 00 1d mov %i5, %o0 2012d5c: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2012d60: 80 a4 00 01 cmp %l0, %g1 2012d64: 02 80 00 03 be 2012d70 <_fat_block_write+0x40> 2012d68: 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); 2012d6c: 94 10 20 01 mov 1, %o2 2012d70: 7f ff fe f5 call 2012944 2012d74: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012d78: 80 a2 20 00 cmp %o0, 0 2012d7c: 12 80 00 11 bne 2012dc0 <_fat_block_write+0x90> <== NEVER TAKEN 2012d80: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2012d84: 92 07 00 18 add %i4, %i0, %o1 2012d88: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012d8c: 94 10 00 10 mov %l0, %o2 2012d90: 90 02 00 1a add %o0, %i2, %o0 2012d94: 40 00 24 6a call 201bf3c 2012d98: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2012d9c: b0 04 00 18 add %l0, %i0, %i0 2012da0: e2 2f 60 84 stb %l1, [ %i5 + 0x84 ] blk++; 2012da4: b2 06 60 01 inc %i1 ofs = 0; 2012da8: 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) 2012dac: 80 a6 e0 00 cmp %i3, 0 2012db0: 32 bf ff e6 bne,a 2012d48 <_fat_block_write+0x18> 2012db4: c2 17 40 00 lduh [ %i5 ], %g1 2012db8: 81 c7 e0 08 ret 2012dbc: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2012dc0: 81 c7 e0 08 ret <== NOT EXECUTED 2012dc4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02002ef4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 2002ef4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002ef8: 7f ff ff e1 call 2002e7c <== NOT EXECUTED 2002efc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02011cc8 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2011cc8: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2011ccc: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2011cd0: 87 28 a0 02 sll %g2, 2, %g3 2011cd4: 83 28 a0 04 sll %g2, 4, %g1 2011cd8: 82 20 40 03 sub %g1, %g3, %g1 2011cdc: 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; 2011ce0: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011ce4: 10 80 00 11 b 2011d28 <_hash_search+0x60> 2011ce8: 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); 2011cec: 7f ff ff e5 call 2011c80 2011cf0: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2011cf4: 80 a6 80 08 cmp %i2, %o0 2011cf8: 32 80 00 0c bne,a 2011d28 <_hash_search+0x60> 2011cfc: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2011d00: 80 a6 e0 00 cmp %i3, 0 2011d04: 22 80 00 07 be,a 2011d20 <_hash_search+0x58> <== ALWAYS TAKEN 2011d08: fa 27 00 00 st %i5, [ %i4 ] 2011d0c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2011d10: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2011d14: 32 80 00 05 bne,a 2011d28 <_hash_search+0x60> <== NOT EXECUTED 2011d18: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2011d1c: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2011d20: 81 c7 e0 08 ret 2011d24: 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) ; ) 2011d28: 80 a7 40 19 cmp %i5, %i1 2011d2c: 12 bf ff f0 bne 2011cec <_hash_search+0x24> 2011d30: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2011d34: 81 c7 e0 08 ret 2011d38: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0201e654 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 201e654: 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 ); 201e658: 7f ff 9a 37 call 2004f34 201e65c: 90 10 00 19 mov %i1, %o0 201e660: b8 10 00 08 mov %o0, %i4 if ( old_parent_pathlen == 0 ) 201e664: 80 a7 20 00 cmp %i4, 0 201e668: 12 80 00 08 bne 201e688 <_rename_r+0x34> 201e66c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 201e670: 92 07 bf f8 add %fp, -8, %o1 201e674: 94 07 bf d0 add %fp, -48, %o2 201e678: 7f ff a0 1f call 20066f4 201e67c: ba 10 20 00 clr %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201e680: 10 80 00 0c b 201e6b0 <_rename_r+0x5c> 201e684: 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, 201e688: 92 10 00 1c mov %i4, %o1 201e68c: 94 10 20 02 mov 2, %o2 201e690: 96 07 bf d0 add %fp, -48, %o3 201e694: 98 10 20 00 clr %o4 201e698: 7f ff 9a 18 call 2004ef8 201e69c: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 201e6a0: 80 a2 20 00 cmp %o0, 0 201e6a4: 12 80 00 1e bne 201e71c <_rename_r+0xc8> <== NEVER TAKEN 201e6a8: 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; 201e6ac: 94 10 20 14 mov 0x14, %o2 201e6b0: 92 07 bf d0 add %fp, -48, %o1 201e6b4: 7f ff ca 4b call 2010fe0 201e6b8: 90 07 bf bc add %fp, -68, %o0 name = old + old_parent_pathlen; 201e6bc: b2 06 40 1c add %i1, %i4, %i1 201e6c0: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 201e6c4: 7f ff cd 3a call 2011bac 201e6c8: 90 10 00 19 mov %i1, %o0 201e6cc: 92 10 00 08 mov %o0, %o1 201e6d0: 7f ff 9a 28 call 2004f70 201e6d4: 90 10 00 19 mov %i1, %o0 201e6d8: b2 06 40 08 add %i1, %o0, %i1 201e6dc: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 201e6e0: 7f ff cd 33 call 2011bac 201e6e4: 90 10 00 19 mov %i1, %o0 201e6e8: 94 10 20 00 clr %o2 201e6ec: 92 10 00 08 mov %o0, %o1 201e6f0: 96 07 bf bc add %fp, -68, %o3 201e6f4: 90 10 00 19 mov %i1, %o0 201e6f8: 7f ff 99 e4 call 2004e88 201e6fc: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 201e700: 80 a2 20 00 cmp %o0, 0 201e704: 02 80 00 08 be 201e724 <_rename_r+0xd0> 201e708: 80 8f 60 ff btst 0xff, %i5 if ( free_old_parentloc ) 201e70c: 02 80 00 04 be 201e71c <_rename_r+0xc8> 201e710: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 201e714: 7f ff 9a 6b call 20050c0 201e718: 90 07 bf d0 add %fp, -48, %o0 201e71c: 81 c7 e0 08 ret 201e720: 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 ); 201e724: 90 10 00 1a mov %i2, %o0 201e728: 92 07 bf f8 add %fp, -8, %o1 201e72c: 7f ff 9f f2 call 20066f4 201e730: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 201e734: c2 07 bf f0 ld [ %fp + -16 ], %g1 201e738: d0 07 bf f8 ld [ %fp + -8 ], %o0 201e73c: c2 00 60 04 ld [ %g1 + 4 ], %g1 201e740: 90 06 80 08 add %i2, %o0, %o0 201e744: 92 07 bf e4 add %fp, -28, %o1 201e748: 9f c0 40 00 call %g1 201e74c: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 201e750: 80 a2 20 00 cmp %o0, 0 201e754: 02 80 00 0d be 201e788 <_rename_r+0x134> 201e758: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e75c: 7f ff 9a 59 call 20050c0 201e760: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e764: 80 8f 60 ff btst 0xff, %i5 201e768: 02 80 00 04 be 201e778 <_rename_r+0x124> 201e76c: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e770: 7f ff 9a 54 call 20050c0 201e774: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e778: 7f ff 9a 52 call 20050c0 201e77c: 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 ); 201e780: 81 c7 e0 08 ret 201e784: 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 ) { 201e788: c4 07 bf e0 ld [ %fp + -32 ], %g2 201e78c: 80 a0 80 01 cmp %g2, %g1 201e790: 02 80 00 11 be 201e7d4 <_rename_r+0x180> 201e794: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e798: 7f ff 9a 4a call 20050c0 201e79c: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e7a0: 80 8f 60 ff btst 0xff, %i5 201e7a4: 02 80 00 04 be 201e7b4 <_rename_r+0x160> 201e7a8: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e7ac: 7f ff 9a 45 call 20050c0 201e7b0: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e7b4: 7f ff 9a 43 call 20050c0 201e7b8: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201e7bc: 7f ff c7 ad call 2010670 <__errno> 201e7c0: 01 00 00 00 nop 201e7c4: 82 10 20 12 mov 0x12, %g1 ! 12 201e7c8: c2 22 00 00 st %g1, [ %o0 ] 201e7cc: 81 c7 e0 08 ret 201e7d0: 91 e8 3f ff restore %g0, -1, %o0 } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 201e7d4: d6 07 bf fc ld [ %fp + -4 ], %o3 201e7d8: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 201e7dc: 92 07 bf bc add %fp, -68, %o1 201e7e0: 94 07 bf e4 add %fp, -28, %o2 201e7e4: 9f c0 40 00 call %g1 201e7e8: 90 07 bf d0 add %fp, -48, %o0 201e7ec: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 201e7f0: 7f ff 9a 34 call 20050c0 201e7f4: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e7f8: 80 8f 60 ff btst 0xff, %i5 201e7fc: 02 80 00 04 be 201e80c <_rename_r+0x1b8> 201e800: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e804: 7f ff 9a 2f call 20050c0 201e808: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e80c: 7f ff 9a 2d call 20050c0 201e810: 90 07 bf bc add %fp, -68, %o0 return result; } 201e814: 81 c7 e0 08 ret 201e818: 81 e8 00 00 restore =============================================================================== 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 83 sethi %hi(0x2020c00), %i4 2004d30: fa 07 23 dc ld [ %i4 + 0x3dc ], %i5 ! 2020fdc 2004d34: 03 00 80 86 sethi %hi(0x2021800), %g1 2004d38: 82 10 61 1c or %g1, 0x11c, %g1 ! 202191c 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 dc ld [ %i4 + 0x3dc ], %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 2e 44 call 2010670 <__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 7c sethi %hi(0x201f000), %o0 2004d90: 92 10 20 01 mov 1, %o1 2004d94: 90 12 22 98 or %o0, 0x298, %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 83 sethi %hi(0x2020c00), %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 2e 2f call 2010670 <__errno> 2004db8: b0 10 3f ff mov -1, %i0 2004dbc: 40 00 2e 2d call 2010670 <__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 dc ld [ %i5 + 0x3dc ], %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 dc ld [ %i5 + 0x3dc ], %o0 2004de8: 92 07 bf ec add %fp, -20, %o1 2004dec: 94 10 20 14 mov 0x14, %o2 2004df0: 40 00 30 7c call 2010fe0 2004df4: 90 02 20 18 add %o0, 0x18, %o0 return 0; } 2004df8: 81 c7 e0 08 ret 2004dfc: 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 61 sethi %hi(0x2018400), %g1 2002880: e2 00 62 b4 ld [ %g1 + 0x2b4 ], %l1 ! 20186b4 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 61 sethi %hi(0x2018400), %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 62 b8 ld [ %g1 + 0x2b8 ], %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 3e 6a call 2012278 <== NOT EXECUTED 20028d4: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 20028d8: 03 00 80 61 sethi %hi(0x2018400), %g1 <== NOT EXECUTED 20028dc: e0 20 62 b8 st %l0, [ %g1 + 0x2b8 ] ! 20186b8 <== NOT EXECUTED disktab_size = new_size; 20028e0: 03 00 80 61 sethi %hi(0x2018400), %g1 <== NOT EXECUTED 20028e4: f8 20 62 b4 st %i4, [ %g1 + 0x2b4 ] ! 20186b4 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20028e8: 03 00 80 61 sethi %hi(0x2018400), %g1 20028ec: e4 00 62 b8 ld [ %g1 + 0x2b8 ], %l2 ! 20186b8 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 3e 48 call 2012278 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 3f 0f call 20125f0 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 =============================================================================== 02009fa8 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 2009fa8: 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 ) ) 2009fac: 80 8e bf f8 btst -8, %i2 2009fb0: 22 80 00 06 be,a 2009fc8 <== ALWAYS TAKEN 2009fb4: fa 06 c0 00 ld [ %i3 ], %i5 rtems_set_errno_and_return_minus_one( EPERM ); 2009fb8: 40 00 07 d5 call 200bf0c <__errno> <== NOT EXECUTED 2009fbc: 01 00 00 00 nop <== NOT EXECUTED 2009fc0: 10 80 00 09 b 2009fe4 <== NOT EXECUTED 2009fc4: 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) 2009fc8: b8 10 20 00 clr %i4 2009fcc: 80 a7 60 00 cmp %i5, 0 2009fd0: 12 80 00 24 bne 200a060 2009fd4: 21 00 80 5c sethi %hi(0x2017000), %l0 rtems_set_errno_and_return_minus_one( EFAULT ); 2009fd8: 40 00 07 cd call 200bf0c <__errno> 2009fdc: 01 00 00 00 nop 2009fe0: 82 10 20 0e mov 0xe, %g1 ! e 2009fe4: c2 22 00 00 st %g1, [ %o0 ] 2009fe8: 81 c7 e0 08 ret 2009fec: 91 e8 3f ff restore %g0, -1, %o0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 2009ff0: 80 a6 a0 00 cmp %i2, 0 2009ff4: 02 80 00 19 be 200a058 2009ff8: 90 10 00 18 mov %i0, %o0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 2009ffc: 92 10 00 1a mov %i2, %o1 200a000: 40 00 0d 25 call 200d494 200a004: 94 10 00 19 mov %i1, %o2 200a008: 80 a2 20 00 cmp %o0, 0 200a00c: 32 80 00 14 bne,a 200a05c 200a010: b8 07 20 01 inc %i4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200a014: c2 4e 80 19 ldsb [ %i2 + %i1 ], %g1 200a018: 80 a0 60 00 cmp %g1, 0 200a01c: 32 80 00 10 bne,a 200a05c 200a020: 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; 200a024: 03 00 80 5d sethi %hi(0x2017400), %g1 200a028: 82 10 60 44 or %g1, 0x44, %g1 ! 2017444 200a02c: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 200a030: 03 00 80 5d sethi %hi(0x2017400), %g1 200a034: 82 10 60 7c or %g1, 0x7c, %g1 ! 201747c 200a038: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a03c: 03 00 80 5d sethi %hi(0x2017400), %g1 200a040: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20174e4 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 200a044: fa 26 c0 00 st %i5, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a048: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200a04c: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] return 0; 200a050: 81 c7 e0 08 ret 200a054: 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++) { 200a058: b8 07 20 01 inc %i4 200a05c: ba 07 60 14 add %i5, 0x14, %i5 200a060: c2 04 23 7c ld [ %l0 + 0x37c ], %g1 200a064: 80 a7 00 01 cmp %i4, %g1 200a068: 2a bf ff e2 bcs,a 2009ff0 200a06c: 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 ); 200a070: 40 00 07 a7 call 200bf0c <__errno> 200a074: b0 10 3f ff mov -1, %i0 200a078: 82 10 20 02 mov 2, %g1 200a07c: c2 22 00 00 st %g1, [ %o0 ] } 200a080: 81 c7 e0 08 ret 200a084: 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 24 76 call 200bf0c <__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 5c sethi %hi(0x2017000), %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 24 6a call 200bf0c <__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 29 67 call 200d31c 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 24 5e call 200bf0c <__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 a3 7c ld [ %l2 + 0x37c ], %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 24 4f call 200bf0c <__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 29 72 call 200d3d0 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 61 sethi %hi(0x2018400), %g1 2002810: d0 00 62 b0 ld [ %g1 + 0x2b0 ], %o0 ! 20186b0 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 61 sethi %hi(0x2018400), %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 ac stb %g2, [ %g1 + 0x2ac ] 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 61 sethi %hi(0x2018400), %g1 200284c: c0 28 62 ac clrb [ %g1 + 0x2ac ] ! 20186ac sc = rtems_semaphore_release(diskdevs_mutex); 2002850: 03 00 80 61 sethi %hi(0x2018400), %g1 2002854: 40 00 12 9e call 20072cc 2002858: d0 00 62 b0 ld [ %g1 + 0x2b0 ], %o0 ! 20186b0 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 e7 call 2007804 <== 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 8a call 2006ba8 <== 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 6a sethi %hi(0x201a800), %g1 2004ac8: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 201abbc <__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 59 sethi %hi(0x2016400), %g1 20039f0: d0 00 62 10 ld [ %g1 + 0x210 ], %o0 ! 2016610 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 2b 84 call 200e814 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 59 sethi %hi(0x2016400), %g1 200385c: d0 00 61 30 ld [ %g1 + 0x130 ], %o0 ! 2016530 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 2b e9 call 200e814 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 65 sethi %hi(0x2019400), %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 65 sethi %hi(0x2019400), %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 e3 bc ld [ %i3 + 0x3bc ], %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 e3 bc ld [ %i3 + 0x3bc ], %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 e3 bc ld [ %i3 + 0x3bc ], %g1 2004c8c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004c90: 02 80 00 0d be 2004cc4 <== NOT EXECUTED 2004c94: c2 06 e3 bc ld [ %i3 + 0x3bc ], %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 e3 bc ld [ %i3 + 0x3bc ], %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 e3 bc ld [ %i3 + 0x3bc ], %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 65 sethi %hi(0x2019400), %i0 2004d24: 37 00 80 6a sethi %hi(0x201a800), %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 a2 28 or %i2, 0x228, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d2c: b0 16 22 20 or %i0, 0x220, %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 =============================================================================== 02012944 : #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) { 2012944: 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) 2012948: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 201294c: 80 a0 60 00 cmp %g1, 0 2012950: 32 80 00 15 bne,a 20129a4 2012954: 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); 2012958: 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) 201295c: 80 a6 a0 01 cmp %i2, 1 2012960: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012964: 12 80 00 06 bne 201297c 2012968: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 201296c: 7f ff f9 ae call 2011024 2012970: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012974: 10 80 00 05 b 2012988 2012978: 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); 201297c: 7f ff f9 75 call 2010f50 2012980: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012984: 80 a2 20 00 cmp %o0, 0 2012988: 12 80 00 62 bne 2012b10 <== NEVER TAKEN 201298c: 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; 2012990: 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; 2012994: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; 2012998: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 201299c: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 20129a0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 20129a4: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 20129a8: 80 a0 40 02 cmp %g1, %g2 20129ac: 0a 80 00 05 bcs 20129c0 <== NEVER TAKEN 20129b0: b8 10 20 00 clr %i4 20129b4: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 20129b8: 80 a0 40 02 cmp %g1, %g2 20129bc: 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) 20129c0: 80 a0 40 19 cmp %g1, %i1 20129c4: 22 80 00 5c be,a 2012b34 20129c8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 20129cc: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 20129d0: 80 a0 60 00 cmp %g1, 0 20129d4: 02 80 00 3c be 2012ac4 20129d8: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 20129dc: 02 80 00 0b be 2012a08 <== ALWAYS TAKEN 20129e0: 01 00 00 00 nop 20129e4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20129e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20129ec: 12 80 00 07 bne 2012a08 <== NOT EXECUTED 20129f0: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 20129f4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 20129f8: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 20129fc: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2012a00: 40 00 25 4f call 201bf3c <== NOT EXECUTED 2012a04: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012a08: 7f ff fa 5d call 201137c 2012a0c: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2012a10: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2012a14: 80 a2 20 00 cmp %o0, 0 2012a18: 12 80 00 3e bne 2012b10 <== NEVER TAKEN 2012a1c: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2012a20: 80 8f 20 ff btst 0xff, %i4 2012a24: 02 80 00 2e be 2012adc <== ALWAYS TAKEN 2012a28: 94 10 00 19 mov %i1, %o2 2012a2c: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012a30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012a34: 02 80 00 1d be 2012aa8 <== NOT EXECUTED 2012a38: 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) 2012a3c: 10 80 00 29 b 2012ae0 <== NOT EXECUTED 2012a40: 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, 2012a44: 40 00 55 1b call 2027eb0 <.umul> <== NOT EXECUTED 2012a48: 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, 2012a4c: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 2012a50: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2012a54: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 2012a58: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2012a5c: 7f ff f9 3d call 2010f50 <== NOT EXECUTED 2012a60: 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) 2012a64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a68: 12 80 00 0c bne 2012a98 <== NOT EXECUTED 2012a6c: 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); 2012a70: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2012a74: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2012a78: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2012a7c: 40 00 25 30 call 201bf3c <== NOT EXECUTED 2012a80: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2012a84: 7f ff fa 3e call 201137c <== NOT EXECUTED 2012a88: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2012a8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a90: 22 80 00 06 be,a 2012aa8 <== NOT EXECUTED 2012a94: a0 04 20 01 inc %l0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2012a98: 40 00 22 5a call 201b400 <__errno> <== NOT EXECUTED 2012a9c: 01 00 00 00 nop <== NOT EXECUTED 2012aa0: 10 80 00 1f b 2012b1c <== NOT EXECUTED 2012aa4: 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++) 2012aa8: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2012aac: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2012ab0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2012ab4: 2a bf ff e4 bcs,a 2012a44 <== NOT EXECUTED 2012ab8: 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); 2012abc: 10 80 00 08 b 2012adc <== NOT EXECUTED 2012ac0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012ac4: 7f ff f9 f2 call 201128c 2012ac8: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2012acc: 80 a2 20 00 cmp %o0, 0 2012ad0: 12 80 00 10 bne 2012b10 <== NEVER TAKEN 2012ad4: 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); 2012ad8: 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) 2012adc: 80 a6 a0 01 cmp %i2, 1 2012ae0: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012ae4: 12 80 00 06 bne 2012afc 2012ae8: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012aec: 7f ff f9 4e call 2011024 2012af0: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012af4: 10 80 00 05 b 2012b08 2012af8: 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); 2012afc: 7f ff f9 15 call 2010f50 2012b00: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012b04: 80 a2 20 00 cmp %o0, 0 2012b08: 02 80 00 08 be 2012b28 <== ALWAYS TAKEN 2012b0c: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012b10: 40 00 22 3c call 201b400 <__errno> <== NOT EXECUTED 2012b14: 01 00 00 00 nop <== NOT EXECUTED 2012b18: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012b1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012b20: 81 c7 e0 08 ret <== NOT EXECUTED 2012b24: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2012b28: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012b2c: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2012b30: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2012b34: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2012b38: 81 c7 e0 08 ret 2012b3c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012b40 : int fat_buf_release(fat_fs_info_t *fs_info) { 2012b40: 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) 2012b44: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012b48: 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) 2012b4c: 80 a0 60 00 cmp %g1, 0 2012b50: 02 80 00 54 be 2012ca0 2012b54: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012b58: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1 2012b5c: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2 2012b60: 80 a0 40 02 cmp %g1, %g2 2012b64: 0a 80 00 05 bcs 2012b78 <== NEVER TAKEN 2012b68: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2012b6c: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 2012b70: 80 a0 40 02 cmp %g1, %g2 2012b74: 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) 2012b78: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1 2012b7c: 80 a0 60 00 cmp %g1, 0 2012b80: 02 80 00 3b be 2012c6c 2012b84: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012b88: 02 80 00 0b be 2012bb4 2012b8c: 01 00 00 00 nop 2012b90: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012b94: 80 a0 60 00 cmp %g1, 0 2012b98: 12 80 00 07 bne 2012bb4 <== NEVER TAKEN 2012b9c: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2012ba0: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1 2012ba4: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0 2012ba8: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012bac: 40 00 24 e4 call 201bf3c 2012bb0: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012bb4: 7f ff f9 f2 call 201137c 2012bb8: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012bbc: 80 a2 20 00 cmp %o0, 0 2012bc0: 12 80 00 30 bne 2012c80 <== NEVER TAKEN 2012bc4: 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) 2012bc8: 80 8f 20 ff btst 0xff, %i4 2012bcc: 02 80 00 33 be 2012c98 2012bd0: c0 2e e0 84 clrb [ %i3 + 0x84 ] 2012bd4: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012bd8: 80 a0 60 00 cmp %g1, 0 2012bdc: 02 80 00 1d be 2012c50 <== ALWAYS TAKEN 2012be0: 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; 2012be4: 10 80 00 2e b 2012c9c <== NOT EXECUTED 2012be8: 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, 2012bec: 40 00 54 b1 call 2027eb0 <.umul> 2012bf0: 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, 2012bf4: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2 2012bf8: 92 10 00 1d mov %i5, %o1 2012bfc: 94 02 00 0a add %o0, %o2, %o2 2012c00: 96 07 bf fc add %fp, -4, %o3 2012c04: 7f ff f8 d3 call 2010f50 2012c08: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012c0c: 80 a2 20 00 cmp %o0, 0 2012c10: 12 80 00 0c bne 2012c40 <== NEVER TAKEN 2012c14: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012c18: c2 07 bf fc ld [ %fp + -4 ], %g1 2012c1c: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1 2012c20: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012c24: 40 00 24 c6 call 201bf3c 2012c28: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(b); 2012c2c: 7f ff f9 d4 call 201137c 2012c30: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012c34: 80 a2 20 00 cmp %o0, 0 2012c38: 22 80 00 06 be,a 2012c50 <== ALWAYS TAKEN 2012c3c: b4 06 a0 01 inc %i2 rtems_set_errno_and_return_minus_one(ENOMEM); 2012c40: 40 00 21 f0 call 201b400 <__errno> <== NOT EXECUTED 2012c44: 01 00 00 00 nop <== NOT EXECUTED 2012c48: 10 80 00 11 b 2012c8c <== NOT EXECUTED 2012c4c: 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++) 2012c50: c2 0e e0 09 ldub [ %i3 + 9 ], %g1 2012c54: 90 0e a0 ff and %i2, 0xff, %o0 2012c58: 80 a2 00 01 cmp %o0, %g1 2012c5c: 2a bf ff e4 bcs,a 2012bec 2012c60: 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; 2012c64: 10 80 00 0e b 2012c9c 2012c68: c0 2e e0 85 clrb [ %i3 + 0x85 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012c6c: 7f ff f9 88 call 201128c 2012c70: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012c74: 80 a2 20 00 cmp %o0, 0 2012c78: 22 80 00 09 be,a 2012c9c <== ALWAYS TAKEN 2012c7c: c0 2e e0 85 clrb [ %i3 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); 2012c80: 40 00 21 e0 call 201b400 <__errno> <== NOT EXECUTED 2012c84: 01 00 00 00 nop <== NOT EXECUTED 2012c88: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012c8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012c90: 81 c7 e0 08 ret <== NOT EXECUTED 2012c94: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012c98: c0 2e e0 85 clrb [ %i3 + 0x85 ] return RC_OK; 2012c9c: b0 10 20 00 clr %i0 } 2012ca0: 81 c7 e0 08 ret 2012ca4: 81 e8 00 00 restore =============================================================================== 02011c48 : 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)) ) 2011c48: 80 a2 60 00 cmp %o1, 0 2011c4c: 32 80 00 08 bne,a 2011c6c 2011c50: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011c54: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2011c58: 80 88 60 03 btst 3, %g1 2011c5c: 22 80 00 04 be,a 2011c6c <== NEVER TAKEN 2011c60: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011c64: 81 c3 e0 08 retl 2011c68: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011c6c: 92 02 7f fe add %o1, -2, %o1 2011c70: 93 2a 40 01 sll %o1, %g1, %o1 2011c74: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2011c78: 81 c3 e0 08 retl 2011c7c: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02012dd8 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012dd8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2012ddc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 2012de0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012de4: 7f ff fe ca call 201290c <== NOT EXECUTED 2012de8: 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); 2012dec: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED 2012df0: 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 ) { 2012df4: 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, 2012df8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED 2012dfc: b7 2e c0 01 sll %i3, %g1, %i3 <== NOT EXECUTED 2012e00: 7f ff ff aa call 2012ca8 <_fat_block_read> <== NOT EXECUTED 2012e04: 95 e8 20 00 restore %g0, 0, %o2 <== NOT EXECUTED =============================================================================== 02013004 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2013004: 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; 2013008: 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); 201300c: 7f ff fe 34 call 20128dc <== NOT EXECUTED 2013010: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2013014: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2013018: 7f ff fe 31 call 20128dc <== NOT EXECUTED 201301c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2013020: 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); 2013024: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2013028: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 201302c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013030: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2013034: 7f ff ff 3f call 2012d30 <_fat_block_write> <== NOT EXECUTED 2013038: 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, 201303c: 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, 2013040: 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, 2013044: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2013048: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201304c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013050: 7f ff ff 38 call 2012d30 <_fat_block_write> <== NOT EXECUTED 2013054: 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) ) 2013058: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201305c: 06 80 00 04 bl 201306c <== NOT EXECUTED 2013060: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013064: 16 80 00 03 bge 2013070 <== NOT EXECUTED 2013068: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 201306c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2013070: 81 c7 e0 08 ret <== NOT EXECUTED 2013074: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012168 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012168: 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) 201216c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2012170: 80 a0 60 01 cmp %g1, 1 2012174: 08 80 00 06 bleu 201218c 2012178: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 { fat_fd->links_num--; 201217c: 82 00 7f ff add %g1, -1, %g1 return rc; 2012180: 90 10 20 00 clr %o0 2012184: 10 80 00 25 b 2012218 2012188: 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) 201218c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2012190: 80 88 60 01 btst 1, %g1 2012194: 02 80 00 14 be 20121e4 <== ALWAYS TAKEN 2012198: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 201219c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20121a0: 7f ff ff ae call 2012058 <== NOT EXECUTED 20121a4: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20121a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20121ac: 12 80 00 1b bne 2012218 <== NOT EXECUTED 20121b0: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20121b4: 7f ff e2 49 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 20121b8: 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) ) 20121bc: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20121c0: 40 00 03 8c call 2012ff0 <== NOT EXECUTED 20121c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20121c8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 20121cc: 02 80 00 0f be 2012208 <== NOT EXECUTED 20121d0: 01 00 00 00 nop <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 20121d4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20121d8: 40 00 03 7a call 2012fc0 <== NOT EXECUTED 20121dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20121e0: 30 80 00 0a b,a 2012208 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20121e4: 40 00 03 83 call 2012ff0 20121e8: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20121ec: 80 8a 20 ff btst 0xff, %o0 20121f0: 02 80 00 04 be 2012200 <== ALWAYS TAKEN 20121f4: 01 00 00 00 nop { fat_fd->links_num = 0; 20121f8: 10 80 00 06 b 2012210 <== NOT EXECUTED 20121fc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 2012200: 7f ff e2 36 call 200aad8 <_Chain_Extract> 2012204: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 2012208: 7f ff ce 99 call 2005c6c 201220c: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2012210: 40 00 02 4c call 2012b40 2012214: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 2012218: 81 c7 e0 08 ret 201221c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201273c : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 201273c: 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; 2012740: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2012744: 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; 2012748: 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) 201274c: 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 ) { 2012750: 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; 2012754: 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) 2012758: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201275c: 02 80 00 07 be 2012778 <== NOT EXECUTED 2012760: 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); 2012764: 40 00 00 f7 call 2012b40 <== NOT EXECUTED 2012768: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 201276c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2012770: 02 80 00 24 be 2012800 <== NOT EXECUTED 2012774: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2012778: 81 c7 e0 08 ret <== NOT EXECUTED 201277c: 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); 2012780: 7f ff fd 32 call 2011c48 <== NOT EXECUTED 2012784: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2012788: 10 80 00 13 b 20127d4 <== NOT EXECUTED 201278c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2012790: 94 06 c0 1a add %i3, %i2, %o2 <== NOT EXECUTED 2012794: 7f ff fa 24 call 2011024 <== NOT EXECUTED 2012798: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 201279c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20127a0: 12 80 00 07 bne 20127bc <== NOT EXECUTED 20127a4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 20127a8: 7f ff fb 1b call 2011414 <== NOT EXECUTED 20127ac: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 20127b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20127b4: 22 80 00 08 be,a 20127d4 <== NOT EXECUTED 20127b8: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20127bc: 40 00 23 11 call 201b400 <__errno> <== NOT EXECUTED 20127c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20127c4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20127c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20127cc: 81 c7 e0 08 ret <== NOT EXECUTED 20127d0: 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++ ) 20127d4: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 20127d8: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 20127dc: 2a bf ff ed bcs,a 2012790 <== NOT EXECUTED 20127e0: 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); 20127e4: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20127e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20127ec: 40 00 1c 72 call 20199b4 <== NOT EXECUTED 20127f0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20127f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20127f8: 12 80 00 0a bne 2012820 <== NOT EXECUTED 20127fc: 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) 2012800: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 2012804: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 2012808: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 201280c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2012810: 2a bf ff dc bcs,a 2012780 <== NOT EXECUTED 2012814: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED 2012818: 81 c7 e0 08 ret <== NOT EXECUTED 201281c: 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); 2012820: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 2012824: 81 c7 e0 08 ret <== NOT EXECUTED 2012828: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020122f4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20122f4: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20122f8: 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; 20122fc: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 2012300: 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; 2012304: 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; 2012308: 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 ) { 201230c: 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) 2012310: 80 a6 80 12 cmp %i2, %l2 2012314: 08 80 00 2d bleu 20123c8 2012318: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201231c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012320: 80 a0 60 01 cmp %g1, 1 2012324: 32 80 00 0b bne,a 2012350 <== ALWAYS TAKEN 2012328: c4 17 20 06 lduh [ %i4 + 6 ], %g2 201232c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2012330: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012334: 32 80 00 07 bne,a 2012350 <== NOT EXECUTED 2012338: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201233c: 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)) && 2012340: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012344: 12 80 00 1d bne 20123b8 <== NOT EXECUTED 2012348: 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))) & 201234c: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 2012350: 82 00 bf ff add %g2, -1, %g1 2012354: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2012358: 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 - 201235c: a0 20 80 10 sub %g2, %l0, %l0 2012360: 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) 2012364: 80 a4 80 10 cmp %l2, %l0 2012368: 08 80 00 18 bleu 20123c8 201236c: 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) 2012370: a4 a4 80 10 subcc %l2, %l0, %l2 2012374: 02 80 00 15 be 20123c8 <== NEVER TAKEN 2012378: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 201237c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012380: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012384: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012388: 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; 201238c: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012390: 96 07 bf fc add %fp, -4, %o3 2012394: 94 10 00 11 mov %l1, %o2 2012398: 40 00 1e d6 call 2019ef0 201239c: 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) 20123a0: b0 92 20 00 orcc %o0, 0, %i0 20123a4: 12 80 00 09 bne 20123c8 <== NEVER TAKEN 20123a8: 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)) 20123ac: 80 94 00 01 orcc %l0, %g1, %g0 20123b0: 12 80 00 08 bne 20123d0 <== ALWAYS TAKEN 20123b4: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 20123b8: 40 00 24 12 call 201b400 <__errno> <== NOT EXECUTED 20123bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20123c0: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 20123c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20123c8: 81 c7 e0 08 ret 20123cc: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20123d0: 02 80 00 0b be 20123fc <== ALWAYS TAKEN 20123d4: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20123d8: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 20123dc: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20123e0: 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) - 20123e4: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20123e8: 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 - 20123ec: 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)); 20123f0: 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) - 20123f4: 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 - 20123f8: 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 ) 20123fc: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 2012400: 80 a2 e0 00 cmp %o3, 0 2012404: 32 80 00 07 bne,a 2012420 2012408: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 201240c: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 2012410: 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; 2012414: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 2012418: 10 80 00 1d b 201248c 201241c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2012420: 80 a0 7f ff cmp %g1, -1 2012424: 02 80 00 04 be 2012434 <== NEVER TAKEN 2012428: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 201242c: 10 80 00 0a b 2012454 2012430: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 2012434: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012438: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201243c: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2012440: 7f ff ff 78 call 2012220 <== NOT EXECUTED 2012444: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2012448: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 201244c: 12 80 00 09 bne 2012470 <== NOT EXECUTED 2012450: 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); 2012454: d2 07 bf f4 ld [ %fp + -12 ], %o1 2012458: d4 07 bf f0 ld [ %fp + -16 ], %o2 201245c: 40 00 1d c6 call 2019b74 2012460: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012464: b6 92 20 00 orcc %o0, 0, %i3 2012468: 02 80 00 07 be 2012484 <== ALWAYS TAKEN 201246c: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2012470: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012474: 40 00 1e 6f call 2019e30 <== NOT EXECUTED 2012478: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 201247c: 81 c7 e0 08 ret <== NOT EXECUTED 2012480: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 2012484: 40 00 01 af call 2012b40 2012488: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 201248c: c2 07 bf fc ld [ %fp + -4 ], %g1 2012490: 80 a0 60 00 cmp %g1, 0 2012494: 22 bf ff cd be,a 20123c8 <== NEVER TAKEN 2012498: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 201249c: c2 07 bf f8 ld [ %fp + -8 ], %g1 20124a0: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 20124a4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 20124a8: 80 a0 60 01 cmp %g1, 1 20124ac: 32 bf ff c7 bne,a 20123c8 20124b0: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 20124b4: d2 07 bf f0 ld [ %fp + -16 ], %o1 20124b8: 40 00 02 60 call 2012e38 20124bc: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20124c0: b8 92 20 00 orcc %o0, 0, %i4 20124c4: 22 bf ff c1 be,a 20123c8 <== ALWAYS TAKEN 20124c8: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 20124cc: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20124d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20124d4: 40 00 1e 57 call 2019e30 <== NOT EXECUTED 20124d8: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 20124dc: 81 c7 e0 08 ret <== NOT EXECUTED 20124e0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012220 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2012220: 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); 2012224: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2012228: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 201222c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 2012230: 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; 2012234: 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); 2012238: 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, ...) { 201223c: 90 10 00 18 mov %i0, %o0 2012240: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2012244: 80 a6 a0 01 cmp %i2, 1 2012248: 12 80 00 24 bne 20122d8 <== NEVER TAKEN 201224c: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2012250: 84 07 a0 58 add %fp, 0x58, %g2 2012254: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012258: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 201225c: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012260: 80 a6 c0 02 cmp %i3, %g2 2012264: 0a 80 00 06 bcs 201227c <== ALWAYS TAKEN 2012268: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 201226c: 40 00 24 65 call 201b400 <__errno> <== NOT EXECUTED 2012270: 01 00 00 00 nop <== NOT EXECUTED 2012274: 10 80 00 1c b 20122e4 <== NOT EXECUTED 2012278: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201227c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2012280: 80 a0 a0 01 cmp %g2, 1 2012284: 32 80 00 0d bne,a 20122b8 2012288: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 201228c: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2012290: 80 a0 a0 00 cmp %g2, 0 2012294: 32 80 00 09 bne,a 20122b8 <== NEVER TAKEN 2012298: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201229c: 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)) && 20122a0: 80 88 a0 03 btst 3, %g2 20122a4: 22 80 00 05 be,a 20122b8 <== NEVER TAKEN 20122a8: 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; 20122ac: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 20122b0: 10 80 00 0f b 20122ec 20122b4: 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); 20122b8: 96 07 bf f8 add %fp, -8, %o3 20122bc: 7f ff fe 3d call 2011bb0 20122c0: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 20122c4: 80 a2 60 00 cmp %o1, 0 20122c8: 12 80 00 09 bne 20122ec <== NEVER TAKEN 20122cc: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 20122d0: 10 80 00 07 b 20122ec 20122d4: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 20122d8: 40 00 24 4a call 201b400 <__errno> <== NOT EXECUTED 20122dc: 01 00 00 00 nop <== NOT EXECUTED 20122e0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20122e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20122e8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20122ec: 81 c7 e0 08 ret 20122f0: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02011bb0 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2011bb0: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2011bb4: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2011bb8: 80 a6 80 1c cmp %i2, %i4 2011bbc: 12 80 00 07 bne 2011bd8 <== NEVER TAKEN 2011bc0: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2011bc4: 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; 2011bc8: 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; 2011bcc: 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; 2011bd0: 81 c7 e0 08 ret 2011bd4: 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) 2011bd8: 28 80 00 06 bleu,a 2011bf0 <== NOT EXECUTED 2011bdc: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2011be0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2011be4: 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; 2011be8: 10 80 00 04 b 2011bf8 <== NOT EXECUTED 2011bec: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2011bf0: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2011bf4: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011bf8: 10 80 00 0b b 2011c24 <== NOT EXECUTED 2011bfc: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011c00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011c04: 40 00 1f 6c call 20199b4 <== NOT EXECUTED 2011c08: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2011c0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011c10: 22 80 00 05 be,a 2011c24 <== NOT EXECUTED 2011c14: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2011c18: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2011c1c: 81 c7 e0 08 ret <== NOT EXECUTED 2011c20: 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++) 2011c24: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2011c28: 12 bf ff f6 bne 2011c00 <== NOT EXECUTED 2011c2c: 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; 2011c30: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2011c34: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2011c38: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2011c3c: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2011c40: 81 c7 e0 08 ret <== NOT EXECUTED 2011c44: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 020126e8 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20126e8: 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); 20126ec: 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; 20126f0: 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); 20126f4: 7f ff fd 63 call 2011c80 <== NOT EXECUTED 20126f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20126fc: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 2012700: 7f ff e0 f6 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 2012704: 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); 2012708: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 201270c: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 2012710: 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 ); 2012714: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012718: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 201271c: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 2012720: 7f ff e0 e3 call 200aaac <_Chain_Append> <== NOT EXECUTED 2012724: 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; 2012728: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 201272c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2012730: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 2012734: 81 c7 e0 08 ret <== NOT EXECUTED 2012738: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011d3c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011d3c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011d40: 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); 2011d44: 90 10 00 18 mov %i0, %o0 2011d48: 92 10 00 19 mov %i1, %o1 2011d4c: 7f ff ff cd call 2011c80 2011d50: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011d54: 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); 2011d58: 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 ) { 2011d5c: 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); 2011d60: 90 10 00 18 mov %i0, %o0 2011d64: 94 10 00 1c mov %i4, %o2 2011d68: 96 10 20 00 clr %o3 2011d6c: 7f ff ff d7 call 2011cc8 <_hash_search> 2011d70: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2011d74: b0 92 20 00 orcc %o0, 0, %i0 2011d78: 12 80 00 08 bne 2011d98 2011d7c: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2011d80: 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; 2011d84: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2011d88: 84 00 a0 01 inc %g2 2011d8c: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2011d90: 81 c7 e0 08 ret 2011d94: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2011d98: d2 06 e0 6c ld [ %i3 + 0x6c ], %o1 2011d9c: 94 10 00 1c mov %i4, %o2 2011da0: 96 10 00 1c mov %i4, %o3 2011da4: 98 07 bf fc add %fp, -4, %o4 2011da8: 7f ff ff c8 call 2011cc8 <_hash_search> 2011dac: 90 10 00 1d mov %i5, %o0 2011db0: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2011db4: 7f ff d1 69 call 2006358 2011db8: 90 10 20 44 mov 0x44, %o0 2011dbc: d0 26 80 00 st %o0, [ %i2 ] 2011dc0: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2011dc4: 80 a2 20 00 cmp %o0, 0 2011dc8: 02 80 00 1f be 2011e44 <== NEVER TAKEN 2011dcc: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2011dd0: 92 10 20 00 clr %o1 2011dd4: 40 00 28 96 call 201c02c 2011dd8: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2011ddc: 82 10 20 01 mov 1, %g1 2011de0: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011de4: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2011de8: 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; 2011dec: 82 08 7f fe and %g1, -2, %g1 2011df0: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011df4: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2011df8: 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; 2011dfc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2011e00: 40 00 28 4f call 201bf3c 2011e04: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2011e08: 80 a4 20 00 cmp %l0, 0 2011e0c: 02 80 00 04 be 2011e1c <== NEVER TAKEN 2011e10: 01 00 00 00 nop lfat_fd->ino = key; 2011e14: 10 80 00 12 b 2011e5c 2011e18: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011e1c: 40 00 04 35 call 2012ef0 <== NOT EXECUTED 2011e20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011e24: 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); 2011e28: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011e2c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2011e30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011e34: 32 80 00 0b bne,a 2011e60 <== NOT EXECUTED 2011e38: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2011e3c: 7f ff cf 8c call 2005c6c <== NOT EXECUTED 2011e40: 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 ); 2011e44: 40 00 25 6f call 201b400 <__errno> <== NOT EXECUTED 2011e48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011e4c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2011e50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011e54: 81 c7 e0 08 ret <== NOT EXECUTED 2011e58: 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); 2011e5c: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 2011e60: d2 07 bf fc ld [ %fp + -4 ], %o1 2011e64: b8 0f 20 01 and %i4, 1, %i4 2011e68: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2011e6c: 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); 2011e70: b9 2f 20 04 sll %i4, 4, %i4 2011e74: b8 27 00 01 sub %i4, %g1, %i4 2011e78: 7f ff e3 0d call 200aaac <_Chain_Append> 2011e7c: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2011e80: 81 c7 e0 08 ret 2011e84: 81 e8 00 00 restore =============================================================================== 02011e9c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011e9c: 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; 2011ea0: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011ea4: 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; 2011ea8: 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) 2011eac: 80 a6 e0 00 cmp %i3, 0 2011eb0: 02 80 00 63 be 201203c <== NEVER TAKEN 2011eb4: 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 ) 2011eb8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2011ebc: 80 a6 80 01 cmp %i2, %g1 2011ec0: 1a 80 00 5f bcc 201203c <== NEVER TAKEN 2011ec4: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011ec8: 38 80 00 07 bgu,a 2011ee4 <== NEVER TAKEN 2011ecc: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2011ed0: 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) || 2011ed4: 80 a6 80 02 cmp %i2, %g2 2011ed8: 28 80 00 04 bleu,a 2011ee8 <== ALWAYS TAKEN 2011edc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2011ee0: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011ee4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2011ee8: 80 a0 60 01 cmp %g1, 1 2011eec: 32 80 00 1c bne,a 2011f5c 2011ef0: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2011ef4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011ef8: 80 a0 60 00 cmp %g1, 0 2011efc: 32 80 00 18 bne,a 2011f5c <== NEVER TAKEN 2011f00: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011f04: 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)) && 2011f08: 80 88 60 03 btst 3, %g1 2011f0c: 22 80 00 14 be,a 2011f5c <== NEVER TAKEN 2011f10: 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); 2011f14: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2011f18: 7f ff ff 4c call 2011c48 2011f1c: 90 10 00 10 mov %l0, %o0 sec += (start >> fs_info->vol.sec_log2); 2011f20: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2011f24: 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); 2011f28: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2011f2c: 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); 2011f30: 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); 2011f34: 94 0e 80 0a and %i2, %o2, %o2 2011f38: 90 10 00 1d mov %i5, %o0 2011f3c: 96 10 00 1b mov %i3, %o3 2011f40: 40 00 03 5a call 2012ca8 <_fat_block_read> 2011f44: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2011f48: b0 92 20 00 orcc %o0, 0, %i0 2011f4c: 16 80 00 41 bge 2012050 <== ALWAYS TAKEN 2011f50: 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; 2011f54: 81 c7 e0 08 ret <== NOT EXECUTED 2011f58: 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); 2011f5c: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2011f60: 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); 2011f64: a6 07 bf fc add %fp, -4, %l3 2011f68: 90 10 00 1d mov %i5, %o0 2011f6c: 92 10 00 19 mov %i1, %o1 2011f70: 94 10 00 12 mov %l2, %o2 2011f74: 7f ff ff 0f call 2011bb0 2011f78: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2011f7c: b0 92 60 00 orcc %o1, 0, %i0 2011f80: 12 80 00 2f bne 201203c <== NEVER TAKEN 2011f84: 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); 2011f88: a3 34 60 10 srl %l1, 0x10, %l1 2011f8c: a2 04 7f ff add %l1, -1, %l1 2011f90: b4 0e 80 11 and %i2, %l1, %i2 2011f94: a2 10 20 00 clr %l1 2011f98: 10 80 00 1f b 2012014 2011f9c: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2011fa0: a2 24 40 14 sub %l1, %l4, %l1 2011fa4: 80 a4 40 1b cmp %l1, %i3 2011fa8: 38 80 00 02 bgu,a 2011fb0 2011fac: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2011fb0: d2 07 bf fc ld [ %fp + -4 ], %o1 2011fb4: 7f ff ff 25 call 2011c48 2011fb8: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (ofs >> fs_info->vol.sec_log2); 2011fbc: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2011fc0: 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); 2011fc4: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2011fc8: 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); 2011fcc: 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); 2011fd0: 94 0d 00 0a and %l4, %o2, %o2 2011fd4: 90 10 00 1d mov %i5, %o0 2011fd8: 96 10 00 11 mov %l1, %o3 2011fdc: 40 00 03 33 call 2012ca8 <_fat_block_read> 2011fe0: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2011fe4: 80 a2 20 00 cmp %o0, 0 2011fe8: 06 80 00 17 bl 2012044 <== NEVER TAKEN 2011fec: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 2011ff0: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 2011ff4: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011ff8: 90 10 00 1d mov %i5, %o0 2011ffc: 92 10 00 11 mov %l1, %o1 2012000: 40 00 1e 6d call 20199b4 2012004: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2012008: 80 a2 20 00 cmp %o0, 0 201200c: 12 80 00 10 bne 201204c <== NEVER TAKEN 2012010: 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) 2012014: 80 a6 e0 00 cmp %i3, 0 2012018: 32 bf ff e2 bne,a 2011fa0 201201c: 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); 2012020: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2012024: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2012028: 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); 201202c: b4 06 80 18 add %i2, %i0, %i2 2012030: 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 + 2012034: a4 06 80 12 add %i2, %l2, %l2 2012038: 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; 201203c: 81 c7 e0 08 ret 2012040: 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; 2012044: 81 c7 e0 08 ret <== NOT EXECUTED 2012048: 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); 201204c: 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; } 2012050: 81 c7 e0 08 ret 2012054: 81 e8 00 00 restore =============================================================================== 0201282c : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 201282c: 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; 2012830: 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 ) { 2012834: 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; 2012838: 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)) && 201283c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012840: 80 a0 60 01 cmp %g1, 1 2012844: 12 80 00 0d bne 2012878 <== ALWAYS TAKEN 2012848: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 201284c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2012850: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012854: 32 80 00 0a bne,a 201287c <== NOT EXECUTED 2012858: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201285c: 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)) && 2012860: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012864: 22 80 00 06 be,a 201287c <== NOT EXECUTED 2012868: 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; 201286c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2012870: 10 80 00 18 b 20128d0 <== NOT EXECUTED 2012874: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2012878: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 201287c: 10 80 00 0d b 20128b0 2012880: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012884: 92 10 00 1b mov %i3, %o1 2012888: 40 00 1c 4b call 20199b4 201288c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012890: 80 a2 20 00 cmp %o0, 0 2012894: 12 80 00 10 bne 20128d4 <== NEVER TAKEN 2012898: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 201289c: c2 17 20 06 lduh [ %i4 + 6 ], %g1 20128a0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 20128a4: 82 00 80 01 add %g2, %g1, %g1 20128a8: 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; 20128ac: 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) 20128b0: f6 07 bf fc ld [ %fp + -4 ], %i3 20128b4: c6 07 20 0c ld [ %i4 + 0xc ], %g3 20128b8: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 20128bc: 86 0e c0 03 and %i3, %g3, %g3 20128c0: 80 a0 c0 02 cmp %g3, %g2 20128c4: 0a bf ff f0 bcs 2012884 20128c8: 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; 20128cc: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 20128d0: 90 10 20 00 clr %o0 } 20128d4: 81 c7 e0 08 ret 20128d8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012058 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2012058: 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; 201205c: 82 10 3f ff mov -1, %g1 2012060: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2012064: 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; 2012068: 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 ) { 201206c: 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 ) 2012070: 80 a6 80 01 cmp %i2, %g1 2012074: 1a 80 00 3a bcc 201215c <== NEVER TAKEN 2012078: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 return rc; assert(fat_fd->fat_file_size); 201207c: 80 a0 60 00 cmp %g1, 0 2012080: 32 80 00 0a bne,a 20120a8 <== ALWAYS TAKEN 2012084: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2012088: 11 00 80 ab sethi %hi(0x202ac00), %o0 <== NOT EXECUTED 201208c: 15 00 80 ab sethi %hi(0x202ac00), %o2 <== NOT EXECUTED 2012090: 17 00 80 ab sethi %hi(0x202ac00), %o3 <== NOT EXECUTED 2012094: 90 12 23 78 or %o0, 0x378, %o0 <== NOT EXECUTED 2012098: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 201209c: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 20120a0: 40 00 09 db call 201480c <__assert_func> <== NOT EXECUTED 20120a4: 96 12 e3 c0 or %o3, 0x3c0, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 20120a8: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 20120ac: 86 00 ff ff add %g3, -1, %g3 20120b0: b4 00 c0 1a add %g3, %i2, %i2 20120b4: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 20120b8: 85 2e 80 02 sll %i2, %g2, %g2 20120bc: 80 a0 80 01 cmp %g2, %g1 20120c0: 1a 80 00 28 bcc 2012160 <== NEVER TAKEN 20120c4: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 20120c8: 80 a6 a0 00 cmp %i2, 0 20120cc: 02 80 00 0a be 20120f4 <== ALWAYS TAKEN 20120d0: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 20120d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20120d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20120dc: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20120e0: 7f ff fe b4 call 2011bb0 <== NOT EXECUTED 20120e4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20120e8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20120ec: 12 80 00 1d bne 2012160 <== NOT EXECUTED 20120f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20120f4: 92 10 00 19 mov %i1, %o1 20120f8: 94 10 00 1a mov %i2, %o2 20120fc: 7f ff fe ad call 2011bb0 2012100: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 2012104: 80 a2 60 00 cmp %o1, 0 2012108: 12 80 00 16 bne 2012160 <== NEVER TAKEN 201210c: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 2012110: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012114: 40 00 1f 47 call 2019e30 2012118: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 201211c: 92 92 20 00 orcc %o0, 0, %o1 2012120: 12 80 00 10 bne 2012160 <== NEVER TAKEN 2012124: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 2012128: 02 80 00 0e be 2012160 <== ALWAYS TAKEN 201212c: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 2012130: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2012134: 40 00 1e 90 call 2019b74 <== NOT EXECUTED 2012138: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201213c: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2012140: 12 80 00 08 bne 2012160 <== NOT EXECUTED 2012144: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2012148: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 201214c: 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; 2012150: 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; 2012154: 10 80 00 03 b 2012160 <== NOT EXECUTED 2012158: 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; 201215c: 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; } 2012160: 81 c7 e0 08 ret 2012164: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020124e4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20124e4: 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; 20124e8: 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; 20124ec: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20124f0: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20124f4: 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 ) 20124f8: 80 a6 e0 00 cmp %i3, 0 20124fc: 02 80 00 79 be 20126e0 <== NEVER TAKEN 2012500: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 2012504: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2012508: 80 a6 80 01 cmp %i2, %g1 201250c: 18 80 00 09 bgu 2012530 <== NEVER TAKEN 2012510: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 2012514: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 2012518: 80 a6 c0 01 cmp %i3, %g1 201251c: 18 80 00 05 bgu 2012530 <== NEVER TAKEN 2012520: 82 20 40 1b sub %g1, %i3, %g1 2012524: 80 a6 80 01 cmp %i2, %g1 2012528: 08 80 00 07 bleu 2012544 <== ALWAYS TAKEN 201252c: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2012530: 40 00 23 b4 call 201b400 <__errno> <== NOT EXECUTED 2012534: 01 00 00 00 nop <== NOT EXECUTED 2012538: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 201253c: 10 80 00 68 b 20126dc <== NOT EXECUTED 2012540: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2012544: 90 10 00 18 mov %i0, %o0 2012548: 92 10 00 19 mov %i1, %o1 201254c: 94 10 00 11 mov %l1, %o2 2012550: 7f ff ff 69 call 20122f4 2012554: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012558: 80 a2 20 00 cmp %o0, 0 201255c: 12 80 00 61 bne 20126e0 <== NEVER TAKEN 2012560: 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)) 2012564: 80 a0 40 11 cmp %g1, %l1 2012568: 32 80 00 02 bne,a 2012570 <== NEVER TAKEN 201256c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012570: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012574: 80 a0 60 01 cmp %g1, 1 2012578: 32 80 00 1c bne,a 20125e8 201257c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2012580: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012584: 80 a0 60 00 cmp %g1, 0 2012588: 32 80 00 18 bne,a 20125e8 <== NEVER TAKEN 201258c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012590: 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)) && 2012594: 80 88 60 03 btst 3, %g1 2012598: 22 80 00 14 be,a 20125e8 <== NEVER TAKEN 201259c: 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); 20125a0: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 20125a4: 7f ff fd a9 call 2011c48 20125a8: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (start >> fs_info->vol.sec_log2); 20125ac: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20125b0: 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); 20125b4: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20125b8: 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); 20125bc: 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); 20125c0: 94 0e 80 0a and %i2, %o2, %o2 20125c4: 90 10 00 1d mov %i5, %o0 20125c8: 96 10 00 1b mov %i3, %o3 20125cc: 40 00 01 d9 call 2012d30 <_fat_block_write> 20125d0: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20125d4: 80 a2 20 00 cmp %o0, 0 20125d8: 16 80 00 42 bge 20126e0 <== ALWAYS TAKEN 20125dc: 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; 20125e0: 10 80 00 40 b 20126e0 <== NOT EXECUTED 20125e4: 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); 20125e8: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20125ec: 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); 20125f0: a6 07 bf f8 add %fp, -8, %l3 20125f4: 90 10 00 1d mov %i5, %o0 20125f8: 92 10 00 19 mov %i1, %o1 20125fc: 94 10 00 12 mov %l2, %o2 2012600: 7f ff fd 6c call 2011bb0 2012604: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2012608: 90 92 60 00 orcc %o1, 0, %o0 201260c: 12 80 00 35 bne 20126e0 <== NEVER TAKEN 2012610: 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); 2012614: a3 34 60 10 srl %l1, 0x10, %l1 2012618: a2 04 7f ff add %l1, -1, %l1 201261c: a8 10 20 00 clr %l4 2012620: b4 0e 80 11 and %i2, %l1, %i2 2012624: a2 10 20 00 clr %l1 2012628: 10 80 00 21 b 20126ac 201262c: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2012630: b0 26 00 15 sub %i0, %l5, %i0 2012634: 80 a6 00 1b cmp %i0, %i3 2012638: 38 80 00 02 bgu,a 2012640 201263c: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2012640: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012644: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2012648: 7f ff fd 80 call 2011c48 201264c: f0 27 bf fc st %i0, [ %fp + -4 ] sec += (ofs >> fs_info->vol.sec_log2); 2012650: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012654: 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); 2012658: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 201265c: 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); 2012660: 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); 2012664: 94 0d 40 0a and %l5, %o2, %o2 2012668: 90 10 00 1d mov %i5, %o0 201266c: 96 10 00 18 mov %i0, %o3 2012670: 40 00 01 b0 call 2012d30 <_fat_block_write> 2012674: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2012678: 80 a2 20 00 cmp %o0, 0 201267c: 06 80 00 18 bl 20126dc <== NEVER TAKEN 2012680: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2012684: 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; 2012688: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 201268c: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012690: 90 10 00 1d mov %i5, %o0 2012694: 92 10 00 14 mov %l4, %o1 2012698: 40 00 1c c7 call 20199b4 201269c: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 20126a0: 80 a2 20 00 cmp %o0, 0 20126a4: 12 80 00 0f bne 20126e0 <== NEVER TAKEN 20126a8: 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) 20126ac: 80 a6 e0 00 cmp %i3, 0 20126b0: 32 bf ff e0 bne,a 2012630 20126b4: 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); 20126b8: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20126bc: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20126c0: 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); 20126c4: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 20126c8: 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); 20126cc: 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 + 20126d0: 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; 20126d4: 10 80 00 03 b 20126e0 20126d8: 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; 20126dc: 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; } 20126e0: 81 c7 e0 08 ret 20126e4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02019e30 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019e30: 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; 2019e34: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019e38: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019e3c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 2019e40: 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; 2019e44: 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) 2019e48: 10 80 00 19 b 2019eac 2019e4c: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2019e50: 92 10 00 1a mov %i2, %o1 2019e54: 7f ff fe d8 call 20199b4 2019e58: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019e5c: b0 92 20 00 orcc %o0, 0, %i0 2019e60: 02 80 00 0b be 2019e8c <== ALWAYS TAKEN 2019e64: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2019e68: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 2019e6c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2019e70: 02 80 00 03 be 2019e7c <== NOT EXECUTED 2019e74: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 2019e78: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019e7c: 7f ff e3 31 call 2012b40 <== NOT EXECUTED 2019e80: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 2019e84: 81 c7 e0 08 ret <== NOT EXECUTED 2019e88: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2019e8c: 92 10 00 1a mov %i2, %o1 2019e90: 7f ff ff 39 call 2019b74 2019e94: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2019e98: 80 a2 20 00 cmp %o0, 0 2019e9c: 32 80 00 02 bne,a 2019ea4 <== NEVER TAKEN 2019ea0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 2019ea4: 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++; 2019ea8: 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) 2019eac: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2019eb0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2019eb4: 84 0e 80 02 and %i2, %g2, %g2 2019eb8: 80 a0 80 01 cmp %g2, %g1 2019ebc: 0a bf ff e5 bcs 2019e50 2019ec0: 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) 2019ec4: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 2019ec8: 80 a0 7f ff cmp %g1, -1 2019ecc: 02 80 00 04 be 2019edc <== ALWAYS TAKEN 2019ed0: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 2019ed4: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 2019ed8: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019edc: 90 10 00 1c mov %i4, %o0 2019ee0: 7f ff e3 18 call 2012b40 2019ee4: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2019ee8: 81 c7 e0 08 ret 2019eec: 81 e8 00 00 restore =============================================================================== 02012fc0 : 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; 2012fc0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2012fc4: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2012fc8: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 2012fcc: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 2012fd0: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 2012fd4: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2012fd8: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2012fdc: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 2012fe0: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 2012fe4: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 2012fe8: 81 c3 e0 08 retl <== NOT EXECUTED 2012fec: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 020199b4 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 20199b4: 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; 20199b8: 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)) ) 20199bc: 80 a6 60 01 cmp %i1, 1 20199c0: 08 80 00 64 bleu 2019b50 <== NEVER TAKEN 20199c4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 20199c8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 20199cc: 82 00 60 01 inc %g1 20199d0: 80 a6 40 01 cmp %i1, %g1 20199d4: 18 80 00 5f bgu 2019b50 <== NEVER TAKEN 20199d8: 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) + 20199dc: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 20199e0: b7 36 60 01 srl %i1, 1, %i3 20199e4: 84 88 60 01 andcc %g1, 1, %g2 20199e8: 12 80 00 06 bne 2019a00 <== ALWAYS TAKEN 20199ec: b6 06 c0 19 add %i3, %i1, %i3 20199f0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20199f4: 02 80 00 03 be 2019a00 <== NOT EXECUTED 20199f8: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 20199fc: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2019a00: 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); 2019a04: 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) + 2019a08: b7 36 c0 03 srl %i3, %g3, %i3 2019a0c: 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); 2019a10: b8 07 00 19 add %i4, %i1, %i4 2019a14: 80 a0 a0 00 cmp %g2, 0 2019a18: 12 80 00 06 bne 2019a30 <== ALWAYS TAKEN 2019a1c: b6 06 c0 03 add %i3, %g3, %i3 2019a20: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019a24: 02 80 00 03 be 2019a30 <== NOT EXECUTED 2019a28: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2019a2c: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2019a30: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2019a34: 90 10 00 1d mov %i5, %o0 2019a38: 92 10 00 1b mov %i3, %o1 2019a3c: 94 10 20 01 mov 1, %o2 2019a40: 7f ff e3 c1 call 2012944 2019a44: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2019a48: b0 92 20 00 orcc %o0, 0, %i0 2019a4c: 12 80 00 38 bne 2019b2c <== NEVER TAKEN 2019a50: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 2019a54: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2019a58: 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); 2019a5c: a1 34 20 10 srl %l0, 0x10, %l0 2019a60: 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 ) 2019a64: 02 80 00 27 be 2019b00 <== NEVER TAKEN 2019a68: b8 0f 00 10 and %i4, %l0, %i4 2019a6c: 80 a0 60 04 cmp %g1, 4 2019a70: 02 80 00 31 be 2019b34 <== NEVER TAKEN 2019a74: 80 a0 60 01 cmp %g1, 1 2019a78: 12 80 00 36 bne 2019b50 <== NEVER TAKEN 2019a7c: 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) ) 2019a80: 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))); 2019a84: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2019a88: 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))); 2019a8c: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 2019a90: 80 a7 00 03 cmp %i4, %g3 2019a94: 12 80 00 0f bne 2019ad0 <== ALWAYS TAKEN 2019a98: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019a9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019aa0: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019aa4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019aa8: 7f ff e3 a7 call 2012944 <== NOT EXECUTED 2019aac: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019ab0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2019ab4: 12 80 00 2d bne 2019b68 <== NOT EXECUTED 2019ab8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 2019abc: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 2019ac0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 2019ac4: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 2019ac8: 10 80 00 05 b 2019adc <== NOT EXECUTED 2019acc: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 2019ad0: b8 00 80 1c add %g2, %i4, %i4 2019ad4: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 2019ad8: 85 28 a0 08 sll %g2, 8, %g2 2019adc: 82 10 80 01 or %g2, %g1, %g1 2019ae0: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2019ae4: 80 8e 60 01 btst 1, %i1 2019ae8: 02 80 00 04 be 2019af8 2019aec: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 2019af0: 10 80 00 0e b 2019b28 2019af4: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2019af8: 10 80 00 0c b 2019b28 2019afc: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 2019b00: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019b04: 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)); 2019b08: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019b0c: 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)); 2019b10: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019b14: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2019b18: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2019b1c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2019b20: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2019b24: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2019b28: c2 26 80 00 st %g1, [ %i2 ] break; 2019b2c: 81 c7 e0 08 ret 2019b30: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 2019b34: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019b38: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 2019b3c: 7f ff ff 92 call 2019984 <== NOT EXECUTED 2019b40: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 2019b44: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 2019b48: 81 c7 e0 08 ret <== NOT EXECUTED 2019b4c: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 2019b50: 40 00 06 2c call 201b400 <__errno> <== NOT EXECUTED 2019b54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019b58: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019b5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019b60: 81 c7 e0 08 ret <== NOT EXECUTED 2019b64: 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) 2019b68: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2019b6c: 81 c7 e0 08 ret <== NOT EXECUTED 2019b70: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012ef0 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2012ef0: 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)) 2012ef4: 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; 2012ef8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2012efc: 10 80 00 2a b 2012fa4 <== NOT EXECUTED 2012f00: 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)) 2012f04: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2012f08: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2012f0c: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2012f10: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2012f14: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2012f18: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2012f1c: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2012f20: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2012f24: 12 80 00 0a bne 2012f4c <== NOT EXECUTED 2012f28: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2012f2c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2012f30: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2012f34: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2012f38: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2012f3c: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2012f40: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012f44: 81 c7 e0 08 ret <== NOT EXECUTED 2012f48: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2012f4c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2012f50: 0a 80 00 03 bcs 2012f5c <== NOT EXECUTED 2012f54: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2012f58: 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++) 2012f5c: 92 02 60 01 inc %o1 <== NOT EXECUTED 2012f60: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2012f64: 32 bf ff e8 bne,a 2012f04 <== NOT EXECUTED 2012f68: 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)) 2012f6c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012f70: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2012f74: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2012f78: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2012f7c: 1a 80 00 0d bcc 2012fb0 <== NOT EXECUTED 2012f80: 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); 2012f84: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 2012f88: 7f ff d0 42 call 2007090 <== NOT EXECUTED 2012f8c: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2012f90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012f94: 02 80 00 09 be 2012fb8 <== NOT EXECUTED 2012f98: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2012f9c: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED 2012fa0: 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++) 2012fa4: f0 07 60 78 ld [ %i5 + 0x78 ], %i0 <== NOT EXECUTED 2012fa8: 10 bf ff ee b 2012f60 <== NOT EXECUTED 2012fac: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2012fb0: 81 c7 e0 08 ret <== NOT EXECUTED 2012fb4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2012fb8: 81 c7 e0 08 ret <== NOT EXECUTED 2012fbc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02012e38 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2012e38: 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; 2012e3c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = start_cln; 2012e40: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2012e44: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2012e48: 92 10 20 01 mov 1, %o1 2012e4c: 7f ff ca 55 call 20057a0 2012e50: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2012e54: b6 92 20 00 orcc %o0, 0, %i3 2012e58: 12 80 00 1b bne 2012ec4 <== ALWAYS TAKEN 2012e5c: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2012e60: 40 00 21 68 call 201b400 <__errno> <== NOT EXECUTED 2012e64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012e68: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012e6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012e70: 81 c7 e0 08 ret <== NOT EXECUTED 2012e74: 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); 2012e78: 7f ff ff e4 call 2012e08 2012e7c: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2012e80: 80 a2 3f ff cmp %o0, -1 2012e84: 12 80 00 06 bne 2012e9c <== ALWAYS TAKEN 2012e88: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012e8c: 7f ff cb 78 call 2005c6c <== NOT EXECUTED 2012e90: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2012e94: 81 c7 e0 08 ret <== NOT EXECUTED 2012e98: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012e9c: 90 10 00 1c mov %i4, %o0 2012ea0: 40 00 1a c5 call 20199b4 2012ea4: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012ea8: b0 92 20 00 orcc %o0, 0, %i0 2012eac: 02 80 00 06 be 2012ec4 <== ALWAYS TAKEN 2012eb0: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012eb4: 7f ff cb 6e call 2005c6c <== NOT EXECUTED 2012eb8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2012ebc: 81 c7 e0 08 ret <== NOT EXECUTED 2012ec0: 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) 2012ec4: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2012ec8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2012ecc: 84 0a 40 02 and %o1, %g2, %g2 2012ed0: 80 a0 80 01 cmp %g2, %g1 2012ed4: 0a bf ff e9 bcs 2012e78 2012ed8: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2012edc: 90 10 00 1b mov %i3, %o0 2012ee0: 7f ff cb 63 call 2005c6c 2012ee4: b0 10 20 00 clr %i0 return rc; } 2012ee8: 81 c7 e0 08 ret 2012eec: 81 e8 00 00 restore =============================================================================== 0201318c : * 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) { 201318c: 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); 2013190: 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; 2013194: 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) { 2013198: 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; 201319c: c0 27 bf fc clr [ %fp + -4 ] rc = stat(mt_entry->dev, &stat_buf); 20131a0: 7f ff d0 5e call 2007318 20131a4: 92 07 bf a8 add %fp, -88, %o1 if (rc == -1) 20131a8: 80 a2 3f ff cmp %o0, -1 20131ac: 02 80 01 68 be 201374c <== NEVER TAKEN 20131b0: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20131b4: c4 07 bf b4 ld [ %fp + -76 ], %g2 20131b8: 03 00 00 3c sethi %hi(0xf000), %g1 20131bc: 84 08 80 01 and %g2, %g1, %g2 20131c0: 03 00 00 18 sethi %hi(0x6000), %g1 20131c4: 80 a0 80 01 cmp %g2, %g1 20131c8: 02 80 00 06 be 20131e0 <== ALWAYS TAKEN 20131cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); 20131d0: 40 00 20 8c call 201b400 <__errno> <== NOT EXECUTED 20131d4: 01 00 00 00 nop <== NOT EXECUTED 20131d8: 10 80 01 ab b 2013884 <== NOT EXECUTED 20131dc: 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); 20131e0: 7f ff c6 e1 call 2004d64 20131e4: d0 1f bf c0 ldd [ %fp + -64 ], %o0 if (vol->dd == NULL) 20131e8: 80 a2 20 00 cmp %o0, 0 20131ec: 02 80 00 3e be 20132e4 <== NEVER TAKEN 20131f0: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 20131f4: 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); 20131f8: 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; 20131fc: 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); 2013200: 7f ff f7 89 call 2011024 2013204: 96 07 bf fc add %fp, -4, %o3 if (sc != RTEMS_SUCCESSFUL) 2013208: 80 a2 20 00 cmp %o0, 0 201320c: 12 80 00 34 bne 20132dc <== NEVER TAKEN 2013210: 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); 2013214: d0 07 bf fc ld [ %fp + -4 ], %o0 2013218: de 02 20 24 ld [ %o0 + 0x24 ], %o7 201321c: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 2013220: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 2013224: d6 2f bf 99 stb %o3, [ %fp + -103 ] 2013228: d6 0b e0 23 ldub [ %o7 + 0x23 ], %o3 201322c: f4 2f bf 9a stb %i2, [ %fp + -102 ] 2013230: d6 2f bf 97 stb %o3, [ %fp + -105 ] 2013234: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 2013238: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 201323c: d6 2f bf 9d stb %o3, [ %fp + -99 ] 2013240: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 2013244: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 2013248: d6 2f bf 9c stb %o3, [ %fp + -100 ] 201324c: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 2013250: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 2013254: d6 2f bf 9b stb %o3, [ %fp + -101 ] 2013258: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 201325c: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 2013260: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 2013264: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2013268: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 201326c: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 2013270: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 2013274: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2013278: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 201327c: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 2013280: f0 0b e0 22 ldub [ %o7 + 0x22 ], %i0 2013284: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 2013288: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 201328c: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 2013290: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2013294: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 2013298: d6 2f bf a7 stb %o3, [ %fp + -89 ] 201329c: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 20132a0: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 20132a4: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 20132a8: c2 27 bf 8c st %g1, [ %fp + -116 ] 20132ac: c4 3f bf 80 std %g2, [ %fp + -128 ] 20132b0: c8 27 bf 7c st %g4, [ %fp + -132 ] 20132b4: 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); 20132b8: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 20132bc: 7f ff f7 f4 call 201128c 20132c0: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 20132c4: c2 07 bf 8c ld [ %fp + -116 ], %g1 20132c8: 80 a2 20 00 cmp %o0, 0 20132cc: c4 1f bf 80 ldd [ %fp + -128 ], %g2 20132d0: c8 07 bf 7c ld [ %fp + -132 ], %g4 20132d4: 02 80 00 08 be 20132f4 <== ALWAYS TAKEN 20132d8: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { rtems_disk_release(vol->dd); 20132dc: 7f ff c6 c1 call 2004de0 <== NOT EXECUTED 20132e0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20132e4: 40 00 20 47 call 201b400 <__errno> <== NOT EXECUTED 20132e8: 01 00 00 00 nop <== NOT EXECUTED 20132ec: 10 80 01 66 b 2013884 <== NOT EXECUTED 20132f0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20132f4: 98 0b 20 ff and %o4, 0xff, %o4 20132f8: 9a 0b 60 ff and %o5, 0xff, %o5 20132fc: 99 2b 20 08 sll %o4, 8, %o4 2013300: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 2013304: 9f 2b 60 10 sll %o5, 0x10, %o7 2013308: 9f 33 e0 10 srl %o7, 0x10, %o7 201330c: 80 a3 e4 00 cmp %o7, 0x400 2013310: 02 80 00 0b be 201333c <== NEVER TAKEN 2013314: da 37 40 00 sth %o5, [ %i5 ] 2013318: 80 a3 e2 00 cmp %o7, 0x200 201331c: 22 80 00 09 be,a 2013340 <== ALWAYS TAKEN 2013320: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 2013324: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 2013328: 02 80 00 05 be 201333c <== NOT EXECUTED 201332c: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 2013330: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 2013334: 12 80 00 d2 bne 201367c <== NOT EXECUTED 2013338: 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; 201333c: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 2013340: c0 2f 60 03 clrb [ %i5 + 3 ] 2013344: 10 80 00 05 b 2013358 2013348: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 201334c: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 2013350: 98 03 20 01 inc %o4 <== NOT EXECUTED 2013354: 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; 2013358: 80 8b e0 01 btst 1, %o7 201335c: 22 bf ff fc be,a 201334c <== NEVER TAKEN 2013360: 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; 2013364: 9b 2b 60 10 sll %o5, 0x10, %o5 2013368: c0 2f 60 02 clrb [ %i5 + 2 ] 201336c: 93 33 60 10 srl %o5, 0x10, %o1 2013370: 10 80 00 05 b 2013384 2013374: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 2013378: 9f 3b e0 01 sra %o7, 1, %o7 201337c: 9a 03 60 01 inc %o5 2013380: 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; 2013384: 80 8b e0 01 btst 1, %o7 2013388: 22 bf ff fc be,a 2013378 201338c: 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) 2013390: 9a 8e e0 ff andcc %i3, 0xff, %o5 2013394: 02 80 00 ba be 201367c <== NEVER TAKEN 2013398: 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; 201339c: 10 80 00 05 b 20133b0 20133a0: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 20133a4: 9e 03 e0 01 inc %o7 20133a8: 9b 3b 60 01 sra %o5, 1, %o5 20133ac: 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; 20133b0: 80 8b 60 01 btst 1, %o5 20133b4: 02 bf ff fc be 20133a4 20133b8: 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) 20133bc: 9f 2a 40 0f sll %o1, %o7, %o7 20133c0: de 37 60 06 sth %o7, [ %i5 + 6 ] 20133c4: 1b 00 00 20 sethi %hi(0x8000), %o5 20133c8: 9f 2b e0 10 sll %o7, 0x10, %o7 20133cc: 9f 33 e0 10 srl %o7, 0x10, %o7 20133d0: 80 a3 c0 0d cmp %o7, %o5 20133d4: 18 80 00 aa bgu 201367c <== NEVER TAKEN 20133d8: 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; 20133dc: 10 80 00 05 b 20133f0 20133e0: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 20133e4: 9f 3b e0 01 sra %o7, 1, %o7 20133e8: 9a 03 60 01 inc %o5 20133ec: 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; 20133f0: 80 8b e0 01 btst 1, %o7 20133f4: 22 bf ff fc be,a 20133e4 20133f8: 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); 20133fc: 84 08 a0 ff and %g2, 0xff, %g2 2013400: 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); 2013404: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2013408: 88 09 20 ff and %g4, 0xff, %g4 201340c: 86 08 e0 ff and %g3, 0xff, %g3 2013410: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013414: 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); 2013418: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 201341c: 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); 2013420: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013424: 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)) / 2013428: 84 02 7f ff add %o1, -1, %g2 201342c: 83 28 60 10 sll %g1, 0x10, %g1 2013430: c6 27 bf 84 st %g3, [ %fp + -124 ] 2013434: 91 30 60 0b srl %g1, 0xb, %o0 2013438: 40 00 52 da call 2027fa0 <.div> 201343c: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013440: 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)) / 2013444: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013448: 85 2a 00 02 sll %o0, %g2, %g2 201344c: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013450: c4 0f bf 99 ldub [ %fp + -103 ], %g2 2013454: ae 0d e0 ff and %l7, 0xff, %l7 2013458: 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)) / 201345c: 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) 2013460: ae 10 80 17 or %g2, %l7, %l7 2013464: af 2d e0 10 sll %l7, 0x10, %l7 2013468: 80 a5 e0 00 cmp %l7, 0 201346c: 02 80 00 05 be 2013480 <== NEVER TAKEN 2013470: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2013474: af 35 e0 10 srl %l7, 0x10, %l7 2013478: 10 80 00 0c b 20134a8 201347c: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2013480: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2013484: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2013488: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 201348c: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2013490: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2013494: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 2013498: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 201349c: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 20134a0: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 20134a4: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 20134a8: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20134ac: 87 28 e0 10 sll %g3, 0x10, %g3 20134b0: c2 27 bf 8c st %g1, [ %fp + -116 ] 20134b4: a7 30 e0 10 srl %g3, 0x10, %l3 20134b8: 40 00 52 7e call 2027eb0 <.umul> 20134bc: 90 0e 60 ff and %i1, 0xff, %o0 20134c0: c2 07 bf 8c ld [ %fp + -116 ], %g1 20134c4: 90 04 c0 08 add %l3, %o0, %o0 20134c8: 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; 20134cc: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 20134d0: a4 0c a0 ff and %l2, 0xff, %l2 20134d4: a2 0c 60 ff and %l1, 0xff, %l1 20134d8: a5 2c a0 08 sll %l2, 8, %l2 20134dc: a2 14 80 11 or %l2, %l1, %l1 20134e0: a3 2c 60 10 sll %l1, 0x10, %l1 20134e4: 80 a4 60 00 cmp %l1, 0 20134e8: 02 80 00 05 be 20134fc <== NEVER TAKEN 20134ec: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20134f0: a3 34 60 10 srl %l1, 0x10, %l1 20134f4: 10 80 00 0d b 2013528 20134f8: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 20134fc: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 2013500: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 2013504: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 2013508: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 201350c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013510: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED 2013514: 84 10 80 18 or %g2, %i0, %g2 <== NOT EXECUTED 2013518: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 201351c: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 2013520: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2013524: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 2013528: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 201352c: 92 0e e0 ff and %i3, 0xff, %o1 2013530: 40 00 52 9a call 2027f98 <.udiv> 2013534: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2013538: 80 a2 2f f4 cmp %o0, 0xff4 201353c: 18 80 00 08 bgu 201355c <== NEVER TAKEN 2013540: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2013544: 82 10 20 01 mov 1, %g1 2013548: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 201354c: 82 10 2f ff mov 0xfff, %g1 2013550: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2013554: 10 80 00 0f b 2013590 2013558: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 201355c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2013560: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2013564: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2013568: 38 80 00 05 bgu,a 201357c <== NOT EXECUTED 201356c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 2013570: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2013574: 10 80 00 04 b 2013584 <== NOT EXECUTED 2013578: 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; 201357c: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2013580: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 2013584: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013588: 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; 201358c: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013590: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 2013594: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2013598: 80 a0 60 04 cmp %g1, 4 201359c: 12 80 00 6e bne 2013754 <== ALWAYS TAKEN 20135a0: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 20135a4: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 20135a8: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 20135ac: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20135b0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20135b4: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 20135b8: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20135bc: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 20135c0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20135c4: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 20135c8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20135cc: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 20135d0: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 20135d4: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 20135d8: 02 80 00 05 be 20135ec <== NOT EXECUTED 20135dc: 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; 20135e0: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 20135e4: 10 80 00 03 b 20135f0 <== NOT EXECUTED 20135e8: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 20135ec: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 20135f0: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 20135f4: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 20135f8: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 20135fc: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 2013600: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 2013604: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 2013608: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 201360c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2013610: 02 80 00 1b be 201367c <== NOT EXECUTED 2013614: 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, 2013618: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 201361c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2013620: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013624: 7f ff fd a1 call 2012ca8 <_fat_block_read> <== NOT EXECUTED 2013628: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 201362c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013630: 06 80 00 23 bl 20136bc <== NOT EXECUTED 2013634: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2013638: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 201363c: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2013640: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013644: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013648: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 201364c: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 2013650: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013654: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 2013658: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 201365c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013660: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2013664: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2013668: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 201366c: 22 80 00 0a be,a 2013694 <== NOT EXECUTED 2013670: 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); 2013674: 7f ff fd 33 call 2012b40 <== NOT EXECUTED 2013678: 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); 201367c: 7f ff c5 d9 call 2004de0 <== NOT EXECUTED 2013680: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2013684: 40 00 1f 5f call 201b400 <__errno> <== NOT EXECUTED 2013688: 01 00 00 00 nop <== NOT EXECUTED 201368c: 10 80 00 7e b 2013884 <== NOT EXECUTED 2013690: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2013694: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2013698: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 201369c: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 20136a0: 7f ff fd 82 call 2012ca8 <_fat_block_read> <== NOT EXECUTED 20136a4: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 20136a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20136ac: 16 80 00 08 bge 20136cc <== NOT EXECUTED 20136b0: 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); 20136b4: 7f ff fd 23 call 2012b40 <== NOT EXECUTED 20136b8: 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); 20136bc: 7f ff c5 c9 call 2004de0 <== NOT EXECUTED 20136c0: 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 ); 20136c4: 81 c7 e0 08 ret <== NOT EXECUTED 20136c8: 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); 20136cc: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 20136d0: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20136d4: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20136d8: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20136dc: 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, 20136e0: 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); 20136e4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136e8: 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, 20136ec: 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); 20136f0: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20136f4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20136f8: 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); 20136fc: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2013700: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 2013704: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013708: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 201370c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2013710: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2013714: 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); 2013718: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 201371c: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 2013720: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 2013724: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2013728: 7f ff fe 37 call 2013004 <== NOT EXECUTED 201372c: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2013730: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2013734: 02 80 00 0d be 2013768 <== NOT EXECUTED 2013738: 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); 201373c: 7f ff fd 01 call 2012b40 <== NOT EXECUTED 2013740: 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); 2013744: 7f ff c5 a7 call 2004de0 <== NOT EXECUTED 2013748: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 201374c: 81 c7 e0 08 ret 2013750: 81 e8 00 00 restore } } } else { vol->rdir_cl = 0; 2013754: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2013758: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 201375c: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2013760: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2013764: 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); 2013768: 7f ff fc f6 call 2012b40 201376c: 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; 2013770: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013774: 40 00 51 cf call 2027eb0 <.umul> 2013778: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 201377c: 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)); 2013780: 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; 2013784: 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)); 2013788: 90 10 20 02 mov 2, %o0 201378c: 7f ff c8 05 call 20057a0 2013790: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2013794: 80 a2 20 00 cmp %o0, 0 2013798: 02 80 00 12 be 20137e0 <== NEVER TAKEN 201379c: 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 ); 20137a0: 82 02 20 04 add %o0, 4, %g1 20137a4: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 20137a8: 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 ); 20137ac: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20137b0: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20137b4: 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; 20137b8: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 20137bc: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 20137c0: 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)); 20137c4: 92 10 20 0c mov 0xc, %o1 20137c8: 7f ff c7 f6 call 20057a0 20137cc: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 20137d0: 80 a2 20 00 cmp %o0, 0 20137d4: 12 80 00 06 bne 20137ec <== ALWAYS TAKEN 20137d8: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 20137dc: 30 80 00 1c b,a 201384c <== 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); 20137e0: 7f ff c5 80 call 2004de0 <== NOT EXECUTED 20137e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20137e8: 30 80 00 24 b,a 2013878 <== 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 ); 20137ec: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 20137f0: 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 ); 20137f4: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20137f8: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20137fc: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 2013800: 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; 2013804: 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 ); 2013808: 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; 201380c: 82 10 21 00 mov 0x100, %g1 head->next = tail; 2013810: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2013814: c2 27 60 78 st %g1, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2013818: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 201381c: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2013820: 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; 2013824: 83 28 80 01 sll %g2, %g1, %g1 2013828: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 201382c: 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; 2013830: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013834: 7f ff c7 db call 20057a0 2013838: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 201383c: 80 a2 20 00 cmp %o0, 0 2013840: 12 80 00 14 bne 2013890 <== ALWAYS TAKEN 2013844: d0 27 60 70 st %o0, [ %i5 + 0x70 ] 2013848: 30 80 00 05 b,a 201385c <== 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); 201384c: 7f ff c5 65 call 2004de0 <== NOT EXECUTED 2013850: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013854: 10 80 00 07 b 2013870 <== NOT EXECUTED 2013858: 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); 201385c: 7f ff c5 61 call 2004de0 <== NOT EXECUTED 2013860: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013864: 7f ff c9 02 call 2005c6c <== NOT EXECUTED 2013868: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 201386c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2013870: 7f ff c8 ff call 2005c6c <== NOT EXECUTED 2013874: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013878: 40 00 1e e2 call 201b400 <__errno> <== NOT EXECUTED 201387c: 01 00 00 00 nop <== NOT EXECUTED 2013880: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2013884: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2013888: 81 c7 e0 08 ret <== NOT EXECUTED 201388c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2013890: d0 17 40 00 lduh [ %i5 ], %o0 2013894: 7f ff c7 c3 call 20057a0 2013898: 92 10 20 01 mov 1, %o1 201389c: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 20138a0: 80 a2 20 00 cmp %o0, 0 20138a4: 12 bf ff aa bne 201374c <== ALWAYS TAKEN 20138a8: b0 10 20 00 clr %i0 { rtems_disk_release(vol->dd); 20138ac: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20138b0: 7f ff c5 4c call 2004de0 <== NOT EXECUTED 20138b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 20138b8: 7f ff c8 ed call 2005c6c <== NOT EXECUTED 20138bc: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20138c0: 7f ff c8 eb call 2005c6c <== NOT EXECUTED 20138c4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 20138c8: 7f ff c8 e9 call 2005c6c <== NOT EXECUTED 20138cc: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20138d0: 40 00 1e cc call 201b400 <__errno> <== NOT EXECUTED 20138d4: 01 00 00 00 nop <== NOT EXECUTED 20138d8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20138dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 20138e0: 81 c7 e0 08 ret <== NOT EXECUTED 20138e4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019ef0 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019ef0: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019ef4: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 2019ef8: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2019efc: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 2019f00: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019f04: 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; 2019f08: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 2019f0c: 80 a6 a0 00 cmp %i2, 0 2019f10: 02 80 00 16 be 2019f68 <== NEVER TAKEN 2019f14: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2019f18: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 2019f1c: 80 a4 3f ff cmp %l0, -1 2019f20: 22 80 00 02 be,a 2019f28 2019f24: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 2019f28: a6 10 20 02 mov 2, %l3 2019f2c: 10 80 00 55 b 201a080 2019f30: 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); 2019f34: 92 10 00 10 mov %l0, %o1 2019f38: 7f ff fe 9f call 20199b4 2019f3c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019f40: b0 92 20 00 orcc %o0, 0, %i0 2019f44: 02 80 00 0b be 2019f70 <== ALWAYS TAKEN 2019f48: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 2019f4c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2019f50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2019f54: 02 80 00 5b be 201a0c0 <== NOT EXECUTED 2019f58: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019f5c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019f60: 7f ff ff b4 call 2019e30 <== NOT EXECUTED 2019f64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019f68: 81 c7 e0 08 ret <== NOT EXECUTED 2019f6c: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 2019f70: 80 a0 60 00 cmp %g1, 0 2019f74: 32 80 00 3f bne,a 201a070 2019f78: 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) 2019f7c: c2 06 c0 00 ld [ %i3 ], %g1 2019f80: 80 a0 60 00 cmp %g1, 0 2019f84: 12 80 00 0b bne 2019fb0 <== NEVER TAKEN 2019f88: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 2019f8c: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2019f90: 92 10 00 10 mov %l0, %o1 2019f94: 7f ff fe f8 call 2019b74 2019f98: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2019f9c: 80 a2 20 00 cmp %o0, 0 2019fa0: 22 80 00 22 be,a 201a028 <== ALWAYS TAKEN 2019fa4: 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); 2019fa8: 81 c7 e0 08 ret <== NOT EXECUTED 2019fac: 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); 2019fb0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019fb4: 7f ff fe f0 call 2019b74 <== NOT EXECUTED 2019fb8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2019fbc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 2019fc0: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 2019fc4: 02 80 00 07 be 2019fe0 <== NOT EXECUTED 2019fc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019fcc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019fd0: 7f ff ff 98 call 2019e30 <== NOT EXECUTED 2019fd4: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 2019fd8: 81 c7 e0 08 ret <== NOT EXECUTED 2019fdc: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 2019fe0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2019fe4: 7f ff fe e4 call 2019b74 <== NOT EXECUTED 2019fe8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2019fec: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 2019ff0: 22 80 00 0e be,a 201a028 <== NOT EXECUTED 2019ff4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019ff8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019ffc: 7f ff ff 8d call 2019e30 <== NOT EXECUTED 201a000: 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); 201a004: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201a008: 94 10 20 00 clr %o2 <== NOT EXECUTED 201a00c: 7f ff fe da call 2019b74 <== NOT EXECUTED 201a010: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 201a014: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a018: 7f ff e2 ca call 2012b40 <== NOT EXECUTED 201a01c: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 201a020: 81 c7 e0 08 ret <== NOT EXECUTED 201a024: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 201a028: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 201a02c: 80 a0 40 1a cmp %g1, %i2 201a030: 12 80 00 0e bne 201a068 <== NEVER TAKEN 201a034: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 201a038: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 201a03c: 80 a0 7f ff cmp %g1, -1 201a040: 02 80 00 05 be 201a054 <== ALWAYS TAKEN 201a044: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 201a048: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a04c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a050: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a054: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 201a058: 7f ff e2 ba call 2012b40 201a05c: 90 10 00 11 mov %l1, %o0 return rc; 201a060: 81 c7 e0 08 ret 201a064: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 201a068: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201a06c: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 201a070: 80 a4 00 14 cmp %l0, %l4 201a074: 0a 80 00 03 bcs 201a080 <== ALWAYS TAKEN 201a078: a6 04 e0 01 inc %l3 cl4find = 2; 201a07c: 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) 201a080: 80 a4 c0 14 cmp %l3, %l4 201a084: 0a bf ff ac bcs 2019f34 <== ALWAYS TAKEN 201a088: 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) 201a08c: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 201a090: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a094: 02 80 00 05 be 201a0a8 <== NOT EXECUTED 201a098: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201a09c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a0a0: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a0a4: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a0a8: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a0ac: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a0b0: 7f ff e2 a4 call 2012b40 <== NOT EXECUTED 201a0b4: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201a0b8: 81 c7 e0 08 ret <== NOT EXECUTED 201a0bc: 81 e8 00 00 restore <== NOT EXECUTED } 201a0c0: 81 c7 e0 08 ret <== NOT EXECUTED 201a0c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019b74 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2019b74: 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; 2019b78: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2019b7c: 80 a6 60 01 cmp %i1, 1 2019b80: 08 80 00 07 bleu 2019b9c <== NEVER TAKEN 2019b84: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 2019b88: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2019b8c: 82 00 60 01 inc %g1 2019b90: 80 a6 40 01 cmp %i1, %g1 2019b94: 28 80 00 08 bleu,a 2019bb4 <== ALWAYS TAKEN 2019b98: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 2019b9c: 40 00 06 19 call 201b400 <__errno> <== NOT EXECUTED 2019ba0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019ba4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019ba8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019bac: 81 c7 e0 08 ret <== NOT EXECUTED 2019bb0: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2019bb4: b7 36 60 01 srl %i1, 1, %i3 2019bb8: 84 88 60 01 andcc %g1, 1, %g2 2019bbc: 12 80 00 06 bne 2019bd4 <== ALWAYS TAKEN 2019bc0: b6 06 c0 19 add %i3, %i1, %i3 2019bc4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019bc8: 02 80 00 03 be 2019bd4 <== NOT EXECUTED 2019bcc: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 2019bd0: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2019bd4: 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); 2019bd8: 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) + 2019bdc: b7 36 c0 03 srl %i3, %g3, %i3 2019be0: 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); 2019be4: b8 07 00 19 add %i4, %i1, %i4 2019be8: 80 a0 a0 00 cmp %g2, 0 2019bec: 12 80 00 06 bne 2019c04 <== ALWAYS TAKEN 2019bf0: b6 06 c0 03 add %i3, %g3, %i3 2019bf4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019bf8: 02 80 00 03 be 2019c04 <== NOT EXECUTED 2019bfc: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2019c00: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2019c04: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2019c08: 90 10 00 1d mov %i5, %o0 2019c0c: 92 10 00 1b mov %i3, %o1 2019c10: 94 10 20 01 mov 1, %o2 2019c14: 7f ff e3 4c call 2012944 2019c18: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2019c1c: b0 92 20 00 orcc %o0, 0, %i0 2019c20: 12 bf ff e3 bne 2019bac <== NEVER TAKEN 2019c24: 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); 2019c28: a1 34 20 10 srl %l0, 0x10, %l0 2019c2c: a0 04 3f ff add %l0, -1, %l0 2019c30: 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 ) 2019c34: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 2019c38: 80 a7 20 02 cmp %i4, 2 2019c3c: 02 80 00 5f be 2019db8 <== NEVER TAKEN 2019c40: 80 a7 20 04 cmp %i4, 4 2019c44: 02 80 00 65 be 2019dd8 <== NEVER TAKEN 2019c48: 80 a7 20 01 cmp %i4, 1 2019c4c: 12 80 00 73 bne 2019e18 <== NEVER TAKEN 2019c50: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2019c54: 02 80 00 29 be 2019cf8 2019c58: 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; 2019c5c: 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)) = 2019c60: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019c64: 84 08 a0 0f and %g2, 0xf, %g2 2019c68: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019c6c: 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)) = 2019c70: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 2019c74: 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)) = 2019c78: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 2019c7c: 84 10 c0 02 or %g3, %g2, %g2 2019c80: 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) ) 2019c84: c2 17 40 00 lduh [ %i5 ], %g1 2019c88: 82 00 7f ff add %g1, -1, %g1 2019c8c: 80 a4 00 01 cmp %l0, %g1 2019c90: 12 80 00 11 bne 2019cd4 <== ALWAYS TAKEN 2019c94: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019c98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019c9c: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019ca0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019ca4: 7f ff e3 28 call 2012944 <== NOT EXECUTED 2019ca8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019cac: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019cb0: 12 bf ff bf bne 2019bac <== NOT EXECUTED 2019cb4: 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); 2019cb8: 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; 2019cbc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2019cc0: 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; 2019cc4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019cc8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019ccc: 10 80 00 27 b 2019d68 <== NOT EXECUTED 2019cd0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019cd4: c2 07 bf fc ld [ %fp + -4 ], %g1 2019cd8: a0 04 20 01 inc %l0 2019cdc: 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); 2019ce0: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019ce4: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2019ce8: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2019cec: 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))) | 2019cf0: 10 80 00 2d b 2019da4 2019cf4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019cf8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2019cfc: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019d00: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019d04: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d08: 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)) = 2019d0c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d10: 84 16 80 02 or %i2, %g2, %g2 2019d14: 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) ) 2019d18: c2 17 40 00 lduh [ %i5 ], %g1 2019d1c: 82 00 7f ff add %g1, -1, %g1 2019d20: 80 a4 00 01 cmp %l0, %g1 2019d24: 12 80 00 17 bne 2019d80 <== ALWAYS TAKEN 2019d28: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019d2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019d30: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019d34: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019d38: 7f ff e3 03 call 2012944 <== NOT EXECUTED 2019d3c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019d40: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019d44: 12 bf ff 9a bne 2019bac <== NOT EXECUTED 2019d48: 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); 2019d4c: 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; 2019d50: 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)) = 2019d54: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019d58: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2019d5c: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019d60: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019d64: 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)) = 2019d68: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019d6c: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 2019d70: 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; 2019d74: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] <== NOT EXECUTED 2019d78: 81 c7 e0 08 ret <== NOT EXECUTED 2019d7c: 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; 2019d80: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d84: a0 04 20 01 inc %l0 2019d88: 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); 2019d8c: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2019d90: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d94: 84 08 bf f0 and %g2, -16, %g2 2019d98: 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))) | 2019d9c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019da0: 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)) = 2019da4: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019da8: b4 10 80 1a or %g2, %i2, %i2 2019dac: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 2019db0: 81 c7 e0 08 ret 2019db4: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019db8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019dbc: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019dc0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019dc4: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 2019dc8: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2019dcc: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019dd0: 10 80 00 0e b 2019e08 <== NOT EXECUTED 2019dd4: 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)); 2019dd8: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019ddc: 7f ff fe ea call 2019984 <== NOT EXECUTED 2019de0: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019de4: 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)); 2019de8: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019dec: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED 2019df0: 7f ff fe e5 call 2019984 <== NOT EXECUTED 2019df4: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019df8: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 2019dfc: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 2019e00: 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)) = 2019e04: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 2019e08: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2019e0c: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 2019e10: 81 c7 e0 08 ret <== NOT EXECUTED 2019e14: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2019e18: 40 00 05 7a call 201b400 <__errno> <== NOT EXECUTED 2019e1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019e20: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019e24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2019e28: 81 c7 e0 08 ret <== NOT EXECUTED 2019e2c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013078 : * 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) { 2013078: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201307c: 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) { 2013080: 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) 2013084: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 2013088: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 201308c: 02 80 00 08 be 20130ac <== NOT EXECUTED 2013090: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2013094: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2013098: 7f ff ff db call 2013004 <== NOT EXECUTED 201309c: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 20130a0: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 20130a4: 32 80 00 02 bne,a 20130ac <== NOT EXECUTED 20130a8: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 20130ac: 7f ff fe a5 call 2012b40 <== NOT EXECUTED 20130b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 20130b4: 7f ff f9 35 call 2011588 <== NOT EXECUTED 20130b8: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 20130bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20130c0: 32 80 00 02 bne,a 20130c8 <== NOT EXECUTED 20130c4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 20130c8: 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; 20130cc: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 20130d0: 10 80 00 04 b 20130e0 <== NOT EXECUTED 20130d4: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20130d8: 7f ff ca e5 call 2005c6c <== NOT EXECUTED 20130dc: 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 ); 20130e0: 7f ff de 87 call 200aafc <_Chain_Get> <== NOT EXECUTED 20130e4: 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 ) 20130e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20130ec: 12 bf ff fb bne 20130d8 <== NOT EXECUTED 20130f0: 01 00 00 00 nop <== NOT EXECUTED 20130f4: 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++) 20130f8: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20130fc: 32 bf ff f5 bne,a 20130d0 <== NOT EXECUTED 2013100: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED 2013104: 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; 2013108: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 201310c: 10 80 00 04 b 201311c <== NOT EXECUTED 2013110: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 2013114: 7f ff ca d6 call 2005c6c <== NOT EXECUTED 2013118: 01 00 00 00 nop <== NOT EXECUTED 201311c: 7f ff de 78 call 200aafc <_Chain_Get> <== NOT EXECUTED 2013120: 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 ) 2013124: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013128: 12 bf ff fb bne 2013114 <== NOT EXECUTED 201312c: 01 00 00 00 nop <== NOT EXECUTED 2013130: 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++) 2013134: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 2013138: 32 bf ff f5 bne,a 201310c <== NOT EXECUTED 201313c: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2013140: 7f ff ca cb call 2005c6c <== NOT EXECUTED 2013144: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013148: 7f ff ca c9 call 2005c6c <== NOT EXECUTED 201314c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013150: 7f ff ca c7 call 2005c6c <== NOT EXECUTED 2013154: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 2013158: 7f ff ca c5 call 2005c6c <== NOT EXECUTED 201315c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 2013160: 7f ff c7 20 call 2004de0 <== NOT EXECUTED 2013164: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 2013168: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 201316c: 02 80 00 06 be 2013184 <== NOT EXECUTED 2013170: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 2013174: 40 00 20 a3 call 201b400 <__errno> <== NOT EXECUTED 2013178: 01 00 00 00 nop <== NOT EXECUTED 201317c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2013180: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2013184: 81 c7 e0 08 ret <== NOT EXECUTED 2013188: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 02019214 : int fcntl( int fd, int cmd, ... ) { 2019214: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2019218: 05 00 80 6f sethi %hi(0x201bc00), %g2 201921c: c6 00 a1 28 ld [ %g2 + 0x128 ], %g3 ! 201bd28 ... ) { int ret; va_list ap; va_start( ap, cmd ); 2019220: 82 07 a0 4c add %fp, 0x4c, %g1 2019224: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2019228: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201922c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2019230: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2019234: 80 a6 00 03 cmp %i0, %g3 2019238: 1a 80 00 0a bcc 2019260 201923c: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 2019240: 05 00 80 71 sethi %hi(0x201c400), %g2 2019244: c4 00 a3 84 ld [ %g2 + 0x384 ], %g2 ! 201c784 2019248: bb 2e 20 06 sll %i0, 6, %i5 201924c: ba 00 80 1d add %g2, %i5, %i5 rtems_libio_check_is_open(iop); 2019250: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 2019254: 80 8a 21 00 btst 0x100, %o0 2019258: 12 80 00 06 bne 2019270 201925c: 80 a6 60 09 cmp %i1, 9 2019260: 7f ff d5 18 call 200e6c0 <__errno> 2019264: 01 00 00 00 nop 2019268: 10 80 00 40 b 2019368 201926c: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2019270: 18 80 00 3b bgu 201935c 2019274: 89 2e 60 02 sll %i1, 2, %g4 2019278: 39 00 80 64 sethi %hi(0x2019000), %i4 201927c: b8 17 21 ec or %i4, 0x1ec, %i4 ! 20191ec <_calloc_r+0x14> 2019280: c8 07 00 04 ld [ %i4 + %g4 ], %g4 2019284: 81 c1 00 00 jmp %g4 2019288: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 201928c: c2 00 40 00 ld [ %g1 ], %g1 if ( fd2 ) 2019290: 80 a0 60 00 cmp %g1, 0 2019294: 02 80 00 07 be 20192b0 2019298: 80 a0 40 03 cmp %g1, %g3 diop = rtems_libio_iop( fd2 ); 201929c: 1a 80 00 0a bcc 20192c4 <== NEVER TAKEN 20192a0: b8 10 20 00 clr %i4 20192a4: b9 28 60 06 sll %g1, 6, %i4 20192a8: 10 80 00 07 b 20192c4 20192ac: b8 00 80 1c add %g2, %i4, %i4 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 20192b0: 7f ff a8 fd call 20036a4 20192b4: 01 00 00 00 nop if ( diop == 0 ) { 20192b8: b8 92 20 00 orcc %o0, 0, %i4 20192bc: 02 80 00 3d be 20193b0 <== NEVER TAKEN 20192c0: 01 00 00 00 nop ret = -1; break; } } diop->flags = iop->flags; 20192c4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 diop->pathinfo = iop->pathinfo; 20192c8: 90 07 20 1c add %i4, 0x1c, %o0 ret = -1; break; } } diop->flags = iop->flags; 20192cc: c2 27 20 18 st %g1, [ %i4 + 0x18 ] diop->pathinfo = iop->pathinfo; 20192d0: 92 07 60 1c add %i5, 0x1c, %o1 20192d4: 7f ff d8 78 call 200f4b4 20192d8: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 20192dc: 03 00 80 71 sethi %hi(0x201c400), %g1 20192e0: f0 00 63 84 ld [ %g1 + 0x384 ], %i0 ! 201c784 20192e4: b8 27 00 18 sub %i4, %i0, %i4 20192e8: 10 80 00 22 b 2019370 20192ec: b1 3f 20 06 sra %i4, 6, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 20192f0: 90 0a 28 00 and %o0, 0x800, %o0 20192f4: 80 a0 00 08 cmp %g0, %o0 20192f8: 10 80 00 21 b 201937c 20192fc: 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 ) ) 2019300: c2 00 40 00 ld [ %g1 ], %g1 2019304: 80 a0 60 00 cmp %g1, 0 2019308: 22 80 00 0e be,a 2019340 201930c: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2019310: 10 80 00 0c b 2019340 2019314: 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 ); 2019318: 7f ff a8 cd call 200364c 201931c: 01 00 00 00 nop 2019320: 10 80 00 14 b 2019370 2019324: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2019328: 7f ff a8 bc call 2003618 201932c: 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); 2019330: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2019334: 90 0a 22 01 and %o0, 0x201, %o0 2019338: 82 08 7d fe and %g1, -514, %g1 201933c: 90 12 00 01 or %o0, %g1, %o0 2019340: 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; 2019344: 10 80 00 0e b 201937c 2019348: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 201934c: 7f ff d4 dd call 200e6c0 <__errno> 2019350: 01 00 00 00 nop 2019354: 10 80 00 05 b 2019368 2019358: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 201935c: 7f ff d4 d9 call 200e6c0 <__errno> 2019360: 01 00 00 00 nop 2019364: 82 10 20 16 mov 0x16, %g1 ! 16 2019368: 10 80 00 12 b 20193b0 201936c: 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) { 2019370: 80 a6 20 00 cmp %i0, 0 2019374: 06 80 00 0d bl 20193a8 <== NEVER TAKEN 2019378: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 201937c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 2019380: 92 10 00 1d mov %i5, %o1 2019384: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2019388: 9f c0 40 00 call %g1 201938c: 90 10 00 19 mov %i1, %o0 if (err) { 2019390: ba 92 20 00 orcc %o0, 0, %i5 2019394: 02 80 00 05 be 20193a8 <== ALWAYS TAKEN 2019398: 01 00 00 00 nop errno = err; 201939c: 7f ff d4 c9 call 200e6c0 <__errno> <== NOT EXECUTED 20193a0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20193a4: 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; } 20193a8: 81 c7 e0 08 ret 20193ac: 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); 20193b0: 81 c7 e0 08 ret 20193b4: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200cb4c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cb4c: 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) { 200cb50: 37 00 80 7e sethi %hi(0x201f800), %i3 200cb54: c2 06 e1 f0 ld [ %i3 + 0x1f0 ], %g1 ! 201f9f0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cb58: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200cb5c: 80 a0 60 00 cmp %g1, 0 200cb60: 12 80 00 1a bne 200cbc8 200cb64: b8 16 e1 f0 or %i3, 0x1f0, %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 ); 200cb68: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb6c: d0 00 63 70 ld [ %g1 + 0x370 ], %o0 ! 201fb70 200cb70: 92 10 20 00 clr %o1 200cb74: 7f ff ed 3a call 200805c 200cb78: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200cb7c: c2 06 e1 f0 ld [ %i3 + 0x1f0 ], %g1 200cb80: 80 a0 60 00 cmp %g1, 0 200cb84: 12 80 00 0a bne 200cbac <== NEVER TAKEN 200cb88: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200cb8c: 11 14 12 54 sethi %hi(0x50495000), %o0 200cb90: 92 10 20 01 mov 1, %o1 200cb94: 90 12 20 45 or %o0, 0x45, %o0 200cb98: 94 10 20 54 mov 0x54, %o2 200cb9c: 96 10 20 00 clr %o3 200cba0: 7f ff ec 95 call 2007df4 200cba4: 98 10 00 1c mov %i4, %o4 200cba8: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200cbac: 03 00 80 7e sethi %hi(0x201f800), %g1 200cbb0: d0 00 63 70 ld [ %g1 + 0x370 ], %o0 ! 201fb70 200cbb4: 7f ff ed 74 call 2008184 200cbb8: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200cbbc: 80 a6 e0 00 cmp %i3, 0 200cbc0: 12 80 00 e1 bne 200cf44 200cbc4: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200cbc8: 03 00 80 7e sethi %hi(0x201f800), %g1 200cbcc: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 ! 201f9f0 200cbd0: 92 10 20 00 clr %o1 200cbd4: 94 10 20 00 clr %o2 200cbd8: 7f ff ed 21 call 200805c 200cbdc: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200cbe0: 80 a2 20 00 cmp %o0, 0 200cbe4: 12 80 00 d8 bne 200cf44 <== NEVER TAKEN 200cbe8: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200cbec: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200cbf0: 80 a7 20 00 cmp %i4, 0 200cbf4: 32 80 00 44 bne,a 200cd04 200cbf8: 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)); 200cbfc: 7f ff e0 2f call 2004cb8 200cc00: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200cc04: b8 92 20 00 orcc %o0, 0, %i4 200cc08: 02 80 00 3c be 200ccf8 200cc0c: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200cc10: 40 00 0e 71 call 20105d4 200cc14: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200cc18: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200cc1c: 90 10 22 00 mov 0x200, %o0 200cc20: 7f ff e0 26 call 2004cb8 200cc24: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200cc28: 80 a2 20 00 cmp %o0, 0 200cc2c: 02 80 00 31 be 200ccf0 <== NEVER TAKEN 200cc30: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200cc34: 37 00 80 7c sethi %hi(0x201f000), %i3 200cc38: d0 4e e2 74 ldsb [ %i3 + 0x274 ], %o0 ! 201f274 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200cc3c: 35 14 12 5c sethi %hi(0x50497000), %i2 200cc40: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200cc44: 92 10 20 00 clr %o1 200cc48: 90 12 00 01 or %o0, %g1, %o0 200cc4c: 94 10 20 00 clr %o2 200cc50: 40 00 04 0f call 200dc8c 200cc54: 96 07 20 2c add %i4, 0x2c, %o3 200cc58: 80 a2 20 00 cmp %o0, 0 200cc5c: 12 80 00 23 bne 200cce8 200cc60: d0 4e e2 74 ldsb [ %i3 + 0x274 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200cc64: 03 14 12 5d sethi %hi(0x50497400), %g1 200cc68: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200cc6c: 92 10 20 00 clr %o1 200cc70: 90 12 00 01 or %o0, %g1, %o0 200cc74: 94 10 20 00 clr %o2 200cc78: 40 00 04 05 call 200dc8c 200cc7c: 96 07 20 30 add %i4, 0x30, %o3 200cc80: 80 a2 20 00 cmp %o0, 0 200cc84: 12 80 00 17 bne 200cce0 200cc88: d0 4e e2 74 ldsb [ %i3 + 0x274 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200cc8c: b4 16 a3 00 or %i2, 0x300, %i2 200cc90: 92 10 20 01 mov 1, %o1 200cc94: 90 12 00 1a or %o0, %i2, %o0 200cc98: 94 10 20 10 mov 0x10, %o2 200cc9c: 96 10 20 00 clr %o3 200cca0: 7f ff ec 55 call 2007df4 200cca4: 98 07 20 28 add %i4, 0x28, %o4 200cca8: 80 a2 20 00 cmp %o0, 0 200ccac: 12 80 00 0b bne 200ccd8 200ccb0: c2 0e e2 74 ldub [ %i3 + 0x274 ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200ccb4: 84 00 60 01 add %g1, 1, %g2 200ccb8: 83 28 60 18 sll %g1, 0x18, %g1 200ccbc: 83 38 60 18 sra %g1, 0x18, %g1 200ccc0: 80 a0 60 7a cmp %g1, 0x7a 200ccc4: 12 80 00 0f bne 200cd00 200ccc8: c4 2e e2 74 stb %g2, [ %i3 + 0x274 ] c = 'a'; 200cccc: 82 10 20 61 mov 0x61, %g1 200ccd0: 10 80 00 0c b 200cd00 200ccd4: c2 2e e2 74 stb %g1, [ %i3 + 0x274 ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200ccd8: 40 00 04 1e call 200dd50 200ccdc: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200cce0: 40 00 04 1c call 200dd50 200cce4: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200cce8: 7f ff de 0f call 2004524 200ccec: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200ccf0: 7f ff de 0d call 2004524 200ccf4: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200ccf8: 10 80 00 13 b 200cd44 200ccfc: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cd00: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cd04: 92 10 20 00 clr %o1 200cd08: 7f ff ec d5 call 200805c 200cd0c: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200cd10: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cd14: 80 a0 00 08 cmp %g0, %o0 200cd18: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200cd1c: 80 a0 60 00 cmp %g1, 0 200cd20: 12 80 00 09 bne 200cd44 200cd24: b0 0e 3f fc and %i0, -4, %i0 if (err) 200cd28: 80 a6 20 00 cmp %i0, 0 200cd2c: 22 80 00 06 be,a 200cd44 <== ALWAYS TAKEN 200cd30: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200cd34: 7f ff ff 49 call 200ca58 <== NOT EXECUTED 200cd38: 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); 200cd3c: 10 80 00 03 b 200cd48 <== NOT EXECUTED 200cd40: 03 00 80 7e sethi %hi(0x201f800), %g1 <== NOT EXECUTED 200cd44: 03 00 80 7e sethi %hi(0x201f800), %g1 200cd48: 7f ff ed 0f call 2008184 200cd4c: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 ! 201f9f0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200cd50: 80 a6 20 00 cmp %i0, 0 200cd54: 12 80 00 7c bne 200cf44 200cd58: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200cd5c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cd60: 82 08 60 06 and %g1, 6, %g1 200cd64: 80 a0 60 04 cmp %g1, 4 200cd68: 02 80 00 2e be 200ce20 200cd6c: f8 07 40 00 ld [ %i5 ], %i4 200cd70: 80 a0 60 06 cmp %g1, 6 200cd74: 02 80 00 56 be 200cecc 200cd78: 80 a0 60 02 cmp %g1, 2 200cd7c: 12 80 00 6a bne 200cf24 <== NEVER TAKEN 200cd80: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200cd84: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200cd88: 82 00 60 01 inc %g1 200cd8c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200cd90: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cd94: 84 00 60 01 add %g1, 1, %g2 200cd98: 80 a0 60 00 cmp %g1, 0 200cd9c: 12 80 00 05 bne 200cdb0 <== NEVER TAKEN 200cda0: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200cda4: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200cda8: 40 00 04 13 call 200ddf4 200cdac: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200cdb0: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cdb4: 80 a0 60 00 cmp %g1, 0 200cdb8: 12 80 00 5b bne 200cf24 200cdbc: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200cdc0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cdc4: 80 88 60 01 btst 1, %g1 200cdc8: 12 80 00 57 bne 200cf24 200cdcc: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200cdd0: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200cdd4: 7f ff ec ec call 2008184 200cdd8: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200cddc: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cde0: 40 00 04 1c call 200de50 200cde4: 92 10 20 00 clr %o1 200cde8: 80 a2 20 00 cmp %o0, 0 200cdec: 12 80 00 52 bne 200cf34 <== NEVER TAKEN 200cdf0: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200cdf4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cdf8: 7f ff ec 99 call 200805c 200cdfc: 94 10 20 00 clr %o2 200ce00: 80 a2 20 00 cmp %o0, 0 200ce04: 32 80 00 4d bne,a 200cf38 <== NEVER TAKEN 200ce08: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200ce0c: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200ce10: 80 a6 c0 01 cmp %i3, %g1 200ce14: 02 bf ff f0 be 200cdd4 <== NEVER TAKEN 200ce18: 01 00 00 00 nop 200ce1c: 30 80 00 42 b,a 200cf24 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200ce20: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200ce24: 82 00 60 01 inc %g1 200ce28: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200ce2c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200ce30: 84 00 60 01 add %g1, 1, %g2 200ce34: 80 a0 60 00 cmp %g1, 0 200ce38: 12 80 00 05 bne 200ce4c <== NEVER TAKEN 200ce3c: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200ce40: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200ce44: 40 00 03 ec call 200ddf4 200ce48: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200ce4c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200ce50: 80 a0 60 00 cmp %g1, 0 200ce54: 12 80 00 34 bne 200cf24 200ce58: 01 00 00 00 nop 200ce5c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ce60: 80 88 60 01 btst 1, %g1 200ce64: 22 80 00 07 be,a 200ce80 200ce68: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200ce6c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ce70: 7f ff ec c5 call 2008184 200ce74: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200ce78: 10 80 00 31 b 200cf3c 200ce7c: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200ce80: 7f ff ec c1 call 2008184 200ce84: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200ce88: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200ce8c: 40 00 03 f1 call 200de50 200ce90: 92 10 20 00 clr %o1 200ce94: 80 a2 20 00 cmp %o0, 0 200ce98: 12 80 00 27 bne 200cf34 <== NEVER TAKEN 200ce9c: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200cea0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cea4: 7f ff ec 6e call 200805c 200cea8: 94 10 20 00 clr %o2 200ceac: 80 a2 20 00 cmp %o0, 0 200ceb0: 32 80 00 22 bne,a 200cf38 <== NEVER TAKEN 200ceb4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200ceb8: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200cebc: 80 a6 c0 01 cmp %i3, %g1 200cec0: 02 bf ff f0 be 200ce80 <== NEVER TAKEN 200cec4: 01 00 00 00 nop 200cec8: 30 80 00 17 b,a 200cf24 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200cecc: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ced0: 82 00 60 01 inc %g1 200ced4: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200ced8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cedc: 84 00 60 01 add %g1, 1, %g2 200cee0: 80 a0 60 00 cmp %g1, 0 200cee4: 12 80 00 05 bne 200cef8 <== NEVER TAKEN 200cee8: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200ceec: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200cef0: 40 00 03 c1 call 200ddf4 200cef4: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; 200cef8: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cefc: 82 00 60 01 inc %g1 200cf00: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200cf04: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cf08: 84 00 60 01 add %g1, 1, %g2 200cf0c: 80 a0 60 00 cmp %g1, 0 200cf10: 12 80 00 05 bne 200cf24 <== NEVER TAKEN 200cf14: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200cf18: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cf1c: 40 00 03 b6 call 200ddf4 200cf20: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200cf24: 7f ff ec 98 call 2008184 200cf28: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200cf2c: 81 c7 e0 08 ret 200cf30: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200cf34: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200cf38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200cf3c: 7f ff fe d2 call 200ca84 200cf40: 92 10 00 19 mov %i1, %o1 return err; } 200cf44: 81 c7 e0 08 ret 200cf48: 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 57 sethi %hi(0x2015c00), %g1 200353c: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 2015cb8 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 59 sethi %hi(0x2016400), %g1 2003550: c2 00 62 84 ld [ %g1 + 0x284 ], %g1 ! 2016684 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 2c 87 call 200e788 <__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 2c 55 call 200e788 <__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 6c sethi %hi(0x201b000), %g1 2002ddc: 82 10 63 70 or %g1, 0x370, %g1 ! 201b370 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 6d sethi %hi(0x201b400), %g1 2002dfc: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201b674 <_System_state_Current> 2002e00: 80 a0 60 03 cmp %g1, 3 2002e04: 12 80 00 09 bne 2002e28 <== NEVER TAKEN 2002e08: 03 00 80 6c sethi %hi(0x201b000), %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 6c sethi %hi(0x201b000), %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 60 b8 ld [ %g1 + 0xb8 ], %g1 2002e2c: 80 a0 60 00 cmp %g1, 0 2002e30: 02 80 00 06 be 2002e48 2002e34: 3b 00 80 6a sethi %hi(0x201a800), %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 6a sethi %hi(0x201a800), %i5 2002e48: d0 07 61 10 ld [ %i5 + 0x110 ], %o0 ! 201a910 2002e4c: 40 00 14 9c call 20080bc <_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 65 sethi %hi(0x2019400), %i0 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 2002e60: c2 07 61 10 ld [ %i5 + 0x110 ], %g1 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2002e64: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2002e68: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2002e6c: 40 00 03 7a call 2003c54 2002e70: 91 ee 21 98 restore %i0, 0x198, %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 86 sethi %hi(0x2021800), %g1 200627c: 82 10 61 1c or %g1, 0x11c, %g1 ! 202191c 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 61 sethi %hi(0x2018400), %g1 200272c: c4 00 62 b4 ld [ %g1 + 0x2b4 ], %g2 ! 20186b4 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 61 sethi %hi(0x2018400), %g2 2002740: c4 00 a2 b8 ld [ %g2 + 0x2b8 ], %g2 ! 20186b8 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 =============================================================================== 02019480 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2019480: 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 ); 2019484: 03 00 80 6f sethi %hi(0x201bc00), %g1 2019488: c2 00 61 28 ld [ %g1 + 0x128 ], %g1 ! 201bd28 201948c: 80 a6 00 01 cmp %i0, %g1 2019490: 1a 80 00 06 bcc 20194a8 <== NEVER TAKEN 2019494: ba 10 20 00 clr %i5 2019498: 03 00 80 71 sethi %hi(0x201c400), %g1 201949c: fa 00 63 84 ld [ %g1 + 0x384 ], %i5 ! 201c784 20194a0: b1 2e 20 06 sll %i0, 6, %i0 20194a4: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 20194a8: 92 07 60 1c add %i5, 0x1c, %o1 20194ac: 94 10 20 14 mov 0x14, %o2 20194b0: 7f ff d8 01 call 200f4b4 20194b4: 90 07 bf ec add %fp, -20, %o0 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 20194b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 20194bc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 20194c0: 9f c0 40 00 call %g1 20194c4: 90 07 bf ec add %fp, -20, %o0 20194c8: 80 a2 20 01 cmp %o0, 1 20194cc: 22 80 00 08 be,a 20194ec 20194d0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 20194d4: 7f ff d4 7b call 200e6c0 <__errno> 20194d8: b0 10 3f ff mov -1, %i0 20194dc: 82 10 20 14 mov 0x14, %g1 20194e0: c2 22 00 00 st %g1, [ %o0 ] 20194e4: 81 c7 e0 08 ret 20194e8: 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 ); 20194ec: 90 10 00 1d mov %i5, %o0 20194f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 20194f4: 92 10 00 19 mov %i1, %o1 20194f8: 9f c0 40 00 call %g1 20194fc: 94 10 00 1a mov %i2, %o2 } 2019500: 81 c7 e0 08 ret 2019504: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02002e7c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 2002e7c: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 2002e80: 80 a6 20 00 cmp %i0, 0 2002e84: 12 80 00 08 bne 2002ea4 <== ALWAYS TAKEN 2002e88: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 2002e8c: 40 00 2b 9a call 200dcf4 <__errno> <== NOT EXECUTED 2002e90: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2002e94: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2002e98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002e9c: 81 c7 e0 08 ret <== NOT EXECUTED 2002ea0: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 2002ea4: 7f ff fc b6 call 200217c 2002ea8: 01 00 00 00 nop 2002eac: ba 10 00 08 mov %o0, %i5 _TOD_Get( &now ); 2002eb0: 40 00 11 13 call 20072fc <_TOD_Get> 2002eb4: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 2002eb8: 7f ff fc b5 call 200218c 2002ebc: 90 10 00 1d mov %i5, %o0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 2002ec0: c2 07 bf f8 ld [ %fp + -8 ], %g1 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2002ec4: d0 07 bf fc ld [ %fp + -4 ], %o0 time->tv_sec = now.tv_sec; 2002ec8: c2 26 00 00 st %g1, [ %i0 ] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2002ecc: 40 00 4f 06 call 2016ae4 <.div> 2002ed0: 92 10 23 e8 mov 0x3e8, %o1 time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2002ed4: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 2002ed8: 81 c7 e0 08 ret 2002edc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d414 : 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 ) 200d414: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200d418: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200d41c: 80 a0 a0 01 cmp %g2, 1 200d420: 12 80 00 05 bne 200d434 <== NEVER TAKEN 200d424: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 200d428: c0 22 20 10 clr [ %o0 + 0x10 ] 200d42c: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 200d430: 82 10 20 00 clr %g1 } 200d434: 81 c3 e0 08 retl 200d438: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200d640 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200d640: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200d644: 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 ) ) 200d648: 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 ); 200d64c: 82 07 60 54 add %i5, 0x54, %g1 200d650: 80 a0 80 01 cmp %g2, %g1 200d654: 22 80 00 06 be,a 200d66c 200d658: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 200d65c: 40 00 01 a6 call 200dcf4 <__errno> 200d660: 01 00 00 00 nop 200d664: 10 80 00 0d b 200d698 200d668: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 200d66c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200d670: 80 a0 40 1d cmp %g1, %i5 200d674: 02 80 00 06 be 200d68c 200d678: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 200d67c: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 200d680: 80 a0 60 00 cmp %g1, 0 200d684: 02 80 00 08 be 200d6a4 <== ALWAYS TAKEN 200d688: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 200d68c: 40 00 01 9a call 200dcf4 <__errno> 200d690: 01 00 00 00 nop 200d694: 82 10 20 10 mov 0x10, %g1 ! 10 200d698: c2 22 00 00 st %g1, [ %o0 ] 200d69c: 81 c7 e0 08 ret 200d6a0: 91 e8 3f ff restore %g0, -1, %o0 IMFS_create_orphan( the_jnode ); 200d6a4: 7f ff f6 24 call 200af34 200d6a8: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 200d6ac: 90 10 00 1d mov %i5, %o0 200d6b0: 7f ff f6 33 call 200af7c 200d6b4: b0 10 20 00 clr %i0 return 0; } 200d6b8: 81 c7 e0 08 ret 200d6bc: 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 59 sethi %hi(0x2016400), %g1 2003484: c4 48 60 48 ldsb [ %g1 + 0x48 ], %g2 ! 2016448 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 48 stb %g2, [ %g1 + 0x48 ] mkdir("/etc", 0777); 20034a0: 11 00 80 54 sethi %hi(0x2015000), %o0 20034a4: 40 00 02 53 call 2003df0 20034a8: 90 12 21 70 or %o0, 0x170, %o0 ! 2015170 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 20034ac: 3b 00 80 54 sethi %hi(0x2015000), %i5 20034b0: 13 00 80 54 sethi %hi(0x2015000), %o1 20034b4: 90 17 61 78 or %i5, 0x178, %o0 20034b8: 40 00 2e b6 call 200ef90 20034bc: 92 12 61 88 or %o1, 0x188, %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 61 78 or %i5, 0x178, %o0 20034d0: 13 00 80 54 sethi %hi(0x2015000), %o1 20034d4: 40 00 2e af call 200ef90 20034d8: 92 12 61 90 or %o1, 0x190, %o1 ! 2015190 20034dc: b0 92 20 00 orcc %o0, 0, %i0 20034e0: 02 80 00 08 be 2003500 <== NEVER TAKEN 20034e4: 11 00 80 54 sethi %hi(0x2015000), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 20034e8: 92 10 00 18 mov %i0, %o1 20034ec: 40 00 2e d5 call 200f040 20034f0: 90 12 21 98 or %o0, 0x198, %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 2c c7 call 200e814 20034fc: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2003500: 3b 00 80 54 sethi %hi(0x2015000), %i5 2003504: 13 00 80 54 sethi %hi(0x2015000), %o1 2003508: 90 17 62 00 or %i5, 0x200, %o0 200350c: 40 00 2e a1 call 200ef90 2003510: 92 12 61 88 or %o1, 0x188, %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 62 00 or %i5, 0x200, %o0 2003524: 13 00 80 54 sethi %hi(0x2015000), %o1 2003528: 40 00 2e 9a call 200ef90 200352c: 92 12 61 90 or %o1, 0x190, %o1 ! 2015190 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 54 sethi %hi(0x2015000), %o0 2003540: 92 10 00 18 mov %i0, %o1 2003544: 40 00 2e bf call 200f040 2003548: 90 12 22 10 or %o0, 0x210, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 200354c: 40 00 2c b2 call 200e814 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 6a sethi %hi(0x201a800), %g1 2004d6c: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 201abbc <__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 6a sethi %hi(0x201a800), %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 6a sethi %hi(0x201a800), %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 6a sethi %hi(0x201a800), %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 62 34 ld [ %g1 + 0x234 ], %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 =============================================================================== 020182b0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 20182b0: 81 c3 e0 08 retl <== NOT EXECUTED 20182b4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 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 6d sethi %hi(0x201b400), %g1 2003674: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201b674 <_System_state_Current> 2003678: 80 a0 60 03 cmp %g1, 3 200367c: 12 80 00 16 bne 20036d4 <== NEVER TAKEN 2003680: 39 00 80 6a sethi %hi(0x201a800), %i4 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 2003684: 03 00 80 67 sethi %hi(0x2019c00), %g1 2003688: fa 00 61 a8 ld [ %g1 + 0x1a8 ], %i5 ! 2019da8 <_global_impure_ptr> 200368c: c2 07 23 c0 ld [ %i4 + 0x3c0 ], %g1 2003690: 80 a0 40 1d cmp %g1, %i5 2003694: 22 80 00 06 be,a 20036ac 2003698: 3b 00 80 6a sethi %hi(0x201a800), %i5 _wrapup_reent(_global_impure_ptr); 200369c: 40 00 2c d2 call 200e9e4 <_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 23 c0 st %i5, [ %i4 + 0x3c0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20036a8: 3b 00 80 6a sethi %hi(0x201a800), %i5 20036ac: c2 07 63 c0 ld [ %i5 + 0x3c0 ], %g1 ! 201abc0 <_impure_ptr> 20036b0: 40 00 29 e3 call 200de3c 20036b4: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20036b8: c2 07 63 c0 ld [ %i5 + 0x3c0 ], %g1 20036bc: 40 00 29 e0 call 200de3c 20036c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20036c4: c2 07 63 c0 ld [ %i5 + 0x3c0 ], %g1 20036c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20036cc: 40 00 29 dc call 200de3c 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 6c sethi %hi(0x201b000), %g1 2003150: 82 10 63 70 or %g1, 0x370, %g1 ! 201b370 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 6d sethi %hi(0x201b400), %g1 2003178: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201b674 <_System_state_Current> 200317c: 80 a0 60 03 cmp %g1, 3 2003180: 12 80 00 07 bne 200319c 2003184: 03 00 80 6a sethi %hi(0x201a800), %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 6a sethi %hi(0x201a800), %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 61 10 ld [ %g1 + 0x110 ], %o0 ! 201a910 20031a0: 92 10 00 1d mov %i5, %o1 20031a4: 94 10 20 00 clr %o2 20031a8: 40 00 13 b7 call 2008084 <_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 6c sethi %hi(0x201b000), %g1 if (rtems_malloc_sbrk_helpers) 20031bc: 03 00 80 6c sethi %hi(0x201b000), %g1 20031c0: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1 ! 201b0b4 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 6c sethi %hi(0x201b000), %g1 errno = ENOMEM; 20031e8: 40 00 2a c3 call 200dcf4 <__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 60 b0 ld [ %g1 + 0xb0 ], %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 6c sethi %hi(0x201b000), %g1 200321c: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 201b0b8 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 54 sethi %hi(0x2015000), %g1 2002f48: fa 00 60 c8 ld [ %g1 + 0xc8 ], %i5 ! 20150c8 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 38 d5 call 20112b0 <.udiv> 2002f60: 90 06 00 1d add %i0, %i5, %o0 2002f64: 40 00 38 99 call 20111c8 <.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 51 sethi %hi(0x2014400), %i4 2002f84: d0 07 21 20 ld [ %i4 + 0x120 ], %o0 ! 2014520 2002f88: 40 00 13 54 call 2007cd8 <_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 54 sethi %hi(0x2015000), %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 2b 0a call 200dbcc <__errno> 2002fa8: b0 10 20 00 clr %i0 2002fac: 82 10 20 0c mov 0xc, %g1 2002fb0: c2 22 00 00 st %g1, [ %o0 ] 2002fb4: 81 c7 e0 08 ret 2002fb8: 81 e8 00 00 restore 2002fbc: f0 07 21 20 ld [ %i4 + 0x120 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2002fc0: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 2002fc4: b4 10 20 00 clr %i2 2002fc8: ba 07 40 02 add %i5, %g2, %i5 2002fcc: fa 20 60 98 st %i5, [ %g1 + 0x98 ] 2002fd0: 40 00 13 34 call 2007ca0 <_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 54 sethi %hi(0x2015000), %g1 2002fec: f2 20 60 c8 st %i1, [ %g1 + 0xc8 ] ! 20150c8 * 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 18 call 2006870 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 =============================================================================== 0200d0e8 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d0e8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d0ec: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d0f0: 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 ) 200d0f4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d0f8: 80 a0 40 19 cmp %g1, %i1 200d0fc: 06 80 00 09 bl 200d120 <== NEVER TAKEN 200d100: 94 10 00 1a mov %i2, %o2 200d104: 80 a0 40 19 cmp %g1, %i1 200d108: 32 80 00 0a bne,a 200d130 200d10c: d2 27 60 50 st %o1, [ %i5 + 0x50 ] 200d110: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200d114: 80 a0 40 1a cmp %g1, %i2 200d118: 3a 80 00 06 bcc,a 200d130 200d11c: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200d120: 7f ff ff 01 call 200cd24 200d124: 90 10 00 1d mov %i5, %o0 200d128: 81 c7 e0 08 ret 200d12c: 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; 200d130: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200d134: d2 26 20 08 st %o1, [ %i0 + 8 ] 200d138: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200d13c: 90 07 bf f8 add %fp, -8, %o0 200d140: 7f ff d7 4f call 2002e7c 200d144: 92 10 20 00 clr %o1 200d148: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d14c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200d150: 81 c7 e0 08 ret 200d154: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d158 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200d158: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d15c: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 if (the_jnode->type == IMFS_LINEAR_FILE) { 200d160: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d164: 80 a0 60 06 cmp %g1, 6 200d168: 32 80 00 11 bne,a 200d1ac 200d16c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200d170: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d174: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200d178: 80 a0 c0 01 cmp %g3, %g1 200d17c: 14 80 00 09 bg 200d1a0 <== NEVER TAKEN 200d180: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200d184: 80 a0 c0 01 cmp %g3, %g1 200d188: 32 80 00 19 bne,a 200d1ec <== NEVER TAKEN 200d18c: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200d190: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200d194: 80 a0 c0 02 cmp %g3, %g2 200d198: 28 80 00 15 bleu,a 200d1ec <== ALWAYS TAKEN 200d19c: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200d1a0: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200d1a4: 10 80 00 11 b 200d1e8 <== NOT EXECUTED 200d1a8: 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 )) 200d1ac: 90 10 00 1d mov %i5, %o0 200d1b0: 92 10 00 02 mov %g2, %o1 200d1b4: 7f ff fe dc call 200cd24 200d1b8: 94 10 00 03 mov %g3, %o2 200d1bc: 80 a2 20 00 cmp %o0, 0 200d1c0: 22 80 00 09 be,a 200d1e4 200d1c4: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200d1c8: 40 00 02 cb call 200dcf4 <__errno> 200d1cc: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200d1d0: 82 10 20 1c mov 0x1c, %g1 200d1d4: c2 22 00 00 st %g1, [ %o0 ] 200d1d8: b0 16 23 ff or %i0, 0x3ff, %i0 200d1dc: 81 c7 e0 08 ret 200d1e0: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200d1e4: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200d1e8: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200d1ec: 81 c7 e0 08 ret 200d1f0: 81 e8 00 00 restore =============================================================================== 0200d04c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d04c: 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)) 200d050: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d054: 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)) 200d058: 80 88 62 04 btst 0x204, %g1 200d05c: 02 80 00 19 be 200d0c0 200d060: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200d064: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d068: 80 a0 60 06 cmp %g1, 6 200d06c: 32 80 00 16 bne,a 200d0c4 <== ALWAYS TAKEN 200d070: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200d074: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200d078: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200d07c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200d080: 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; 200d084: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; 200d088: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200d08c: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200d090: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200d094: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200d098: 02 80 00 0a be 200d0c0 <== NOT EXECUTED 200d09c: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200d0a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d0a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d0a8: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d0ac: 7f ff ff 75 call 200ce80 <== NOT EXECUTED 200d0b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200d0b4: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200d0b8: 02 80 00 0a be 200d0e0 <== NOT EXECUTED 200d0bc: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200d0c0: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200d0c4: 80 88 62 00 btst 0x200, %g1 200d0c8: 02 80 00 04 be 200d0d8 200d0cc: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200d0d0: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200d0d4: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200d0d8: 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; 200d0dc: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200d0e0: 81 c7 e0 08 ret 200d0e4: 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 a5 call 200b664 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 2a 44 call 200dcf4 <__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 64 sethi %hi(0x2019000), %l3 2003408: a6 14 e0 a0 or %l3, 0xa0, %l3 ! 20190a0 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 200340c: 40 00 2f d2 call 200f354 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 2f cc call 200f354 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 2f c9 call 200f354 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 2c 7e call 200e664 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 2c 78 call 200e664 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 2c 72 call 200e664 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 65 sethi %hi(0x2019400), %o1 20034b8: 94 10 20 30 mov 0x30, %o2 20034bc: 40 00 2c 6a call 200e664 20034c0: 92 12 61 d0 or %o1, 0x1d0, %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 6a sethi %hi(0x201a800), %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 2a 07 call 200dcf4 <__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 29 f3 call 200dcf4 <__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 29 e9 call 200dcf4 <__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 62 1c ld [ %g1 + 0x21c ], %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 62 1c or %g1, 0x21c, %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 29 ce call 200dcf4 <__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 6a sethi %hi(0x201a800), %o0 2003608: 40 00 0e 25 call 2006e9c <_Chain_Append> 200360c: 90 12 22 1c or %o0, 0x21c, %o0 ! 201aa1c 2003610: 03 00 80 6c sethi %hi(0x201b000), %g1 2003614: 40 00 0b ed call 20065c8 2003618: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 ! 201b360 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 6a sethi %hi(0x201a800), %g1 rtems_filesystem_root = mt_entry->mt_fs_root; 2003628: d0 00 62 3c ld [ %g1 + 0x23c ], %o0 ! 201aa3c 200362c: 92 07 60 1c add %i5, 0x1c, %o1 2003630: 94 10 20 14 mov 0x14, %o2 2003634: 40 00 2c 0c call 200e664 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 29 98 call 200db44 <__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 =============================================================================== 02016d54 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2016d54: 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; 2016d58: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 2016d5c: 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; 2016d60: 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; 2016d64: 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); 2016d68: 92 10 20 00 clr %o1 2016d6c: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2016d70: c2 27 bf f4 st %g1, [ %fp + -12 ] 2016d74: 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; 2016d78: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 2016d7c: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 2016d80: 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; 2016d84: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 2016d88: 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); 2016d8c: 40 00 14 a8 call 201c02c 2016d90: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2016d94: 92 10 20 00 clr %o1 2016d98: 94 10 20 40 mov 0x40, %o2 2016d9c: 40 00 14 a4 call 201c02c 2016da0: 90 07 bf 68 add %fp, -152, %o0 name_type = msdos_long_to_short (name, name_len, 2016da4: 92 10 00 1b mov %i3, %o1 2016da8: 94 07 bf a8 add %fp, -88, %o2 2016dac: 96 10 20 0b mov 0xb, %o3 2016db0: 40 00 04 28 call 2017e50 2016db4: 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) { 2016db8: 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, 2016dbc: 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; 2016dc0: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2016dc4: 90 10 20 00 clr %o0 2016dc8: 40 00 22 57 call 201f724