=============================================================================== 0200a440 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200a440: 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; 200a444: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 200a448: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 200a44c: 84 00 bf ff add %g2, -1, %g2 200a450: 80 a0 a0 06 cmp %g2, 6 200a454: 18 80 00 14 bgu 200a4a4 <== NEVER TAKEN 200a458: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200a45c: 85 28 a0 02 sll %g2, 2, %g2 200a460: 07 00 80 28 sethi %hi(0x200a000), %g3 200a464: 86 10 e3 c4 or %g3, 0x3c4, %g3 ! 200a3c4 200a468: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a46c: 81 c0 80 00 jmp %g2 200a470: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200a474: 10 80 00 0b b 200a4a0 200a478: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200a47c: 03 00 80 66 sethi %hi(0x2019800), %g1 200a480: 10 80 00 08 b 200a4a0 200a484: 82 10 60 3c or %g1, 0x3c, %g1 ! 201983c break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200a488: 03 00 80 66 sethi %hi(0x2019800), %g1 200a48c: 10 80 00 05 b 200a4a0 200a490: 82 10 60 ac or %g1, 0xac, %g1 ! 20198ac break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200a494: 10 80 00 03 b 200a4a0 200a498: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200a49c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a4a0: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200a4a4: 81 c3 e0 08 retl 200a4a8: 90 10 20 00 clr %o0 =============================================================================== 0200a258 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200a258: 9d e3 bf a0 save %sp, -96, %sp 200a25c: 82 10 00 18 mov %i0, %g1 200a260: 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 ) 200a264: 80 a0 60 00 cmp %g1, 0 200a268: 02 80 00 45 be 200a37c <== NEVER TAKEN 200a26c: b0 10 20 00 clr %i0 return NULL; parent = parent_loc->node_access; 200a270: e0 00 40 00 ld [ %g1 ], %l0 fs_info = parent_loc->mt_entry->fs_info; 200a274: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200a278: 80 a6 60 07 cmp %i1, 7 200a27c: 12 80 00 08 bne 200a29c 200a280: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 200a284: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a288: 03 00 80 65 sethi %hi(0x2019400), %g1 200a28c: 82 10 63 b4 or %g1, 0x3b4, %g1 ! 20197b4 200a290: 80 a0 80 01 cmp %g2, %g1 200a294: 02 80 00 3a be 200a37c 200a298: 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 ); 200a29c: 03 00 80 6a sethi %hi(0x201a800), %g1 200a2a0: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 201aa0c 200a2a4: 90 10 00 19 mov %i1, %o0 200a2a8: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200a2ac: 7f ff ff d1 call 200a1f0 200a2b0: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200a2b4: b0 92 20 00 orcc %o0, 0, %i0 200a2b8: 02 80 00 31 be 200a37c 200a2bc: 80 a6 60 01 cmp %i1, 1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200a2c0: 12 80 00 08 bne 200a2e0 200a2c4: 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 ); 200a2c8: 82 06 20 50 add %i0, 0x50, %g1 200a2cc: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; 200a2d0: c0 26 20 54 clr [ %i0 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200a2d4: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; tail->previous = head; 200a2d8: 10 80 00 21 b 200a35c 200a2dc: c2 26 20 58 st %g1, [ %i0 + 0x58 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200a2e0: 22 80 00 06 be,a 200a2f8 200a2e4: c2 07 00 00 ld [ %i4 ], %g1 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200a2e8: 80 a6 60 04 cmp %i1, 4 200a2ec: 12 80 00 05 bne 200a300 200a2f0: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; 200a2f4: c2 07 00 00 ld [ %i4 ], %g1 200a2f8: 10 80 00 19 b 200a35c 200a2fc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else if ( type == IMFS_DEVICE ) { 200a300: 12 80 00 07 bne 200a31c 200a304: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; 200a308: c2 07 00 00 ld [ %i4 ], %g1 200a30c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] node->info.device.minor = info->device.minor; 200a310: c2 07 20 04 ld [ %i4 + 4 ], %g1 200a314: 10 80 00 12 b 200a35c 200a318: c2 26 20 54 st %g1, [ %i0 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { 200a31c: 12 80 00 06 bne 200a334 200a320: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; 200a324: c0 26 20 50 clr [ %i0 + 0x50 ] 200a328: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.linearfile.direct = 0; 200a32c: 10 80 00 0c b 200a35c 200a330: c0 26 20 58 clr [ %i0 + 0x58 ] } else if ( type == IMFS_MEMORY_FILE ) { 200a334: 12 80 00 08 bne 200a354 200a338: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; 200a33c: c0 26 20 50 clr [ %i0 + 0x50 ] 200a340: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200a344: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200a348: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; 200a34c: 10 80 00 04 b 200a35c 200a350: c0 26 20 60 clr [ %i0 + 0x60 ] } else if ( type == IMFS_FIFO ) { 200a354: 22 80 00 02 be,a 200a35c <== ALWAYS TAKEN 200a358: 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; 200a35c: c2 07 60 04 ld [ %i5 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200a360: e0 26 20 08 st %l0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200a364: 82 00 60 01 inc %g1 200a368: c2 27 60 04 st %g1, [ %i5 + 4 ] 200a36c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200a370: 90 04 20 50 add %l0, 0x50, %o0 200a374: 7f ff f2 ca call 2006e9c <_Chain_Append> 200a378: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200a37c: 81 c7 e0 08 ret 200a380: 81 e8 00 00 restore =============================================================================== 0200a53c : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a53c: 9d e3 bf 70 save %sp, -144, %sp 200a540: f2 27 a0 48 st %i1, [ %fp + 0x48 ] int i = 0; 200a544: 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 ) ) { 200a548: 80 8e bf f8 btst -8, %i2 200a54c: 02 80 00 06 be 200a564 <== ALWAYS TAKEN 200a550: ba 10 00 18 mov %i0, %i5 rtems_set_errno_and_return_minus_one( EIO ); 200a554: 40 00 0d db call 200dcc0 <__errno> <== NOT EXECUTED 200a558: 01 00 00 00 nop <== NOT EXECUTED 200a55c: 10 80 00 19 b 200a5c0 <== NOT EXECUTED 200a560: 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; 200a564: 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; 200a568: 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) ) { 200a56c: 10 80 00 8d b 200a7a0 200a570: 33 00 80 6a sethi %hi(0x201a800), %i1 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200a574: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a578: 90 07 40 08 add %i5, %o0, %o0 200a57c: 94 07 bf d0 add %fp, -48, %o2 200a580: 40 00 02 25 call 200ae14 200a584: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; 200a588: c2 07 bf fc ld [ %fp + -4 ], %g1 200a58c: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 200a590: 84 20 80 01 sub %g2, %g1, %g2 200a594: c4 27 a0 48 st %g2, [ %fp + 0x48 ] i += len; 200a598: c4 07 bf f8 ld [ %fp + -8 ], %g2 200a59c: 82 00 80 01 add %g2, %g1, %g1 200a5a0: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !pathloc->node_access ) 200a5a4: c2 06 c0 00 ld [ %i3 ], %g1 200a5a8: 80 a0 60 00 cmp %g1, 0 200a5ac: 12 80 00 08 bne 200a5cc <== ALWAYS TAKEN 200a5b0: a0 10 00 08 mov %o0, %l0 rtems_set_errno_and_return_minus_one( ENOENT ); 200a5b4: 40 00 0d c3 call 200dcc0 <__errno> 200a5b8: 01 00 00 00 nop 200a5bc: 82 10 20 02 mov 2, %g1 ! 2 200a5c0: c2 22 00 00 st %g1, [ %o0 ] 200a5c4: 81 c7 e0 08 ret 200a5c8: 91 e8 3f ff restore %g0, -1, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a5cc: 80 a2 20 00 cmp %o0, 0 200a5d0: 02 80 00 10 be 200a610 200a5d4: 80 a4 20 03 cmp %l0, 3 if ( node->type == IMFS_DIRECTORY ) 200a5d8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a5dc: 80 a0 60 01 cmp %g1, 1 200a5e0: 12 80 00 0c bne 200a610 200a5e4: 80 a4 20 03 cmp %l0, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a5e8: 90 10 00 1b mov %i3, %o0 200a5ec: 7f ff ff b0 call 200a4ac 200a5f0: 92 10 20 01 mov 1, %o1 200a5f4: 80 a2 20 00 cmp %o0, 0 200a5f8: 12 80 00 06 bne 200a610 200a5fc: 80 a4 20 03 cmp %l0, 3 rtems_set_errno_and_return_minus_one( EACCES ); 200a600: 40 00 0d b0 call 200dcc0 <__errno> 200a604: 01 00 00 00 nop 200a608: 10 bf ff ee b 200a5c0 200a60c: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200a610: 02 80 00 1c be 200a680 200a614: f8 06 c0 00 ld [ %i3 ], %i4 200a618: 80 a4 20 04 cmp %l0, 4 200a61c: 02 80 00 5d be 200a790 200a620: 80 a4 20 02 cmp %l0, 2 200a624: 12 80 00 60 bne 200a7a4 200a628: 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 ) 200a62c: c2 06 62 0c ld [ %i1 + 0x20c ], %g1 200a630: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200a634: 80 a7 00 01 cmp %i4, %g1 200a638: 02 80 00 5b be 200a7a4 200a63c: 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; 200a640: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200a644: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200a648: 80 a0 40 1c cmp %g1, %i4 200a64c: 32 80 00 05 bne,a 200a660 200a650: 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; 200a654: 90 10 00 1b mov %i3, %o0 200a658: 10 80 00 5f b 200a7d4 200a65c: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200a660: 80 a7 20 00 cmp %i4, 0 200a664: 32 80 00 4f bne,a 200a7a0 200a668: f8 26 c0 00 st %i4, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200a66c: 40 00 0d 95 call 200dcc0 <__errno> 200a670: b0 10 3f ff mov -1, %i0 200a674: e0 22 00 00 st %l0, [ %o0 ] 200a678: 81 c7 e0 08 ret 200a67c: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200a680: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a684: 80 a0 60 03 cmp %g1, 3 200a688: 12 80 00 07 bne 200a6a4 200a68c: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 200a690: 90 10 00 1b mov %i3, %o0 200a694: 7f ff ff 97 call 200a4f0 200a698: 92 10 20 00 clr %o1 node = pathloc->node_access; 200a69c: 10 80 00 0b b 200a6c8 200a6a0: 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 ) { 200a6a4: 32 80 00 0a bne,a 200a6cc 200a6a8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 200a6ac: 90 10 00 1b mov %i3, %o0 200a6b0: 40 00 00 67 call 200a84c 200a6b4: 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; 200a6b8: f8 06 c0 00 ld [ %i3 ], %i4 if ( result == -1 ) 200a6bc: 80 a2 3f ff cmp %o0, -1 200a6c0: 02 80 00 61 be 200a844 <== NEVER TAKEN 200a6c4: b0 10 00 08 mov %o0, %i0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200a6c8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a6cc: 80 a0 60 01 cmp %g1, 1 200a6d0: 22 80 00 06 be,a 200a6e8 200a6d4: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a6d8: 40 00 0d 7a call 200dcc0 <__errno> 200a6dc: 01 00 00 00 nop 200a6e0: 10 bf ff b8 b 200a5c0 200a6e4: 82 10 20 14 mov 0x14, %g1 ! 14 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200a6e8: 40 00 01 ac call 200ad98 200a6ec: 92 07 bf d0 add %fp, -48, %o1 if ( !node ) 200a6f0: b8 92 20 00 orcc %o0, 0, %i4 200a6f4: 02 bf ff b0 be 200a5b4 200a6f8: 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 )) { 200a6fc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a700: 80 a0 60 01 cmp %g1, 1 200a704: 32 80 00 27 bne,a 200a7a0 200a708: f8 26 c0 00 st %i4, [ %i3 ] 200a70c: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200a710: 80 a0 60 00 cmp %g1, 0 200a714: 02 80 00 1d be 200a788 200a718: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( pathname, &pathnamelen, &i); 200a71c: 92 07 a0 48 add %fp, 0x48, %o1 200a720: 7f ff ff 30 call 200a3e0 200a724: 94 07 bf f8 add %fp, -8, %o2 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200a728: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a72c: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200a730: 80 a0 a0 2e cmp %g2, 0x2e 200a734: 12 80 00 06 bne 200a74c 200a738: b0 07 40 01 add %i5, %g1, %i0 200a73c: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200a740: 80 a0 a0 2e cmp %g2, 0x2e 200a744: 22 80 00 0c be,a 200a774 200a748: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a74c: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a750: 90 10 00 1b mov %i3, %o0 200a754: 92 02 60 1c add %o1, 0x1c, %o1 200a758: 40 00 0f b6 call 200e630 200a75c: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200a760: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a764: 90 10 00 18 mov %i0, %o0 200a768: c2 00 40 00 ld [ %g1 ], %g1 200a76c: 10 80 00 24 b 200a7fc 200a770: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200a774: 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; 200a778: c2 27 bf f8 st %g1, [ %fp + -8 ] pathnamelen -= 2; 200a77c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200a780: 82 00 7f fe add %g1, -2, %g1 200a784: c2 27 a0 48 st %g1, [ %fp + 0x48 ] /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200a788: 10 80 00 06 b 200a7a0 200a78c: 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 ); 200a790: 40 00 0d 4c call 200dcc0 <__errno> 200a794: 01 00 00 00 nop 200a798: 10 bf ff 8a b 200a5c0 200a79c: 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) ) { 200a7a0: 80 a4 20 04 cmp %l0, 4 200a7a4: 02 80 00 04 be 200a7b4 <== NEVER TAKEN 200a7a8: 80 a4 20 00 cmp %l0, 0 200a7ac: 32 bf ff 72 bne,a 200a574 200a7b0: 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 ) { 200a7b4: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a7b8: 80 a0 60 01 cmp %g1, 1 200a7bc: 12 80 00 15 bne 200a810 200a7c0: 90 10 00 1b mov %i3, %o0 if ( node->info.directory.mt_fs != NULL ) { 200a7c4: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a7c8: 80 a2 60 00 cmp %o1, 0 200a7cc: 02 80 00 11 be 200a810 <== ALWAYS TAKEN 200a7d0: 92 02 60 1c add %o1, 0x1c, %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a7d4: 40 00 0f 97 call 200e630 200a7d8: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200a7dc: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a7e0: c4 07 bf fc ld [ %fp + -4 ], %g2 200a7e4: d0 07 bf f8 ld [ %fp + -8 ], %o0 200a7e8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a7ec: c2 00 40 00 ld [ %g1 ], %g1 200a7f0: 90 22 00 02 sub %o0, %g2, %o0 200a7f4: 92 00 80 09 add %g2, %o1, %o1 200a7f8: 90 07 40 08 add %i5, %o0, %o0 200a7fc: 94 10 00 1a mov %i2, %o2 200a800: 9f c0 40 00 call %g1 200a804: 96 10 00 1b mov %i3, %o3 200a808: 81 c7 e0 08 ret 200a80c: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a810: 7f ff ff 0c call 200a440 200a814: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a818: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a81c: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a820: 7f ff ff 23 call 200a4ac 200a824: 90 10 00 1b mov %i3, %o0 200a828: 80 a2 20 00 cmp %o0, 0 200a82c: 12 80 00 06 bne 200a844 200a830: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a834: 40 00 0d 23 call 200dcc0 <__errno> 200a838: b0 10 3f ff mov -1, %i0 ! ffffffff 200a83c: 82 10 20 0d mov 0xd, %g1 200a840: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a844: 81 c7 e0 08 ret 200a848: 81 e8 00 00 restore =============================================================================== 0200a98c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200a98c: 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; 200a990: 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; 200a994: c0 27 bf f4 clr [ %fp + -12 ] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a998: 90 10 00 18 mov %i0, %o0 200a99c: 40 00 12 61 call 200f320 200a9a0: 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 ) 200a9a4: 37 00 80 6a sethi %hi(0x201a800), %i3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a9a8: 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 ); 200a9ac: d0 07 bf f4 ld [ %fp + -12 ], %o0 200a9b0: d2 07 bf fc ld [ %fp + -4 ], %o1 200a9b4: 90 07 40 08 add %i5, %o0, %o0 200a9b8: 94 07 bf d0 add %fp, -48, %o2 200a9bc: 40 00 01 16 call 200ae14 200a9c0: 96 07 bf f8 add %fp, -8, %o3 pathlen -= len; 200a9c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a9c8: c4 07 bf fc ld [ %fp + -4 ], %g2 200a9cc: 84 20 80 01 sub %g2, %g1, %g2 200a9d0: c4 27 bf fc st %g2, [ %fp + -4 ] i += len; 200a9d4: c4 07 bf f4 ld [ %fp + -12 ], %g2 200a9d8: 82 00 80 01 add %g2, %g1, %g1 200a9dc: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( !pathloc->node_access ) 200a9e0: c2 06 40 00 ld [ %i1 ], %g1 200a9e4: 80 a0 60 00 cmp %g1, 0 200a9e8: 02 80 00 99 be 200ac4c <== NEVER TAKEN 200a9ec: b0 10 00 08 mov %o0, %i0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a9f0: 80 a2 20 00 cmp %o0, 0 200a9f4: 02 80 00 10 be 200aa34 200a9f8: 80 a6 20 02 cmp %i0, 2 if ( node->type == IMFS_DIRECTORY ) 200a9fc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200aa00: 80 a0 60 01 cmp %g1, 1 200aa04: 12 80 00 0c bne 200aa34 200aa08: 80 a6 20 02 cmp %i0, 2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200aa0c: 90 10 00 19 mov %i1, %o0 200aa10: 7f ff fe a7 call 200a4ac 200aa14: 92 10 20 01 mov 1, %o1 200aa18: 80 a2 20 00 cmp %o0, 0 200aa1c: 12 80 00 06 bne 200aa34 200aa20: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EACCES ); 200aa24: 40 00 0c a7 call 200dcc0 <__errno> 200aa28: 01 00 00 00 nop 200aa2c: 10 80 00 9d b 200aca0 200aa30: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200aa34: 02 80 00 0f be 200aa70 200aa38: f8 06 40 00 ld [ %i1 ], %i4 200aa3c: 80 a6 20 02 cmp %i0, 2 200aa40: 18 80 00 07 bgu 200aa5c 200aa44: 80 a6 20 03 cmp %i0, 3 200aa48: 80 a6 20 00 cmp %i0, 0 200aa4c: 02 80 00 6e be 200ac04 200aa50: 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 ); 200aa54: 10 bf ff d7 b 200a9b0 200aa58: 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 ) { 200aa5c: 02 80 00 21 be 200aae0 200aa60: 80 a6 20 04 cmp %i0, 4 200aa64: 32 bf ff d3 bne,a 200a9b0 <== NEVER TAKEN 200aa68: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 200aa6c: 30 80 00 6a b,a 200ac14 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200aa70: c2 06 e2 0c ld [ %i3 + 0x20c ], %g1 200aa74: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200aa78: 80 a7 00 01 cmp %i4, %g1 200aa7c: 02 bf ff cd be 200a9b0 200aa80: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aa84: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200aa88: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200aa8c: 80 a0 40 1c cmp %g1, %i4 200aa90: 32 80 00 0d bne,a 200aac4 200aa94: 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; 200aa98: 90 10 00 19 mov %i1, %o0 200aa9c: 92 02 60 08 add %o1, 8, %o1 200aaa0: 40 00 0e e4 call 200e630 200aaa4: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200aaa8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200aaac: c4 07 bf f8 ld [ %fp + -8 ], %g2 200aab0: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aab4: c2 00 60 04 ld [ %g1 + 4 ], %g1 200aab8: 90 22 00 02 sub %o0, %g2, %o0 200aabc: 10 80 00 46 b 200abd4 200aac0: 90 07 40 08 add %i5, %o0, %o0 } } else { if ( !node->Parent ) 200aac4: 80 a7 20 00 cmp %i4, 0 200aac8: 32 bf ff b9 bne,a 200a9ac 200aacc: f8 26 40 00 st %i4, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200aad0: 40 00 0c 7c call 200dcc0 <__errno> 200aad4: 01 00 00 00 nop 200aad8: 10 80 00 73 b 200aca4 200aadc: f0 22 00 00 st %i0, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200aae0: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200aae4: 80 a0 60 03 cmp %g1, 3 200aae8: 12 80 00 0a bne 200ab10 200aaec: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 200aaf0: 90 10 00 19 mov %i1, %o0 200aaf4: 7f ff ff 78 call 200a8d4 200aaf8: 92 10 20 00 clr %o1 if ( result == -1 ) 200aafc: 80 a2 3f ff cmp %o0, -1 200ab00: 12 80 00 0c bne 200ab30 <== ALWAYS TAKEN 200ab04: b0 10 00 08 mov %o0, %i0 200ab08: 81 c7 e0 08 ret <== NOT EXECUTED 200ab0c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200ab10: 32 80 00 09 bne,a 200ab34 200ab14: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 200ab18: 90 10 00 19 mov %i1, %o0 200ab1c: 7f ff ff 6e call 200a8d4 200ab20: 92 10 20 00 clr %o1 if ( result == -1 ) 200ab24: 80 a2 3f ff cmp %o0, -1 200ab28: 02 bf ff f8 be 200ab08 <== NEVER TAKEN 200ab2c: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 200ab30: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200ab34: 80 a2 20 00 cmp %o0, 0 200ab38: 02 80 00 57 be 200ac94 <== NEVER TAKEN 200ab3c: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200ab40: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200ab44: 80 a0 60 01 cmp %g1, 1 200ab48: 12 80 00 53 bne 200ac94 200ab4c: 01 00 00 00 nop /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200ab50: 40 00 00 92 call 200ad98 200ab54: 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 ) 200ab58: b8 92 20 00 orcc %o0, 0, %i4 200ab5c: 02 80 00 32 be 200ac24 200ab60: c2 07 bf f8 ld [ %fp + -8 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200ab64: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ab68: 80 a0 60 01 cmp %g1, 1 200ab6c: 32 bf ff 90 bne,a 200a9ac 200ab70: f8 26 40 00 st %i4, [ %i1 ] 200ab74: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200ab78: 80 a0 60 00 cmp %g1, 0 200ab7c: 02 80 00 20 be 200abfc 200ab80: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( path, &pathlen, &i); 200ab84: 92 07 bf fc add %fp, -4, %o1 200ab88: 7f ff fe 16 call 200a3e0 200ab8c: 94 07 bf f4 add %fp, -12, %o2 if ((path[i] != '.') || (path[i + 1] != '.')) { 200ab90: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ab94: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200ab98: 80 a0 a0 2e cmp %g2, 0x2e 200ab9c: 12 80 00 06 bne 200abb4 200aba0: b0 07 40 01 add %i5, %g1, %i0 200aba4: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200aba8: 80 a0 a0 2e cmp %g2, 0x2e 200abac: 02 80 00 0f be 200abe8 <== ALWAYS TAKEN 200abb0: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200abb4: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200abb8: 90 10 00 19 mov %i1, %o0 200abbc: 92 02 60 1c add %o1, 0x1c, %o1 200abc0: 40 00 0e 9c call 200e630 200abc4: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i], 200abc8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200abcc: 90 10 00 18 mov %i0, %o0 200abd0: c2 00 60 04 ld [ %g1 + 4 ], %g1 200abd4: 92 10 00 19 mov %i1, %o1 200abd8: 9f c0 40 00 call %g1 200abdc: 94 10 00 1a mov %i2, %o2 200abe0: 81 c7 e0 08 ret 200abe4: 91 e8 00 08 restore %g0, %o0, %o0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200abe8: 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; 200abec: c2 27 bf f4 st %g1, [ %fp + -12 ] pathlen -= 2; 200abf0: c2 07 bf fc ld [ %fp + -4 ], %g1 200abf4: 82 00 7f fe add %g1, -2, %g1 200abf8: c2 27 bf fc st %g1, [ %fp + -4 ] node = node->Parent; } pathloc->node_access = node; 200abfc: 10 bf ff 6c b 200a9ac 200ac00: f8 26 40 00 st %i4, [ %i1 ] } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200ac04: 40 00 0c 2f call 200dcc0 <__errno> 200ac08: 01 00 00 00 nop 200ac0c: 10 80 00 25 b 200aca0 200ac10: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200ac14: 40 00 0c 2b call 200dcc0 <__errno> 200ac18: 01 00 00 00 nop 200ac1c: 10 80 00 21 b 200aca0 200ac20: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200ac24: c4 07 bf f4 ld [ %fp + -12 ], %g2 200ac28: 82 20 80 01 sub %g2, %g1, %g1 200ac2c: 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++) { 200ac30: 10 80 00 0d b 200ac64 200ac34: c2 26 80 00 st %g1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 200ac38: 7f ff e4 28 call 2003cd8 200ac3c: 01 00 00 00 nop 200ac40: 80 a2 20 00 cmp %o0, 0 200ac44: 32 80 00 06 bne,a 200ac5c 200ac48: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 200ac4c: 40 00 0c 1d call 200dcc0 <__errno> 200ac50: 01 00 00 00 nop 200ac54: 10 80 00 13 b 200aca0 200ac58: 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++) { 200ac5c: 82 00 60 01 inc %g1 200ac60: c2 27 bf f4 st %g1, [ %fp + -12 ] 200ac64: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ac68: d0 4f 40 01 ldsb [ %i5 + %g1 ], %o0 200ac6c: 80 a2 20 00 cmp %o0, 0 200ac70: 12 bf ff f2 bne 200ac38 200ac74: 01 00 00 00 nop /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200ac78: 7f ff fd f2 call 200a440 200ac7c: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200ac80: c2 06 40 00 ld [ %i1 ], %g1 200ac84: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200ac88: 80 a0 60 01 cmp %g1, 1 200ac8c: 02 80 00 08 be 200acac <== ALWAYS TAKEN 200ac90: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200ac94: 40 00 0c 0b call 200dcc0 <__errno> 200ac98: 01 00 00 00 nop 200ac9c: 82 10 20 14 mov 0x14, %g1 ! 14 200aca0: c2 22 00 00 st %g1, [ %o0 ] 200aca4: 81 c7 e0 08 ret 200aca8: 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 ) ) 200acac: 90 10 00 19 mov %i1, %o0 200acb0: 7f ff fd ff call 200a4ac 200acb4: 92 10 20 03 mov 3, %o1 200acb8: 80 a2 20 00 cmp %o0, 0 200acbc: 12 80 00 06 bne 200acd4 200acc0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200acc4: 40 00 0b ff call 200dcc0 <__errno> 200acc8: b0 10 3f ff mov -1, %i0 ! ffffffff 200accc: 82 10 20 0d mov 0xd, %g1 200acd0: c2 22 00 00 st %g1, [ %o0 ] return result; } 200acd4: 81 c7 e0 08 ret 200acd8: 81 e8 00 00 restore =============================================================================== 0200a4ac : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200a4ac: 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 ) ) 200a4b0: 80 8e 7f f8 btst -8, %i1 200a4b4: 22 80 00 08 be,a 200a4d4 <== ALWAYS TAKEN 200a4b8: c2 06 00 00 ld [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 200a4bc: 40 00 0e 01 call 200dcc0 <__errno> <== NOT EXECUTED 200a4c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a4c4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a4c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a4cc: 81 c7 e0 08 ret <== NOT EXECUTED 200a4d0: 81 e8 00 00 restore <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200a4d4: 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 ) 200a4d8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 return 1; 200a4dc: b2 2e 40 01 andn %i1, %g1, %i1 200a4e0: 80 a0 00 19 cmp %g0, %i1 200a4e4: b0 60 3f ff subx %g0, -1, %i0 return 0; } 200a4e8: 81 c7 e0 08 ret 200a4ec: 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 6d call 200d2c0 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 70 call 200f2e4 <__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 d3 call 200d0a4 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 54 call 200f2e4 <__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 =============================================================================== 0200ad98 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200ad98: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200ad9c: 13 00 80 66 sethi %hi(0x2019800), %o1 200ada0: 90 10 00 19 mov %i1, %o0 200ada4: 40 00 0f 6e call 200eb5c 200ada8: 92 12 60 20 or %o1, 0x20, %o1 200adac: 80 a2 20 00 cmp %o0, 0 200adb0: 02 80 00 09 be 200add4 <== NEVER TAKEN 200adb4: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200adb8: 13 00 80 66 sethi %hi(0x2019800), %o1 200adbc: 40 00 0f 68 call 200eb5c 200adc0: 92 12 60 28 or %o1, 0x28, %o1 ! 2019828 200adc4: 80 a2 20 00 cmp %o0, 0 200adc8: 32 80 00 05 bne,a 200addc <== ALWAYS TAKEN 200adcc: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; 200add0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200add4: 81 c7 e0 08 ret 200add8: 81 e8 00 00 restore the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200addc: 10 80 00 08 b 200adfc 200ade0: 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 ) ) 200ade4: 40 00 0f 5e call 200eb5c 200ade8: 92 07 60 0c add %i5, 0xc, %o1 200adec: 80 a2 20 00 cmp %o0, 0 200adf0: 22 bf ff f9 be,a 200add4 200adf4: 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 ) { 200adf8: 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 ); 200adfc: 80 a7 40 18 cmp %i5, %i0 200ae00: 12 bf ff f9 bne 200ade4 200ae04: 90 10 00 19 mov %i1, %o0 200ae08: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200ae0c: 81 c7 e0 08 ret 200ae10: 81 e8 00 00 restore =============================================================================== 0200acdc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200acdc: 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; 200ace0: 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; 200ace4: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 loc = temp_mt_entry->mt_fs_root; 200ace8: b8 07 bf ec add %fp, -20, %i4 200acec: 92 06 20 1c add %i0, 0x1c, %o1 200acf0: 40 00 0e 50 call 200e630 200acf4: 90 10 00 1c mov %i4, %o0 200acf8: c0 26 20 1c clr [ %i0 + 0x1c ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200acfc: f0 07 60 08 ld [ %i5 + 8 ], %i0 loc.node_access = (void *)jnode; 200ad00: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200ad04: 7f ff fd cf call 200a440 200ad08: 90 10 00 1c mov %i4, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200ad0c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ad10: 80 a0 60 01 cmp %g1, 1 200ad14: 32 80 00 08 bne,a 200ad34 200ad18: 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 ) ) { 200ad1c: 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 ); 200ad20: 82 07 60 54 add %i5, 0x54, %g1 200ad24: 80 a0 80 01 cmp %g2, %g1 200ad28: 12 80 00 09 bne 200ad4c 200ad2c: 80 a7 60 00 cmp %i5, 0 result = IMFS_unlink( NULL, &loc ); 200ad30: 90 10 20 00 clr %o0 200ad34: 7f ff de 66 call 20026cc 200ad38: 92 10 00 1c mov %i4, %o1 if (result != 0) 200ad3c: 80 a2 20 00 cmp %o0, 0 200ad40: 12 80 00 12 bne 200ad88 <== NEVER TAKEN 200ad44: ba 10 00 18 mov %i0, %i5 return -1; jnode = next; } if ( jnode != NULL ) { 200ad48: 80 a7 60 00 cmp %i5, 0 200ad4c: 02 80 00 11 be 200ad90 200ad50: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200ad54: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ad58: 80 a0 60 01 cmp %g1, 1 200ad5c: 32 bf ff e9 bne,a 200ad00 <== NEVER TAKEN 200ad60: 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; 200ad64: 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 ); 200ad68: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200ad6c: 80 a0 40 02 cmp %g1, %g2 200ad70: 02 bf ff e3 be 200acfc 200ad74: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200ad78: 12 bf ff e1 bne 200acfc <== ALWAYS TAKEN 200ad7c: ba 10 00 01 mov %g1, %i5 return 0; 200ad80: 81 c7 e0 08 ret <== NOT EXECUTED 200ad84: 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; 200ad88: 81 c7 e0 08 ret <== NOT EXECUTED 200ad8c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 200ad90: 81 c7 e0 08 ret 200ad94: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200ae14 : const char *path, int pathlen, char *token, int *token_len ) { 200ae14: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200ae18: 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) ) { 200ae1c: 10 80 00 06 b 200ae34 200ae20: f8 0e 00 00 ldub [ %i0 ], %i4 token[i] = c; if ( i == IMFS_NAME_MAX ) 200ae24: 02 80 00 32 be 200aeec 200ae28: 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]; 200ae2c: ba 07 60 01 inc %i5 200ae30: 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) ) { 200ae34: 91 2f 20 18 sll %i4, 0x18, %o0 200ae38: 7f ff e3 a8 call 2003cd8 200ae3c: 91 3a 20 18 sra %o0, 0x18, %o0 200ae40: 80 a2 20 00 cmp %o0, 0 200ae44: 12 80 00 04 bne 200ae54 200ae48: 80 a7 40 19 cmp %i5, %i1 200ae4c: 06 bf ff f6 bl 200ae24 <== ALWAYS TAKEN 200ae50: 80 a7 60 20 cmp %i5, 0x20 /* * Copy a seperator into token. */ if ( i == 0 ) { 200ae54: 80 a7 60 00 cmp %i5, 0 200ae58: 12 80 00 0e bne 200ae90 200ae5c: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; 200ae60: f8 2e 80 00 stb %i4, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200ae64: b9 2f 20 18 sll %i4, 0x18, %i4 200ae68: 80 a7 20 00 cmp %i4, 0 200ae6c: 02 80 00 07 be 200ae88 200ae70: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; 200ae74: b0 10 20 01 mov 1, %i0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200ae78: 80 a6 60 00 cmp %i1, 0 200ae7c: 12 80 00 0a bne 200aea4 200ae80: ba 10 20 01 mov 1, %i5 200ae84: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200ae88: 10 80 00 07 b 200aea4 200ae8c: b0 10 20 00 clr %i0 } } else if (token[ i-1 ] != '\0') { 200ae90: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200ae94: 80 a0 60 00 cmp %g1, 0 200ae98: 02 80 00 03 be 200aea4 <== NEVER TAKEN 200ae9c: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200aea0: 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 ) { 200aea4: 80 a6 20 03 cmp %i0, 3 200aea8: 12 80 00 0f bne 200aee4 200aeac: fa 26 c0 00 st %i5, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200aeb0: 90 10 00 1a mov %i2, %o0 200aeb4: 13 00 80 66 sethi %hi(0x2019800), %o1 200aeb8: 40 00 0f 29 call 200eb5c 200aebc: 92 12 60 30 or %o1, 0x30, %o1 ! 2019830 200aec0: 80 a2 20 00 cmp %o0, 0 200aec4: 02 80 00 0c be 200aef4 200aec8: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200aecc: 13 00 80 66 sethi %hi(0x2019800), %o1 200aed0: 40 00 0f 23 call 200eb5c 200aed4: 92 12 60 38 or %o1, 0x38, %o1 ! 2019838 200aed8: 80 a2 20 00 cmp %o0, 0 200aedc: 22 80 00 02 be,a 200aee4 200aee0: b0 10 20 01 mov 1, %i0 200aee4: 81 c7 e0 08 ret 200aee8: 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; 200aeec: 81 c7 e0 08 ret 200aef0: 91 e8 20 04 restore %g0, 4, %o0 200aef4: b0 10 20 02 mov 2, %i0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200aef8: 81 c7 e0 08 ret 200aefc: 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 24 ld [ %g1 + 0x124 ], %g1 ! 201a924 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 1b call 200a384 200231c: c2 20 a0 9c st %g1, [ %g2 + 0x9c ] ! 201b09c 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 65 sethi %hi(0x2019400), %o1 200233c: 40 00 30 bd call 200e630 2002340: 92 12 63 ec or %o1, 0x3ec, %o1 ! 20197ec /* * 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 57 call 200dcc0 <__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 a0 ld [ %g1 + 0xa0 ], %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 a0 st %g2, [ %g1 + 0xa0 ] 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 =============================================================================== 0200ccf0 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200ccf0: 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 ) 200ccf4: 03 00 80 6c sethi %hi(0x201b000), %g1 200ccf8: fa 00 60 9c ld [ %g1 + 0x9c ], %i5 ! 201b09c 200ccfc: b9 37 60 02 srl %i5, 2, %i4 200cd00: 92 10 00 1c mov %i4, %o1 200cd04: 40 00 27 2f call 20169c0 <.umul> 200cd08: 90 07 20 01 add %i4, 1, %o0 200cd0c: 92 10 00 1c mov %i4, %o1 200cd10: 40 00 27 2c call 20169c0 <.umul> 200cd14: 90 02 20 01 inc %o0 200cd18: 92 10 00 1d mov %i5, %o1 200cd1c: 40 00 27 29 call 20169c0 <.umul> 200cd20: 90 02 3f ff add %o0, -1, %o0 200cd24: 82 10 20 00 clr %g1 200cd28: 80 a0 40 19 cmp %g1, %i1 200cd2c: 34 80 00 0b bg,a 200cd58 200cd30: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 200cd34: 80 a0 40 19 cmp %g1, %i1 200cd38: 12 80 00 04 bne 200cd48 <== NEVER TAKEN 200cd3c: 80 a2 00 1a cmp %o0, %i2 200cd40: 38 80 00 06 bgu,a 200cd58 200cd44: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200cd48: 40 00 03 de call 200dcc0 <__errno> 200cd4c: 01 00 00 00 nop 200cd50: 10 80 00 29 b 200cdf4 200cd54: 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 ) 200cd58: 80 a6 40 1c cmp %i1, %i4 200cd5c: 14 80 00 07 bg 200cd78 <== NEVER TAKEN 200cd60: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200cd64: 80 a6 40 1c cmp %i1, %i4 200cd68: 12 80 00 37 bne 200ce44 200cd6c: 80 a6 80 10 cmp %i2, %l0 200cd70: 08 80 00 35 bleu 200ce44 200cd74: 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; 200cd78: b7 3f 60 1f sra %i5, 0x1f, %i3 200cd7c: 96 10 00 1d mov %i5, %o3 200cd80: 94 10 00 1b mov %i3, %o2 200cd84: 90 10 00 19 mov %i1, %o0 200cd88: 40 00 28 a0 call 2017008 <__divdi3> 200cd8c: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cd90: 90 10 00 1c mov %i4, %o0 200cd94: 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; 200cd98: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cd9c: 94 10 00 1b mov %i3, %o2 200cda0: 40 00 28 9a call 2017008 <__divdi3> 200cda4: 92 10 00 10 mov %l0, %o1 200cda8: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200cdac: 10 80 00 15 b 200ce00 200cdb0: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200cdb4: 7f ff ff 48 call 200cad4 200cdb8: 92 10 00 1d mov %i5, %o1 200cdbc: 80 a2 20 00 cmp %o0, 0 200cdc0: 22 80 00 10 be,a 200ce00 200cdc4: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200cdc8: 10 80 00 06 b 200cde0 200cdcc: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200cdd0: 90 10 00 18 mov %i0, %o0 200cdd4: 7f ff ff bb call 200ccc0 200cdd8: 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-- ) { 200cddc: 80 a7 40 1c cmp %i5, %i4 200cde0: 1a bf ff fc bcc 200cdd0 200cde4: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200cde8: 40 00 03 b6 call 200dcc0 <__errno> 200cdec: 01 00 00 00 nop 200cdf0: 82 10 20 1c mov 0x1c, %g1 ! 1c 200cdf4: c2 22 00 00 st %g1, [ %o0 ] 200cdf8: 81 c7 e0 08 ret 200cdfc: 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++ ) { 200ce00: 80 a7 40 11 cmp %i5, %l1 200ce04: 08 bf ff ec bleu 200cdb4 200ce08: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200ce0c: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200ce10: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200ce14: 92 10 20 00 clr %o1 200ce18: 7f ff d8 19 call 2002e7c 200ce1c: 90 07 bf f8 add %fp, -8, %o0 200ce20: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200ce24: 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); 200ce28: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200ce2c: 7f ff d8 14 call 2002e7c 200ce30: 92 10 20 00 clr %o1 200ce34: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ce38: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200ce3c: 81 c7 e0 08 ret 200ce40: 91 e8 20 00 restore %g0, 0, %o0 } 200ce44: 81 c7 e0 08 ret 200ce48: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200c648 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200c648: 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 ) { 200c64c: 03 00 80 6c sethi %hi(0x201b000), %g1 200c650: f8 00 60 9c ld [ %g1 + 0x9c ], %i4 ! 201b09c 200c654: b9 37 20 02 srl %i4, 2, %i4 200c658: 82 07 3f ff add %i4, -1, %g1 200c65c: 80 a6 40 01 cmp %i1, %g1 200c660: 18 80 00 18 bgu 200c6c0 200c664: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200c668: 80 a6 a0 00 cmp %i2, 0 200c66c: 02 80 00 0f be 200c6a8 200c670: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200c674: 80 a0 60 00 cmp %g1, 0 200c678: 32 80 00 09 bne,a 200c69c 200c67c: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200c680: 7f ff ff e5 call 200c614 200c684: b0 10 20 00 clr %i0 if ( !p ) 200c688: 80 a2 20 00 cmp %o0, 0 200c68c: 02 80 00 8a be 200c8b4 <== NEVER TAKEN 200c690: 01 00 00 00 nop return 0; info->indirect = p; 200c694: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200c698: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200c69c: b3 2e 60 02 sll %i1, 2, %i1 200c6a0: 81 c7 e0 08 ret 200c6a4: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200c6a8: 80 a0 60 00 cmp %g1, 0 200c6ac: 02 80 00 82 be 200c8b4 <== NEVER TAKEN 200c6b0: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200c6b4: b3 2e 60 02 sll %i1, 2, %i1 200c6b8: 81 c7 e0 08 ret 200c6bc: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200c6c0: 90 07 20 01 add %i4, 1, %o0 200c6c4: 40 00 28 bf call 20169c0 <.umul> 200c6c8: 92 10 00 1c mov %i4, %o1 200c6cc: 82 02 3f ff add %o0, -1, %g1 200c6d0: 80 a6 40 01 cmp %i1, %g1 200c6d4: 18 80 00 2f bgu 200c790 200c6d8: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200c6dc: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c6e0: 92 10 00 1c mov %i4, %o1 200c6e4: 40 00 29 9d call 2016d58 <.urem> 200c6e8: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c6ec: 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; 200c6f0: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c6f4: 40 00 28 ed call 2016aa8 <.udiv> 200c6f8: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200c6fc: 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; 200c700: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200c704: 02 80 00 18 be 200c764 200c708: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200c70c: 80 a2 20 00 cmp %o0, 0 200c710: 32 80 00 08 bne,a 200c730 200c714: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200c718: 7f ff ff bf call 200c614 200c71c: b0 10 20 00 clr %i0 if ( !p ) 200c720: 80 a2 20 00 cmp %o0, 0 200c724: 02 80 00 64 be 200c8b4 <== NEVER TAKEN 200c728: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200c72c: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200c730: ba 02 00 1c add %o0, %i4, %i5 200c734: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200c738: 80 a2 20 00 cmp %o0, 0 200c73c: 12 80 00 4f bne 200c878 200c740: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200c744: 7f ff ff b4 call 200c614 200c748: b0 10 20 00 clr %i0 if ( !p1 ) 200c74c: 80 a2 20 00 cmp %o0, 0 200c750: 02 80 00 59 be 200c8b4 <== NEVER TAKEN 200c754: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200c758: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200c75c: 10 80 00 47 b 200c878 200c760: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200c764: 80 a2 20 00 cmp %o0, 0 200c768: 02 80 00 53 be 200c8b4 <== NEVER TAKEN 200c76c: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200c770: b9 2f 20 02 sll %i4, 2, %i4 200c774: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200c778: 80 a0 60 00 cmp %g1, 0 200c77c: 02 80 00 4e be 200c8b4 <== NEVER TAKEN 200c780: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200c784: b1 2e e0 02 sll %i3, 2, %i0 200c788: 81 c7 e0 08 ret 200c78c: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200c790: 90 02 20 01 inc %o0 200c794: 40 00 28 8b call 20169c0 <.umul> 200c798: 92 10 00 1c mov %i4, %o1 200c79c: 90 02 3f ff add %o0, -1, %o0 200c7a0: 80 a6 40 08 cmp %i1, %o0 200c7a4: 18 80 00 44 bgu 200c8b4 <== NEVER TAKEN 200c7a8: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200c7ac: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c7b0: 92 10 00 1c mov %i4, %o1 200c7b4: 40 00 29 69 call 2016d58 <.urem> 200c7b8: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c7bc: 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; 200c7c0: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c7c4: 40 00 28 b9 call 2016aa8 <.udiv> 200c7c8: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200c7cc: 92 10 00 1c mov %i4, %o1 200c7d0: 40 00 28 b6 call 2016aa8 <.udiv> 200c7d4: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c7d8: 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; 200c7dc: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c7e0: 40 00 29 5e call 2016d58 <.urem> 200c7e4: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200c7e8: 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; 200c7ec: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200c7f0: 02 80 00 24 be 200c880 200c7f4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200c7f8: 80 a2 20 00 cmp %o0, 0 200c7fc: 12 80 00 08 bne 200c81c 200c800: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200c804: 7f ff ff 84 call 200c614 200c808: 01 00 00 00 nop if ( !p ) 200c80c: 80 a2 20 00 cmp %o0, 0 200c810: 02 80 00 29 be 200c8b4 <== NEVER TAKEN 200c814: 01 00 00 00 nop return 0; info->triply_indirect = p; 200c818: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200c81c: ba 02 00 1b add %o0, %i3, %i5 200c820: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200c824: 80 a2 20 00 cmp %o0, 0 200c828: 32 80 00 08 bne,a 200c848 200c82c: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200c830: 7f ff ff 79 call 200c614 200c834: b0 10 20 00 clr %i0 if ( !p1 ) 200c838: 80 a2 20 00 cmp %o0, 0 200c83c: 02 80 00 1e be 200c8b4 <== NEVER TAKEN 200c840: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200c844: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200c848: ba 02 00 1c add %o0, %i4, %i5 200c84c: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200c850: 80 a2 20 00 cmp %o0, 0 200c854: 12 80 00 09 bne 200c878 200c858: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200c85c: 7f ff ff 6e call 200c614 200c860: b0 10 20 00 clr %i0 if ( !p2 ) 200c864: 80 a2 20 00 cmp %o0, 0 200c868: 02 80 00 13 be 200c8b4 <== NEVER TAKEN 200c86c: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200c870: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200c874: b1 2c 20 02 sll %l0, 2, %i0 200c878: 81 c7 e0 08 ret 200c87c: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200c880: 80 a2 20 00 cmp %o0, 0 200c884: 02 80 00 0c be 200c8b4 <== NEVER TAKEN 200c888: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200c88c: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200c890: 80 a0 60 00 cmp %g1, 0 200c894: 02 80 00 08 be 200c8b4 <== NEVER TAKEN 200c898: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200c89c: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200c8a0: 80 a0 60 00 cmp %g1, 0 200c8a4: 02 80 00 04 be 200c8b4 <== NEVER TAKEN 200c8a8: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200c8ac: b1 2c 20 02 sll %l0, 2, %i0 200c8b0: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200c8b4: 81 c7 e0 08 ret 200c8b8: 81 e8 00 00 restore =============================================================================== 0200c8bc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c8bc: 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) { 200c8c0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c8c4: ba 10 00 18 mov %i0, %i5 200c8c8: 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) { 200c8cc: 80 a0 60 06 cmp %g1, 6 200c8d0: 12 80 00 1c bne 200c940 200c8d4: 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)) 200c8d8: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200c8dc: 82 10 20 00 clr %g1 200c8e0: 86 a3 40 1a subcc %o5, %i2, %g3 200c8e4: 84 63 00 19 subx %o4, %i1, %g2 200c8e8: 80 a0 40 02 cmp %g1, %g2 200c8ec: 14 80 00 07 bg 200c908 <== NEVER TAKEN 200c8f0: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200c8f4: 80 a0 40 02 cmp %g1, %g2 200c8f8: 12 80 00 06 bne 200c910 <== NEVER TAKEN 200c8fc: 80 a7 00 03 cmp %i4, %g3 200c900: 28 80 00 05 bleu,a 200c914 <== NEVER TAKEN 200c904: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200c908: 10 80 00 03 b 200c914 200c90c: 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; 200c910: 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); 200c914: 92 02 40 11 add %o1, %l1, %o1 200c918: 94 10 00 18 mov %i0, %o2 200c91c: 40 00 07 45 call 200e630 200c920: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200c924: 90 07 bf f8 add %fp, -8, %o0 200c928: 7f ff d9 55 call 2002e7c 200c92c: 92 10 20 00 clr %o1 200c930: c2 07 bf f8 ld [ %fp + -8 ], %g1 200c934: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200c938: 81 c7 e0 08 ret 200c93c: 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 ) 200c940: 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; 200c944: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200c948: 88 10 20 00 clr %g4 200c94c: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200c950: 80 a1 00 03 cmp %g4, %g3 200c954: 14 80 00 08 bg 200c974 <== NEVER TAKEN 200c958: b4 07 00 1a add %i4, %i2, %i2 200c95c: 80 a1 00 03 cmp %g4, %g3 200c960: 32 80 00 07 bne,a 200c97c <== NEVER TAKEN 200c964: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200c968: 80 a6 80 02 cmp %i2, %g2 200c96c: 28 80 00 04 bleu,a 200c97c 200c970: 03 00 80 6c sethi %hi(0x201b000), %g1 my_length = the_jnode->info.file.size - start; 200c974: 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; 200c978: 03 00 80 6c sethi %hi(0x201b000), %g1 200c97c: f4 00 60 9c ld [ %g1 + 0x9c ], %i2 ! 201b09c 200c980: 90 10 00 10 mov %l0, %o0 200c984: b1 3e a0 1f sra %i2, 0x1f, %i0 200c988: 92 10 00 11 mov %l1, %o1 200c98c: 94 10 00 18 mov %i0, %o2 200c990: 40 00 2a 84 call 20173a0 <__moddi3> 200c994: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c998: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200c99c: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c9a0: 94 10 00 18 mov %i0, %o2 200c9a4: 92 10 00 11 mov %l1, %o1 200c9a8: 40 00 29 98 call 2017008 <__divdi3> 200c9ac: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200c9b0: 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; 200c9b4: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200c9b8: 80 a6 60 00 cmp %i1, 0 200c9bc: 02 80 00 14 be 200ca0c 200c9c0: 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 ); 200c9c4: 90 10 00 1d mov %i5, %o0 200c9c8: 7f ff ff 20 call 200c648 200c9cc: 94 10 20 00 clr %o2 if ( !block_ptr ) 200c9d0: 80 a2 20 00 cmp %o0, 0 200c9d4: 02 bf ff d9 be 200c938 <== NEVER TAKEN 200c9d8: 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; 200c9dc: 80 a7 00 1a cmp %i4, %i2 200c9e0: 08 80 00 03 bleu 200c9ec 200c9e4: b0 10 00 1c mov %i4, %i0 200c9e8: 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 ); 200c9ec: d2 02 00 00 ld [ %o0 ], %o1 200c9f0: 94 10 00 18 mov %i0, %o2 200c9f4: 90 10 00 1b mov %i3, %o0 200c9f8: 92 02 40 19 add %o1, %i1, %o1 200c9fc: 40 00 07 0d call 200e630 200ca00: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200ca04: a0 04 20 01 inc %l0 my_length -= to_copy; 200ca08: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200ca0c: 35 00 80 6c sethi %hi(0x201b000), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200ca10: 10 80 00 0f b 200ca4c 200ca14: f6 06 a0 9c ld [ %i2 + 0x9c ], %i3 ! 201b09c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ca18: 92 10 00 10 mov %l0, %o1 200ca1c: 7f ff ff 0b call 200c648 200ca20: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ca24: 82 92 20 00 orcc %o0, 0, %g1 200ca28: 02 bf ff c4 be 200c938 <== NEVER TAKEN 200ca2c: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200ca30: d2 00 40 00 ld [ %g1 ], %o1 200ca34: 94 10 00 1b mov %i3, %o2 200ca38: 40 00 06 fe call 200e630 200ca3c: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200ca40: a0 04 20 01 inc %l0 my_length -= to_copy; 200ca44: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200ca48: 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 ) { 200ca4c: c2 06 a0 9c ld [ %i2 + 0x9c ], %g1 200ca50: 80 a7 00 01 cmp %i4, %g1 200ca54: 1a bf ff f1 bcc 200ca18 200ca58: 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 ) { 200ca5c: 80 a7 20 00 cmp %i4, 0 200ca60: 02 80 00 0e be 200ca98 200ca64: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ca68: 90 10 00 1d mov %i5, %o0 200ca6c: 92 10 00 10 mov %l0, %o1 200ca70: 7f ff fe f6 call 200c648 200ca74: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ca78: 82 92 20 00 orcc %o0, 0, %g1 200ca7c: 02 bf ff af be 200c938 <== NEVER TAKEN 200ca80: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200ca84: d2 00 40 00 ld [ %g1 ], %o1 200ca88: 94 10 00 1c mov %i4, %o2 200ca8c: 40 00 06 e9 call 200e630 200ca90: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200ca94: 90 07 bf f8 add %fp, -8, %o0 200ca98: 7f ff d8 f9 call 2002e7c 200ca9c: 92 10 20 00 clr %o1 200caa0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200caa4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200caa8: 81 c7 e0 08 ret 200caac: 81 e8 00 00 restore =============================================================================== 0200cb90 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200cb90: 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; 200cb94: 03 00 80 6c sethi %hi(0x201b000), %g1 200cb98: fa 00 60 9c ld [ %g1 + 0x9c ], %i5 ! 201b09c * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200cb9c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200cba0: 80 a0 60 00 cmp %g1, 0 200cba4: 02 80 00 05 be 200cbb8 200cba8: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200cbac: 90 06 20 58 add %i0, 0x58, %o0 200cbb0: 7f ff ff e5 call 200cb44 200cbb4: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200cbb8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200cbbc: b8 10 20 00 clr %i4 200cbc0: 80 a0 60 00 cmp %g1, 0 200cbc4: 12 80 00 0d bne 200cbf8 200cbc8: 37 00 80 6c sethi %hi(0x201b000), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200cbcc: 10 80 00 15 b 200cc20 200cbd0: 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( 200cbd4: 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] ) { 200cbd8: 90 00 80 01 add %g2, %g1, %o0 200cbdc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200cbe0: 80 a0 60 00 cmp %g1, 0 200cbe4: 22 80 00 05 be,a 200cbf8 <== NEVER TAKEN 200cbe8: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200cbec: 7f ff ff d6 call 200cb44 200cbf0: 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 200cc08: 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 ); 200cc0c: 90 06 20 5c add %i0, 0x5c, %o0 200cc10: 7f ff ff cd call 200cb44 200cc14: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200cc18: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200cc1c: b8 10 20 00 clr %i4 200cc20: 80 a0 60 00 cmp %g1, 0 200cc24: 12 80 00 1c bne 200cc94 200cc28: 33 00 80 6c sethi %hi(0x201b000), %i1 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200cc2c: 81 c7 e0 08 ret 200cc30: 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( 200cc34: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200cc38: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200cc3c: 80 a6 e0 00 cmp %i3, 0 200cc40: 02 80 00 1b be 200ccac <== NEVER TAKEN 200cc44: 90 06 20 60 add %i0, 0x60, %o0 200cc48: 10 80 00 09 b 200cc6c 200cc4c: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200cc58: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200cc5c: 7f ff ff ba call 200cb44 200cc60: 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 200cc7c: 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( 200cc80: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200cc84: 92 10 00 1d mov %i5, %o1 200cc88: 90 02 00 10 add %o0, %l0, %o0 200cc8c: 7f ff ff ae call 200cb44 200cc90: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200cca4: 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( 200cca8: 90 06 20 60 add %i0, 0x60, %o0 200ccac: 7f ff ff a6 call 200cb44 200ccb0: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return 0; } 200ccb4: b0 10 20 00 clr %i0 200ccb8: 81 c7 e0 08 ret 200ccbc: 81 e8 00 00 restore =============================================================================== 0200ce4c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce4c: 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 ) { 200ce50: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce54: 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 ) { 200ce58: 80 a0 60 00 cmp %g1, 0 200ce5c: 06 80 00 09 bl 200ce80 <== NEVER TAKEN 200ce60: 94 07 00 1a add %i4, %i2, %o2 200ce64: 80 a0 60 00 cmp %g1, 0 200ce68: 12 80 00 12 bne 200ceb0 <== NEVER TAKEN 200ce6c: 03 00 80 6c sethi %hi(0x201b000), %g1 200ce70: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200ce74: 80 a0 40 0a cmp %g1, %o2 200ce78: 1a 80 00 0e bcc 200ceb0 200ce7c: 03 00 80 6c sethi %hi(0x201b000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200ce80: 90 10 00 1d mov %i5, %o0 200ce84: 7f ff ff 9b call 200ccf0 200ce88: 92 10 20 00 clr %o1 if ( status ) 200ce8c: 80 a2 20 00 cmp %o0, 0 200ce90: 02 80 00 08 be 200ceb0 200ce94: 03 00 80 6c sethi %hi(0x201b000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200ce98: 40 00 03 8a call 200dcc0 <__errno> 200ce9c: b0 10 3f ff mov -1, %i0 200cea0: 82 10 20 1c mov 0x1c, %g1 200cea4: c2 22 00 00 st %g1, [ %o0 ] 200cea8: 81 c7 e0 08 ret 200ceac: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ceb0: e0 00 60 9c ld [ %g1 + 0x9c ], %l0 200ceb4: 92 10 00 1a mov %i2, %o1 200ceb8: b1 3c 20 1f sra %l0, 0x1f, %i0 200cebc: 96 10 00 10 mov %l0, %o3 200cec0: 94 10 00 18 mov %i0, %o2 200cec4: 40 00 29 37 call 20173a0 <__moddi3> 200cec8: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cecc: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ced0: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200ced4: 90 10 00 19 mov %i1, %o0 200ced8: 92 10 00 1a mov %i2, %o1 200cedc: 40 00 28 4b call 2017008 <__divdi3> 200cee0: 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; 200cee4: 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 ) { 200cee8: 80 a4 60 00 cmp %l1, 0 200ceec: 02 80 00 14 be 200cf3c 200cef0: 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 ); 200cef4: 90 10 00 1d mov %i5, %o0 200cef8: 7f ff fd d4 call 200c648 200cefc: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf00: 80 a2 20 00 cmp %o0, 0 200cf04: 02 80 00 36 be 200cfdc <== NEVER TAKEN 200cf08: 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; 200cf0c: b0 24 00 11 sub %l0, %l1, %i0 200cf10: 80 a6 00 1c cmp %i0, %i4 200cf14: 38 80 00 02 bgu,a 200cf1c 200cf18: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200cf1c: d0 02 00 00 ld [ %o0 ], %o0 200cf20: 92 10 00 1b mov %i3, %o1 200cf24: 90 02 00 11 add %o0, %l1, %o0 200cf28: 94 10 00 18 mov %i0, %o2 200cf2c: 40 00 05 c1 call 200e630 200cf30: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200cf34: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cf38: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf3c: 21 00 80 6c sethi %hi(0x201b000), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200cf40: 10 80 00 0f b 200cf7c 200cf44: f2 04 20 9c ld [ %l0 + 0x9c ], %i1 ! 201b09c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cf48: 92 10 00 1a mov %i2, %o1 200cf4c: 7f ff fd bf call 200c648 200cf50: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf54: 80 a2 20 00 cmp %o0, 0 200cf58: 02 bf ff d4 be 200cea8 <== NEVER TAKEN 200cf5c: 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 ); 200cf60: d0 02 00 00 ld [ %o0 ], %o0 200cf64: 94 10 00 19 mov %i1, %o2 200cf68: 40 00 05 b2 call 200e630 200cf6c: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200cf70: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cf74: 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( 200cf78: 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 ) { 200cf7c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200cf80: 80 a7 00 01 cmp %i4, %g1 200cf84: 1a bf ff f1 bcc 200cf48 200cf88: 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 ) { 200cf8c: 80 a7 20 00 cmp %i4, 0 200cf90: 02 80 00 0e be 200cfc8 200cf94: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cf98: 90 10 00 1d mov %i5, %o0 200cf9c: 92 10 00 1a mov %i2, %o1 200cfa0: 7f ff fd aa call 200c648 200cfa4: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cfa8: 80 a2 20 00 cmp %o0, 0 200cfac: 02 bf ff bf be 200cea8 <== NEVER TAKEN 200cfb0: 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 ); 200cfb4: d0 02 00 00 ld [ %o0 ], %o0 200cfb8: 94 10 00 1c mov %i4, %o2 200cfbc: 40 00 05 9d call 200e630 200cfc0: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200cfc4: 90 07 bf f8 add %fp, -8, %o0 200cfc8: 7f ff d7 ad call 2002e7c 200cfcc: 92 10 20 00 clr %o1 200cfd0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200cfd4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200cfd8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200cfdc: 81 c7 e0 08 ret 200cfe0: 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 d5 call 200dcc0 <__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 00 ld [ %i5 + 0x300 ], %g1 ! 2022300 <_impure_ptr> 2004e7c: 90 06 20 0c add %i0, 0xc, %o0 2004e80: 40 00 35 85 call 2012494 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 00 ld [ %i5 + 0x300 ], %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 00 ld [ %i5 + 0x300 ], %g1 2004eb8: 90 10 20 2f mov 0x2f, %o0 2004ebc: 40 00 35 41 call 20123c0 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 00 ld [ %i5 + 0x300 ], %g1 2004ed0: 13 00 80 81 sethi %hi(0x2020400), %o1 2004ed4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ed8: 92 12 61 10 or %o1, 0x110, %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 00 ld [ %i5 + 0x300 ], %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 28 or %o1, 0x128, %o1 ! 2020528 2004efc: 40 00 35 15 call 2012350 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 00 ld [ %i5 + 0x300 ], %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 0e call 2012350 2004f1c: 92 12 61 38 or %o1, 0x138, %o1 ! 2020538 (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 00 ld [ %i5 + 0x300 ], %g1 2004f30: 10 80 00 05 b 2004f44 2004f34: b0 16 21 48 or %i0, 0x148, %i0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004f38: c2 07 63 00 ld [ %i5 + 0x300 ], %g1 2004f3c: 31 00 80 81 sethi %hi(0x2020400), %i0 2004f40: b0 16 21 60 or %i0, 0x160, %i0 ! 2020560 2004f44: f2 00 60 08 ld [ %g1 + 8 ], %i1 2004f48: 40 00 35 53 call 2012494 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 34 fe call 2012350 <== NOT EXECUTED 2004f5c: 93 ee 61 78 restore %i1, 0x178, %o1 <== NOT EXECUTED return; } puts(""); 2004f60: 40 00 3c 38 call 2014040 2004f64: 91 ee 20 c0 restore %i0, 0xc0, %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 80 call 200f3e4 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 =============================================================================== 0200a3e0 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 200a3e0: 9d e3 bf a0 save %sp, -96, %sp while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a3e4: 10 80 00 07 b 200a400 200a3e8: c2 06 80 00 ld [ %i2 ], %g1 ++(*index); 200a3ec: c2 26 80 00 st %g1, [ %i2 ] --(*len); 200a3f0: c2 06 40 00 ld [ %i1 ], %g1 200a3f4: 82 00 7f ff add %g1, -1, %g1 200a3f8: 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 ) { 200a3fc: c2 06 80 00 ld [ %i2 ], %g1 200a400: 7f ff e6 36 call 2003cd8 200a404: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0 200a408: 80 a2 20 00 cmp %o0, 0 200a40c: 02 80 00 0b be 200a438 200a410: 01 00 00 00 nop 200a414: c2 06 80 00 ld [ %i2 ], %g1 200a418: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 200a41c: 80 a0 a0 00 cmp %g2, 0 200a420: 02 80 00 06 be 200a438 200a424: 01 00 00 00 nop 200a428: c4 06 40 00 ld [ %i1 ], %g2 200a42c: 80 a0 a0 00 cmp %g2, 0 200a430: 12 bf ff ef bne 200a3ec <== ALWAYS TAKEN 200a434: 82 00 60 01 inc %g1 200a438: 81 c7 e0 08 ret 200a43c: 81 e8 00 00 restore =============================================================================== 0200b004 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200b004: 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; 200b008: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200b00c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200b010: 84 00 bf fe add %g2, -2, %g2 200b014: 80 a0 a0 05 cmp %g2, 5 200b018: 18 80 00 12 bgu 200b060 <== NEVER TAKEN 200b01c: 85 28 a0 02 sll %g2, 2, %g2 200b020: 07 00 80 2b sethi %hi(0x200ac00), %g3 200b024: 86 10 e3 ec or %g3, 0x3ec, %g3 ! 200afec 200b028: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200b02c: 81 c0 80 00 jmp %g2 200b030: 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 ); 200b034: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200b038: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 200b03c: c4 26 60 1c st %g2, [ %i1 + 0x1c ] break; 200b040: 10 80 00 0e b 200b078 200b044: c6 26 60 18 st %g3, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200b048: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200b04c: 10 80 00 0b b 200b078 200b050: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200b054: c0 26 60 20 clr [ %i1 + 0x20 ] break; 200b058: 10 80 00 08 b 200b078 200b05c: c0 26 60 24 clr [ %i1 + 0x24 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200b060: 40 00 0b 18 call 200dcc0 <__errno> 200b064: b0 10 3f ff mov -1, %i0 200b068: 82 10 20 86 mov 0x86, %g1 200b06c: c2 22 00 00 st %g1, [ %o0 ] 200b070: 81 c7 e0 08 ret 200b074: 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; 200b078: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b07c: 07 00 00 3f sethi %hi(0xfc00), %g3 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200b080: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b084: 86 10 e3 fe or %g3, 0x3fe, %g3 200b088: 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 = 200b08c: 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; 200b090: 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 = 200b094: 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; 200b098: c4 26 60 0c st %g2, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; 200b09c: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200b0a0: c4 36 60 10 sth %g2, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; 200b0a4: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 200b0a8: c4 26 60 08 st %g2, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; 200b0ac: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 200b0b0: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; 200b0b4: c4 10 60 3e lduh [ %g1 + 0x3e ], %g2 200b0b8: c4 36 60 14 sth %g2, [ %i1 + 0x14 ] buf->st_atime = the_jnode->stat_atime; 200b0bc: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 200b0c0: c4 26 60 28 st %g2, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200b0c4: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 buf->st_ctime = the_jnode->stat_ctime; 200b0c8: 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; 200b0cc: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200b0d0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200b0d4: 03 00 80 6a sethi %hi(0x201a800), %g1 200b0d8: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 201a924 200b0dc: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200b0e0: 81 c7 e0 08 ret 200b0e4: 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 73 call 200dcc0 <__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 c8 call 200e630 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 49 call 200a440 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 43 call 200dcc0 <__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 3c call 200dcc0 <__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 cc or %i1, 0xcc, %i1 ! 2014ccc 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 30 ld [ %g1 + 0x230 ], %i4 2001f28: 03 00 80 52 sethi %hi(0x2014800), %g1 2001f2c: e2 00 62 34 ld [ %g1 + 0x234 ], %l1 ! 2014a34 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 61 e0 or %o1, 0x1e0, %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 30 ld [ %g1 + 0x230 ], %g1 2001f68: d0 00 a2 34 ld [ %g2 + 0x234 ], %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 61 f0 or %o1, 0x1f0, %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 30 ld [ %i3 + 0x230 ], %g1 2001f90: d0 07 22 34 ld [ %i4 + 0x234 ], %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 00 or %o1, 0x200, %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 2c ld [ %g1 + 0x22c ], %g1 ! 2014a2c (*print_handler)( print_context, "Unavailable\n" ); 2001fb8: d0 07 22 34 ld [ %i4 + 0x234 ], %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 30 ld [ %i3 + 0x230 ], %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 20 or %o1, 0x220, %o1 ! 2013620 <== 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 30 or %o1, 0x230, %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 2c ld [ %g1 + 0x22c ], %g1 ! 2014a2c 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 bc or %g2, 0xbc, %g1 2002014: 86 10 e0 0d or %g3, 0xd, %g3 2002018: c6 20 a0 bc st %g3, [ %g2 + 0xbc ] 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 60 cc ld [ %g1 + 0xcc ], %o0 ! 20150cc <_Per_CPU_Information> 2002048: 80 a2 20 00 cmp %o0, 0 200204c: 02 80 00 0c be 200207c <== NEVER TAKEN 2002050: 84 10 60 cc or %g1, 0xcc, %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 cc or %g1, 0xcc, %g2 ! 2014ccc 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 cc st %o2, [ %g1 + 0xcc ] (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 2002074: 40 00 30 aa call 200e31c 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 2c st %g2, [ %g1 + 0x22c ] ! 2014a2c 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 38 or %o0, 0x238, %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 48 or %o0, 0x248, %o0 ! 2013648 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 68 or %o0, 0x268, %o0 ! 2013668 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 80 or %o0, 0x280, %o0 ! 2013680 "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 98 or %o0, 0x298, %o0 ! 2013698 ); 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 b0 or %o0, 0x2b0, %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 22 e8 or %o0, 0x2e8, %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 ef call 201f7f4 <__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 08 call 2012c6c <_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 ec call 2014c1c <_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 9e call 201231c <_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 3a call 2008f98 <_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 1c or %g4, 0x31c, %g4 ! 201b71c <_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 70 ld [ %g4 + 0x370 ], %i1 ! 201b770 <_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 70 ld [ %g4 + 0x370 ], %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 70 st %g2, [ %g1 + 0x370 ] ! 201b770 <_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 82 call 2009b4c <_Watchdog_Remove> 2006148: 90 07 60 48 add %i5, 0x48, %o0 200614c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006150: 40 00 09 e0 call 20088d0 <_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 c8 call 2008c88 <_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 28 ld [ %g1 + 0x328 ], %g1 ! 201b728 <_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 70 ld [ %g1 + 0x370 ], %g2 ! 201b770 <_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 70 st %g2, [ %g1 + 0x370 ] } 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 c0 call 20088d0 <_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 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201b4f0 <_Thread_Dispatch_disable_level> 20061e0: 84 00 bf ff add %g2, -1, %g2 20061e4: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] return _Thread_Dispatch_disable_level; 20061e8: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 20061ec: 81 c7 e0 08 ret 20061f0: 81 e8 00 00 restore =============================================================================== 0200bc98 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200bc98: 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; 200bc9c: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200bca0: 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; 200bca4: 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; 200bca8: 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; 200bcac: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200bcb0: 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; 200bcb4: 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 ) { 200bcb8: 80 a7 40 19 cmp %i5, %i1 200bcbc: 0a 80 00 9f bcs 200bf38 <_Heap_Extend+0x2a0> 200bcc0: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200bcc4: 90 10 00 19 mov %i1, %o0 200bcc8: 92 10 00 1a mov %i2, %o1 200bccc: 94 10 00 11 mov %l1, %o2 200bcd0: 98 07 bf f8 add %fp, -8, %o4 200bcd4: 7f ff ed 48 call 20071f4 <_Heap_Get_first_and_last_block> 200bcd8: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200bcdc: 80 8a 20 ff btst 0xff, %o0 200bce0: 02 80 00 96 be 200bf38 <_Heap_Extend+0x2a0> 200bce4: b4 10 00 10 mov %l0, %i2 200bce8: aa 10 20 00 clr %l5 200bcec: ac 10 20 00 clr %l6 200bcf0: b8 10 20 00 clr %i4 200bcf4: a8 10 20 00 clr %l4 200bcf8: 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 ( 200bcfc: 80 a0 40 1d cmp %g1, %i5 200bd00: 1a 80 00 05 bcc 200bd14 <_Heap_Extend+0x7c> 200bd04: e6 06 80 00 ld [ %i2 ], %l3 200bd08: 80 a6 40 13 cmp %i1, %l3 200bd0c: 2a 80 00 8b bcs,a 200bf38 <_Heap_Extend+0x2a0> 200bd10: 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 ) { 200bd14: 80 a7 40 01 cmp %i5, %g1 200bd18: 02 80 00 06 be 200bd30 <_Heap_Extend+0x98> 200bd1c: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200bd20: 2a 80 00 05 bcs,a 200bd34 <_Heap_Extend+0x9c> 200bd24: ac 10 00 1a mov %i2, %l6 200bd28: 10 80 00 04 b 200bd38 <_Heap_Extend+0xa0> 200bd2c: 90 10 00 13 mov %l3, %o0 200bd30: a8 10 00 1a mov %i2, %l4 200bd34: 90 10 00 13 mov %l3, %o0 200bd38: 40 00 15 fd call 201152c <.urem> 200bd3c: 92 10 00 11 mov %l1, %o1 200bd40: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200bd44: 80 a4 c0 19 cmp %l3, %i1 200bd48: 12 80 00 05 bne 200bd5c <_Heap_Extend+0xc4> 200bd4c: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200bd50: 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 ) 200bd54: 10 80 00 04 b 200bd64 <_Heap_Extend+0xcc> 200bd58: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200bd5c: 2a 80 00 02 bcs,a 200bd64 <_Heap_Extend+0xcc> 200bd60: 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; 200bd64: f4 02 20 04 ld [ %o0 + 4 ], %i2 200bd68: 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); 200bd6c: 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 ); 200bd70: 80 a6 80 10 cmp %i2, %l0 200bd74: 12 bf ff e2 bne 200bcfc <_Heap_Extend+0x64> 200bd78: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200bd7c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bd80: 80 a6 40 01 cmp %i1, %g1 200bd84: 3a 80 00 04 bcc,a 200bd94 <_Heap_Extend+0xfc> 200bd88: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200bd8c: 10 80 00 05 b 200bda0 <_Heap_Extend+0x108> 200bd90: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200bd94: 80 a0 40 1d cmp %g1, %i5 200bd98: 2a 80 00 02 bcs,a 200bda0 <_Heap_Extend+0x108> 200bd9c: 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; 200bda0: c4 07 bf f8 ld [ %fp + -8 ], %g2 200bda4: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200bda8: 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 = 200bdac: 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; 200bdb0: 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; 200bdb4: 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 = 200bdb8: 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 ) { 200bdbc: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200bdc0: 80 a0 c0 02 cmp %g3, %g2 200bdc4: 08 80 00 04 bleu 200bdd4 <_Heap_Extend+0x13c> 200bdc8: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200bdcc: 10 80 00 06 b 200bde4 <_Heap_Extend+0x14c> 200bdd0: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200bdd4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200bdd8: 80 a0 80 01 cmp %g2, %g1 200bddc: 2a 80 00 02 bcs,a 200bde4 <_Heap_Extend+0x14c> 200bde0: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200bde4: 80 a5 20 00 cmp %l4, 0 200bde8: 02 80 00 14 be 200be38 <_Heap_Extend+0x1a0> 200bdec: 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; 200bdf0: 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; 200bdf4: 92 10 00 1a mov %i2, %o1 200bdf8: 40 00 15 cd call 201152c <.urem> 200bdfc: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200be00: 80 a2 20 00 cmp %o0, 0 200be04: 02 80 00 04 be 200be14 <_Heap_Extend+0x17c> 200be08: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200be0c: b2 06 40 1a add %i1, %i2, %i1 200be10: 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 = 200be14: 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; 200be18: 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 = 200be1c: 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; 200be20: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200be24: 90 10 00 18 mov %i0, %o0 200be28: 7f ff ff 92 call 200bc70 <_Heap_Free_block> 200be2c: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200be30: 10 80 00 08 b 200be50 <_Heap_Extend+0x1b8> 200be34: 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 ) { 200be38: 80 a5 a0 00 cmp %l6, 0 200be3c: 02 80 00 04 be 200be4c <_Heap_Extend+0x1b4> 200be40: 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; 200be44: 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 = 200be48: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200be4c: 80 a7 20 00 cmp %i4, 0 200be50: 02 80 00 15 be 200bea4 <_Heap_Extend+0x20c> 200be54: 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); 200be58: 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( 200be5c: ba 27 40 1c sub %i5, %i4, %i5 200be60: 40 00 15 b3 call 201152c <.urem> 200be64: 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) 200be68: c4 07 20 04 ld [ %i4 + 4 ], %g2 200be6c: 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 = 200be70: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200be74: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200be78: 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 = 200be7c: 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; 200be80: 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 ); 200be84: 90 10 00 18 mov %i0, %o0 200be88: 82 08 60 01 and %g1, 1, %g1 200be8c: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200be90: ba 17 40 01 or %i5, %g1, %i5 200be94: 7f ff ff 77 call 200bc70 <_Heap_Free_block> 200be98: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200be9c: 10 80 00 0f b 200bed8 <_Heap_Extend+0x240> 200bea0: 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 ) { 200bea4: 80 a5 60 00 cmp %l5, 0 200bea8: 02 80 00 0b be 200bed4 <_Heap_Extend+0x23c> 200beac: 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; 200beb0: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200beb4: c2 07 bf fc ld [ %fp + -4 ], %g1 200beb8: 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 ); 200bebc: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200bec0: 84 10 c0 02 or %g3, %g2, %g2 200bec4: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200bec8: c4 00 60 04 ld [ %g1 + 4 ], %g2 200becc: 84 10 a0 01 or %g2, 1, %g2 200bed0: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200bed4: 80 a7 20 00 cmp %i4, 0 200bed8: 32 80 00 09 bne,a 200befc <_Heap_Extend+0x264> 200bedc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200bee0: 80 a5 20 00 cmp %l4, 0 200bee4: 32 80 00 06 bne,a 200befc <_Heap_Extend+0x264> 200bee8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200beec: d2 07 bf f8 ld [ %fp + -8 ], %o1 200bef0: 7f ff ff 60 call 200bc70 <_Heap_Free_block> 200bef4: 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 200bef8: 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( 200befc: 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; 200bf00: 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( 200bf04: 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; 200bf08: 86 08 e0 01 and %g3, 1, %g3 block->size_and_flag = size | flag; 200bf0c: 84 10 c0 02 or %g3, %g2, %g2 200bf10: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200bf14: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200bf18: 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; 200bf1c: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200bf20: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200bf24: 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; 200bf28: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200bf2c: 02 80 00 03 be 200bf38 <_Heap_Extend+0x2a0> <== NEVER TAKEN 200bf30: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200bf34: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200bf38: b0 0f 20 01 and %i4, 1, %i0 200bf3c: 81 c7 e0 08 ret 200bf40: 81 e8 00 00 restore =============================================================================== 0200c0a8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c0a8: 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; 200c0ac: 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 ) { 200c0b0: 80 a6 60 00 cmp %i1, 0 200c0b4: 02 80 00 77 be 200c290 <_Heap_Free+0x1e8> 200c0b8: 90 10 00 19 mov %i1, %o0 200c0bc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c0c0: 40 00 2b 26 call 2016d58 <.urem> 200c0c4: 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 200c0c8: 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); 200c0cc: 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; 200c0d0: 80 a7 40 0d cmp %i5, %o5 200c0d4: 0a 80 00 05 bcs 200c0e8 <_Heap_Free+0x40> 200c0d8: 82 10 20 00 clr %g1 200c0dc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c0e0: 80 a0 40 1d cmp %g1, %i5 200c0e4: 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 ) ) { 200c0e8: 80 a0 60 00 cmp %g1, 0 200c0ec: 02 80 00 69 be 200c290 <_Heap_Free+0x1e8> 200c0f0: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c0f4: 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; 200c0f8: 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); 200c0fc: 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; 200c100: 80 a0 40 0d cmp %g1, %o5 200c104: 0a 80 00 05 bcs 200c118 <_Heap_Free+0x70> <== NEVER TAKEN 200c108: 86 10 20 00 clr %g3 200c10c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c110: 80 a0 c0 01 cmp %g3, %g1 200c114: 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 ) ) { 200c118: 80 a0 e0 00 cmp %g3, 0 200c11c: 02 80 00 5d be 200c290 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c120: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c124: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200c128: 80 8b e0 01 btst 1, %o7 200c12c: 02 80 00 59 be 200c290 <_Heap_Free+0x1e8> 200c130: 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 200c134: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200c138: 80 a0 40 04 cmp %g1, %g4 200c13c: 02 80 00 07 be 200c158 <_Heap_Free+0xb0> 200c140: 98 10 20 00 clr %o4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c144: 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; 200c148: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200c14c: 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 )); 200c150: 80 a0 00 03 cmp %g0, %g3 200c154: 98 60 3f ff subx %g0, -1, %o4 if ( !_Heap_Is_prev_used( block ) ) { 200c158: 80 8a e0 01 btst 1, %o3 200c15c: 12 80 00 25 bne 200c1f0 <_Heap_Free+0x148> 200c160: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200c164: 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); 200c168: 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; 200c16c: 80 a0 c0 0d cmp %g3, %o5 200c170: 0a 80 00 04 bcs 200c180 <_Heap_Free+0xd8> <== NEVER TAKEN 200c174: 94 10 20 00 clr %o2 200c178: 80 a1 00 03 cmp %g4, %g3 200c17c: 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 ) ) { 200c180: 80 a2 a0 00 cmp %o2, 0 200c184: 02 80 00 43 be 200c290 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c188: 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; 200c18c: 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) ) { 200c190: 80 8b 60 01 btst 1, %o5 200c194: 02 80 00 3f be 200c290 <_Heap_Free+0x1e8> <== NEVER TAKEN 200c198: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200c19c: 02 80 00 0e be 200c1d4 <_Heap_Free+0x12c> 200c1a0: 88 00 80 0b add %g2, %o3, %g4 uintptr_t const size = block_size + prev_size + next_block_size; 200c1a4: 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; 200c1a8: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200c1ac: c2 00 60 0c ld [ %g1 + 0xc ], %g1 prev->next = next; 200c1b0: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200c1b4: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200c1b8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 200c1bc: 82 00 7f ff add %g1, -1, %g1 200c1c0: 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; 200c1c4: 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; 200c1c8: 82 13 e0 01 or %o7, 1, %g1 200c1cc: 10 80 00 27 b 200c268 <_Heap_Free+0x1c0> 200c1d0: 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; 200c1d4: 9e 11 20 01 or %g4, 1, %o7 200c1d8: de 20 e0 04 st %o7, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c1dc: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200c1e0: 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; 200c1e4: 86 08 ff fe and %g3, -2, %g3 200c1e8: 10 80 00 20 b 200c268 <_Heap_Free+0x1c0> 200c1ec: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200c1f0: 22 80 00 0d be,a 200c224 <_Heap_Free+0x17c> 200c1f4: 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; 200c1f8: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200c1fc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200c200: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200c204: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200c208: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200c20c: 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; 200c210: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c214: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200c218: 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; 200c21c: 10 80 00 13 b 200c268 <_Heap_Free+0x1c0> 200c220: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200c224: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200c228: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200c22c: 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; 200c230: 86 10 a0 01 or %g2, 1, %g3 200c234: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c238: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200c23c: 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; 200c240: 86 08 ff fe and %g3, -2, %g3 200c244: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c248: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200c24c: 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; 200c250: 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; 200c254: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200c258: 80 a0 c0 01 cmp %g3, %g1 200c25c: 1a 80 00 03 bcc 200c268 <_Heap_Free+0x1c0> 200c260: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200c264: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200c268: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200c26c: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c270: 82 00 7f ff add %g1, -1, %g1 200c274: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200c278: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c27c: 82 00 60 01 inc %g1 200c280: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200c284: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200c288: 84 00 40 02 add %g1, %g2, %g2 200c28c: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200c290: b0 09 20 01 and %g4, 1, %i0 200c294: 81 c7 e0 08 ret 200c298: 81 e8 00 00 restore =============================================================================== 02018828 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 2018828: 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); 201882c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2018830: 7f ff f9 4a call 2016d58 <.urem> 2018834: 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 2018838: 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); 201883c: 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); 2018840: 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; 2018844: 80 a2 00 03 cmp %o0, %g3 2018848: 0a 80 00 05 bcs 201885c <_Heap_Size_of_alloc_area+0x34> 201884c: 84 10 20 00 clr %g2 2018850: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018854: 80 a0 40 08 cmp %g1, %o0 2018858: 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 ) ) { 201885c: 80 a0 a0 00 cmp %g2, 0 2018860: 02 80 00 15 be 20188b4 <_Heap_Size_of_alloc_area+0x8c> 2018864: 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; 2018868: fa 02 20 04 ld [ %o0 + 4 ], %i5 201886c: 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); 2018870: 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; 2018874: 80 a7 40 03 cmp %i5, %g3 2018878: 0a 80 00 05 bcs 201888c <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 201887c: 84 10 20 00 clr %g2 2018880: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018884: 80 a0 40 1d cmp %g1, %i5 2018888: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 201888c: 80 a0 a0 00 cmp %g2, 0 2018890: 02 80 00 09 be 20188b4 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2018894: 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; 2018898: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 201889c: 80 88 a0 01 btst 1, %g2 20188a0: 02 80 00 05 be 20188b4 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 20188a4: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 20188a8: 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; 20188ac: ba 07 60 04 add %i5, 4, %i5 20188b0: fa 26 80 00 st %i5, [ %i2 ] return true; } 20188b4: b0 08 60 01 and %g1, 1, %i0 20188b8: 81 c7 e0 08 ret 20188bc: 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 14 ld [ %g1 + 0x14 ], %g2 ! 2017414 <_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 c8 or %o2, 0x1c8, %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 60 or %o2, 0x260, %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 78 or %o2, 0x278, %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 98 or %o2, 0x298, %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 c0 or %o2, 0x2c0, %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 a2 f8 or %o2, 0x2f8, %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 28 or %o2, 0x328, %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 40 or %o2, 0x340, %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 70 or %o2, 0x370, %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 90 or %o2, 0x390, %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 c0 or %o2, 0x3c0, %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 52 sethi %hi(0x2014800), %o2 200832c: 90 10 00 19 mov %i1, %o0 2008330: 92 10 20 01 mov 1, %o1 2008334: 94 12 a3 e0 or %o2, 0x3e0, %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 a0 or %l6, 0x1a0, %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 88 or %l7, 0x188, %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 18 or %o2, 0x18, %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 48 or %o2, 0x48, %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 78 or %o2, 0x78, %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 a8 or %o2, 0xa8, %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 88 or %g2, 0x188, %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 50 or %l5, 0x150, %g3 20084a0: 07 00 80 52 sethi %hi(0x2014800), %g3 20084a4: 86 10 e1 98 or %g3, 0x198, %g3 ! 2014998 <_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 a8 or %o7, 0x1a8, %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 50 or %l5, 0x150, %g1 20084c8: 03 00 80 52 sethi %hi(0x2014800), %g1 20084cc: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 20149b8 <_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 a0 e0 or %o2, 0xe0, %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 18 or %o2, 0x118, %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 58 or %o2, 0x158, %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 c8 or %o2, 0x1c8, %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 5d call 2016aa8 <.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 6d call 200c29c <_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 58 or %g1, 0x58, %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 08 ld [ %g1 + 0x308 ], %g1 ! 201cb08 <_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 69 call 2009638 <_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 38 or %g2, 0x38, %g2 ! 201c838 <_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> =============================================================================== 020096ec <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 20096ec: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 20096f0: 80 a6 60 00 cmp %i1, 0 20096f4: 02 80 00 73 be 20098c0 <_RBTree_Extract_unprotected+0x1d4> 20096f8: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 20096fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 2009700: 80 a6 40 01 cmp %i1, %g1 2009704: 32 80 00 0d bne,a 2009738 <_RBTree_Extract_unprotected+0x4c> 2009708: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 200970c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2009710: 80 a0 60 00 cmp %g1, 0 2009714: 22 80 00 04 be,a 2009724 <_RBTree_Extract_unprotected+0x38> 2009718: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200971c: 10 80 00 06 b 2009734 <_RBTree_Extract_unprotected+0x48> 2009720: 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, 2009724: 80 a6 00 01 cmp %i0, %g1 2009728: 12 80 00 03 bne 2009734 <_RBTree_Extract_unprotected+0x48> 200972c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 2009730: 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]) { 2009734: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009738: 80 a6 40 01 cmp %i1, %g1 200973c: 12 80 00 0b bne 2009768 <_RBTree_Extract_unprotected+0x7c> 2009740: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 2009744: 80 a0 60 00 cmp %g1, 0 2009748: 22 80 00 04 be,a 2009758 <_RBTree_Extract_unprotected+0x6c> 200974c: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 2009750: 10 80 00 06 b 2009768 <_RBTree_Extract_unprotected+0x7c> 2009754: 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, 2009758: 80 a6 00 02 cmp %i0, %g2 200975c: 12 80 00 03 bne 2009768 <_RBTree_Extract_unprotected+0x7c> 2009760: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 2009764: 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]) { 2009768: ba 90 60 00 orcc %g1, 0, %i5 200976c: 02 80 00 36 be 2009844 <_RBTree_Extract_unprotected+0x158> 2009770: f8 06 60 08 ld [ %i1 + 8 ], %i4 2009774: 80 a7 20 00 cmp %i4, 0 2009778: 32 80 00 05 bne,a 200978c <_RBTree_Extract_unprotected+0xa0> 200977c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2009780: 10 80 00 35 b 2009854 <_RBTree_Extract_unprotected+0x168> 2009784: 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]; 2009788: c2 07 60 08 ld [ %i5 + 8 ], %g1 200978c: 80 a0 60 00 cmp %g1, 0 2009790: 32 bf ff fe bne,a 2009788 <_RBTree_Extract_unprotected+0x9c> 2009794: 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]; 2009798: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200979c: 80 a7 20 00 cmp %i4, 0 20097a0: 02 80 00 05 be 20097b4 <_RBTree_Extract_unprotected+0xc8> 20097a4: 01 00 00 00 nop leaf->parent = target->parent; 20097a8: c2 07 40 00 ld [ %i5 ], %g1 20097ac: 10 80 00 04 b 20097bc <_RBTree_Extract_unprotected+0xd0> 20097b0: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 20097b4: 7f ff ff 53 call 2009500 <_RBTree_Extract_validate_unprotected> 20097b8: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 20097bc: 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; 20097c0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 20097c4: c6 00 a0 04 ld [ %g2 + 4 ], %g3 20097c8: 86 1f 40 03 xor %i5, %g3, %g3 20097cc: 80 a0 00 03 cmp %g0, %g3 20097d0: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 20097d4: 87 28 e0 02 sll %g3, 2, %g3 20097d8: 84 00 80 03 add %g2, %g3, %g2 20097dc: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 20097e0: c4 06 40 00 ld [ %i1 ], %g2 20097e4: c6 00 a0 04 ld [ %g2 + 4 ], %g3 20097e8: 86 1e 40 03 xor %i1, %g3, %g3 20097ec: 80 a0 00 03 cmp %g0, %g3 20097f0: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 20097f4: 87 28 e0 02 sll %g3, 2, %g3 20097f8: 84 00 80 03 add %g2, %g3, %g2 20097fc: 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]; 2009800: c4 06 60 08 ld [ %i1 + 8 ], %g2 2009804: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 2009808: c4 06 60 08 ld [ %i1 + 8 ], %g2 200980c: 80 a0 a0 00 cmp %g2, 0 2009810: 32 80 00 02 bne,a 2009818 <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 2009814: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 2009818: c4 06 60 04 ld [ %i1 + 4 ], %g2 200981c: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 2009820: c4 06 60 04 ld [ %i1 + 4 ], %g2 2009824: 80 a0 a0 00 cmp %g2, 0 2009828: 32 80 00 02 bne,a 2009830 <_RBTree_Extract_unprotected+0x144> 200982c: 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; 2009830: c4 06 40 00 ld [ %i1 ], %g2 2009834: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 2009838: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200983c: 10 80 00 14 b 200988c <_RBTree_Extract_unprotected+0x1a0> 2009840: 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 ) { 2009844: 80 a7 20 00 cmp %i4, 0 2009848: 32 80 00 04 bne,a 2009858 <_RBTree_Extract_unprotected+0x16c> 200984c: c2 06 40 00 ld [ %i1 ], %g1 2009850: 30 80 00 04 b,a 2009860 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 2009854: c2 06 40 00 ld [ %i1 ], %g1 2009858: 10 80 00 04 b 2009868 <_RBTree_Extract_unprotected+0x17c> 200985c: 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); 2009860: 7f ff ff 28 call 2009500 <_RBTree_Extract_validate_unprotected> 2009864: 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]; 2009868: 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; 200986c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 2009870: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2009874: 86 1e 40 03 xor %i1, %g3, %g3 2009878: 80 a0 00 03 cmp %g0, %g3 200987c: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 2009880: 87 28 e0 02 sll %g3, 2, %g3 2009884: 84 00 80 03 add %g2, %g3, %g2 2009888: 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 */ 200988c: 80 a0 60 00 cmp %g1, 0 2009890: 32 80 00 06 bne,a 20098a8 <_RBTree_Extract_unprotected+0x1bc> 2009894: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 2009898: 80 a7 20 00 cmp %i4, 0 200989c: 32 80 00 02 bne,a 20098a4 <_RBTree_Extract_unprotected+0x1b8> 20098a0: 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; 20098a4: 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; 20098a8: c0 26 60 08 clr [ %i1 + 8 ] 20098ac: c0 26 60 04 clr [ %i1 + 4 ] 20098b0: 80 a0 60 00 cmp %g1, 0 20098b4: 02 80 00 03 be 20098c0 <_RBTree_Extract_unprotected+0x1d4> 20098b8: c0 26 40 00 clr [ %i1 ] 20098bc: c0 20 60 0c clr [ %g1 + 0xc ] 20098c0: 81 c7 e0 08 ret 20098c4: 81 e8 00 00 restore =============================================================================== 02009500 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 2009500: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 2009504: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 2009508: c2 07 40 00 ld [ %i5 ], %g1 200950c: 80 a0 60 00 cmp %g1, 0 2009510: 02 80 00 6e be 20096c8 <_RBTree_Extract_validate_unprotected+0x1c8> 2009514: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 2009518: 7f ff ff ca call 2009440 <_RBTree_Sibling> 200951c: 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) { 2009520: 10 80 00 5d b 2009694 <_RBTree_Extract_validate_unprotected+0x194> 2009524: 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); 2009528: 22 80 00 15 be,a 200957c <_RBTree_Extract_validate_unprotected+0x7c><== NEVER TAKEN 200952c: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 2009530: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2009534: 80 a0 60 01 cmp %g1, 1 2009538: 32 80 00 11 bne,a 200957c <_RBTree_Extract_validate_unprotected+0x7c> 200953c: 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; 2009540: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 2009544: 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; 2009548: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 200954c: 82 1e 00 01 xor %i0, %g1, %g1 2009550: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 2009554: 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]; 2009558: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 200955c: 7f ff ff ca call 2009484 <_RBTree_Rotate> 2009560: 92 10 00 1c mov %i4, %o1 sibling = parent->child[!dir]; 2009564: 80 a0 00 1c cmp %g0, %i4 2009568: 82 60 3f ff subx %g0, -1, %g1 200956c: 83 28 60 02 sll %g1, 2, %g1 2009570: 82 07 40 01 add %i5, %g1, %g1 2009574: 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]) && 2009578: c4 02 20 08 ld [ %o0 + 8 ], %g2 200957c: 80 a0 a0 00 cmp %g2, 0 2009580: 02 80 00 06 be 2009598 <_RBTree_Extract_validate_unprotected+0x98> 2009584: 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( 2009588: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200958c: 82 18 60 01 xor %g1, 1, %g1 2009590: 80 a0 00 01 cmp %g0, %g1 2009594: 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]) && 2009598: 80 a0 60 00 cmp %g1, 0 200959c: 32 80 00 14 bne,a 20095ec <_RBTree_Extract_validate_unprotected+0xec> 20095a0: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 20095a4: c4 02 20 04 ld [ %o0 + 4 ], %g2 20095a8: 80 a0 a0 00 cmp %g2, 0 20095ac: 02 80 00 07 be 20095c8 <_RBTree_Extract_validate_unprotected+0xc8> 20095b0: 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( 20095b4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 20095b8: 82 18 60 01 xor %g1, 1, %g1 20095bc: 80 a0 00 01 cmp %g0, %g1 20095c0: 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]) && 20095c4: 80 a0 60 00 cmp %g1, 0 20095c8: 32 80 00 09 bne,a 20095ec <_RBTree_Extract_validate_unprotected+0xec> 20095cc: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 20095d0: f4 22 20 0c st %i2, [ %o0 + 0xc ] 20095d4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 20095d8: 80 a0 60 01 cmp %g1, 1 20095dc: 32 80 00 3d bne,a 20096d0 <_RBTree_Extract_validate_unprotected+0x1d0> 20095e0: f8 07 40 00 ld [ %i5 ], %i4 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 20095e4: 10 80 00 33 b 20096b0 <_RBTree_Extract_validate_unprotected+0x1b0> 20095e8: 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]; 20095ec: 82 1e 00 01 xor %i0, %g1, %g1 20095f0: 80 a0 00 01 cmp %g0, %g1 20095f4: b8 40 20 00 addx %g0, 0, %i4 if (!_RBTree_Is_red(sibling->child[!dir])) { 20095f8: 80 a0 00 1c cmp %g0, %i4 20095fc: b6 60 3f ff subx %g0, -1, %i3 2009600: 83 2e e0 02 sll %i3, 2, %g1 2009604: 82 02 00 01 add %o0, %g1, %g1 2009608: c4 00 60 04 ld [ %g1 + 4 ], %g2 200960c: 80 a0 a0 00 cmp %g2, 0 2009610: 02 80 00 06 be 2009628 <_RBTree_Extract_validate_unprotected+0x128> 2009614: 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( 2009618: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200961c: 82 18 60 01 xor %g1, 1, %g1 2009620: 80 a0 00 01 cmp %g0, %g1 2009624: 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])) { 2009628: 80 a0 60 00 cmp %g1, 0 200962c: 32 80 00 0e bne,a 2009664 <_RBTree_Extract_validate_unprotected+0x164> 2009630: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 2009634: 82 10 20 01 mov 1, %g1 2009638: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 200963c: 83 2f 20 02 sll %i4, 2, %g1 2009640: 82 02 00 01 add %o0, %g1, %g1 2009644: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, !dir); 2009648: 92 1f 20 01 xor %i4, 1, %o1 200964c: 7f ff ff 8e call 2009484 <_RBTree_Rotate> 2009650: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[!dir]; 2009654: 83 2e e0 02 sll %i3, 2, %g1 2009658: 82 07 40 01 add %i5, %g1, %g1 200965c: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 2009660: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2009664: 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; 2009668: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 200966c: 90 02 00 1b add %o0, %i3, %o0 2009670: 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; 2009674: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[!dir]->color = RBT_BLACK; 2009678: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 200967c: 90 10 00 1d mov %i5, %o0 2009680: 7f ff ff 81 call 2009484 <_RBTree_Rotate> 2009684: 92 10 00 1c mov %i4, %o1 break; /* done */ 2009688: 10 80 00 0b b 20096b4 <_RBTree_Extract_validate_unprotected+0x1b4> 200968c: 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) { 2009690: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009694: 80 a0 60 01 cmp %g1, 1 2009698: 22 80 00 07 be,a 20096b4 <_RBTree_Extract_validate_unprotected+0x1b4> 200969c: c2 06 00 00 ld [ %i0 ], %g1 20096a0: c2 07 40 00 ld [ %i5 ], %g1 20096a4: 80 a0 60 00 cmp %g1, 0 20096a8: 12 bf ff a0 bne 2009528 <_RBTree_Extract_validate_unprotected+0x28> 20096ac: 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; 20096b0: c2 06 00 00 ld [ %i0 ], %g1 20096b4: c2 00 40 00 ld [ %g1 ], %g1 20096b8: 80 a0 60 00 cmp %g1, 0 20096bc: 12 80 00 0a bne 20096e4 <_RBTree_Extract_validate_unprotected+0x1e4> 20096c0: 01 00 00 00 nop 20096c4: c0 26 20 0c clr [ %i0 + 0xc ] 20096c8: 81 c7 e0 08 ret 20096cc: 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); 20096d0: 90 10 00 1d mov %i5, %o0 20096d4: 7f ff ff 5b call 2009440 <_RBTree_Sibling> 20096d8: b0 10 00 1d mov %i5, %i0 20096dc: 10 bf ff ed b 2009690 <_RBTree_Extract_validate_unprotected+0x190> 20096e0: ba 10 00 1c mov %i4, %i5 20096e4: 81 c7 e0 08 ret 20096e8: 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 =============================================================================== 0200299c <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; 200299c: 80 a2 20 00 cmp %o0, 0 20029a0: 02 80 00 0e be 20029d8 <_RBTree_Sibling+0x3c> 20029a4: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 20029a8: c4 02 00 00 ld [ %o0 ], %g2 20029ac: 80 a0 a0 00 cmp %g2, 0 20029b0: 02 80 00 0a be 20029d8 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 20029b4: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 20029b8: c6 00 80 00 ld [ %g2 ], %g3 20029bc: 80 a0 e0 00 cmp %g3, 0 20029c0: 02 80 00 06 be 20029d8 <_RBTree_Sibling+0x3c> 20029c4: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 20029c8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20029cc: 80 a2 00 01 cmp %o0, %g1 20029d0: 22 80 00 02 be,a 20029d8 <_RBTree_Sibling+0x3c> 20029d4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 20029d8: 81 c3 e0 08 retl 20029dc: 90 10 00 01 mov %g1, %o0 =============================================================================== 02009a70 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 2009a70: 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))) { 2009a74: 10 80 00 1f b 2009af0 <_RBTree_Validate_insert_unprotected+0x80> 2009a78: 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; 2009a7c: 80 a0 60 00 cmp %g1, 0 2009a80: 02 80 00 27 be 2009b1c <_RBTree_Validate_insert_unprotected+0xac><== NEVER TAKEN 2009a84: 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]) 2009a88: 80 a2 00 01 cmp %o0, %g1 2009a8c: 22 80 00 02 be,a 2009a94 <_RBTree_Validate_insert_unprotected+0x24> 2009a90: 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); 2009a94: 80 a0 60 00 cmp %g1, 0 2009a98: 22 80 00 21 be,a 2009b1c <_RBTree_Validate_insert_unprotected+0xac> 2009a9c: c2 07 60 04 ld [ %i5 + 4 ], %g1 2009aa0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2009aa4: 80 a0 a0 01 cmp %g2, 1 2009aa8: 32 80 00 1d bne,a 2009b1c <_RBTree_Validate_insert_unprotected+0xac> 2009aac: 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; 2009ab0: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 2009ab4: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009ab8: c4 27 60 0c st %g2, [ %i5 + 0xc ] 2009abc: 10 80 00 0d b 2009af0 <_RBTree_Validate_insert_unprotected+0x80> 2009ac0: 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); 2009ac4: 7f ff ff cc call 20099f4 <_RBTree_Rotate> 2009ac8: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 2009acc: 83 2f 20 02 sll %i4, 2, %g1 2009ad0: b0 06 00 01 add %i0, %g1, %i0 2009ad4: f0 06 20 04 ld [ %i0 + 4 ], %i0 } the_node->parent->color = RBT_BLACK; 2009ad8: 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)); 2009adc: 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; 2009ae0: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009ae4: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 2009ae8: 7f ff ff c3 call 20099f4 <_RBTree_Rotate> 2009aec: 92 26 c0 1c sub %i3, %i4, %o1 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 2009af0: 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; 2009af4: fa 02 00 00 ld [ %o0 ], %i5 2009af8: 80 a7 60 00 cmp %i5, 0 2009afc: 22 80 00 14 be,a 2009b4c <_RBTree_Validate_insert_unprotected+0xdc> 2009b00: 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); 2009b04: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2009b08: 80 a0 60 01 cmp %g1, 1 2009b0c: 12 80 00 10 bne 2009b4c <_RBTree_Validate_insert_unprotected+0xdc> 2009b10: 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; 2009b14: 10 bf ff da b 2009a7c <_RBTree_Validate_insert_unprotected+0xc> 2009b18: 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]; 2009b1c: 82 1a 00 01 xor %o0, %g1, %g1 2009b20: 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]; 2009b24: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 2009b28: 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]; 2009b2c: 82 1e 00 01 xor %i0, %g1, %g1 2009b30: 80 a0 00 01 cmp %g0, %g1 2009b34: 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) { 2009b38: 80 a0 40 1c cmp %g1, %i4 2009b3c: 12 bf ff e2 bne 2009ac4 <_RBTree_Validate_insert_unprotected+0x54> 2009b40: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 2009b44: 10 bf ff e6 b 2009adc <_RBTree_Validate_insert_unprotected+0x6c> 2009b48: c2 06 00 00 ld [ %i0 ], %g1 2009b4c: 81 c7 e0 08 ret 2009b50: 81 e8 00 00 restore =============================================================================== 0200ba94 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200ba94: 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 ]; 200ba98: fa 06 21 58 ld [ %i0 + 0x158 ], %i5 if ( !api ) 200ba9c: 80 a7 60 00 cmp %i5, 0 200baa0: 02 80 00 1c be 200bb10 <_RTEMS_tasks_Post_switch_extension+0x7c><== NEVER TAKEN 200baa4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200baa8: 7f ff d9 b5 call 200217c 200baac: 01 00 00 00 nop signal_set = asr->signals_posted; 200bab0: f6 07 60 14 ld [ %i5 + 0x14 ], %i3 asr->signals_posted = 0; 200bab4: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 200bab8: 7f ff d9 b5 call 200218c 200babc: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200bac0: 80 a6 e0 00 cmp %i3, 0 200bac4: 02 80 00 13 be 200bb10 <_RTEMS_tasks_Post_switch_extension+0x7c> 200bac8: 94 07 bf fc add %fp, -4, %o2 return; asr->nest_level += 1; 200bacc: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bad0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bad4: 82 00 60 01 inc %g1 200bad8: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200badc: 39 00 00 3f sethi %hi(0xfc00), %i4 200bae0: 40 00 07 3b call 200d7cc 200bae4: 92 17 23 ff or %i4, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200bae8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200baec: 9f c0 40 00 call %g1 200baf0: 90 10 00 1b mov %i3, %o0 asr->nest_level -= 1; 200baf4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200baf8: 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; 200bafc: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb00: 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; 200bb04: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb08: 40 00 07 31 call 200d7cc 200bb0c: 94 07 bf fc add %fp, -4, %o2 200bb10: 81 c7 e0 08 ret 200bb14: 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 24 or %o0, 0x224, %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 78 call 200a12c <_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 4c or %o0, 0x4c, %o0 2007784: 40 00 0f 11 call 200b3c8 <_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 90 ld [ %g1 + 0x390 ], %g2 ! 201d390 <_Thread_Dispatch_disable_level> 200779c: 84 00 bf ff add %g2, -1, %g2 20077a0: c4 20 63 90 st %g2, [ %g1 + 0x390 ] return _Thread_Dispatch_disable_level; 20077a4: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 20077a8: 81 c7 e0 08 ret 20077ac: 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 78 ld [ %g1 + 0x378 ], %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 72 call 2018b44 <.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 88 or %g3, 0x88, %g3 ! 201bc88 <_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 =============================================================================== 020087b8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 20087b8: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 20087bc: 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 ); 20087c0: 40 00 03 59 call 2009524 <_Thread_Set_transient> 20087c4: 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 ) 20087c8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20087cc: 80 a0 40 19 cmp %g1, %i1 20087d0: 02 80 00 05 be 20087e4 <_Thread_Change_priority+0x2c> 20087d4: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 20087d8: 90 10 00 18 mov %i0, %o0 20087dc: 40 00 03 39 call 20094c0 <_Thread_Set_priority> 20087e0: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 20087e4: 7f ff e6 66 call 200217c 20087e8: 01 00 00 00 nop 20087ec: 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; 20087f0: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 20087f4: 80 a6 60 04 cmp %i1, 4 20087f8: 02 80 00 10 be 2008838 <_Thread_Change_priority+0x80> 20087fc: 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 ) ) 2008800: 80 a7 20 00 cmp %i4, 0 2008804: 12 80 00 03 bne 2008810 <_Thread_Change_priority+0x58> <== NEVER TAKEN 2008808: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 200880c: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2008810: 7f ff e6 5f call 200218c 2008814: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2008818: 03 00 00 ef sethi %hi(0x3bc00), %g1 200881c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008820: 80 8e 40 01 btst %i1, %g1 2008824: 02 80 00 29 be 20088c8 <_Thread_Change_priority+0x110> 2008828: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 200882c: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2008830: 40 00 02 f6 call 2009408 <_Thread_queue_Requeue> 2008834: 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 ) ) { 2008838: 80 a7 20 00 cmp %i4, 0 200883c: 12 80 00 0b bne 2008868 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2008840: 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 ); 2008844: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2008848: 80 a6 a0 00 cmp %i2, 0 200884c: 02 80 00 04 be 200885c <_Thread_Change_priority+0xa4> 2008850: 82 10 60 e4 or %g1, 0xe4, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2008854: 10 80 00 03 b 2008860 <_Thread_Change_priority+0xa8> 2008858: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 200885c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008860: 9f c0 40 00 call %g1 2008864: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2008868: 7f ff e6 49 call 200218c 200886c: 90 10 00 1b mov %i3, %o0 2008870: 7f ff e6 43 call 200217c 2008874: 01 00 00 00 nop 2008878: 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(); 200887c: 03 00 80 6a sethi %hi(0x201a800), %g1 2008880: c2 00 60 ec ld [ %g1 + 0xec ], %g1 ! 201a8ec <_Scheduler+0x8> 2008884: 9f c0 40 00 call %g1 2008888: 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 ); 200888c: 03 00 80 6d sethi %hi(0x201b400), %g1 2008890: 82 10 63 1c or %g1, 0x31c, %g1 ! 201b71c <_Per_CPU_Information> 2008894: 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() && 2008898: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200889c: 80 a0 80 03 cmp %g2, %g3 20088a0: 02 80 00 08 be 20088c0 <_Thread_Change_priority+0x108> 20088a4: 01 00 00 00 nop 20088a8: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2 20088ac: 80 a0 a0 00 cmp %g2, 0 20088b0: 02 80 00 04 be 20088c0 <_Thread_Change_priority+0x108> 20088b4: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 20088b8: 84 10 20 01 mov 1, %g2 ! 1 20088bc: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 20088c0: 7f ff e6 33 call 200218c 20088c4: 81 e8 00 00 restore 20088c8: 81 c7 e0 08 ret 20088cc: 81 e8 00 00 restore =============================================================================== 02008abc <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008abc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008ac0: 90 10 00 18 mov %i0, %o0 2008ac4: 40 00 00 71 call 2008c88 <_Thread_Get> 2008ac8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008acc: c2 07 bf fc ld [ %fp + -4 ], %g1 2008ad0: 80 a0 60 00 cmp %g1, 0 2008ad4: 12 80 00 09 bne 2008af8 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2008ad8: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008adc: 7f ff ff 7d call 20088d0 <_Thread_Clear_state> 2008ae0: 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--; 2008ae4: 03 00 80 6d sethi %hi(0x201b400), %g1 2008ae8: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201b4f0 <_Thread_Dispatch_disable_level> 2008aec: 84 00 bf ff add %g2, -1, %g2 2008af0: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] return _Thread_Dispatch_disable_level; 2008af4: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 2008af8: 81 c7 e0 08 ret 2008afc: 81 e8 00 00 restore =============================================================================== 02008b00 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008b00: 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++; 2008b04: 03 00 80 6d sethi %hi(0x201b400), %g1 2008b08: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201b4f0 <_Thread_Dispatch_disable_level> 2008b0c: 84 00 a0 01 inc %g2 2008b10: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] return _Thread_Dispatch_disable_level; 2008b14: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2008b18: 33 00 80 6d sethi %hi(0x201b400), %i1 2008b1c: b4 16 63 1c or %i1, 0x31c, %i2 ! 201b71c <_Per_CPU_Information> _ISR_Disable( level ); 2008b20: 7f ff e5 97 call 200217c 2008b24: 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; 2008b28: 21 00 80 6d sethi %hi(0x201b400), %l0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008b2c: b4 06 a0 1c add %i2, 0x1c, %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b30: 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 ) { 2008b34: 10 80 00 38 b 2008c14 <_Thread_Dispatch+0x114> 2008b38: 37 00 80 6d sethi %hi(0x201b400), %i3 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2008b3c: 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 ) 2008b40: 80 a7 00 1d cmp %i4, %i5 2008b44: 02 80 00 39 be 2008c28 <_Thread_Dispatch+0x128> 2008b48: 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 ) 2008b4c: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 2008b50: 80 a0 60 01 cmp %g1, 1 2008b54: 12 80 00 03 bne 2008b60 <_Thread_Dispatch+0x60> 2008b58: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008b5c: c2 27 20 78 st %g1, [ %i4 + 0x78 ] _ISR_Enable( level ); 2008b60: 7f ff e5 8b call 200218c 2008b64: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008b68: 40 00 0c c4 call 200be78 <_TOD_Get_uptime> 2008b6c: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( 2008b70: 90 10 00 1a mov %i2, %o0 2008b74: 92 07 bf f0 add %fp, -16, %o1 2008b78: 40 00 02 de call 20096f0 <_Timespec_Subtract> 2008b7c: 94 07 bf f8 add %fp, -8, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008b80: 90 07 60 84 add %i5, 0x84, %o0 2008b84: 40 00 02 c2 call 200968c <_Timespec_Add_to> 2008b88: 92 07 bf f8 add %fp, -8, %o1 _Thread_Time_of_last_context_switch = uptime; 2008b8c: c4 07 bf f0 ld [ %fp + -16 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b90: c2 06 21 78 ld [ %i0 + 0x178 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008b94: c4 26 80 00 st %g2, [ %i2 ] 2008b98: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b9c: 80 a0 60 00 cmp %g1, 0 2008ba0: 02 80 00 06 be 2008bb8 <_Thread_Dispatch+0xb8> <== NEVER TAKEN 2008ba4: c4 26 a0 04 st %g2, [ %i2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2008ba8: c4 00 40 00 ld [ %g1 ], %g2 2008bac: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2008bb0: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 2008bb4: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008bb8: 90 10 00 1d mov %i5, %o0 2008bbc: 40 00 03 7b call 20099a8 <_User_extensions_Thread_switch> 2008bc0: 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 ); 2008bc4: 90 07 60 c8 add %i5, 0xc8, %o0 2008bc8: 40 00 04 a1 call 2009e4c <_CPU_Context_switch> 2008bcc: 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) && 2008bd0: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2008bd4: 80 a0 60 00 cmp %g1, 0 2008bd8: 02 80 00 0c be 2008c08 <_Thread_Dispatch+0x108> 2008bdc: d0 06 e1 74 ld [ %i3 + 0x174 ], %o0 2008be0: 80 a7 40 08 cmp %i5, %o0 2008be4: 02 80 00 09 be 2008c08 <_Thread_Dispatch+0x108> 2008be8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008bec: 02 80 00 04 be 2008bfc <_Thread_Dispatch+0xfc> 2008bf0: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008bf4: 40 00 04 5c call 2009d64 <_CPU_Context_save_fp> 2008bf8: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2008bfc: 40 00 04 77 call 2009dd8 <_CPU_Context_restore_fp> 2008c00: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2008c04: fa 26 e1 74 st %i5, [ %i3 + 0x174 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2008c08: 82 16 63 1c or %i1, 0x31c, %g1 _ISR_Disable( level ); 2008c0c: 7f ff e5 5c call 200217c 2008c10: 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 ) { 2008c14: 82 16 63 1c or %i1, 0x31c, %g1 2008c18: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 2008c1c: 80 a0 a0 00 cmp %g2, 0 2008c20: 32 bf ff c7 bne,a 2008b3c <_Thread_Dispatch+0x3c> 2008c24: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 2008c28: 7f ff e5 59 call 200218c 2008c2c: 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--; 2008c30: 03 00 80 6d sethi %hi(0x201b400), %g1 2008c34: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201b4f0 <_Thread_Dispatch_disable_level> 2008c38: 84 00 bf ff add %g2, -1, %g2 2008c3c: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] return _Thread_Dispatch_disable_level; 2008c40: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 2008c44: 7f ff f8 4d call 2006d78 <_API_extensions_Run_postswitch> 2008c48: 01 00 00 00 nop } 2008c4c: 81 c7 e0 08 ret 2008c50: 81 e8 00 00 restore =============================================================================== 0200dafc <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200dafc: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200db00: 03 00 80 6d sethi %hi(0x201b400), %g1 200db04: fa 00 63 28 ld [ %g1 + 0x328 ], %i5 ! 201b728 <_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(); 200db08: 3f 00 80 36 sethi %hi(0x200d800), %i7 200db0c: be 17 e2 fc or %i7, 0x2fc, %i7 ! 200dafc <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200db10: d0 07 60 ac ld [ %i5 + 0xac ], %o0 _ISR_Set_level(level); 200db14: 7f ff d1 9e call 200218c 200db18: 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; 200db1c: 03 00 80 6c sethi %hi(0x201b000), %g1 doneConstructors = true; 200db20: 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; 200db24: f8 08 61 b0 ldub [ %g1 + 0x1b0 ], %i4 doneConstructors = true; 200db28: c4 28 61 b0 stb %g2, [ %g1 + 0x1b0 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200db2c: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200db30: 80 a0 60 00 cmp %g1, 0 200db34: 02 80 00 0c be 200db64 <_Thread_Handler+0x68> 200db38: 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 ); 200db3c: d0 00 61 74 ld [ %g1 + 0x174 ], %o0 ! 201b574 <_Thread_Allocated_fp> 200db40: 80 a7 40 08 cmp %i5, %o0 200db44: 02 80 00 08 be 200db64 <_Thread_Handler+0x68> 200db48: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200db4c: 22 80 00 06 be,a 200db64 <_Thread_Handler+0x68> 200db50: fa 20 61 74 st %i5, [ %g1 + 0x174 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200db54: 7f ff f0 84 call 2009d64 <_CPU_Context_save_fp> 200db58: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200db5c: 03 00 80 6d sethi %hi(0x201b400), %g1 200db60: fa 20 61 74 st %i5, [ %g1 + 0x174 ] ! 201b574 <_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 ); 200db64: 7f ff ef 22 call 20097ec <_User_extensions_Thread_begin> 200db68: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200db6c: 7f ff ec 3a call 2008c54 <_Thread_Enable_dispatch> 200db70: 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) */ { 200db74: 80 8f 20 ff btst 0xff, %i4 200db78: 32 80 00 05 bne,a 200db8c <_Thread_Handler+0x90> 200db7c: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 INIT_NAME (); 200db80: 40 00 33 0e call 201a7b8 <_init> 200db84: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200db88: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 200db8c: 80 a0 60 00 cmp %g1, 0 200db90: 12 80 00 06 bne 200dba8 <_Thread_Handler+0xac> <== NEVER TAKEN 200db94: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200db98: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200db9c: 9f c0 40 00 call %g1 200dba0: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200dba4: 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 ); 200dba8: 7f ff ef 22 call 2009830 <_User_extensions_Thread_exitted> 200dbac: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200dbb0: 90 10 20 00 clr %o0 200dbb4: 92 10 20 01 mov 1, %o1 200dbb8: 7f ff e7 19 call 200781c <_Internal_error_Occurred> 200dbbc: 94 10 20 05 mov 5, %o2 =============================================================================== 02008d38 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008d38: 9d e3 bf a0 save %sp, -96, %sp 2008d3c: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 2008d40: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 2008d44: 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; 2008d48: c0 26 61 58 clr [ %i1 + 0x158 ] 2008d4c: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008d50: 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 ); 2008d54: 90 10 00 19 mov %i1, %o0 2008d58: 40 00 02 02 call 2009560 <_Thread_Stack_Allocate> 2008d5c: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008d60: 80 a2 00 1b cmp %o0, %i3 2008d64: 0a 80 00 61 bcs 2008ee8 <_Thread_Initialize+0x1b0> 2008d68: 80 a2 20 00 cmp %o0, 0 2008d6c: 02 80 00 5f be 2008ee8 <_Thread_Initialize+0x1b0> <== NEVER TAKEN 2008d70: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008d74: c2 06 60 c0 ld [ %i1 + 0xc0 ], %g1 the_stack->size = size; 2008d78: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008d7c: 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 ) { 2008d80: 02 80 00 07 be 2008d9c <_Thread_Initialize+0x64> 2008d84: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008d88: 40 00 03 db call 2009cf4 <_Workspace_Allocate> 2008d8c: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008d90: b6 92 20 00 orcc %o0, 0, %i3 2008d94: 02 80 00 46 be 2008eac <_Thread_Initialize+0x174> 2008d98: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008d9c: 03 00 80 6d sethi %hi(0x201b400), %g1 2008da0: d0 00 61 84 ld [ %g1 + 0x184 ], %o0 ! 201b584 <_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; 2008da4: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2008da8: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008dac: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008db0: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008db4: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2008db8: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008dbc: 80 a2 20 00 cmp %o0, 0 2008dc0: 02 80 00 08 be 2008de0 <_Thread_Initialize+0xa8> 2008dc4: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 2008dc8: 90 02 20 01 inc %o0 2008dcc: 40 00 03 ca call 2009cf4 <_Workspace_Allocate> 2008dd0: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2008dd4: b8 92 20 00 orcc %o0, 0, %i4 2008dd8: 22 80 00 36 be,a 2008eb0 <_Thread_Initialize+0x178> 2008ddc: 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 ) { 2008de0: 80 a7 20 00 cmp %i4, 0 2008de4: 02 80 00 0c be 2008e14 <_Thread_Initialize+0xdc> 2008de8: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008dec: 03 00 80 6d sethi %hi(0x201b400), %g1 2008df0: c4 00 61 84 ld [ %g1 + 0x184 ], %g2 ! 201b584 <_Thread_Maximum_extensions> 2008df4: 10 80 00 05 b 2008e08 <_Thread_Initialize+0xd0> 2008df8: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2008dfc: 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++ ) 2008e00: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2008e04: 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++ ) 2008e08: 80 a0 40 02 cmp %g1, %g2 2008e0c: 28 bf ff fc bleu,a 2008dfc <_Thread_Initialize+0xc4> 2008e10: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008e14: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008e18: f4 2e 60 a0 stb %i2, [ %i1 + 0xa0 ] the_thread->Start.budget_algorithm = budget_algorithm; 2008e1c: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] the_thread->Start.budget_callout = budget_callout; 2008e20: 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; 2008e24: 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; 2008e28: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008e2c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2008e30: c0 26 60 1c clr [ %i1 + 0x1c ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008e34: c2 26 60 ac st %g1, [ %i1 + 0xac ] the_thread->current_state = STATES_DORMANT; 2008e38: 82 10 20 01 mov 1, %g1 2008e3c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2008e40: 03 00 80 6a sethi %hi(0x201a800), %g1 2008e44: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 201a8fc <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; 2008e48: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2008e4c: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ] 2008e50: 9f c0 40 00 call %g1 2008e54: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2008e58: b4 92 20 00 orcc %o0, 0, %i2 2008e5c: 02 80 00 15 be 2008eb0 <_Thread_Initialize+0x178> 2008e60: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2008e64: 40 00 01 97 call 20094c0 <_Thread_Set_priority> 2008e68: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008e6c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2008e70: 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 ); 2008e74: c0 26 60 84 clr [ %i1 + 0x84 ] 2008e78: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008e7c: 83 28 60 02 sll %g1, 2, %g1 2008e80: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008e84: 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 ); 2008e88: 90 10 00 19 mov %i1, %o0 2008e8c: 40 00 02 8a call 20098b4 <_User_extensions_Thread_create> 2008e90: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008e94: 80 8a 20 ff btst 0xff, %o0 2008e98: 02 80 00 06 be 2008eb0 <_Thread_Initialize+0x178> 2008e9c: 01 00 00 00 nop 2008ea0: b0 0e 20 01 and %i0, 1, %i0 2008ea4: 81 c7 e0 08 ret 2008ea8: 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; 2008eac: 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 ); 2008eb0: 40 00 03 99 call 2009d14 <_Workspace_Free> 2008eb4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 2008eb8: 40 00 03 97 call 2009d14 <_Workspace_Free> 2008ebc: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 2008ec0: 40 00 03 95 call 2009d14 <_Workspace_Free> 2008ec4: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 2008ec8: 40 00 03 93 call 2009d14 <_Workspace_Free> 2008ecc: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 2008ed0: 40 00 03 91 call 2009d14 <_Workspace_Free> 2008ed4: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 2008ed8: 40 00 03 8f call 2009d14 <_Workspace_Free> 2008edc: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 2008ee0: 40 00 01 b7 call 20095bc <_Thread_Stack_Free> 2008ee4: 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 */ 2008ee8: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 2008eec: b0 0e 20 01 and %i0, 1, %i0 2008ef0: 81 c7 e0 08 ret 2008ef4: 81 e8 00 00 restore =============================================================================== 02009408 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2009408: 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 ) 200940c: 80 a6 20 00 cmp %i0, 0 2009410: 02 80 00 19 be 2009474 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009414: 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 ) { 2009418: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200941c: 80 a7 20 01 cmp %i4, 1 2009420: 12 80 00 15 bne 2009474 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009424: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2009428: 7f ff e3 55 call 200217c 200942c: 01 00 00 00 nop 2009430: ba 10 00 08 mov %o0, %i5 2009434: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2009438: 03 00 00 ef sethi %hi(0x3bc00), %g1 200943c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009440: 80 88 80 01 btst %g2, %g1 2009444: 02 80 00 0a be 200946c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2009448: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200944c: 92 10 00 19 mov %i1, %o1 2009450: 94 10 20 01 mov 1, %o2 2009454: 40 00 0b f8 call 200c434 <_Thread_queue_Extract_priority_helper> 2009458: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200945c: 90 10 00 18 mov %i0, %o0 2009460: 92 10 00 19 mov %i1, %o1 2009464: 7f ff ff 50 call 20091a4 <_Thread_queue_Enqueue_priority> 2009468: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200946c: 7f ff e3 48 call 200218c 2009470: 90 10 00 1d mov %i5, %o0 2009474: 81 c7 e0 08 ret 2009478: 81 e8 00 00 restore =============================================================================== 0200947c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200947c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009480: 90 10 00 18 mov %i0, %o0 2009484: 7f ff fe 01 call 2008c88 <_Thread_Get> 2009488: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200948c: c2 07 bf fc ld [ %fp + -4 ], %g1 2009490: 80 a0 60 00 cmp %g1, 0 2009494: 12 80 00 09 bne 20094b8 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 2009498: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200949c: 40 00 0c 1d call 200c510 <_Thread_queue_Process_timeout> 20094a0: 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--; 20094a4: 03 00 80 6d sethi %hi(0x201b400), %g1 20094a8: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201b4f0 <_Thread_Dispatch_disable_level> 20094ac: 84 00 bf ff add %g2, -1, %g2 20094b0: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] return _Thread_Dispatch_disable_level; 20094b4: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 20094b8: 81 c7 e0 08 ret 20094bc: 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 4c ld [ %l3 + 0x14c ], %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 84 call 201b850 <_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 cc ld [ %l5 + 0xcc ], %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 7c call 201b850 <_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 4f call 201b7b4 <_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 98 call 201b918 <_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 9f call 201b1e4 <_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 53 call 201a8cc <_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 bb call 201ba80 <_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 b9 call 201ba80 <_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 4c ld [ %g1 + 0x14c ], %g2 ! 203a14c <_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 3d call 201b918 <_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 cc ld [ %g1 + 0xcc ], %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 1a call 201b918 <_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 0c ff call 201a8cc <_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 =============================================================================== 02009734 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009734: 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; 2009738: 03 00 80 69 sethi %hi(0x201a400), %g1 200973c: 82 10 63 fc or %g1, 0x3fc, %g1 ! 201a7fc ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009740: 05 00 80 6d sethi %hi(0x201b400), %g2 initial_extensions = Configuration.User_extension_table; 2009744: 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; 2009748: f6 00 60 38 ld [ %g1 + 0x38 ], %i3 200974c: 82 10 a2 d8 or %g2, 0x2d8, %g1 2009750: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009754: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 2009758: 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; 200975c: c6 20 a2 d8 st %g3, [ %g2 + 0x2d8 ] 2009760: 05 00 80 6d sethi %hi(0x201b400), %g2 2009764: 82 10 a0 f4 or %g2, 0xf4, %g1 ! 201b4f4 <_User_extensions_Switches_list> 2009768: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200976c: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009770: c6 20 a0 f4 st %g3, [ %g2 + 0xf4 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2009774: 80 a6 a0 00 cmp %i2, 0 2009778: 02 80 00 1b be 20097e4 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200977c: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 2009780: 83 2e e0 02 sll %i3, 2, %g1 2009784: bb 2e e0 04 sll %i3, 4, %i5 2009788: ba 27 40 01 sub %i5, %g1, %i5 200978c: ba 07 40 1b add %i5, %i3, %i5 2009790: 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 *) 2009794: 40 00 01 66 call 2009d2c <_Workspace_Allocate_or_fatal_error> 2009798: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200979c: 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 *) 20097a0: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20097a4: 92 10 20 00 clr %o1 20097a8: 40 00 13 de call 200e720 20097ac: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20097b0: 10 80 00 0b b 20097dc <_User_extensions_Handler_initialization+0xa8> 20097b4: 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; 20097b8: 90 07 20 14 add %i4, 0x14, %o0 20097bc: 92 06 80 09 add %i2, %o1, %o1 20097c0: 40 00 13 9c call 200e630 20097c4: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 20097c8: 90 10 00 1c mov %i4, %o0 20097cc: 40 00 0b 75 call 200c5a0 <_User_extensions_Add_set> 20097d0: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 20097d4: 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++ ) { 20097d8: 80 a7 40 1b cmp %i5, %i3 20097dc: 12 bf ff f7 bne 20097b8 <_User_extensions_Handler_initialization+0x84> 20097e0: 93 2f 60 05 sll %i5, 5, %o1 20097e4: 81 c7 e0 08 ret 20097e8: 81 e8 00 00 restore =============================================================================== 0200b4a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b4a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b4a8: 7f ff de d4 call 2002ff8 200b4ac: 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; 200b4b0: 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 ); 200b4b4: 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 ) ) { 200b4b8: 80 a0 40 1c cmp %g1, %i4 200b4bc: 02 80 00 1f be 200b538 <_Watchdog_Adjust+0x94> 200b4c0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b4c4: 02 80 00 1a be 200b52c <_Watchdog_Adjust+0x88> 200b4c8: b6 10 20 01 mov 1, %i3 200b4cc: 80 a6 60 01 cmp %i1, 1 200b4d0: 12 80 00 1a bne 200b538 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b4d4: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b4d8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b4dc: 10 80 00 07 b 200b4f8 <_Watchdog_Adjust+0x54> 200b4e0: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b4e4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b4e8: 80 a6 80 02 cmp %i2, %g2 200b4ec: 3a 80 00 05 bcc,a 200b500 <_Watchdog_Adjust+0x5c> 200b4f0: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b4f4: b4 20 80 1a sub %g2, %i2, %i2 break; 200b4f8: 10 80 00 10 b 200b538 <_Watchdog_Adjust+0x94> 200b4fc: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200b500: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b504: 7f ff de c1 call 2003008 200b508: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b50c: 40 00 00 90 call 200b74c <_Watchdog_Tickle> 200b510: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200b514: 7f ff de b9 call 2002ff8 200b518: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b51c: c2 07 40 00 ld [ %i5 ], %g1 200b520: 80 a0 40 1c cmp %g1, %i4 200b524: 02 80 00 05 be 200b538 <_Watchdog_Adjust+0x94> 200b528: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b52c: 80 a6 a0 00 cmp %i2, 0 200b530: 32 bf ff ed bne,a 200b4e4 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b534: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200b538: 7f ff de b4 call 2003008 200b53c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009b4c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009b4c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009b50: 7f ff e1 8b call 200217c 2009b54: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 2009b58: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009b5c: 80 a6 20 01 cmp %i0, 1 2009b60: 22 80 00 1d be,a 2009bd4 <_Watchdog_Remove+0x88> 2009b64: c0 27 60 08 clr [ %i5 + 8 ] 2009b68: 0a 80 00 1c bcs 2009bd8 <_Watchdog_Remove+0x8c> 2009b6c: 03 00 80 6d sethi %hi(0x201b400), %g1 2009b70: 80 a6 20 03 cmp %i0, 3 2009b74: 18 80 00 19 bgu 2009bd8 <_Watchdog_Remove+0x8c> <== NEVER TAKEN 2009b78: 01 00 00 00 nop 2009b7c: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009b80: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009b84: c4 00 40 00 ld [ %g1 ], %g2 2009b88: 80 a0 a0 00 cmp %g2, 0 2009b8c: 02 80 00 07 be 2009ba8 <_Watchdog_Remove+0x5c> 2009b90: 05 00 80 6d sethi %hi(0x201b400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009b94: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009b98: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2009b9c: 84 00 c0 02 add %g3, %g2, %g2 2009ba0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2009ba4: 05 00 80 6d sethi %hi(0x201b400), %g2 2009ba8: c4 00 a1 f8 ld [ %g2 + 0x1f8 ], %g2 ! 201b5f8 <_Watchdog_Sync_count> 2009bac: 80 a0 a0 00 cmp %g2, 0 2009bb0: 22 80 00 07 be,a 2009bcc <_Watchdog_Remove+0x80> 2009bb4: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009bb8: 05 00 80 6d sethi %hi(0x201b400), %g2 2009bbc: c6 00 a3 24 ld [ %g2 + 0x324 ], %g3 ! 201b724 <_Per_CPU_Information+0x8> 2009bc0: 05 00 80 6d sethi %hi(0x201b400), %g2 2009bc4: c6 20 a1 98 st %g3, [ %g2 + 0x198 ] ! 201b598 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009bc8: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 2009bcc: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 2009bd0: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009bd4: 03 00 80 6d sethi %hi(0x201b400), %g1 2009bd8: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 201b5fc <_Watchdog_Ticks_since_boot> 2009bdc: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 2009be0: 7f ff e1 6b call 200218c 2009be4: 01 00 00 00 nop return( previous_state ); } 2009be8: 81 c7 e0 08 ret 2009bec: 81 e8 00 00 restore =============================================================================== 0200ac9c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200ac9c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200aca0: 7f ff df a6 call 2002b38 200aca4: ba 10 00 18 mov %i0, %i5 200aca8: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200acac: 11 00 80 6d sethi %hi(0x201b400), %o0 200acb0: 94 10 00 19 mov %i1, %o2 200acb4: 90 12 21 40 or %o0, 0x140, %o0 200acb8: 7f ff e6 56 call 2004610 200acbc: 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; 200acc0: 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 ); 200acc4: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200acc8: 80 a7 00 19 cmp %i4, %i1 200accc: 12 80 00 04 bne 200acdc <_Watchdog_Report_chain+0x40> 200acd0: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200acd4: 10 80 00 0d b 200ad08 <_Watchdog_Report_chain+0x6c> 200acd8: 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 ); 200acdc: 40 00 00 0f call 200ad18 <_Watchdog_Report> 200ace0: 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 ) 200ace4: 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 ) ; 200ace8: 80 a7 00 19 cmp %i4, %i1 200acec: 12 bf ff fc bne 200acdc <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200acf0: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200acf4: 11 00 80 6d sethi %hi(0x201b400), %o0 200acf8: 92 10 00 1d mov %i5, %o1 200acfc: 7f ff e6 45 call 2004610 200ad00: 90 12 21 58 or %o0, 0x158, %o0 200ad04: 30 80 00 03 b,a 200ad10 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200ad08: 7f ff e6 42 call 2004610 200ad0c: 90 12 21 68 or %o0, 0x168, %o0 } _ISR_Enable( level ); 200ad10: 7f ff df 8e call 2002b48 200ad14: 81 e8 00 00 restore =============================================================================== 0201828c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 201828c: 81 c3 e0 08 retl <== NOT EXECUTED 2018290: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02012c74 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012c74: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012c78: 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; 2012c7c: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2012c80: 10 80 00 18 b 2012ce0 <_fat_block_read+0x6c> 2012c84: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012c88: 92 10 00 19 mov %i1, %o1 2012c8c: 94 10 20 01 mov 1, %o2 2012c90: 7f ff ff 20 call 2012910 2012c94: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012c98: 80 a2 20 00 cmp %o0, 0 2012c9c: 12 80 00 16 bne 2012cf4 <_fat_block_read+0x80> <== NEVER TAKEN 2012ca0: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012ca4: e0 17 40 00 lduh [ %i5 ], %l0 2012ca8: a0 24 00 1a sub %l0, %i2, %l0 2012cac: 80 a4 00 1b cmp %l0, %i3 2012cb0: 38 80 00 02 bgu,a 2012cb8 <_fat_block_read+0x44> 2012cb4: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2012cb8: c2 07 bf fc ld [ %fp + -4 ], %g1 2012cbc: 90 07 00 18 add %i4, %i0, %o0 2012cc0: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012cc4: 94 10 00 10 mov %l0, %o2 2012cc8: 92 02 40 1a add %o1, %i2, %o1 2012ccc: 40 00 24 8f call 201bf08 2012cd0: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012cd4: b0 04 00 18 add %l0, %i0, %i0 blk++; 2012cd8: b2 06 60 01 inc %i1 ofs = 0; 2012cdc: 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) 2012ce0: 80 a6 e0 00 cmp %i3, 0 2012ce4: 12 bf ff e9 bne 2012c88 <_fat_block_read+0x14> 2012ce8: 90 10 00 1d mov %i5, %o0 2012cec: 81 c7 e0 08 ret 2012cf0: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2012cf4: 81 c7 e0 08 ret <== NOT EXECUTED 2012cf8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02012d94 <_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); 2012d94: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 2012d98: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2012d9c: 7f ff ff 5c call 2012b0c <== NOT EXECUTED 2012da0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02012cfc <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012cfc: 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; 2012d00: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012d04: 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; 2012d08: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2012d0c: 10 80 00 1b b 2012d78 <_fat_block_write+0x7c> 2012d10: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012d14: a0 20 40 1a sub %g1, %i2, %l0 2012d18: 80 a4 00 1b cmp %l0, %i3 2012d1c: 38 80 00 02 bgu,a 2012d24 <_fat_block_write+0x28> 2012d20: 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); 2012d24: 90 10 00 1d mov %i5, %o0 2012d28: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2012d2c: 80 a4 00 01 cmp %l0, %g1 2012d30: 02 80 00 03 be 2012d3c <_fat_block_write+0x40> 2012d34: 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); 2012d38: 94 10 20 01 mov 1, %o2 2012d3c: 7f ff fe f5 call 2012910 2012d40: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012d44: 80 a2 20 00 cmp %o0, 0 2012d48: 12 80 00 11 bne 2012d8c <_fat_block_write+0x90> <== NEVER TAKEN 2012d4c: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2012d50: 92 07 00 18 add %i4, %i0, %o1 2012d54: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012d58: 94 10 00 10 mov %l0, %o2 2012d5c: 90 02 00 1a add %o0, %i2, %o0 2012d60: 40 00 24 6a call 201bf08 2012d64: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2012d68: b0 04 00 18 add %l0, %i0, %i0 2012d6c: e2 2f 60 84 stb %l1, [ %i5 + 0x84 ] blk++; 2012d70: b2 06 60 01 inc %i1 ofs = 0; 2012d74: 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) 2012d78: 80 a6 e0 00 cmp %i3, 0 2012d7c: 32 bf ff e6 bne,a 2012d14 <_fat_block_write+0x18> 2012d80: c2 17 40 00 lduh [ %i5 ], %g1 2012d84: 81 c7 e0 08 ret 2012d88: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2012d8c: 81 c7 e0 08 ret <== NOT EXECUTED 2012d90: 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 =============================================================================== 02011c94 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2011c94: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2011c98: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2011c9c: 87 28 a0 02 sll %g2, 2, %g3 2011ca0: 83 28 a0 04 sll %g2, 4, %g1 2011ca4: 82 20 40 03 sub %g1, %g3, %g1 2011ca8: 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; 2011cac: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011cb0: 10 80 00 11 b 2011cf4 <_hash_search+0x60> 2011cb4: 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); 2011cb8: 7f ff ff e5 call 2011c4c 2011cbc: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2011cc0: 80 a6 80 08 cmp %i2, %o0 2011cc4: 32 80 00 0c bne,a 2011cf4 <_hash_search+0x60> 2011cc8: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2011ccc: 80 a6 e0 00 cmp %i3, 0 2011cd0: 22 80 00 07 be,a 2011cec <_hash_search+0x58> <== ALWAYS TAKEN 2011cd4: fa 27 00 00 st %i5, [ %i4 ] 2011cd8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2011cdc: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2011ce0: 32 80 00 05 bne,a 2011cf4 <_hash_search+0x60> <== NOT EXECUTED 2011ce4: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2011ce8: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2011cec: 81 c7 e0 08 ret 2011cf0: 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) ; ) 2011cf4: 80 a7 40 19 cmp %i5, %i1 2011cf8: 12 bf ff f0 bne 2011cb8 <_hash_search+0x24> 2011cfc: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2011d00: 81 c7 e0 08 ret 2011d04: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0201e620 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 201e620: 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 ); 201e624: 7f ff 9a 44 call 2004f34 201e628: 90 10 00 19 mov %i1, %o0 201e62c: b8 10 00 08 mov %o0, %i4 if ( old_parent_pathlen == 0 ) 201e630: 80 a7 20 00 cmp %i4, 0 201e634: 12 80 00 08 bne 201e654 <_rename_r+0x34> 201e638: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 201e63c: 92 07 bf f8 add %fp, -8, %o1 201e640: 94 07 bf d0 add %fp, -48, %o2 201e644: 7f ff a0 2c call 20066f4 201e648: ba 10 20 00 clr %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201e64c: 10 80 00 0c b 201e67c <_rename_r+0x5c> 201e650: 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, 201e654: 92 10 00 1c mov %i4, %o1 201e658: 94 10 20 02 mov 2, %o2 201e65c: 96 07 bf d0 add %fp, -48, %o3 201e660: 98 10 20 00 clr %o4 201e664: 7f ff 9a 25 call 2004ef8 201e668: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 201e66c: 80 a2 20 00 cmp %o0, 0 201e670: 12 80 00 1e bne 201e6e8 <_rename_r+0xc8> <== NEVER TAKEN 201e674: 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; 201e678: 94 10 20 14 mov 0x14, %o2 201e67c: 92 07 bf d0 add %fp, -48, %o1 201e680: 7f ff ca 4b call 2010fac 201e684: 90 07 bf bc add %fp, -68, %o0 name = old + old_parent_pathlen; 201e688: b2 06 40 1c add %i1, %i4, %i1 201e68c: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 201e690: 7f ff cd 3a call 2011b78 201e694: 90 10 00 19 mov %i1, %o0 201e698: 92 10 00 08 mov %o0, %o1 201e69c: 7f ff 9a 35 call 2004f70 201e6a0: 90 10 00 19 mov %i1, %o0 201e6a4: b2 06 40 08 add %i1, %o0, %i1 201e6a8: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 201e6ac: 7f ff cd 33 call 2011b78 201e6b0: 90 10 00 19 mov %i1, %o0 201e6b4: 94 10 20 00 clr %o2 201e6b8: 92 10 00 08 mov %o0, %o1 201e6bc: 96 07 bf bc add %fp, -68, %o3 201e6c0: 90 10 00 19 mov %i1, %o0 201e6c4: 7f ff 99 f1 call 2004e88 201e6c8: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 201e6cc: 80 a2 20 00 cmp %o0, 0 201e6d0: 02 80 00 08 be 201e6f0 <_rename_r+0xd0> 201e6d4: 80 8f 60 ff btst 0xff, %i5 if ( free_old_parentloc ) 201e6d8: 02 80 00 04 be 201e6e8 <_rename_r+0xc8> 201e6dc: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 201e6e0: 7f ff 9a 78 call 20050c0 201e6e4: 90 07 bf d0 add %fp, -48, %o0 201e6e8: 81 c7 e0 08 ret 201e6ec: 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 ); 201e6f0: 90 10 00 1a mov %i2, %o0 201e6f4: 92 07 bf f8 add %fp, -8, %o1 201e6f8: 7f ff 9f ff call 20066f4 201e6fc: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 201e700: c2 07 bf f0 ld [ %fp + -16 ], %g1 201e704: d0 07 bf f8 ld [ %fp + -8 ], %o0 201e708: c2 00 60 04 ld [ %g1 + 4 ], %g1 201e70c: 90 06 80 08 add %i2, %o0, %o0 201e710: 92 07 bf e4 add %fp, -28, %o1 201e714: 9f c0 40 00 call %g1 201e718: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 201e71c: 80 a2 20 00 cmp %o0, 0 201e720: 02 80 00 0d be 201e754 <_rename_r+0x134> 201e724: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e728: 7f ff 9a 66 call 20050c0 201e72c: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e730: 80 8f 60 ff btst 0xff, %i5 201e734: 02 80 00 04 be 201e744 <_rename_r+0x124> 201e738: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e73c: 7f ff 9a 61 call 20050c0 201e740: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e744: 7f ff 9a 5f call 20050c0 201e748: 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 ); 201e74c: 81 c7 e0 08 ret 201e750: 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 ) { 201e754: c4 07 bf e0 ld [ %fp + -32 ], %g2 201e758: 80 a0 80 01 cmp %g2, %g1 201e75c: 02 80 00 11 be 201e7a0 <_rename_r+0x180> 201e760: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e764: 7f ff 9a 57 call 20050c0 201e768: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e76c: 80 8f 60 ff btst 0xff, %i5 201e770: 02 80 00 04 be 201e780 <_rename_r+0x160> 201e774: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e778: 7f ff 9a 52 call 20050c0 201e77c: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e780: 7f ff 9a 50 call 20050c0 201e784: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201e788: 7f ff c7 ad call 201063c <__errno> 201e78c: 01 00 00 00 nop 201e790: 82 10 20 12 mov 0x12, %g1 ! 12 201e794: c2 22 00 00 st %g1, [ %o0 ] 201e798: 81 c7 e0 08 ret 201e79c: 91 e8 3f ff restore %g0, -1, %o0 } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 201e7a0: d6 07 bf fc ld [ %fp + -4 ], %o3 201e7a4: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 201e7a8: 92 07 bf bc add %fp, -68, %o1 201e7ac: 94 07 bf e4 add %fp, -28, %o2 201e7b0: 9f c0 40 00 call %g1 201e7b4: 90 07 bf d0 add %fp, -48, %o0 201e7b8: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 201e7bc: 7f ff 9a 41 call 20050c0 201e7c0: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e7c4: 80 8f 60 ff btst 0xff, %i5 201e7c8: 02 80 00 04 be 201e7d8 <_rename_r+0x1b8> 201e7cc: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e7d0: 7f ff 9a 3c call 20050c0 201e7d4: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e7d8: 7f ff 9a 3a call 20050c0 201e7dc: 90 07 bf bc add %fp, -68, %o0 return result; } 201e7e0: 81 c7 e0 08 ret 201e7e4: 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 ac ld [ %i4 + 0x3ac ], %i5 ! 2020fac 2004d34: 03 00 80 86 sethi %hi(0x2021800), %g1 2004d38: 82 10 60 ec or %g1, 0xec, %g1 ! 20218ec 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 ac ld [ %i4 + 0x3ac ], %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 37 call 201063c <__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 68 or %o0, 0x268, %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 22 call 201063c <__errno> 2004db8: b0 10 3f ff mov -1, %i0 2004dbc: 40 00 2e 20 call 201063c <__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 ac ld [ %i5 + 0x3ac ], %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 ac ld [ %i5 + 0x3ac ], %o0 2004de8: 92 07 bf ec add %fp, -20, %o1 2004dec: 94 10 20 14 mov 0x14, %o2 2004df0: 40 00 30 6f call 2010fac 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 84 ld [ %g1 + 0x284 ], %l1 ! 2018684 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 88 ld [ %g1 + 0x288 ], %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 5d call 2012244 <== 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 88 st %l0, [ %g1 + 0x288 ] ! 2018688 <== NOT EXECUTED disktab_size = new_size; 20028e0: 03 00 80 61 sethi %hi(0x2018400), %g1 <== NOT EXECUTED 20028e4: f8 20 62 84 st %i4, [ %g1 + 0x284 ] ! 2018684 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20028e8: 03 00 80 61 sethi %hi(0x2018400), %g1 20028ec: e4 00 62 88 ld [ %g1 + 0x288 ], %l2 ! 2018688 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 3b call 2012244 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 02 call 20125bc 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 =============================================================================== 02009f74 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 2009f74: 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 ) ) 2009f78: 80 8e bf f8 btst -8, %i2 2009f7c: 22 80 00 06 be,a 2009f94 <== ALWAYS TAKEN 2009f80: fa 06 c0 00 ld [ %i3 ], %i5 rtems_set_errno_and_return_minus_one( EPERM ); 2009f84: 40 00 07 d5 call 200bed8 <__errno> <== NOT EXECUTED 2009f88: 01 00 00 00 nop <== NOT EXECUTED 2009f8c: 10 80 00 09 b 2009fb0 <== NOT EXECUTED 2009f90: 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) 2009f94: b8 10 20 00 clr %i4 2009f98: 80 a7 60 00 cmp %i5, 0 2009f9c: 12 80 00 24 bne 200a02c 2009fa0: 21 00 80 5c sethi %hi(0x2017000), %l0 rtems_set_errno_and_return_minus_one( EFAULT ); 2009fa4: 40 00 07 cd call 200bed8 <__errno> 2009fa8: 01 00 00 00 nop 2009fac: 82 10 20 0e mov 0xe, %g1 ! e 2009fb0: c2 22 00 00 st %g1, [ %o0 ] 2009fb4: 81 c7 e0 08 ret 2009fb8: 91 e8 3f ff restore %g0, -1, %o0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 2009fbc: 80 a6 a0 00 cmp %i2, 0 2009fc0: 02 80 00 19 be 200a024 2009fc4: 90 10 00 18 mov %i0, %o0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 2009fc8: 92 10 00 1a mov %i2, %o1 2009fcc: 40 00 0d 25 call 200d460 2009fd0: 94 10 00 19 mov %i1, %o2 2009fd4: 80 a2 20 00 cmp %o0, 0 2009fd8: 32 80 00 14 bne,a 200a028 2009fdc: b8 07 20 01 inc %i4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 2009fe0: c2 4e 80 19 ldsb [ %i2 + %i1 ], %g1 2009fe4: 80 a0 60 00 cmp %g1, 0 2009fe8: 32 80 00 10 bne,a 200a028 2009fec: 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; 2009ff0: 03 00 80 5d sethi %hi(0x2017400), %g1 2009ff4: 82 10 60 14 or %g1, 0x14, %g1 ! 2017414 2009ff8: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 2009ffc: 03 00 80 5d sethi %hi(0x2017400), %g1 200a000: 82 10 60 4c or %g1, 0x4c, %g1 ! 201744c 200a004: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a008: 03 00 80 5d sethi %hi(0x2017400), %g1 200a00c: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1 ! 20174b4 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 200a010: fa 26 c0 00 st %i5, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a014: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200a018: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] return 0; 200a01c: 81 c7 e0 08 ret 200a020: 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++) { 200a024: b8 07 20 01 inc %i4 200a028: ba 07 60 14 add %i5, 0x14, %i5 200a02c: c2 04 23 4c ld [ %l0 + 0x34c ], %g1 200a030: 80 a7 00 01 cmp %i4, %g1 200a034: 2a bf ff e2 bcs,a 2009fbc 200a038: 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 ); 200a03c: 40 00 07 a7 call 200bed8 <__errno> 200a040: b0 10 3f ff mov -1, %i0 200a044: 82 10 20 02 mov 2, %g1 200a048: c2 22 00 00 st %g1, [ %o0 ] } 200a04c: 81 c7 e0 08 ret 200a050: 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 69 call 200bed8 <__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 5d call 200bed8 <__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 5a call 200d2e8 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 51 call 200bed8 <__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 4c ld [ %l2 + 0x34c ], %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 42 call 200bed8 <__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 65 call 200d39c 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 80 ld [ %g1 + 0x280 ], %o0 ! 2018680 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 7c stb %g2, [ %g1 + 0x27c ] 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 7c clrb [ %g1 + 0x27c ] ! 201867c 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 80 ld [ %g1 + 0x280 ], %o0 ! 2018680 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 8c ld [ %g1 + 0x38c ], %g1 ! 201ab8c <__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 61 e0 ld [ %g1 + 0x1e0 ], %o0 ! 20165e0 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 77 call 200e7e0 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 00 ld [ %g1 + 0x100 ], %o0 ! 2016500 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 dc call 200e7e0 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 8c ld [ %i3 + 0x38c ], %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 8c ld [ %i3 + 0x38c ], %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 8c ld [ %i3 + 0x38c ], %g1 2004c8c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004c90: 02 80 00 0d be 2004cc4 <== NOT EXECUTED 2004c94: c2 06 e3 8c ld [ %i3 + 0x38c ], %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 8c ld [ %i3 + 0x38c ], %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 8c ld [ %i3 + 0x38c ], %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 a1 f8 or %i2, 0x1f8, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d2c: b0 16 21 f0 or %i0, 0x1f0, %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 =============================================================================== 02012910 : #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) { 2012910: 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) 2012914: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 2012918: 80 a0 60 00 cmp %g1, 0 201291c: 32 80 00 15 bne,a 2012970 2012920: 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); 2012924: 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) 2012928: 80 a6 a0 01 cmp %i2, 1 201292c: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012930: 12 80 00 06 bne 2012948 2012934: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012938: 7f ff f9 ae call 2010ff0 201293c: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012940: 10 80 00 05 b 2012954 2012944: 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); 2012948: 7f ff f9 75 call 2010f1c 201294c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012950: 80 a2 20 00 cmp %o0, 0 2012954: 12 80 00 62 bne 2012adc <== NEVER TAKEN 2012958: 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; 201295c: 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; 2012960: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; 2012964: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012968: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 201296c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2012970: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2012974: 80 a0 40 02 cmp %g1, %g2 2012978: 0a 80 00 05 bcs 201298c <== NEVER TAKEN 201297c: b8 10 20 00 clr %i4 2012980: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2012984: 80 a0 40 02 cmp %g1, %g2 2012988: 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) 201298c: 80 a0 40 19 cmp %g1, %i1 2012990: 22 80 00 5c be,a 2012b00 2012994: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 2012998: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 201299c: 80 a0 60 00 cmp %g1, 0 20129a0: 02 80 00 3c be 2012a90 20129a4: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 20129a8: 02 80 00 0b be 20129d4 <== ALWAYS TAKEN 20129ac: 01 00 00 00 nop 20129b0: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20129b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20129b8: 12 80 00 07 bne 20129d4 <== NOT EXECUTED 20129bc: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 20129c0: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 20129c4: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 20129c8: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 20129cc: 40 00 25 4f call 201bf08 <== NOT EXECUTED 20129d0: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 20129d4: 7f ff fa 5d call 2011348 20129d8: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 20129dc: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 20129e0: 80 a2 20 00 cmp %o0, 0 20129e4: 12 80 00 3e bne 2012adc <== NEVER TAKEN 20129e8: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 20129ec: 80 8f 20 ff btst 0xff, %i4 20129f0: 02 80 00 2e be 2012aa8 <== ALWAYS TAKEN 20129f4: 94 10 00 19 mov %i1, %o2 20129f8: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20129fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012a00: 02 80 00 1d be 2012a74 <== NOT EXECUTED 2012a04: 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) 2012a08: 10 80 00 29 b 2012aac <== NOT EXECUTED 2012a0c: 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, 2012a10: 40 00 55 1b call 2027e7c <.umul> <== NOT EXECUTED 2012a14: 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, 2012a18: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 2012a1c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2012a20: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 2012a24: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2012a28: 7f ff f9 3d call 2010f1c <== NOT EXECUTED 2012a2c: 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) 2012a30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a34: 12 80 00 0c bne 2012a64 <== NOT EXECUTED 2012a38: 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); 2012a3c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2012a40: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2012a44: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2012a48: 40 00 25 30 call 201bf08 <== NOT EXECUTED 2012a4c: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2012a50: 7f ff fa 3e call 2011348 <== NOT EXECUTED 2012a54: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2012a58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a5c: 22 80 00 06 be,a 2012a74 <== NOT EXECUTED 2012a60: a0 04 20 01 inc %l0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2012a64: 40 00 22 5a call 201b3cc <__errno> <== NOT EXECUTED 2012a68: 01 00 00 00 nop <== NOT EXECUTED 2012a6c: 10 80 00 1f b 2012ae8 <== NOT EXECUTED 2012a70: 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++) 2012a74: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2012a78: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2012a7c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2012a80: 2a bf ff e4 bcs,a 2012a10 <== NOT EXECUTED 2012a84: 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); 2012a88: 10 80 00 08 b 2012aa8 <== NOT EXECUTED 2012a8c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012a90: 7f ff f9 f2 call 2011258 2012a94: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2012a98: 80 a2 20 00 cmp %o0, 0 2012a9c: 12 80 00 10 bne 2012adc <== NEVER TAKEN 2012aa0: 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); 2012aa4: 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) 2012aa8: 80 a6 a0 01 cmp %i2, 1 2012aac: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012ab0: 12 80 00 06 bne 2012ac8 2012ab4: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012ab8: 7f ff f9 4e call 2010ff0 2012abc: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012ac0: 10 80 00 05 b 2012ad4 2012ac4: 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); 2012ac8: 7f ff f9 15 call 2010f1c 2012acc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012ad0: 80 a2 20 00 cmp %o0, 0 2012ad4: 02 80 00 08 be 2012af4 <== ALWAYS TAKEN 2012ad8: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012adc: 40 00 22 3c call 201b3cc <__errno> <== NOT EXECUTED 2012ae0: 01 00 00 00 nop <== NOT EXECUTED 2012ae4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012ae8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012aec: 81 c7 e0 08 ret <== NOT EXECUTED 2012af0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2012af4: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012af8: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2012afc: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2012b00: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2012b04: 81 c7 e0 08 ret 2012b08: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012b0c : int fat_buf_release(fat_fs_info_t *fs_info) { 2012b0c: 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) 2012b10: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012b14: 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) 2012b18: 80 a0 60 00 cmp %g1, 0 2012b1c: 02 80 00 54 be 2012c6c 2012b20: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012b24: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1 2012b28: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2 2012b2c: 80 a0 40 02 cmp %g1, %g2 2012b30: 0a 80 00 05 bcs 2012b44 <== NEVER TAKEN 2012b34: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2012b38: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 2012b3c: 80 a0 40 02 cmp %g1, %g2 2012b40: 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) 2012b44: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1 2012b48: 80 a0 60 00 cmp %g1, 0 2012b4c: 02 80 00 3b be 2012c38 2012b50: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012b54: 02 80 00 0b be 2012b80 2012b58: 01 00 00 00 nop 2012b5c: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012b60: 80 a0 60 00 cmp %g1, 0 2012b64: 12 80 00 07 bne 2012b80 <== NEVER TAKEN 2012b68: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2012b6c: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1 2012b70: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0 2012b74: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012b78: 40 00 24 e4 call 201bf08 2012b7c: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012b80: 7f ff f9 f2 call 2011348 2012b84: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012b88: 80 a2 20 00 cmp %o0, 0 2012b8c: 12 80 00 30 bne 2012c4c <== NEVER TAKEN 2012b90: 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) 2012b94: 80 8f 20 ff btst 0xff, %i4 2012b98: 02 80 00 33 be 2012c64 2012b9c: c0 2e e0 84 clrb [ %i3 + 0x84 ] 2012ba0: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012ba4: 80 a0 60 00 cmp %g1, 0 2012ba8: 02 80 00 1d be 2012c1c <== ALWAYS TAKEN 2012bac: 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; 2012bb0: 10 80 00 2e b 2012c68 <== NOT EXECUTED 2012bb4: 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, 2012bb8: 40 00 54 b1 call 2027e7c <.umul> 2012bbc: 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, 2012bc0: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2 2012bc4: 92 10 00 1d mov %i5, %o1 2012bc8: 94 02 00 0a add %o0, %o2, %o2 2012bcc: 96 07 bf fc add %fp, -4, %o3 2012bd0: 7f ff f8 d3 call 2010f1c 2012bd4: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012bd8: 80 a2 20 00 cmp %o0, 0 2012bdc: 12 80 00 0c bne 2012c0c <== NEVER TAKEN 2012be0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012be4: c2 07 bf fc ld [ %fp + -4 ], %g1 2012be8: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1 2012bec: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012bf0: 40 00 24 c6 call 201bf08 2012bf4: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(b); 2012bf8: 7f ff f9 d4 call 2011348 2012bfc: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012c00: 80 a2 20 00 cmp %o0, 0 2012c04: 22 80 00 06 be,a 2012c1c <== ALWAYS TAKEN 2012c08: b4 06 a0 01 inc %i2 rtems_set_errno_and_return_minus_one(ENOMEM); 2012c0c: 40 00 21 f0 call 201b3cc <__errno> <== NOT EXECUTED 2012c10: 01 00 00 00 nop <== NOT EXECUTED 2012c14: 10 80 00 11 b 2012c58 <== NOT EXECUTED 2012c18: 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++) 2012c1c: c2 0e e0 09 ldub [ %i3 + 9 ], %g1 2012c20: 90 0e a0 ff and %i2, 0xff, %o0 2012c24: 80 a2 00 01 cmp %o0, %g1 2012c28: 2a bf ff e4 bcs,a 2012bb8 2012c2c: 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; 2012c30: 10 80 00 0e b 2012c68 2012c34: c0 2e e0 85 clrb [ %i3 + 0x85 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012c38: 7f ff f9 88 call 2011258 2012c3c: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012c40: 80 a2 20 00 cmp %o0, 0 2012c44: 22 80 00 09 be,a 2012c68 <== ALWAYS TAKEN 2012c48: c0 2e e0 85 clrb [ %i3 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); 2012c4c: 40 00 21 e0 call 201b3cc <__errno> <== NOT EXECUTED 2012c50: 01 00 00 00 nop <== NOT EXECUTED 2012c54: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012c58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012c5c: 81 c7 e0 08 ret <== NOT EXECUTED 2012c60: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012c64: c0 2e e0 85 clrb [ %i3 + 0x85 ] return RC_OK; 2012c68: b0 10 20 00 clr %i0 } 2012c6c: 81 c7 e0 08 ret 2012c70: 81 e8 00 00 restore =============================================================================== 02011c14 : 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)) ) 2011c14: 80 a2 60 00 cmp %o1, 0 2011c18: 32 80 00 08 bne,a 2011c38 2011c1c: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011c20: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2011c24: 80 88 60 03 btst 3, %g1 2011c28: 22 80 00 04 be,a 2011c38 <== NEVER TAKEN 2011c2c: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011c30: 81 c3 e0 08 retl 2011c34: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011c38: 92 02 7f fe add %o1, -2, %o1 2011c3c: 93 2a 40 01 sll %o1, %g1, %o1 2011c40: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2011c44: 81 c3 e0 08 retl 2011c48: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02012da4 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012da4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2012da8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 2012dac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012db0: 7f ff fe ca call 20128d8 <== NOT EXECUTED 2012db4: 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); 2012db8: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED 2012dbc: 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 ) { 2012dc0: 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, 2012dc4: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED 2012dc8: b7 2e c0 01 sll %i3, %g1, %i3 <== NOT EXECUTED 2012dcc: 7f ff ff aa call 2012c74 <_fat_block_read> <== NOT EXECUTED 2012dd0: 95 e8 20 00 restore %g0, 0, %o2 <== NOT EXECUTED =============================================================================== 02012fd0 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2012fd0: 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; 2012fd4: 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); 2012fd8: 7f ff fe 34 call 20128a8 <== NOT EXECUTED 2012fdc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2012fe0: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2012fe4: 7f ff fe 31 call 20128a8 <== NOT EXECUTED 2012fe8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2012fec: 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); 2012ff0: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2012ff4: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2012ff8: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2012ffc: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2013000: 7f ff ff 3f call 2012cfc <_fat_block_write> <== NOT EXECUTED 2013004: 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, 2013008: 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, 201300c: 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, 2013010: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2013014: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2013018: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 201301c: 7f ff ff 38 call 2012cfc <_fat_block_write> <== NOT EXECUTED 2013020: 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) ) 2013024: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013028: 06 80 00 04 bl 2013038 <== NOT EXECUTED 201302c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013030: 16 80 00 03 bge 201303c <== NOT EXECUTED 2013034: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 2013038: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 201303c: 81 c7 e0 08 ret <== NOT EXECUTED 2013040: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012134 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012134: 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) 2012138: c2 06 60 08 ld [ %i1 + 8 ], %g1 201213c: 80 a0 60 01 cmp %g1, 1 2012140: 08 80 00 06 bleu 2012158 2012144: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 { fat_fd->links_num--; 2012148: 82 00 7f ff add %g1, -1, %g1 return rc; 201214c: 90 10 20 00 clr %o0 2012150: 10 80 00 25 b 20121e4 2012154: 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) 2012158: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 201215c: 80 88 60 01 btst 1, %g1 2012160: 02 80 00 14 be 20121b0 <== ALWAYS TAKEN 2012164: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 2012168: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201216c: 7f ff ff ae call 2012024 <== NOT EXECUTED 2012170: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2012174: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012178: 12 80 00 1b bne 20121e4 <== NOT EXECUTED 201217c: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2012180: 7f ff e2 56 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 2012184: 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) ) 2012188: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 201218c: 40 00 03 8c call 2012fbc <== NOT EXECUTED 2012190: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012194: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2012198: 02 80 00 0f be 20121d4 <== NOT EXECUTED 201219c: 01 00 00 00 nop <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 20121a0: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20121a4: 40 00 03 7a call 2012f8c <== NOT EXECUTED 20121a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20121ac: 30 80 00 0a b,a 20121d4 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20121b0: 40 00 03 83 call 2012fbc 20121b4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20121b8: 80 8a 20 ff btst 0xff, %o0 20121bc: 02 80 00 04 be 20121cc <== ALWAYS TAKEN 20121c0: 01 00 00 00 nop { fat_fd->links_num = 0; 20121c4: 10 80 00 06 b 20121dc <== NOT EXECUTED 20121c8: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 20121cc: 7f ff e2 43 call 200aad8 <_Chain_Extract> 20121d0: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20121d4: 7f ff ce a6 call 2005c6c 20121d8: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20121dc: 40 00 02 4c call 2012b0c 20121e0: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 20121e4: 81 c7 e0 08 ret 20121e8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012708 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012708: 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; 201270c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2012710: 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; 2012714: 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) 2012718: 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 ) { 201271c: 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; 2012720: 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) 2012724: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012728: 02 80 00 07 be 2012744 <== NOT EXECUTED 201272c: 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); 2012730: 40 00 00 f7 call 2012b0c <== NOT EXECUTED 2012734: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2012738: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201273c: 02 80 00 24 be 20127cc <== NOT EXECUTED 2012740: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2012744: 81 c7 e0 08 ret <== NOT EXECUTED 2012748: 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); 201274c: 7f ff fd 32 call 2011c14 <== NOT EXECUTED 2012750: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2012754: 10 80 00 13 b 20127a0 <== NOT EXECUTED 2012758: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 201275c: 94 06 c0 1a add %i3, %i2, %o2 <== NOT EXECUTED 2012760: 7f ff fa 24 call 2010ff0 <== NOT EXECUTED 2012764: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2012768: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201276c: 12 80 00 07 bne 2012788 <== NOT EXECUTED 2012770: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2012774: 7f ff fb 1b call 20113e0 <== NOT EXECUTED 2012778: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 201277c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012780: 22 80 00 08 be,a 20127a0 <== NOT EXECUTED 2012784: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2012788: 40 00 23 11 call 201b3cc <__errno> <== NOT EXECUTED 201278c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012790: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012794: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012798: 81 c7 e0 08 ret <== NOT EXECUTED 201279c: 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++ ) 20127a0: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 20127a4: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 20127a8: 2a bf ff ed bcs,a 201275c <== NOT EXECUTED 20127ac: 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); 20127b0: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20127b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20127b8: 40 00 1c 72 call 2019980 <== NOT EXECUTED 20127bc: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20127c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20127c4: 12 80 00 0a bne 20127ec <== NOT EXECUTED 20127c8: 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) 20127cc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 20127d0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 20127d4: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 20127d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20127dc: 2a bf ff dc bcs,a 201274c <== NOT EXECUTED 20127e0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED 20127e4: 81 c7 e0 08 ret <== NOT EXECUTED 20127e8: 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); 20127ec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 20127f0: 81 c7 e0 08 ret <== NOT EXECUTED 20127f4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020122c0 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20122c0: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20122c4: 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; 20122c8: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20122cc: 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; 20122d0: 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; 20122d4: 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 ) { 20122d8: 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) 20122dc: 80 a6 80 12 cmp %i2, %l2 20122e0: 08 80 00 2d bleu 2012394 20122e4: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20122e8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20122ec: 80 a0 60 01 cmp %g1, 1 20122f0: 32 80 00 0b bne,a 201231c <== ALWAYS TAKEN 20122f4: c4 17 20 06 lduh [ %i4 + 6 ], %g2 20122f8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 20122fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012300: 32 80 00 07 bne,a 201231c <== NOT EXECUTED 2012304: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012308: 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)) && 201230c: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012310: 12 80 00 1d bne 2012384 <== NOT EXECUTED 2012314: 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))) & 2012318: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 201231c: 82 00 bf ff add %g2, -1, %g1 2012320: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2012324: 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 - 2012328: a0 20 80 10 sub %g2, %l0, %l0 201232c: 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) 2012330: 80 a4 80 10 cmp %l2, %l0 2012334: 08 80 00 18 bleu 2012394 2012338: 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) 201233c: a4 a4 80 10 subcc %l2, %l0, %l2 2012340: 02 80 00 15 be 2012394 <== NEVER TAKEN 2012344: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012348: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 201234c: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012350: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012354: 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; 2012358: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 201235c: 96 07 bf fc add %fp, -4, %o3 2012360: 94 10 00 11 mov %l1, %o2 2012364: 40 00 1e d6 call 2019ebc 2012368: 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) 201236c: b0 92 20 00 orcc %o0, 0, %i0 2012370: 12 80 00 09 bne 2012394 <== NEVER TAKEN 2012374: 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)) 2012378: 80 94 00 01 orcc %l0, %g1, %g0 201237c: 12 80 00 08 bne 201239c <== ALWAYS TAKEN 2012380: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 2012384: 40 00 24 12 call 201b3cc <__errno> <== NOT EXECUTED 2012388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201238c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2012390: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012394: 81 c7 e0 08 ret 2012398: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 201239c: 02 80 00 0b be 20123c8 <== ALWAYS TAKEN 20123a0: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20123a4: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 20123a8: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20123ac: 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) - 20123b0: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20123b4: 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 - 20123b8: 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)); 20123bc: 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) - 20123c0: 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 - 20123c4: 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 ) 20123c8: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20123cc: 80 a2 e0 00 cmp %o3, 0 20123d0: 32 80 00 07 bne,a 20123ec 20123d4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20123d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 20123dc: 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; 20123e0: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 20123e4: 10 80 00 1d b 2012458 20123e8: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 20123ec: 80 a0 7f ff cmp %g1, -1 20123f0: 02 80 00 04 be 2012400 <== NEVER TAKEN 20123f4: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 20123f8: 10 80 00 0a b 2012420 20123fc: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 2012400: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012404: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2012408: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 201240c: 7f ff ff 78 call 20121ec <== NOT EXECUTED 2012410: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2012414: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 2012418: 12 80 00 09 bne 201243c <== NOT EXECUTED 201241c: 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); 2012420: d2 07 bf f4 ld [ %fp + -12 ], %o1 2012424: d4 07 bf f0 ld [ %fp + -16 ], %o2 2012428: 40 00 1d c6 call 2019b40 201242c: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012430: b6 92 20 00 orcc %o0, 0, %i3 2012434: 02 80 00 07 be 2012450 <== ALWAYS TAKEN 2012438: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 201243c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012440: 40 00 1e 6f call 2019dfc <== NOT EXECUTED 2012444: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 2012448: 81 c7 e0 08 ret <== NOT EXECUTED 201244c: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 2012450: 40 00 01 af call 2012b0c 2012454: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2012458: c2 07 bf fc ld [ %fp + -4 ], %g1 201245c: 80 a0 60 00 cmp %g1, 0 2012460: 22 bf ff cd be,a 2012394 <== NEVER TAKEN 2012464: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2012468: c2 07 bf f8 ld [ %fp + -8 ], %g1 201246c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2012470: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2012474: 80 a0 60 01 cmp %g1, 1 2012478: 32 bf ff c7 bne,a 2012394 201247c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 2012480: d2 07 bf f0 ld [ %fp + -16 ], %o1 2012484: 40 00 02 60 call 2012e04 2012488: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 201248c: b8 92 20 00 orcc %o0, 0, %i4 2012490: 22 bf ff c1 be,a 2012394 <== ALWAYS TAKEN 2012494: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 2012498: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 201249c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20124a0: 40 00 1e 57 call 2019dfc <== NOT EXECUTED 20124a4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 20124a8: 81 c7 e0 08 ret <== NOT EXECUTED 20124ac: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020121ec : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20121ec: 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); 20121f0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20121f4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20121f8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20121fc: 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; 2012200: 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); 2012204: 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, ...) { 2012208: 90 10 00 18 mov %i0, %o0 201220c: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2012210: 80 a6 a0 01 cmp %i2, 1 2012214: 12 80 00 24 bne 20122a4 <== NEVER TAKEN 2012218: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 201221c: 84 07 a0 58 add %fp, 0x58, %g2 2012220: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012224: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2012228: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 201222c: 80 a6 c0 02 cmp %i3, %g2 2012230: 0a 80 00 06 bcs 2012248 <== ALWAYS TAKEN 2012234: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 2012238: 40 00 24 65 call 201b3cc <__errno> <== NOT EXECUTED 201223c: 01 00 00 00 nop <== NOT EXECUTED 2012240: 10 80 00 1c b 20122b0 <== NOT EXECUTED 2012244: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012248: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 201224c: 80 a0 a0 01 cmp %g2, 1 2012250: 32 80 00 0d bne,a 2012284 2012254: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 2012258: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 201225c: 80 a0 a0 00 cmp %g2, 0 2012260: 32 80 00 09 bne,a 2012284 <== NEVER TAKEN 2012264: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012268: 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)) && 201226c: 80 88 a0 03 btst 3, %g2 2012270: 22 80 00 05 be,a 2012284 <== NEVER TAKEN 2012274: 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; 2012278: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 201227c: 10 80 00 0f b 20122b8 2012280: 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); 2012284: 96 07 bf f8 add %fp, -8, %o3 2012288: 7f ff fe 3d call 2011b7c 201228c: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 2012290: 80 a2 60 00 cmp %o1, 0 2012294: 12 80 00 09 bne 20122b8 <== NEVER TAKEN 2012298: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 201229c: 10 80 00 07 b 20122b8 20122a0: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 20122a4: 40 00 24 4a call 201b3cc <__errno> <== NOT EXECUTED 20122a8: 01 00 00 00 nop <== NOT EXECUTED 20122ac: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20122b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20122b4: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20122b8: 81 c7 e0 08 ret 20122bc: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02011b7c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2011b7c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2011b80: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2011b84: 80 a6 80 1c cmp %i2, %i4 2011b88: 12 80 00 07 bne 2011ba4 <== NEVER TAKEN 2011b8c: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2011b90: 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; 2011b94: 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; 2011b98: 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; 2011b9c: 81 c7 e0 08 ret 2011ba0: 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) 2011ba4: 28 80 00 06 bleu,a 2011bbc <== NOT EXECUTED 2011ba8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2011bac: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2011bb0: 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; 2011bb4: 10 80 00 04 b 2011bc4 <== NOT EXECUTED 2011bb8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2011bbc: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2011bc0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011bc4: 10 80 00 0b b 2011bf0 <== NOT EXECUTED 2011bc8: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011bcc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011bd0: 40 00 1f 6c call 2019980 <== NOT EXECUTED 2011bd4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2011bd8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011bdc: 22 80 00 05 be,a 2011bf0 <== NOT EXECUTED 2011be0: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2011be4: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2011be8: 81 c7 e0 08 ret <== NOT EXECUTED 2011bec: 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++) 2011bf0: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2011bf4: 12 bf ff f6 bne 2011bcc <== NOT EXECUTED 2011bf8: 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; 2011bfc: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2011c00: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2011c04: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2011c08: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2011c0c: 81 c7 e0 08 ret <== NOT EXECUTED 2011c10: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 020126b4 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20126b4: 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); 20126b8: 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; 20126bc: 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); 20126c0: 7f ff fd 63 call 2011c4c <== NOT EXECUTED 20126c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20126c8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 20126cc: 7f ff e1 03 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 20126d0: 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); 20126d4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 20126d8: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 20126dc: 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 ); 20126e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20126e4: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 20126e8: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 20126ec: 7f ff e0 f0 call 200aaac <_Chain_Append> <== NOT EXECUTED 20126f0: 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; 20126f4: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 20126f8: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 20126fc: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 2012700: 81 c7 e0 08 ret <== NOT EXECUTED 2012704: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011d08 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011d08: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011d0c: 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); 2011d10: 90 10 00 18 mov %i0, %o0 2011d14: 92 10 00 19 mov %i1, %o1 2011d18: 7f ff ff cd call 2011c4c 2011d1c: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011d20: 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); 2011d24: 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 ) { 2011d28: 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); 2011d2c: 90 10 00 18 mov %i0, %o0 2011d30: 94 10 00 1c mov %i4, %o2 2011d34: 96 10 20 00 clr %o3 2011d38: 7f ff ff d7 call 2011c94 <_hash_search> 2011d3c: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2011d40: b0 92 20 00 orcc %o0, 0, %i0 2011d44: 12 80 00 08 bne 2011d64 2011d48: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2011d4c: 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; 2011d50: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2011d54: 84 00 a0 01 inc %g2 2011d58: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2011d5c: 81 c7 e0 08 ret 2011d60: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2011d64: d2 06 e0 6c ld [ %i3 + 0x6c ], %o1 2011d68: 94 10 00 1c mov %i4, %o2 2011d6c: 96 10 00 1c mov %i4, %o3 2011d70: 98 07 bf fc add %fp, -4, %o4 2011d74: 7f ff ff c8 call 2011c94 <_hash_search> 2011d78: 90 10 00 1d mov %i5, %o0 2011d7c: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2011d80: 7f ff d1 76 call 2006358 2011d84: 90 10 20 44 mov 0x44, %o0 2011d88: d0 26 80 00 st %o0, [ %i2 ] 2011d8c: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2011d90: 80 a2 20 00 cmp %o0, 0 2011d94: 02 80 00 1f be 2011e10 <== NEVER TAKEN 2011d98: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2011d9c: 92 10 20 00 clr %o1 2011da0: 40 00 28 96 call 201bff8 2011da4: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2011da8: 82 10 20 01 mov 1, %g1 2011dac: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011db0: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2011db4: 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; 2011db8: 82 08 7f fe and %g1, -2, %g1 2011dbc: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011dc0: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2011dc4: 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; 2011dc8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2011dcc: 40 00 28 4f call 201bf08 2011dd0: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2011dd4: 80 a4 20 00 cmp %l0, 0 2011dd8: 02 80 00 04 be 2011de8 <== NEVER TAKEN 2011ddc: 01 00 00 00 nop lfat_fd->ino = key; 2011de0: 10 80 00 12 b 2011e28 2011de4: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011de8: 40 00 04 35 call 2012ebc <== NOT EXECUTED 2011dec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011df0: 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); 2011df4: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011df8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2011dfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011e00: 32 80 00 0b bne,a 2011e2c <== NOT EXECUTED 2011e04: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2011e08: 7f ff cf 99 call 2005c6c <== NOT EXECUTED 2011e0c: 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 ); 2011e10: 40 00 25 6f call 201b3cc <__errno> <== NOT EXECUTED 2011e14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011e18: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2011e1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011e20: 81 c7 e0 08 ret <== NOT EXECUTED 2011e24: 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); 2011e28: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 2011e2c: d2 07 bf fc ld [ %fp + -4 ], %o1 2011e30: b8 0f 20 01 and %i4, 1, %i4 2011e34: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2011e38: 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); 2011e3c: b9 2f 20 04 sll %i4, 4, %i4 2011e40: b8 27 00 01 sub %i4, %g1, %i4 2011e44: 7f ff e3 1a call 200aaac <_Chain_Append> 2011e48: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2011e4c: 81 c7 e0 08 ret 2011e50: 81 e8 00 00 restore =============================================================================== 02011e68 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011e68: 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; 2011e6c: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011e70: 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; 2011e74: 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) 2011e78: 80 a6 e0 00 cmp %i3, 0 2011e7c: 02 80 00 63 be 2012008 <== NEVER TAKEN 2011e80: 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 ) 2011e84: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2011e88: 80 a6 80 01 cmp %i2, %g1 2011e8c: 1a 80 00 5f bcc 2012008 <== NEVER TAKEN 2011e90: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011e94: 38 80 00 07 bgu,a 2011eb0 <== NEVER TAKEN 2011e98: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2011e9c: 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) || 2011ea0: 80 a6 80 02 cmp %i2, %g2 2011ea4: 28 80 00 04 bleu,a 2011eb4 <== ALWAYS TAKEN 2011ea8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2011eac: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011eb0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2011eb4: 80 a0 60 01 cmp %g1, 1 2011eb8: 32 80 00 1c bne,a 2011f28 2011ebc: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2011ec0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011ec4: 80 a0 60 00 cmp %g1, 0 2011ec8: 32 80 00 18 bne,a 2011f28 <== NEVER TAKEN 2011ecc: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011ed0: 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)) && 2011ed4: 80 88 60 03 btst 3, %g1 2011ed8: 22 80 00 14 be,a 2011f28 <== NEVER TAKEN 2011edc: 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); 2011ee0: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2011ee4: 7f ff ff 4c call 2011c14 2011ee8: 90 10 00 10 mov %l0, %o0 sec += (start >> fs_info->vol.sec_log2); 2011eec: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2011ef0: 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); 2011ef4: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2011ef8: 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); 2011efc: 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); 2011f00: 94 0e 80 0a and %i2, %o2, %o2 2011f04: 90 10 00 1d mov %i5, %o0 2011f08: 96 10 00 1b mov %i3, %o3 2011f0c: 40 00 03 5a call 2012c74 <_fat_block_read> 2011f10: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2011f14: b0 92 20 00 orcc %o0, 0, %i0 2011f18: 16 80 00 41 bge 201201c <== ALWAYS TAKEN 2011f1c: 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; 2011f20: 81 c7 e0 08 ret <== NOT EXECUTED 2011f24: 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); 2011f28: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2011f2c: 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); 2011f30: a6 07 bf fc add %fp, -4, %l3 2011f34: 90 10 00 1d mov %i5, %o0 2011f38: 92 10 00 19 mov %i1, %o1 2011f3c: 94 10 00 12 mov %l2, %o2 2011f40: 7f ff ff 0f call 2011b7c 2011f44: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2011f48: b0 92 60 00 orcc %o1, 0, %i0 2011f4c: 12 80 00 2f bne 2012008 <== NEVER TAKEN 2011f50: 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); 2011f54: a3 34 60 10 srl %l1, 0x10, %l1 2011f58: a2 04 7f ff add %l1, -1, %l1 2011f5c: b4 0e 80 11 and %i2, %l1, %i2 2011f60: a2 10 20 00 clr %l1 2011f64: 10 80 00 1f b 2011fe0 2011f68: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2011f6c: a2 24 40 14 sub %l1, %l4, %l1 2011f70: 80 a4 40 1b cmp %l1, %i3 2011f74: 38 80 00 02 bgu,a 2011f7c 2011f78: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2011f7c: d2 07 bf fc ld [ %fp + -4 ], %o1 2011f80: 7f ff ff 25 call 2011c14 2011f84: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (ofs >> fs_info->vol.sec_log2); 2011f88: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2011f8c: 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); 2011f90: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2011f94: 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); 2011f98: 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); 2011f9c: 94 0d 00 0a and %l4, %o2, %o2 2011fa0: 90 10 00 1d mov %i5, %o0 2011fa4: 96 10 00 11 mov %l1, %o3 2011fa8: 40 00 03 33 call 2012c74 <_fat_block_read> 2011fac: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2011fb0: 80 a2 20 00 cmp %o0, 0 2011fb4: 06 80 00 17 bl 2012010 <== NEVER TAKEN 2011fb8: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 2011fbc: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 2011fc0: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011fc4: 90 10 00 1d mov %i5, %o0 2011fc8: 92 10 00 11 mov %l1, %o1 2011fcc: 40 00 1e 6d call 2019980 2011fd0: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2011fd4: 80 a2 20 00 cmp %o0, 0 2011fd8: 12 80 00 10 bne 2012018 <== NEVER TAKEN 2011fdc: 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) 2011fe0: 80 a6 e0 00 cmp %i3, 0 2011fe4: 32 bf ff e2 bne,a 2011f6c 2011fe8: 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); 2011fec: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2011ff0: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2011ff4: 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); 2011ff8: b4 06 80 18 add %i2, %i0, %i2 2011ffc: 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 + 2012000: a4 06 80 12 add %i2, %l2, %l2 2012004: 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; 2012008: 81 c7 e0 08 ret 201200c: 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; 2012010: 81 c7 e0 08 ret <== NOT EXECUTED 2012014: 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); 2012018: 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; } 201201c: 81 c7 e0 08 ret 2012020: 81 e8 00 00 restore =============================================================================== 020127f8 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20127f8: 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; 20127fc: 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 ) { 2012800: 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; 2012804: 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)) && 2012808: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 201280c: 80 a0 60 01 cmp %g1, 1 2012810: 12 80 00 0d bne 2012844 <== ALWAYS TAKEN 2012814: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 2012818: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 201281c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012820: 32 80 00 0a bne,a 2012848 <== NOT EXECUTED 2012824: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012828: 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)) && 201282c: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012830: 22 80 00 06 be,a 2012848 <== NOT EXECUTED 2012834: 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; 2012838: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 201283c: 10 80 00 18 b 201289c <== NOT EXECUTED 2012840: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2012844: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2012848: 10 80 00 0d b 201287c 201284c: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012850: 92 10 00 1b mov %i3, %o1 2012854: 40 00 1c 4b call 2019980 2012858: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201285c: 80 a2 20 00 cmp %o0, 0 2012860: 12 80 00 10 bne 20128a0 <== NEVER TAKEN 2012864: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2012868: c2 17 20 06 lduh [ %i4 + 6 ], %g1 201286c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 2012870: 82 00 80 01 add %g2, %g1, %g1 2012874: 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; 2012878: 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) 201287c: f6 07 bf fc ld [ %fp + -4 ], %i3 2012880: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2012884: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2012888: 86 0e c0 03 and %i3, %g3, %g3 201288c: 80 a0 c0 02 cmp %g3, %g2 2012890: 0a bf ff f0 bcs 2012850 2012894: 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; 2012898: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 201289c: 90 10 20 00 clr %o0 } 20128a0: 81 c7 e0 08 ret 20128a4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012024 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2012024: 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; 2012028: 82 10 3f ff mov -1, %g1 201202c: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2012030: 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; 2012034: 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 ) { 2012038: 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 ) 201203c: 80 a6 80 01 cmp %i2, %g1 2012040: 1a 80 00 3a bcc 2012128 <== NEVER TAKEN 2012044: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 return rc; assert(fat_fd->fat_file_size); 2012048: 80 a0 60 00 cmp %g1, 0 201204c: 32 80 00 0a bne,a 2012074 <== ALWAYS TAKEN 2012050: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2012054: 11 00 80 ab sethi %hi(0x202ac00), %o0 <== NOT EXECUTED 2012058: 15 00 80 ab sethi %hi(0x202ac00), %o2 <== NOT EXECUTED 201205c: 17 00 80 ab sethi %hi(0x202ac00), %o3 <== NOT EXECUTED 2012060: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED 2012064: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2012068: 94 12 a3 a8 or %o2, 0x3a8, %o2 <== NOT EXECUTED 201206c: 40 00 09 db call 20147d8 <__assert_func> <== NOT EXECUTED 2012070: 96 12 e3 90 or %o3, 0x390, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2012074: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 2012078: 86 00 ff ff add %g3, -1, %g3 201207c: b4 00 c0 1a add %g3, %i2, %i2 2012080: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2012084: 85 2e 80 02 sll %i2, %g2, %g2 2012088: 80 a0 80 01 cmp %g2, %g1 201208c: 1a 80 00 28 bcc 201212c <== NEVER TAKEN 2012090: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 2012094: 80 a6 a0 00 cmp %i2, 0 2012098: 02 80 00 0a be 20120c0 <== ALWAYS TAKEN 201209c: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 20120a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20120a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20120a8: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20120ac: 7f ff fe b4 call 2011b7c <== NOT EXECUTED 20120b0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20120b4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20120b8: 12 80 00 1d bne 201212c <== NOT EXECUTED 20120bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20120c0: 92 10 00 19 mov %i1, %o1 20120c4: 94 10 00 1a mov %i2, %o2 20120c8: 7f ff fe ad call 2011b7c 20120cc: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20120d0: 80 a2 60 00 cmp %o1, 0 20120d4: 12 80 00 16 bne 201212c <== NEVER TAKEN 20120d8: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20120dc: d2 07 bf f8 ld [ %fp + -8 ], %o1 20120e0: 40 00 1f 47 call 2019dfc 20120e4: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20120e8: 92 92 20 00 orcc %o0, 0, %o1 20120ec: 12 80 00 10 bne 201212c <== NEVER TAKEN 20120f0: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20120f4: 02 80 00 0e be 201212c <== ALWAYS TAKEN 20120f8: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20120fc: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2012100: 40 00 1e 90 call 2019b40 <== NOT EXECUTED 2012104: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2012108: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 201210c: 12 80 00 08 bne 201212c <== NOT EXECUTED 2012110: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2012114: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2012118: 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; 201211c: 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; 2012120: 10 80 00 03 b 201212c <== NOT EXECUTED 2012124: 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; 2012128: 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; } 201212c: 81 c7 e0 08 ret 2012130: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020124b0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20124b0: 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; 20124b4: 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; 20124b8: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20124bc: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20124c0: 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 ) 20124c4: 80 a6 e0 00 cmp %i3, 0 20124c8: 02 80 00 79 be 20126ac <== NEVER TAKEN 20124cc: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20124d0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20124d4: 80 a6 80 01 cmp %i2, %g1 20124d8: 18 80 00 09 bgu 20124fc <== NEVER TAKEN 20124dc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 20124e0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 20124e4: 80 a6 c0 01 cmp %i3, %g1 20124e8: 18 80 00 05 bgu 20124fc <== NEVER TAKEN 20124ec: 82 20 40 1b sub %g1, %i3, %g1 20124f0: 80 a6 80 01 cmp %i2, %g1 20124f4: 08 80 00 07 bleu 2012510 <== ALWAYS TAKEN 20124f8: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 20124fc: 40 00 23 b4 call 201b3cc <__errno> <== NOT EXECUTED 2012500: 01 00 00 00 nop <== NOT EXECUTED 2012504: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012508: 10 80 00 68 b 20126a8 <== NOT EXECUTED 201250c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2012510: 90 10 00 18 mov %i0, %o0 2012514: 92 10 00 19 mov %i1, %o1 2012518: 94 10 00 11 mov %l1, %o2 201251c: 7f ff ff 69 call 20122c0 2012520: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012524: 80 a2 20 00 cmp %o0, 0 2012528: 12 80 00 61 bne 20126ac <== NEVER TAKEN 201252c: 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)) 2012530: 80 a0 40 11 cmp %g1, %l1 2012534: 32 80 00 02 bne,a 201253c <== NEVER TAKEN 2012538: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201253c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012540: 80 a0 60 01 cmp %g1, 1 2012544: 32 80 00 1c bne,a 20125b4 2012548: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 201254c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012550: 80 a0 60 00 cmp %g1, 0 2012554: 32 80 00 18 bne,a 20125b4 <== NEVER TAKEN 2012558: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201255c: 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)) && 2012560: 80 88 60 03 btst 3, %g1 2012564: 22 80 00 14 be,a 20125b4 <== NEVER TAKEN 2012568: 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); 201256c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2012570: 7f ff fd a9 call 2011c14 2012574: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (start >> fs_info->vol.sec_log2); 2012578: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 201257c: 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); 2012580: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2012584: 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); 2012588: 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); 201258c: 94 0e 80 0a and %i2, %o2, %o2 2012590: 90 10 00 1d mov %i5, %o0 2012594: 96 10 00 1b mov %i3, %o3 2012598: 40 00 01 d9 call 2012cfc <_fat_block_write> 201259c: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20125a0: 80 a2 20 00 cmp %o0, 0 20125a4: 16 80 00 42 bge 20126ac <== ALWAYS TAKEN 20125a8: 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; 20125ac: 10 80 00 40 b 20126ac <== NOT EXECUTED 20125b0: 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); 20125b4: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20125b8: 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); 20125bc: a6 07 bf f8 add %fp, -8, %l3 20125c0: 90 10 00 1d mov %i5, %o0 20125c4: 92 10 00 19 mov %i1, %o1 20125c8: 94 10 00 12 mov %l2, %o2 20125cc: 7f ff fd 6c call 2011b7c 20125d0: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 20125d4: 90 92 60 00 orcc %o1, 0, %o0 20125d8: 12 80 00 35 bne 20126ac <== NEVER TAKEN 20125dc: 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); 20125e0: a3 34 60 10 srl %l1, 0x10, %l1 20125e4: a2 04 7f ff add %l1, -1, %l1 20125e8: a8 10 20 00 clr %l4 20125ec: b4 0e 80 11 and %i2, %l1, %i2 20125f0: a2 10 20 00 clr %l1 20125f4: 10 80 00 21 b 2012678 20125f8: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 20125fc: b0 26 00 15 sub %i0, %l5, %i0 2012600: 80 a6 00 1b cmp %i0, %i3 2012604: 38 80 00 02 bgu,a 201260c 2012608: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 201260c: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012610: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2012614: 7f ff fd 80 call 2011c14 2012618: f0 27 bf fc st %i0, [ %fp + -4 ] sec += (ofs >> fs_info->vol.sec_log2); 201261c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012620: 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); 2012624: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2012628: 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); 201262c: 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); 2012630: 94 0d 40 0a and %l5, %o2, %o2 2012634: 90 10 00 1d mov %i5, %o0 2012638: 96 10 00 18 mov %i0, %o3 201263c: 40 00 01 b0 call 2012cfc <_fat_block_write> 2012640: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2012644: 80 a2 20 00 cmp %o0, 0 2012648: 06 80 00 18 bl 20126a8 <== NEVER TAKEN 201264c: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2012650: 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; 2012654: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 2012658: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 201265c: 90 10 00 1d mov %i5, %o0 2012660: 92 10 00 14 mov %l4, %o1 2012664: 40 00 1c c7 call 2019980 2012668: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 201266c: 80 a2 20 00 cmp %o0, 0 2012670: 12 80 00 0f bne 20126ac <== NEVER TAKEN 2012674: 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) 2012678: 80 a6 e0 00 cmp %i3, 0 201267c: 32 bf ff e0 bne,a 20125fc 2012680: 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); 2012684: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2012688: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 201268c: 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); 2012690: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 2012694: 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); 2012698: 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 + 201269c: 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; 20126a0: 10 80 00 03 b 20126ac 20126a4: 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; 20126a8: 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; } 20126ac: 81 c7 e0 08 ret 20126b0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02019dfc : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019dfc: 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; 2019e00: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019e04: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019e08: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 2019e0c: 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; 2019e10: 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) 2019e14: 10 80 00 19 b 2019e78 2019e18: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2019e1c: 92 10 00 1a mov %i2, %o1 2019e20: 7f ff fe d8 call 2019980 2019e24: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019e28: b0 92 20 00 orcc %o0, 0, %i0 2019e2c: 02 80 00 0b be 2019e58 <== ALWAYS TAKEN 2019e30: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2019e34: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 2019e38: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2019e3c: 02 80 00 03 be 2019e48 <== NOT EXECUTED 2019e40: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 2019e44: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019e48: 7f ff e3 31 call 2012b0c <== NOT EXECUTED 2019e4c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 2019e50: 81 c7 e0 08 ret <== NOT EXECUTED 2019e54: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2019e58: 92 10 00 1a mov %i2, %o1 2019e5c: 7f ff ff 39 call 2019b40 2019e60: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2019e64: 80 a2 20 00 cmp %o0, 0 2019e68: 32 80 00 02 bne,a 2019e70 <== NEVER TAKEN 2019e6c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 2019e70: 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++; 2019e74: 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) 2019e78: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2019e7c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2019e80: 84 0e 80 02 and %i2, %g2, %g2 2019e84: 80 a0 80 01 cmp %g2, %g1 2019e88: 0a bf ff e5 bcs 2019e1c 2019e8c: 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) 2019e90: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 2019e94: 80 a0 7f ff cmp %g1, -1 2019e98: 02 80 00 04 be 2019ea8 <== ALWAYS TAKEN 2019e9c: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 2019ea0: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 2019ea4: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019ea8: 90 10 00 1c mov %i4, %o0 2019eac: 7f ff e3 18 call 2012b0c 2019eb0: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2019eb4: 81 c7 e0 08 ret 2019eb8: 81 e8 00 00 restore =============================================================================== 02012f8c : 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; 2012f8c: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2012f90: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2012f94: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 2012f98: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 2012f9c: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 2012fa0: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2012fa4: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2012fa8: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 2012fac: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 2012fb0: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 2012fb4: 81 c3 e0 08 retl <== NOT EXECUTED 2012fb8: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 02019980 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 2019980: 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; 2019984: 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)) ) 2019988: 80 a6 60 01 cmp %i1, 1 201998c: 08 80 00 64 bleu 2019b1c <== NEVER TAKEN 2019990: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 2019994: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2019998: 82 00 60 01 inc %g1 201999c: 80 a6 40 01 cmp %i1, %g1 20199a0: 18 80 00 5f bgu 2019b1c <== NEVER TAKEN 20199a4: 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) + 20199a8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 20199ac: b7 36 60 01 srl %i1, 1, %i3 20199b0: 84 88 60 01 andcc %g1, 1, %g2 20199b4: 12 80 00 06 bne 20199cc <== ALWAYS TAKEN 20199b8: b6 06 c0 19 add %i3, %i1, %i3 20199bc: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20199c0: 02 80 00 03 be 20199cc <== NOT EXECUTED 20199c4: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 20199c8: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 20199cc: 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); 20199d0: 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) + 20199d4: b7 36 c0 03 srl %i3, %g3, %i3 20199d8: 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); 20199dc: b8 07 00 19 add %i4, %i1, %i4 20199e0: 80 a0 a0 00 cmp %g2, 0 20199e4: 12 80 00 06 bne 20199fc <== ALWAYS TAKEN 20199e8: b6 06 c0 03 add %i3, %g3, %i3 20199ec: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20199f0: 02 80 00 03 be 20199fc <== NOT EXECUTED 20199f4: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 20199f8: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 20199fc: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2019a00: 90 10 00 1d mov %i5, %o0 2019a04: 92 10 00 1b mov %i3, %o1 2019a08: 94 10 20 01 mov 1, %o2 2019a0c: 7f ff e3 c1 call 2012910 2019a10: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2019a14: b0 92 20 00 orcc %o0, 0, %i0 2019a18: 12 80 00 38 bne 2019af8 <== NEVER TAKEN 2019a1c: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 2019a20: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2019a24: 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); 2019a28: a1 34 20 10 srl %l0, 0x10, %l0 2019a2c: 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 ) 2019a30: 02 80 00 27 be 2019acc <== NEVER TAKEN 2019a34: b8 0f 00 10 and %i4, %l0, %i4 2019a38: 80 a0 60 04 cmp %g1, 4 2019a3c: 02 80 00 31 be 2019b00 <== NEVER TAKEN 2019a40: 80 a0 60 01 cmp %g1, 1 2019a44: 12 80 00 36 bne 2019b1c <== NEVER TAKEN 2019a48: 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) ) 2019a4c: 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))); 2019a50: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2019a54: 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))); 2019a58: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 2019a5c: 80 a7 00 03 cmp %i4, %g3 2019a60: 12 80 00 0f bne 2019a9c <== ALWAYS TAKEN 2019a64: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019a68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019a6c: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019a70: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019a74: 7f ff e3 a7 call 2012910 <== NOT EXECUTED 2019a78: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019a7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2019a80: 12 80 00 2d bne 2019b34 <== NOT EXECUTED 2019a84: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 2019a88: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 2019a8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 2019a90: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 2019a94: 10 80 00 05 b 2019aa8 <== NOT EXECUTED 2019a98: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 2019a9c: b8 00 80 1c add %g2, %i4, %i4 2019aa0: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 2019aa4: 85 28 a0 08 sll %g2, 8, %g2 2019aa8: 82 10 80 01 or %g2, %g1, %g1 2019aac: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2019ab0: 80 8e 60 01 btst 1, %i1 2019ab4: 02 80 00 04 be 2019ac4 2019ab8: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 2019abc: 10 80 00 0e b 2019af4 2019ac0: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2019ac4: 10 80 00 0c b 2019af4 2019ac8: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 2019acc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019ad0: 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)); 2019ad4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019ad8: 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)); 2019adc: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019ae0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2019ae4: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2019ae8: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2019aec: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2019af0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2019af4: c2 26 80 00 st %g1, [ %i2 ] break; 2019af8: 81 c7 e0 08 ret 2019afc: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 2019b00: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019b04: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 2019b08: 7f ff ff 92 call 2019950 <== NOT EXECUTED 2019b0c: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 2019b10: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 2019b14: 81 c7 e0 08 ret <== NOT EXECUTED 2019b18: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 2019b1c: 40 00 06 2c call 201b3cc <__errno> <== NOT EXECUTED 2019b20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019b24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019b28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019b2c: 81 c7 e0 08 ret <== NOT EXECUTED 2019b30: 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) 2019b34: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2019b38: 81 c7 e0 08 ret <== NOT EXECUTED 2019b3c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012ebc : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2012ebc: 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)) 2012ec0: 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; 2012ec4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2012ec8: 10 80 00 2a b 2012f70 <== NOT EXECUTED 2012ecc: 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)) 2012ed0: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2012ed4: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2012ed8: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2012edc: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2012ee0: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2012ee4: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2012ee8: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2012eec: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2012ef0: 12 80 00 0a bne 2012f18 <== NOT EXECUTED 2012ef4: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2012ef8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2012efc: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2012f00: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2012f04: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2012f08: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2012f0c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012f10: 81 c7 e0 08 ret <== NOT EXECUTED 2012f14: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2012f18: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2012f1c: 0a 80 00 03 bcs 2012f28 <== NOT EXECUTED 2012f20: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2012f24: 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++) 2012f28: 92 02 60 01 inc %o1 <== NOT EXECUTED 2012f2c: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2012f30: 32 bf ff e8 bne,a 2012ed0 <== NOT EXECUTED 2012f34: 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)) 2012f38: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012f3c: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2012f40: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2012f44: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2012f48: 1a 80 00 0d bcc 2012f7c <== NOT EXECUTED 2012f4c: 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); 2012f50: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 2012f54: 7f ff d0 4f call 2007090 <== NOT EXECUTED 2012f58: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2012f5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012f60: 02 80 00 09 be 2012f84 <== NOT EXECUTED 2012f64: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2012f68: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED 2012f6c: 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++) 2012f70: f0 07 60 78 ld [ %i5 + 0x78 ], %i0 <== NOT EXECUTED 2012f74: 10 bf ff ee b 2012f2c <== NOT EXECUTED 2012f78: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2012f7c: 81 c7 e0 08 ret <== NOT EXECUTED 2012f80: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2012f84: 81 c7 e0 08 ret <== NOT EXECUTED 2012f88: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02012e04 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2012e04: 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; 2012e08: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = start_cln; 2012e0c: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2012e10: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2012e14: 92 10 20 01 mov 1, %o1 2012e18: 7f ff ca 62 call 20057a0 2012e1c: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2012e20: b6 92 20 00 orcc %o0, 0, %i3 2012e24: 12 80 00 1b bne 2012e90 <== ALWAYS TAKEN 2012e28: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2012e2c: 40 00 21 68 call 201b3cc <__errno> <== NOT EXECUTED 2012e30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012e34: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012e38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012e3c: 81 c7 e0 08 ret <== NOT EXECUTED 2012e40: 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); 2012e44: 7f ff ff e4 call 2012dd4 2012e48: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2012e4c: 80 a2 3f ff cmp %o0, -1 2012e50: 12 80 00 06 bne 2012e68 <== ALWAYS TAKEN 2012e54: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012e58: 7f ff cb 85 call 2005c6c <== NOT EXECUTED 2012e5c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2012e60: 81 c7 e0 08 ret <== NOT EXECUTED 2012e64: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012e68: 90 10 00 1c mov %i4, %o0 2012e6c: 40 00 1a c5 call 2019980 2012e70: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012e74: b0 92 20 00 orcc %o0, 0, %i0 2012e78: 02 80 00 06 be 2012e90 <== ALWAYS TAKEN 2012e7c: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012e80: 7f ff cb 7b call 2005c6c <== NOT EXECUTED 2012e84: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2012e88: 81 c7 e0 08 ret <== NOT EXECUTED 2012e8c: 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) 2012e90: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2012e94: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2012e98: 84 0a 40 02 and %o1, %g2, %g2 2012e9c: 80 a0 80 01 cmp %g2, %g1 2012ea0: 0a bf ff e9 bcs 2012e44 2012ea4: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2012ea8: 90 10 00 1b mov %i3, %o0 2012eac: 7f ff cb 70 call 2005c6c 2012eb0: b0 10 20 00 clr %i0 return rc; } 2012eb4: 81 c7 e0 08 ret 2012eb8: 81 e8 00 00 restore =============================================================================== 02013158 : * 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) { 2013158: 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); 201315c: 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; 2013160: 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) { 2013164: 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; 2013168: c0 27 bf fc clr [ %fp + -4 ] rc = stat(mt_entry->dev, &stat_buf); 201316c: 7f ff d0 6b call 2007318 2013170: 92 07 bf a8 add %fp, -88, %o1 if (rc == -1) 2013174: 80 a2 3f ff cmp %o0, -1 2013178: 02 80 01 68 be 2013718 <== NEVER TAKEN 201317c: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2013180: c4 07 bf b4 ld [ %fp + -76 ], %g2 2013184: 03 00 00 3c sethi %hi(0xf000), %g1 2013188: 84 08 80 01 and %g2, %g1, %g2 201318c: 03 00 00 18 sethi %hi(0x6000), %g1 2013190: 80 a0 80 01 cmp %g2, %g1 2013194: 02 80 00 06 be 20131ac <== ALWAYS TAKEN 2013198: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); 201319c: 40 00 20 8c call 201b3cc <__errno> <== NOT EXECUTED 20131a0: 01 00 00 00 nop <== NOT EXECUTED 20131a4: 10 80 01 ab b 2013850 <== NOT EXECUTED 20131a8: 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); 20131ac: 7f ff c6 ee call 2004d64 20131b0: d0 1f bf c0 ldd [ %fp + -64 ], %o0 if (vol->dd == NULL) 20131b4: 80 a2 20 00 cmp %o0, 0 20131b8: 02 80 00 3e be 20132b0 <== NEVER TAKEN 20131bc: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 20131c0: 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); 20131c4: 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; 20131c8: 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); 20131cc: 7f ff f7 89 call 2010ff0 20131d0: 96 07 bf fc add %fp, -4, %o3 if (sc != RTEMS_SUCCESSFUL) 20131d4: 80 a2 20 00 cmp %o0, 0 20131d8: 12 80 00 34 bne 20132a8 <== NEVER TAKEN 20131dc: 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); 20131e0: d0 07 bf fc ld [ %fp + -4 ], %o0 20131e4: de 02 20 24 ld [ %o0 + 0x24 ], %o7 20131e8: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 20131ec: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 20131f0: d6 2f bf 99 stb %o3, [ %fp + -103 ] 20131f4: d6 0b e0 23 ldub [ %o7 + 0x23 ], %o3 20131f8: f4 2f bf 9a stb %i2, [ %fp + -102 ] 20131fc: d6 2f bf 97 stb %o3, [ %fp + -105 ] 2013200: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 2013204: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 2013208: d6 2f bf 9d stb %o3, [ %fp + -99 ] 201320c: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 2013210: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 2013214: d6 2f bf 9c stb %o3, [ %fp + -100 ] 2013218: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 201321c: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 2013220: d6 2f bf 9b stb %o3, [ %fp + -101 ] 2013224: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 2013228: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 201322c: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 2013230: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2013234: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 2013238: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 201323c: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 2013240: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2013244: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 2013248: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 201324c: f0 0b e0 22 ldub [ %o7 + 0x22 ], %i0 2013250: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 2013254: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 2013258: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 201325c: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2013260: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 2013264: d6 2f bf a7 stb %o3, [ %fp + -89 ] 2013268: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 201326c: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 2013270: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 2013274: c2 27 bf 8c st %g1, [ %fp + -116 ] 2013278: c4 3f bf 80 std %g2, [ %fp + -128 ] 201327c: c8 27 bf 7c st %g4, [ %fp + -132 ] 2013280: 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); 2013284: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 2013288: 7f ff f7 f4 call 2011258 201328c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2013290: c2 07 bf 8c ld [ %fp + -116 ], %g1 2013294: 80 a2 20 00 cmp %o0, 0 2013298: c4 1f bf 80 ldd [ %fp + -128 ], %g2 201329c: c8 07 bf 7c ld [ %fp + -132 ], %g4 20132a0: 02 80 00 08 be 20132c0 <== ALWAYS TAKEN 20132a4: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { rtems_disk_release(vol->dd); 20132a8: 7f ff c6 ce call 2004de0 <== NOT EXECUTED 20132ac: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20132b0: 40 00 20 47 call 201b3cc <__errno> <== NOT EXECUTED 20132b4: 01 00 00 00 nop <== NOT EXECUTED 20132b8: 10 80 01 66 b 2013850 <== NOT EXECUTED 20132bc: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20132c0: 98 0b 20 ff and %o4, 0xff, %o4 20132c4: 9a 0b 60 ff and %o5, 0xff, %o5 20132c8: 99 2b 20 08 sll %o4, 8, %o4 20132cc: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 20132d0: 9f 2b 60 10 sll %o5, 0x10, %o7 20132d4: 9f 33 e0 10 srl %o7, 0x10, %o7 20132d8: 80 a3 e4 00 cmp %o7, 0x400 20132dc: 02 80 00 0b be 2013308 <== NEVER TAKEN 20132e0: da 37 40 00 sth %o5, [ %i5 ] 20132e4: 80 a3 e2 00 cmp %o7, 0x200 20132e8: 22 80 00 09 be,a 201330c <== ALWAYS TAKEN 20132ec: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 20132f0: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 20132f4: 02 80 00 05 be 2013308 <== NOT EXECUTED 20132f8: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 20132fc: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 2013300: 12 80 00 d2 bne 2013648 <== NOT EXECUTED 2013304: 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; 2013308: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 201330c: c0 2f 60 03 clrb [ %i5 + 3 ] 2013310: 10 80 00 05 b 2013324 2013314: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 2013318: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 201331c: 98 03 20 01 inc %o4 <== NOT EXECUTED 2013320: 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; 2013324: 80 8b e0 01 btst 1, %o7 2013328: 22 bf ff fc be,a 2013318 <== NEVER TAKEN 201332c: 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; 2013330: 9b 2b 60 10 sll %o5, 0x10, %o5 2013334: c0 2f 60 02 clrb [ %i5 + 2 ] 2013338: 93 33 60 10 srl %o5, 0x10, %o1 201333c: 10 80 00 05 b 2013350 2013340: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 2013344: 9f 3b e0 01 sra %o7, 1, %o7 2013348: 9a 03 60 01 inc %o5 201334c: 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; 2013350: 80 8b e0 01 btst 1, %o7 2013354: 22 bf ff fc be,a 2013344 2013358: 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) 201335c: 9a 8e e0 ff andcc %i3, 0xff, %o5 2013360: 02 80 00 ba be 2013648 <== NEVER TAKEN 2013364: 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; 2013368: 10 80 00 05 b 201337c 201336c: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 2013370: 9e 03 e0 01 inc %o7 2013374: 9b 3b 60 01 sra %o5, 1, %o5 2013378: 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; 201337c: 80 8b 60 01 btst 1, %o5 2013380: 02 bf ff fc be 2013370 2013384: 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) 2013388: 9f 2a 40 0f sll %o1, %o7, %o7 201338c: de 37 60 06 sth %o7, [ %i5 + 6 ] 2013390: 1b 00 00 20 sethi %hi(0x8000), %o5 2013394: 9f 2b e0 10 sll %o7, 0x10, %o7 2013398: 9f 33 e0 10 srl %o7, 0x10, %o7 201339c: 80 a3 c0 0d cmp %o7, %o5 20133a0: 18 80 00 aa bgu 2013648 <== NEVER TAKEN 20133a4: 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; 20133a8: 10 80 00 05 b 20133bc 20133ac: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 20133b0: 9f 3b e0 01 sra %o7, 1, %o7 20133b4: 9a 03 60 01 inc %o5 20133b8: 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; 20133bc: 80 8b e0 01 btst 1, %o7 20133c0: 22 bf ff fc be,a 20133b0 20133c4: 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); 20133c8: 84 08 a0 ff and %g2, 0xff, %g2 20133cc: 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); 20133d0: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20133d4: 88 09 20 ff and %g4, 0xff, %g4 20133d8: 86 08 e0 ff and %g3, 0xff, %g3 20133dc: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133e0: 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); 20133e4: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133e8: 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); 20133ec: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133f0: 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)) / 20133f4: 84 02 7f ff add %o1, -1, %g2 20133f8: 83 28 60 10 sll %g1, 0x10, %g1 20133fc: c6 27 bf 84 st %g3, [ %fp + -124 ] 2013400: 91 30 60 0b srl %g1, 0xb, %o0 2013404: 40 00 52 da call 2027f6c <.div> 2013408: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 201340c: 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)) / 2013410: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013414: 85 2a 00 02 sll %o0, %g2, %g2 2013418: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 201341c: c4 0f bf 99 ldub [ %fp + -103 ], %g2 2013420: ae 0d e0 ff and %l7, 0xff, %l7 2013424: 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)) / 2013428: 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) 201342c: ae 10 80 17 or %g2, %l7, %l7 2013430: af 2d e0 10 sll %l7, 0x10, %l7 2013434: 80 a5 e0 00 cmp %l7, 0 2013438: 02 80 00 05 be 201344c <== NEVER TAKEN 201343c: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2013440: af 35 e0 10 srl %l7, 0x10, %l7 2013444: 10 80 00 0c b 2013474 2013448: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 201344c: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2013450: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2013454: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 2013458: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 201345c: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2013460: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 2013464: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 2013468: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 201346c: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 2013470: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2013474: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013478: 87 28 e0 10 sll %g3, 0x10, %g3 201347c: c2 27 bf 8c st %g1, [ %fp + -116 ] 2013480: a7 30 e0 10 srl %g3, 0x10, %l3 2013484: 40 00 52 7e call 2027e7c <.umul> 2013488: 90 0e 60 ff and %i1, 0xff, %o0 201348c: c2 07 bf 8c ld [ %fp + -116 ], %g1 2013490: 90 04 c0 08 add %l3, %o0, %o0 2013494: 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; 2013498: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 201349c: a4 0c a0 ff and %l2, 0xff, %l2 20134a0: a2 0c 60 ff and %l1, 0xff, %l1 20134a4: a5 2c a0 08 sll %l2, 8, %l2 20134a8: a2 14 80 11 or %l2, %l1, %l1 20134ac: a3 2c 60 10 sll %l1, 0x10, %l1 20134b0: 80 a4 60 00 cmp %l1, 0 20134b4: 02 80 00 05 be 20134c8 <== NEVER TAKEN 20134b8: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20134bc: a3 34 60 10 srl %l1, 0x10, %l1 20134c0: 10 80 00 0d b 20134f4 20134c4: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 20134c8: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 20134cc: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 20134d0: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 20134d4: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 20134d8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20134dc: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED 20134e0: 84 10 80 18 or %g2, %i0, %g2 <== NOT EXECUTED 20134e4: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20134e8: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 20134ec: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20134f0: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 20134f4: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 20134f8: 92 0e e0 ff and %i3, 0xff, %o1 20134fc: 40 00 52 9a call 2027f64 <.udiv> 2013500: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2013504: 80 a2 2f f4 cmp %o0, 0xff4 2013508: 18 80 00 08 bgu 2013528 <== NEVER TAKEN 201350c: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2013510: 82 10 20 01 mov 1, %g1 2013514: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2013518: 82 10 2f ff mov 0xfff, %g1 201351c: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2013520: 10 80 00 0f b 201355c 2013524: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2013528: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 201352c: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2013530: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2013534: 38 80 00 05 bgu,a 2013548 <== NOT EXECUTED 2013538: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 201353c: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2013540: 10 80 00 04 b 2013550 <== NOT EXECUTED 2013544: 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; 2013548: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 201354c: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 2013550: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013554: 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; 2013558: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 201355c: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 2013560: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2013564: 80 a0 60 04 cmp %g1, 4 2013568: 12 80 00 6e bne 2013720 <== ALWAYS TAKEN 201356c: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2013570: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 2013574: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 2013578: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 201357c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013580: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 2013584: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2013588: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 201358c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013590: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 2013594: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013598: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 201359c: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 20135a0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 20135a4: 02 80 00 05 be 20135b8 <== NOT EXECUTED 20135a8: 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; 20135ac: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 20135b0: 10 80 00 03 b 20135bc <== NOT EXECUTED 20135b4: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 20135b8: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 20135bc: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 20135c0: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 20135c4: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 20135c8: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 20135cc: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 20135d0: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 20135d4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 20135d8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20135dc: 02 80 00 1b be 2013648 <== NOT EXECUTED 20135e0: 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, 20135e4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20135e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 20135ec: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20135f0: 7f ff fd a1 call 2012c74 <_fat_block_read> <== NOT EXECUTED 20135f4: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 20135f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20135fc: 06 80 00 23 bl 2013688 <== NOT EXECUTED 2013600: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2013604: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 2013608: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 201360c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013610: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013614: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013618: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 201361c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013620: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 2013624: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2013628: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 201362c: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2013630: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2013634: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2013638: 22 80 00 0a be,a 2013660 <== NOT EXECUTED 201363c: 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); 2013640: 7f ff fd 33 call 2012b0c <== NOT EXECUTED 2013644: 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); 2013648: 7f ff c5 e6 call 2004de0 <== NOT EXECUTED 201364c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2013650: 40 00 1f 5f call 201b3cc <__errno> <== NOT EXECUTED 2013654: 01 00 00 00 nop <== NOT EXECUTED 2013658: 10 80 00 7e b 2013850 <== NOT EXECUTED 201365c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2013660: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2013664: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 2013668: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 201366c: 7f ff fd 82 call 2012c74 <_fat_block_read> <== NOT EXECUTED 2013670: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2013674: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013678: 16 80 00 08 bge 2013698 <== NOT EXECUTED 201367c: 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); 2013680: 7f ff fd 23 call 2012b0c <== NOT EXECUTED 2013684: 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); 2013688: 7f ff c5 d6 call 2004de0 <== NOT EXECUTED 201368c: 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 ); 2013690: 81 c7 e0 08 ret <== NOT EXECUTED 2013694: 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); 2013698: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 201369c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20136a0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20136a4: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20136a8: 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, 20136ac: 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); 20136b0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136b4: 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, 20136b8: 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); 20136bc: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20136c0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20136c4: 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); 20136c8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20136cc: c2 0f bf fa ldub [ %fp + -6 ], %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 f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20136e0: 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); 20136e4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136e8: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 20136ec: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20136f0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20136f4: 7f ff fe 37 call 2012fd0 <== NOT EXECUTED 20136f8: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 20136fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2013700: 02 80 00 0d be 2013734 <== NOT EXECUTED 2013704: 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); 2013708: 7f ff fd 01 call 2012b0c <== NOT EXECUTED 201370c: 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); 2013710: 7f ff c5 b4 call 2004de0 <== NOT EXECUTED 2013714: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 2013718: 81 c7 e0 08 ret 201371c: 81 e8 00 00 restore } } } else { vol->rdir_cl = 0; 2013720: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2013724: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2013728: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 201372c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2013730: 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); 2013734: 7f ff fc f6 call 2012b0c 2013738: 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; 201373c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013740: 40 00 51 cf call 2027e7c <.umul> 2013744: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2013748: 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)); 201374c: 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; 2013750: 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)); 2013754: 90 10 20 02 mov 2, %o0 2013758: 7f ff c8 12 call 20057a0 201375c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2013760: 80 a2 20 00 cmp %o0, 0 2013764: 02 80 00 12 be 20137ac <== NEVER TAKEN 2013768: 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 ); 201376c: 82 02 20 04 add %o0, 4, %g1 2013770: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2013774: 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 ); 2013778: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 201377c: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2013780: 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; 2013784: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 2013788: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 201378c: 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)); 2013790: 92 10 20 0c mov 0xc, %o1 2013794: 7f ff c8 03 call 20057a0 2013798: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 201379c: 80 a2 20 00 cmp %o0, 0 20137a0: 12 80 00 06 bne 20137b8 <== ALWAYS TAKEN 20137a4: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 20137a8: 30 80 00 1c b,a 2013818 <== 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); 20137ac: 7f ff c5 8d call 2004de0 <== NOT EXECUTED 20137b0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20137b4: 30 80 00 24 b,a 2013844 <== 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 ); 20137b8: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 20137bc: 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 ); 20137c0: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20137c4: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20137c8: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 20137cc: 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; 20137d0: 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 ); 20137d4: 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; 20137d8: 82 10 21 00 mov 0x100, %g1 head->next = tail; 20137dc: c4 22 20 0c st %g2, [ %o0 + 0xc ] 20137e0: c2 27 60 78 st %g1, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20137e4: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 20137e8: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 20137ec: 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; 20137f0: 83 28 80 01 sll %g2, %g1, %g1 20137f4: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20137f8: 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; 20137fc: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013800: 7f ff c7 e8 call 20057a0 2013804: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2013808: 80 a2 20 00 cmp %o0, 0 201380c: 12 80 00 14 bne 201385c <== ALWAYS TAKEN 2013810: d0 27 60 70 st %o0, [ %i5 + 0x70 ] 2013814: 30 80 00 05 b,a 2013828 <== 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); 2013818: 7f ff c5 72 call 2004de0 <== NOT EXECUTED 201381c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013820: 10 80 00 07 b 201383c <== NOT EXECUTED 2013824: 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); 2013828: 7f ff c5 6e call 2004de0 <== NOT EXECUTED 201382c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013830: 7f ff c9 0f call 2005c6c <== NOT EXECUTED 2013834: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013838: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 201383c: 7f ff c9 0c call 2005c6c <== NOT EXECUTED 2013840: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013844: 40 00 1e e2 call 201b3cc <__errno> <== NOT EXECUTED 2013848: 01 00 00 00 nop <== NOT EXECUTED 201384c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2013850: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2013854: 81 c7 e0 08 ret <== NOT EXECUTED 2013858: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 201385c: d0 17 40 00 lduh [ %i5 ], %o0 2013860: 7f ff c7 d0 call 20057a0 2013864: 92 10 20 01 mov 1, %o1 2013868: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 201386c: 80 a2 20 00 cmp %o0, 0 2013870: 12 bf ff aa bne 2013718 <== ALWAYS TAKEN 2013874: b0 10 20 00 clr %i0 { rtems_disk_release(vol->dd); 2013878: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 201387c: 7f ff c5 59 call 2004de0 <== NOT EXECUTED 2013880: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2013884: 7f ff c8 fa call 2005c6c <== NOT EXECUTED 2013888: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 201388c: 7f ff c8 f8 call 2005c6c <== NOT EXECUTED 2013890: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013894: 7f ff c8 f6 call 2005c6c <== NOT EXECUTED 2013898: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 201389c: 40 00 1e cc call 201b3cc <__errno> <== NOT EXECUTED 20138a0: 01 00 00 00 nop <== NOT EXECUTED 20138a4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20138a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 20138ac: 81 c7 e0 08 ret <== NOT EXECUTED 20138b0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019ebc : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019ebc: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019ec0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 2019ec4: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2019ec8: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 2019ecc: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019ed0: 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; 2019ed4: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 2019ed8: 80 a6 a0 00 cmp %i2, 0 2019edc: 02 80 00 16 be 2019f34 <== NEVER TAKEN 2019ee0: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2019ee4: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 2019ee8: 80 a4 3f ff cmp %l0, -1 2019eec: 22 80 00 02 be,a 2019ef4 2019ef0: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 2019ef4: a6 10 20 02 mov 2, %l3 2019ef8: 10 80 00 55 b 201a04c 2019efc: 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); 2019f00: 92 10 00 10 mov %l0, %o1 2019f04: 7f ff fe 9f call 2019980 2019f08: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019f0c: b0 92 20 00 orcc %o0, 0, %i0 2019f10: 02 80 00 0b be 2019f3c <== ALWAYS TAKEN 2019f14: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 2019f18: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2019f1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2019f20: 02 80 00 5b be 201a08c <== NOT EXECUTED 2019f24: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019f28: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019f2c: 7f ff ff b4 call 2019dfc <== NOT EXECUTED 2019f30: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019f34: 81 c7 e0 08 ret <== NOT EXECUTED 2019f38: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 2019f3c: 80 a0 60 00 cmp %g1, 0 2019f40: 32 80 00 3f bne,a 201a03c 2019f44: 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) 2019f48: c2 06 c0 00 ld [ %i3 ], %g1 2019f4c: 80 a0 60 00 cmp %g1, 0 2019f50: 12 80 00 0b bne 2019f7c <== NEVER TAKEN 2019f54: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 2019f58: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2019f5c: 92 10 00 10 mov %l0, %o1 2019f60: 7f ff fe f8 call 2019b40 2019f64: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2019f68: 80 a2 20 00 cmp %o0, 0 2019f6c: 22 80 00 22 be,a 2019ff4 <== ALWAYS TAKEN 2019f70: 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); 2019f74: 81 c7 e0 08 ret <== NOT EXECUTED 2019f78: 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); 2019f7c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019f80: 7f ff fe f0 call 2019b40 <== NOT EXECUTED 2019f84: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2019f88: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 2019f8c: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 2019f90: 02 80 00 07 be 2019fac <== NOT EXECUTED 2019f94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019f98: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019f9c: 7f ff ff 98 call 2019dfc <== NOT EXECUTED 2019fa0: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 2019fa4: 81 c7 e0 08 ret <== NOT EXECUTED 2019fa8: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 2019fac: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2019fb0: 7f ff fe e4 call 2019b40 <== NOT EXECUTED 2019fb4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2019fb8: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 2019fbc: 22 80 00 0e be,a 2019ff4 <== NOT EXECUTED 2019fc0: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019fc4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019fc8: 7f ff ff 8d call 2019dfc <== NOT EXECUTED 2019fcc: 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); 2019fd0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019fd4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2019fd8: 7f ff fe da call 2019b40 <== NOT EXECUTED 2019fdc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 2019fe0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2019fe4: 7f ff e2 ca call 2012b0c <== NOT EXECUTED 2019fe8: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 2019fec: 81 c7 e0 08 ret <== NOT EXECUTED 2019ff0: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 2019ff4: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 2019ff8: 80 a0 40 1a cmp %g1, %i2 2019ffc: 12 80 00 0e bne 201a034 <== NEVER TAKEN 201a000: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 201a004: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 201a008: 80 a0 7f ff cmp %g1, -1 201a00c: 02 80 00 05 be 201a020 <== ALWAYS TAKEN 201a010: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 201a014: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a018: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a01c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a020: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 201a024: 7f ff e2 ba call 2012b0c 201a028: 90 10 00 11 mov %l1, %o0 return rc; 201a02c: 81 c7 e0 08 ret 201a030: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 201a034: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201a038: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 201a03c: 80 a4 00 14 cmp %l0, %l4 201a040: 0a 80 00 03 bcs 201a04c <== ALWAYS TAKEN 201a044: a6 04 e0 01 inc %l3 cl4find = 2; 201a048: 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) 201a04c: 80 a4 c0 14 cmp %l3, %l4 201a050: 0a bf ff ac bcs 2019f00 <== ALWAYS TAKEN 201a054: 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) 201a058: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 201a05c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a060: 02 80 00 05 be 201a074 <== NOT EXECUTED 201a064: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201a068: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a06c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a070: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a074: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a078: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a07c: 7f ff e2 a4 call 2012b0c <== NOT EXECUTED 201a080: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201a084: 81 c7 e0 08 ret <== NOT EXECUTED 201a088: 81 e8 00 00 restore <== NOT EXECUTED } 201a08c: 81 c7 e0 08 ret <== NOT EXECUTED 201a090: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019b40 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2019b40: 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; 2019b44: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2019b48: 80 a6 60 01 cmp %i1, 1 2019b4c: 08 80 00 07 bleu 2019b68 <== NEVER TAKEN 2019b50: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 2019b54: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2019b58: 82 00 60 01 inc %g1 2019b5c: 80 a6 40 01 cmp %i1, %g1 2019b60: 28 80 00 08 bleu,a 2019b80 <== ALWAYS TAKEN 2019b64: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 2019b68: 40 00 06 19 call 201b3cc <__errno> <== NOT EXECUTED 2019b6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019b70: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019b74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019b78: 81 c7 e0 08 ret <== NOT EXECUTED 2019b7c: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2019b80: b7 36 60 01 srl %i1, 1, %i3 2019b84: 84 88 60 01 andcc %g1, 1, %g2 2019b88: 12 80 00 06 bne 2019ba0 <== ALWAYS TAKEN 2019b8c: b6 06 c0 19 add %i3, %i1, %i3 2019b90: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019b94: 02 80 00 03 be 2019ba0 <== NOT EXECUTED 2019b98: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 2019b9c: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2019ba0: 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); 2019ba4: 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) + 2019ba8: b7 36 c0 03 srl %i3, %g3, %i3 2019bac: 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); 2019bb0: b8 07 00 19 add %i4, %i1, %i4 2019bb4: 80 a0 a0 00 cmp %g2, 0 2019bb8: 12 80 00 06 bne 2019bd0 <== ALWAYS TAKEN 2019bbc: b6 06 c0 03 add %i3, %g3, %i3 2019bc0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019bc4: 02 80 00 03 be 2019bd0 <== NOT EXECUTED 2019bc8: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2019bcc: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2019bd0: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2019bd4: 90 10 00 1d mov %i5, %o0 2019bd8: 92 10 00 1b mov %i3, %o1 2019bdc: 94 10 20 01 mov 1, %o2 2019be0: 7f ff e3 4c call 2012910 2019be4: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2019be8: b0 92 20 00 orcc %o0, 0, %i0 2019bec: 12 bf ff e3 bne 2019b78 <== NEVER TAKEN 2019bf0: 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); 2019bf4: a1 34 20 10 srl %l0, 0x10, %l0 2019bf8: a0 04 3f ff add %l0, -1, %l0 2019bfc: 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 ) 2019c00: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 2019c04: 80 a7 20 02 cmp %i4, 2 2019c08: 02 80 00 5f be 2019d84 <== NEVER TAKEN 2019c0c: 80 a7 20 04 cmp %i4, 4 2019c10: 02 80 00 65 be 2019da4 <== NEVER TAKEN 2019c14: 80 a7 20 01 cmp %i4, 1 2019c18: 12 80 00 73 bne 2019de4 <== NEVER TAKEN 2019c1c: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2019c20: 02 80 00 29 be 2019cc4 2019c24: 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; 2019c28: 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)) = 2019c2c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019c30: 84 08 a0 0f and %g2, 0xf, %g2 2019c34: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019c38: 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)) = 2019c3c: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 2019c40: 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)) = 2019c44: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 2019c48: 84 10 c0 02 or %g3, %g2, %g2 2019c4c: 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) ) 2019c50: c2 17 40 00 lduh [ %i5 ], %g1 2019c54: 82 00 7f ff add %g1, -1, %g1 2019c58: 80 a4 00 01 cmp %l0, %g1 2019c5c: 12 80 00 11 bne 2019ca0 <== ALWAYS TAKEN 2019c60: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019c64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019c68: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019c6c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019c70: 7f ff e3 28 call 2012910 <== NOT EXECUTED 2019c74: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019c78: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019c7c: 12 bf ff bf bne 2019b78 <== NOT EXECUTED 2019c80: 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); 2019c84: 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; 2019c88: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2019c8c: 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; 2019c90: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019c94: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019c98: 10 80 00 27 b 2019d34 <== NOT EXECUTED 2019c9c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019ca0: c2 07 bf fc ld [ %fp + -4 ], %g1 2019ca4: a0 04 20 01 inc %l0 2019ca8: 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); 2019cac: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019cb0: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2019cb4: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2019cb8: 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))) | 2019cbc: 10 80 00 2d b 2019d70 2019cc0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019cc4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2019cc8: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019ccc: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019cd0: c2 07 bf fc ld [ %fp + -4 ], %g1 2019cd4: 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)) = 2019cd8: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019cdc: 84 16 80 02 or %i2, %g2, %g2 2019ce0: 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) ) 2019ce4: c2 17 40 00 lduh [ %i5 ], %g1 2019ce8: 82 00 7f ff add %g1, -1, %g1 2019cec: 80 a4 00 01 cmp %l0, %g1 2019cf0: 12 80 00 17 bne 2019d4c <== ALWAYS TAKEN 2019cf4: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019cf8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019cfc: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019d00: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019d04: 7f ff e3 03 call 2012910 <== NOT EXECUTED 2019d08: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019d0c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019d10: 12 bf ff 9a bne 2019b78 <== NOT EXECUTED 2019d14: 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); 2019d18: 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; 2019d1c: 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)) = 2019d20: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019d24: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2019d28: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019d2c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019d30: 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)) = 2019d34: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019d38: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 2019d3c: 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; 2019d40: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] <== NOT EXECUTED 2019d44: 81 c7 e0 08 ret <== NOT EXECUTED 2019d48: 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; 2019d4c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d50: a0 04 20 01 inc %l0 2019d54: 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); 2019d58: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2019d5c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d60: 84 08 bf f0 and %g2, -16, %g2 2019d64: 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))) | 2019d68: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d6c: 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)) = 2019d70: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d74: b4 10 80 1a or %g2, %i2, %i2 2019d78: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 2019d7c: 81 c7 e0 08 ret 2019d80: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d84: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019d88: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019d90: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 2019d94: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2019d98: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d9c: 10 80 00 0e b 2019dd4 <== NOT EXECUTED 2019da0: 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)); 2019da4: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019da8: 7f ff fe ea call 2019950 <== NOT EXECUTED 2019dac: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019db0: 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)); 2019db4: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019db8: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED 2019dbc: 7f ff fe e5 call 2019950 <== NOT EXECUTED 2019dc0: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019dc4: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 2019dc8: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 2019dcc: 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)) = 2019dd0: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 2019dd4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2019dd8: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 2019ddc: 81 c7 e0 08 ret <== NOT EXECUTED 2019de0: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2019de4: 40 00 05 7a call 201b3cc <__errno> <== NOT EXECUTED 2019de8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019dec: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019df0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2019df4: 81 c7 e0 08 ret <== NOT EXECUTED 2019df8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013044 : * 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) { 2013044: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2013048: 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) { 201304c: 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) 2013050: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 2013054: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 2013058: 02 80 00 08 be 2013078 <== NOT EXECUTED 201305c: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2013060: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2013064: 7f ff ff db call 2012fd0 <== NOT EXECUTED 2013068: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 201306c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 2013070: 32 80 00 02 bne,a 2013078 <== NOT EXECUTED 2013074: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 2013078: 7f ff fe a5 call 2012b0c <== NOT EXECUTED 201307c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 2013080: 7f ff f9 35 call 2011554 <== NOT EXECUTED 2013084: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 2013088: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201308c: 32 80 00 02 bne,a 2013094 <== NOT EXECUTED 2013090: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 2013094: 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; 2013098: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 201309c: 10 80 00 04 b 20130ac <== NOT EXECUTED 20130a0: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20130a4: 7f ff ca f2 call 2005c6c <== NOT EXECUTED 20130a8: 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 ); 20130ac: 7f ff de 94 call 200aafc <_Chain_Get> <== NOT EXECUTED 20130b0: 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 ) 20130b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20130b8: 12 bf ff fb bne 20130a4 <== NOT EXECUTED 20130bc: 01 00 00 00 nop <== NOT EXECUTED 20130c0: 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++) 20130c4: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20130c8: 32 bf ff f5 bne,a 201309c <== NOT EXECUTED 20130cc: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED 20130d0: 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; 20130d4: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 20130d8: 10 80 00 04 b 20130e8 <== NOT EXECUTED 20130dc: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20130e0: 7f ff ca e3 call 2005c6c <== NOT EXECUTED 20130e4: 01 00 00 00 nop <== NOT EXECUTED 20130e8: 7f ff de 85 call 200aafc <_Chain_Get> <== NOT EXECUTED 20130ec: 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 ) 20130f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20130f4: 12 bf ff fb bne 20130e0 <== NOT EXECUTED 20130f8: 01 00 00 00 nop <== NOT EXECUTED 20130fc: 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++) 2013100: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 2013104: 32 bf ff f5 bne,a 20130d8 <== NOT EXECUTED 2013108: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 201310c: 7f ff ca d8 call 2005c6c <== NOT EXECUTED 2013110: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013114: 7f ff ca d6 call 2005c6c <== NOT EXECUTED 2013118: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 201311c: 7f ff ca d4 call 2005c6c <== NOT EXECUTED 2013120: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 2013124: 7f ff ca d2 call 2005c6c <== NOT EXECUTED 2013128: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 201312c: 7f ff c7 2d call 2004de0 <== NOT EXECUTED 2013130: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 2013134: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013138: 02 80 00 06 be 2013150 <== NOT EXECUTED 201313c: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 2013140: 40 00 20 a3 call 201b3cc <__errno> <== NOT EXECUTED 2013144: 01 00 00 00 nop <== NOT EXECUTED 2013148: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 201314c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2013150: 81 c7 e0 08 ret <== NOT EXECUTED 2013154: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 020191e0 : int fcntl( int fd, int cmd, ... ) { 20191e0: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 20191e4: 05 00 80 6f sethi %hi(0x201bc00), %g2 20191e8: c6 00 a0 f8 ld [ %g2 + 0xf8 ], %g3 ! 201bcf8 ... ) { int ret; va_list ap; va_start( ap, cmd ); 20191ec: 82 07 a0 4c add %fp, 0x4c, %g1 20191f0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 20191f4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20191f8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20191fc: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2019200: 80 a6 00 03 cmp %i0, %g3 2019204: 1a 80 00 0a bcc 201922c 2019208: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 201920c: 05 00 80 71 sethi %hi(0x201c400), %g2 2019210: c4 00 a3 54 ld [ %g2 + 0x354 ], %g2 ! 201c754 2019214: bb 2e 20 06 sll %i0, 6, %i5 2019218: ba 00 80 1d add %g2, %i5, %i5 rtems_libio_check_is_open(iop); 201921c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 2019220: 80 8a 21 00 btst 0x100, %o0 2019224: 12 80 00 06 bne 201923c 2019228: 80 a6 60 09 cmp %i1, 9 201922c: 7f ff d5 18 call 200e68c <__errno> 2019230: 01 00 00 00 nop 2019234: 10 80 00 40 b 2019334 2019238: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 201923c: 18 80 00 3b bgu 2019328 2019240: 89 2e 60 02 sll %i1, 2, %g4 2019244: 39 00 80 64 sethi %hi(0x2019000), %i4 2019248: b8 17 21 b8 or %i4, 0x1b8, %i4 ! 20191b8 <_calloc_r+0x14> 201924c: c8 07 00 04 ld [ %i4 + %g4 ], %g4 2019250: 81 c1 00 00 jmp %g4 2019254: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2019258: c2 00 40 00 ld [ %g1 ], %g1 if ( fd2 ) 201925c: 80 a0 60 00 cmp %g1, 0 2019260: 02 80 00 07 be 201927c 2019264: 80 a0 40 03 cmp %g1, %g3 diop = rtems_libio_iop( fd2 ); 2019268: 1a 80 00 0a bcc 2019290 <== NEVER TAKEN 201926c: b8 10 20 00 clr %i4 2019270: b9 28 60 06 sll %g1, 6, %i4 2019274: 10 80 00 07 b 2019290 2019278: b8 00 80 1c add %g2, %i4, %i4 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 201927c: 7f ff a9 0a call 20036a4 2019280: 01 00 00 00 nop if ( diop == 0 ) { 2019284: b8 92 20 00 orcc %o0, 0, %i4 2019288: 02 80 00 3d be 201937c <== NEVER TAKEN 201928c: 01 00 00 00 nop ret = -1; break; } } diop->flags = iop->flags; 2019290: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 diop->pathinfo = iop->pathinfo; 2019294: 90 07 20 1c add %i4, 0x1c, %o0 ret = -1; break; } } diop->flags = iop->flags; 2019298: c2 27 20 18 st %g1, [ %i4 + 0x18 ] diop->pathinfo = iop->pathinfo; 201929c: 92 07 60 1c add %i5, 0x1c, %o1 20192a0: 7f ff d8 78 call 200f480 20192a4: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 20192a8: 03 00 80 71 sethi %hi(0x201c400), %g1 20192ac: f0 00 63 54 ld [ %g1 + 0x354 ], %i0 ! 201c754 20192b0: b8 27 00 18 sub %i4, %i0, %i4 20192b4: 10 80 00 22 b 201933c 20192b8: b1 3f 20 06 sra %i4, 6, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 20192bc: 90 0a 28 00 and %o0, 0x800, %o0 20192c0: 80 a0 00 08 cmp %g0, %o0 20192c4: 10 80 00 21 b 2019348 20192c8: 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 ) ) 20192cc: c2 00 40 00 ld [ %g1 ], %g1 20192d0: 80 a0 60 00 cmp %g1, 0 20192d4: 22 80 00 0e be,a 201930c 20192d8: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 20192dc: 10 80 00 0c b 201930c 20192e0: 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 ); 20192e4: 7f ff a8 da call 200364c 20192e8: 01 00 00 00 nop 20192ec: 10 80 00 14 b 201933c 20192f0: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 20192f4: 7f ff a8 c9 call 2003618 20192f8: 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); 20192fc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2019300: 90 0a 22 01 and %o0, 0x201, %o0 2019304: 82 08 7d fe and %g1, -514, %g1 2019308: 90 12 00 01 or %o0, %g1, %o0 201930c: 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; 2019310: 10 80 00 0e b 2019348 2019314: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2019318: 7f ff d4 dd call 200e68c <__errno> 201931c: 01 00 00 00 nop 2019320: 10 80 00 05 b 2019334 2019324: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 2019328: 7f ff d4 d9 call 200e68c <__errno> 201932c: 01 00 00 00 nop 2019330: 82 10 20 16 mov 0x16, %g1 ! 16 2019334: 10 80 00 12 b 201937c 2019338: 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) { 201933c: 80 a6 20 00 cmp %i0, 0 2019340: 06 80 00 0d bl 2019374 <== NEVER TAKEN 2019344: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2019348: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 201934c: 92 10 00 1d mov %i5, %o1 2019350: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2019354: 9f c0 40 00 call %g1 2019358: 90 10 00 19 mov %i1, %o0 if (err) { 201935c: ba 92 20 00 orcc %o0, 0, %i5 2019360: 02 80 00 05 be 2019374 <== ALWAYS TAKEN 2019364: 01 00 00 00 nop errno = err; 2019368: 7f ff d4 c9 call 200e68c <__errno> <== NOT EXECUTED 201936c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2019370: 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; } 2019374: 81 c7 e0 08 ret 2019378: 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); 201937c: 81 c7 e0 08 ret 2019380: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200cb18 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cb18: 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) { 200cb1c: 37 00 80 7e sethi %hi(0x201f800), %i3 200cb20: c2 06 e1 c0 ld [ %i3 + 0x1c0 ], %g1 ! 201f9c0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cb24: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200cb28: 80 a0 60 00 cmp %g1, 0 200cb2c: 12 80 00 1a bne 200cb94 200cb30: b8 16 e1 c0 or %i3, 0x1c0, %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 ); 200cb34: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb38: d0 00 63 40 ld [ %g1 + 0x340 ], %o0 ! 201fb40 200cb3c: 92 10 20 00 clr %o1 200cb40: 7f ff ed 47 call 200805c 200cb44: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200cb48: c2 06 e1 c0 ld [ %i3 + 0x1c0 ], %g1 200cb4c: 80 a0 60 00 cmp %g1, 0 200cb50: 12 80 00 0a bne 200cb78 <== NEVER TAKEN 200cb54: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200cb58: 11 14 12 54 sethi %hi(0x50495000), %o0 200cb5c: 92 10 20 01 mov 1, %o1 200cb60: 90 12 20 45 or %o0, 0x45, %o0 200cb64: 94 10 20 54 mov 0x54, %o2 200cb68: 96 10 20 00 clr %o3 200cb6c: 7f ff ec a2 call 2007df4 200cb70: 98 10 00 1c mov %i4, %o4 200cb74: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200cb78: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb7c: d0 00 63 40 ld [ %g1 + 0x340 ], %o0 ! 201fb40 200cb80: 7f ff ed 81 call 2008184 200cb84: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200cb88: 80 a6 e0 00 cmp %i3, 0 200cb8c: 12 80 00 e1 bne 200cf10 200cb90: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200cb94: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb98: d0 00 61 c0 ld [ %g1 + 0x1c0 ], %o0 ! 201f9c0 200cb9c: 92 10 20 00 clr %o1 200cba0: 94 10 20 00 clr %o2 200cba4: 7f ff ed 2e call 200805c 200cba8: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200cbac: 80 a2 20 00 cmp %o0, 0 200cbb0: 12 80 00 d8 bne 200cf10 <== NEVER TAKEN 200cbb4: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200cbb8: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200cbbc: 80 a7 20 00 cmp %i4, 0 200cbc0: 32 80 00 44 bne,a 200ccd0 200cbc4: 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)); 200cbc8: 7f ff e0 3c call 2004cb8 200cbcc: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200cbd0: b8 92 20 00 orcc %o0, 0, %i4 200cbd4: 02 80 00 3c be 200ccc4 200cbd8: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200cbdc: 40 00 0e 71 call 20105a0 200cbe0: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200cbe4: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200cbe8: 90 10 22 00 mov 0x200, %o0 200cbec: 7f ff e0 33 call 2004cb8 200cbf0: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200cbf4: 80 a2 20 00 cmp %o0, 0 200cbf8: 02 80 00 31 be 200ccbc <== NEVER TAKEN 200cbfc: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200cc00: 37 00 80 7c sethi %hi(0x201f000), %i3 200cc04: d0 4e e2 44 ldsb [ %i3 + 0x244 ], %o0 ! 201f244 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200cc08: 35 14 12 5c sethi %hi(0x50497000), %i2 200cc0c: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200cc10: 92 10 20 00 clr %o1 200cc14: 90 12 00 01 or %o0, %g1, %o0 200cc18: 94 10 20 00 clr %o2 200cc1c: 40 00 04 0f call 200dc58 200cc20: 96 07 20 2c add %i4, 0x2c, %o3 200cc24: 80 a2 20 00 cmp %o0, 0 200cc28: 12 80 00 23 bne 200ccb4 200cc2c: d0 4e e2 44 ldsb [ %i3 + 0x244 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200cc30: 03 14 12 5d sethi %hi(0x50497400), %g1 200cc34: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200cc38: 92 10 20 00 clr %o1 200cc3c: 90 12 00 01 or %o0, %g1, %o0 200cc40: 94 10 20 00 clr %o2 200cc44: 40 00 04 05 call 200dc58 200cc48: 96 07 20 30 add %i4, 0x30, %o3 200cc4c: 80 a2 20 00 cmp %o0, 0 200cc50: 12 80 00 17 bne 200ccac 200cc54: d0 4e e2 44 ldsb [ %i3 + 0x244 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200cc58: b4 16 a3 00 or %i2, 0x300, %i2 200cc5c: 92 10 20 01 mov 1, %o1 200cc60: 90 12 00 1a or %o0, %i2, %o0 200cc64: 94 10 20 10 mov 0x10, %o2 200cc68: 96 10 20 00 clr %o3 200cc6c: 7f ff ec 62 call 2007df4 200cc70: 98 07 20 28 add %i4, 0x28, %o4 200cc74: 80 a2 20 00 cmp %o0, 0 200cc78: 12 80 00 0b bne 200cca4 200cc7c: c2 0e e2 44 ldub [ %i3 + 0x244 ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200cc80: 84 00 60 01 add %g1, 1, %g2 200cc84: 83 28 60 18 sll %g1, 0x18, %g1 200cc88: 83 38 60 18 sra %g1, 0x18, %g1 200cc8c: 80 a0 60 7a cmp %g1, 0x7a 200cc90: 12 80 00 0f bne 200cccc 200cc94: c4 2e e2 44 stb %g2, [ %i3 + 0x244 ] c = 'a'; 200cc98: 82 10 20 61 mov 0x61, %g1 200cc9c: 10 80 00 0c b 200cccc 200cca0: c2 2e e2 44 stb %g1, [ %i3 + 0x244 ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200cca4: 40 00 04 1e call 200dd1c 200cca8: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200ccac: 40 00 04 1c call 200dd1c 200ccb0: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200ccb4: 7f ff de 1c call 2004524 200ccb8: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200ccbc: 7f ff de 1a call 2004524 200ccc0: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200ccc4: 10 80 00 13 b 200cd10 200ccc8: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cccc: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ccd0: 92 10 20 00 clr %o1 200ccd4: 7f ff ec e2 call 200805c 200ccd8: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200ccdc: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cce0: 80 a0 00 08 cmp %g0, %o0 200cce4: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200cce8: 80 a0 60 00 cmp %g1, 0 200ccec: 12 80 00 09 bne 200cd10 200ccf0: b0 0e 3f fc and %i0, -4, %i0 if (err) 200ccf4: 80 a6 20 00 cmp %i0, 0 200ccf8: 22 80 00 06 be,a 200cd10 <== ALWAYS TAKEN 200ccfc: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200cd00: 7f ff ff 49 call 200ca24 <== NOT EXECUTED 200cd04: 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); 200cd08: 10 80 00 03 b 200cd14 <== NOT EXECUTED 200cd0c: 03 00 80 7e sethi %hi(0x201f800), %g1 <== NOT EXECUTED 200cd10: 03 00 80 7e sethi %hi(0x201f800), %g1 200cd14: 7f ff ed 1c call 2008184 200cd18: d0 00 61 c0 ld [ %g1 + 0x1c0 ], %o0 ! 201f9c0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200cd1c: 80 a6 20 00 cmp %i0, 0 200cd20: 12 80 00 7c bne 200cf10 200cd24: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200cd28: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cd2c: 82 08 60 06 and %g1, 6, %g1 200cd30: 80 a0 60 04 cmp %g1, 4 200cd34: 02 80 00 2e be 200cdec 200cd38: f8 07 40 00 ld [ %i5 ], %i4 200cd3c: 80 a0 60 06 cmp %g1, 6 200cd40: 02 80 00 56 be 200ce98 200cd44: 80 a0 60 02 cmp %g1, 2 200cd48: 12 80 00 6a bne 200cef0 <== NEVER TAKEN 200cd4c: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200cd50: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200cd54: 82 00 60 01 inc %g1 200cd58: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200cd5c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cd60: 84 00 60 01 add %g1, 1, %g2 200cd64: 80 a0 60 00 cmp %g1, 0 200cd68: 12 80 00 05 bne 200cd7c <== NEVER TAKEN 200cd6c: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200cd70: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200cd74: 40 00 04 13 call 200ddc0 200cd78: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200cd7c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cd80: 80 a0 60 00 cmp %g1, 0 200cd84: 12 80 00 5b bne 200cef0 200cd88: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200cd8c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cd90: 80 88 60 01 btst 1, %g1 200cd94: 12 80 00 57 bne 200cef0 200cd98: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200cd9c: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200cda0: 7f ff ec f9 call 2008184 200cda4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200cda8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cdac: 40 00 04 1c call 200de1c 200cdb0: 92 10 20 00 clr %o1 200cdb4: 80 a2 20 00 cmp %o0, 0 200cdb8: 12 80 00 52 bne 200cf00 <== NEVER TAKEN 200cdbc: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200cdc0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cdc4: 7f ff ec a6 call 200805c 200cdc8: 94 10 20 00 clr %o2 200cdcc: 80 a2 20 00 cmp %o0, 0 200cdd0: 32 80 00 4d bne,a 200cf04 <== NEVER TAKEN 200cdd4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200cdd8: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cddc: 80 a6 c0 01 cmp %i3, %g1 200cde0: 02 bf ff f0 be 200cda0 <== NEVER TAKEN 200cde4: 01 00 00 00 nop 200cde8: 30 80 00 42 b,a 200cef0 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200cdec: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cdf0: 82 00 60 01 inc %g1 200cdf4: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200cdf8: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cdfc: 84 00 60 01 add %g1, 1, %g2 200ce00: 80 a0 60 00 cmp %g1, 0 200ce04: 12 80 00 05 bne 200ce18 <== NEVER TAKEN 200ce08: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200ce0c: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200ce10: 40 00 03 ec call 200ddc0 200ce14: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200ce18: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200ce1c: 80 a0 60 00 cmp %g1, 0 200ce20: 12 80 00 34 bne 200cef0 200ce24: 01 00 00 00 nop 200ce28: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ce2c: 80 88 60 01 btst 1, %g1 200ce30: 22 80 00 07 be,a 200ce4c 200ce34: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200ce38: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ce3c: 7f ff ec d2 call 2008184 200ce40: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200ce44: 10 80 00 31 b 200cf08 200ce48: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200ce4c: 7f ff ec ce call 2008184 200ce50: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200ce54: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200ce58: 40 00 03 f1 call 200de1c 200ce5c: 92 10 20 00 clr %o1 200ce60: 80 a2 20 00 cmp %o0, 0 200ce64: 12 80 00 27 bne 200cf00 <== NEVER TAKEN 200ce68: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200ce6c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ce70: 7f ff ec 7b call 200805c 200ce74: 94 10 20 00 clr %o2 200ce78: 80 a2 20 00 cmp %o0, 0 200ce7c: 32 80 00 22 bne,a 200cf04 <== NEVER TAKEN 200ce80: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200ce84: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ce88: 80 a6 c0 01 cmp %i3, %g1 200ce8c: 02 bf ff f0 be 200ce4c <== NEVER TAKEN 200ce90: 01 00 00 00 nop 200ce94: 30 80 00 17 b,a 200cef0 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200ce98: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ce9c: 82 00 60 01 inc %g1 200cea0: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200cea4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cea8: 84 00 60 01 add %g1, 1, %g2 200ceac: 80 a0 60 00 cmp %g1, 0 200ceb0: 12 80 00 05 bne 200cec4 <== NEVER TAKEN 200ceb4: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200ceb8: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200cebc: 40 00 03 c1 call 200ddc0 200cec0: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; 200cec4: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cec8: 82 00 60 01 inc %g1 200cecc: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200ced0: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200ced4: 84 00 60 01 add %g1, 1, %g2 200ced8: 80 a0 60 00 cmp %g1, 0 200cedc: 12 80 00 05 bne 200cef0 <== NEVER TAKEN 200cee0: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200cee4: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cee8: 40 00 03 b6 call 200ddc0 200ceec: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200cef0: 7f ff ec a5 call 2008184 200cef4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200cef8: 81 c7 e0 08 ret 200cefc: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200cf00: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200cf04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200cf08: 7f ff fe d2 call 200ca50 200cf0c: 92 10 00 19 mov %i1, %o1 return err; } 200cf10: 81 c7 e0 08 ret 200cf14: 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 88 ld [ %g1 + 0x88 ], %g1 ! 2015c88 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 54 ld [ %g1 + 0x254 ], %g1 ! 2016654 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 7a call 200e754 <__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 48 call 200e754 <__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 40 or %g1, 0x340, %g1 ! 201b340 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 44 ld [ %g1 + 0x244 ], %g1 ! 201b644 <_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 88 ld [ %g1 + 0x88 ], %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 60 e0 ld [ %i5 + 0xe0 ], %o0 ! 201a8e0 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 60 e0 ld [ %i5 + 0xe0 ], %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 68 restore %i0, 0x168, %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 60 ec or %g1, 0xec, %g1 ! 20218ec 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 84 ld [ %g1 + 0x284 ], %g2 ! 2018684 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 88 ld [ %g2 + 0x288 ], %g2 ! 2018688 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 =============================================================================== 0201944c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 201944c: 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 ); 2019450: 03 00 80 6f sethi %hi(0x201bc00), %g1 2019454: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 201bcf8 2019458: 80 a6 00 01 cmp %i0, %g1 201945c: 1a 80 00 06 bcc 2019474 <== NEVER TAKEN 2019460: ba 10 20 00 clr %i5 2019464: 03 00 80 71 sethi %hi(0x201c400), %g1 2019468: fa 00 63 54 ld [ %g1 + 0x354 ], %i5 ! 201c754 201946c: b1 2e 20 06 sll %i0, 6, %i0 2019470: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 2019474: 92 07 60 1c add %i5, 0x1c, %o1 2019478: 94 10 20 14 mov 0x14, %o2 201947c: 7f ff d8 01 call 200f480 2019480: 90 07 bf ec add %fp, -20, %o0 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 2019484: c2 07 bf f8 ld [ %fp + -8 ], %g1 2019488: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 201948c: 9f c0 40 00 call %g1 2019490: 90 07 bf ec add %fp, -20, %o0 2019494: 80 a2 20 01 cmp %o0, 1 2019498: 22 80 00 08 be,a 20194b8 201949c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 20194a0: 7f ff d4 7b call 200e68c <__errno> 20194a4: b0 10 3f ff mov -1, %i0 20194a8: 82 10 20 14 mov 0x14, %g1 20194ac: c2 22 00 00 st %g1, [ %o0 ] 20194b0: 81 c7 e0 08 ret 20194b4: 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 ); 20194b8: 90 10 00 1d mov %i5, %o0 20194bc: c2 00 60 08 ld [ %g1 + 8 ], %g1 20194c0: 92 10 00 19 mov %i1, %o1 20194c4: 9f c0 40 00 call %g1 20194c8: 94 10 00 1a mov %i2, %o2 } 20194cc: 81 c7 e0 08 ret 20194d0: 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 8d call 200dcc0 <__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 4e f9 call 2016ab0 <.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 =============================================================================== 0200d3e0 : 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 ) 200d3e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200d3e4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200d3e8: 80 a0 a0 01 cmp %g2, 1 200d3ec: 12 80 00 05 bne 200d400 <== NEVER TAKEN 200d3f0: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 200d3f4: c0 22 20 10 clr [ %o0 + 0x10 ] 200d3f8: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 200d3fc: 82 10 20 00 clr %g1 } 200d400: 81 c3 e0 08 retl 200d404: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200d60c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200d60c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200d610: 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 ) ) 200d614: 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 ); 200d618: 82 07 60 54 add %i5, 0x54, %g1 200d61c: 80 a0 80 01 cmp %g2, %g1 200d620: 22 80 00 06 be,a 200d638 200d624: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 200d628: 40 00 01 a6 call 200dcc0 <__errno> 200d62c: 01 00 00 00 nop 200d630: 10 80 00 0d b 200d664 200d634: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 200d638: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200d63c: 80 a0 40 1d cmp %g1, %i5 200d640: 02 80 00 06 be 200d658 200d644: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 200d648: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 200d64c: 80 a0 60 00 cmp %g1, 0 200d650: 02 80 00 08 be 200d670 <== ALWAYS TAKEN 200d654: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 200d658: 40 00 01 9a call 200dcc0 <__errno> 200d65c: 01 00 00 00 nop 200d660: 82 10 20 10 mov 0x10, %g1 ! 10 200d664: c2 22 00 00 st %g1, [ %o0 ] 200d668: 81 c7 e0 08 ret 200d66c: 91 e8 3f ff restore %g0, -1, %o0 IMFS_create_orphan( the_jnode ); 200d670: 7f ff f6 24 call 200af00 200d674: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 200d678: 90 10 00 1d mov %i5, %o0 200d67c: 7f ff f6 33 call 200af48 200d680: b0 10 20 00 clr %i0 return 0; } 200d684: 81 c7 e0 08 ret 200d688: 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 18 ldsb [ %g1 + 0x18 ], %g2 ! 2016418 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 18 stb %g2, [ %g1 + 0x18 ] mkdir("/etc", 0777); 20034a0: 11 00 80 54 sethi %hi(0x2015000), %o0 20034a4: 40 00 02 53 call 2003df0 20034a8: 90 12 21 40 or %o0, 0x140, %o0 ! 2015140 /* * 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 48 or %i5, 0x148, %o0 20034b8: 40 00 2e a9 call 200ef5c 20034bc: 92 12 61 58 or %o1, 0x158, %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 48 or %i5, 0x148, %o0 20034d0: 13 00 80 54 sethi %hi(0x2015000), %o1 20034d4: 40 00 2e a2 call 200ef5c 20034d8: 92 12 61 60 or %o1, 0x160, %o1 ! 2015160 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 c8 call 200f00c 20034f0: 90 12 21 68 or %o0, 0x168, %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 ba call 200e7e0 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 61 d0 or %i5, 0x1d0, %o0 200350c: 40 00 2e 94 call 200ef5c 2003510: 92 12 61 58 or %o1, 0x158, %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 61 d0 or %i5, 0x1d0, %o0 2003524: 13 00 80 54 sethi %hi(0x2015000), %o1 2003528: 40 00 2e 8d call 200ef5c 200352c: 92 12 61 60 or %o1, 0x160, %o1 ! 2015160 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 b2 call 200f00c 2003548: 90 12 21 e0 or %o0, 0x1e0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 200354c: 40 00 2c a5 call 200e7e0 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 8c ld [ %g1 + 0x38c ], %g1 ! 201ab8c <__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 04 ld [ %g1 + 0x204 ], %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 =============================================================================== 0201827c : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 201827c: 81 c3 e0 08 retl <== NOT EXECUTED 2018280: 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 44 ld [ %g1 + 0x244 ], %g1 ! 201b644 <_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 78 ld [ %g1 + 0x178 ], %i5 ! 2019d78 <_global_impure_ptr> 200368c: c2 07 23 90 ld [ %i4 + 0x390 ], %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 c5 call 200e9b0 <_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 90 st %i5, [ %i4 + 0x390 ] * * 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 90 ld [ %i5 + 0x390 ], %g1 ! 201ab90 <_impure_ptr> 20036b0: 40 00 29 d6 call 200de08 20036b4: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20036b8: c2 07 63 90 ld [ %i5 + 0x390 ], %g1 20036bc: 40 00 29 d3 call 200de08 20036c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20036c4: c2 07 63 90 ld [ %i5 + 0x390 ], %g1 20036c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20036cc: 40 00 29 cf call 200de08 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 40 or %g1, 0x340, %g1 ! 201b340 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 44 ld [ %g1 + 0x244 ], %g1 ! 201b644 <_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 60 e0 ld [ %g1 + 0xe0 ], %o0 ! 201a8e0 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 84 ld [ %g1 + 0x84 ], %g1 ! 201b084 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 b6 call 200dcc0 <__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 80 ld [ %g1 + 0x80 ], %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 88 ld [ %g1 + 0x88 ], %g1 ! 201b088 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 88 ld [ %g1 + 0x88 ], %i5 ! 2015088 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 c8 call 201127c <.udiv> 2002f60: 90 06 00 1d add %i0, %i5, %o0 2002f64: 40 00 38 8c call 2011194 <.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 20 e0 ld [ %i4 + 0xe0 ], %o0 ! 20144e0 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 2a fd call 200db98 <__errno> 2002fa8: b0 10 20 00 clr %i0 2002fac: 82 10 20 0c mov 0xc, %g1 2002fb0: c2 22 00 00 st %g1, [ %o0 ] 2002fb4: 81 c7 e0 08 ret 2002fb8: 81 e8 00 00 restore 2002fbc: f0 07 20 e0 ld [ %i4 + 0xe0 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2002fc0: c4 00 60 58 ld [ %g1 + 0x58 ], %g2 2002fc4: b4 10 20 00 clr %i2 2002fc8: ba 07 40 02 add %i5, %g2, %i5 2002fcc: fa 20 60 58 st %i5, [ %g1 + 0x58 ] 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 88 st %i1, [ %g1 + 0x88 ] ! 2015088 * 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 =============================================================================== 0200d0b4 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d0b4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d0b8: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d0bc: 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 ) 200d0c0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d0c4: 80 a0 40 19 cmp %g1, %i1 200d0c8: 06 80 00 09 bl 200d0ec <== NEVER TAKEN 200d0cc: 94 10 00 1a mov %i2, %o2 200d0d0: 80 a0 40 19 cmp %g1, %i1 200d0d4: 32 80 00 0a bne,a 200d0fc 200d0d8: d2 27 60 50 st %o1, [ %i5 + 0x50 ] 200d0dc: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200d0e0: 80 a0 40 1a cmp %g1, %i2 200d0e4: 3a 80 00 06 bcc,a 200d0fc 200d0e8: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200d0ec: 7f ff ff 01 call 200ccf0 200d0f0: 90 10 00 1d mov %i5, %o0 200d0f4: 81 c7 e0 08 ret 200d0f8: 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; 200d0fc: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200d100: d2 26 20 08 st %o1, [ %i0 + 8 ] 200d104: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200d108: 90 07 bf f8 add %fp, -8, %o0 200d10c: 7f ff d7 5c call 2002e7c 200d110: 92 10 20 00 clr %o1 200d114: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d118: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200d11c: 81 c7 e0 08 ret 200d120: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d124 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200d124: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d128: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 if (the_jnode->type == IMFS_LINEAR_FILE) { 200d12c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d130: 80 a0 60 06 cmp %g1, 6 200d134: 32 80 00 11 bne,a 200d178 200d138: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200d13c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d140: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200d144: 80 a0 c0 01 cmp %g3, %g1 200d148: 14 80 00 09 bg 200d16c <== NEVER TAKEN 200d14c: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200d150: 80 a0 c0 01 cmp %g3, %g1 200d154: 32 80 00 19 bne,a 200d1b8 <== NEVER TAKEN 200d158: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200d15c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200d160: 80 a0 c0 02 cmp %g3, %g2 200d164: 28 80 00 15 bleu,a 200d1b8 <== ALWAYS TAKEN 200d168: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200d16c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200d170: 10 80 00 11 b 200d1b4 <== NOT EXECUTED 200d174: 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 )) 200d178: 90 10 00 1d mov %i5, %o0 200d17c: 92 10 00 02 mov %g2, %o1 200d180: 7f ff fe dc call 200ccf0 200d184: 94 10 00 03 mov %g3, %o2 200d188: 80 a2 20 00 cmp %o0, 0 200d18c: 22 80 00 09 be,a 200d1b0 200d190: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200d194: 40 00 02 cb call 200dcc0 <__errno> 200d198: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200d19c: 82 10 20 1c mov 0x1c, %g1 200d1a0: c2 22 00 00 st %g1, [ %o0 ] 200d1a4: b0 16 23 ff or %i0, 0x3ff, %i0 200d1a8: 81 c7 e0 08 ret 200d1ac: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200d1b0: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200d1b4: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200d1b8: 81 c7 e0 08 ret 200d1bc: 81 e8 00 00 restore =============================================================================== 0200d018 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d018: 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)) 200d01c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d020: 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)) 200d024: 80 88 62 04 btst 0x204, %g1 200d028: 02 80 00 19 be 200d08c 200d02c: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200d030: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d034: 80 a0 60 06 cmp %g1, 6 200d038: 32 80 00 16 bne,a 200d090 <== ALWAYS TAKEN 200d03c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200d040: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200d044: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200d048: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200d04c: 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; 200d050: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; 200d054: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200d058: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200d05c: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200d060: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200d064: 02 80 00 0a be 200d08c <== NOT EXECUTED 200d068: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200d06c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d070: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d074: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d078: 7f ff ff 75 call 200ce4c <== NOT EXECUTED 200d07c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200d080: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200d084: 02 80 00 0a be 200d0ac <== NOT EXECUTED 200d088: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200d08c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200d090: 80 88 62 00 btst 0x200, %g1 200d094: 02 80 00 04 be 200d0a4 200d098: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200d09c: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200d0a0: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200d0a4: 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; 200d0a8: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200d0ac: 81 c7 e0 08 ret 200d0b0: 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 98 call 200b630 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 37 call 200dcc0 <__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 70 or %l3, 0x70, %l3 ! 2019070 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 200340c: 40 00 2f c5 call 200f320 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 bf call 200f320 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 bc call 200f320 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 71 call 200e630 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 6b call 200e630 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 65 call 200e630 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 5d call 200e630 20034c0: 92 12 61 a0 or %o1, 0x1a0, %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 29 fa call 200dcc0 <__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 e6 call 200dcc0 <__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 dc call 200dcc0 <__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 61 ec ld [ %g1 + 0x1ec ], %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 61 ec or %g1, 0x1ec, %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 c1 call 200dcc0 <__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 21 ec or %o0, 0x1ec, %o0 ! 201a9ec 2003610: 03 00 80 6c sethi %hi(0x201b000), %g1 2003614: 40 00 0b ed call 20065c8 2003618: d0 00 63 30 ld [ %g1 + 0x330 ], %o0 ! 201b330 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 0c ld [ %g1 + 0x20c ], %o0 ! 201aa0c 200362c: 92 07 60 1c add %i5, 0x1c, %o1 2003630: 94 10 20 14 mov 0x14, %o2 2003634: 40 00 2b ff call 200e630 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 8b call 200db10 <__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 =============================================================================== 02016d20 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2016d20: 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; 2016d24: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 2016d28: 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; 2016d2c: 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; 2016d30: 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); 2016d34: 92 10 20 00 clr %o1 2016d38: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2016d3c: c2 27 bf f4 st %g1, [ %fp + -12 ] 2016d40: 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; 2016d44: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 2016d48: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 2016d4c: 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; 2016d50: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 2016d54: 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); 2016d58: 40 00 14 a8 call 201bff8 2016d5c: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2016d60: 92 10 20 00 clr %o1 2016d64: 94 10 20 40 mov 0x40, %o2 2016d68: 40 00 14 a4 call 201bff8 2016d6c: 90 07 bf 68 add %fp, -152, %o0 name_type = msdos_long_to_short (name, name_len, 2016d70: 92 10 00 1b mov %i3, %o1 2016d74: 94 07 bf a8 add %fp, -88, %o2 2016d78: 96 10 20 0b mov 0xb, %o3 2016d7c: 40 00 04 28 call 2017e1c 2016d80: 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) { 2016d84: 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, 2016d88: 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; 2016d8c: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2016d90: 90 10 20 00 clr %o0 2016d94: 40 00 22 57 call 201f6f0