=============================================================================== 0200a40c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200a40c: 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; 200a410: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 200a414: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 200a418: 84 00 bf ff add %g2, -1, %g2 200a41c: 80 a0 a0 06 cmp %g2, 6 200a420: 18 80 00 14 bgu 200a470 <== NEVER TAKEN 200a424: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200a428: 85 28 a0 02 sll %g2, 2, %g2 200a42c: 07 00 80 28 sethi %hi(0x200a000), %g3 200a430: 86 10 e3 90 or %g3, 0x390, %g3 ! 200a390 200a434: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a438: 81 c0 80 00 jmp %g2 200a43c: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200a440: 10 80 00 0b b 200a46c 200a444: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200a448: 03 00 80 66 sethi %hi(0x2019800), %g1 200a44c: 10 80 00 08 b 200a46c 200a450: 82 10 60 0c or %g1, 0xc, %g1 ! 201980c break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200a454: 03 00 80 66 sethi %hi(0x2019800), %g1 200a458: 10 80 00 05 b 200a46c 200a45c: 82 10 60 7c or %g1, 0x7c, %g1 ! 201987c break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200a460: 10 80 00 03 b 200a46c 200a464: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200a468: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a46c: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200a470: 81 c3 e0 08 retl 200a474: 90 10 20 00 clr %o0 =============================================================================== 0200a224 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200a224: 9d e3 bf a0 save %sp, -96, %sp 200a228: 82 10 00 18 mov %i0, %g1 200a22c: 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 ) 200a230: 80 a0 60 00 cmp %g1, 0 200a234: 02 80 00 45 be 200a348 <== NEVER TAKEN 200a238: b0 10 20 00 clr %i0 return NULL; parent = parent_loc->node_access; 200a23c: e0 00 40 00 ld [ %g1 ], %l0 fs_info = parent_loc->mt_entry->fs_info; 200a240: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200a244: 80 a6 60 07 cmp %i1, 7 200a248: 12 80 00 08 bne 200a268 200a24c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 200a250: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a254: 03 00 80 65 sethi %hi(0x2019400), %g1 200a258: 82 10 63 84 or %g1, 0x384, %g1 ! 2019784 200a25c: 80 a0 80 01 cmp %g2, %g1 200a260: 02 80 00 3a be 200a348 200a264: 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 ); 200a268: 03 00 80 6a sethi %hi(0x201a800), %g1 200a26c: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 201a9d4 200a270: 90 10 00 19 mov %i1, %o0 200a274: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200a278: 7f ff ff d1 call 200a1bc 200a27c: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200a280: b0 92 20 00 orcc %o0, 0, %i0 200a284: 02 80 00 31 be 200a348 200a288: 80 a6 60 01 cmp %i1, 1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200a28c: 12 80 00 08 bne 200a2ac 200a290: 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 ); 200a294: 82 06 20 50 add %i0, 0x50, %g1 200a298: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; 200a29c: c0 26 20 54 clr [ %i0 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200a2a0: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; tail->previous = head; 200a2a4: 10 80 00 21 b 200a328 200a2a8: c2 26 20 58 st %g1, [ %i0 + 0x58 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200a2ac: 22 80 00 06 be,a 200a2c4 200a2b0: c2 07 00 00 ld [ %i4 ], %g1 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200a2b4: 80 a6 60 04 cmp %i1, 4 200a2b8: 12 80 00 05 bne 200a2cc 200a2bc: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; 200a2c0: c2 07 00 00 ld [ %i4 ], %g1 200a2c4: 10 80 00 19 b 200a328 200a2c8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else if ( type == IMFS_DEVICE ) { 200a2cc: 12 80 00 07 bne 200a2e8 200a2d0: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; 200a2d4: c2 07 00 00 ld [ %i4 ], %g1 200a2d8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] node->info.device.minor = info->device.minor; 200a2dc: c2 07 20 04 ld [ %i4 + 4 ], %g1 200a2e0: 10 80 00 12 b 200a328 200a2e4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { 200a2e8: 12 80 00 06 bne 200a300 200a2ec: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; 200a2f0: c0 26 20 50 clr [ %i0 + 0x50 ] 200a2f4: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.linearfile.direct = 0; 200a2f8: 10 80 00 0c b 200a328 200a2fc: c0 26 20 58 clr [ %i0 + 0x58 ] } else if ( type == IMFS_MEMORY_FILE ) { 200a300: 12 80 00 08 bne 200a320 200a304: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; 200a308: c0 26 20 50 clr [ %i0 + 0x50 ] 200a30c: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200a310: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200a314: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; 200a318: 10 80 00 04 b 200a328 200a31c: c0 26 20 60 clr [ %i0 + 0x60 ] } else if ( type == IMFS_FIFO ) { 200a320: 22 80 00 02 be,a 200a328 <== ALWAYS TAKEN 200a324: 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; 200a328: c2 07 60 04 ld [ %i5 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200a32c: e0 26 20 08 st %l0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200a330: 82 00 60 01 inc %g1 200a334: c2 27 60 04 st %g1, [ %i5 + 4 ] 200a338: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200a33c: 90 04 20 50 add %l0, 0x50, %o0 200a340: 7f ff f2 d7 call 2006e9c <_Chain_Append> 200a344: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200a348: 81 c7 e0 08 ret 200a34c: 81 e8 00 00 restore =============================================================================== 0200a508 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a508: 9d e3 bf 70 save %sp, -144, %sp 200a50c: f2 27 a0 48 st %i1, [ %fp + 0x48 ] int i = 0; 200a510: 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 ) ) { 200a514: 80 8e bf f8 btst -8, %i2 200a518: 02 80 00 06 be 200a530 <== ALWAYS TAKEN 200a51c: ba 10 00 18 mov %i0, %i5 rtems_set_errno_and_return_minus_one( EIO ); 200a520: 40 00 0d db call 200dc8c <__errno> <== NOT EXECUTED 200a524: 01 00 00 00 nop <== NOT EXECUTED 200a528: 10 80 00 19 b 200a58c <== NOT EXECUTED 200a52c: 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; 200a530: 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; 200a534: 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) ) { 200a538: 10 80 00 8d b 200a76c 200a53c: 33 00 80 6a sethi %hi(0x201a800), %i1 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200a540: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a544: 90 07 40 08 add %i5, %o0, %o0 200a548: 94 07 bf d0 add %fp, -48, %o2 200a54c: 40 00 02 25 call 200ade0 200a550: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; 200a554: c2 07 bf fc ld [ %fp + -4 ], %g1 200a558: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 200a55c: 84 20 80 01 sub %g2, %g1, %g2 200a560: c4 27 a0 48 st %g2, [ %fp + 0x48 ] i += len; 200a564: c4 07 bf f8 ld [ %fp + -8 ], %g2 200a568: 82 00 80 01 add %g2, %g1, %g1 200a56c: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !pathloc->node_access ) 200a570: c2 06 c0 00 ld [ %i3 ], %g1 200a574: 80 a0 60 00 cmp %g1, 0 200a578: 12 80 00 08 bne 200a598 <== ALWAYS TAKEN 200a57c: a0 10 00 08 mov %o0, %l0 rtems_set_errno_and_return_minus_one( ENOENT ); 200a580: 40 00 0d c3 call 200dc8c <__errno> 200a584: 01 00 00 00 nop 200a588: 82 10 20 02 mov 2, %g1 ! 2 200a58c: c2 22 00 00 st %g1, [ %o0 ] 200a590: 81 c7 e0 08 ret 200a594: 91 e8 3f ff restore %g0, -1, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a598: 80 a2 20 00 cmp %o0, 0 200a59c: 02 80 00 10 be 200a5dc 200a5a0: 80 a4 20 03 cmp %l0, 3 if ( node->type == IMFS_DIRECTORY ) 200a5a4: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a5a8: 80 a0 60 01 cmp %g1, 1 200a5ac: 12 80 00 0c bne 200a5dc 200a5b0: 80 a4 20 03 cmp %l0, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a5b4: 90 10 00 1b mov %i3, %o0 200a5b8: 7f ff ff b0 call 200a478 200a5bc: 92 10 20 01 mov 1, %o1 200a5c0: 80 a2 20 00 cmp %o0, 0 200a5c4: 12 80 00 06 bne 200a5dc 200a5c8: 80 a4 20 03 cmp %l0, 3 rtems_set_errno_and_return_minus_one( EACCES ); 200a5cc: 40 00 0d b0 call 200dc8c <__errno> 200a5d0: 01 00 00 00 nop 200a5d4: 10 bf ff ee b 200a58c 200a5d8: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200a5dc: 02 80 00 1c be 200a64c 200a5e0: f8 06 c0 00 ld [ %i3 ], %i4 200a5e4: 80 a4 20 04 cmp %l0, 4 200a5e8: 02 80 00 5d be 200a75c 200a5ec: 80 a4 20 02 cmp %l0, 2 200a5f0: 12 80 00 60 bne 200a770 200a5f4: 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 ) 200a5f8: c2 06 61 d4 ld [ %i1 + 0x1d4 ], %g1 200a5fc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200a600: 80 a7 00 01 cmp %i4, %g1 200a604: 02 80 00 5b be 200a770 200a608: 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; 200a60c: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200a610: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200a614: 80 a0 40 1c cmp %g1, %i4 200a618: 32 80 00 05 bne,a 200a62c 200a61c: 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; 200a620: 90 10 00 1b mov %i3, %o0 200a624: 10 80 00 5f b 200a7a0 200a628: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200a62c: 80 a7 20 00 cmp %i4, 0 200a630: 32 80 00 4f bne,a 200a76c 200a634: f8 26 c0 00 st %i4, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200a638: 40 00 0d 95 call 200dc8c <__errno> 200a63c: b0 10 3f ff mov -1, %i0 200a640: e0 22 00 00 st %l0, [ %o0 ] 200a644: 81 c7 e0 08 ret 200a648: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200a64c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a650: 80 a0 60 03 cmp %g1, 3 200a654: 12 80 00 07 bne 200a670 200a658: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 200a65c: 90 10 00 1b mov %i3, %o0 200a660: 7f ff ff 97 call 200a4bc 200a664: 92 10 20 00 clr %o1 node = pathloc->node_access; 200a668: 10 80 00 0b b 200a694 200a66c: 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 ) { 200a670: 32 80 00 0a bne,a 200a698 200a674: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 200a678: 90 10 00 1b mov %i3, %o0 200a67c: 40 00 00 67 call 200a818 200a680: 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; 200a684: f8 06 c0 00 ld [ %i3 ], %i4 if ( result == -1 ) 200a688: 80 a2 3f ff cmp %o0, -1 200a68c: 02 80 00 61 be 200a810 <== NEVER TAKEN 200a690: b0 10 00 08 mov %o0, %i0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200a694: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a698: 80 a0 60 01 cmp %g1, 1 200a69c: 22 80 00 06 be,a 200a6b4 200a6a0: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a6a4: 40 00 0d 7a call 200dc8c <__errno> 200a6a8: 01 00 00 00 nop 200a6ac: 10 bf ff b8 b 200a58c 200a6b0: 82 10 20 14 mov 0x14, %g1 ! 14 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200a6b4: 40 00 01 ac call 200ad64 200a6b8: 92 07 bf d0 add %fp, -48, %o1 if ( !node ) 200a6bc: b8 92 20 00 orcc %o0, 0, %i4 200a6c0: 02 bf ff b0 be 200a580 200a6c4: 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 )) { 200a6c8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a6cc: 80 a0 60 01 cmp %g1, 1 200a6d0: 32 80 00 27 bne,a 200a76c 200a6d4: f8 26 c0 00 st %i4, [ %i3 ] 200a6d8: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200a6dc: 80 a0 60 00 cmp %g1, 0 200a6e0: 02 80 00 1d be 200a754 200a6e4: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( pathname, &pathnamelen, &i); 200a6e8: 92 07 a0 48 add %fp, 0x48, %o1 200a6ec: 7f ff ff 30 call 200a3ac 200a6f0: 94 07 bf f8 add %fp, -8, %o2 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200a6f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a6f8: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200a6fc: 80 a0 a0 2e cmp %g2, 0x2e 200a700: 12 80 00 06 bne 200a718 200a704: b0 07 40 01 add %i5, %g1, %i0 200a708: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200a70c: 80 a0 a0 2e cmp %g2, 0x2e 200a710: 22 80 00 0c be,a 200a740 200a714: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a718: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a71c: 90 10 00 1b mov %i3, %o0 200a720: 92 02 60 1c add %o1, 0x1c, %o1 200a724: 40 00 0f b6 call 200e5fc 200a728: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200a72c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a730: 90 10 00 18 mov %i0, %o0 200a734: c2 00 40 00 ld [ %g1 ], %g1 200a738: 10 80 00 24 b 200a7c8 200a73c: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200a740: 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; 200a744: c2 27 bf f8 st %g1, [ %fp + -8 ] pathnamelen -= 2; 200a748: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200a74c: 82 00 7f fe add %g1, -2, %g1 200a750: c2 27 a0 48 st %g1, [ %fp + 0x48 ] /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200a754: 10 80 00 06 b 200a76c 200a758: 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 ); 200a75c: 40 00 0d 4c call 200dc8c <__errno> 200a760: 01 00 00 00 nop 200a764: 10 bf ff 8a b 200a58c 200a768: 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) ) { 200a76c: 80 a4 20 04 cmp %l0, 4 200a770: 02 80 00 04 be 200a780 <== NEVER TAKEN 200a774: 80 a4 20 00 cmp %l0, 0 200a778: 32 bf ff 72 bne,a 200a540 200a77c: 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 ) { 200a780: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a784: 80 a0 60 01 cmp %g1, 1 200a788: 12 80 00 15 bne 200a7dc 200a78c: 90 10 00 1b mov %i3, %o0 if ( node->info.directory.mt_fs != NULL ) { 200a790: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a794: 80 a2 60 00 cmp %o1, 0 200a798: 02 80 00 11 be 200a7dc <== ALWAYS TAKEN 200a79c: 92 02 60 1c add %o1, 0x1c, %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a7a0: 40 00 0f 97 call 200e5fc 200a7a4: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200a7a8: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a7ac: c4 07 bf fc ld [ %fp + -4 ], %g2 200a7b0: d0 07 bf f8 ld [ %fp + -8 ], %o0 200a7b4: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a7b8: c2 00 40 00 ld [ %g1 ], %g1 200a7bc: 90 22 00 02 sub %o0, %g2, %o0 200a7c0: 92 00 80 09 add %g2, %o1, %o1 200a7c4: 90 07 40 08 add %i5, %o0, %o0 200a7c8: 94 10 00 1a mov %i2, %o2 200a7cc: 9f c0 40 00 call %g1 200a7d0: 96 10 00 1b mov %i3, %o3 200a7d4: 81 c7 e0 08 ret 200a7d8: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a7dc: 7f ff ff 0c call 200a40c 200a7e0: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a7e4: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a7e8: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a7ec: 7f ff ff 23 call 200a478 200a7f0: 90 10 00 1b mov %i3, %o0 200a7f4: 80 a2 20 00 cmp %o0, 0 200a7f8: 12 80 00 06 bne 200a810 200a7fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a800: 40 00 0d 23 call 200dc8c <__errno> 200a804: b0 10 3f ff mov -1, %i0 ! ffffffff 200a808: 82 10 20 0d mov 0xd, %g1 200a80c: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a810: 81 c7 e0 08 ret 200a814: 81 e8 00 00 restore =============================================================================== 0200a958 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200a958: 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; 200a95c: 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; 200a960: c0 27 bf f4 clr [ %fp + -12 ] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a964: 90 10 00 18 mov %i0, %o0 200a968: 40 00 12 61 call 200f2ec 200a96c: 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 ) 200a970: 37 00 80 6a sethi %hi(0x201a800), %i3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200a974: 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 ); 200a978: d0 07 bf f4 ld [ %fp + -12 ], %o0 200a97c: d2 07 bf fc ld [ %fp + -4 ], %o1 200a980: 90 07 40 08 add %i5, %o0, %o0 200a984: 94 07 bf d0 add %fp, -48, %o2 200a988: 40 00 01 16 call 200ade0 200a98c: 96 07 bf f8 add %fp, -8, %o3 pathlen -= len; 200a990: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a994: c4 07 bf fc ld [ %fp + -4 ], %g2 200a998: 84 20 80 01 sub %g2, %g1, %g2 200a99c: c4 27 bf fc st %g2, [ %fp + -4 ] i += len; 200a9a0: c4 07 bf f4 ld [ %fp + -12 ], %g2 200a9a4: 82 00 80 01 add %g2, %g1, %g1 200a9a8: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( !pathloc->node_access ) 200a9ac: c2 06 40 00 ld [ %i1 ], %g1 200a9b0: 80 a0 60 00 cmp %g1, 0 200a9b4: 02 80 00 99 be 200ac18 <== NEVER TAKEN 200a9b8: b0 10 00 08 mov %o0, %i0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a9bc: 80 a2 20 00 cmp %o0, 0 200a9c0: 02 80 00 10 be 200aa00 200a9c4: 80 a6 20 02 cmp %i0, 2 if ( node->type == IMFS_DIRECTORY ) 200a9c8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a9cc: 80 a0 60 01 cmp %g1, 1 200a9d0: 12 80 00 0c bne 200aa00 200a9d4: 80 a6 20 02 cmp %i0, 2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a9d8: 90 10 00 19 mov %i1, %o0 200a9dc: 7f ff fe a7 call 200a478 200a9e0: 92 10 20 01 mov 1, %o1 200a9e4: 80 a2 20 00 cmp %o0, 0 200a9e8: 12 80 00 06 bne 200aa00 200a9ec: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EACCES ); 200a9f0: 40 00 0c a7 call 200dc8c <__errno> 200a9f4: 01 00 00 00 nop 200a9f8: 10 80 00 9d b 200ac6c 200a9fc: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200aa00: 02 80 00 0f be 200aa3c 200aa04: f8 06 40 00 ld [ %i1 ], %i4 200aa08: 80 a6 20 02 cmp %i0, 2 200aa0c: 18 80 00 07 bgu 200aa28 200aa10: 80 a6 20 03 cmp %i0, 3 200aa14: 80 a6 20 00 cmp %i0, 0 200aa18: 02 80 00 6e be 200abd0 200aa1c: 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 ); 200aa20: 10 bf ff d7 b 200a97c 200aa24: 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 ) { 200aa28: 02 80 00 21 be 200aaac 200aa2c: 80 a6 20 04 cmp %i0, 4 200aa30: 32 bf ff d3 bne,a 200a97c <== NEVER TAKEN 200aa34: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 200aa38: 30 80 00 6a b,a 200abe0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200aa3c: c2 06 e1 d4 ld [ %i3 + 0x1d4 ], %g1 200aa40: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200aa44: 80 a7 00 01 cmp %i4, %g1 200aa48: 02 bf ff cd be 200a97c 200aa4c: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aa50: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200aa54: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200aa58: 80 a0 40 1c cmp %g1, %i4 200aa5c: 32 80 00 0d bne,a 200aa90 200aa60: 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; 200aa64: 90 10 00 19 mov %i1, %o0 200aa68: 92 02 60 08 add %o1, 8, %o1 200aa6c: 40 00 0e e4 call 200e5fc 200aa70: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200aa74: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200aa78: c4 07 bf f8 ld [ %fp + -8 ], %g2 200aa7c: d0 07 bf f4 ld [ %fp + -12 ], %o0 200aa80: c2 00 60 04 ld [ %g1 + 4 ], %g1 200aa84: 90 22 00 02 sub %o0, %g2, %o0 200aa88: 10 80 00 46 b 200aba0 200aa8c: 90 07 40 08 add %i5, %o0, %o0 } } else { if ( !node->Parent ) 200aa90: 80 a7 20 00 cmp %i4, 0 200aa94: 32 bf ff b9 bne,a 200a978 200aa98: f8 26 40 00 st %i4, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200aa9c: 40 00 0c 7c call 200dc8c <__errno> 200aaa0: 01 00 00 00 nop 200aaa4: 10 80 00 73 b 200ac70 200aaa8: f0 22 00 00 st %i0, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200aaac: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200aab0: 80 a0 60 03 cmp %g1, 3 200aab4: 12 80 00 0a bne 200aadc 200aab8: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 200aabc: 90 10 00 19 mov %i1, %o0 200aac0: 7f ff ff 78 call 200a8a0 200aac4: 92 10 20 00 clr %o1 if ( result == -1 ) 200aac8: 80 a2 3f ff cmp %o0, -1 200aacc: 12 80 00 0c bne 200aafc <== ALWAYS TAKEN 200aad0: b0 10 00 08 mov %o0, %i0 200aad4: 81 c7 e0 08 ret <== NOT EXECUTED 200aad8: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200aadc: 32 80 00 09 bne,a 200ab00 200aae0: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 200aae4: 90 10 00 19 mov %i1, %o0 200aae8: 7f ff ff 6e call 200a8a0 200aaec: 92 10 20 00 clr %o1 if ( result == -1 ) 200aaf0: 80 a2 3f ff cmp %o0, -1 200aaf4: 02 bf ff f8 be 200aad4 <== NEVER TAKEN 200aaf8: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 200aafc: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200ab00: 80 a2 20 00 cmp %o0, 0 200ab04: 02 80 00 57 be 200ac60 <== NEVER TAKEN 200ab08: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200ab0c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200ab10: 80 a0 60 01 cmp %g1, 1 200ab14: 12 80 00 53 bne 200ac60 200ab18: 01 00 00 00 nop /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200ab1c: 40 00 00 92 call 200ad64 200ab20: 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 ) 200ab24: b8 92 20 00 orcc %o0, 0, %i4 200ab28: 02 80 00 32 be 200abf0 200ab2c: c2 07 bf f8 ld [ %fp + -8 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200ab30: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ab34: 80 a0 60 01 cmp %g1, 1 200ab38: 32 bf ff 90 bne,a 200a978 200ab3c: f8 26 40 00 st %i4, [ %i1 ] 200ab40: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200ab44: 80 a0 60 00 cmp %g1, 0 200ab48: 02 80 00 20 be 200abc8 200ab4c: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( path, &pathlen, &i); 200ab50: 92 07 bf fc add %fp, -4, %o1 200ab54: 7f ff fe 16 call 200a3ac 200ab58: 94 07 bf f4 add %fp, -12, %o2 if ((path[i] != '.') || (path[i + 1] != '.')) { 200ab5c: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ab60: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200ab64: 80 a0 a0 2e cmp %g2, 0x2e 200ab68: 12 80 00 06 bne 200ab80 200ab6c: b0 07 40 01 add %i5, %g1, %i0 200ab70: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200ab74: 80 a0 a0 2e cmp %g2, 0x2e 200ab78: 02 80 00 0f be 200abb4 <== ALWAYS TAKEN 200ab7c: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200ab80: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200ab84: 90 10 00 19 mov %i1, %o0 200ab88: 92 02 60 1c add %o1, 0x1c, %o1 200ab8c: 40 00 0e 9c call 200e5fc 200ab90: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i], 200ab94: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ab98: 90 10 00 18 mov %i0, %o0 200ab9c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200aba0: 92 10 00 19 mov %i1, %o1 200aba4: 9f c0 40 00 call %g1 200aba8: 94 10 00 1a mov %i2, %o2 200abac: 81 c7 e0 08 ret 200abb0: 91 e8 00 08 restore %g0, %o0, %o0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200abb4: 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; 200abb8: c2 27 bf f4 st %g1, [ %fp + -12 ] pathlen -= 2; 200abbc: c2 07 bf fc ld [ %fp + -4 ], %g1 200abc0: 82 00 7f fe add %g1, -2, %g1 200abc4: c2 27 bf fc st %g1, [ %fp + -4 ] node = node->Parent; } pathloc->node_access = node; 200abc8: 10 bf ff 6c b 200a978 200abcc: f8 26 40 00 st %i4, [ %i1 ] } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200abd0: 40 00 0c 2f call 200dc8c <__errno> 200abd4: 01 00 00 00 nop 200abd8: 10 80 00 25 b 200ac6c 200abdc: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200abe0: 40 00 0c 2b call 200dc8c <__errno> 200abe4: 01 00 00 00 nop 200abe8: 10 80 00 21 b 200ac6c 200abec: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200abf0: c4 07 bf f4 ld [ %fp + -12 ], %g2 200abf4: 82 20 80 01 sub %g2, %g1, %g1 200abf8: 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++) { 200abfc: 10 80 00 0d b 200ac30 200ac00: c2 26 80 00 st %g1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 200ac04: 7f ff e4 35 call 2003cd8 200ac08: 01 00 00 00 nop 200ac0c: 80 a2 20 00 cmp %o0, 0 200ac10: 32 80 00 06 bne,a 200ac28 200ac14: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 200ac18: 40 00 0c 1d call 200dc8c <__errno> 200ac1c: 01 00 00 00 nop 200ac20: 10 80 00 13 b 200ac6c 200ac24: 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++) { 200ac28: 82 00 60 01 inc %g1 200ac2c: c2 27 bf f4 st %g1, [ %fp + -12 ] 200ac30: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ac34: d0 4f 40 01 ldsb [ %i5 + %g1 ], %o0 200ac38: 80 a2 20 00 cmp %o0, 0 200ac3c: 12 bf ff f2 bne 200ac04 200ac40: 01 00 00 00 nop /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200ac44: 7f ff fd f2 call 200a40c 200ac48: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200ac4c: c2 06 40 00 ld [ %i1 ], %g1 200ac50: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200ac54: 80 a0 60 01 cmp %g1, 1 200ac58: 02 80 00 08 be 200ac78 <== ALWAYS TAKEN 200ac5c: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200ac60: 40 00 0c 0b call 200dc8c <__errno> 200ac64: 01 00 00 00 nop 200ac68: 82 10 20 14 mov 0x14, %g1 ! 14 200ac6c: c2 22 00 00 st %g1, [ %o0 ] 200ac70: 81 c7 e0 08 ret 200ac74: 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 ) ) 200ac78: 90 10 00 19 mov %i1, %o0 200ac7c: 7f ff fd ff call 200a478 200ac80: 92 10 20 03 mov 3, %o1 200ac84: 80 a2 20 00 cmp %o0, 0 200ac88: 12 80 00 06 bne 200aca0 200ac8c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200ac90: 40 00 0b ff call 200dc8c <__errno> 200ac94: b0 10 3f ff mov -1, %i0 ! ffffffff 200ac98: 82 10 20 0d mov 0xd, %g1 200ac9c: c2 22 00 00 st %g1, [ %o0 ] return result; } 200aca0: 81 c7 e0 08 ret 200aca4: 81 e8 00 00 restore =============================================================================== 0200a478 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200a478: 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 ) ) 200a47c: 80 8e 7f f8 btst -8, %i1 200a480: 22 80 00 08 be,a 200a4a0 <== ALWAYS TAKEN 200a484: c2 06 00 00 ld [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 200a488: 40 00 0e 01 call 200dc8c <__errno> <== NOT EXECUTED 200a48c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a490: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a494: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a498: 81 c7 e0 08 ret <== NOT EXECUTED 200a49c: 81 e8 00 00 restore <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200a4a0: 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 ) 200a4a4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 return 1; 200a4a8: b2 2e 40 01 andn %i1, %g1, %i1 200a4ac: 80 a0 00 19 cmp %g0, %i1 200a4b0: b0 60 3f ff subx %g0, -1, %i0 return 0; } 200a4b4: 81 c7 e0 08 ret 200a4b8: 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 60 call 200d28c 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 63 call 200f2b0 <__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 c6 call 200d070 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 47 call 200f2b0 <__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 =============================================================================== 0200ad64 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200ad64: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200ad68: 13 00 80 65 sethi %hi(0x2019400), %o1 200ad6c: 90 10 00 19 mov %i1, %o0 200ad70: 40 00 0f 6e call 200eb28 200ad74: 92 12 63 f0 or %o1, 0x3f0, %o1 200ad78: 80 a2 20 00 cmp %o0, 0 200ad7c: 02 80 00 09 be 200ada0 <== NEVER TAKEN 200ad80: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200ad84: 13 00 80 65 sethi %hi(0x2019400), %o1 200ad88: 40 00 0f 68 call 200eb28 200ad8c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 20197f8 200ad90: 80 a2 20 00 cmp %o0, 0 200ad94: 32 80 00 05 bne,a 200ada8 <== ALWAYS TAKEN 200ad98: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; 200ad9c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200ada0: 81 c7 e0 08 ret 200ada4: 81 e8 00 00 restore the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200ada8: 10 80 00 08 b 200adc8 200adac: 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 ) ) 200adb0: 40 00 0f 5e call 200eb28 200adb4: 92 07 60 0c add %i5, 0xc, %o1 200adb8: 80 a2 20 00 cmp %o0, 0 200adbc: 22 bf ff f9 be,a 200ada0 200adc0: 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 ) { 200adc4: 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 ); 200adc8: 80 a7 40 18 cmp %i5, %i0 200adcc: 12 bf ff f9 bne 200adb0 200add0: 90 10 00 19 mov %i1, %o0 200add4: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200add8: 81 c7 e0 08 ret 200addc: 81 e8 00 00 restore =============================================================================== 0200aca8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200aca8: 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; 200acac: 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; 200acb0: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 loc = temp_mt_entry->mt_fs_root; 200acb4: b8 07 bf ec add %fp, -20, %i4 200acb8: 92 06 20 1c add %i0, 0x1c, %o1 200acbc: 40 00 0e 50 call 200e5fc 200acc0: 90 10 00 1c mov %i4, %o0 200acc4: c0 26 20 1c clr [ %i0 + 0x1c ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200acc8: f0 07 60 08 ld [ %i5 + 8 ], %i0 loc.node_access = (void *)jnode; 200accc: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200acd0: 7f ff fd cf call 200a40c 200acd4: 90 10 00 1c mov %i4, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200acd8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200acdc: 80 a0 60 01 cmp %g1, 1 200ace0: 32 80 00 08 bne,a 200ad00 200ace4: 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 ) ) { 200ace8: 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 ); 200acec: 82 07 60 54 add %i5, 0x54, %g1 200acf0: 80 a0 80 01 cmp %g2, %g1 200acf4: 12 80 00 09 bne 200ad18 200acf8: 80 a7 60 00 cmp %i5, 0 result = IMFS_unlink( NULL, &loc ); 200acfc: 90 10 20 00 clr %o0 200ad00: 7f ff de 73 call 20026cc 200ad04: 92 10 00 1c mov %i4, %o1 if (result != 0) 200ad08: 80 a2 20 00 cmp %o0, 0 200ad0c: 12 80 00 12 bne 200ad54 <== NEVER TAKEN 200ad10: ba 10 00 18 mov %i0, %i5 return -1; jnode = next; } if ( jnode != NULL ) { 200ad14: 80 a7 60 00 cmp %i5, 0 200ad18: 02 80 00 11 be 200ad5c 200ad1c: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200ad20: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ad24: 80 a0 60 01 cmp %g1, 1 200ad28: 32 bf ff e9 bne,a 200accc <== NEVER TAKEN 200ad2c: 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; 200ad30: 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 ); 200ad34: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200ad38: 80 a0 40 02 cmp %g1, %g2 200ad3c: 02 bf ff e3 be 200acc8 200ad40: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200ad44: 12 bf ff e1 bne 200acc8 <== ALWAYS TAKEN 200ad48: ba 10 00 01 mov %g1, %i5 return 0; 200ad4c: 81 c7 e0 08 ret <== NOT EXECUTED 200ad50: 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; 200ad54: 81 c7 e0 08 ret <== NOT EXECUTED 200ad58: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 200ad5c: 81 c7 e0 08 ret 200ad60: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200ade0 : const char *path, int pathlen, char *token, int *token_len ) { 200ade0: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200ade4: 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) ) { 200ade8: 10 80 00 06 b 200ae00 200adec: f8 0e 00 00 ldub [ %i0 ], %i4 token[i] = c; if ( i == IMFS_NAME_MAX ) 200adf0: 02 80 00 32 be 200aeb8 200adf4: 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]; 200adf8: ba 07 60 01 inc %i5 200adfc: 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) ) { 200ae00: 91 2f 20 18 sll %i4, 0x18, %o0 200ae04: 7f ff e3 b5 call 2003cd8 200ae08: 91 3a 20 18 sra %o0, 0x18, %o0 200ae0c: 80 a2 20 00 cmp %o0, 0 200ae10: 12 80 00 04 bne 200ae20 200ae14: 80 a7 40 19 cmp %i5, %i1 200ae18: 06 bf ff f6 bl 200adf0 <== ALWAYS TAKEN 200ae1c: 80 a7 60 20 cmp %i5, 0x20 /* * Copy a seperator into token. */ if ( i == 0 ) { 200ae20: 80 a7 60 00 cmp %i5, 0 200ae24: 12 80 00 0e bne 200ae5c 200ae28: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; 200ae2c: f8 2e 80 00 stb %i4, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200ae30: b9 2f 20 18 sll %i4, 0x18, %i4 200ae34: 80 a7 20 00 cmp %i4, 0 200ae38: 02 80 00 07 be 200ae54 200ae3c: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; 200ae40: b0 10 20 01 mov 1, %i0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200ae44: 80 a6 60 00 cmp %i1, 0 200ae48: 12 80 00 0a bne 200ae70 200ae4c: ba 10 20 01 mov 1, %i5 200ae50: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200ae54: 10 80 00 07 b 200ae70 200ae58: b0 10 20 00 clr %i0 } } else if (token[ i-1 ] != '\0') { 200ae5c: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200ae60: 80 a0 60 00 cmp %g1, 0 200ae64: 02 80 00 03 be 200ae70 <== NEVER TAKEN 200ae68: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200ae6c: 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 ) { 200ae70: 80 a6 20 03 cmp %i0, 3 200ae74: 12 80 00 0f bne 200aeb0 200ae78: fa 26 c0 00 st %i5, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200ae7c: 90 10 00 1a mov %i2, %o0 200ae80: 13 00 80 66 sethi %hi(0x2019800), %o1 200ae84: 40 00 0f 29 call 200eb28 200ae88: 92 12 60 00 mov %o1, %o1 ! 2019800 200ae8c: 80 a2 20 00 cmp %o0, 0 200ae90: 02 80 00 0c be 200aec0 200ae94: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200ae98: 13 00 80 66 sethi %hi(0x2019800), %o1 200ae9c: 40 00 0f 23 call 200eb28 200aea0: 92 12 60 08 or %o1, 8, %o1 ! 2019808 200aea4: 80 a2 20 00 cmp %o0, 0 200aea8: 22 80 00 02 be,a 200aeb0 200aeac: b0 10 20 01 mov 1, %i0 200aeb0: 81 c7 e0 08 ret 200aeb4: 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; 200aeb8: 81 c7 e0 08 ret 200aebc: 91 e8 20 04 restore %g0, 4, %o0 200aec0: b0 10 20 02 mov 2, %i0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200aec4: 81 c7 e0 08 ret 200aec8: 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 60 ec ld [ %g1 + 0xec ], %g1 ! 201a8ec 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 0e call 200a350 200231c: c2 20 a0 5c st %g1, [ %g2 + 0x5c ] ! 201b05c 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 b0 call 200e5fc 2002340: 92 12 63 bc or %o1, 0x3bc, %o1 ! 20197bc /* * 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 4a call 200dc8c <__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 60 ld [ %g1 + 0x60 ], %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 60 st %g2, [ %g1 + 0x60 ] 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 =============================================================================== 0200ccbc : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200ccbc: 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 ) 200ccc0: 03 00 80 6c sethi %hi(0x201b000), %g1 200ccc4: fa 00 60 5c ld [ %g1 + 0x5c ], %i5 ! 201b05c 200ccc8: b9 37 60 02 srl %i5, 2, %i4 200cccc: 92 10 00 1c mov %i4, %o1 200ccd0: 40 00 27 2f call 201698c <.umul> 200ccd4: 90 07 20 01 add %i4, 1, %o0 200ccd8: 92 10 00 1c mov %i4, %o1 200ccdc: 40 00 27 2c call 201698c <.umul> 200cce0: 90 02 20 01 inc %o0 200cce4: 92 10 00 1d mov %i5, %o1 200cce8: 40 00 27 29 call 201698c <.umul> 200ccec: 90 02 3f ff add %o0, -1, %o0 200ccf0: 82 10 20 00 clr %g1 200ccf4: 80 a0 40 19 cmp %g1, %i1 200ccf8: 34 80 00 0b bg,a 200cd24 200ccfc: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 200cd00: 80 a0 40 19 cmp %g1, %i1 200cd04: 12 80 00 04 bne 200cd14 <== NEVER TAKEN 200cd08: 80 a2 00 1a cmp %o0, %i2 200cd0c: 38 80 00 06 bgu,a 200cd24 200cd10: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200cd14: 40 00 03 de call 200dc8c <__errno> 200cd18: 01 00 00 00 nop 200cd1c: 10 80 00 29 b 200cdc0 200cd20: 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 ) 200cd24: 80 a6 40 1c cmp %i1, %i4 200cd28: 14 80 00 07 bg 200cd44 <== NEVER TAKEN 200cd2c: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200cd30: 80 a6 40 1c cmp %i1, %i4 200cd34: 12 80 00 37 bne 200ce10 200cd38: 80 a6 80 10 cmp %i2, %l0 200cd3c: 08 80 00 35 bleu 200ce10 200cd40: 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; 200cd44: b7 3f 60 1f sra %i5, 0x1f, %i3 200cd48: 96 10 00 1d mov %i5, %o3 200cd4c: 94 10 00 1b mov %i3, %o2 200cd50: 90 10 00 19 mov %i1, %o0 200cd54: 40 00 28 a0 call 2016fd4 <__divdi3> 200cd58: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cd5c: 90 10 00 1c mov %i4, %o0 200cd60: 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; 200cd64: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cd68: 94 10 00 1b mov %i3, %o2 200cd6c: 40 00 28 9a call 2016fd4 <__divdi3> 200cd70: 92 10 00 10 mov %l0, %o1 200cd74: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200cd78: 10 80 00 15 b 200cdcc 200cd7c: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200cd80: 7f ff ff 48 call 200caa0 200cd84: 92 10 00 1d mov %i5, %o1 200cd88: 80 a2 20 00 cmp %o0, 0 200cd8c: 22 80 00 10 be,a 200cdcc 200cd90: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200cd94: 10 80 00 06 b 200cdac 200cd98: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200cd9c: 90 10 00 18 mov %i0, %o0 200cda0: 7f ff ff bb call 200cc8c 200cda4: 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-- ) { 200cda8: 80 a7 40 1c cmp %i5, %i4 200cdac: 1a bf ff fc bcc 200cd9c 200cdb0: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200cdb4: 40 00 03 b6 call 200dc8c <__errno> 200cdb8: 01 00 00 00 nop 200cdbc: 82 10 20 1c mov 0x1c, %g1 ! 1c 200cdc0: c2 22 00 00 st %g1, [ %o0 ] 200cdc4: 81 c7 e0 08 ret 200cdc8: 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++ ) { 200cdcc: 80 a7 40 11 cmp %i5, %l1 200cdd0: 08 bf ff ec bleu 200cd80 200cdd4: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200cdd8: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200cddc: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200cde0: 92 10 20 00 clr %o1 200cde4: 7f ff d8 26 call 2002e7c 200cde8: 90 07 bf f8 add %fp, -8, %o0 200cdec: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200cdf0: 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); 200cdf4: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200cdf8: 7f ff d8 21 call 2002e7c 200cdfc: 92 10 20 00 clr %o1 200ce00: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ce04: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200ce08: 81 c7 e0 08 ret 200ce0c: 91 e8 20 00 restore %g0, 0, %o0 } 200ce10: 81 c7 e0 08 ret 200ce14: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200c614 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200c614: 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 ) { 200c618: 03 00 80 6c sethi %hi(0x201b000), %g1 200c61c: f8 00 60 5c ld [ %g1 + 0x5c ], %i4 ! 201b05c 200c620: b9 37 20 02 srl %i4, 2, %i4 200c624: 82 07 3f ff add %i4, -1, %g1 200c628: 80 a6 40 01 cmp %i1, %g1 200c62c: 18 80 00 18 bgu 200c68c 200c630: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200c634: 80 a6 a0 00 cmp %i2, 0 200c638: 02 80 00 0f be 200c674 200c63c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200c640: 80 a0 60 00 cmp %g1, 0 200c644: 32 80 00 09 bne,a 200c668 200c648: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200c64c: 7f ff ff e5 call 200c5e0 200c650: b0 10 20 00 clr %i0 if ( !p ) 200c654: 80 a2 20 00 cmp %o0, 0 200c658: 02 80 00 8a be 200c880 <== NEVER TAKEN 200c65c: 01 00 00 00 nop return 0; info->indirect = p; 200c660: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200c664: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200c668: b3 2e 60 02 sll %i1, 2, %i1 200c66c: 81 c7 e0 08 ret 200c670: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200c674: 80 a0 60 00 cmp %g1, 0 200c678: 02 80 00 82 be 200c880 <== NEVER TAKEN 200c67c: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200c680: b3 2e 60 02 sll %i1, 2, %i1 200c684: 81 c7 e0 08 ret 200c688: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200c68c: 90 07 20 01 add %i4, 1, %o0 200c690: 40 00 28 bf call 201698c <.umul> 200c694: 92 10 00 1c mov %i4, %o1 200c698: 82 02 3f ff add %o0, -1, %g1 200c69c: 80 a6 40 01 cmp %i1, %g1 200c6a0: 18 80 00 2f bgu 200c75c 200c6a4: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200c6a8: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c6ac: 92 10 00 1c mov %i4, %o1 200c6b0: 40 00 29 9d call 2016d24 <.urem> 200c6b4: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c6b8: 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; 200c6bc: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c6c0: 40 00 28 ed call 2016a74 <.udiv> 200c6c4: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200c6c8: 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; 200c6cc: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200c6d0: 02 80 00 18 be 200c730 200c6d4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200c6d8: 80 a2 20 00 cmp %o0, 0 200c6dc: 32 80 00 08 bne,a 200c6fc 200c6e0: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200c6e4: 7f ff ff bf call 200c5e0 200c6e8: b0 10 20 00 clr %i0 if ( !p ) 200c6ec: 80 a2 20 00 cmp %o0, 0 200c6f0: 02 80 00 64 be 200c880 <== NEVER TAKEN 200c6f4: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200c6f8: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200c6fc: ba 02 00 1c add %o0, %i4, %i5 200c700: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200c704: 80 a2 20 00 cmp %o0, 0 200c708: 12 80 00 4f bne 200c844 200c70c: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200c710: 7f ff ff b4 call 200c5e0 200c714: b0 10 20 00 clr %i0 if ( !p1 ) 200c718: 80 a2 20 00 cmp %o0, 0 200c71c: 02 80 00 59 be 200c880 <== NEVER TAKEN 200c720: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200c724: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200c728: 10 80 00 47 b 200c844 200c72c: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200c730: 80 a2 20 00 cmp %o0, 0 200c734: 02 80 00 53 be 200c880 <== NEVER TAKEN 200c738: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200c73c: b9 2f 20 02 sll %i4, 2, %i4 200c740: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200c744: 80 a0 60 00 cmp %g1, 0 200c748: 02 80 00 4e be 200c880 <== NEVER TAKEN 200c74c: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200c750: b1 2e e0 02 sll %i3, 2, %i0 200c754: 81 c7 e0 08 ret 200c758: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200c75c: 90 02 20 01 inc %o0 200c760: 40 00 28 8b call 201698c <.umul> 200c764: 92 10 00 1c mov %i4, %o1 200c768: 90 02 3f ff add %o0, -1, %o0 200c76c: 80 a6 40 08 cmp %i1, %o0 200c770: 18 80 00 44 bgu 200c880 <== NEVER TAKEN 200c774: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200c778: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200c77c: 92 10 00 1c mov %i4, %o1 200c780: 40 00 29 69 call 2016d24 <.urem> 200c784: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c788: 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; 200c78c: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200c790: 40 00 28 b9 call 2016a74 <.udiv> 200c794: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200c798: 92 10 00 1c mov %i4, %o1 200c79c: 40 00 28 b6 call 2016a74 <.udiv> 200c7a0: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c7a4: 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; 200c7a8: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200c7ac: 40 00 29 5e call 2016d24 <.urem> 200c7b0: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200c7b4: 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; 200c7b8: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200c7bc: 02 80 00 24 be 200c84c 200c7c0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200c7c4: 80 a2 20 00 cmp %o0, 0 200c7c8: 12 80 00 08 bne 200c7e8 200c7cc: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200c7d0: 7f ff ff 84 call 200c5e0 200c7d4: 01 00 00 00 nop if ( !p ) 200c7d8: 80 a2 20 00 cmp %o0, 0 200c7dc: 02 80 00 29 be 200c880 <== NEVER TAKEN 200c7e0: 01 00 00 00 nop return 0; info->triply_indirect = p; 200c7e4: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200c7e8: ba 02 00 1b add %o0, %i3, %i5 200c7ec: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200c7f0: 80 a2 20 00 cmp %o0, 0 200c7f4: 32 80 00 08 bne,a 200c814 200c7f8: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200c7fc: 7f ff ff 79 call 200c5e0 200c800: b0 10 20 00 clr %i0 if ( !p1 ) 200c804: 80 a2 20 00 cmp %o0, 0 200c808: 02 80 00 1e be 200c880 <== NEVER TAKEN 200c80c: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200c810: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200c814: ba 02 00 1c add %o0, %i4, %i5 200c818: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200c81c: 80 a2 20 00 cmp %o0, 0 200c820: 12 80 00 09 bne 200c844 200c824: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200c828: 7f ff ff 6e call 200c5e0 200c82c: b0 10 20 00 clr %i0 if ( !p2 ) 200c830: 80 a2 20 00 cmp %o0, 0 200c834: 02 80 00 13 be 200c880 <== NEVER TAKEN 200c838: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200c83c: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200c840: b1 2c 20 02 sll %l0, 2, %i0 200c844: 81 c7 e0 08 ret 200c848: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200c84c: 80 a2 20 00 cmp %o0, 0 200c850: 02 80 00 0c be 200c880 <== NEVER TAKEN 200c854: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200c858: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200c85c: 80 a0 60 00 cmp %g1, 0 200c860: 02 80 00 08 be 200c880 <== NEVER TAKEN 200c864: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200c868: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200c86c: 80 a0 60 00 cmp %g1, 0 200c870: 02 80 00 04 be 200c880 <== NEVER TAKEN 200c874: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200c878: b1 2c 20 02 sll %l0, 2, %i0 200c87c: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200c880: 81 c7 e0 08 ret 200c884: 81 e8 00 00 restore =============================================================================== 0200c888 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c888: 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) { 200c88c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200c890: ba 10 00 18 mov %i0, %i5 200c894: 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) { 200c898: 80 a0 60 06 cmp %g1, 6 200c89c: 12 80 00 1c bne 200c90c 200c8a0: 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)) 200c8a4: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200c8a8: 82 10 20 00 clr %g1 200c8ac: 86 a3 40 1a subcc %o5, %i2, %g3 200c8b0: 84 63 00 19 subx %o4, %i1, %g2 200c8b4: 80 a0 40 02 cmp %g1, %g2 200c8b8: 14 80 00 07 bg 200c8d4 <== NEVER TAKEN 200c8bc: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200c8c0: 80 a0 40 02 cmp %g1, %g2 200c8c4: 12 80 00 06 bne 200c8dc <== NEVER TAKEN 200c8c8: 80 a7 00 03 cmp %i4, %g3 200c8cc: 28 80 00 05 bleu,a 200c8e0 <== NEVER TAKEN 200c8d0: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200c8d4: 10 80 00 03 b 200c8e0 200c8d8: 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; 200c8dc: 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); 200c8e0: 92 02 40 11 add %o1, %l1, %o1 200c8e4: 94 10 00 18 mov %i0, %o2 200c8e8: 40 00 07 45 call 200e5fc 200c8ec: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200c8f0: 90 07 bf f8 add %fp, -8, %o0 200c8f4: 7f ff d9 62 call 2002e7c 200c8f8: 92 10 20 00 clr %o1 200c8fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 200c900: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200c904: 81 c7 e0 08 ret 200c908: 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 ) 200c90c: 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; 200c910: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200c914: 88 10 20 00 clr %g4 200c918: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200c91c: 80 a1 00 03 cmp %g4, %g3 200c920: 14 80 00 08 bg 200c940 <== NEVER TAKEN 200c924: b4 07 00 1a add %i4, %i2, %i2 200c928: 80 a1 00 03 cmp %g4, %g3 200c92c: 32 80 00 07 bne,a 200c948 <== NEVER TAKEN 200c930: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200c934: 80 a6 80 02 cmp %i2, %g2 200c938: 28 80 00 04 bleu,a 200c948 200c93c: 03 00 80 6c sethi %hi(0x201b000), %g1 my_length = the_jnode->info.file.size - start; 200c940: 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; 200c944: 03 00 80 6c sethi %hi(0x201b000), %g1 200c948: f4 00 60 5c ld [ %g1 + 0x5c ], %i2 ! 201b05c 200c94c: 90 10 00 10 mov %l0, %o0 200c950: b1 3e a0 1f sra %i2, 0x1f, %i0 200c954: 92 10 00 11 mov %l1, %o1 200c958: 94 10 00 18 mov %i0, %o2 200c95c: 40 00 2a 84 call 201736c <__moddi3> 200c960: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c964: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200c968: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200c96c: 94 10 00 18 mov %i0, %o2 200c970: 92 10 00 11 mov %l1, %o1 200c974: 40 00 29 98 call 2016fd4 <__divdi3> 200c978: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200c97c: 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; 200c980: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200c984: 80 a6 60 00 cmp %i1, 0 200c988: 02 80 00 14 be 200c9d8 200c98c: 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 ); 200c990: 90 10 00 1d mov %i5, %o0 200c994: 7f ff ff 20 call 200c614 200c998: 94 10 20 00 clr %o2 if ( !block_ptr ) 200c99c: 80 a2 20 00 cmp %o0, 0 200c9a0: 02 bf ff d9 be 200c904 <== NEVER TAKEN 200c9a4: 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; 200c9a8: 80 a7 00 1a cmp %i4, %i2 200c9ac: 08 80 00 03 bleu 200c9b8 200c9b0: b0 10 00 1c mov %i4, %i0 200c9b4: 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 ); 200c9b8: d2 02 00 00 ld [ %o0 ], %o1 200c9bc: 94 10 00 18 mov %i0, %o2 200c9c0: 90 10 00 1b mov %i3, %o0 200c9c4: 92 02 40 19 add %o1, %i1, %o1 200c9c8: 40 00 07 0d call 200e5fc 200c9cc: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200c9d0: a0 04 20 01 inc %l0 my_length -= to_copy; 200c9d4: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200c9d8: 35 00 80 6c sethi %hi(0x201b000), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200c9dc: 10 80 00 0f b 200ca18 200c9e0: f6 06 a0 5c ld [ %i2 + 0x5c ], %i3 ! 201b05c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200c9e4: 92 10 00 10 mov %l0, %o1 200c9e8: 7f ff ff 0b call 200c614 200c9ec: 94 10 20 00 clr %o2 if ( !block_ptr ) 200c9f0: 82 92 20 00 orcc %o0, 0, %g1 200c9f4: 02 bf ff c4 be 200c904 <== NEVER TAKEN 200c9f8: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200c9fc: d2 00 40 00 ld [ %g1 ], %o1 200ca00: 94 10 00 1b mov %i3, %o2 200ca04: 40 00 06 fe call 200e5fc 200ca08: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200ca0c: a0 04 20 01 inc %l0 my_length -= to_copy; 200ca10: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200ca14: 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 ) { 200ca18: c2 06 a0 5c ld [ %i2 + 0x5c ], %g1 200ca1c: 80 a7 00 01 cmp %i4, %g1 200ca20: 1a bf ff f1 bcc 200c9e4 200ca24: 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 ) { 200ca28: 80 a7 20 00 cmp %i4, 0 200ca2c: 02 80 00 0e be 200ca64 200ca30: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ca34: 90 10 00 1d mov %i5, %o0 200ca38: 92 10 00 10 mov %l0, %o1 200ca3c: 7f ff fe f6 call 200c614 200ca40: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ca44: 82 92 20 00 orcc %o0, 0, %g1 200ca48: 02 bf ff af be 200c904 <== NEVER TAKEN 200ca4c: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200ca50: d2 00 40 00 ld [ %g1 ], %o1 200ca54: 94 10 00 1c mov %i4, %o2 200ca58: 40 00 06 e9 call 200e5fc 200ca5c: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200ca60: 90 07 bf f8 add %fp, -8, %o0 200ca64: 7f ff d9 06 call 2002e7c 200ca68: 92 10 20 00 clr %o1 200ca6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ca70: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200ca74: 81 c7 e0 08 ret 200ca78: 81 e8 00 00 restore =============================================================================== 0200cb5c : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200cb5c: 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; 200cb60: 03 00 80 6c sethi %hi(0x201b000), %g1 200cb64: fa 00 60 5c ld [ %g1 + 0x5c ], %i5 ! 201b05c * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200cb68: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200cb6c: 80 a0 60 00 cmp %g1, 0 200cb70: 02 80 00 05 be 200cb84 200cb74: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200cb78: 90 06 20 58 add %i0, 0x58, %o0 200cb7c: 7f ff ff e5 call 200cb10 200cb80: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200cb84: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200cb88: b8 10 20 00 clr %i4 200cb8c: 80 a0 60 00 cmp %g1, 0 200cb90: 12 80 00 0d bne 200cbc4 200cb94: 37 00 80 6c sethi %hi(0x201b000), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200cb98: 10 80 00 15 b 200cbec 200cb9c: 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( 200cba0: 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] ) { 200cba4: 90 00 80 01 add %g2, %g1, %o0 200cba8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200cbac: 80 a0 60 00 cmp %g1, 0 200cbb0: 22 80 00 05 be,a 200cbc4 <== NEVER TAKEN 200cbb4: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200cbb8: 7f ff ff d6 call 200cb10 200cbbc: 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 200cbd4: 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 ); 200cbd8: 90 06 20 5c add %i0, 0x5c, %o0 200cbdc: 7f ff ff cd call 200cb10 200cbe0: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200cbe4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200cbe8: b8 10 20 00 clr %i4 200cbec: 80 a0 60 00 cmp %g1, 0 200cbf0: 12 80 00 1c bne 200cc60 200cbf4: 33 00 80 6c sethi %hi(0x201b000), %i1 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200cbf8: 81 c7 e0 08 ret 200cbfc: 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( 200cc00: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200cc04: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200cc08: 80 a6 e0 00 cmp %i3, 0 200cc0c: 02 80 00 1b be 200cc78 <== NEVER TAKEN 200cc10: 90 06 20 60 add %i0, 0x60, %o0 200cc14: 10 80 00 09 b 200cc38 200cc18: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200cc24: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200cc28: 7f ff ff ba call 200cb10 200cc2c: 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 200cc48: 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( 200cc4c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200cc50: 92 10 00 1d mov %i5, %o1 200cc54: 90 02 00 10 add %o0, %l0, %o0 200cc58: 7f ff ff ae call 200cb10 200cc5c: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200cc70: 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( 200cc74: 90 06 20 60 add %i0, 0x60, %o0 200cc78: 7f ff ff a6 call 200cb10 200cc7c: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return 0; } 200cc80: b0 10 20 00 clr %i0 200cc84: 81 c7 e0 08 ret 200cc88: 81 e8 00 00 restore =============================================================================== 0200ce18 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce18: 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 ) { 200ce1c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ce20: 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 ) { 200ce24: 80 a0 60 00 cmp %g1, 0 200ce28: 06 80 00 09 bl 200ce4c <== NEVER TAKEN 200ce2c: 94 07 00 1a add %i4, %i2, %o2 200ce30: 80 a0 60 00 cmp %g1, 0 200ce34: 12 80 00 12 bne 200ce7c <== NEVER TAKEN 200ce38: 03 00 80 6c sethi %hi(0x201b000), %g1 200ce3c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200ce40: 80 a0 40 0a cmp %g1, %o2 200ce44: 1a 80 00 0e bcc 200ce7c 200ce48: 03 00 80 6c sethi %hi(0x201b000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200ce4c: 90 10 00 1d mov %i5, %o0 200ce50: 7f ff ff 9b call 200ccbc 200ce54: 92 10 20 00 clr %o1 if ( status ) 200ce58: 80 a2 20 00 cmp %o0, 0 200ce5c: 02 80 00 08 be 200ce7c 200ce60: 03 00 80 6c sethi %hi(0x201b000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200ce64: 40 00 03 8a call 200dc8c <__errno> 200ce68: b0 10 3f ff mov -1, %i0 200ce6c: 82 10 20 1c mov 0x1c, %g1 200ce70: c2 22 00 00 st %g1, [ %o0 ] 200ce74: 81 c7 e0 08 ret 200ce78: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ce7c: e0 00 60 5c ld [ %g1 + 0x5c ], %l0 200ce80: 92 10 00 1a mov %i2, %o1 200ce84: b1 3c 20 1f sra %l0, 0x1f, %i0 200ce88: 96 10 00 10 mov %l0, %o3 200ce8c: 94 10 00 18 mov %i0, %o2 200ce90: 40 00 29 37 call 201736c <__moddi3> 200ce94: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200ce98: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ce9c: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200cea0: 90 10 00 19 mov %i1, %o0 200cea4: 92 10 00 1a mov %i2, %o1 200cea8: 40 00 28 4b call 2016fd4 <__divdi3> 200ceac: 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; 200ceb0: 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 ) { 200ceb4: 80 a4 60 00 cmp %l1, 0 200ceb8: 02 80 00 14 be 200cf08 200cebc: 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 ); 200cec0: 90 10 00 1d mov %i5, %o0 200cec4: 7f ff fd d4 call 200c614 200cec8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cecc: 80 a2 20 00 cmp %o0, 0 200ced0: 02 80 00 36 be 200cfa8 <== NEVER TAKEN 200ced4: 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; 200ced8: b0 24 00 11 sub %l0, %l1, %i0 200cedc: 80 a6 00 1c cmp %i0, %i4 200cee0: 38 80 00 02 bgu,a 200cee8 200cee4: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200cee8: d0 02 00 00 ld [ %o0 ], %o0 200ceec: 92 10 00 1b mov %i3, %o1 200cef0: 90 02 00 11 add %o0, %l1, %o0 200cef4: 94 10 00 18 mov %i0, %o2 200cef8: 40 00 05 c1 call 200e5fc 200cefc: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200cf00: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cf04: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200cf08: 21 00 80 6c sethi %hi(0x201b000), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200cf0c: 10 80 00 0f b 200cf48 200cf10: f2 04 20 5c ld [ %l0 + 0x5c ], %i1 ! 201b05c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cf14: 92 10 00 1a mov %i2, %o1 200cf18: 7f ff fd bf call 200c614 200cf1c: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf20: 80 a2 20 00 cmp %o0, 0 200cf24: 02 bf ff d4 be 200ce74 <== NEVER TAKEN 200cf28: 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 ); 200cf2c: d0 02 00 00 ld [ %o0 ], %o0 200cf30: 94 10 00 19 mov %i1, %o2 200cf34: 40 00 05 b2 call 200e5fc 200cf38: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200cf3c: b4 06 a0 01 inc %i2 my_length -= to_copy; 200cf40: 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( 200cf44: 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 ) { 200cf48: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 200cf4c: 80 a7 00 01 cmp %i4, %g1 200cf50: 1a bf ff f1 bcc 200cf14 200cf54: 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 ) { 200cf58: 80 a7 20 00 cmp %i4, 0 200cf5c: 02 80 00 0e be 200cf94 200cf60: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200cf64: 90 10 00 1d mov %i5, %o0 200cf68: 92 10 00 1a mov %i2, %o1 200cf6c: 7f ff fd aa call 200c614 200cf70: 94 10 20 00 clr %o2 if ( !block_ptr ) 200cf74: 80 a2 20 00 cmp %o0, 0 200cf78: 02 bf ff bf be 200ce74 <== NEVER TAKEN 200cf7c: 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 ); 200cf80: d0 02 00 00 ld [ %o0 ], %o0 200cf84: 94 10 00 1c mov %i4, %o2 200cf88: 40 00 05 9d call 200e5fc 200cf8c: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200cf90: 90 07 bf f8 add %fp, -8, %o0 200cf94: 7f ff d7 ba call 2002e7c 200cf98: 92 10 20 00 clr %o1 200cf9c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200cfa0: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200cfa4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200cfa8: 81 c7 e0 08 ret 200cfac: 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 c8 call 200dc8c <__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 62 b8 ld [ %i5 + 0x2b8 ], %g1 ! 20222b8 <_impure_ptr> 2004e7c: 90 06 20 0c add %i0, 0xc, %o0 2004e80: 40 00 35 78 call 2012460 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 62 b8 ld [ %i5 + 0x2b8 ], %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 62 b8 ld [ %i5 + 0x2b8 ], %g1 2004eb8: 90 10 20 2f mov 0x2f, %o0 2004ebc: 40 00 35 34 call 201238c 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 62 b8 ld [ %i5 + 0x2b8 ], %g1 2004ed0: 13 00 80 81 sethi %hi(0x2020400), %o1 2004ed4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ed8: 92 12 60 d0 or %o1, 0xd0, %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 62 b8 ld [ %i5 + 0x2b8 ], %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 60 e8 or %o1, 0xe8, %o1 ! 20204e8 2004efc: 40 00 35 08 call 201231c 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 62 b8 ld [ %i5 + 0x2b8 ], %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 01 call 201231c 2004f1c: 92 12 60 f8 or %o1, 0xf8, %o1 ! 20204f8 (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 62 b8 ld [ %i5 + 0x2b8 ], %g1 2004f30: 10 80 00 05 b 2004f44 2004f34: b0 16 21 08 or %i0, 0x108, %i0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004f38: c2 07 62 b8 ld [ %i5 + 0x2b8 ], %g1 2004f3c: 31 00 80 81 sethi %hi(0x2020400), %i0 2004f40: b0 16 21 20 or %i0, 0x120, %i0 ! 2020520 2004f44: f2 00 60 08 ld [ %g1 + 8 ], %i1 2004f48: 40 00 35 46 call 2012460 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 f1 call 201231c <== NOT EXECUTED 2004f5c: 93 ee 61 38 restore %i1, 0x138, %o1 <== NOT EXECUTED return; } puts(""); 2004f60: 40 00 3c 2b call 201400c 2004f64: 91 ee 20 80 restore %i0, 0x80, %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 73 call 200f3b0 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 =============================================================================== 0200a3ac : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 200a3ac: 9d e3 bf a0 save %sp, -96, %sp while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a3b0: 10 80 00 07 b 200a3cc 200a3b4: c2 06 80 00 ld [ %i2 ], %g1 ++(*index); 200a3b8: c2 26 80 00 st %g1, [ %i2 ] --(*len); 200a3bc: c2 06 40 00 ld [ %i1 ], %g1 200a3c0: 82 00 7f ff add %g1, -1, %g1 200a3c4: 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 ) { 200a3c8: c2 06 80 00 ld [ %i2 ], %g1 200a3cc: 7f ff e6 43 call 2003cd8 200a3d0: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0 200a3d4: 80 a2 20 00 cmp %o0, 0 200a3d8: 02 80 00 0b be 200a404 200a3dc: 01 00 00 00 nop 200a3e0: c2 06 80 00 ld [ %i2 ], %g1 200a3e4: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 200a3e8: 80 a0 a0 00 cmp %g2, 0 200a3ec: 02 80 00 06 be 200a404 200a3f0: 01 00 00 00 nop 200a3f4: c4 06 40 00 ld [ %i1 ], %g2 200a3f8: 80 a0 a0 00 cmp %g2, 0 200a3fc: 12 bf ff ef bne 200a3b8 <== ALWAYS TAKEN 200a400: 82 00 60 01 inc %g1 200a404: 81 c7 e0 08 ret 200a408: 81 e8 00 00 restore =============================================================================== 0200afd0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200afd0: 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; 200afd4: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200afd8: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200afdc: 84 00 bf fe add %g2, -2, %g2 200afe0: 80 a0 a0 05 cmp %g2, 5 200afe4: 18 80 00 12 bgu 200b02c <== NEVER TAKEN 200afe8: 85 28 a0 02 sll %g2, 2, %g2 200afec: 07 00 80 2b sethi %hi(0x200ac00), %g3 200aff0: 86 10 e3 b8 or %g3, 0x3b8, %g3 ! 200afb8 200aff4: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200aff8: 81 c0 80 00 jmp %g2 200affc: 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 ); 200b000: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200b004: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 200b008: c4 26 60 1c st %g2, [ %i1 + 0x1c ] break; 200b00c: 10 80 00 0e b 200b044 200b010: c6 26 60 18 st %g3, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200b014: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200b018: 10 80 00 0b b 200b044 200b01c: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200b020: c0 26 60 20 clr [ %i1 + 0x20 ] break; 200b024: 10 80 00 08 b 200b044 200b028: c0 26 60 24 clr [ %i1 + 0x24 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200b02c: 40 00 0b 18 call 200dc8c <__errno> 200b030: b0 10 3f ff mov -1, %i0 200b034: 82 10 20 86 mov 0x86, %g1 200b038: c2 22 00 00 st %g1, [ %o0 ] 200b03c: 81 c7 e0 08 ret 200b040: 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; 200b044: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b048: 07 00 00 3f sethi %hi(0xfc00), %g3 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200b04c: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b050: 86 10 e3 fe or %g3, 0x3fe, %g3 200b054: 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 = 200b058: 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; 200b05c: 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 = 200b060: 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; 200b064: c4 26 60 0c st %g2, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; 200b068: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200b06c: c4 36 60 10 sth %g2, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; 200b070: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 200b074: c4 26 60 08 st %g2, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; 200b078: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 200b07c: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; 200b080: c4 10 60 3e lduh [ %g1 + 0x3e ], %g2 200b084: c4 36 60 14 sth %g2, [ %i1 + 0x14 ] buf->st_atime = the_jnode->stat_atime; 200b088: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 200b08c: c4 26 60 28 st %g2, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200b090: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 buf->st_ctime = the_jnode->stat_ctime; 200b094: 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; 200b098: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200b09c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200b0a0: 03 00 80 6a sethi %hi(0x201a800), %g1 200b0a4: c2 00 60 ec ld [ %g1 + 0xec ], %g1 ! 201a8ec 200b0a8: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200b0ac: 81 c7 e0 08 ret 200b0b0: 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 66 call 200dc8c <__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 bb call 200e5fc 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 3c call 200a40c 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 36 call 200dc8c <__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 2f call 200dc8c <__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 8c or %i1, 0x8c, %i1 ! 2014c8c 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 61 f0 ld [ %g1 + 0x1f0 ], %i4 2001f28: 03 00 80 52 sethi %hi(0x2014800), %g1 2001f2c: e2 00 61 f4 ld [ %g1 + 0x1f4 ], %l1 ! 20149f4 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 b0 or %o1, 0x1b0, %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 61 f0 ld [ %g1 + 0x1f0 ], %g1 2001f68: d0 00 a1 f4 ld [ %g2 + 0x1f4 ], %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 c0 or %o1, 0x1c0, %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 e1 f0 ld [ %i3 + 0x1f0 ], %g1 2001f90: d0 07 21 f4 ld [ %i4 + 0x1f4 ], %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 61 d0 or %o1, 0x1d0, %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 61 ec ld [ %g1 + 0x1ec ], %g1 ! 20149ec (*print_handler)( print_context, "Unavailable\n" ); 2001fb8: d0 07 21 f4 ld [ %i4 + 0x1f4 ], %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 e1 f0 ld [ %i3 + 0x1f0 ], %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 61 f0 or %o1, 0x1f0, %o1 ! 20135f0 <== 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 00 or %o1, 0x200, %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 61 ec ld [ %g1 + 0x1ec ], %g1 ! 20149ec 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 7c or %g2, 0x7c, %g1 2002014: 86 10 e0 0d or %g3, 0xd, %g3 2002018: c6 20 a0 7c st %g3, [ %g2 + 0x7c ] 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 8c ld [ %g1 + 0x8c ], %o0 ! 201508c <_Per_CPU_Information> 2002048: 80 a2 20 00 cmp %o0, 0 200204c: 02 80 00 0c be 200207c <== NEVER TAKEN 2002050: 84 10 60 8c or %g1, 0x8c, %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 8c or %g1, 0x8c, %g2 ! 2014c8c 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 8c st %o2, [ %g1 + 0x8c ] (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 2002074: 40 00 30 9d call 200e2e8 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 61 ec st %g2, [ %g1 + 0x1ec ] ! 20149ec 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 08 or %o0, 0x208, %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 18 or %o0, 0x218, %o0 ! 2013618 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 38 or %o0, 0x238, %o0 ! 2013638 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 50 or %o0, 0x250, %o0 ! 2013650 "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 68 or %o0, 0x268, %o0 ! 2013668 ); 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 80 or %o0, 0x280, %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 b8 or %o0, 0x2b8, %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 e2 call 201f7c0 <__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 0b fb call 2012c38 <_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 df call 2014be8 <_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 91 call 20122e8 <_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 =============================================================================== 02007290 <_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 ) { 2007290: 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)) ) { 2007294: 90 10 00 18 mov %i0, %o0 2007298: 40 00 07 33 call 2008f64 <_Thread_queue_Dequeue> 200729c: ba 10 00 18 mov %i0, %i5 20072a0: 80 a2 20 00 cmp %o0, 0 20072a4: 12 80 00 0e bne 20072dc <_CORE_semaphore_Surrender+0x4c> 20072a8: 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 ); 20072ac: 7f ff eb b4 call 200217c 20072b0: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20072b4: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 20072b8: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 20072bc: 80 a0 40 02 cmp %g1, %g2 20072c0: 1a 80 00 05 bcc 20072d4 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 20072c4: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20072c8: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 20072cc: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20072d0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20072d4: 7f ff eb ae call 200218c 20072d8: 01 00 00 00 nop } return status; } 20072dc: 81 c7 e0 08 ret 20072e0: 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 22 dc or %g4, 0x2dc, %g4 ! 201b6dc <_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 30 ld [ %g4 + 0x330 ], %i1 ! 201b730 <_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 30 ld [ %g4 + 0x330 ], %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 30 st %g2, [ %g1 + 0x330 ] ! 201b730 <_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 75 call 2009b18 <_Watchdog_Remove> 2006148: 90 07 60 48 add %i5, 0x48, %o0 200614c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006150: 40 00 09 d6 call 20088a8 <_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 bb call 2008c54 <_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 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201b6e8 <_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 30 ld [ %g1 + 0x330 ], %g2 ! 201b730 <_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 30 st %g2, [ %g1 + 0x330 ] } 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 b6 call 20088a8 <_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 b0 ld [ %g1 + 0xb0 ], %g2 ! 201b4b0 <_Thread_Dispatch_disable_level> 20061e0: 84 00 bf ff add %g2, -1, %g2 20061e4: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] return _Thread_Dispatch_disable_level; 20061e8: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 20061ec: 81 c7 e0 08 ret 20061f0: 81 e8 00 00 restore =============================================================================== 0200bc64 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200bc64: 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; 200bc68: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200bc6c: 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; 200bc70: 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; 200bc74: 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; 200bc78: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200bc7c: 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; 200bc80: 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 ) { 200bc84: 80 a7 40 19 cmp %i5, %i1 200bc88: 0a 80 00 9f bcs 200bf04 <_Heap_Extend+0x2a0> 200bc8c: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200bc90: 90 10 00 19 mov %i1, %o0 200bc94: 92 10 00 1a mov %i2, %o1 200bc98: 94 10 00 11 mov %l1, %o2 200bc9c: 98 07 bf f8 add %fp, -8, %o4 200bca0: 7f ff ed 4f call 20071dc <_Heap_Get_first_and_last_block> 200bca4: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200bca8: 80 8a 20 ff btst 0xff, %o0 200bcac: 02 80 00 96 be 200bf04 <_Heap_Extend+0x2a0> 200bcb0: b4 10 00 10 mov %l0, %i2 200bcb4: aa 10 20 00 clr %l5 200bcb8: ac 10 20 00 clr %l6 200bcbc: b8 10 20 00 clr %i4 200bcc0: a8 10 20 00 clr %l4 200bcc4: 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 ( 200bcc8: 80 a0 40 1d cmp %g1, %i5 200bccc: 1a 80 00 05 bcc 200bce0 <_Heap_Extend+0x7c> 200bcd0: e6 06 80 00 ld [ %i2 ], %l3 200bcd4: 80 a6 40 13 cmp %i1, %l3 200bcd8: 2a 80 00 8b bcs,a 200bf04 <_Heap_Extend+0x2a0> 200bcdc: 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 ) { 200bce0: 80 a7 40 01 cmp %i5, %g1 200bce4: 02 80 00 06 be 200bcfc <_Heap_Extend+0x98> 200bce8: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200bcec: 2a 80 00 05 bcs,a 200bd00 <_Heap_Extend+0x9c> 200bcf0: ac 10 00 1a mov %i2, %l6 200bcf4: 10 80 00 04 b 200bd04 <_Heap_Extend+0xa0> 200bcf8: 90 10 00 13 mov %l3, %o0 200bcfc: a8 10 00 1a mov %i2, %l4 200bd00: 90 10 00 13 mov %l3, %o0 200bd04: 40 00 15 fd call 20114f8 <.urem> 200bd08: 92 10 00 11 mov %l1, %o1 200bd0c: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200bd10: 80 a4 c0 19 cmp %l3, %i1 200bd14: 12 80 00 05 bne 200bd28 <_Heap_Extend+0xc4> 200bd18: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200bd1c: 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 ) 200bd20: 10 80 00 04 b 200bd30 <_Heap_Extend+0xcc> 200bd24: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200bd28: 2a 80 00 02 bcs,a 200bd30 <_Heap_Extend+0xcc> 200bd2c: 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; 200bd30: f4 02 20 04 ld [ %o0 + 4 ], %i2 200bd34: 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); 200bd38: 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 ); 200bd3c: 80 a6 80 10 cmp %i2, %l0 200bd40: 12 bf ff e2 bne 200bcc8 <_Heap_Extend+0x64> 200bd44: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200bd48: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bd4c: 80 a6 40 01 cmp %i1, %g1 200bd50: 3a 80 00 04 bcc,a 200bd60 <_Heap_Extend+0xfc> 200bd54: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200bd58: 10 80 00 05 b 200bd6c <_Heap_Extend+0x108> 200bd5c: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200bd60: 80 a0 40 1d cmp %g1, %i5 200bd64: 2a 80 00 02 bcs,a 200bd6c <_Heap_Extend+0x108> 200bd68: 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; 200bd6c: c4 07 bf f8 ld [ %fp + -8 ], %g2 200bd70: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200bd74: 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 = 200bd78: 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; 200bd7c: 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; 200bd80: 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 = 200bd84: 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 ) { 200bd88: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200bd8c: 80 a0 c0 02 cmp %g3, %g2 200bd90: 08 80 00 04 bleu 200bda0 <_Heap_Extend+0x13c> 200bd94: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200bd98: 10 80 00 06 b 200bdb0 <_Heap_Extend+0x14c> 200bd9c: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200bda0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200bda4: 80 a0 80 01 cmp %g2, %g1 200bda8: 2a 80 00 02 bcs,a 200bdb0 <_Heap_Extend+0x14c> 200bdac: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200bdb0: 80 a5 20 00 cmp %l4, 0 200bdb4: 02 80 00 14 be 200be04 <_Heap_Extend+0x1a0> 200bdb8: 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; 200bdbc: 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; 200bdc0: 92 10 00 1a mov %i2, %o1 200bdc4: 40 00 15 cd call 20114f8 <.urem> 200bdc8: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200bdcc: 80 a2 20 00 cmp %o0, 0 200bdd0: 02 80 00 04 be 200bde0 <_Heap_Extend+0x17c> 200bdd4: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200bdd8: b2 06 40 1a add %i1, %i2, %i1 200bddc: 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 = 200bde0: 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; 200bde4: 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 = 200bde8: 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; 200bdec: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200bdf0: 90 10 00 18 mov %i0, %o0 200bdf4: 7f ff ff 92 call 200bc3c <_Heap_Free_block> 200bdf8: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200bdfc: 10 80 00 08 b 200be1c <_Heap_Extend+0x1b8> 200be00: 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 ) { 200be04: 80 a5 a0 00 cmp %l6, 0 200be08: 02 80 00 04 be 200be18 <_Heap_Extend+0x1b4> 200be0c: 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; 200be10: 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 = 200be14: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200be18: 80 a7 20 00 cmp %i4, 0 200be1c: 02 80 00 15 be 200be70 <_Heap_Extend+0x20c> 200be20: 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); 200be24: 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( 200be28: ba 27 40 1c sub %i5, %i4, %i5 200be2c: 40 00 15 b3 call 20114f8 <.urem> 200be30: 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) 200be34: c4 07 20 04 ld [ %i4 + 4 ], %g2 200be38: 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 = 200be3c: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200be40: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200be44: 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 = 200be48: 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; 200be4c: 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 ); 200be50: 90 10 00 18 mov %i0, %o0 200be54: 82 08 60 01 and %g1, 1, %g1 200be58: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200be5c: ba 17 40 01 or %i5, %g1, %i5 200be60: 7f ff ff 77 call 200bc3c <_Heap_Free_block> 200be64: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200be68: 10 80 00 0f b 200bea4 <_Heap_Extend+0x240> 200be6c: 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 ) { 200be70: 80 a5 60 00 cmp %l5, 0 200be74: 02 80 00 0b be 200bea0 <_Heap_Extend+0x23c> 200be78: 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; 200be7c: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200be80: c2 07 bf fc ld [ %fp + -4 ], %g1 200be84: 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 ); 200be88: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200be8c: 84 10 c0 02 or %g3, %g2, %g2 200be90: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200be94: c4 00 60 04 ld [ %g1 + 4 ], %g2 200be98: 84 10 a0 01 or %g2, 1, %g2 200be9c: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200bea0: 80 a7 20 00 cmp %i4, 0 200bea4: 32 80 00 09 bne,a 200bec8 <_Heap_Extend+0x264> 200bea8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200beac: 80 a5 20 00 cmp %l4, 0 200beb0: 32 80 00 06 bne,a 200bec8 <_Heap_Extend+0x264> 200beb4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200beb8: d2 07 bf f8 ld [ %fp + -8 ], %o1 200bebc: 7f ff ff 60 call 200bc3c <_Heap_Free_block> 200bec0: 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 200bec4: 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( 200bec8: 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; 200becc: 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( 200bed0: 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; 200bed4: 86 08 e0 01 and %g3, 1, %g3 block->size_and_flag = size | flag; 200bed8: 84 10 c0 02 or %g3, %g2, %g2 200bedc: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200bee0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200bee4: 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; 200bee8: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200beec: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200bef0: 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; 200bef4: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200bef8: 02 80 00 03 be 200bf04 <_Heap_Extend+0x2a0> <== NEVER TAKEN 200befc: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200bf00: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200bf04: b0 0f 20 01 and %i4, 1, %i0 200bf08: 81 c7 e0 08 ret 200bf0c: 81 e8 00 00 restore =============================================================================== 0200c074 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c074: 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; 200c078: 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 ) { 200c07c: 80 a6 60 00 cmp %i1, 0 200c080: 02 80 00 77 be 200c25c <_Heap_Free+0x1e8> 200c084: 90 10 00 19 mov %i1, %o0 200c088: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c08c: 40 00 2b 26 call 2016d24 <.urem> 200c090: 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 200c094: 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); 200c098: 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; 200c09c: 80 a7 40 0d cmp %i5, %o5 200c0a0: 0a 80 00 05 bcs 200c0b4 <_Heap_Free+0x40> 200c0a4: 82 10 20 00 clr %g1 200c0a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c0ac: 80 a0 40 1d cmp %g1, %i5 200c0b0: 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 ) ) { 200c0b4: 80 a0 60 00 cmp %g1, 0 200c0b8: 02 80 00 69 be 200c25c <_Heap_Free+0x1e8> 200c0bc: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c0c0: 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; 200c0c4: 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); 200c0c8: 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; 200c0cc: 80 a0 40 0d cmp %g1, %o5 200c0d0: 0a 80 00 05 bcs 200c0e4 <_Heap_Free+0x70> <== NEVER TAKEN 200c0d4: 86 10 20 00 clr %g3 200c0d8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c0dc: 80 a0 c0 01 cmp %g3, %g1 200c0e0: 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 ) ) { 200c0e4: 80 a0 e0 00 cmp %g3, 0 200c0e8: 02 80 00 5d be 200c25c <_Heap_Free+0x1e8> <== NEVER TAKEN 200c0ec: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c0f0: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200c0f4: 80 8b e0 01 btst 1, %o7 200c0f8: 02 80 00 59 be 200c25c <_Heap_Free+0x1e8> 200c0fc: 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 200c100: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200c104: 80 a0 40 04 cmp %g1, %g4 200c108: 02 80 00 07 be 200c124 <_Heap_Free+0xb0> 200c10c: 98 10 20 00 clr %o4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c110: 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; 200c114: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200c118: 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 )); 200c11c: 80 a0 00 03 cmp %g0, %g3 200c120: 98 60 3f ff subx %g0, -1, %o4 if ( !_Heap_Is_prev_used( block ) ) { 200c124: 80 8a e0 01 btst 1, %o3 200c128: 12 80 00 25 bne 200c1bc <_Heap_Free+0x148> 200c12c: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200c130: 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); 200c134: 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; 200c138: 80 a0 c0 0d cmp %g3, %o5 200c13c: 0a 80 00 04 bcs 200c14c <_Heap_Free+0xd8> <== NEVER TAKEN 200c140: 94 10 20 00 clr %o2 200c144: 80 a1 00 03 cmp %g4, %g3 200c148: 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 ) ) { 200c14c: 80 a2 a0 00 cmp %o2, 0 200c150: 02 80 00 43 be 200c25c <_Heap_Free+0x1e8> <== NEVER TAKEN 200c154: 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; 200c158: 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) ) { 200c15c: 80 8b 60 01 btst 1, %o5 200c160: 02 80 00 3f be 200c25c <_Heap_Free+0x1e8> <== NEVER TAKEN 200c164: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200c168: 02 80 00 0e be 200c1a0 <_Heap_Free+0x12c> 200c16c: 88 00 80 0b add %g2, %o3, %g4 uintptr_t const size = block_size + prev_size + next_block_size; 200c170: 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; 200c174: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200c178: c2 00 60 0c ld [ %g1 + 0xc ], %g1 prev->next = next; 200c17c: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200c180: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200c184: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 200c188: 82 00 7f ff add %g1, -1, %g1 200c18c: 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; 200c190: 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; 200c194: 82 13 e0 01 or %o7, 1, %g1 200c198: 10 80 00 27 b 200c234 <_Heap_Free+0x1c0> 200c19c: 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; 200c1a0: 9e 11 20 01 or %g4, 1, %o7 200c1a4: de 20 e0 04 st %o7, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c1a8: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200c1ac: 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; 200c1b0: 86 08 ff fe and %g3, -2, %g3 200c1b4: 10 80 00 20 b 200c234 <_Heap_Free+0x1c0> 200c1b8: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200c1bc: 22 80 00 0d be,a 200c1f0 <_Heap_Free+0x17c> 200c1c0: 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; 200c1c4: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200c1c8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200c1cc: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200c1d0: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200c1d4: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200c1d8: 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; 200c1dc: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c1e0: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200c1e4: 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; 200c1e8: 10 80 00 13 b 200c234 <_Heap_Free+0x1c0> 200c1ec: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200c1f0: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200c1f4: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200c1f8: 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; 200c1fc: 86 10 a0 01 or %g2, 1, %g3 200c200: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c204: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200c208: 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; 200c20c: 86 08 ff fe and %g3, -2, %g3 200c210: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c214: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200c218: 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; 200c21c: 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; 200c220: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200c224: 80 a0 c0 01 cmp %g3, %g1 200c228: 1a 80 00 03 bcc 200c234 <_Heap_Free+0x1c0> 200c22c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200c230: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200c234: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200c238: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c23c: 82 00 7f ff add %g1, -1, %g1 200c240: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200c244: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c248: 82 00 60 01 inc %g1 200c24c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200c250: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200c254: 84 00 40 02 add %g1, %g2, %g2 200c258: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200c25c: b0 09 20 01 and %g4, 1, %i0 200c260: 81 c7 e0 08 ret 200c264: 81 e8 00 00 restore =============================================================================== 020187f4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 20187f4: 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); 20187f8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 20187fc: 7f ff f9 4a call 2016d24 <.urem> 2018800: 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 2018804: 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); 2018808: 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); 201880c: 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; 2018810: 80 a2 00 03 cmp %o0, %g3 2018814: 0a 80 00 05 bcs 2018828 <_Heap_Size_of_alloc_area+0x34> 2018818: 84 10 20 00 clr %g2 201881c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018820: 80 a0 40 08 cmp %g1, %o0 2018824: 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 ) ) { 2018828: 80 a0 a0 00 cmp %g2, 0 201882c: 02 80 00 15 be 2018880 <_Heap_Size_of_alloc_area+0x8c> 2018830: 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; 2018834: fa 02 20 04 ld [ %o0 + 4 ], %i5 2018838: 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); 201883c: 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; 2018840: 80 a7 40 03 cmp %i5, %g3 2018844: 0a 80 00 05 bcs 2018858 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 2018848: 84 10 20 00 clr %g2 201884c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018850: 80 a0 40 1d cmp %g1, %i5 2018854: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 2018858: 80 a0 a0 00 cmp %g2, 0 201885c: 02 80 00 09 be 2018880 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2018860: 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; 2018864: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 2018868: 80 88 a0 01 btst 1, %g2 201886c: 02 80 00 05 be 2018880 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2018870: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 2018874: 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; 2018878: ba 07 60 04 add %i5, 4, %i5 201887c: fa 26 80 00 st %i5, [ %i2 ] return true; } 2018880: b0 08 60 01 and %g1, 1, %i0 2018884: 81 c7 e0 08 ret 2018888: 81 e8 00 00 restore =============================================================================== 020080d8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 20080d8: 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; 20080dc: 3b 00 80 20 sethi %hi(0x2008000), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 20080e0: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 20080e4: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 20080e8: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 20080ec: 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; 20080f0: 80 a6 a0 00 cmp %i2, 0 20080f4: 02 80 00 04 be 2008104 <_Heap_Walk+0x2c> 20080f8: ba 17 60 84 or %i5, 0x84, %i5 20080fc: 3b 00 80 20 sethi %hi(0x2008000), %i5 2008100: ba 17 60 8c or %i5, 0x8c, %i5 ! 200808c <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2008104: 03 00 80 5c sethi %hi(0x2017000), %g1 2008108: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 20173e4 <_System_state_Current> 200810c: 80 a0 a0 03 cmp %g2, 3 2008110: 12 80 01 24 bne 20085a0 <_Heap_Walk+0x4c8> 2008114: 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)( 2008118: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200811c: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2008120: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2008124: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 2008128: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 200812c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008130: 90 10 00 19 mov %i1, %o0 2008134: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 2008138: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200813c: 92 10 20 00 clr %o1 2008140: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2008144: 15 00 80 52 sethi %hi(0x2014800), %o2 2008148: 96 10 00 1c mov %i4, %o3 200814c: 94 12 a1 98 or %o2, 0x198, %o2 2008150: 9f c7 40 00 call %i5 2008154: 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 ) { 2008158: 80 a7 20 00 cmp %i4, 0 200815c: 12 80 00 07 bne 2008178 <_Heap_Walk+0xa0> 2008160: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 2008164: 15 00 80 52 sethi %hi(0x2014800), %o2 2008168: 90 10 00 19 mov %i1, %o0 200816c: 92 10 20 01 mov 1, %o1 2008170: 10 80 00 32 b 2008238 <_Heap_Walk+0x160> 2008174: 94 12 a2 30 or %o2, 0x230, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2008178: 22 80 00 08 be,a 2008198 <_Heap_Walk+0xc0> 200817c: 90 10 00 10 mov %l0, %o0 (*printer)( 2008180: 15 00 80 52 sethi %hi(0x2014800), %o2 2008184: 90 10 00 19 mov %i1, %o0 2008188: 92 10 20 01 mov 1, %o1 200818c: 94 12 a2 48 or %o2, 0x248, %o2 2008190: 10 80 01 0b b 20085bc <_Heap_Walk+0x4e4> 2008194: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008198: 7f ff e6 52 call 2001ae0 <.urem> 200819c: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20081a0: 80 a2 20 00 cmp %o0, 0 20081a4: 22 80 00 08 be,a 20081c4 <_Heap_Walk+0xec> 20081a8: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 20081ac: 15 00 80 52 sethi %hi(0x2014800), %o2 20081b0: 90 10 00 19 mov %i1, %o0 20081b4: 92 10 20 01 mov 1, %o1 20081b8: 94 12 a2 68 or %o2, 0x268, %o2 20081bc: 10 80 01 00 b 20085bc <_Heap_Walk+0x4e4> 20081c0: 96 10 00 10 mov %l0, %o3 20081c4: 7f ff e6 47 call 2001ae0 <.urem> 20081c8: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 20081cc: 80 a2 20 00 cmp %o0, 0 20081d0: 22 80 00 08 be,a 20081f0 <_Heap_Walk+0x118> 20081d4: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20081d8: 15 00 80 52 sethi %hi(0x2014800), %o2 20081dc: 90 10 00 19 mov %i1, %o0 20081e0: 92 10 20 01 mov 1, %o1 20081e4: 94 12 a2 90 or %o2, 0x290, %o2 20081e8: 10 80 00 f5 b 20085bc <_Heap_Walk+0x4e4> 20081ec: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 20081f0: 80 88 60 01 btst 1, %g1 20081f4: 32 80 00 07 bne,a 2008210 <_Heap_Walk+0x138> 20081f8: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 20081fc: 15 00 80 52 sethi %hi(0x2014800), %o2 2008200: 90 10 00 19 mov %i1, %o0 2008204: 92 10 20 01 mov 1, %o1 2008208: 10 80 00 0c b 2008238 <_Heap_Walk+0x160> 200820c: 94 12 a2 c8 or %o2, 0x2c8, %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; 2008210: 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); 2008214: 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; 2008218: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 200821c: 80 88 60 01 btst 1, %g1 2008220: 12 80 00 0a bne 2008248 <_Heap_Walk+0x170> 2008224: 80 a6 80 1b cmp %i2, %i3 (*printer)( 2008228: 15 00 80 52 sethi %hi(0x2014800), %o2 200822c: 90 10 00 19 mov %i1, %o0 2008230: 92 10 20 01 mov 1, %o1 2008234: 94 12 a2 f8 or %o2, 0x2f8, %o2 2008238: 9f c7 40 00 call %i5 200823c: 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; 2008240: 10 80 00 d8 b 20085a0 <_Heap_Walk+0x4c8> 2008244: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 2008248: 02 80 00 06 be 2008260 <_Heap_Walk+0x188> 200824c: 15 00 80 52 sethi %hi(0x2014800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2008250: 90 10 00 19 mov %i1, %o0 2008254: 92 10 20 01 mov 1, %o1 2008258: 10 bf ff f8 b 2008238 <_Heap_Walk+0x160> 200825c: 94 12 a3 10 or %o2, 0x310, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2008260: 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; 2008264: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2008268: 10 80 00 33 b 2008334 <_Heap_Walk+0x25c> 200826c: 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; 2008270: 80 a0 80 0b cmp %g2, %o3 2008274: 18 80 00 05 bgu 2008288 <_Heap_Walk+0x1b0> 2008278: 82 10 20 00 clr %g1 200827c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008280: 80 a0 40 0b cmp %g1, %o3 2008284: 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 ) ) { 2008288: 80 a0 60 00 cmp %g1, 0 200828c: 32 80 00 07 bne,a 20082a8 <_Heap_Walk+0x1d0> 2008290: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 2008294: 15 00 80 52 sethi %hi(0x2014800), %o2 2008298: 90 10 00 19 mov %i1, %o0 200829c: 92 10 20 01 mov 1, %o1 20082a0: 10 80 00 c7 b 20085bc <_Heap_Walk+0x4e4> 20082a4: 94 12 a3 40 or %o2, 0x340, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20082a8: d6 27 bf f8 st %o3, [ %fp + -8 ] 20082ac: 7f ff e6 0d call 2001ae0 <.urem> 20082b0: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 20082b4: 80 a2 20 00 cmp %o0, 0 20082b8: 02 80 00 07 be 20082d4 <_Heap_Walk+0x1fc> 20082bc: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20082c0: 15 00 80 52 sethi %hi(0x2014800), %o2 20082c4: 90 10 00 19 mov %i1, %o0 20082c8: 92 10 20 01 mov 1, %o1 20082cc: 10 80 00 bc b 20085bc <_Heap_Walk+0x4e4> 20082d0: 94 12 a3 60 or %o2, 0x360, %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; 20082d4: c2 02 e0 04 ld [ %o3 + 4 ], %g1 20082d8: 82 08 7f fe and %g1, -2, %g1 block = next_block; } while ( block != first_block ); return true; } 20082dc: 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; 20082e0: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20082e4: 80 88 60 01 btst 1, %g1 20082e8: 22 80 00 07 be,a 2008304 <_Heap_Walk+0x22c> 20082ec: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 20082f0: 15 00 80 52 sethi %hi(0x2014800), %o2 20082f4: 90 10 00 19 mov %i1, %o0 20082f8: 92 10 20 01 mov 1, %o1 20082fc: 10 80 00 b0 b 20085bc <_Heap_Walk+0x4e4> 2008300: 94 12 a3 90 or %o2, 0x390, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2008304: 80 a3 00 12 cmp %o4, %l2 2008308: 22 80 00 0a be,a 2008330 <_Heap_Walk+0x258> 200830c: a4 10 00 0b mov %o3, %l2 (*printer)( 2008310: 15 00 80 52 sethi %hi(0x2014800), %o2 2008314: 90 10 00 19 mov %i1, %o0 2008318: 92 10 20 01 mov 1, %o1 200831c: 94 12 a3 b0 or %o2, 0x3b0, %o2 2008320: 9f c7 40 00 call %i5 2008324: 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; 2008328: 10 80 00 9e b 20085a0 <_Heap_Walk+0x4c8> 200832c: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 2008330: 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 ) { 2008334: 80 a2 c0 18 cmp %o3, %i0 2008338: 32 bf ff ce bne,a 2008270 <_Heap_Walk+0x198> 200833c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2008340: 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)( 2008344: 2f 00 80 53 sethi %hi(0x2014c00), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008348: ac 15 a1 70 or %l6, 0x170, %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)( 200834c: ae 15 e1 58 or %l7, 0x158, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2008350: 2b 00 80 53 sethi %hi(0x2014c00), %l5 block = next_block; } while ( block != first_block ); return true; } 2008354: 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; 2008358: 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; 200835c: 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); 2008360: 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; 2008364: 80 a0 c0 13 cmp %g3, %l3 2008368: 18 80 00 05 bgu 200837c <_Heap_Walk+0x2a4> <== NEVER TAKEN 200836c: 84 10 20 00 clr %g2 2008370: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2008374: 80 a0 80 13 cmp %g2, %l3 2008378: 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 ) ) { 200837c: 80 a0 a0 00 cmp %g2, 0 2008380: 12 80 00 07 bne 200839c <_Heap_Walk+0x2c4> 2008384: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 2008388: 15 00 80 52 sethi %hi(0x2014800), %o2 200838c: 90 10 00 19 mov %i1, %o0 2008390: 92 10 20 01 mov 1, %o1 2008394: 10 80 00 2c b 2008444 <_Heap_Walk+0x36c> 2008398: 94 12 a3 e8 or %o2, 0x3e8, %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; 200839c: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20083a0: c2 27 bf fc st %g1, [ %fp + -4 ] 20083a4: a8 40 20 00 addx %g0, 0, %l4 20083a8: 90 10 00 12 mov %l2, %o0 20083ac: 7f ff e5 cd call 2001ae0 <.urem> 20083b0: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 20083b4: 80 a2 20 00 cmp %o0, 0 20083b8: 02 80 00 0c be 20083e8 <_Heap_Walk+0x310> 20083bc: c2 07 bf fc ld [ %fp + -4 ], %g1 20083c0: 80 8d 20 ff btst 0xff, %l4 20083c4: 02 80 00 0a be 20083ec <_Heap_Walk+0x314> 20083c8: 80 a4 80 10 cmp %l2, %l0 (*printer)( 20083cc: 15 00 80 53 sethi %hi(0x2014c00), %o2 20083d0: 90 10 00 19 mov %i1, %o0 20083d4: 92 10 20 01 mov 1, %o1 20083d8: 94 12 a0 18 or %o2, 0x18, %o2 20083dc: 96 10 00 1a mov %i2, %o3 20083e0: 10 bf ff d0 b 2008320 <_Heap_Walk+0x248> 20083e4: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 20083e8: 80 a4 80 10 cmp %l2, %l0 20083ec: 1a 80 00 0d bcc 2008420 <_Heap_Walk+0x348> 20083f0: 80 a4 c0 1a cmp %l3, %i2 20083f4: 80 8d 20 ff btst 0xff, %l4 20083f8: 02 80 00 0a be 2008420 <_Heap_Walk+0x348> <== NEVER TAKEN 20083fc: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2008400: 15 00 80 53 sethi %hi(0x2014c00), %o2 2008404: 90 10 00 19 mov %i1, %o0 2008408: 92 10 20 01 mov 1, %o1 200840c: 94 12 a0 48 or %o2, 0x48, %o2 2008410: 96 10 00 1a mov %i2, %o3 2008414: 98 10 00 12 mov %l2, %o4 2008418: 10 80 00 3d b 200850c <_Heap_Walk+0x434> 200841c: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2008420: 38 80 00 0c bgu,a 2008450 <_Heap_Walk+0x378> 2008424: a8 08 60 01 and %g1, 1, %l4 2008428: 80 8d 20 ff btst 0xff, %l4 200842c: 02 80 00 09 be 2008450 <_Heap_Walk+0x378> 2008430: a8 08 60 01 and %g1, 1, %l4 (*printer)( 2008434: 15 00 80 53 sethi %hi(0x2014c00), %o2 2008438: 90 10 00 19 mov %i1, %o0 200843c: 92 10 20 01 mov 1, %o1 2008440: 94 12 a0 78 or %o2, 0x78, %o2 2008444: 96 10 00 1a mov %i2, %o3 2008448: 10 bf ff b6 b 2008320 <_Heap_Walk+0x248> 200844c: 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; 2008450: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2008454: 80 88 60 01 btst 1, %g1 2008458: 12 80 00 40 bne 2008558 <_Heap_Walk+0x480> 200845c: 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 ? 2008460: 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)( 2008464: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008468: 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; 200846c: c8 06 20 0c ld [ %i0 + 0xc ], %g4 2008470: 80 a3 40 01 cmp %o5, %g1 2008474: 02 80 00 07 be 2008490 <_Heap_Walk+0x3b8> 2008478: 86 10 a1 58 or %g2, 0x158, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 200847c: 80 a3 40 18 cmp %o5, %i0 2008480: 12 80 00 04 bne 2008490 <_Heap_Walk+0x3b8> 2008484: 86 15 61 20 or %l5, 0x120, %g3 2008488: 07 00 80 52 sethi %hi(0x2014800), %g3 200848c: 86 10 e1 68 or %g3, 0x168, %g3 ! 2014968 <_Status_Object_name_errors_to_status+0x48> block->next, block->next == last_free_block ? 2008490: 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)( 2008494: 1f 00 80 52 sethi %hi(0x2014800), %o7 2008498: 80 a0 80 04 cmp %g2, %g4 200849c: 02 80 00 07 be 20084b8 <_Heap_Walk+0x3e0> 20084a0: 82 13 e1 78 or %o7, 0x178, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 20084a4: 80 a0 80 18 cmp %g2, %i0 20084a8: 12 80 00 04 bne 20084b8 <_Heap_Walk+0x3e0> 20084ac: 82 15 61 20 or %l5, 0x120, %g1 20084b0: 03 00 80 52 sethi %hi(0x2014800), %g1 20084b4: 82 10 61 88 or %g1, 0x188, %g1 ! 2014988 <_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)( 20084b8: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 20084bc: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 20084c0: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 20084c4: 90 10 00 19 mov %i1, %o0 20084c8: 92 10 20 00 clr %o1 20084cc: 15 00 80 53 sethi %hi(0x2014c00), %o2 20084d0: 96 10 00 1a mov %i2, %o3 20084d4: 94 12 a0 b0 or %o2, 0xb0, %o2 20084d8: 9f c7 40 00 call %i5 20084dc: 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 ) { 20084e0: da 04 c0 00 ld [ %l3 ], %o5 20084e4: 80 a4 80 0d cmp %l2, %o5 20084e8: 02 80 00 0d be 200851c <_Heap_Walk+0x444> 20084ec: 80 a5 20 00 cmp %l4, 0 (*printer)( 20084f0: 15 00 80 53 sethi %hi(0x2014c00), %o2 20084f4: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 20084f8: 90 10 00 19 mov %i1, %o0 20084fc: 92 10 20 01 mov 1, %o1 2008500: 94 12 a0 e8 or %o2, 0xe8, %o2 2008504: 96 10 00 1a mov %i2, %o3 2008508: 98 10 00 12 mov %l2, %o4 200850c: 9f c7 40 00 call %i5 2008510: 01 00 00 00 nop 2008514: 10 80 00 23 b 20085a0 <_Heap_Walk+0x4c8> 2008518: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 200851c: 32 80 00 0a bne,a 2008544 <_Heap_Walk+0x46c> 2008520: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2008524: 15 00 80 53 sethi %hi(0x2014c00), %o2 2008528: 90 10 00 19 mov %i1, %o0 200852c: 92 10 20 01 mov 1, %o1 2008530: 10 80 00 22 b 20085b8 <_Heap_Walk+0x4e0> 2008534: 94 12 a1 28 or %o2, 0x128, %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 ) { 2008538: 02 80 00 17 be 2008594 <_Heap_Walk+0x4bc> 200853c: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 2008540: 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 ) { 2008544: 80 a0 40 18 cmp %g1, %i0 2008548: 12 bf ff fc bne 2008538 <_Heap_Walk+0x460> 200854c: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008550: 10 80 00 17 b 20085ac <_Heap_Walk+0x4d4> 2008554: 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) { 2008558: 80 a5 20 00 cmp %l4, 0 200855c: 02 80 00 08 be 200857c <_Heap_Walk+0x4a4> 2008560: 92 10 20 00 clr %o1 (*printer)( 2008564: 94 10 00 17 mov %l7, %o2 2008568: 96 10 00 1a mov %i2, %o3 200856c: 9f c7 40 00 call %i5 2008570: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2008574: 10 80 00 08 b 2008594 <_Heap_Walk+0x4bc> 2008578: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200857c: da 06 80 00 ld [ %i2 ], %o5 2008580: 94 10 00 16 mov %l6, %o2 2008584: 96 10 00 1a mov %i2, %o3 2008588: 9f c7 40 00 call %i5 200858c: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2008590: 80 a4 c0 1b cmp %l3, %i3 2008594: 12 bf ff 70 bne 2008354 <_Heap_Walk+0x27c> 2008598: b4 10 00 13 mov %l3, %i2 return true; 200859c: 82 10 20 01 mov 1, %g1 } 20085a0: b0 08 60 01 and %g1, 1, %i0 20085a4: 81 c7 e0 08 ret 20085a8: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085ac: 90 10 00 19 mov %i1, %o0 20085b0: 92 10 20 01 mov 1, %o1 20085b4: 94 12 a1 98 or %o2, 0x198, %o2 20085b8: 96 10 00 1a mov %i2, %o3 20085bc: 9f c7 40 00 call %i5 20085c0: 01 00 00 00 nop 20085c4: 10 bf ff f7 b 20085a0 <_Heap_Walk+0x4c8> 20085c8: 82 10 20 00 clr %g1 ! 0 =============================================================================== 020078b4 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20078b4: 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 ) 20078b8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20078bc: 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 ) 20078c0: 80 a0 60 00 cmp %g1, 0 20078c4: 02 80 00 20 be 2007944 <_Objects_Allocate+0x90> <== NEVER TAKEN 20078c8: 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 ); 20078cc: b8 07 60 20 add %i5, 0x20, %i4 20078d0: 7f ff fd 87 call 2006eec <_Chain_Get> 20078d4: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 20078d8: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 20078dc: 80 a0 60 00 cmp %g1, 0 20078e0: 02 80 00 19 be 2007944 <_Objects_Allocate+0x90> 20078e4: 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 ) { 20078e8: 80 a2 20 00 cmp %o0, 0 20078ec: 32 80 00 0a bne,a 2007914 <_Objects_Allocate+0x60> 20078f0: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 20078f4: 40 00 00 1d call 2007968 <_Objects_Extend_information> 20078f8: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 20078fc: 7f ff fd 7c call 2006eec <_Chain_Get> 2007900: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2007904: b0 92 20 00 orcc %o0, 0, %i0 2007908: 02 80 00 0f be 2007944 <_Objects_Allocate+0x90> 200790c: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007910: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2007914: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2007918: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 200791c: 40 00 3c 56 call 2016a74 <.udiv> 2007920: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2007924: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2007928: 91 2a 20 02 sll %o0, 2, %o0 200792c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2007930: 84 00 bf ff add %g2, -1, %g2 2007934: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2007938: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 200793c: 82 00 7f ff add %g1, -1, %g1 2007940: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2007944: 81 c7 e0 08 ret 2007948: 81 e8 00 00 restore =============================================================================== 02007cc0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2007cc0: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007cc4: 80 a6 60 00 cmp %i1, 0 2007cc8: 02 80 00 17 be 2007d24 <_Objects_Get_information+0x64> 2007ccc: 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 ); 2007cd0: 40 00 11 66 call 200c268 <_Objects_API_maximum_class> 2007cd4: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007cd8: 80 a2 20 00 cmp %o0, 0 2007cdc: 02 80 00 12 be 2007d24 <_Objects_Get_information+0x64> 2007ce0: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007ce4: 18 80 00 10 bgu 2007d24 <_Objects_Get_information+0x64> 2007ce8: 03 00 80 6d sethi %hi(0x201b400), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007cec: b1 2e 20 02 sll %i0, 2, %i0 2007cf0: 82 10 60 18 or %g1, 0x18, %g1 2007cf4: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2007cf8: 80 a0 60 00 cmp %g1, 0 2007cfc: 02 80 00 0a be 2007d24 <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d00: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007d04: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2007d08: 80 a7 60 00 cmp %i5, 0 2007d0c: 02 80 00 06 be 2007d24 <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d10: 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 ) 2007d14: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2007d18: 80 a0 00 01 cmp %g0, %g1 2007d1c: 82 60 20 00 subx %g0, 0, %g1 2007d20: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 2007d24: 81 c7 e0 08 ret 2007d28: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 020087f4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20087f4: 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; 20087f8: 92 96 20 00 orcc %i0, 0, %o1 20087fc: 12 80 00 06 bne 2008814 <_Objects_Id_to_name+0x20> 2008800: 83 32 60 18 srl %o1, 0x18, %g1 2008804: 03 00 80 72 sethi %hi(0x201c800), %g1 2008808: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 201cab8 <_Per_CPU_Information+0xc> 200880c: d2 00 60 08 ld [ %g1 + 8 ], %o1 2008810: 83 32 60 18 srl %o1, 0x18, %g1 2008814: 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 ) 2008818: 84 00 7f ff add %g1, -1, %g2 200881c: 80 a0 a0 02 cmp %g2, 2 2008820: 18 80 00 12 bgu 2008868 <_Objects_Id_to_name+0x74> 2008824: 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 ] ) 2008828: 10 80 00 12 b 2008870 <_Objects_Id_to_name+0x7c> 200882c: 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 ]; 2008830: 85 28 a0 02 sll %g2, 2, %g2 2008834: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 2008838: 80 a2 20 00 cmp %o0, 0 200883c: 02 80 00 0b be 2008868 <_Objects_Id_to_name+0x74> <== NEVER TAKEN 2008840: 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 ); 2008844: 7f ff ff ce call 200877c <_Objects_Get> 2008848: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200884c: 80 a2 20 00 cmp %o0, 0 2008850: 02 80 00 06 be 2008868 <_Objects_Id_to_name+0x74> 2008854: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 2008858: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200885c: 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(); 2008860: 40 00 03 62 call 20095e8 <_Thread_Enable_dispatch> 2008864: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 2008868: 81 c7 e0 08 ret 200886c: 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 ] ) 2008870: 05 00 80 71 sethi %hi(0x201c400), %g2 2008874: 84 10 a3 e8 or %g2, 0x3e8, %g2 ! 201c7e8 <_Objects_Information_table> 2008878: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200887c: 80 a0 60 00 cmp %g1, 0 2008880: 12 bf ff ec bne 2008830 <_Objects_Id_to_name+0x3c> 2008884: 85 32 60 1b srl %o1, 0x1b, %g2 2008888: 30 bf ff f8 b,a 2008868 <_Objects_Id_to_name+0x74> =============================================================================== 02008da4 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 2008da4: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 2008da8: 80 a6 60 00 cmp %i1, 0 2008dac: 02 80 00 73 be 2008f78 <_RBTree_Extract_unprotected+0x1d4> 2008db0: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 2008db4: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008db8: 80 a6 40 01 cmp %i1, %g1 2008dbc: 32 80 00 0d bne,a 2008df0 <_RBTree_Extract_unprotected+0x4c> 2008dc0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 2008dc4: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008dc8: 80 a0 60 00 cmp %g1, 0 2008dcc: 22 80 00 04 be,a 2008ddc <_RBTree_Extract_unprotected+0x38> 2008dd0: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 2008dd4: 10 80 00 06 b 2008dec <_RBTree_Extract_unprotected+0x48> 2008dd8: 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, 2008ddc: 80 a6 00 01 cmp %i0, %g1 2008de0: 12 80 00 03 bne 2008dec <_RBTree_Extract_unprotected+0x48> 2008de4: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 2008de8: 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]) { 2008dec: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008df0: 80 a6 40 01 cmp %i1, %g1 2008df4: 12 80 00 0b bne 2008e20 <_RBTree_Extract_unprotected+0x7c> 2008df8: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 2008dfc: 80 a0 60 00 cmp %g1, 0 2008e00: 22 80 00 04 be,a 2008e10 <_RBTree_Extract_unprotected+0x6c> 2008e04: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 2008e08: 10 80 00 06 b 2008e20 <_RBTree_Extract_unprotected+0x7c> 2008e0c: 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, 2008e10: 80 a6 00 02 cmp %i0, %g2 2008e14: 12 80 00 03 bne 2008e20 <_RBTree_Extract_unprotected+0x7c> 2008e18: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 2008e1c: 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]) { 2008e20: ba 90 60 00 orcc %g1, 0, %i5 2008e24: 02 80 00 36 be 2008efc <_RBTree_Extract_unprotected+0x158> 2008e28: f8 06 60 08 ld [ %i1 + 8 ], %i4 2008e2c: 80 a7 20 00 cmp %i4, 0 2008e30: 32 80 00 05 bne,a 2008e44 <_RBTree_Extract_unprotected+0xa0> 2008e34: c2 07 60 08 ld [ %i5 + 8 ], %g1 2008e38: 10 80 00 35 b 2008f0c <_RBTree_Extract_unprotected+0x168> 2008e3c: 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]; 2008e40: c2 07 60 08 ld [ %i5 + 8 ], %g1 2008e44: 80 a0 60 00 cmp %g1, 0 2008e48: 32 bf ff fe bne,a 2008e40 <_RBTree_Extract_unprotected+0x9c> 2008e4c: 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]; 2008e50: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 2008e54: 80 a7 20 00 cmp %i4, 0 2008e58: 02 80 00 05 be 2008e6c <_RBTree_Extract_unprotected+0xc8> 2008e5c: 01 00 00 00 nop leaf->parent = target->parent; 2008e60: c2 07 40 00 ld [ %i5 ], %g1 2008e64: 10 80 00 04 b 2008e74 <_RBTree_Extract_unprotected+0xd0> 2008e68: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 2008e6c: 7f ff ff 53 call 2008bb8 <_RBTree_Extract_validate_unprotected> 2008e70: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 2008e74: 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; 2008e78: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 2008e7c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008e80: 86 1f 40 03 xor %i5, %g3, %g3 2008e84: 80 a0 00 03 cmp %g0, %g3 2008e88: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 2008e8c: 87 28 e0 02 sll %g3, 2, %g3 2008e90: 84 00 80 03 add %g2, %g3, %g2 2008e94: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 2008e98: c4 06 40 00 ld [ %i1 ], %g2 2008e9c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008ea0: 86 1e 40 03 xor %i1, %g3, %g3 2008ea4: 80 a0 00 03 cmp %g0, %g3 2008ea8: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 2008eac: 87 28 e0 02 sll %g3, 2, %g3 2008eb0: 84 00 80 03 add %g2, %g3, %g2 2008eb4: 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]; 2008eb8: c4 06 60 08 ld [ %i1 + 8 ], %g2 2008ebc: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 2008ec0: c4 06 60 08 ld [ %i1 + 8 ], %g2 2008ec4: 80 a0 a0 00 cmp %g2, 0 2008ec8: 32 80 00 02 bne,a 2008ed0 <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 2008ecc: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 2008ed0: c4 06 60 04 ld [ %i1 + 4 ], %g2 2008ed4: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 2008ed8: c4 06 60 04 ld [ %i1 + 4 ], %g2 2008edc: 80 a0 a0 00 cmp %g2, 0 2008ee0: 32 80 00 02 bne,a 2008ee8 <_RBTree_Extract_unprotected+0x144> 2008ee4: 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; 2008ee8: c4 06 40 00 ld [ %i1 ], %g2 2008eec: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 2008ef0: c4 06 60 0c ld [ %i1 + 0xc ], %g2 2008ef4: 10 80 00 14 b 2008f44 <_RBTree_Extract_unprotected+0x1a0> 2008ef8: 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 ) { 2008efc: 80 a7 20 00 cmp %i4, 0 2008f00: 32 80 00 04 bne,a 2008f10 <_RBTree_Extract_unprotected+0x16c> 2008f04: c2 06 40 00 ld [ %i1 ], %g1 2008f08: 30 80 00 04 b,a 2008f18 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 2008f0c: c2 06 40 00 ld [ %i1 ], %g1 2008f10: 10 80 00 04 b 2008f20 <_RBTree_Extract_unprotected+0x17c> 2008f14: 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); 2008f18: 7f ff ff 28 call 2008bb8 <_RBTree_Extract_validate_unprotected> 2008f1c: 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]; 2008f20: 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; 2008f24: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 2008f28: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008f2c: 86 1e 40 03 xor %i1, %g3, %g3 2008f30: 80 a0 00 03 cmp %g0, %g3 2008f34: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 2008f38: 87 28 e0 02 sll %g3, 2, %g3 2008f3c: 84 00 80 03 add %g2, %g3, %g2 2008f40: 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 */ 2008f44: 80 a0 60 00 cmp %g1, 0 2008f48: 32 80 00 06 bne,a 2008f60 <_RBTree_Extract_unprotected+0x1bc> 2008f4c: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 2008f50: 80 a7 20 00 cmp %i4, 0 2008f54: 32 80 00 02 bne,a 2008f5c <_RBTree_Extract_unprotected+0x1b8> 2008f58: 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; 2008f5c: 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; 2008f60: c0 26 60 08 clr [ %i1 + 8 ] 2008f64: c0 26 60 04 clr [ %i1 + 4 ] 2008f68: 80 a0 60 00 cmp %g1, 0 2008f6c: 02 80 00 03 be 2008f78 <_RBTree_Extract_unprotected+0x1d4> 2008f70: c0 26 40 00 clr [ %i1 ] 2008f74: c0 20 60 0c clr [ %g1 + 0xc ] 2008f78: 81 c7 e0 08 ret 2008f7c: 81 e8 00 00 restore =============================================================================== 02008bb8 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 2008bb8: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 2008bbc: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 2008bc0: c2 07 40 00 ld [ %i5 ], %g1 2008bc4: 80 a0 60 00 cmp %g1, 0 2008bc8: 02 80 00 6e be 2008d80 <_RBTree_Extract_validate_unprotected+0x1c8> 2008bcc: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 2008bd0: 7f ff ff ca call 2008af8 <_RBTree_Sibling> 2008bd4: 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) { 2008bd8: 10 80 00 5d b 2008d4c <_RBTree_Extract_validate_unprotected+0x194> 2008bdc: 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); 2008be0: 22 80 00 15 be,a 2008c34 <_RBTree_Extract_validate_unprotected+0x7c><== NEVER TAKEN 2008be4: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 2008be8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2008bec: 80 a0 60 01 cmp %g1, 1 2008bf0: 32 80 00 11 bne,a 2008c34 <_RBTree_Extract_validate_unprotected+0x7c> 2008bf4: 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; 2008bf8: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 2008bfc: 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; 2008c00: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 2008c04: 82 1e 00 01 xor %i0, %g1, %g1 2008c08: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 2008c0c: 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]; 2008c10: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 2008c14: 7f ff ff ca call 2008b3c <_RBTree_Rotate> 2008c18: 92 10 00 1c mov %i4, %o1 sibling = parent->child[!dir]; 2008c1c: 80 a0 00 1c cmp %g0, %i4 2008c20: 82 60 3f ff subx %g0, -1, %g1 2008c24: 83 28 60 02 sll %g1, 2, %g1 2008c28: 82 07 40 01 add %i5, %g1, %g1 2008c2c: 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]) && 2008c30: c4 02 20 08 ld [ %o0 + 8 ], %g2 2008c34: 80 a0 a0 00 cmp %g2, 0 2008c38: 02 80 00 06 be 2008c50 <_RBTree_Extract_validate_unprotected+0x98> 2008c3c: 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( 2008c40: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008c44: 82 18 60 01 xor %g1, 1, %g1 2008c48: 80 a0 00 01 cmp %g0, %g1 2008c4c: 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]) && 2008c50: 80 a0 60 00 cmp %g1, 0 2008c54: 32 80 00 14 bne,a 2008ca4 <_RBTree_Extract_validate_unprotected+0xec> 2008c58: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 2008c5c: c4 02 20 04 ld [ %o0 + 4 ], %g2 2008c60: 80 a0 a0 00 cmp %g2, 0 2008c64: 02 80 00 07 be 2008c80 <_RBTree_Extract_validate_unprotected+0xc8> 2008c68: 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( 2008c6c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008c70: 82 18 60 01 xor %g1, 1, %g1 2008c74: 80 a0 00 01 cmp %g0, %g1 2008c78: 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]) && 2008c7c: 80 a0 60 00 cmp %g1, 0 2008c80: 32 80 00 09 bne,a 2008ca4 <_RBTree_Extract_validate_unprotected+0xec> 2008c84: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 2008c88: f4 22 20 0c st %i2, [ %o0 + 0xc ] 2008c8c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2008c90: 80 a0 60 01 cmp %g1, 1 2008c94: 32 80 00 3d bne,a 2008d88 <_RBTree_Extract_validate_unprotected+0x1d0> 2008c98: f8 07 40 00 ld [ %i5 ], %i4 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 2008c9c: 10 80 00 33 b 2008d68 <_RBTree_Extract_validate_unprotected+0x1b0> 2008ca0: 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]; 2008ca4: 82 1e 00 01 xor %i0, %g1, %g1 2008ca8: 80 a0 00 01 cmp %g0, %g1 2008cac: b8 40 20 00 addx %g0, 0, %i4 if (!_RBTree_Is_red(sibling->child[!dir])) { 2008cb0: 80 a0 00 1c cmp %g0, %i4 2008cb4: b6 60 3f ff subx %g0, -1, %i3 2008cb8: 83 2e e0 02 sll %i3, 2, %g1 2008cbc: 82 02 00 01 add %o0, %g1, %g1 2008cc0: c4 00 60 04 ld [ %g1 + 4 ], %g2 2008cc4: 80 a0 a0 00 cmp %g2, 0 2008cc8: 02 80 00 06 be 2008ce0 <_RBTree_Extract_validate_unprotected+0x128> 2008ccc: 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( 2008cd0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008cd4: 82 18 60 01 xor %g1, 1, %g1 2008cd8: 80 a0 00 01 cmp %g0, %g1 2008cdc: 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])) { 2008ce0: 80 a0 60 00 cmp %g1, 0 2008ce4: 32 80 00 0e bne,a 2008d1c <_RBTree_Extract_validate_unprotected+0x164> 2008ce8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 2008cec: 82 10 20 01 mov 1, %g1 2008cf0: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 2008cf4: 83 2f 20 02 sll %i4, 2, %g1 2008cf8: 82 02 00 01 add %o0, %g1, %g1 2008cfc: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, !dir); 2008d00: 92 1f 20 01 xor %i4, 1, %o1 2008d04: 7f ff ff 8e call 2008b3c <_RBTree_Rotate> 2008d08: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[!dir]; 2008d0c: 83 2e e0 02 sll %i3, 2, %g1 2008d10: 82 07 40 01 add %i5, %g1, %g1 2008d14: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 2008d18: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2008d1c: 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; 2008d20: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2008d24: 90 02 00 1b add %o0, %i3, %o0 2008d28: 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; 2008d2c: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[!dir]->color = RBT_BLACK; 2008d30: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 2008d34: 90 10 00 1d mov %i5, %o0 2008d38: 7f ff ff 81 call 2008b3c <_RBTree_Rotate> 2008d3c: 92 10 00 1c mov %i4, %o1 break; /* done */ 2008d40: 10 80 00 0b b 2008d6c <_RBTree_Extract_validate_unprotected+0x1b4> 2008d44: 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) { 2008d48: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008d4c: 80 a0 60 01 cmp %g1, 1 2008d50: 22 80 00 07 be,a 2008d6c <_RBTree_Extract_validate_unprotected+0x1b4> 2008d54: c2 06 00 00 ld [ %i0 ], %g1 2008d58: c2 07 40 00 ld [ %i5 ], %g1 2008d5c: 80 a0 60 00 cmp %g1, 0 2008d60: 12 bf ff a0 bne 2008be0 <_RBTree_Extract_validate_unprotected+0x28> 2008d64: 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; 2008d68: c2 06 00 00 ld [ %i0 ], %g1 2008d6c: c2 00 40 00 ld [ %g1 ], %g1 2008d70: 80 a0 60 00 cmp %g1, 0 2008d74: 12 80 00 0a bne 2008d9c <_RBTree_Extract_validate_unprotected+0x1e4> 2008d78: 01 00 00 00 nop 2008d7c: c0 26 20 0c clr [ %i0 + 0xc ] 2008d80: 81 c7 e0 08 ret 2008d84: 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); 2008d88: 90 10 00 1d mov %i5, %o0 2008d8c: 7f ff ff 5b call 2008af8 <_RBTree_Sibling> 2008d90: b0 10 00 1d mov %i5, %i0 2008d94: 10 bf ff ed b 2008d48 <_RBTree_Extract_validate_unprotected+0x190> 2008d98: ba 10 00 1c mov %i4, %i5 2008d9c: 81 c7 e0 08 ret 2008da0: 81 e8 00 00 restore =============================================================================== 02008ff4 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 2008ff4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 2008ff8: 7f ff e8 15 call 200304c 2008ffc: ba 10 00 18 mov %i0, %i5 2009000: b8 10 00 08 mov %o0, %i4 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 2009004: 10 80 00 0d b 2009038 <_RBTree_Find+0x44> 2009008: f0 06 20 04 ld [ %i0 + 4 ], %i0 int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 200900c: 90 10 00 19 mov %i1, %o0 2009010: 9f c0 40 00 call %g1 2009014: 92 10 00 18 mov %i0, %o1 if (compare_result == 0) { 2009018: 80 a2 20 00 cmp %o0, 0 200901c: 02 80 00 0a be 2009044 <_RBTree_Find+0x50> 2009020: 90 38 00 08 xnor %g0, %o0, %o0 return(iter_node); } RBTree_Direction dir = (compare_result != -1); 2009024: 80 a0 00 08 cmp %g0, %o0 2009028: 82 40 20 00 addx %g0, 0, %g1 iter_node = iter_node->child[dir]; 200902c: 83 28 60 02 sll %g1, 2, %g1 2009030: b0 06 00 01 add %i0, %g1, %i0 2009034: f0 06 20 04 ld [ %i0 + 4 ], %i0 RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; int compare_result; while (iter_node) { 2009038: 80 a6 20 00 cmp %i0, 0 200903c: 32 bf ff f4 bne,a 200900c <_RBTree_Find+0x18> <== ALWAYS TAKEN 2009040: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 2009044: 7f ff e8 06 call 200305c 2009048: 90 10 00 1c mov %i4, %o0 return return_node; } 200904c: 81 c7 e0 08 ret 2009050: 81 e8 00 00 restore =============================================================================== 020092e8 <_RBTree_Initialize>: void *compare_function, void *starting_address, size_t number_nodes, size_t node_size ) { 20092e8: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 20092ec: 80 a6 20 00 cmp %i0, 0 20092f0: 02 80 00 0f be 200932c <_RBTree_Initialize+0x44> <== NEVER TAKEN 20092f4: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _RBTree_Initialize_empty( RBTree_Control *the_rbtree, void *compare_function ) { the_rbtree->permanent_null = NULL; 20092f8: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 20092fc: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 2009300: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 2009304: c0 26 20 0c clr [ %i0 + 0xc ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function); count = number_nodes; next = starting_address; while ( count-- ) { 2009308: 10 80 00 06 b 2009320 <_RBTree_Initialize+0x38> 200930c: f2 26 20 10 st %i1, [ %i0 + 0x10 ] _RBTree_Insert(the_rbtree, next); 2009310: 90 10 00 18 mov %i0, %o0 2009314: 7f ff ff ec call 20092c4 <_RBTree_Insert> 2009318: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 200931c: b6 06 ff ff add %i3, -1, %i3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function); count = number_nodes; next = starting_address; while ( count-- ) { 2009320: 80 a6 e0 00 cmp %i3, 0 2009324: 12 bf ff fb bne 2009310 <_RBTree_Initialize+0x28> 2009328: 92 10 00 1a mov %i2, %o1 200932c: 81 c7 e0 08 ret 2009330: 81 e8 00 00 restore =============================================================================== 020025cc <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; 20025cc: 80 a2 20 00 cmp %o0, 0 20025d0: 02 80 00 0e be 2002608 <_RBTree_Sibling+0x3c> 20025d4: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 20025d8: c4 02 00 00 ld [ %o0 ], %g2 20025dc: 80 a0 a0 00 cmp %g2, 0 20025e0: 02 80 00 0a be 2002608 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 20025e4: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 20025e8: c6 00 80 00 ld [ %g2 ], %g3 20025ec: 80 a0 e0 00 cmp %g3, 0 20025f0: 02 80 00 06 be 2002608 <_RBTree_Sibling+0x3c> 20025f4: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 20025f8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20025fc: 80 a2 00 01 cmp %o0, %g1 2002600: 22 80 00 02 be,a 2002608 <_RBTree_Sibling+0x3c> 2002604: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 2002608: 81 c3 e0 08 retl 200260c: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200910c <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 200910c: 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))) { 2009110: 10 80 00 1f b 200918c <_RBTree_Validate_insert_unprotected+0x80> 2009114: 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; 2009118: 80 a0 60 00 cmp %g1, 0 200911c: 02 80 00 27 be 20091b8 <_RBTree_Validate_insert_unprotected+0xac><== NEVER TAKEN 2009120: 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]) 2009124: 80 a2 00 01 cmp %o0, %g1 2009128: 22 80 00 02 be,a 2009130 <_RBTree_Validate_insert_unprotected+0x24> 200912c: 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); 2009130: 80 a0 60 00 cmp %g1, 0 2009134: 22 80 00 21 be,a 20091b8 <_RBTree_Validate_insert_unprotected+0xac> 2009138: c2 07 60 04 ld [ %i5 + 4 ], %g1 200913c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2009140: 80 a0 a0 01 cmp %g2, 1 2009144: 32 80 00 1d bne,a 20091b8 <_RBTree_Validate_insert_unprotected+0xac> 2009148: 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; 200914c: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 2009150: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009154: c4 27 60 0c st %g2, [ %i5 + 0xc ] 2009158: 10 80 00 0d b 200918c <_RBTree_Validate_insert_unprotected+0x80> 200915c: 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); 2009160: 7f ff ff cc call 2009090 <_RBTree_Rotate> 2009164: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 2009168: 83 2f 20 02 sll %i4, 2, %g1 200916c: b0 06 00 01 add %i0, %g1, %i0 2009170: f0 06 20 04 ld [ %i0 + 4 ], %i0 } the_node->parent->color = RBT_BLACK; 2009174: 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)); 2009178: 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; 200917c: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009180: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 2009184: 7f ff ff c3 call 2009090 <_RBTree_Rotate> 2009188: 92 26 c0 1c sub %i3, %i4, %o1 ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 200918c: 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; 2009190: fa 02 00 00 ld [ %o0 ], %i5 2009194: 80 a7 60 00 cmp %i5, 0 2009198: 22 80 00 14 be,a 20091e8 <_RBTree_Validate_insert_unprotected+0xdc> 200919c: 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); 20091a0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20091a4: 80 a0 60 01 cmp %g1, 1 20091a8: 12 80 00 10 bne 20091e8 <_RBTree_Validate_insert_unprotected+0xdc> 20091ac: 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; 20091b0: 10 bf ff da b 2009118 <_RBTree_Validate_insert_unprotected+0xc> 20091b4: 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]; 20091b8: 82 1a 00 01 xor %o0, %g1, %g1 20091bc: 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]; 20091c0: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 20091c4: 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]; 20091c8: 82 1e 00 01 xor %i0, %g1, %g1 20091cc: 80 a0 00 01 cmp %g0, %g1 20091d0: 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) { 20091d4: 80 a0 40 1c cmp %g1, %i4 20091d8: 12 bf ff e2 bne 2009160 <_RBTree_Validate_insert_unprotected+0x54> 20091dc: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 20091e0: 10 bf ff e6 b 2009178 <_RBTree_Validate_insert_unprotected+0x6c> 20091e4: c2 06 00 00 ld [ %i0 ], %g1 20091e8: 81 c7 e0 08 ret 20091ec: 81 e8 00 00 restore =============================================================================== 0200ba60 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200ba60: 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 ]; 200ba64: fa 06 21 58 ld [ %i0 + 0x158 ], %i5 if ( !api ) 200ba68: 80 a7 60 00 cmp %i5, 0 200ba6c: 02 80 00 1c be 200badc <_RTEMS_tasks_Post_switch_extension+0x7c><== NEVER TAKEN 200ba70: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200ba74: 7f ff d9 c2 call 200217c 200ba78: 01 00 00 00 nop signal_set = asr->signals_posted; 200ba7c: f6 07 60 14 ld [ %i5 + 0x14 ], %i3 asr->signals_posted = 0; 200ba80: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 200ba84: 7f ff d9 c2 call 200218c 200ba88: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200ba8c: 80 a6 e0 00 cmp %i3, 0 200ba90: 02 80 00 13 be 200badc <_RTEMS_tasks_Post_switch_extension+0x7c> 200ba94: 94 07 bf fc add %fp, -4, %o2 return; asr->nest_level += 1; 200ba98: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ba9c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200baa0: 82 00 60 01 inc %g1 200baa4: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200baa8: 39 00 00 3f sethi %hi(0xfc00), %i4 200baac: 40 00 07 3b call 200d798 200bab0: 92 17 23 ff or %i4, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200bab4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200bab8: 9f c0 40 00 call %g1 200babc: 90 10 00 1b mov %i3, %o0 asr->nest_level -= 1; 200bac0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bac4: 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; 200bac8: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bacc: 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; 200bad0: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bad4: 40 00 07 31 call 200d798 200bad8: 94 07 bf fc add %fp, -4, %o2 200badc: 81 c7 e0 08 ret 200bae0: 81 e8 00 00 restore =============================================================================== 020076c8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20076c8: 9d e3 bf 98 save %sp, -104, %sp 20076cc: 11 00 80 74 sethi %hi(0x201d000), %o0 20076d0: 92 10 00 18 mov %i0, %o1 20076d4: 90 12 21 c4 or %o0, 0x1c4, %o0 20076d8: 40 00 07 be call 20095d0 <_Objects_Get> 20076dc: 94 07 bf fc add %fp, -4, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 20076e0: c2 07 bf fc ld [ %fp + -4 ], %g1 20076e4: 80 a0 60 00 cmp %g1, 0 20076e8: 12 80 00 25 bne 200777c <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 20076ec: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 20076f0: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 20076f4: 03 00 00 10 sethi %hi(0x4000), %g1 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 20076f8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 20076fc: 80 88 80 01 btst %g2, %g1 2007700: 22 80 00 0b be,a 200772c <_Rate_monotonic_Timeout+0x64> 2007704: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2007708: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 200770c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2007710: 80 a0 80 01 cmp %g2, %g1 2007714: 32 80 00 06 bne,a 200772c <_Rate_monotonic_Timeout+0x64> 2007718: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200771c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2007720: 40 00 0a 6e call 200a0d8 <_Thread_Clear_state> 2007724: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 2007728: 30 80 00 06 b,a 2007740 <_Rate_monotonic_Timeout+0x78> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 200772c: 80 a0 60 01 cmp %g1, 1 2007730: 12 80 00 0d bne 2007764 <_Rate_monotonic_Timeout+0x9c> 2007734: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007738: 82 10 20 03 mov 3, %g1 200773c: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2007740: 7f ff fe 70 call 2007100 <_Rate_monotonic_Initiate_statistics> 2007744: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007748: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200774c: 11 00 80 74 sethi %hi(0x201d000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007750: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007754: 90 12 23 ec or %o0, 0x3ec, %o0 2007758: 40 00 0f 04 call 200b368 <_Watchdog_Insert> 200775c: 92 07 60 10 add %i5, 0x10, %o1 2007760: 30 80 00 02 b,a 2007768 <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007764: c2 27 60 38 st %g1, [ %i5 + 0x38 ] * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2007768: 03 00 80 74 sethi %hi(0x201d000), %g1 200776c: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 201d330 <_Thread_Dispatch_disable_level> 2007770: 84 00 bf ff add %g2, -1, %g2 2007774: c4 20 63 30 st %g2, [ %g1 + 0x330 ] return _Thread_Dispatch_disable_level; 2007778: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 200777c: 81 c7 e0 08 ret 2007780: 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 38 ld [ %g1 + 0x338 ], %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 65 call 2018b10 <.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 48 or %g3, 0x48, %g3 ! 201bc48 <_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 =============================================================================== 02008790 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2008790: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2008794: 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 ); 2008798: 40 00 03 56 call 20094f0 <_Thread_Set_transient> 200879c: 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 ) 20087a0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20087a4: 80 a0 40 19 cmp %g1, %i1 20087a8: 02 80 00 05 be 20087bc <_Thread_Change_priority+0x2c> 20087ac: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 20087b0: 90 10 00 18 mov %i0, %o0 20087b4: 40 00 03 36 call 200948c <_Thread_Set_priority> 20087b8: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 20087bc: 7f ff e6 70 call 200217c 20087c0: 01 00 00 00 nop 20087c4: 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; 20087c8: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 20087cc: 80 a6 60 04 cmp %i1, 4 20087d0: 02 80 00 10 be 2008810 <_Thread_Change_priority+0x80> 20087d4: 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 ) ) 20087d8: 80 a7 20 00 cmp %i4, 0 20087dc: 12 80 00 03 bne 20087e8 <_Thread_Change_priority+0x58> <== NEVER TAKEN 20087e0: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20087e4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 20087e8: 7f ff e6 69 call 200218c 20087ec: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20087f0: 03 00 00 ef sethi %hi(0x3bc00), %g1 20087f4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20087f8: 80 8e 40 01 btst %i1, %g1 20087fc: 02 80 00 29 be 20088a0 <_Thread_Change_priority+0x110> 2008800: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2008804: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2008808: 40 00 02 f3 call 20093d4 <_Thread_queue_Requeue> 200880c: 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 ) ) { 2008810: 80 a7 20 00 cmp %i4, 0 2008814: 12 80 00 0b bne 2008840 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2008818: 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 ); 200881c: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2008820: 80 a6 a0 00 cmp %i2, 0 2008824: 02 80 00 04 be 2008834 <_Thread_Change_priority+0xa4> 2008828: 82 10 60 b4 or %g1, 0xb4, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 200882c: 10 80 00 03 b 2008838 <_Thread_Change_priority+0xa8> 2008830: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2008834: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008838: 9f c0 40 00 call %g1 200883c: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2008840: 7f ff e6 53 call 200218c 2008844: 90 10 00 1b mov %i3, %o0 2008848: 7f ff e6 4d call 200217c 200884c: 01 00 00 00 nop 2008850: 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(); 2008854: 03 00 80 6a sethi %hi(0x201a800), %g1 2008858: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 201a8bc <_Scheduler+0x8> 200885c: 9f c0 40 00 call %g1 2008860: 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 ); 2008864: 03 00 80 6d sethi %hi(0x201b400), %g1 2008868: 82 10 62 dc or %g1, 0x2dc, %g1 ! 201b6dc <_Per_CPU_Information> 200886c: 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() && 2008870: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2008874: 80 a0 80 03 cmp %g2, %g3 2008878: 02 80 00 08 be 2008898 <_Thread_Change_priority+0x108> 200887c: 01 00 00 00 nop 2008880: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2 2008884: 80 a0 a0 00 cmp %g2, 0 2008888: 02 80 00 04 be 2008898 <_Thread_Change_priority+0x108> 200888c: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2008890: 84 10 20 01 mov 1, %g2 ! 1 2008894: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2008898: 7f ff e6 3d call 200218c 200889c: 81 e8 00 00 restore 20088a0: 81 c7 e0 08 ret 20088a4: 81 e8 00 00 restore =============================================================================== 02008a94 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008a94: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008a98: 90 10 00 18 mov %i0, %o0 2008a9c: 40 00 00 6e call 2008c54 <_Thread_Get> 2008aa0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008aa4: c2 07 bf fc ld [ %fp + -4 ], %g1 2008aa8: 80 a0 60 00 cmp %g1, 0 2008aac: 12 80 00 09 bne 2008ad0 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2008ab0: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008ab4: 7f ff ff 7d call 20088a8 <_Thread_Clear_state> 2008ab8: 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--; 2008abc: 03 00 80 6d sethi %hi(0x201b400), %g1 2008ac0: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 201b4b0 <_Thread_Dispatch_disable_level> 2008ac4: 84 00 bf ff add %g2, -1, %g2 2008ac8: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] return _Thread_Dispatch_disable_level; 2008acc: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 2008ad0: 81 c7 e0 08 ret 2008ad4: 81 e8 00 00 restore =============================================================================== 02008ad8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008ad8: 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++; 2008adc: 03 00 80 6d sethi %hi(0x201b400), %g1 2008ae0: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 201b4b0 <_Thread_Dispatch_disable_level> 2008ae4: 84 00 a0 01 inc %g2 2008ae8: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] return _Thread_Dispatch_disable_level; 2008aec: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2008af0: 33 00 80 6d sethi %hi(0x201b400), %i1 2008af4: b4 16 62 dc or %i1, 0x2dc, %i2 ! 201b6dc <_Per_CPU_Information> _ISR_Disable( level ); 2008af8: 7f ff e5 a1 call 200217c 2008afc: 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; 2008b00: 21 00 80 6d sethi %hi(0x201b400), %l0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008b04: b4 06 a0 1c add %i2, 0x1c, %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b08: 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 ) { 2008b0c: 10 80 00 38 b 2008bec <_Thread_Dispatch+0x114> 2008b10: 37 00 80 6d sethi %hi(0x201b400), %i3 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2008b14: 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 ) 2008b18: 80 a7 00 1d cmp %i4, %i5 2008b1c: 02 80 00 39 be 2008c00 <_Thread_Dispatch+0x128> 2008b20: 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 ) 2008b24: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 2008b28: 80 a0 60 01 cmp %g1, 1 2008b2c: 12 80 00 03 bne 2008b38 <_Thread_Dispatch+0x60> 2008b30: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008b34: c2 27 20 78 st %g1, [ %i4 + 0x78 ] _ISR_Enable( level ); 2008b38: 7f ff e5 95 call 200218c 2008b3c: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008b40: 40 00 0c c1 call 200be44 <_TOD_Get_uptime> 2008b44: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( 2008b48: 90 10 00 1a mov %i2, %o0 2008b4c: 92 07 bf f0 add %fp, -16, %o1 2008b50: 40 00 02 db call 20096bc <_Timespec_Subtract> 2008b54: 94 07 bf f8 add %fp, -8, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008b58: 90 07 60 84 add %i5, 0x84, %o0 2008b5c: 40 00 02 bf call 2009658 <_Timespec_Add_to> 2008b60: 92 07 bf f8 add %fp, -8, %o1 _Thread_Time_of_last_context_switch = uptime; 2008b64: c4 07 bf f0 ld [ %fp + -16 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b68: c2 06 21 38 ld [ %i0 + 0x138 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008b6c: c4 26 80 00 st %g2, [ %i2 ] 2008b70: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008b74: 80 a0 60 00 cmp %g1, 0 2008b78: 02 80 00 06 be 2008b90 <_Thread_Dispatch+0xb8> <== NEVER TAKEN 2008b7c: c4 26 a0 04 st %g2, [ %i2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2008b80: c4 00 40 00 ld [ %g1 ], %g2 2008b84: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2008b88: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 2008b8c: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008b90: 90 10 00 1d mov %i5, %o0 2008b94: 40 00 03 78 call 2009974 <_User_extensions_Thread_switch> 2008b98: 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 ); 2008b9c: 90 07 60 c8 add %i5, 0xc8, %o0 2008ba0: 40 00 04 9e call 2009e18 <_CPU_Context_switch> 2008ba4: 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) && 2008ba8: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2008bac: 80 a0 60 00 cmp %g1, 0 2008bb0: 02 80 00 0c be 2008be0 <_Thread_Dispatch+0x108> 2008bb4: d0 06 e1 34 ld [ %i3 + 0x134 ], %o0 2008bb8: 80 a7 40 08 cmp %i5, %o0 2008bbc: 02 80 00 09 be 2008be0 <_Thread_Dispatch+0x108> 2008bc0: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008bc4: 02 80 00 04 be 2008bd4 <_Thread_Dispatch+0xfc> 2008bc8: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008bcc: 40 00 04 59 call 2009d30 <_CPU_Context_save_fp> 2008bd0: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2008bd4: 40 00 04 74 call 2009da4 <_CPU_Context_restore_fp> 2008bd8: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2008bdc: fa 26 e1 34 st %i5, [ %i3 + 0x134 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2008be0: 82 16 62 dc or %i1, 0x2dc, %g1 _ISR_Disable( level ); 2008be4: 7f ff e5 66 call 200217c 2008be8: 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 ) { 2008bec: 82 16 62 dc or %i1, 0x2dc, %g1 2008bf0: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 2008bf4: 80 a0 a0 00 cmp %g2, 0 2008bf8: 32 bf ff c7 bne,a 2008b14 <_Thread_Dispatch+0x3c> 2008bfc: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 2008c00: 03 00 80 6d sethi %hi(0x201b400), %g1 2008c04: c0 20 60 b0 clr [ %g1 + 0xb0 ] ! 201b4b0 <_Thread_Dispatch_disable_level> } post_switch: _Thread_Dispatch_set_disable_level( 0 ); _ISR_Enable( level ); 2008c08: 7f ff e5 61 call 200218c 2008c0c: 01 00 00 00 nop _API_extensions_Run_postswitch(); 2008c10: 7f ff f8 5a call 2006d78 <_API_extensions_Run_postswitch> 2008c14: 01 00 00 00 nop } 2008c18: 81 c7 e0 08 ret 2008c1c: 81 e8 00 00 restore =============================================================================== 0200dac8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200dac8: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200dacc: 03 00 80 6d sethi %hi(0x201b400), %g1 200dad0: fa 00 62 e8 ld [ %g1 + 0x2e8 ], %i5 ! 201b6e8 <_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(); 200dad4: 3f 00 80 36 sethi %hi(0x200d800), %i7 200dad8: be 17 e2 c8 or %i7, 0x2c8, %i7 ! 200dac8 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200dadc: d0 07 60 ac ld [ %i5 + 0xac ], %o0 _ISR_Set_level(level); 200dae0: 7f ff d1 ab call 200218c 200dae4: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200dae8: 03 00 80 6c sethi %hi(0x201b000), %g1 doneConstructors = 1; 200daec: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200daf0: f8 08 61 70 ldub [ %g1 + 0x170 ], %i4 doneConstructors = 1; 200daf4: c4 28 61 70 stb %g2, [ %g1 + 0x170 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200daf8: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200dafc: 80 a0 60 00 cmp %g1, 0 200db00: 02 80 00 0c be 200db30 <_Thread_Handler+0x68> 200db04: 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 ); 200db08: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 201b534 <_Thread_Allocated_fp> 200db0c: 80 a7 40 08 cmp %i5, %o0 200db10: 02 80 00 08 be 200db30 <_Thread_Handler+0x68> 200db14: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200db18: 22 80 00 06 be,a 200db30 <_Thread_Handler+0x68> 200db1c: fa 20 61 34 st %i5, [ %g1 + 0x134 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200db20: 7f ff f0 84 call 2009d30 <_CPU_Context_save_fp> 200db24: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200db28: 03 00 80 6d sethi %hi(0x201b400), %g1 200db2c: fa 20 61 34 st %i5, [ %g1 + 0x134 ] ! 201b534 <_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 ); 200db30: 7f ff ef 22 call 20097b8 <_User_extensions_Thread_begin> 200db34: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200db38: 7f ff ec 3a call 2008c20 <_Thread_Enable_dispatch> 200db3c: b9 2f 20 18 sll %i4, 0x18, %i4 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 200db40: 80 a7 20 00 cmp %i4, 0 200db44: 32 80 00 05 bne,a 200db58 <_Thread_Handler+0x90> 200db48: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 INIT_NAME (); 200db4c: 40 00 33 0f call 201a788 <_init> 200db50: 01 00 00 00 nop #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200db54: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 200db58: 80 a0 60 00 cmp %g1, 0 200db5c: 12 80 00 06 bne 200db74 <_Thread_Handler+0xac> <== NEVER TAKEN 200db60: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200db64: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200db68: 9f c0 40 00 call %g1 200db6c: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200db70: 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 ); 200db74: 7f ff ef 22 call 20097fc <_User_extensions_Thread_exitted> 200db78: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200db7c: 90 10 20 00 clr %o0 200db80: 92 10 20 01 mov 1, %o1 200db84: 7f ff e7 20 call 2007804 <_Internal_error_Occurred> 200db88: 94 10 20 05 mov 5, %o2 =============================================================================== 02008d04 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008d04: 9d e3 bf a0 save %sp, -96, %sp 2008d08: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 2008d0c: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 2008d10: 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; 2008d14: c0 26 61 58 clr [ %i1 + 0x158 ] 2008d18: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008d1c: 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 ); 2008d20: 90 10 00 19 mov %i1, %o0 2008d24: 40 00 02 02 call 200952c <_Thread_Stack_Allocate> 2008d28: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008d2c: 80 a2 00 1b cmp %o0, %i3 2008d30: 0a 80 00 61 bcs 2008eb4 <_Thread_Initialize+0x1b0> 2008d34: 80 a2 20 00 cmp %o0, 0 2008d38: 02 80 00 5f be 2008eb4 <_Thread_Initialize+0x1b0> <== NEVER TAKEN 2008d3c: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008d40: c2 06 60 c0 ld [ %i1 + 0xc0 ], %g1 the_stack->size = size; 2008d44: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008d48: 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 ) { 2008d4c: 02 80 00 07 be 2008d68 <_Thread_Initialize+0x64> 2008d50: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008d54: 40 00 03 db call 2009cc0 <_Workspace_Allocate> 2008d58: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008d5c: b6 92 20 00 orcc %o0, 0, %i3 2008d60: 02 80 00 46 be 2008e78 <_Thread_Initialize+0x174> 2008d64: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008d68: 03 00 80 6d sethi %hi(0x201b400), %g1 2008d6c: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 201b544 <_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; 2008d70: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2008d74: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008d78: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008d7c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008d80: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2008d84: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008d88: 80 a2 20 00 cmp %o0, 0 2008d8c: 02 80 00 08 be 2008dac <_Thread_Initialize+0xa8> 2008d90: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 2008d94: 90 02 20 01 inc %o0 2008d98: 40 00 03 ca call 2009cc0 <_Workspace_Allocate> 2008d9c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2008da0: b8 92 20 00 orcc %o0, 0, %i4 2008da4: 22 80 00 36 be,a 2008e7c <_Thread_Initialize+0x178> 2008da8: 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 ) { 2008dac: 80 a7 20 00 cmp %i4, 0 2008db0: 02 80 00 0c be 2008de0 <_Thread_Initialize+0xdc> 2008db4: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008db8: 03 00 80 6d sethi %hi(0x201b400), %g1 2008dbc: c4 00 61 44 ld [ %g1 + 0x144 ], %g2 ! 201b544 <_Thread_Maximum_extensions> 2008dc0: 10 80 00 05 b 2008dd4 <_Thread_Initialize+0xd0> 2008dc4: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2008dc8: 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++ ) 2008dcc: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2008dd0: 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++ ) 2008dd4: 80 a0 40 02 cmp %g1, %g2 2008dd8: 28 bf ff fc bleu,a 2008dc8 <_Thread_Initialize+0xc4> 2008ddc: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008de0: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008de4: f4 2e 60 a0 stb %i2, [ %i1 + 0xa0 ] the_thread->Start.budget_algorithm = budget_algorithm; 2008de8: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] the_thread->Start.budget_callout = budget_callout; 2008dec: 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; 2008df0: 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; 2008df4: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008df8: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2008dfc: c0 26 60 1c clr [ %i1 + 0x1c ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008e00: c2 26 60 ac st %g1, [ %i1 + 0xac ] the_thread->current_state = STATES_DORMANT; 2008e04: 82 10 20 01 mov 1, %g1 2008e08: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2008e0c: 03 00 80 6a sethi %hi(0x201a800), %g1 2008e10: c2 00 60 cc ld [ %g1 + 0xcc ], %g1 ! 201a8cc <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; 2008e14: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2008e18: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ] 2008e1c: 9f c0 40 00 call %g1 2008e20: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2008e24: b4 92 20 00 orcc %o0, 0, %i2 2008e28: 02 80 00 15 be 2008e7c <_Thread_Initialize+0x178> 2008e2c: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2008e30: 40 00 01 97 call 200948c <_Thread_Set_priority> 2008e34: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008e38: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2008e3c: 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 ); 2008e40: c0 26 60 84 clr [ %i1 + 0x84 ] 2008e44: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008e48: 83 28 60 02 sll %g1, 2, %g1 2008e4c: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008e50: 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 ); 2008e54: 90 10 00 19 mov %i1, %o0 2008e58: 40 00 02 8a call 2009880 <_User_extensions_Thread_create> 2008e5c: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008e60: 80 8a 20 ff btst 0xff, %o0 2008e64: 02 80 00 06 be 2008e7c <_Thread_Initialize+0x178> 2008e68: 01 00 00 00 nop 2008e6c: b0 0e 20 01 and %i0, 1, %i0 2008e70: 81 c7 e0 08 ret 2008e74: 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; 2008e78: 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 ); 2008e7c: 40 00 03 99 call 2009ce0 <_Workspace_Free> 2008e80: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 2008e84: 40 00 03 97 call 2009ce0 <_Workspace_Free> 2008e88: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 2008e8c: 40 00 03 95 call 2009ce0 <_Workspace_Free> 2008e90: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 2008e94: 40 00 03 93 call 2009ce0 <_Workspace_Free> 2008e98: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 2008e9c: 40 00 03 91 call 2009ce0 <_Workspace_Free> 2008ea0: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 2008ea4: 40 00 03 8f call 2009ce0 <_Workspace_Free> 2008ea8: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 2008eac: 40 00 01 b7 call 2009588 <_Thread_Stack_Free> 2008eb0: 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 */ 2008eb4: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 2008eb8: b0 0e 20 01 and %i0, 1, %i0 2008ebc: 81 c7 e0 08 ret 2008ec0: 81 e8 00 00 restore =============================================================================== 020093d4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20093d4: 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 ) 20093d8: 80 a6 20 00 cmp %i0, 0 20093dc: 02 80 00 19 be 2009440 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20093e0: 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 ) { 20093e4: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 20093e8: 80 a7 20 01 cmp %i4, 1 20093ec: 12 80 00 15 bne 2009440 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20093f0: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 20093f4: 7f ff e3 62 call 200217c 20093f8: 01 00 00 00 nop 20093fc: ba 10 00 08 mov %o0, %i5 2009400: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2009404: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009408: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200940c: 80 88 80 01 btst %g2, %g1 2009410: 02 80 00 0a be 2009438 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2009414: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 2009418: 92 10 00 19 mov %i1, %o1 200941c: 94 10 20 01 mov 1, %o2 2009420: 40 00 0b f8 call 200c400 <_Thread_queue_Extract_priority_helper> 2009424: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2009428: 90 10 00 18 mov %i0, %o0 200942c: 92 10 00 19 mov %i1, %o1 2009430: 7f ff ff 50 call 2009170 <_Thread_queue_Enqueue_priority> 2009434: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 2009438: 7f ff e3 55 call 200218c 200943c: 90 10 00 1d mov %i5, %o0 2009440: 81 c7 e0 08 ret 2009444: 81 e8 00 00 restore =============================================================================== 02009448 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009448: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200944c: 90 10 00 18 mov %i0, %o0 2009450: 7f ff fe 01 call 2008c54 <_Thread_Get> 2009454: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009458: c2 07 bf fc ld [ %fp + -4 ], %g1 200945c: 80 a0 60 00 cmp %g1, 0 2009460: 12 80 00 09 bne 2009484 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 2009464: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009468: 40 00 0c 1d call 200c4dc <_Thread_queue_Process_timeout> 200946c: 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--; 2009470: 03 00 80 6d sethi %hi(0x201b400), %g1 2009474: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 201b4b0 <_Thread_Dispatch_disable_level> 2009478: 84 00 bf ff add %g2, -1, %g2 200947c: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] return _Thread_Dispatch_disable_level; 2009480: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 2009484: 81 c7 e0 08 ret 2009488: 81 e8 00 00 restore =============================================================================== 0201718c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 201718c: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2017190: 27 00 80 e8 sethi %hi(0x203a000), %l3 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017194: a8 07 bf e8 add %fp, -24, %l4 2017198: a4 07 bf ec add %fp, -20, %l2 201719c: b6 07 bf f4 add %fp, -12, %i3 20171a0: b4 07 bf f8 add %fp, -8, %i2 20171a4: e4 27 bf e8 st %l2, [ %fp + -24 ] head->previous = NULL; 20171a8: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 20171ac: e8 27 bf f0 st %l4, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20171b0: f4 27 bf f4 st %i2, [ %fp + -12 ] head->previous = NULL; 20171b4: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 20171b8: f6 27 bf fc st %i3, [ %fp + -4 ] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20171bc: b2 06 20 30 add %i0, 0x30, %i1 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 20171c0: b8 06 20 68 add %i0, 0x68, %i4 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20171c4: a2 06 20 08 add %i0, 8, %l1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 20171c8: a0 06 20 40 add %i0, 0x40, %l0 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 20171cc: e8 26 20 78 st %l4, [ %i0 + 0x78 ] static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 20171d0: 2b 00 80 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; 20171d4: c2 04 e0 ac ld [ %l3 + 0xac ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20171d8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20171dc: 94 10 00 1b mov %i3, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 20171e0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20171e4: 90 10 00 19 mov %i1, %o0 20171e8: 40 00 11 77 call 201b7c4 <_Watchdog_Adjust_to_chain> 20171ec: 92 20 40 09 sub %g1, %o1, %o1 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 20171f0: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 20171f4: fa 05 60 2c ld [ %l5 + 0x2c ], %i5 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 20171f8: 80 a7 40 0a cmp %i5, %o2 20171fc: 08 80 00 06 bleu 2017214 <_Timer_server_Body+0x88> 2017200: 92 27 40 0a sub %i5, %o2, %o1 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017204: 90 10 00 1c mov %i4, %o0 2017208: 40 00 11 6f call 201b7c4 <_Watchdog_Adjust_to_chain> 201720c: 94 10 00 1b mov %i3, %o2 2017210: 30 80 00 06 b,a 2017228 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 2017214: 1a 80 00 05 bcc 2017228 <_Timer_server_Body+0x9c> 2017218: 90 10 00 1c mov %i4, %o0 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 201721c: 92 10 20 01 mov 1, %o1 2017220: 40 00 11 42 call 201b728 <_Watchdog_Adjust> 2017224: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2017228: fa 26 20 74 st %i5, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 201722c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017230: 40 00 02 bd call 2017d24 <_Chain_Get> 2017234: 01 00 00 00 nop if ( timer == NULL ) { 2017238: 92 92 20 00 orcc %o0, 0, %o1 201723c: 02 80 00 0c be 201726c <_Timer_server_Body+0xe0> 2017240: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2017244: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2017248: 80 a0 60 01 cmp %g1, 1 201724c: 02 80 00 05 be 2017260 <_Timer_server_Body+0xd4> 2017250: 90 10 00 19 mov %i1, %o0 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017254: 80 a0 60 03 cmp %g1, 3 2017258: 12 bf ff f5 bne 201722c <_Timer_server_Body+0xa0> <== NEVER TAKEN 201725c: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017260: 40 00 11 8b call 201b88c <_Watchdog_Insert> 2017264: 92 02 60 10 add %o1, 0x10, %o1 2017268: 30 bf ff f1 b,a 201722c <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 201726c: 7f ff e3 95 call 20100c0 2017270: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2017274: c2 07 bf e8 ld [ %fp + -24 ], %g1 2017278: 80 a0 40 12 cmp %g1, %l2 201727c: 12 80 00 0a bne 20172a4 <_Timer_server_Body+0x118> <== NEVER TAKEN 2017280: 01 00 00 00 nop ts->insert_chain = NULL; 2017284: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2017288: 7f ff e3 92 call 20100d0 201728c: 01 00 00 00 nop _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 2017290: c2 07 bf f4 ld [ %fp + -12 ], %g1 2017294: 80 a0 40 1a cmp %g1, %i2 2017298: 12 80 00 06 bne 20172b0 <_Timer_server_Body+0x124> 201729c: 01 00 00 00 nop 20172a0: 30 80 00 18 b,a 2017300 <_Timer_server_Body+0x174> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20172a4: 7f ff e3 8b call 20100d0 <== NOT EXECUTED 20172a8: 01 00 00 00 nop <== NOT EXECUTED 20172ac: 30 bf ff ca b,a 20171d4 <_Timer_server_Body+0x48> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 20172b0: 7f ff e3 84 call 20100c0 20172b4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20172b8: fa 07 bf f4 ld [ %fp + -12 ], %i5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 20172bc: 80 a7 40 1a cmp %i5, %i2 20172c0: 02 80 00 0d be 20172f4 <_Timer_server_Body+0x168> 20172c4: 01 00 00 00 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 20172c8: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 20172cc: f6 20 60 04 st %i3, [ %g1 + 4 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 20172d0: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 20172d4: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 20172d8: 7f ff e3 7e call 20100d0 20172dc: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 20172e0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 20172e4: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 20172e8: 9f c0 40 00 call %g1 20172ec: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 20172f0: 30 bf ff f0 b,a 20172b0 <_Timer_server_Body+0x124> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 20172f4: 7f ff e3 77 call 20100d0 20172f8: 01 00 00 00 nop 20172fc: 30 bf ff b4 b,a 20171cc <_Timer_server_Body+0x40> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017300: c0 2e 20 7c clrb [ %i0 + 0x7c ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 2017304: 7f ff ff 73 call 20170d0 <_Thread_Disable_dispatch> 2017308: 01 00 00 00 nop _Thread_Set_state( ts->thread, STATES_DELAYING ); 201730c: d0 06 00 00 ld [ %i0 ], %o0 2017310: 40 00 0f 92 call 201b158 <_Thread_Set_state> 2017314: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017318: 7f ff ff 75 call 20170ec <_Timer_server_Reset_interval_system_watchdog> 201731c: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017320: 7f ff ff 87 call 201713c <_Timer_server_Reset_tod_system_watchdog> 2017324: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017328: 40 00 0d 46 call 201a840 <_Thread_Enable_dispatch> 201732c: 01 00 00 00 nop ts->active = true; 2017330: 82 10 20 01 mov 1, %g1 ! 1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017334: 90 10 00 11 mov %l1, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 2017338: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201733c: 40 00 11 ae call 201b9f4 <_Watchdog_Remove> 2017340: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017344: 40 00 11 ac call 201b9f4 <_Watchdog_Remove> 2017348: 90 10 00 10 mov %l0, %o0 201734c: 30 bf ff a0 b,a 20171cc <_Timer_server_Body+0x40> =============================================================================== 02017350 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2017350: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2017354: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2017358: 80 a0 60 00 cmp %g1, 0 201735c: 12 80 00 49 bne 2017480 <_Timer_server_Schedule_operation_method+0x130> 2017360: ba 10 00 19 mov %i1, %i5 * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 2017364: 7f ff ff 5b call 20170d0 <_Thread_Disable_dispatch> 2017368: 01 00 00 00 nop if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 201736c: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2017370: 80 a0 60 01 cmp %g1, 1 2017374: 12 80 00 1f bne 20173f0 <_Timer_server_Schedule_operation_method+0xa0> 2017378: 80 a0 60 03 cmp %g1, 3 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 201737c: 7f ff e3 51 call 20100c0 2017380: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2017384: 03 00 80 e8 sethi %hi(0x203a000), %g1 2017388: c4 00 60 ac ld [ %g1 + 0xac ], %g2 ! 203a0ac <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 201738c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2017390: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2017394: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017398: 80 a0 40 03 cmp %g1, %g3 201739c: 02 80 00 08 be 20173bc <_Timer_server_Schedule_operation_method+0x6c> 20173a0: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 20173a4: de 00 60 10 ld [ %g1 + 0x10 ], %o7 if (delta_interval > delta) { 20173a8: 80 a3 c0 04 cmp %o7, %g4 20173ac: 08 80 00 03 bleu 20173b8 <_Timer_server_Schedule_operation_method+0x68> 20173b0: 86 10 20 00 clr %g3 delta_interval -= delta; 20173b4: 86 23 c0 04 sub %o7, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 20173b8: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 20173bc: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 20173c0: 7f ff e3 44 call 20100d0 20173c4: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 20173c8: 90 06 20 30 add %i0, 0x30, %o0 20173cc: 40 00 11 30 call 201b88c <_Watchdog_Insert> 20173d0: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 20173d4: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 20173d8: 80 a0 60 00 cmp %g1, 0 20173dc: 12 80 00 27 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 20173e0: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 20173e4: 7f ff ff 42 call 20170ec <_Timer_server_Reset_interval_system_watchdog> 20173e8: 90 10 00 18 mov %i0, %o0 20173ec: 30 80 00 23 b,a 2017478 <_Timer_server_Schedule_operation_method+0x128> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 20173f0: 12 80 00 22 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 20173f4: 01 00 00 00 nop /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 20173f8: 7f ff e3 32 call 20100c0 20173fc: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017400: c4 06 20 68 ld [ %i0 + 0x68 ], %g2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2017404: de 06 20 74 ld [ %i0 + 0x74 ], %o7 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2017408: 03 00 80 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 ); 201740c: 86 06 20 6c add %i0, 0x6c, %g3 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017410: 80 a0 80 03 cmp %g2, %g3 2017414: 02 80 00 0d be 2017448 <_Timer_server_Schedule_operation_method+0xf8> 2017418: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 201741c: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 if ( snapshot > last_snapshot ) { 2017420: 80 a0 40 0f cmp %g1, %o7 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2017424: 86 01 00 0f add %g4, %o7, %g3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 2017428: 08 80 00 07 bleu 2017444 <_Timer_server_Schedule_operation_method+0xf4> 201742c: 86 20 c0 01 sub %g3, %g1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017430: 9e 20 40 0f sub %g1, %o7, %o7 if (delta_interval > delta) { 2017434: 80 a1 00 0f cmp %g4, %o7 2017438: 08 80 00 03 bleu 2017444 <_Timer_server_Schedule_operation_method+0xf4><== NEVER TAKEN 201743c: 86 10 20 00 clr %g3 delta_interval -= delta; 2017440: 86 21 00 0f sub %g4, %o7, %g3 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 2017444: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2017448: c2 26 20 74 st %g1, [ %i0 + 0x74 ] _ISR_Enable( level ); 201744c: 7f ff e3 21 call 20100d0 2017450: 01 00 00 00 nop _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017454: 90 06 20 68 add %i0, 0x68, %o0 2017458: 40 00 11 0d call 201b88c <_Watchdog_Insert> 201745c: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017460: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017464: 80 a0 60 00 cmp %g1, 0 2017468: 12 80 00 04 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 201746c: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2017470: 7f ff ff 33 call 201713c <_Timer_server_Reset_tod_system_watchdog> 2017474: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2017478: 40 00 0c f2 call 201a840 <_Thread_Enable_dispatch> 201747c: 81 e8 00 00 restore * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 2017480: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2017484: 40 00 02 14 call 2017cd4 <_Chain_Append> 2017488: 81 e8 00 00 restore =============================================================================== 02009700 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009700: 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; 2009704: 03 00 80 69 sethi %hi(0x201a400), %g1 2009708: 82 10 63 cc or %g1, 0x3cc, %g1 ! 201a7cc ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200970c: 05 00 80 6d sethi %hi(0x201b400), %g2 initial_extensions = Configuration.User_extension_table; 2009710: 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; 2009714: f6 00 60 38 ld [ %g1 + 0x38 ], %i3 2009718: 82 10 a2 98 or %g2, 0x298, %g1 200971c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009720: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 2009724: 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; 2009728: c6 20 a2 98 st %g3, [ %g2 + 0x298 ] 200972c: 05 00 80 6d sethi %hi(0x201b400), %g2 2009730: 82 10 a0 b4 or %g2, 0xb4, %g1 ! 201b4b4 <_User_extensions_Switches_list> 2009734: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009738: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200973c: c6 20 a0 b4 st %g3, [ %g2 + 0xb4 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2009740: 80 a6 a0 00 cmp %i2, 0 2009744: 02 80 00 1b be 20097b0 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 2009748: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200974c: 83 2e e0 02 sll %i3, 2, %g1 2009750: bb 2e e0 04 sll %i3, 4, %i5 2009754: ba 27 40 01 sub %i5, %g1, %i5 2009758: ba 07 40 1b add %i5, %i3, %i5 200975c: 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 *) 2009760: 40 00 01 66 call 2009cf8 <_Workspace_Allocate_or_fatal_error> 2009764: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009768: 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 *) 200976c: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009770: 92 10 20 00 clr %o1 2009774: 40 00 13 de call 200e6ec 2009778: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200977c: 10 80 00 0b b 20097a8 <_User_extensions_Handler_initialization+0xa8> 2009780: 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; 2009784: 90 07 20 14 add %i4, 0x14, %o0 2009788: 92 06 80 09 add %i2, %o1, %o1 200978c: 40 00 13 9c call 200e5fc 2009790: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 2009794: 90 10 00 1c mov %i4, %o0 2009798: 40 00 0b 75 call 200c56c <_User_extensions_Add_set> 200979c: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 20097a0: 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++ ) { 20097a4: 80 a7 40 1b cmp %i5, %i3 20097a8: 12 bf ff f7 bne 2009784 <_User_extensions_Handler_initialization+0x84> 20097ac: 93 2f 60 05 sll %i5, 5, %o1 20097b0: 81 c7 e0 08 ret 20097b4: 81 e8 00 00 restore =============================================================================== 0200b470 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b470: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b474: 7f ff de e1 call 2002ff8 200b478: 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; 200b47c: 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 ); 200b480: 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 ) ) { 200b484: 80 a0 40 1c cmp %g1, %i4 200b488: 02 80 00 1f be 200b504 <_Watchdog_Adjust+0x94> 200b48c: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b490: 02 80 00 1a be 200b4f8 <_Watchdog_Adjust+0x88> 200b494: b6 10 20 01 mov 1, %i3 200b498: 80 a6 60 01 cmp %i1, 1 200b49c: 12 80 00 1a bne 200b504 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b4a0: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b4a4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b4a8: 10 80 00 07 b 200b4c4 <_Watchdog_Adjust+0x54> 200b4ac: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b4b0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b4b4: 80 a6 80 02 cmp %i2, %g2 200b4b8: 3a 80 00 05 bcc,a 200b4cc <_Watchdog_Adjust+0x5c> 200b4bc: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b4c0: b4 20 80 1a sub %g2, %i2, %i2 break; 200b4c4: 10 80 00 10 b 200b504 <_Watchdog_Adjust+0x94> 200b4c8: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200b4cc: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b4d0: 7f ff de ce call 2003008 200b4d4: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b4d8: 40 00 00 90 call 200b718 <_Watchdog_Tickle> 200b4dc: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200b4e0: 7f ff de c6 call 2002ff8 200b4e4: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b4e8: c2 07 40 00 ld [ %i5 ], %g1 200b4ec: 80 a0 40 1c cmp %g1, %i4 200b4f0: 02 80 00 05 be 200b504 <_Watchdog_Adjust+0x94> 200b4f4: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b4f8: 80 a6 a0 00 cmp %i2, 0 200b4fc: 32 bf ff ed bne,a 200b4b0 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b500: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200b504: 7f ff de c1 call 2003008 200b508: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009b18 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009b18: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009b1c: 7f ff e1 98 call 200217c 2009b20: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 2009b24: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009b28: 80 a6 20 01 cmp %i0, 1 2009b2c: 22 80 00 1d be,a 2009ba0 <_Watchdog_Remove+0x88> 2009b30: c0 27 60 08 clr [ %i5 + 8 ] 2009b34: 0a 80 00 1c bcs 2009ba4 <_Watchdog_Remove+0x8c> 2009b38: 03 00 80 6d sethi %hi(0x201b400), %g1 2009b3c: 80 a6 20 03 cmp %i0, 3 2009b40: 18 80 00 19 bgu 2009ba4 <_Watchdog_Remove+0x8c> <== NEVER TAKEN 2009b44: 01 00 00 00 nop 2009b48: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009b4c: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009b50: c4 00 40 00 ld [ %g1 ], %g2 2009b54: 80 a0 a0 00 cmp %g2, 0 2009b58: 02 80 00 07 be 2009b74 <_Watchdog_Remove+0x5c> 2009b5c: 05 00 80 6d sethi %hi(0x201b400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009b60: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009b64: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2009b68: 84 00 c0 02 add %g3, %g2, %g2 2009b6c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2009b70: 05 00 80 6d sethi %hi(0x201b400), %g2 2009b74: c4 00 a1 b8 ld [ %g2 + 0x1b8 ], %g2 ! 201b5b8 <_Watchdog_Sync_count> 2009b78: 80 a0 a0 00 cmp %g2, 0 2009b7c: 22 80 00 07 be,a 2009b98 <_Watchdog_Remove+0x80> 2009b80: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009b84: 05 00 80 6d sethi %hi(0x201b400), %g2 2009b88: c6 00 a2 e4 ld [ %g2 + 0x2e4 ], %g3 ! 201b6e4 <_Per_CPU_Information+0x8> 2009b8c: 05 00 80 6d sethi %hi(0x201b400), %g2 2009b90: c6 20 a1 58 st %g3, [ %g2 + 0x158 ] ! 201b558 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009b94: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 2009b98: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 2009b9c: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009ba0: 03 00 80 6d sethi %hi(0x201b400), %g1 2009ba4: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 201b5bc <_Watchdog_Ticks_since_boot> 2009ba8: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 2009bac: 7f ff e1 78 call 200218c 2009bb0: 01 00 00 00 nop return( previous_state ); } 2009bb4: 81 c7 e0 08 ret 2009bb8: 81 e8 00 00 restore =============================================================================== 0200ac68 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200ac68: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200ac6c: 7f ff df b3 call 2002b38 200ac70: ba 10 00 18 mov %i0, %i5 200ac74: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200ac78: 11 00 80 6d sethi %hi(0x201b400), %o0 200ac7c: 94 10 00 19 mov %i1, %o2 200ac80: 90 12 21 00 or %o0, 0x100, %o0 200ac84: 7f ff e6 63 call 2004610 200ac88: 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; 200ac8c: 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 ); 200ac90: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200ac94: 80 a7 00 19 cmp %i4, %i1 200ac98: 12 80 00 04 bne 200aca8 <_Watchdog_Report_chain+0x40> 200ac9c: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200aca0: 10 80 00 0d b 200acd4 <_Watchdog_Report_chain+0x6c> 200aca4: 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 ); 200aca8: 40 00 00 0f call 200ace4 <_Watchdog_Report> 200acac: 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 ) 200acb0: 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 ) ; 200acb4: 80 a7 00 19 cmp %i4, %i1 200acb8: 12 bf ff fc bne 200aca8 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200acbc: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200acc0: 11 00 80 6d sethi %hi(0x201b400), %o0 200acc4: 92 10 00 1d mov %i5, %o1 200acc8: 7f ff e6 52 call 2004610 200accc: 90 12 21 18 or %o0, 0x118, %o0 200acd0: 30 80 00 03 b,a 200acdc <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200acd4: 7f ff e6 4f call 2004610 200acd8: 90 12 21 28 or %o0, 0x128, %o0 } _ISR_Enable( level ); 200acdc: 7f ff df 9b call 2002b48 200ace0: 81 e8 00 00 restore =============================================================================== 02018258 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2018258: 81 c3 e0 08 retl <== NOT EXECUTED 201825c: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02012c40 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012c40: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012c44: 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; 2012c48: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2012c4c: 10 80 00 18 b 2012cac <_fat_block_read+0x6c> 2012c50: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012c54: 92 10 00 19 mov %i1, %o1 2012c58: 94 10 20 01 mov 1, %o2 2012c5c: 7f ff ff 20 call 20128dc 2012c60: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012c64: 80 a2 20 00 cmp %o0, 0 2012c68: 12 80 00 16 bne 2012cc0 <_fat_block_read+0x80> <== NEVER TAKEN 2012c6c: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012c70: e0 17 40 00 lduh [ %i5 ], %l0 2012c74: a0 24 00 1a sub %l0, %i2, %l0 2012c78: 80 a4 00 1b cmp %l0, %i3 2012c7c: 38 80 00 02 bgu,a 2012c84 <_fat_block_read+0x44> 2012c80: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2012c84: c2 07 bf fc ld [ %fp + -4 ], %g1 2012c88: 90 07 00 18 add %i4, %i0, %o0 2012c8c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012c90: 94 10 00 10 mov %l0, %o2 2012c94: 92 02 40 1a add %o1, %i2, %o1 2012c98: 40 00 24 8f call 201bed4 2012c9c: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012ca0: b0 04 00 18 add %l0, %i0, %i0 blk++; 2012ca4: b2 06 60 01 inc %i1 ofs = 0; 2012ca8: 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) 2012cac: 80 a6 e0 00 cmp %i3, 0 2012cb0: 12 bf ff e9 bne 2012c54 <_fat_block_read+0x14> 2012cb4: 90 10 00 1d mov %i5, %o0 2012cb8: 81 c7 e0 08 ret 2012cbc: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2012cc0: 81 c7 e0 08 ret <== NOT EXECUTED 2012cc4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02012d60 <_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); 2012d60: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 2012d64: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2012d68: 7f ff ff 5c call 2012ad8 <== NOT EXECUTED 2012d6c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02012cc8 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012cc8: 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; 2012ccc: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012cd0: 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; 2012cd4: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2012cd8: 10 80 00 1b b 2012d44 <_fat_block_write+0x7c> 2012cdc: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012ce0: a0 20 40 1a sub %g1, %i2, %l0 2012ce4: 80 a4 00 1b cmp %l0, %i3 2012ce8: 38 80 00 02 bgu,a 2012cf0 <_fat_block_write+0x28> 2012cec: 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); 2012cf0: 90 10 00 1d mov %i5, %o0 2012cf4: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2012cf8: 80 a4 00 01 cmp %l0, %g1 2012cfc: 02 80 00 03 be 2012d08 <_fat_block_write+0x40> 2012d00: 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); 2012d04: 94 10 20 01 mov 1, %o2 2012d08: 7f ff fe f5 call 20128dc 2012d0c: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012d10: 80 a2 20 00 cmp %o0, 0 2012d14: 12 80 00 11 bne 2012d58 <_fat_block_write+0x90> <== NEVER TAKEN 2012d18: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2012d1c: 92 07 00 18 add %i4, %i0, %o1 2012d20: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012d24: 94 10 00 10 mov %l0, %o2 2012d28: 90 02 00 1a add %o0, %i2, %o0 2012d2c: 40 00 24 6a call 201bed4 2012d30: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2012d34: b0 04 00 18 add %l0, %i0, %i0 2012d38: e2 2f 60 84 stb %l1, [ %i5 + 0x84 ] blk++; 2012d3c: b2 06 60 01 inc %i1 ofs = 0; 2012d40: 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) 2012d44: 80 a6 e0 00 cmp %i3, 0 2012d48: 32 bf ff e6 bne,a 2012ce0 <_fat_block_write+0x18> 2012d4c: c2 17 40 00 lduh [ %i5 ], %g1 2012d50: 81 c7 e0 08 ret 2012d54: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2012d58: 81 c7 e0 08 ret <== NOT EXECUTED 2012d5c: 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 =============================================================================== 02011c60 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2011c60: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2011c64: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2011c68: 87 28 a0 02 sll %g2, 2, %g3 2011c6c: 83 28 a0 04 sll %g2, 4, %g1 2011c70: 82 20 40 03 sub %g1, %g3, %g1 2011c74: 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; 2011c78: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011c7c: 10 80 00 11 b 2011cc0 <_hash_search+0x60> 2011c80: 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); 2011c84: 7f ff ff e5 call 2011c18 2011c88: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2011c8c: 80 a6 80 08 cmp %i2, %o0 2011c90: 32 80 00 0c bne,a 2011cc0 <_hash_search+0x60> 2011c94: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2011c98: 80 a6 e0 00 cmp %i3, 0 2011c9c: 22 80 00 07 be,a 2011cb8 <_hash_search+0x58> <== ALWAYS TAKEN 2011ca0: fa 27 00 00 st %i5, [ %i4 ] 2011ca4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2011ca8: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2011cac: 32 80 00 05 bne,a 2011cc0 <_hash_search+0x60> <== NOT EXECUTED 2011cb0: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2011cb4: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2011cb8: 81 c7 e0 08 ret 2011cbc: 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) ; ) 2011cc0: 80 a7 40 19 cmp %i5, %i1 2011cc4: 12 bf ff f0 bne 2011c84 <_hash_search+0x24> 2011cc8: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2011ccc: 81 c7 e0 08 ret 2011cd0: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0201e5ec <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 201e5ec: 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 ); 201e5f0: 7f ff 9a 51 call 2004f34 201e5f4: 90 10 00 19 mov %i1, %o0 201e5f8: b8 10 00 08 mov %o0, %i4 if ( old_parent_pathlen == 0 ) 201e5fc: 80 a7 20 00 cmp %i4, 0 201e600: 12 80 00 08 bne 201e620 <_rename_r+0x34> 201e604: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 201e608: 92 07 bf f8 add %fp, -8, %o1 201e60c: 94 07 bf d0 add %fp, -48, %o2 201e610: 7f ff a0 39 call 20066f4 201e614: ba 10 20 00 clr %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201e618: 10 80 00 0c b 201e648 <_rename_r+0x5c> 201e61c: 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, 201e620: 92 10 00 1c mov %i4, %o1 201e624: 94 10 20 02 mov 2, %o2 201e628: 96 07 bf d0 add %fp, -48, %o3 201e62c: 98 10 20 00 clr %o4 201e630: 7f ff 9a 32 call 2004ef8 201e634: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 201e638: 80 a2 20 00 cmp %o0, 0 201e63c: 12 80 00 1e bne 201e6b4 <_rename_r+0xc8> <== NEVER TAKEN 201e640: 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; 201e644: 94 10 20 14 mov 0x14, %o2 201e648: 92 07 bf d0 add %fp, -48, %o1 201e64c: 7f ff ca 4b call 2010f78 201e650: 90 07 bf bc add %fp, -68, %o0 name = old + old_parent_pathlen; 201e654: b2 06 40 1c add %i1, %i4, %i1 201e658: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 201e65c: 7f ff cd 3a call 2011b44 201e660: 90 10 00 19 mov %i1, %o0 201e664: 92 10 00 08 mov %o0, %o1 201e668: 7f ff 9a 42 call 2004f70 201e66c: 90 10 00 19 mov %i1, %o0 201e670: b2 06 40 08 add %i1, %o0, %i1 201e674: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 201e678: 7f ff cd 33 call 2011b44 201e67c: 90 10 00 19 mov %i1, %o0 201e680: 94 10 20 00 clr %o2 201e684: 92 10 00 08 mov %o0, %o1 201e688: 96 07 bf bc add %fp, -68, %o3 201e68c: 90 10 00 19 mov %i1, %o0 201e690: 7f ff 99 fe call 2004e88 201e694: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 201e698: 80 a2 20 00 cmp %o0, 0 201e69c: 02 80 00 08 be 201e6bc <_rename_r+0xd0> 201e6a0: 80 8f 60 ff btst 0xff, %i5 if ( free_old_parentloc ) 201e6a4: 02 80 00 04 be 201e6b4 <_rename_r+0xc8> 201e6a8: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 201e6ac: 7f ff 9a 85 call 20050c0 201e6b0: 90 07 bf d0 add %fp, -48, %o0 201e6b4: 81 c7 e0 08 ret 201e6b8: 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 ); 201e6bc: 90 10 00 1a mov %i2, %o0 201e6c0: 92 07 bf f8 add %fp, -8, %o1 201e6c4: 7f ff a0 0c call 20066f4 201e6c8: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 201e6cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 201e6d0: d0 07 bf f8 ld [ %fp + -8 ], %o0 201e6d4: c2 00 60 04 ld [ %g1 + 4 ], %g1 201e6d8: 90 06 80 08 add %i2, %o0, %o0 201e6dc: 92 07 bf e4 add %fp, -28, %o1 201e6e0: 9f c0 40 00 call %g1 201e6e4: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 201e6e8: 80 a2 20 00 cmp %o0, 0 201e6ec: 02 80 00 0d be 201e720 <_rename_r+0x134> 201e6f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e6f4: 7f ff 9a 73 call 20050c0 201e6f8: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e6fc: 80 8f 60 ff btst 0xff, %i5 201e700: 02 80 00 04 be 201e710 <_rename_r+0x124> 201e704: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e708: 7f ff 9a 6e call 20050c0 201e70c: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e710: 7f ff 9a 6c call 20050c0 201e714: 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 ); 201e718: 81 c7 e0 08 ret 201e71c: 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 ) { 201e720: c4 07 bf e0 ld [ %fp + -32 ], %g2 201e724: 80 a0 80 01 cmp %g2, %g1 201e728: 02 80 00 11 be 201e76c <_rename_r+0x180> 201e72c: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201e730: 7f ff 9a 64 call 20050c0 201e734: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e738: 80 8f 60 ff btst 0xff, %i5 201e73c: 02 80 00 04 be 201e74c <_rename_r+0x160> 201e740: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e744: 7f ff 9a 5f call 20050c0 201e748: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e74c: 7f ff 9a 5d call 20050c0 201e750: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201e754: 7f ff c7 ad call 2010608 <__errno> 201e758: 01 00 00 00 nop 201e75c: 82 10 20 12 mov 0x12, %g1 ! 12 201e760: c2 22 00 00 st %g1, [ %o0 ] 201e764: 81 c7 e0 08 ret 201e768: 91 e8 3f ff restore %g0, -1, %o0 } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 201e76c: d6 07 bf fc ld [ %fp + -4 ], %o3 201e770: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 201e774: 92 07 bf bc add %fp, -68, %o1 201e778: 94 07 bf e4 add %fp, -28, %o2 201e77c: 9f c0 40 00 call %g1 201e780: 90 07 bf d0 add %fp, -48, %o0 201e784: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 201e788: 7f ff 9a 4e call 20050c0 201e78c: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201e790: 80 8f 60 ff btst 0xff, %i5 201e794: 02 80 00 04 be 201e7a4 <_rename_r+0x1b8> 201e798: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201e79c: 7f ff 9a 49 call 20050c0 201e7a0: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201e7a4: 7f ff 9a 47 call 20050c0 201e7a8: 90 07 bf bc add %fp, -68, %o0 return result; } 201e7ac: 81 c7 e0 08 ret 201e7b0: 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 74 ld [ %i4 + 0x374 ], %i5 ! 2020f74 2004d34: 03 00 80 86 sethi %hi(0x2021800), %g1 2004d38: 82 10 60 bc or %g1, 0xbc, %g1 ! 20218bc 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 74 ld [ %i4 + 0x374 ], %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 2a call 2010608 <__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 38 or %o0, 0x238, %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 15 call 2010608 <__errno> 2004db8: b0 10 3f ff mov -1, %i0 2004dbc: 40 00 2e 13 call 2010608 <__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 74 ld [ %i5 + 0x374 ], %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 74 ld [ %i5 + 0x374 ], %o0 2004de8: 92 07 bf ec add %fp, -20, %o1 2004dec: 94 10 20 14 mov 0x14, %o2 2004df0: 40 00 30 62 call 2010f78 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 54 ld [ %g1 + 0x254 ], %l1 ! 2018654 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 58 ld [ %g1 + 0x258 ], %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 50 call 2012210 <== 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 58 st %l0, [ %g1 + 0x258 ] ! 2018658 <== NOT EXECUTED disktab_size = new_size; 20028e0: 03 00 80 61 sethi %hi(0x2018400), %g1 <== NOT EXECUTED 20028e4: f8 20 62 54 st %i4, [ %g1 + 0x254 ] ! 2018654 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20028e8: 03 00 80 61 sethi %hi(0x2018400), %g1 20028ec: e4 00 62 58 ld [ %g1 + 0x258 ], %l2 ! 2018658 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 2e call 2012210 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 3e f5 call 2012588 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 =============================================================================== 02009f4c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 2009f4c: 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 ) ) 2009f50: 80 8e bf f8 btst -8, %i2 2009f54: 22 80 00 06 be,a 2009f6c <== ALWAYS TAKEN 2009f58: fa 06 c0 00 ld [ %i3 ], %i5 rtems_set_errno_and_return_minus_one( EPERM ); 2009f5c: 40 00 07 d2 call 200bea4 <__errno> <== NOT EXECUTED 2009f60: 01 00 00 00 nop <== NOT EXECUTED 2009f64: 10 80 00 09 b 2009f88 <== NOT EXECUTED 2009f68: 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) 2009f6c: b8 10 20 00 clr %i4 2009f70: 80 a7 60 00 cmp %i5, 0 2009f74: 12 80 00 24 bne 200a004 2009f78: 21 00 80 5c sethi %hi(0x2017000), %l0 rtems_set_errno_and_return_minus_one( EFAULT ); 2009f7c: 40 00 07 ca call 200bea4 <__errno> 2009f80: 01 00 00 00 nop 2009f84: 82 10 20 0e mov 0xe, %g1 ! e 2009f88: c2 22 00 00 st %g1, [ %o0 ] 2009f8c: 81 c7 e0 08 ret 2009f90: 91 e8 3f ff restore %g0, -1, %o0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 2009f94: 80 a6 a0 00 cmp %i2, 0 2009f98: 02 80 00 19 be 2009ffc 2009f9c: 90 10 00 18 mov %i0, %o0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 2009fa0: 92 10 00 1a mov %i2, %o1 2009fa4: 40 00 0d 22 call 200d42c 2009fa8: 94 10 00 19 mov %i1, %o2 2009fac: 80 a2 20 00 cmp %o0, 0 2009fb0: 32 80 00 14 bne,a 200a000 2009fb4: b8 07 20 01 inc %i4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 2009fb8: c2 4e 80 19 ldsb [ %i2 + %i1 ], %g1 2009fbc: 80 a0 60 00 cmp %g1, 0 2009fc0: 32 80 00 10 bne,a 200a000 2009fc4: 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; 2009fc8: 03 00 80 5c sethi %hi(0x2017000), %g1 2009fcc: 82 10 63 dc or %g1, 0x3dc, %g1 ! 20173dc 2009fd0: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 2009fd4: 03 00 80 5d sethi %hi(0x2017400), %g1 2009fd8: 82 10 60 14 or %g1, 0x14, %g1 ! 2017414 2009fdc: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 2009fe0: 03 00 80 5d sethi %hi(0x2017400), %g1 2009fe4: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 ! 201747c if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 2009fe8: fa 26 c0 00 st %i5, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 2009fec: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2009ff0: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] return 0; 2009ff4: 81 c7 e0 08 ret 2009ff8: 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++) { 2009ffc: b8 07 20 01 inc %i4 200a000: ba 07 60 14 add %i5, 0x14, %i5 200a004: c2 04 23 14 ld [ %l0 + 0x314 ], %g1 200a008: 80 a7 00 01 cmp %i4, %g1 200a00c: 2a bf ff e2 bcs,a 2009f94 200a010: 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 ); 200a014: 40 00 07 a4 call 200bea4 <__errno> 200a018: b0 10 3f ff mov -1, %i0 200a01c: 82 10 20 02 mov 2, %g1 200a020: c2 22 00 00 st %g1, [ %o0 ] } 200a024: 81 c7 e0 08 ret 200a028: 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 5c call 200bea4 <__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 50 call 200bea4 <__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 4d call 200d2b4 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 44 call 200bea4 <__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 14 ld [ %l2 + 0x314 ], %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 35 call 200bea4 <__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 58 call 200d368 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 50 ld [ %g1 + 0x250 ], %o0 ! 2018650 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 4c stb %g2, [ %g1 + 0x24c ] 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 4c clrb [ %g1 + 0x24c ] ! 201864c 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 50 ld [ %g1 + 0x250 ], %o0 ! 2018650 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 54 ld [ %g1 + 0x354 ], %g1 ! 201ab54 <__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 b0 ld [ %g1 + 0x1b0 ], %o0 ! 20165b0 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 6a call 200e7ac 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 60 d0 ld [ %g1 + 0xd0 ], %o0 ! 20164d0 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 cf call 200e7ac 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 54 ld [ %i3 + 0x354 ], %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 54 ld [ %i3 + 0x354 ], %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 54 ld [ %i3 + 0x354 ], %g1 2004c8c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004c90: 02 80 00 0d be 2004cc4 <== NOT EXECUTED 2004c94: c2 06 e3 54 ld [ %i3 + 0x354 ], %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 54 ld [ %i3 + 0x354 ], %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 54 ld [ %i3 + 0x354 ], %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 c8 or %i2, 0x1c8, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d2c: b0 16 21 c0 or %i0, 0x1c0, %i0 echo ('\n', tty); return; } } while (tty->ccount) { 2004d30: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 2004d34: 80 a0 e0 00 cmp %g3, 0 2004d38: 32 bf ff 98 bne,a 2004b98 2004d3c: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 2004d40: 81 c7 e0 08 ret 2004d44: 81 e8 00 00 restore =============================================================================== 020128dc : #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) { 20128dc: 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) 20128e0: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 20128e4: 80 a0 60 00 cmp %g1, 0 20128e8: 32 80 00 15 bne,a 201293c 20128ec: 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); 20128f0: 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) 20128f4: 80 a6 a0 01 cmp %i2, 1 20128f8: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 20128fc: 12 80 00 06 bne 2012914 2012900: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012904: 7f ff f9 ae call 2010fbc 2012908: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 201290c: 10 80 00 05 b 2012920 2012910: 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); 2012914: 7f ff f9 75 call 2010ee8 2012918: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 201291c: 80 a2 20 00 cmp %o0, 0 2012920: 12 80 00 62 bne 2012aa8 <== NEVER TAKEN 2012924: 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; 2012928: 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; 201292c: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; 2012930: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012934: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012938: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 201293c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2012940: 80 a0 40 02 cmp %g1, %g2 2012944: 0a 80 00 05 bcs 2012958 <== NEVER TAKEN 2012948: b8 10 20 00 clr %i4 201294c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2012950: 80 a0 40 02 cmp %g1, %g2 2012954: 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) 2012958: 80 a0 40 19 cmp %g1, %i1 201295c: 22 80 00 5c be,a 2012acc 2012960: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 2012964: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 2012968: 80 a0 60 00 cmp %g1, 0 201296c: 02 80 00 3c be 2012a5c 2012970: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012974: 02 80 00 0b be 20129a0 <== ALWAYS TAKEN 2012978: 01 00 00 00 nop 201297c: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012980: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012984: 12 80 00 07 bne 20129a0 <== NOT EXECUTED 2012988: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 201298c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 2012990: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2012994: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2012998: 40 00 25 4f call 201bed4 <== NOT EXECUTED 201299c: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 20129a0: 7f ff fa 5d call 2011314 20129a4: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 20129a8: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 20129ac: 80 a2 20 00 cmp %o0, 0 20129b0: 12 80 00 3e bne 2012aa8 <== NEVER TAKEN 20129b4: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 20129b8: 80 8f 20 ff btst 0xff, %i4 20129bc: 02 80 00 2e be 2012a74 <== ALWAYS TAKEN 20129c0: 94 10 00 19 mov %i1, %o2 20129c4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20129c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20129cc: 02 80 00 1d be 2012a40 <== NOT EXECUTED 20129d0: 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) 20129d4: 10 80 00 29 b 2012a78 <== NOT EXECUTED 20129d8: 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, 20129dc: 40 00 55 1b call 2027e48 <.umul> <== NOT EXECUTED 20129e0: 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, 20129e4: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 20129e8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 20129ec: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 20129f0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 20129f4: 7f ff f9 3d call 2010ee8 <== NOT EXECUTED 20129f8: 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) 20129fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a00: 12 80 00 0c bne 2012a30 <== NOT EXECUTED 2012a04: 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); 2012a08: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2012a0c: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2012a10: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2012a14: 40 00 25 30 call 201bed4 <== NOT EXECUTED 2012a18: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2012a1c: 7f ff fa 3e call 2011314 <== NOT EXECUTED 2012a20: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2012a24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012a28: 22 80 00 06 be,a 2012a40 <== NOT EXECUTED 2012a2c: a0 04 20 01 inc %l0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2012a30: 40 00 22 5a call 201b398 <__errno> <== NOT EXECUTED 2012a34: 01 00 00 00 nop <== NOT EXECUTED 2012a38: 10 80 00 1f b 2012ab4 <== NOT EXECUTED 2012a3c: 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++) 2012a40: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2012a44: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2012a48: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2012a4c: 2a bf ff e4 bcs,a 20129dc <== NOT EXECUTED 2012a50: 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); 2012a54: 10 80 00 08 b 2012a74 <== NOT EXECUTED 2012a58: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012a5c: 7f ff f9 f2 call 2011224 2012a60: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2012a64: 80 a2 20 00 cmp %o0, 0 2012a68: 12 80 00 10 bne 2012aa8 <== NEVER TAKEN 2012a6c: 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); 2012a70: 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) 2012a74: 80 a6 a0 01 cmp %i2, 1 2012a78: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012a7c: 12 80 00 06 bne 2012a94 2012a80: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012a84: 7f ff f9 4e call 2010fbc 2012a88: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012a8c: 10 80 00 05 b 2012aa0 2012a90: 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); 2012a94: 7f ff f9 15 call 2010ee8 2012a98: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012a9c: 80 a2 20 00 cmp %o0, 0 2012aa0: 02 80 00 08 be 2012ac0 <== ALWAYS TAKEN 2012aa4: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012aa8: 40 00 22 3c call 201b398 <__errno> <== NOT EXECUTED 2012aac: 01 00 00 00 nop <== NOT EXECUTED 2012ab0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012ab4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012ab8: 81 c7 e0 08 ret <== NOT EXECUTED 2012abc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2012ac0: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012ac4: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2012ac8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2012acc: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2012ad0: 81 c7 e0 08 ret 2012ad4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012ad8 : int fat_buf_release(fat_fs_info_t *fs_info) { 2012ad8: 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) 2012adc: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012ae0: 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) 2012ae4: 80 a0 60 00 cmp %g1, 0 2012ae8: 02 80 00 54 be 2012c38 2012aec: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012af0: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1 2012af4: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2 2012af8: 80 a0 40 02 cmp %g1, %g2 2012afc: 0a 80 00 05 bcs 2012b10 <== NEVER TAKEN 2012b00: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2012b04: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 2012b08: 80 a0 40 02 cmp %g1, %g2 2012b0c: 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) 2012b10: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1 2012b14: 80 a0 60 00 cmp %g1, 0 2012b18: 02 80 00 3b be 2012c04 2012b1c: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012b20: 02 80 00 0b be 2012b4c 2012b24: 01 00 00 00 nop 2012b28: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012b2c: 80 a0 60 00 cmp %g1, 0 2012b30: 12 80 00 07 bne 2012b4c <== NEVER TAKEN 2012b34: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2012b38: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1 2012b3c: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0 2012b40: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012b44: 40 00 24 e4 call 201bed4 2012b48: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012b4c: 7f ff f9 f2 call 2011314 2012b50: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012b54: 80 a2 20 00 cmp %o0, 0 2012b58: 12 80 00 30 bne 2012c18 <== NEVER TAKEN 2012b5c: 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) 2012b60: 80 8f 20 ff btst 0xff, %i4 2012b64: 02 80 00 33 be 2012c30 2012b68: c0 2e e0 84 clrb [ %i3 + 0x84 ] 2012b6c: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012b70: 80 a0 60 00 cmp %g1, 0 2012b74: 02 80 00 1d be 2012be8 <== ALWAYS TAKEN 2012b78: 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; 2012b7c: 10 80 00 2e b 2012c34 <== NOT EXECUTED 2012b80: 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, 2012b84: 40 00 54 b1 call 2027e48 <.umul> 2012b88: 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, 2012b8c: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2 2012b90: 92 10 00 1d mov %i5, %o1 2012b94: 94 02 00 0a add %o0, %o2, %o2 2012b98: 96 07 bf fc add %fp, -4, %o3 2012b9c: 7f ff f8 d3 call 2010ee8 2012ba0: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012ba4: 80 a2 20 00 cmp %o0, 0 2012ba8: 12 80 00 0c bne 2012bd8 <== NEVER TAKEN 2012bac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012bb0: c2 07 bf fc ld [ %fp + -4 ], %g1 2012bb4: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1 2012bb8: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012bbc: 40 00 24 c6 call 201bed4 2012bc0: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(b); 2012bc4: 7f ff f9 d4 call 2011314 2012bc8: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012bcc: 80 a2 20 00 cmp %o0, 0 2012bd0: 22 80 00 06 be,a 2012be8 <== ALWAYS TAKEN 2012bd4: b4 06 a0 01 inc %i2 rtems_set_errno_and_return_minus_one(ENOMEM); 2012bd8: 40 00 21 f0 call 201b398 <__errno> <== NOT EXECUTED 2012bdc: 01 00 00 00 nop <== NOT EXECUTED 2012be0: 10 80 00 11 b 2012c24 <== NOT EXECUTED 2012be4: 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++) 2012be8: c2 0e e0 09 ldub [ %i3 + 9 ], %g1 2012bec: 90 0e a0 ff and %i2, 0xff, %o0 2012bf0: 80 a2 00 01 cmp %o0, %g1 2012bf4: 2a bf ff e4 bcs,a 2012b84 2012bf8: 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; 2012bfc: 10 80 00 0e b 2012c34 2012c00: c0 2e e0 85 clrb [ %i3 + 0x85 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012c04: 7f ff f9 88 call 2011224 2012c08: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012c0c: 80 a2 20 00 cmp %o0, 0 2012c10: 22 80 00 09 be,a 2012c34 <== ALWAYS TAKEN 2012c14: c0 2e e0 85 clrb [ %i3 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); 2012c18: 40 00 21 e0 call 201b398 <__errno> <== NOT EXECUTED 2012c1c: 01 00 00 00 nop <== NOT EXECUTED 2012c20: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012c24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012c28: 81 c7 e0 08 ret <== NOT EXECUTED 2012c2c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012c30: c0 2e e0 85 clrb [ %i3 + 0x85 ] return RC_OK; 2012c34: b0 10 20 00 clr %i0 } 2012c38: 81 c7 e0 08 ret 2012c3c: 81 e8 00 00 restore =============================================================================== 02011be0 : 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)) ) 2011be0: 80 a2 60 00 cmp %o1, 0 2011be4: 32 80 00 08 bne,a 2011c04 2011be8: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011bec: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2011bf0: 80 88 60 03 btst 3, %g1 2011bf4: 22 80 00 04 be,a 2011c04 <== NEVER TAKEN 2011bf8: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011bfc: 81 c3 e0 08 retl 2011c00: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011c04: 92 02 7f fe add %o1, -2, %o1 2011c08: 93 2a 40 01 sll %o1, %g1, %o1 2011c0c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2011c10: 81 c3 e0 08 retl 2011c14: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02012d70 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012d70: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2012d74: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 2012d78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012d7c: 7f ff fe ca call 20128a4 <== NOT EXECUTED 2012d80: 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); 2012d84: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED 2012d88: 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 ) { 2012d8c: 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, 2012d90: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED 2012d94: b7 2e c0 01 sll %i3, %g1, %i3 <== NOT EXECUTED 2012d98: 7f ff ff aa call 2012c40 <_fat_block_read> <== NOT EXECUTED 2012d9c: 95 e8 20 00 restore %g0, 0, %o2 <== NOT EXECUTED =============================================================================== 02012f9c : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2012f9c: 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; 2012fa0: 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); 2012fa4: 7f ff fe 34 call 2012874 <== NOT EXECUTED 2012fa8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2012fac: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2012fb0: 7f ff fe 31 call 2012874 <== NOT EXECUTED 2012fb4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2012fb8: 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); 2012fbc: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2012fc0: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2012fc4: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2012fc8: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2012fcc: 7f ff ff 3f call 2012cc8 <_fat_block_write> <== NOT EXECUTED 2012fd0: 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, 2012fd4: 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, 2012fd8: 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, 2012fdc: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2012fe0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012fe4: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2012fe8: 7f ff ff 38 call 2012cc8 <_fat_block_write> <== NOT EXECUTED 2012fec: 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) ) 2012ff0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012ff4: 06 80 00 04 bl 2013004 <== NOT EXECUTED 2012ff8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2012ffc: 16 80 00 03 bge 2013008 <== NOT EXECUTED 2013000: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 2013004: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2013008: 81 c7 e0 08 ret <== NOT EXECUTED 201300c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012100 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012100: 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) 2012104: c2 06 60 08 ld [ %i1 + 8 ], %g1 2012108: 80 a0 60 01 cmp %g1, 1 201210c: 08 80 00 06 bleu 2012124 2012110: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 { fat_fd->links_num--; 2012114: 82 00 7f ff add %g1, -1, %g1 return rc; 2012118: 90 10 20 00 clr %o0 201211c: 10 80 00 25 b 20121b0 2012120: 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) 2012124: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2012128: 80 88 60 01 btst 1, %g1 201212c: 02 80 00 14 be 201217c <== ALWAYS TAKEN 2012130: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 2012134: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012138: 7f ff ff ae call 2011ff0 <== NOT EXECUTED 201213c: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2012140: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012144: 12 80 00 1b bne 20121b0 <== NOT EXECUTED 2012148: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 201214c: 7f ff e2 63 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 2012150: 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) ) 2012154: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2012158: 40 00 03 8c call 2012f88 <== NOT EXECUTED 201215c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012160: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2012164: 02 80 00 0f be 20121a0 <== NOT EXECUTED 2012168: 01 00 00 00 nop <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 201216c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2012170: 40 00 03 7a call 2012f58 <== NOT EXECUTED 2012174: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012178: 30 80 00 0a b,a 20121a0 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 201217c: 40 00 03 83 call 2012f88 2012180: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2012184: 80 8a 20 ff btst 0xff, %o0 2012188: 02 80 00 04 be 2012198 <== ALWAYS TAKEN 201218c: 01 00 00 00 nop { fat_fd->links_num = 0; 2012190: 10 80 00 06 b 20121a8 <== NOT EXECUTED 2012194: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 2012198: 7f ff e2 50 call 200aad8 <_Chain_Extract> 201219c: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20121a0: 7f ff ce b3 call 2005c6c 20121a4: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20121a8: 40 00 02 4c call 2012ad8 20121ac: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 20121b0: 81 c7 e0 08 ret 20121b4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020126d4 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20126d4: 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; 20126d8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 20126dc: 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; 20126e0: 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) 20126e4: 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 ) { 20126e8: 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; 20126ec: 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) 20126f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20126f4: 02 80 00 07 be 2012710 <== NOT EXECUTED 20126f8: 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); 20126fc: 40 00 00 f7 call 2012ad8 <== NOT EXECUTED 2012700: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2012704: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2012708: 02 80 00 24 be 2012798 <== NOT EXECUTED 201270c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2012710: 81 c7 e0 08 ret <== NOT EXECUTED 2012714: 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); 2012718: 7f ff fd 32 call 2011be0 <== NOT EXECUTED 201271c: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2012720: 10 80 00 13 b 201276c <== NOT EXECUTED 2012724: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2012728: 94 06 c0 1a add %i3, %i2, %o2 <== NOT EXECUTED 201272c: 7f ff fa 24 call 2010fbc <== NOT EXECUTED 2012730: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2012734: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012738: 12 80 00 07 bne 2012754 <== NOT EXECUTED 201273c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2012740: 7f ff fb 1b call 20113ac <== NOT EXECUTED 2012744: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2012748: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201274c: 22 80 00 08 be,a 201276c <== NOT EXECUTED 2012750: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2012754: 40 00 23 11 call 201b398 <__errno> <== NOT EXECUTED 2012758: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201275c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012760: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012764: 81 c7 e0 08 ret <== NOT EXECUTED 2012768: 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++ ) 201276c: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2012770: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2012774: 2a bf ff ed bcs,a 2012728 <== NOT EXECUTED 2012778: 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); 201277c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2012780: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012784: 40 00 1c 72 call 201994c <== NOT EXECUTED 2012788: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201278c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012790: 12 80 00 0a bne 20127b8 <== NOT EXECUTED 2012794: 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) 2012798: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 201279c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 20127a0: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 20127a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20127a8: 2a bf ff dc bcs,a 2012718 <== NOT EXECUTED 20127ac: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED 20127b0: 81 c7 e0 08 ret <== NOT EXECUTED 20127b4: 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); 20127b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 20127bc: 81 c7 e0 08 ret <== NOT EXECUTED 20127c0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201228c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 201228c: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012290: 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; 2012294: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 2012298: 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; 201229c: 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; 20122a0: 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 ) { 20122a4: 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) 20122a8: 80 a6 80 12 cmp %i2, %l2 20122ac: 08 80 00 2d bleu 2012360 20122b0: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20122b4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20122b8: 80 a0 60 01 cmp %g1, 1 20122bc: 32 80 00 0b bne,a 20122e8 <== ALWAYS TAKEN 20122c0: c4 17 20 06 lduh [ %i4 + 6 ], %g2 20122c4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 20122c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20122cc: 32 80 00 07 bne,a 20122e8 <== NOT EXECUTED 20122d0: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20122d4: 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)) && 20122d8: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 20122dc: 12 80 00 1d bne 2012350 <== NOT EXECUTED 20122e0: 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))) & 20122e4: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 20122e8: 82 00 bf ff add %g2, -1, %g1 20122ec: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 20122f0: 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 - 20122f4: a0 20 80 10 sub %g2, %l0, %l0 20122f8: 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) 20122fc: 80 a4 80 10 cmp %l2, %l0 2012300: 08 80 00 18 bleu 2012360 2012304: 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) 2012308: a4 a4 80 10 subcc %l2, %l0, %l2 201230c: 02 80 00 15 be 2012360 <== NEVER TAKEN 2012310: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012314: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012318: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 201231c: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012320: 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; 2012324: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012328: 96 07 bf fc add %fp, -4, %o3 201232c: 94 10 00 11 mov %l1, %o2 2012330: 40 00 1e d6 call 2019e88 2012334: 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) 2012338: b0 92 20 00 orcc %o0, 0, %i0 201233c: 12 80 00 09 bne 2012360 <== NEVER TAKEN 2012340: 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)) 2012344: 80 94 00 01 orcc %l0, %g1, %g0 2012348: 12 80 00 08 bne 2012368 <== ALWAYS TAKEN 201234c: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 2012350: 40 00 24 12 call 201b398 <__errno> <== NOT EXECUTED 2012354: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012358: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 201235c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012360: 81 c7 e0 08 ret 2012364: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 2012368: 02 80 00 0b be 2012394 <== ALWAYS TAKEN 201236c: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 2012370: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 2012374: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 2012378: 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) - 201237c: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 2012380: 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 - 2012384: 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)); 2012388: 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) - 201238c: 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 - 2012390: 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 ) 2012394: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 2012398: 80 a2 e0 00 cmp %o3, 0 201239c: 32 80 00 07 bne,a 20123b8 20123a0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20123a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 20123a8: 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; 20123ac: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 20123b0: 10 80 00 1d b 2012424 20123b4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 20123b8: 80 a0 7f ff cmp %g1, -1 20123bc: 02 80 00 04 be 20123cc <== NEVER TAKEN 20123c0: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 20123c4: 10 80 00 0a b 20123ec 20123c8: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 20123cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20123d0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20123d4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 20123d8: 7f ff ff 78 call 20121b8 <== NOT EXECUTED 20123dc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 20123e0: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 20123e4: 12 80 00 09 bne 2012408 <== NOT EXECUTED 20123e8: 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); 20123ec: d2 07 bf f4 ld [ %fp + -12 ], %o1 20123f0: d4 07 bf f0 ld [ %fp + -16 ], %o2 20123f4: 40 00 1d c6 call 2019b0c 20123f8: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20123fc: b6 92 20 00 orcc %o0, 0, %i3 2012400: 02 80 00 07 be 201241c <== ALWAYS TAKEN 2012404: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2012408: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201240c: 40 00 1e 6f call 2019dc8 <== NOT EXECUTED 2012410: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 2012414: 81 c7 e0 08 ret <== NOT EXECUTED 2012418: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 201241c: 40 00 01 af call 2012ad8 2012420: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2012424: c2 07 bf fc ld [ %fp + -4 ], %g1 2012428: 80 a0 60 00 cmp %g1, 0 201242c: 22 bf ff cd be,a 2012360 <== NEVER TAKEN 2012430: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2012434: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012438: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 201243c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2012440: 80 a0 60 01 cmp %g1, 1 2012444: 32 bf ff c7 bne,a 2012360 2012448: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 201244c: d2 07 bf f0 ld [ %fp + -16 ], %o1 2012450: 40 00 02 60 call 2012dd0 2012454: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012458: b8 92 20 00 orcc %o0, 0, %i4 201245c: 22 bf ff c1 be,a 2012360 <== ALWAYS TAKEN 2012460: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 2012464: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 2012468: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201246c: 40 00 1e 57 call 2019dc8 <== NOT EXECUTED 2012470: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 2012474: 81 c7 e0 08 ret <== NOT EXECUTED 2012478: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020121b8 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20121b8: 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); 20121bc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20121c0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20121c4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20121c8: 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; 20121cc: 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); 20121d0: 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, ...) { 20121d4: 90 10 00 18 mov %i0, %o0 20121d8: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 20121dc: 80 a6 a0 01 cmp %i2, 1 20121e0: 12 80 00 24 bne 2012270 <== NEVER TAKEN 20121e4: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 20121e8: 84 07 a0 58 add %fp, 0x58, %g2 20121ec: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 20121f0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 20121f4: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 20121f8: 80 a6 c0 02 cmp %i3, %g2 20121fc: 0a 80 00 06 bcs 2012214 <== ALWAYS TAKEN 2012200: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 2012204: 40 00 24 65 call 201b398 <__errno> <== NOT EXECUTED 2012208: 01 00 00 00 nop <== NOT EXECUTED 201220c: 10 80 00 1c b 201227c <== NOT EXECUTED 2012210: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012214: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2012218: 80 a0 a0 01 cmp %g2, 1 201221c: 32 80 00 0d bne,a 2012250 2012220: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 2012224: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2012228: 80 a0 a0 00 cmp %g2, 0 201222c: 32 80 00 09 bne,a 2012250 <== NEVER TAKEN 2012230: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012234: 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)) && 2012238: 80 88 a0 03 btst 3, %g2 201223c: 22 80 00 05 be,a 2012250 <== NEVER TAKEN 2012240: 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; 2012244: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 2012248: 10 80 00 0f b 2012284 201224c: 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); 2012250: 96 07 bf f8 add %fp, -8, %o3 2012254: 7f ff fe 3d call 2011b48 2012258: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 201225c: 80 a2 60 00 cmp %o1, 0 2012260: 12 80 00 09 bne 2012284 <== NEVER TAKEN 2012264: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 2012268: 10 80 00 07 b 2012284 201226c: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 2012270: 40 00 24 4a call 201b398 <__errno> <== NOT EXECUTED 2012274: 01 00 00 00 nop <== NOT EXECUTED 2012278: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 201227c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 2012280: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 2012284: 81 c7 e0 08 ret 2012288: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02011b48 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2011b48: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2011b4c: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2011b50: 80 a6 80 1c cmp %i2, %i4 2011b54: 12 80 00 07 bne 2011b70 <== NEVER TAKEN 2011b58: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2011b5c: 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; 2011b60: 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; 2011b64: 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; 2011b68: 81 c7 e0 08 ret 2011b6c: 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) 2011b70: 28 80 00 06 bleu,a 2011b88 <== NOT EXECUTED 2011b74: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2011b78: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2011b7c: 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; 2011b80: 10 80 00 04 b 2011b90 <== NOT EXECUTED 2011b84: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2011b88: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2011b8c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011b90: 10 80 00 0b b 2011bbc <== NOT EXECUTED 2011b94: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011b98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011b9c: 40 00 1f 6c call 201994c <== NOT EXECUTED 2011ba0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2011ba4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011ba8: 22 80 00 05 be,a 2011bbc <== NOT EXECUTED 2011bac: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2011bb0: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2011bb4: 81 c7 e0 08 ret <== NOT EXECUTED 2011bb8: 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++) 2011bbc: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2011bc0: 12 bf ff f6 bne 2011b98 <== NOT EXECUTED 2011bc4: 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; 2011bc8: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2011bcc: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2011bd0: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2011bd4: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2011bd8: 81 c7 e0 08 ret <== NOT EXECUTED 2011bdc: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 02012680 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012680: 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); 2012684: 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; 2012688: 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); 201268c: 7f ff fd 63 call 2011c18 <== NOT EXECUTED 2012690: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012694: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 2012698: 7f ff e1 10 call 200aad8 <_Chain_Extract> <== NOT EXECUTED 201269c: 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); 20126a0: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 20126a4: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 20126a8: 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 ); 20126ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20126b0: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 20126b4: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 20126b8: 7f ff e0 fd call 200aaac <_Chain_Append> <== NOT EXECUTED 20126bc: 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; 20126c0: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 20126c4: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 20126c8: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 20126cc: 81 c7 e0 08 ret <== NOT EXECUTED 20126d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011cd4 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011cd4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011cd8: 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); 2011cdc: 90 10 00 18 mov %i0, %o0 2011ce0: 92 10 00 19 mov %i1, %o1 2011ce4: 7f ff ff cd call 2011c18 2011ce8: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011cec: 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); 2011cf0: 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 ) { 2011cf4: 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); 2011cf8: 90 10 00 18 mov %i0, %o0 2011cfc: 94 10 00 1c mov %i4, %o2 2011d00: 96 10 20 00 clr %o3 2011d04: 7f ff ff d7 call 2011c60 <_hash_search> 2011d08: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2011d0c: b0 92 20 00 orcc %o0, 0, %i0 2011d10: 12 80 00 08 bne 2011d30 2011d14: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2011d18: 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; 2011d1c: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2011d20: 84 00 a0 01 inc %g2 2011d24: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2011d28: 81 c7 e0 08 ret 2011d2c: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2011d30: d2 06 e0 6c ld [ %i3 + 0x6c ], %o1 2011d34: 94 10 00 1c mov %i4, %o2 2011d38: 96 10 00 1c mov %i4, %o3 2011d3c: 98 07 bf fc add %fp, -4, %o4 2011d40: 7f ff ff c8 call 2011c60 <_hash_search> 2011d44: 90 10 00 1d mov %i5, %o0 2011d48: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2011d4c: 7f ff d1 83 call 2006358 2011d50: 90 10 20 44 mov 0x44, %o0 2011d54: d0 26 80 00 st %o0, [ %i2 ] 2011d58: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2011d5c: 80 a2 20 00 cmp %o0, 0 2011d60: 02 80 00 1f be 2011ddc <== NEVER TAKEN 2011d64: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2011d68: 92 10 20 00 clr %o1 2011d6c: 40 00 28 96 call 201bfc4 2011d70: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2011d74: 82 10 20 01 mov 1, %g1 2011d78: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011d7c: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2011d80: 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; 2011d84: 82 08 7f fe and %g1, -2, %g1 2011d88: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011d8c: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2011d90: 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; 2011d94: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2011d98: 40 00 28 4f call 201bed4 2011d9c: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2011da0: 80 a4 20 00 cmp %l0, 0 2011da4: 02 80 00 04 be 2011db4 <== NEVER TAKEN 2011da8: 01 00 00 00 nop lfat_fd->ino = key; 2011dac: 10 80 00 12 b 2011df4 2011db0: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011db4: 40 00 04 35 call 2012e88 <== NOT EXECUTED 2011db8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011dbc: 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); 2011dc0: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011dc4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2011dc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011dcc: 32 80 00 0b bne,a 2011df8 <== NOT EXECUTED 2011dd0: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2011dd4: 7f ff cf a6 call 2005c6c <== NOT EXECUTED 2011dd8: 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 ); 2011ddc: 40 00 25 6f call 201b398 <__errno> <== NOT EXECUTED 2011de0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011de4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2011de8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011dec: 81 c7 e0 08 ret <== NOT EXECUTED 2011df0: 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); 2011df4: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 2011df8: d2 07 bf fc ld [ %fp + -4 ], %o1 2011dfc: b8 0f 20 01 and %i4, 1, %i4 2011e00: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2011e04: 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); 2011e08: b9 2f 20 04 sll %i4, 4, %i4 2011e0c: b8 27 00 01 sub %i4, %g1, %i4 2011e10: 7f ff e3 27 call 200aaac <_Chain_Append> 2011e14: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2011e18: 81 c7 e0 08 ret 2011e1c: 81 e8 00 00 restore =============================================================================== 02011e34 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011e34: 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; 2011e38: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011e3c: 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; 2011e40: 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) 2011e44: 80 a6 e0 00 cmp %i3, 0 2011e48: 02 80 00 63 be 2011fd4 <== NEVER TAKEN 2011e4c: 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 ) 2011e50: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2011e54: 80 a6 80 01 cmp %i2, %g1 2011e58: 1a 80 00 5f bcc 2011fd4 <== NEVER TAKEN 2011e5c: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011e60: 38 80 00 07 bgu,a 2011e7c <== NEVER TAKEN 2011e64: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2011e68: 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) || 2011e6c: 80 a6 80 02 cmp %i2, %g2 2011e70: 28 80 00 04 bleu,a 2011e80 <== ALWAYS TAKEN 2011e74: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2011e78: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011e7c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2011e80: 80 a0 60 01 cmp %g1, 1 2011e84: 32 80 00 1c bne,a 2011ef4 2011e88: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2011e8c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011e90: 80 a0 60 00 cmp %g1, 0 2011e94: 32 80 00 18 bne,a 2011ef4 <== NEVER TAKEN 2011e98: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011e9c: 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)) && 2011ea0: 80 88 60 03 btst 3, %g1 2011ea4: 22 80 00 14 be,a 2011ef4 <== NEVER TAKEN 2011ea8: 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); 2011eac: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2011eb0: 7f ff ff 4c call 2011be0 2011eb4: 90 10 00 10 mov %l0, %o0 sec += (start >> fs_info->vol.sec_log2); 2011eb8: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2011ebc: 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); 2011ec0: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2011ec4: 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); 2011ec8: 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); 2011ecc: 94 0e 80 0a and %i2, %o2, %o2 2011ed0: 90 10 00 1d mov %i5, %o0 2011ed4: 96 10 00 1b mov %i3, %o3 2011ed8: 40 00 03 5a call 2012c40 <_fat_block_read> 2011edc: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2011ee0: b0 92 20 00 orcc %o0, 0, %i0 2011ee4: 16 80 00 41 bge 2011fe8 <== ALWAYS TAKEN 2011ee8: 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; 2011eec: 81 c7 e0 08 ret <== NOT EXECUTED 2011ef0: 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); 2011ef4: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2011ef8: 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); 2011efc: a6 07 bf fc add %fp, -4, %l3 2011f00: 90 10 00 1d mov %i5, %o0 2011f04: 92 10 00 19 mov %i1, %o1 2011f08: 94 10 00 12 mov %l2, %o2 2011f0c: 7f ff ff 0f call 2011b48 2011f10: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2011f14: b0 92 60 00 orcc %o1, 0, %i0 2011f18: 12 80 00 2f bne 2011fd4 <== NEVER TAKEN 2011f1c: 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); 2011f20: a3 34 60 10 srl %l1, 0x10, %l1 2011f24: a2 04 7f ff add %l1, -1, %l1 2011f28: b4 0e 80 11 and %i2, %l1, %i2 2011f2c: a2 10 20 00 clr %l1 2011f30: 10 80 00 1f b 2011fac 2011f34: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2011f38: a2 24 40 14 sub %l1, %l4, %l1 2011f3c: 80 a4 40 1b cmp %l1, %i3 2011f40: 38 80 00 02 bgu,a 2011f48 2011f44: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2011f48: d2 07 bf fc ld [ %fp + -4 ], %o1 2011f4c: 7f ff ff 25 call 2011be0 2011f50: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (ofs >> fs_info->vol.sec_log2); 2011f54: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2011f58: 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); 2011f5c: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2011f60: 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); 2011f64: 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); 2011f68: 94 0d 00 0a and %l4, %o2, %o2 2011f6c: 90 10 00 1d mov %i5, %o0 2011f70: 96 10 00 11 mov %l1, %o3 2011f74: 40 00 03 33 call 2012c40 <_fat_block_read> 2011f78: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2011f7c: 80 a2 20 00 cmp %o0, 0 2011f80: 06 80 00 17 bl 2011fdc <== NEVER TAKEN 2011f84: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 2011f88: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 2011f8c: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011f90: 90 10 00 1d mov %i5, %o0 2011f94: 92 10 00 11 mov %l1, %o1 2011f98: 40 00 1e 6d call 201994c 2011f9c: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2011fa0: 80 a2 20 00 cmp %o0, 0 2011fa4: 12 80 00 10 bne 2011fe4 <== NEVER TAKEN 2011fa8: 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) 2011fac: 80 a6 e0 00 cmp %i3, 0 2011fb0: 32 bf ff e2 bne,a 2011f38 2011fb4: 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); 2011fb8: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2011fbc: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2011fc0: 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); 2011fc4: b4 06 80 18 add %i2, %i0, %i2 2011fc8: 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 + 2011fcc: a4 06 80 12 add %i2, %l2, %l2 2011fd0: 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; 2011fd4: 81 c7 e0 08 ret 2011fd8: 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; 2011fdc: 81 c7 e0 08 ret <== NOT EXECUTED 2011fe0: 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); 2011fe4: 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; } 2011fe8: 81 c7 e0 08 ret 2011fec: 81 e8 00 00 restore =============================================================================== 020127c4 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20127c4: 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; 20127c8: 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 ) { 20127cc: 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; 20127d0: 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)) && 20127d4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20127d8: 80 a0 60 01 cmp %g1, 1 20127dc: 12 80 00 0d bne 2012810 <== ALWAYS TAKEN 20127e0: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 20127e4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 20127e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20127ec: 32 80 00 0a bne,a 2012814 <== NOT EXECUTED 20127f0: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20127f4: 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)) && 20127f8: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 20127fc: 22 80 00 06 be,a 2012814 <== NOT EXECUTED 2012800: 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; 2012804: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2012808: 10 80 00 18 b 2012868 <== NOT EXECUTED 201280c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2012810: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2012814: 10 80 00 0d b 2012848 2012818: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 201281c: 92 10 00 1b mov %i3, %o1 2012820: 40 00 1c 4b call 201994c 2012824: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012828: 80 a2 20 00 cmp %o0, 0 201282c: 12 80 00 10 bne 201286c <== NEVER TAKEN 2012830: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2012834: c2 17 20 06 lduh [ %i4 + 6 ], %g1 2012838: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 201283c: 82 00 80 01 add %g2, %g1, %g1 2012840: 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; 2012844: 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) 2012848: f6 07 bf fc ld [ %fp + -4 ], %i3 201284c: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2012850: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2012854: 86 0e c0 03 and %i3, %g3, %g3 2012858: 80 a0 c0 02 cmp %g3, %g2 201285c: 0a bf ff f0 bcs 201281c 2012860: 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; 2012864: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 2012868: 90 10 20 00 clr %o0 } 201286c: 81 c7 e0 08 ret 2012870: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02011ff0 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2011ff0: 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; 2011ff4: 82 10 3f ff mov -1, %g1 2011ff8: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2011ffc: 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; 2012000: 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 ) { 2012004: 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 ) 2012008: 80 a6 80 01 cmp %i2, %g1 201200c: 1a 80 00 3a bcc 20120f4 <== NEVER TAKEN 2012010: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 return rc; assert(fat_fd->fat_file_size); 2012014: 80 a0 60 00 cmp %g1, 0 2012018: 32 80 00 0a bne,a 2012040 <== ALWAYS TAKEN 201201c: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2012020: 11 00 80 ab sethi %hi(0x202ac00), %o0 <== NOT EXECUTED 2012024: 15 00 80 ab sethi %hi(0x202ac00), %o2 <== NOT EXECUTED 2012028: 17 00 80 ab sethi %hi(0x202ac00), %o3 <== NOT EXECUTED 201202c: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED 2012030: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2012034: 94 12 a3 78 or %o2, 0x378, %o2 <== NOT EXECUTED 2012038: 40 00 09 db call 20147a4 <__assert_func> <== NOT EXECUTED 201203c: 96 12 e3 60 or %o3, 0x360, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2012040: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 2012044: 86 00 ff ff add %g3, -1, %g3 2012048: b4 00 c0 1a add %g3, %i2, %i2 201204c: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2012050: 85 2e 80 02 sll %i2, %g2, %g2 2012054: 80 a0 80 01 cmp %g2, %g1 2012058: 1a 80 00 28 bcc 20120f8 <== NEVER TAKEN 201205c: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 2012060: 80 a6 a0 00 cmp %i2, 0 2012064: 02 80 00 0a be 201208c <== ALWAYS TAKEN 2012068: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 201206c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012070: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012074: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 2012078: 7f ff fe b4 call 2011b48 <== NOT EXECUTED 201207c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 2012080: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2012084: 12 80 00 1d bne 20120f8 <== NOT EXECUTED 2012088: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 201208c: 92 10 00 19 mov %i1, %o1 2012090: 94 10 00 1a mov %i2, %o2 2012094: 7f ff fe ad call 2011b48 2012098: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 201209c: 80 a2 60 00 cmp %o1, 0 20120a0: 12 80 00 16 bne 20120f8 <== NEVER TAKEN 20120a4: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20120a8: d2 07 bf f8 ld [ %fp + -8 ], %o1 20120ac: 40 00 1f 47 call 2019dc8 20120b0: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20120b4: 92 92 20 00 orcc %o0, 0, %o1 20120b8: 12 80 00 10 bne 20120f8 <== NEVER TAKEN 20120bc: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20120c0: 02 80 00 0e be 20120f8 <== ALWAYS TAKEN 20120c4: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20120c8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 20120cc: 40 00 1e 90 call 2019b0c <== NOT EXECUTED 20120d0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20120d4: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 20120d8: 12 80 00 08 bne 20120f8 <== NOT EXECUTED 20120dc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 20120e0: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 20120e4: 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; 20120e8: 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; 20120ec: 10 80 00 03 b 20120f8 <== NOT EXECUTED 20120f0: 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; 20120f4: 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; } 20120f8: 81 c7 e0 08 ret 20120fc: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 0201247c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 201247c: 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; 2012480: 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; 2012484: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2012488: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 201248c: 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 ) 2012490: 80 a6 e0 00 cmp %i3, 0 2012494: 02 80 00 79 be 2012678 <== NEVER TAKEN 2012498: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 201249c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20124a0: 80 a6 80 01 cmp %i2, %g1 20124a4: 18 80 00 09 bgu 20124c8 <== NEVER TAKEN 20124a8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 20124ac: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 20124b0: 80 a6 c0 01 cmp %i3, %g1 20124b4: 18 80 00 05 bgu 20124c8 <== NEVER TAKEN 20124b8: 82 20 40 1b sub %g1, %i3, %g1 20124bc: 80 a6 80 01 cmp %i2, %g1 20124c0: 08 80 00 07 bleu 20124dc <== ALWAYS TAKEN 20124c4: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 20124c8: 40 00 23 b4 call 201b398 <__errno> <== NOT EXECUTED 20124cc: 01 00 00 00 nop <== NOT EXECUTED 20124d0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20124d4: 10 80 00 68 b 2012674 <== NOT EXECUTED 20124d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 20124dc: 90 10 00 18 mov %i0, %o0 20124e0: 92 10 00 19 mov %i1, %o1 20124e4: 94 10 00 11 mov %l1, %o2 20124e8: 7f ff ff 69 call 201228c 20124ec: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 20124f0: 80 a2 20 00 cmp %o0, 0 20124f4: 12 80 00 61 bne 2012678 <== NEVER TAKEN 20124f8: 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)) 20124fc: 80 a0 40 11 cmp %g1, %l1 2012500: 32 80 00 02 bne,a 2012508 <== NEVER TAKEN 2012504: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012508: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 201250c: 80 a0 60 01 cmp %g1, 1 2012510: 32 80 00 1c bne,a 2012580 2012514: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2012518: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 201251c: 80 a0 60 00 cmp %g1, 0 2012520: 32 80 00 18 bne,a 2012580 <== NEVER TAKEN 2012524: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012528: 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)) && 201252c: 80 88 60 03 btst 3, %g1 2012530: 22 80 00 14 be,a 2012580 <== NEVER TAKEN 2012534: 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); 2012538: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 201253c: 7f ff fd a9 call 2011be0 2012540: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (start >> fs_info->vol.sec_log2); 2012544: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2012548: 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); 201254c: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2012550: 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); 2012554: 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); 2012558: 94 0e 80 0a and %i2, %o2, %o2 201255c: 90 10 00 1d mov %i5, %o0 2012560: 96 10 00 1b mov %i3, %o3 2012564: 40 00 01 d9 call 2012cc8 <_fat_block_write> 2012568: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 201256c: 80 a2 20 00 cmp %o0, 0 2012570: 16 80 00 42 bge 2012678 <== ALWAYS TAKEN 2012574: 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; 2012578: 10 80 00 40 b 2012678 <== NOT EXECUTED 201257c: 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); 2012580: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2012584: 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); 2012588: a6 07 bf f8 add %fp, -8, %l3 201258c: 90 10 00 1d mov %i5, %o0 2012590: 92 10 00 19 mov %i1, %o1 2012594: 94 10 00 12 mov %l2, %o2 2012598: 7f ff fd 6c call 2011b48 201259c: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 20125a0: 90 92 60 00 orcc %o1, 0, %o0 20125a4: 12 80 00 35 bne 2012678 <== NEVER TAKEN 20125a8: 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); 20125ac: a3 34 60 10 srl %l1, 0x10, %l1 20125b0: a2 04 7f ff add %l1, -1, %l1 20125b4: a8 10 20 00 clr %l4 20125b8: b4 0e 80 11 and %i2, %l1, %i2 20125bc: a2 10 20 00 clr %l1 20125c0: 10 80 00 21 b 2012644 20125c4: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 20125c8: b0 26 00 15 sub %i0, %l5, %i0 20125cc: 80 a6 00 1b cmp %i0, %i3 20125d0: 38 80 00 02 bgu,a 20125d8 20125d4: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 20125d8: d2 07 bf f8 ld [ %fp + -8 ], %o1 20125dc: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20125e0: 7f ff fd 80 call 2011be0 20125e4: f0 27 bf fc st %i0, [ %fp + -4 ] sec += (ofs >> fs_info->vol.sec_log2); 20125e8: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 20125ec: 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); 20125f0: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 20125f4: 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); 20125f8: 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); 20125fc: 94 0d 40 0a and %l5, %o2, %o2 2012600: 90 10 00 1d mov %i5, %o0 2012604: 96 10 00 18 mov %i0, %o3 2012608: 40 00 01 b0 call 2012cc8 <_fat_block_write> 201260c: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2012610: 80 a2 20 00 cmp %o0, 0 2012614: 06 80 00 18 bl 2012674 <== NEVER TAKEN 2012618: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 201261c: 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; 2012620: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 2012624: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012628: 90 10 00 1d mov %i5, %o0 201262c: 92 10 00 14 mov %l4, %o1 2012630: 40 00 1c c7 call 201994c 2012634: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2012638: 80 a2 20 00 cmp %o0, 0 201263c: 12 80 00 0f bne 2012678 <== NEVER TAKEN 2012640: 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) 2012644: 80 a6 e0 00 cmp %i3, 0 2012648: 32 bf ff e0 bne,a 20125c8 201264c: 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); 2012650: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2012654: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2012658: 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); 201265c: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 2012660: 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); 2012664: 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 + 2012668: 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; 201266c: 10 80 00 03 b 2012678 2012670: 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; 2012674: 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; } 2012678: 81 c7 e0 08 ret 201267c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02019dc8 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019dc8: 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; 2019dcc: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2019dd0: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019dd4: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 2019dd8: 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; 2019ddc: 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) 2019de0: 10 80 00 19 b 2019e44 2019de4: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2019de8: 92 10 00 1a mov %i2, %o1 2019dec: 7f ff fe d8 call 201994c 2019df0: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019df4: b0 92 20 00 orcc %o0, 0, %i0 2019df8: 02 80 00 0b be 2019e24 <== ALWAYS TAKEN 2019dfc: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2019e00: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 2019e04: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2019e08: 02 80 00 03 be 2019e14 <== NOT EXECUTED 2019e0c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 2019e10: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019e14: 7f ff e3 31 call 2012ad8 <== NOT EXECUTED 2019e18: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 2019e1c: 81 c7 e0 08 ret <== NOT EXECUTED 2019e20: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2019e24: 92 10 00 1a mov %i2, %o1 2019e28: 7f ff ff 39 call 2019b0c 2019e2c: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2019e30: 80 a2 20 00 cmp %o0, 0 2019e34: 32 80 00 02 bne,a 2019e3c <== NEVER TAKEN 2019e38: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 2019e3c: 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++; 2019e40: 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) 2019e44: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2019e48: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2019e4c: 84 0e 80 02 and %i2, %g2, %g2 2019e50: 80 a0 80 01 cmp %g2, %g1 2019e54: 0a bf ff e5 bcs 2019de8 2019e58: 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) 2019e5c: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 2019e60: 80 a0 7f ff cmp %g1, -1 2019e64: 02 80 00 04 be 2019e74 <== ALWAYS TAKEN 2019e68: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 2019e6c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 2019e70: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019e74: 90 10 00 1c mov %i4, %o0 2019e78: 7f ff e3 18 call 2012ad8 2019e7c: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2019e80: 81 c7 e0 08 ret 2019e84: 81 e8 00 00 restore =============================================================================== 02012f58 : 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; 2012f58: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2012f5c: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2012f60: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 2012f64: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 2012f68: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 2012f6c: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2012f70: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2012f74: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 2012f78: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 2012f7c: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 2012f80: 81 c3 e0 08 retl <== NOT EXECUTED 2012f84: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 0201994c : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 201994c: 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; 2019950: 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)) ) 2019954: 80 a6 60 01 cmp %i1, 1 2019958: 08 80 00 64 bleu 2019ae8 <== NEVER TAKEN 201995c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 2019960: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2019964: 82 00 60 01 inc %g1 2019968: 80 a6 40 01 cmp %i1, %g1 201996c: 18 80 00 5f bgu 2019ae8 <== NEVER TAKEN 2019970: 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) + 2019974: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2019978: b7 36 60 01 srl %i1, 1, %i3 201997c: 84 88 60 01 andcc %g1, 1, %g2 2019980: 12 80 00 06 bne 2019998 <== ALWAYS TAKEN 2019984: b6 06 c0 19 add %i3, %i1, %i3 2019988: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201998c: 02 80 00 03 be 2019998 <== NOT EXECUTED 2019990: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 2019994: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2019998: 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); 201999c: 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) + 20199a0: b7 36 c0 03 srl %i3, %g3, %i3 20199a4: 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); 20199a8: b8 07 00 19 add %i4, %i1, %i4 20199ac: 80 a0 a0 00 cmp %g2, 0 20199b0: 12 80 00 06 bne 20199c8 <== ALWAYS TAKEN 20199b4: b6 06 c0 03 add %i3, %g3, %i3 20199b8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20199bc: 02 80 00 03 be 20199c8 <== NOT EXECUTED 20199c0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 20199c4: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 20199c8: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 20199cc: 90 10 00 1d mov %i5, %o0 20199d0: 92 10 00 1b mov %i3, %o1 20199d4: 94 10 20 01 mov 1, %o2 20199d8: 7f ff e3 c1 call 20128dc 20199dc: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 20199e0: b0 92 20 00 orcc %o0, 0, %i0 20199e4: 12 80 00 38 bne 2019ac4 <== NEVER TAKEN 20199e8: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 20199ec: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 20199f0: 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); 20199f4: a1 34 20 10 srl %l0, 0x10, %l0 20199f8: 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 ) 20199fc: 02 80 00 27 be 2019a98 <== NEVER TAKEN 2019a00: b8 0f 00 10 and %i4, %l0, %i4 2019a04: 80 a0 60 04 cmp %g1, 4 2019a08: 02 80 00 31 be 2019acc <== NEVER TAKEN 2019a0c: 80 a0 60 01 cmp %g1, 1 2019a10: 12 80 00 36 bne 2019ae8 <== NEVER TAKEN 2019a14: 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) ) 2019a18: 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))); 2019a1c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2019a20: 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))); 2019a24: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 2019a28: 80 a7 00 03 cmp %i4, %g3 2019a2c: 12 80 00 0f bne 2019a68 <== ALWAYS TAKEN 2019a30: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019a34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019a38: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019a3c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019a40: 7f ff e3 a7 call 20128dc <== NOT EXECUTED 2019a44: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019a48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2019a4c: 12 80 00 2d bne 2019b00 <== NOT EXECUTED 2019a50: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 2019a54: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 2019a58: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 2019a5c: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 2019a60: 10 80 00 05 b 2019a74 <== NOT EXECUTED 2019a64: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 2019a68: b8 00 80 1c add %g2, %i4, %i4 2019a6c: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 2019a70: 85 28 a0 08 sll %g2, 8, %g2 2019a74: 82 10 80 01 or %g2, %g1, %g1 2019a78: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2019a7c: 80 8e 60 01 btst 1, %i1 2019a80: 02 80 00 04 be 2019a90 2019a84: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 2019a88: 10 80 00 0e b 2019ac0 2019a8c: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2019a90: 10 80 00 0c b 2019ac0 2019a94: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 2019a98: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019a9c: 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)); 2019aa0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019aa4: 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)); 2019aa8: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2019aac: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2019ab0: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2019ab4: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2019ab8: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2019abc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2019ac0: c2 26 80 00 st %g1, [ %i2 ] break; 2019ac4: 81 c7 e0 08 ret 2019ac8: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 2019acc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019ad0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 2019ad4: 7f ff ff 92 call 201991c <== NOT EXECUTED 2019ad8: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 2019adc: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 2019ae0: 81 c7 e0 08 ret <== NOT EXECUTED 2019ae4: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 2019ae8: 40 00 06 2c call 201b398 <__errno> <== NOT EXECUTED 2019aec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019af0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019af4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019af8: 81 c7 e0 08 ret <== NOT EXECUTED 2019afc: 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) 2019b00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2019b04: 81 c7 e0 08 ret <== NOT EXECUTED 2019b08: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012e88 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2012e88: 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)) 2012e8c: 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; 2012e90: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2012e94: 10 80 00 2a b 2012f3c <== NOT EXECUTED 2012e98: 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)) 2012e9c: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2012ea0: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2012ea4: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2012ea8: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2012eac: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2012eb0: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2012eb4: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2012eb8: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2012ebc: 12 80 00 0a bne 2012ee4 <== NOT EXECUTED 2012ec0: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2012ec4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2012ec8: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2012ecc: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2012ed0: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2012ed4: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2012ed8: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012edc: 81 c7 e0 08 ret <== NOT EXECUTED 2012ee0: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2012ee4: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2012ee8: 0a 80 00 03 bcs 2012ef4 <== NOT EXECUTED 2012eec: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2012ef0: 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++) 2012ef4: 92 02 60 01 inc %o1 <== NOT EXECUTED 2012ef8: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2012efc: 32 bf ff e8 bne,a 2012e9c <== NOT EXECUTED 2012f00: 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)) 2012f04: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2012f08: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2012f0c: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2012f10: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2012f14: 1a 80 00 0d bcc 2012f48 <== NOT EXECUTED 2012f18: 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); 2012f1c: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 2012f20: 7f ff d0 5c call 2007090 <== NOT EXECUTED 2012f24: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2012f28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012f2c: 02 80 00 09 be 2012f50 <== NOT EXECUTED 2012f30: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2012f34: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED 2012f38: 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++) 2012f3c: f0 07 60 78 ld [ %i5 + 0x78 ], %i0 <== NOT EXECUTED 2012f40: 10 bf ff ee b 2012ef8 <== NOT EXECUTED 2012f44: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2012f48: 81 c7 e0 08 ret <== NOT EXECUTED 2012f4c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2012f50: 81 c7 e0 08 ret <== NOT EXECUTED 2012f54: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02012dd0 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2012dd0: 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; 2012dd4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = start_cln; 2012dd8: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2012ddc: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2012de0: 92 10 20 01 mov 1, %o1 2012de4: 7f ff ca 6f call 20057a0 2012de8: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2012dec: b6 92 20 00 orcc %o0, 0, %i3 2012df0: 12 80 00 1b bne 2012e5c <== ALWAYS TAKEN 2012df4: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2012df8: 40 00 21 68 call 201b398 <__errno> <== NOT EXECUTED 2012dfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012e00: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012e04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012e08: 81 c7 e0 08 ret <== NOT EXECUTED 2012e0c: 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); 2012e10: 7f ff ff e4 call 2012da0 2012e14: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2012e18: 80 a2 3f ff cmp %o0, -1 2012e1c: 12 80 00 06 bne 2012e34 <== ALWAYS TAKEN 2012e20: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012e24: 7f ff cb 92 call 2005c6c <== NOT EXECUTED 2012e28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2012e2c: 81 c7 e0 08 ret <== NOT EXECUTED 2012e30: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012e34: 90 10 00 1c mov %i4, %o0 2012e38: 40 00 1a c5 call 201994c 2012e3c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012e40: b0 92 20 00 orcc %o0, 0, %i0 2012e44: 02 80 00 06 be 2012e5c <== ALWAYS TAKEN 2012e48: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012e4c: 7f ff cb 88 call 2005c6c <== NOT EXECUTED 2012e50: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2012e54: 81 c7 e0 08 ret <== NOT EXECUTED 2012e58: 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) 2012e5c: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2012e60: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2012e64: 84 0a 40 02 and %o1, %g2, %g2 2012e68: 80 a0 80 01 cmp %g2, %g1 2012e6c: 0a bf ff e9 bcs 2012e10 2012e70: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2012e74: 90 10 00 1b mov %i3, %o0 2012e78: 7f ff cb 7d call 2005c6c 2012e7c: b0 10 20 00 clr %i0 return rc; } 2012e80: 81 c7 e0 08 ret 2012e84: 81 e8 00 00 restore =============================================================================== 02013124 : * 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) { 2013124: 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); 2013128: 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; 201312c: 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) { 2013130: 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; 2013134: c0 27 bf fc clr [ %fp + -4 ] rc = stat(mt_entry->dev, &stat_buf); 2013138: 7f ff d0 78 call 2007318 201313c: 92 07 bf a8 add %fp, -88, %o1 if (rc == -1) 2013140: 80 a2 3f ff cmp %o0, -1 2013144: 02 80 01 68 be 20136e4 <== NEVER TAKEN 2013148: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 201314c: c4 07 bf b4 ld [ %fp + -76 ], %g2 2013150: 03 00 00 3c sethi %hi(0xf000), %g1 2013154: 84 08 80 01 and %g2, %g1, %g2 2013158: 03 00 00 18 sethi %hi(0x6000), %g1 201315c: 80 a0 80 01 cmp %g2, %g1 2013160: 02 80 00 06 be 2013178 <== ALWAYS TAKEN 2013164: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); 2013168: 40 00 20 8c call 201b398 <__errno> <== NOT EXECUTED 201316c: 01 00 00 00 nop <== NOT EXECUTED 2013170: 10 80 01 ab b 201381c <== NOT EXECUTED 2013174: 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); 2013178: 7f ff c6 fb call 2004d64 201317c: d0 1f bf c0 ldd [ %fp + -64 ], %o0 if (vol->dd == NULL) 2013180: 80 a2 20 00 cmp %o0, 0 2013184: 02 80 00 3e be 201327c <== NEVER TAKEN 2013188: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 201318c: 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); 2013190: 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; 2013194: 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); 2013198: 7f ff f7 89 call 2010fbc 201319c: 96 07 bf fc add %fp, -4, %o3 if (sc != RTEMS_SUCCESSFUL) 20131a0: 80 a2 20 00 cmp %o0, 0 20131a4: 12 80 00 34 bne 2013274 <== NEVER TAKEN 20131a8: 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); 20131ac: d0 07 bf fc ld [ %fp + -4 ], %o0 20131b0: de 02 20 24 ld [ %o0 + 0x24 ], %o7 20131b4: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 20131b8: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 20131bc: d6 2f bf 99 stb %o3, [ %fp + -103 ] 20131c0: d6 0b e0 23 ldub [ %o7 + 0x23 ], %o3 20131c4: f4 2f bf 9a stb %i2, [ %fp + -102 ] 20131c8: d6 2f bf 97 stb %o3, [ %fp + -105 ] 20131cc: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 20131d0: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 20131d4: d6 2f bf 9d stb %o3, [ %fp + -99 ] 20131d8: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 20131dc: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 20131e0: d6 2f bf 9c stb %o3, [ %fp + -100 ] 20131e4: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 20131e8: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 20131ec: d6 2f bf 9b stb %o3, [ %fp + -101 ] 20131f0: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 20131f4: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 20131f8: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 20131fc: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2013200: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 2013204: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 2013208: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 201320c: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2013210: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 2013214: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 2013218: f0 0b e0 22 ldub [ %o7 + 0x22 ], %i0 201321c: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 2013220: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 2013224: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 2013228: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 201322c: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 2013230: d6 2f bf a7 stb %o3, [ %fp + -89 ] 2013234: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 2013238: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 201323c: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 2013240: c2 27 bf 8c st %g1, [ %fp + -116 ] 2013244: c4 3f bf 80 std %g2, [ %fp + -128 ] 2013248: c8 27 bf 7c st %g4, [ %fp + -132 ] 201324c: 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); 2013250: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 2013254: 7f ff f7 f4 call 2011224 2013258: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 201325c: c2 07 bf 8c ld [ %fp + -116 ], %g1 2013260: 80 a2 20 00 cmp %o0, 0 2013264: c4 1f bf 80 ldd [ %fp + -128 ], %g2 2013268: c8 07 bf 7c ld [ %fp + -132 ], %g4 201326c: 02 80 00 08 be 201328c <== ALWAYS TAKEN 2013270: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { rtems_disk_release(vol->dd); 2013274: 7f ff c6 db call 2004de0 <== NOT EXECUTED 2013278: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 201327c: 40 00 20 47 call 201b398 <__errno> <== NOT EXECUTED 2013280: 01 00 00 00 nop <== NOT EXECUTED 2013284: 10 80 01 66 b 201381c <== NOT EXECUTED 2013288: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 201328c: 98 0b 20 ff and %o4, 0xff, %o4 2013290: 9a 0b 60 ff and %o5, 0xff, %o5 2013294: 99 2b 20 08 sll %o4, 8, %o4 2013298: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 201329c: 9f 2b 60 10 sll %o5, 0x10, %o7 20132a0: 9f 33 e0 10 srl %o7, 0x10, %o7 20132a4: 80 a3 e4 00 cmp %o7, 0x400 20132a8: 02 80 00 0b be 20132d4 <== NEVER TAKEN 20132ac: da 37 40 00 sth %o5, [ %i5 ] 20132b0: 80 a3 e2 00 cmp %o7, 0x200 20132b4: 22 80 00 09 be,a 20132d8 <== ALWAYS TAKEN 20132b8: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 20132bc: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 20132c0: 02 80 00 05 be 20132d4 <== NOT EXECUTED 20132c4: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 20132c8: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 20132cc: 12 80 00 d2 bne 2013614 <== NOT EXECUTED 20132d0: 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; 20132d4: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 20132d8: c0 2f 60 03 clrb [ %i5 + 3 ] 20132dc: 10 80 00 05 b 20132f0 20132e0: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 20132e4: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 20132e8: 98 03 20 01 inc %o4 <== NOT EXECUTED 20132ec: 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; 20132f0: 80 8b e0 01 btst 1, %o7 20132f4: 22 bf ff fc be,a 20132e4 <== NEVER TAKEN 20132f8: 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; 20132fc: 9b 2b 60 10 sll %o5, 0x10, %o5 2013300: c0 2f 60 02 clrb [ %i5 + 2 ] 2013304: 93 33 60 10 srl %o5, 0x10, %o1 2013308: 10 80 00 05 b 201331c 201330c: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 2013310: 9f 3b e0 01 sra %o7, 1, %o7 2013314: 9a 03 60 01 inc %o5 2013318: 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; 201331c: 80 8b e0 01 btst 1, %o7 2013320: 22 bf ff fc be,a 2013310 2013324: 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) 2013328: 9a 8e e0 ff andcc %i3, 0xff, %o5 201332c: 02 80 00 ba be 2013614 <== NEVER TAKEN 2013330: 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; 2013334: 10 80 00 05 b 2013348 2013338: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 201333c: 9e 03 e0 01 inc %o7 2013340: 9b 3b 60 01 sra %o5, 1, %o5 2013344: 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; 2013348: 80 8b 60 01 btst 1, %o5 201334c: 02 bf ff fc be 201333c 2013350: 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) 2013354: 9f 2a 40 0f sll %o1, %o7, %o7 2013358: de 37 60 06 sth %o7, [ %i5 + 6 ] 201335c: 1b 00 00 20 sethi %hi(0x8000), %o5 2013360: 9f 2b e0 10 sll %o7, 0x10, %o7 2013364: 9f 33 e0 10 srl %o7, 0x10, %o7 2013368: 80 a3 c0 0d cmp %o7, %o5 201336c: 18 80 00 aa bgu 2013614 <== NEVER TAKEN 2013370: 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; 2013374: 10 80 00 05 b 2013388 2013378: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 201337c: 9f 3b e0 01 sra %o7, 1, %o7 2013380: 9a 03 60 01 inc %o5 2013384: 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; 2013388: 80 8b e0 01 btst 1, %o7 201338c: 22 bf ff fc be,a 201337c 2013390: 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); 2013394: 84 08 a0 ff and %g2, 0xff, %g2 2013398: 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); 201339c: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20133a0: 88 09 20 ff and %g4, 0xff, %g4 20133a4: 86 08 e0 ff and %g3, 0xff, %g3 20133a8: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133ac: 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); 20133b0: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133b4: 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); 20133b8: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20133bc: 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)) / 20133c0: 84 02 7f ff add %o1, -1, %g2 20133c4: 83 28 60 10 sll %g1, 0x10, %g1 20133c8: c6 27 bf 84 st %g3, [ %fp + -124 ] 20133cc: 91 30 60 0b srl %g1, 0xb, %o0 20133d0: 40 00 52 da call 2027f38 <.div> 20133d4: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 20133d8: 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)) / 20133dc: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 20133e0: 85 2a 00 02 sll %o0, %g2, %g2 20133e4: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 20133e8: c4 0f bf 99 ldub [ %fp + -103 ], %g2 20133ec: ae 0d e0 ff and %l7, 0xff, %l7 20133f0: 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)) / 20133f4: 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) 20133f8: ae 10 80 17 or %g2, %l7, %l7 20133fc: af 2d e0 10 sll %l7, 0x10, %l7 2013400: 80 a5 e0 00 cmp %l7, 0 2013404: 02 80 00 05 be 2013418 <== NEVER TAKEN 2013408: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 201340c: af 35 e0 10 srl %l7, 0x10, %l7 2013410: 10 80 00 0c b 2013440 2013414: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2013418: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 201341c: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2013420: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 2013424: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2013428: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 201342c: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 2013430: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 2013434: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 2013438: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 201343c: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2013440: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013444: 87 28 e0 10 sll %g3, 0x10, %g3 2013448: c2 27 bf 8c st %g1, [ %fp + -116 ] 201344c: a7 30 e0 10 srl %g3, 0x10, %l3 2013450: 40 00 52 7e call 2027e48 <.umul> 2013454: 90 0e 60 ff and %i1, 0xff, %o0 2013458: c2 07 bf 8c ld [ %fp + -116 ], %g1 201345c: 90 04 c0 08 add %l3, %o0, %o0 2013460: 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; 2013464: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2013468: a4 0c a0 ff and %l2, 0xff, %l2 201346c: a2 0c 60 ff and %l1, 0xff, %l1 2013470: a5 2c a0 08 sll %l2, 8, %l2 2013474: a2 14 80 11 or %l2, %l1, %l1 2013478: a3 2c 60 10 sll %l1, 0x10, %l1 201347c: 80 a4 60 00 cmp %l1, 0 2013480: 02 80 00 05 be 2013494 <== NEVER TAKEN 2013484: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2013488: a3 34 60 10 srl %l1, 0x10, %l1 201348c: 10 80 00 0d b 20134c0 2013490: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2013494: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 2013498: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 201349c: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 20134a0: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 20134a4: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20134a8: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED 20134ac: 84 10 80 18 or %g2, %i0, %g2 <== NOT EXECUTED 20134b0: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20134b4: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 20134b8: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20134bc: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 20134c0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 20134c4: 92 0e e0 ff and %i3, 0xff, %o1 20134c8: 40 00 52 9a call 2027f30 <.udiv> 20134cc: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 20134d0: 80 a2 2f f4 cmp %o0, 0xff4 20134d4: 18 80 00 08 bgu 20134f4 <== NEVER TAKEN 20134d8: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 20134dc: 82 10 20 01 mov 1, %g1 20134e0: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 20134e4: 82 10 2f ff mov 0xfff, %g1 20134e8: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 20134ec: 10 80 00 0f b 2013528 20134f0: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 20134f4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20134f8: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 20134fc: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2013500: 38 80 00 05 bgu,a 2013514 <== NOT EXECUTED 2013504: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 2013508: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 201350c: 10 80 00 04 b 201351c <== NOT EXECUTED 2013510: 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; 2013514: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2013518: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 201351c: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013520: 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; 2013524: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013528: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 201352c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2013530: 80 a0 60 04 cmp %g1, 4 2013534: 12 80 00 6e bne 20136ec <== ALWAYS TAKEN 2013538: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 201353c: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 2013540: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 2013544: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013548: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 201354c: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 2013550: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2013554: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 2013558: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 201355c: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 2013560: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013564: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2013568: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 201356c: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2013570: 02 80 00 05 be 2013584 <== NOT EXECUTED 2013574: 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; 2013578: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 201357c: 10 80 00 03 b 2013588 <== NOT EXECUTED 2013580: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 2013584: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 2013588: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 201358c: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 2013590: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 2013594: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 2013598: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 201359c: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 20135a0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 20135a4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20135a8: 02 80 00 1b be 2013614 <== NOT EXECUTED 20135ac: 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, 20135b0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20135b4: 94 10 20 00 clr %o2 <== NOT EXECUTED 20135b8: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20135bc: 7f ff fd a1 call 2012c40 <_fat_block_read> <== NOT EXECUTED 20135c0: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 20135c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20135c8: 06 80 00 23 bl 2013654 <== NOT EXECUTED 20135cc: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 20135d0: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 20135d4: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 20135d8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20135dc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20135e0: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 20135e4: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 20135e8: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 20135ec: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 20135f0: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 20135f4: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 20135f8: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 20135fc: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2013600: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2013604: 22 80 00 0a be,a 201362c <== NOT EXECUTED 2013608: 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); 201360c: 7f ff fd 33 call 2012ad8 <== NOT EXECUTED 2013610: 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); 2013614: 7f ff c5 f3 call 2004de0 <== NOT EXECUTED 2013618: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 201361c: 40 00 1f 5f call 201b398 <__errno> <== NOT EXECUTED 2013620: 01 00 00 00 nop <== NOT EXECUTED 2013624: 10 80 00 7e b 201381c <== NOT EXECUTED 2013628: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 201362c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2013630: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 2013634: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2013638: 7f ff fd 82 call 2012c40 <_fat_block_read> <== NOT EXECUTED 201363c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2013640: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013644: 16 80 00 08 bge 2013664 <== NOT EXECUTED 2013648: 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); 201364c: 7f ff fd 23 call 2012ad8 <== NOT EXECUTED 2013650: 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); 2013654: 7f ff c5 e3 call 2004de0 <== NOT EXECUTED 2013658: 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 ); 201365c: 81 c7 e0 08 ret <== NOT EXECUTED 2013660: 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); 2013664: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 2013668: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 201366c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013670: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2013674: 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, 2013678: 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); 201367c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013680: 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, 2013684: 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); 2013688: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 201368c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2013690: 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); 2013694: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2013698: c2 0f bf fa ldub [ %fp + -6 ], %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 f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20136ac: 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); 20136b0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136b4: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 20136b8: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20136bc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20136c0: 7f ff fe 37 call 2012f9c <== NOT EXECUTED 20136c4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 20136c8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20136cc: 02 80 00 0d be 2013700 <== NOT EXECUTED 20136d0: 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); 20136d4: 7f ff fd 01 call 2012ad8 <== NOT EXECUTED 20136d8: 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); 20136dc: 7f ff c5 c1 call 2004de0 <== NOT EXECUTED 20136e0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 20136e4: 81 c7 e0 08 ret 20136e8: 81 e8 00 00 restore } } } else { vol->rdir_cl = 0; 20136ec: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 20136f0: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 20136f4: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 20136f8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 20136fc: 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); 2013700: 7f ff fc f6 call 2012ad8 2013704: 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; 2013708: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 201370c: 40 00 51 cf call 2027e48 <.umul> 2013710: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2013714: 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)); 2013718: 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; 201371c: 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)); 2013720: 90 10 20 02 mov 2, %o0 2013724: 7f ff c8 1f call 20057a0 2013728: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 201372c: 80 a2 20 00 cmp %o0, 0 2013730: 02 80 00 12 be 2013778 <== NEVER TAKEN 2013734: 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 ); 2013738: 82 02 20 04 add %o0, 4, %g1 201373c: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2013740: 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 ); 2013744: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 2013748: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 201374c: 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; 2013750: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 2013754: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2013758: 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)); 201375c: 92 10 20 0c mov 0xc, %o1 2013760: 7f ff c8 10 call 20057a0 2013764: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2013768: 80 a2 20 00 cmp %o0, 0 201376c: 12 80 00 06 bne 2013784 <== ALWAYS TAKEN 2013770: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 2013774: 30 80 00 1c b,a 20137e4 <== 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); 2013778: 7f ff c5 9a call 2004de0 <== NOT EXECUTED 201377c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2013780: 30 80 00 24 b,a 2013810 <== 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 ); 2013784: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 2013788: 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 ); 201378c: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 2013790: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2013794: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 2013798: 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; 201379c: 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 ); 20137a0: 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; 20137a4: 82 10 21 00 mov 0x100, %g1 head->next = tail; 20137a8: c4 22 20 0c st %g2, [ %o0 + 0xc ] 20137ac: c2 27 60 78 st %g1, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20137b0: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 20137b4: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 20137b8: 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; 20137bc: 83 28 80 01 sll %g2, %g1, %g1 20137c0: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20137c4: 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; 20137c8: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20137cc: 7f ff c7 f5 call 20057a0 20137d0: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 20137d4: 80 a2 20 00 cmp %o0, 0 20137d8: 12 80 00 14 bne 2013828 <== ALWAYS TAKEN 20137dc: d0 27 60 70 st %o0, [ %i5 + 0x70 ] 20137e0: 30 80 00 05 b,a 20137f4 <== 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); 20137e4: 7f ff c5 7f call 2004de0 <== NOT EXECUTED 20137e8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20137ec: 10 80 00 07 b 2013808 <== NOT EXECUTED 20137f0: 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); 20137f4: 7f ff c5 7b call 2004de0 <== NOT EXECUTED 20137f8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20137fc: 7f ff c9 1c call 2005c6c <== NOT EXECUTED 2013800: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013804: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2013808: 7f ff c9 19 call 2005c6c <== NOT EXECUTED 201380c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013810: 40 00 1e e2 call 201b398 <__errno> <== NOT EXECUTED 2013814: 01 00 00 00 nop <== NOT EXECUTED 2013818: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 201381c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2013820: 81 c7 e0 08 ret <== NOT EXECUTED 2013824: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2013828: d0 17 40 00 lduh [ %i5 ], %o0 201382c: 7f ff c7 dd call 20057a0 2013830: 92 10 20 01 mov 1, %o1 2013834: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 2013838: 80 a2 20 00 cmp %o0, 0 201383c: 12 bf ff aa bne 20136e4 <== ALWAYS TAKEN 2013840: b0 10 20 00 clr %i0 { rtems_disk_release(vol->dd); 2013844: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2013848: 7f ff c5 66 call 2004de0 <== NOT EXECUTED 201384c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2013850: 7f ff c9 07 call 2005c6c <== NOT EXECUTED 2013854: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013858: 7f ff c9 05 call 2005c6c <== NOT EXECUTED 201385c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013860: 7f ff c9 03 call 2005c6c <== NOT EXECUTED 2013864: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013868: 40 00 1e cc call 201b398 <__errno> <== NOT EXECUTED 201386c: 01 00 00 00 nop <== NOT EXECUTED 2013870: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2013874: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 2013878: 81 c7 e0 08 ret <== NOT EXECUTED 201387c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019e88 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019e88: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2019e8c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 2019e90: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2019e94: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 2019e98: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2019e9c: 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; 2019ea0: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 2019ea4: 80 a6 a0 00 cmp %i2, 0 2019ea8: 02 80 00 16 be 2019f00 <== NEVER TAKEN 2019eac: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2019eb0: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 2019eb4: 80 a4 3f ff cmp %l0, -1 2019eb8: 22 80 00 02 be,a 2019ec0 2019ebc: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 2019ec0: a6 10 20 02 mov 2, %l3 2019ec4: 10 80 00 55 b 201a018 2019ec8: 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); 2019ecc: 92 10 00 10 mov %l0, %o1 2019ed0: 7f ff fe 9f call 201994c 2019ed4: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2019ed8: b0 92 20 00 orcc %o0, 0, %i0 2019edc: 02 80 00 0b be 2019f08 <== ALWAYS TAKEN 2019ee0: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 2019ee4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2019ee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2019eec: 02 80 00 5b be 201a058 <== NOT EXECUTED 2019ef0: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019ef4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019ef8: 7f ff ff b4 call 2019dc8 <== NOT EXECUTED 2019efc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019f00: 81 c7 e0 08 ret <== NOT EXECUTED 2019f04: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 2019f08: 80 a0 60 00 cmp %g1, 0 2019f0c: 32 80 00 3f bne,a 201a008 2019f10: 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) 2019f14: c2 06 c0 00 ld [ %i3 ], %g1 2019f18: 80 a0 60 00 cmp %g1, 0 2019f1c: 12 80 00 0b bne 2019f48 <== NEVER TAKEN 2019f20: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 2019f24: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2019f28: 92 10 00 10 mov %l0, %o1 2019f2c: 7f ff fe f8 call 2019b0c 2019f30: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2019f34: 80 a2 20 00 cmp %o0, 0 2019f38: 22 80 00 22 be,a 2019fc0 <== ALWAYS TAKEN 2019f3c: 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); 2019f40: 81 c7 e0 08 ret <== NOT EXECUTED 2019f44: 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); 2019f48: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019f4c: 7f ff fe f0 call 2019b0c <== NOT EXECUTED 2019f50: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2019f54: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 2019f58: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 2019f5c: 02 80 00 07 be 2019f78 <== NOT EXECUTED 2019f60: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019f64: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019f68: 7f ff ff 98 call 2019dc8 <== NOT EXECUTED 2019f6c: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 2019f70: 81 c7 e0 08 ret <== NOT EXECUTED 2019f74: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 2019f78: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2019f7c: 7f ff fe e4 call 2019b0c <== NOT EXECUTED 2019f80: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2019f84: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 2019f88: 22 80 00 0e be,a 2019fc0 <== NOT EXECUTED 2019f8c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2019f90: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019f94: 7f ff ff 8d call 2019dc8 <== NOT EXECUTED 2019f98: 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); 2019f9c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019fa0: 94 10 20 00 clr %o2 <== NOT EXECUTED 2019fa4: 7f ff fe da call 2019b0c <== NOT EXECUTED 2019fa8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 2019fac: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2019fb0: 7f ff e2 ca call 2012ad8 <== NOT EXECUTED 2019fb4: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 2019fb8: 81 c7 e0 08 ret <== NOT EXECUTED 2019fbc: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 2019fc0: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 2019fc4: 80 a0 40 1a cmp %g1, %i2 2019fc8: 12 80 00 0e bne 201a000 <== NEVER TAKEN 2019fcc: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2019fd0: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 2019fd4: 80 a0 7f ff cmp %g1, -1 2019fd8: 02 80 00 05 be 2019fec <== ALWAYS TAKEN 2019fdc: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 2019fe0: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2019fe4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2019fe8: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2019fec: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 2019ff0: 7f ff e2 ba call 2012ad8 2019ff4: 90 10 00 11 mov %l1, %o0 return rc; 2019ff8: 81 c7 e0 08 ret 2019ffc: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 201a000: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201a004: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 201a008: 80 a4 00 14 cmp %l0, %l4 201a00c: 0a 80 00 03 bcs 201a018 <== ALWAYS TAKEN 201a010: a6 04 e0 01 inc %l3 cl4find = 2; 201a014: 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) 201a018: 80 a4 c0 14 cmp %l3, %l4 201a01c: 0a bf ff ac bcs 2019ecc <== ALWAYS TAKEN 201a020: 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) 201a024: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 201a028: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a02c: 02 80 00 05 be 201a040 <== NOT EXECUTED 201a030: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201a034: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a038: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a03c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a040: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a044: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a048: 7f ff e2 a4 call 2012ad8 <== NOT EXECUTED 201a04c: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201a050: 81 c7 e0 08 ret <== NOT EXECUTED 201a054: 81 e8 00 00 restore <== NOT EXECUTED } 201a058: 81 c7 e0 08 ret <== NOT EXECUTED 201a05c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02019b0c : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2019b0c: 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; 2019b10: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2019b14: 80 a6 60 01 cmp %i1, 1 2019b18: 08 80 00 07 bleu 2019b34 <== NEVER TAKEN 2019b1c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 2019b20: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2019b24: 82 00 60 01 inc %g1 2019b28: 80 a6 40 01 cmp %i1, %g1 2019b2c: 28 80 00 08 bleu,a 2019b4c <== ALWAYS TAKEN 2019b30: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 2019b34: 40 00 06 19 call 201b398 <__errno> <== NOT EXECUTED 2019b38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019b3c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019b40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019b44: 81 c7 e0 08 ret <== NOT EXECUTED 2019b48: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2019b4c: b7 36 60 01 srl %i1, 1, %i3 2019b50: 84 88 60 01 andcc %g1, 1, %g2 2019b54: 12 80 00 06 bne 2019b6c <== ALWAYS TAKEN 2019b58: b6 06 c0 19 add %i3, %i1, %i3 2019b5c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019b60: 02 80 00 03 be 2019b6c <== NOT EXECUTED 2019b64: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 2019b68: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2019b6c: 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); 2019b70: 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) + 2019b74: b7 36 c0 03 srl %i3, %g3, %i3 2019b78: 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); 2019b7c: b8 07 00 19 add %i4, %i1, %i4 2019b80: 80 a0 a0 00 cmp %g2, 0 2019b84: 12 80 00 06 bne 2019b9c <== ALWAYS TAKEN 2019b88: b6 06 c0 03 add %i3, %g3, %i3 2019b8c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2019b90: 02 80 00 03 be 2019b9c <== NOT EXECUTED 2019b94: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2019b98: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2019b9c: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2019ba0: 90 10 00 1d mov %i5, %o0 2019ba4: 92 10 00 1b mov %i3, %o1 2019ba8: 94 10 20 01 mov 1, %o2 2019bac: 7f ff e3 4c call 20128dc 2019bb0: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2019bb4: b0 92 20 00 orcc %o0, 0, %i0 2019bb8: 12 bf ff e3 bne 2019b44 <== NEVER TAKEN 2019bbc: 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); 2019bc0: a1 34 20 10 srl %l0, 0x10, %l0 2019bc4: a0 04 3f ff add %l0, -1, %l0 2019bc8: 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 ) 2019bcc: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 2019bd0: 80 a7 20 02 cmp %i4, 2 2019bd4: 02 80 00 5f be 2019d50 <== NEVER TAKEN 2019bd8: 80 a7 20 04 cmp %i4, 4 2019bdc: 02 80 00 65 be 2019d70 <== NEVER TAKEN 2019be0: 80 a7 20 01 cmp %i4, 1 2019be4: 12 80 00 73 bne 2019db0 <== NEVER TAKEN 2019be8: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2019bec: 02 80 00 29 be 2019c90 2019bf0: 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; 2019bf4: 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)) = 2019bf8: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019bfc: 84 08 a0 0f and %g2, 0xf, %g2 2019c00: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019c04: 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)) = 2019c08: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 2019c0c: 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)) = 2019c10: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 2019c14: 84 10 c0 02 or %g3, %g2, %g2 2019c18: 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) ) 2019c1c: c2 17 40 00 lduh [ %i5 ], %g1 2019c20: 82 00 7f ff add %g1, -1, %g1 2019c24: 80 a4 00 01 cmp %l0, %g1 2019c28: 12 80 00 11 bne 2019c6c <== ALWAYS TAKEN 2019c2c: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019c30: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019c34: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019c38: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019c3c: 7f ff e3 28 call 20128dc <== NOT EXECUTED 2019c40: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019c44: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019c48: 12 bf ff bf bne 2019b44 <== NOT EXECUTED 2019c4c: 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); 2019c50: 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; 2019c54: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2019c58: 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; 2019c5c: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019c60: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019c64: 10 80 00 27 b 2019d00 <== NOT EXECUTED 2019c68: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019c6c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019c70: a0 04 20 01 inc %l0 2019c74: 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); 2019c78: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2019c7c: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2019c80: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2019c84: 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))) | 2019c88: 10 80 00 2d b 2019d3c 2019c8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019c90: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2019c94: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2019c98: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2019c9c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019ca0: 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)) = 2019ca4: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019ca8: 84 16 80 02 or %i2, %g2, %g2 2019cac: 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) ) 2019cb0: c2 17 40 00 lduh [ %i5 ], %g1 2019cb4: 82 00 7f ff add %g1, -1, %g1 2019cb8: 80 a4 00 01 cmp %l0, %g1 2019cbc: 12 80 00 17 bne 2019d18 <== ALWAYS TAKEN 2019cc0: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2019cc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2019cc8: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2019ccc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2019cd0: 7f ff e3 03 call 20128dc <== NOT EXECUTED 2019cd4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2019cd8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2019cdc: 12 bf ff 9a bne 2019b44 <== NOT EXECUTED 2019ce0: 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); 2019ce4: 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; 2019ce8: 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)) = 2019cec: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019cf0: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2019cf4: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2019cf8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2019cfc: 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)) = 2019d00: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2019d04: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 2019d08: 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; 2019d0c: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] <== NOT EXECUTED 2019d10: 81 c7 e0 08 ret <== NOT EXECUTED 2019d14: 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; 2019d18: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d1c: a0 04 20 01 inc %l0 2019d20: 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); 2019d24: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2019d28: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d2c: 84 08 bf f0 and %g2, -16, %g2 2019d30: 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))) | 2019d34: c2 07 bf fc ld [ %fp + -4 ], %g1 2019d38: 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)) = 2019d3c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 2019d40: b4 10 80 1a or %g2, %i2, %i2 2019d44: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 2019d48: 81 c7 e0 08 ret 2019d4c: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d50: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019d54: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d58: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2019d5c: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 2019d60: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2019d64: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2019d68: 10 80 00 0e b 2019da0 <== NOT EXECUTED 2019d6c: 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)); 2019d70: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019d74: 7f ff fe ea call 201991c <== NOT EXECUTED 2019d78: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019d7c: 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)); 2019d80: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2019d84: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED 2019d88: 7f ff fe e5 call 201991c <== NOT EXECUTED 2019d8c: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2019d90: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 2019d94: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 2019d98: 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)) = 2019d9c: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 2019da0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2019da4: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 2019da8: 81 c7 e0 08 ret <== NOT EXECUTED 2019dac: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2019db0: 40 00 05 7a call 201b398 <__errno> <== NOT EXECUTED 2019db4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019db8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019dbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2019dc0: 81 c7 e0 08 ret <== NOT EXECUTED 2019dc4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013010 : * 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) { 2013010: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2013014: 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) { 2013018: 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) 201301c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 2013020: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 2013024: 02 80 00 08 be 2013044 <== NOT EXECUTED 2013028: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 201302c: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2013030: 7f ff ff db call 2012f9c <== NOT EXECUTED 2013034: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2013038: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 201303c: 32 80 00 02 bne,a 2013044 <== NOT EXECUTED 2013040: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 2013044: 7f ff fe a5 call 2012ad8 <== NOT EXECUTED 2013048: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 201304c: 7f ff f9 35 call 2011520 <== NOT EXECUTED 2013050: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 2013054: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013058: 32 80 00 02 bne,a 2013060 <== NOT EXECUTED 201305c: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 2013060: 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; 2013064: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013068: 10 80 00 04 b 2013078 <== NOT EXECUTED 201306c: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 2013070: 7f ff ca ff call 2005c6c <== NOT EXECUTED 2013074: 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 ); 2013078: 7f ff de a1 call 200aafc <_Chain_Get> <== NOT EXECUTED 201307c: 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 ) 2013080: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013084: 12 bf ff fb bne 2013070 <== NOT EXECUTED 2013088: 01 00 00 00 nop <== NOT EXECUTED 201308c: 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++) 2013090: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 2013094: 32 bf ff f5 bne,a 2013068 <== NOT EXECUTED 2013098: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED 201309c: 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; 20130a0: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 20130a4: 10 80 00 04 b 20130b4 <== NOT EXECUTED 20130a8: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20130ac: 7f ff ca f0 call 2005c6c <== NOT EXECUTED 20130b0: 01 00 00 00 nop <== NOT EXECUTED 20130b4: 7f ff de 92 call 200aafc <_Chain_Get> <== NOT EXECUTED 20130b8: 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 ) 20130bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20130c0: 12 bf ff fb bne 20130ac <== NOT EXECUTED 20130c4: 01 00 00 00 nop <== NOT EXECUTED 20130c8: 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++) 20130cc: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20130d0: 32 bf ff f5 bne,a 20130a4 <== NOT EXECUTED 20130d4: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 20130d8: 7f ff ca e5 call 2005c6c <== NOT EXECUTED 20130dc: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20130e0: 7f ff ca e3 call 2005c6c <== NOT EXECUTED 20130e4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 20130e8: 7f ff ca e1 call 2005c6c <== NOT EXECUTED 20130ec: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 20130f0: 7f ff ca df call 2005c6c <== NOT EXECUTED 20130f4: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 20130f8: 7f ff c7 3a call 2004de0 <== NOT EXECUTED 20130fc: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 2013100: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013104: 02 80 00 06 be 201311c <== NOT EXECUTED 2013108: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 201310c: 40 00 20 a3 call 201b398 <__errno> <== NOT EXECUTED 2013110: 01 00 00 00 nop <== NOT EXECUTED 2013114: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2013118: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 201311c: 81 c7 e0 08 ret <== NOT EXECUTED 2013120: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 020191ac : int fcntl( int fd, int cmd, ... ) { 20191ac: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 20191b0: 05 00 80 6f sethi %hi(0x201bc00), %g2 20191b4: c6 00 a0 c0 ld [ %g2 + 0xc0 ], %g3 ! 201bcc0 ... ) { int ret; va_list ap; va_start( ap, cmd ); 20191b8: 82 07 a0 4c add %fp, 0x4c, %g1 20191bc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 20191c0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20191c4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20191c8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 20191cc: 80 a6 00 03 cmp %i0, %g3 20191d0: 1a 80 00 0a bcc 20191f8 20191d4: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 20191d8: 05 00 80 71 sethi %hi(0x201c400), %g2 20191dc: c4 00 a3 14 ld [ %g2 + 0x314 ], %g2 ! 201c714 20191e0: bb 2e 20 06 sll %i0, 6, %i5 20191e4: ba 00 80 1d add %g2, %i5, %i5 rtems_libio_check_is_open(iop); 20191e8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 20191ec: 80 8a 21 00 btst 0x100, %o0 20191f0: 12 80 00 06 bne 2019208 20191f4: 80 a6 60 09 cmp %i1, 9 20191f8: 7f ff d5 18 call 200e658 <__errno> 20191fc: 01 00 00 00 nop 2019200: 10 80 00 40 b 2019300 2019204: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2019208: 18 80 00 3b bgu 20192f4 201920c: 89 2e 60 02 sll %i1, 2, %g4 2019210: 39 00 80 64 sethi %hi(0x2019000), %i4 2019214: b8 17 21 84 or %i4, 0x184, %i4 ! 2019184 <_calloc_r+0x14> 2019218: c8 07 00 04 ld [ %i4 + %g4 ], %g4 201921c: 81 c1 00 00 jmp %g4 2019220: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2019224: c2 00 40 00 ld [ %g1 ], %g1 if ( fd2 ) 2019228: 80 a0 60 00 cmp %g1, 0 201922c: 02 80 00 07 be 2019248 2019230: 80 a0 40 03 cmp %g1, %g3 diop = rtems_libio_iop( fd2 ); 2019234: 1a 80 00 0a bcc 201925c <== NEVER TAKEN 2019238: b8 10 20 00 clr %i4 201923c: b9 28 60 06 sll %g1, 6, %i4 2019240: 10 80 00 07 b 201925c 2019244: b8 00 80 1c add %g2, %i4, %i4 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2019248: 7f ff a9 17 call 20036a4 201924c: 01 00 00 00 nop if ( diop == 0 ) { 2019250: b8 92 20 00 orcc %o0, 0, %i4 2019254: 02 80 00 3d be 2019348 <== NEVER TAKEN 2019258: 01 00 00 00 nop ret = -1; break; } } diop->flags = iop->flags; 201925c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 diop->pathinfo = iop->pathinfo; 2019260: 90 07 20 1c add %i4, 0x1c, %o0 ret = -1; break; } } diop->flags = iop->flags; 2019264: c2 27 20 18 st %g1, [ %i4 + 0x18 ] diop->pathinfo = iop->pathinfo; 2019268: 92 07 60 1c add %i5, 0x1c, %o1 201926c: 7f ff d8 78 call 200f44c 2019270: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 2019274: 03 00 80 71 sethi %hi(0x201c400), %g1 2019278: f0 00 63 14 ld [ %g1 + 0x314 ], %i0 ! 201c714 201927c: b8 27 00 18 sub %i4, %i0, %i4 2019280: 10 80 00 22 b 2019308 2019284: b1 3f 20 06 sra %i4, 6, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2019288: 90 0a 28 00 and %o0, 0x800, %o0 201928c: 80 a0 00 08 cmp %g0, %o0 2019290: 10 80 00 21 b 2019314 2019294: 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 ) ) 2019298: c2 00 40 00 ld [ %g1 ], %g1 201929c: 80 a0 60 00 cmp %g1, 0 20192a0: 22 80 00 0e be,a 20192d8 20192a4: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 20192a8: 10 80 00 0c b 20192d8 20192ac: 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 ); 20192b0: 7f ff a8 e7 call 200364c 20192b4: 01 00 00 00 nop 20192b8: 10 80 00 14 b 2019308 20192bc: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 20192c0: 7f ff a8 d6 call 2003618 20192c4: 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); 20192c8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 20192cc: 90 0a 22 01 and %o0, 0x201, %o0 20192d0: 82 08 7d fe and %g1, -514, %g1 20192d4: 90 12 00 01 or %o0, %g1, %o0 20192d8: 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; 20192dc: 10 80 00 0e b 2019314 20192e0: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 20192e4: 7f ff d4 dd call 200e658 <__errno> 20192e8: 01 00 00 00 nop 20192ec: 10 80 00 05 b 2019300 20192f0: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 20192f4: 7f ff d4 d9 call 200e658 <__errno> 20192f8: 01 00 00 00 nop 20192fc: 82 10 20 16 mov 0x16, %g1 ! 16 2019300: 10 80 00 12 b 2019348 2019304: 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) { 2019308: 80 a6 20 00 cmp %i0, 0 201930c: 06 80 00 0d bl 2019340 <== NEVER TAKEN 2019310: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2019314: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 2019318: 92 10 00 1d mov %i5, %o1 201931c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2019320: 9f c0 40 00 call %g1 2019324: 90 10 00 19 mov %i1, %o0 if (err) { 2019328: ba 92 20 00 orcc %o0, 0, %i5 201932c: 02 80 00 05 be 2019340 <== ALWAYS TAKEN 2019330: 01 00 00 00 nop errno = err; 2019334: 7f ff d4 c9 call 200e658 <__errno> <== NOT EXECUTED 2019338: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 201933c: 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; } 2019340: 81 c7 e0 08 ret 2019344: 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); 2019348: 81 c7 e0 08 ret 201934c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200cae4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cae4: 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) { 200cae8: 37 00 80 7e sethi %hi(0x201f800), %i3 200caec: c2 06 e1 90 ld [ %i3 + 0x190 ], %g1 ! 201f990 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200caf0: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200caf4: 80 a0 60 00 cmp %g1, 0 200caf8: 12 80 00 1a bne 200cb60 200cafc: b8 16 e1 90 or %i3, 0x190, %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 ); 200cb00: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb04: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 201fb10 200cb08: 92 10 20 00 clr %o1 200cb0c: 7f ff ed 54 call 200805c 200cb10: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200cb14: c2 06 e1 90 ld [ %i3 + 0x190 ], %g1 200cb18: 80 a0 60 00 cmp %g1, 0 200cb1c: 12 80 00 0a bne 200cb44 <== NEVER TAKEN 200cb20: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200cb24: 11 14 12 54 sethi %hi(0x50495000), %o0 200cb28: 92 10 20 01 mov 1, %o1 200cb2c: 90 12 20 45 or %o0, 0x45, %o0 200cb30: 94 10 20 54 mov 0x54, %o2 200cb34: 96 10 20 00 clr %o3 200cb38: 7f ff ec af call 2007df4 200cb3c: 98 10 00 1c mov %i4, %o4 200cb40: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200cb44: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb48: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 201fb10 200cb4c: 7f ff ed 8e call 2008184 200cb50: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200cb54: 80 a6 e0 00 cmp %i3, 0 200cb58: 12 80 00 e1 bne 200cedc 200cb5c: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200cb60: 03 00 80 7e sethi %hi(0x201f800), %g1 200cb64: d0 00 61 90 ld [ %g1 + 0x190 ], %o0 ! 201f990 200cb68: 92 10 20 00 clr %o1 200cb6c: 94 10 20 00 clr %o2 200cb70: 7f ff ed 3b call 200805c 200cb74: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200cb78: 80 a2 20 00 cmp %o0, 0 200cb7c: 12 80 00 d8 bne 200cedc <== NEVER TAKEN 200cb80: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200cb84: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200cb88: 80 a7 20 00 cmp %i4, 0 200cb8c: 32 80 00 44 bne,a 200cc9c 200cb90: 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)); 200cb94: 7f ff e0 49 call 2004cb8 200cb98: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200cb9c: b8 92 20 00 orcc %o0, 0, %i4 200cba0: 02 80 00 3c be 200cc90 200cba4: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200cba8: 40 00 0e 71 call 201056c 200cbac: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200cbb0: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200cbb4: 90 10 22 00 mov 0x200, %o0 200cbb8: 7f ff e0 40 call 2004cb8 200cbbc: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200cbc0: 80 a2 20 00 cmp %o0, 0 200cbc4: 02 80 00 31 be 200cc88 <== NEVER TAKEN 200cbc8: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200cbcc: 37 00 80 7c sethi %hi(0x201f000), %i3 200cbd0: d0 4e e2 0c ldsb [ %i3 + 0x20c ], %o0 ! 201f20c if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200cbd4: 35 14 12 5c sethi %hi(0x50497000), %i2 200cbd8: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200cbdc: 92 10 20 00 clr %o1 200cbe0: 90 12 00 01 or %o0, %g1, %o0 200cbe4: 94 10 20 00 clr %o2 200cbe8: 40 00 04 0f call 200dc24 200cbec: 96 07 20 2c add %i4, 0x2c, %o3 200cbf0: 80 a2 20 00 cmp %o0, 0 200cbf4: 12 80 00 23 bne 200cc80 200cbf8: d0 4e e2 0c ldsb [ %i3 + 0x20c ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200cbfc: 03 14 12 5d sethi %hi(0x50497400), %g1 200cc00: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200cc04: 92 10 20 00 clr %o1 200cc08: 90 12 00 01 or %o0, %g1, %o0 200cc0c: 94 10 20 00 clr %o2 200cc10: 40 00 04 05 call 200dc24 200cc14: 96 07 20 30 add %i4, 0x30, %o3 200cc18: 80 a2 20 00 cmp %o0, 0 200cc1c: 12 80 00 17 bne 200cc78 200cc20: d0 4e e2 0c ldsb [ %i3 + 0x20c ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200cc24: b4 16 a3 00 or %i2, 0x300, %i2 200cc28: 92 10 20 01 mov 1, %o1 200cc2c: 90 12 00 1a or %o0, %i2, %o0 200cc30: 94 10 20 10 mov 0x10, %o2 200cc34: 96 10 20 00 clr %o3 200cc38: 7f ff ec 6f call 2007df4 200cc3c: 98 07 20 28 add %i4, 0x28, %o4 200cc40: 80 a2 20 00 cmp %o0, 0 200cc44: 12 80 00 0b bne 200cc70 200cc48: c2 0e e2 0c ldub [ %i3 + 0x20c ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200cc4c: 84 00 60 01 add %g1, 1, %g2 200cc50: 83 28 60 18 sll %g1, 0x18, %g1 200cc54: 83 38 60 18 sra %g1, 0x18, %g1 200cc58: 80 a0 60 7a cmp %g1, 0x7a 200cc5c: 12 80 00 0f bne 200cc98 200cc60: c4 2e e2 0c stb %g2, [ %i3 + 0x20c ] c = 'a'; 200cc64: 82 10 20 61 mov 0x61, %g1 200cc68: 10 80 00 0c b 200cc98 200cc6c: c2 2e e2 0c stb %g1, [ %i3 + 0x20c ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200cc70: 40 00 04 1e call 200dce8 200cc74: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200cc78: 40 00 04 1c call 200dce8 200cc7c: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200cc80: 7f ff de 29 call 2004524 200cc84: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200cc88: 7f ff de 27 call 2004524 200cc8c: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200cc90: 10 80 00 13 b 200ccdc 200cc94: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cc98: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cc9c: 92 10 20 00 clr %o1 200cca0: 7f ff ec ef call 200805c 200cca4: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200cca8: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200ccac: 80 a0 00 08 cmp %g0, %o0 200ccb0: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200ccb4: 80 a0 60 00 cmp %g1, 0 200ccb8: 12 80 00 09 bne 200ccdc 200ccbc: b0 0e 3f fc and %i0, -4, %i0 if (err) 200ccc0: 80 a6 20 00 cmp %i0, 0 200ccc4: 22 80 00 06 be,a 200ccdc <== ALWAYS TAKEN 200ccc8: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200cccc: 7f ff ff 49 call 200c9f0 <== NOT EXECUTED 200ccd0: 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); 200ccd4: 10 80 00 03 b 200cce0 <== NOT EXECUTED 200ccd8: 03 00 80 7e sethi %hi(0x201f800), %g1 <== NOT EXECUTED 200ccdc: 03 00 80 7e sethi %hi(0x201f800), %g1 200cce0: 7f ff ed 29 call 2008184 200cce4: d0 00 61 90 ld [ %g1 + 0x190 ], %o0 ! 201f990 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200cce8: 80 a6 20 00 cmp %i0, 0 200ccec: 12 80 00 7c bne 200cedc 200ccf0: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200ccf4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ccf8: 82 08 60 06 and %g1, 6, %g1 200ccfc: 80 a0 60 04 cmp %g1, 4 200cd00: 02 80 00 2e be 200cdb8 200cd04: f8 07 40 00 ld [ %i5 ], %i4 200cd08: 80 a0 60 06 cmp %g1, 6 200cd0c: 02 80 00 56 be 200ce64 200cd10: 80 a0 60 02 cmp %g1, 2 200cd14: 12 80 00 6a bne 200cebc <== NEVER TAKEN 200cd18: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200cd1c: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200cd20: 82 00 60 01 inc %g1 200cd24: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200cd28: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cd2c: 84 00 60 01 add %g1, 1, %g2 200cd30: 80 a0 60 00 cmp %g1, 0 200cd34: 12 80 00 05 bne 200cd48 <== NEVER TAKEN 200cd38: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200cd3c: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200cd40: 40 00 04 13 call 200dd8c 200cd44: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200cd48: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cd4c: 80 a0 60 00 cmp %g1, 0 200cd50: 12 80 00 5b bne 200cebc 200cd54: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200cd58: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cd5c: 80 88 60 01 btst 1, %g1 200cd60: 12 80 00 57 bne 200cebc 200cd64: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200cd68: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200cd6c: 7f ff ed 06 call 2008184 200cd70: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200cd74: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cd78: 40 00 04 1c call 200dde8 200cd7c: 92 10 20 00 clr %o1 200cd80: 80 a2 20 00 cmp %o0, 0 200cd84: 12 80 00 52 bne 200cecc <== NEVER TAKEN 200cd88: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200cd8c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cd90: 7f ff ec b3 call 200805c 200cd94: 94 10 20 00 clr %o2 200cd98: 80 a2 20 00 cmp %o0, 0 200cd9c: 32 80 00 4d bne,a 200ced0 <== NEVER TAKEN 200cda0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200cda4: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cda8: 80 a6 c0 01 cmp %i3, %g1 200cdac: 02 bf ff f0 be 200cd6c <== NEVER TAKEN 200cdb0: 01 00 00 00 nop 200cdb4: 30 80 00 42 b,a 200cebc } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200cdb8: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200cdbc: 82 00 60 01 inc %g1 200cdc0: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200cdc4: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cdc8: 84 00 60 01 add %g1, 1, %g2 200cdcc: 80 a0 60 00 cmp %g1, 0 200cdd0: 12 80 00 05 bne 200cde4 <== NEVER TAKEN 200cdd4: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200cdd8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200cddc: 40 00 03 ec call 200dd8c 200cde0: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200cde4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200cde8: 80 a0 60 00 cmp %g1, 0 200cdec: 12 80 00 34 bne 200cebc 200cdf0: 01 00 00 00 nop 200cdf4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cdf8: 80 88 60 01 btst 1, %g1 200cdfc: 22 80 00 07 be,a 200ce18 200ce00: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200ce04: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ce08: 7f ff ec df call 2008184 200ce0c: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200ce10: 10 80 00 31 b 200ced4 200ce14: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200ce18: 7f ff ec db call 2008184 200ce1c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200ce20: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200ce24: 40 00 03 f1 call 200dde8 200ce28: 92 10 20 00 clr %o1 200ce2c: 80 a2 20 00 cmp %o0, 0 200ce30: 12 80 00 27 bne 200cecc <== NEVER TAKEN 200ce34: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200ce38: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ce3c: 7f ff ec 88 call 200805c 200ce40: 94 10 20 00 clr %o2 200ce44: 80 a2 20 00 cmp %o0, 0 200ce48: 32 80 00 22 bne,a 200ced0 <== NEVER TAKEN 200ce4c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200ce50: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ce54: 80 a6 c0 01 cmp %i3, %g1 200ce58: 02 bf ff f0 be 200ce18 <== NEVER TAKEN 200ce5c: 01 00 00 00 nop 200ce60: 30 80 00 17 b,a 200cebc } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200ce64: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ce68: 82 00 60 01 inc %g1 200ce6c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200ce70: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200ce74: 84 00 60 01 add %g1, 1, %g2 200ce78: 80 a0 60 00 cmp %g1, 0 200ce7c: 12 80 00 05 bne 200ce90 <== NEVER TAKEN 200ce80: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200ce84: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200ce88: 40 00 03 c1 call 200dd8c 200ce8c: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; 200ce90: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200ce94: 82 00 60 01 inc %g1 200ce98: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200ce9c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200cea0: 84 00 60 01 add %g1, 1, %g2 200cea4: 80 a0 60 00 cmp %g1, 0 200cea8: 12 80 00 05 bne 200cebc <== NEVER TAKEN 200ceac: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200ceb0: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200ceb4: 40 00 03 b6 call 200dd8c 200ceb8: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200cebc: 7f ff ec b2 call 2008184 200cec0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200cec4: 81 c7 e0 08 ret 200cec8: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200cecc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200ced0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200ced4: 7f ff fe d2 call 200ca1c 200ced8: 92 10 00 19 mov %i1, %o1 return err; } 200cedc: 81 c7 e0 08 ret 200cee0: 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 50 ld [ %g1 + 0x50 ], %g1 ! 2015c50 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 24 ld [ %g1 + 0x224 ], %g1 ! 2016624 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 6d call 200e720 <__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 3b call 200e720 <__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 00 or %g1, 0x300, %g1 ! 201b300 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 04 ld [ %g1 + 0x204 ], %g1 ! 201b604 <_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 48 ld [ %g1 + 0x48 ], %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 b0 ld [ %i5 + 0xb0 ], %o0 ! 201a8b0 2002e4c: 40 00 14 96 call 20080a4 <_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 b0 ld [ %i5 + 0xb0 ], %g1 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2002e64: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2002e68: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2002e6c: 40 00 03 7a call 2003c54 2002e70: 91 ee 21 38 restore %i0, 0x138, %o0 2002e74: 81 c7 e0 08 ret 2002e78: 81 e8 00 00 restore =============================================================================== 02006274 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2006274: 9d e3 bf a0 save %sp, -96, %sp rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2006278: 03 00 80 86 sethi %hi(0x2021800), %g1 200627c: 82 10 60 bc or %g1, 0xbc, %g1 ! 20218bc 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 54 ld [ %g1 + 0x254 ], %g2 ! 2018654 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 58 ld [ %g2 + 0x258 ], %g2 ! 2018658 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 =============================================================================== 02019418 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2019418: 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 ); 201941c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2019420: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201bcc0 2019424: 80 a6 00 01 cmp %i0, %g1 2019428: 1a 80 00 06 bcc 2019440 <== NEVER TAKEN 201942c: ba 10 20 00 clr %i5 2019430: 03 00 80 71 sethi %hi(0x201c400), %g1 2019434: fa 00 63 14 ld [ %g1 + 0x314 ], %i5 ! 201c714 2019438: b1 2e 20 06 sll %i0, 6, %i0 201943c: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 2019440: 92 07 60 1c add %i5, 0x1c, %o1 2019444: 94 10 20 14 mov 0x14, %o2 2019448: 7f ff d8 01 call 200f44c 201944c: 90 07 bf ec add %fp, -20, %o0 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 2019450: c2 07 bf f8 ld [ %fp + -8 ], %g1 2019454: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2019458: 9f c0 40 00 call %g1 201945c: 90 07 bf ec add %fp, -20, %o0 2019460: 80 a2 20 01 cmp %o0, 1 2019464: 22 80 00 08 be,a 2019484 2019468: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201946c: 7f ff d4 7b call 200e658 <__errno> 2019470: b0 10 3f ff mov -1, %i0 2019474: 82 10 20 14 mov 0x14, %g1 2019478: c2 22 00 00 st %g1, [ %o0 ] 201947c: 81 c7 e0 08 ret 2019480: 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 ); 2019484: 90 10 00 1d mov %i5, %o0 2019488: c2 00 60 08 ld [ %g1 + 8 ], %g1 201948c: 92 10 00 19 mov %i1, %o1 2019490: 9f c0 40 00 call %g1 2019494: 94 10 00 1a mov %i2, %o2 } 2019498: 81 c7 e0 08 ret 201949c: 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 80 call 200dc8c <__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 0d call 20072e4 <_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 ec call 2016a7c <.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 =============================================================================== 0200d3ac : 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 ) 200d3ac: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200d3b0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200d3b4: 80 a0 a0 01 cmp %g2, 1 200d3b8: 12 80 00 05 bne 200d3cc <== NEVER TAKEN 200d3bc: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 200d3c0: c0 22 20 10 clr [ %o0 + 0x10 ] 200d3c4: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 200d3c8: 82 10 20 00 clr %g1 } 200d3cc: 81 c3 e0 08 retl 200d3d0: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200d5d8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200d5d8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200d5dc: 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 ) ) 200d5e0: 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 ); 200d5e4: 82 07 60 54 add %i5, 0x54, %g1 200d5e8: 80 a0 80 01 cmp %g2, %g1 200d5ec: 22 80 00 06 be,a 200d604 200d5f0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 200d5f4: 40 00 01 a6 call 200dc8c <__errno> 200d5f8: 01 00 00 00 nop 200d5fc: 10 80 00 0d b 200d630 200d600: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 200d604: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200d608: 80 a0 40 1d cmp %g1, %i5 200d60c: 02 80 00 06 be 200d624 200d610: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 200d614: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 200d618: 80 a0 60 00 cmp %g1, 0 200d61c: 02 80 00 08 be 200d63c <== ALWAYS TAKEN 200d620: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 200d624: 40 00 01 9a call 200dc8c <__errno> 200d628: 01 00 00 00 nop 200d62c: 82 10 20 10 mov 0x10, %g1 ! 10 200d630: c2 22 00 00 st %g1, [ %o0 ] 200d634: 81 c7 e0 08 ret 200d638: 91 e8 3f ff restore %g0, -1, %o0 IMFS_create_orphan( the_jnode ); 200d63c: 7f ff f6 24 call 200aecc 200d640: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 200d644: 90 10 00 1d mov %i5, %o0 200d648: 7f ff f6 33 call 200af14 200d64c: b0 10 20 00 clr %i0 return 0; } 200d650: 81 c7 e0 08 ret 200d654: 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 58 sethi %hi(0x2016000), %g1 2003484: c4 48 63 e8 ldsb [ %g1 + 0x3e8 ], %g2 ! 20163e8 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 63 e8 stb %g2, [ %g1 + 0x3e8 ] mkdir("/etc", 0777); 20034a0: 11 00 80 54 sethi %hi(0x2015000), %o0 20034a4: 40 00 02 53 call 2003df0 20034a8: 90 12 21 10 or %o0, 0x110, %o0 ! 2015110 /* * 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 18 or %i5, 0x118, %o0 20034b8: 40 00 2e 9c call 200ef28 20034bc: 92 12 61 28 or %o1, 0x128, %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 18 or %i5, 0x118, %o0 20034d0: 13 00 80 54 sethi %hi(0x2015000), %o1 20034d4: 40 00 2e 95 call 200ef28 20034d8: 92 12 61 30 or %o1, 0x130, %o1 ! 2015130 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 bb call 200efd8 20034f0: 90 12 21 38 or %o0, 0x138, %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 ad call 200e7ac 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 a0 or %i5, 0x1a0, %o0 200350c: 40 00 2e 87 call 200ef28 2003510: 92 12 61 28 or %o1, 0x128, %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 a0 or %i5, 0x1a0, %o0 2003524: 13 00 80 54 sethi %hi(0x2015000), %o1 2003528: 40 00 2e 80 call 200ef28 200352c: 92 12 61 30 or %o1, 0x130, %o1 ! 2015130 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 a5 call 200efd8 2003548: 90 12 21 b0 or %o0, 0x1b0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 200354c: 40 00 2c 98 call 200e7ac 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 54 ld [ %g1 + 0x354 ], %g1 ! 201ab54 <__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 61 cc ld [ %g1 + 0x1cc ], %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 =============================================================================== 02018248 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 2018248: 81 c3 e0 08 retl <== NOT EXECUTED 201824c: 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 04 ld [ %g1 + 0x204 ], %g1 ! 201b604 <_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 48 ld [ %g1 + 0x148 ], %i5 ! 2019d48 <_global_impure_ptr> 200368c: c2 07 23 58 ld [ %i4 + 0x358 ], %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 b8 call 200e97c <_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 58 st %i5, [ %i4 + 0x358 ] * * 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 58 ld [ %i5 + 0x358 ], %g1 ! 201ab58 <_impure_ptr> 20036b0: 40 00 29 c9 call 200ddd4 20036b4: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20036b8: c2 07 63 58 ld [ %i5 + 0x358 ], %g1 20036bc: 40 00 29 c6 call 200ddd4 20036c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20036c4: c2 07 63 58 ld [ %i5 + 0x358 ], %g1 20036c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20036cc: 40 00 29 c2 call 200ddd4 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 00 or %g1, 0x300, %g1 ! 201b300 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 04 ld [ %g1 + 0x204 ], %g1 ! 201b604 <_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 b0 ld [ %g1 + 0xb0 ], %o0 ! 201a8b0 20031a0: 92 10 00 1d mov %i5, %o1 20031a4: 94 10 20 00 clr %o2 20031a8: 40 00 13 b1 call 200806c <_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 44 ld [ %g1 + 0x44 ], %g1 ! 201b044 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 a9 call 200dc8c <__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 40 ld [ %g1 + 0x40 ], %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 48 ld [ %g1 + 0x48 ], %g1 ! 201b048 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 48 ld [ %g1 + 0x48 ], %i5 ! 2015048 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 bb call 2011248 <.udiv> 2002f60: 90 06 00 1d add %i0, %i5, %o0 2002f64: 40 00 38 7f call 2011160 <.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 b0 ld [ %i4 + 0xb0 ], %o0 ! 20144b0 2002f88: 40 00 13 4e call 2007cc0 <_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 f0 call 200db64 <__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 b0 ld [ %i4 + 0xb0 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2002fc0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 2002fc4: b4 10 20 00 clr %i2 2002fc8: ba 07 40 02 add %i5, %g2, %i5 2002fcc: fa 20 60 18 st %i5, [ %g1 + 0x18 ] 2002fd0: 40 00 13 2e call 2007c88 <_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 48 st %i1, [ %g1 + 0x48 ] ! 2015048 * 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 =============================================================================== 0200d080 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d080: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d084: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200d088: 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 ) 200d08c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d090: 80 a0 40 19 cmp %g1, %i1 200d094: 06 80 00 09 bl 200d0b8 <== NEVER TAKEN 200d098: 94 10 00 1a mov %i2, %o2 200d09c: 80 a0 40 19 cmp %g1, %i1 200d0a0: 32 80 00 0a bne,a 200d0c8 200d0a4: d2 27 60 50 st %o1, [ %i5 + 0x50 ] 200d0a8: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200d0ac: 80 a0 40 1a cmp %g1, %i2 200d0b0: 3a 80 00 06 bcc,a 200d0c8 200d0b4: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200d0b8: 7f ff ff 01 call 200ccbc 200d0bc: 90 10 00 1d mov %i5, %o0 200d0c0: 81 c7 e0 08 ret 200d0c4: 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; 200d0c8: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200d0cc: d2 26 20 08 st %o1, [ %i0 + 8 ] 200d0d0: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200d0d4: 90 07 bf f8 add %fp, -8, %o0 200d0d8: 7f ff d7 69 call 2002e7c 200d0dc: 92 10 20 00 clr %o1 200d0e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d0e4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200d0e8: 81 c7 e0 08 ret 200d0ec: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d0f0 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200d0f0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200d0f4: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 if (the_jnode->type == IMFS_LINEAR_FILE) { 200d0f8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d0fc: 80 a0 60 06 cmp %g1, 6 200d100: 32 80 00 11 bne,a 200d144 200d104: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200d108: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200d10c: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200d110: 80 a0 c0 01 cmp %g3, %g1 200d114: 14 80 00 09 bg 200d138 <== NEVER TAKEN 200d118: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200d11c: 80 a0 c0 01 cmp %g3, %g1 200d120: 32 80 00 19 bne,a 200d184 <== NEVER TAKEN 200d124: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200d128: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200d12c: 80 a0 c0 02 cmp %g3, %g2 200d130: 28 80 00 15 bleu,a 200d184 <== ALWAYS TAKEN 200d134: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200d138: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200d13c: 10 80 00 11 b 200d180 <== NOT EXECUTED 200d140: 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 )) 200d144: 90 10 00 1d mov %i5, %o0 200d148: 92 10 00 02 mov %g2, %o1 200d14c: 7f ff fe dc call 200ccbc 200d150: 94 10 00 03 mov %g3, %o2 200d154: 80 a2 20 00 cmp %o0, 0 200d158: 22 80 00 09 be,a 200d17c 200d15c: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200d160: 40 00 02 cb call 200dc8c <__errno> 200d164: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200d168: 82 10 20 1c mov 0x1c, %g1 200d16c: c2 22 00 00 st %g1, [ %o0 ] 200d170: b0 16 23 ff or %i0, 0x3ff, %i0 200d174: 81 c7 e0 08 ret 200d178: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200d17c: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200d180: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200d184: 81 c7 e0 08 ret 200d188: 81 e8 00 00 restore =============================================================================== 0200cfe4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200cfe4: 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)) 200cfe8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200cfec: 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)) 200cff0: 80 88 62 04 btst 0x204, %g1 200cff4: 02 80 00 19 be 200d058 200cff8: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200cffc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d000: 80 a0 60 06 cmp %g1, 6 200d004: 32 80 00 16 bne,a 200d05c <== ALWAYS TAKEN 200d008: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200d00c: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200d010: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200d014: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200d018: 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; 200d01c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; 200d020: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200d024: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200d028: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200d02c: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200d030: 02 80 00 0a be 200d058 <== NOT EXECUTED 200d034: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200d038: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d03c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d040: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d044: 7f ff ff 75 call 200ce18 <== NOT EXECUTED 200d048: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200d04c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200d050: 02 80 00 0a be 200d078 <== NOT EXECUTED 200d054: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200d058: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200d05c: 80 88 62 00 btst 0x200, %g1 200d060: 02 80 00 04 be 200d070 200d064: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200d068: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200d06c: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200d070: 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; 200d074: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200d078: 81 c7 e0 08 ret 200d07c: 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 8b call 200b5fc 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 2a call 200dc8c <__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 40 or %l3, 0x40, %l3 ! 2019040 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 200340c: 40 00 2f b8 call 200f2ec 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 b2 call 200f2ec 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 af call 200f2ec 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 64 call 200e5fc 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 5e call 200e5fc 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 58 call 200e5fc 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 50 call 200e5fc 20034c0: 92 12 61 70 or %o1, 0x170, %o1 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 20034c4: 80 8c 20 ff btst 0xff, %l0 20034c8: 02 80 00 37 be 20035a4 20034cc: 03 00 80 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 ed call 200dc8c <__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 d9 call 200dc8c <__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 cf call 200dc8c <__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 b4 ld [ %g1 + 0x1b4 ], %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 b4 or %g1, 0x1b4, %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 b4 call 200dc8c <__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 b4 or %o0, 0x1b4, %o0 ! 201a9b4 2003610: 03 00 80 6c sethi %hi(0x201b000), %g1 2003614: 40 00 0b ed call 20065c8 2003618: d0 00 62 f0 ld [ %g1 + 0x2f0 ], %o0 ! 201b2f0 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 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 201a9d4 200362c: 92 07 60 1c add %i5, 0x1c, %o1 2003630: 94 10 20 14 mov 0x14, %o2 2003634: 40 00 2b f2 call 200e5fc 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 7e call 200dadc <__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 =============================================================================== 02016cec : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2016cec: 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; 2016cf0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 2016cf4: 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; 2016cf8: 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; 2016cfc: 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); 2016d00: 92 10 20 00 clr %o1 2016d04: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2016d08: c2 27 bf f4 st %g1, [ %fp + -12 ] 2016d0c: 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; 2016d10: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 2016d14: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 2016d18: 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; 2016d1c: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 2016d20: 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); 2016d24: 40 00 14 a8 call 201bfc4 2016d28: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2016d2c: 92 10 20 00 clr %o1 2016d30: 94 10 20 40 mov 0x40, %o2 2016d34: 40 00 14 a4 call 201bfc4 2016d38: 90 07 bf 68 add %fp, -152, %o0 name_type = msdos_long_to_short (name, name_len, 2016d3c: 92 10 00 1b mov %i3, %o1 2016d40: 94 07 bf a8 add %fp, -88, %o2 2016d44: 96 10 20 0b mov 0xb, %o3 2016d48: 40 00 04 28 call 2017de8 2016d4c: 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) { 2016d50: 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, 2016d54: 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; 2016d58: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2016d5c: 90 10 20 00 clr %o0 2016d60: 40 00 22 57 call 201f6bc