=============================================================================== 02005a30 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2005a30: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2005a34: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 2005a38: b8 06 20 54 add %i0, 0x54, %i4 2005a3c: 35 00 80 95 sethi %hi(0x2025400), %i2 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005a40: 80 a7 40 1c cmp %i5, %i4 2005a44: 02 80 00 2f be 2005b00 2005a48: b4 16 a2 d8 or %i2, 0x2d8, %i2 2005a4c: 31 00 80 8d sethi %hi(0x2023400), %i0 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005a50: 27 00 80 8d sethi %hi(0x2023400), %l3 return; } puts(""); 2005a54: 21 00 80 8d sethi %hi(0x2023400), %l0 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005a58: 25 00 80 8d sethi %hi(0x2023400), %l2 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005a5c: 23 00 80 8d sethi %hi(0x2023400), %l1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2005a60: b0 16 21 50 or %i0, 0x150, %i0 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005a64: a6 14 e1 c0 or %l3, 0x1c0, %l3 return; } puts(""); 2005a68: a0 14 20 e8 or %l0, 0xe8, %l0 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005a6c: a4 14 a1 a8 or %l2, 0x1a8, %l2 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005a70: a2 14 61 90 or %l1, 0x190, %l1 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 2005a74: 80 a6 60 00 cmp %i1, 0 2005a78: 06 80 00 0c bl 2005aa8 <== NEVER TAKEN 2005a7c: b6 10 20 00 clr %i3 fprintf(stdout, "...." ); 2005a80: c2 06 80 00 ld [ %i2 ], %g1 2005a84: 90 10 00 18 mov %i0, %o0 2005a88: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005a8c: 92 10 20 01 mov 1, %o1 2005a90: 40 00 40 21 call 2015b14 2005a94: 94 10 20 04 mov 4, %o2 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 2005a98: b6 06 e0 01 inc %i3 2005a9c: 80 a6 40 1b cmp %i1, %i3 2005aa0: 36 bf ff f9 bge,a 2005a84 2005aa4: c2 06 80 00 ld [ %i2 ], %g1 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 2005aa8: c2 06 80 00 ld [ %i2 ], %g1 2005aac: 90 07 60 0c add %i5, 0xc, %o0 2005ab0: 40 00 3c f7 call 2014e8c 2005ab4: d2 00 60 08 ld [ %g1 + 8 ], %o1 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 2005ab8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2005abc: d4 00 40 00 ld [ %g1 ], %o2 switch( IMFS_type( the_jnode ) ) { 2005ac0: 80 a2 a0 06 cmp %o2, 6 2005ac4: 28 80 00 11 bleu,a 2005b08 <== ALWAYS TAKEN 2005ac8: 95 2a a0 02 sll %o2, 2, %o2 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005acc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005ad0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 2005ad4: 40 00 3c 9d call 2014d48 <== NOT EXECUTED 2005ad8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 2005adc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 2005ae0: c2 00 40 00 ld [ %g1 ], %g1 2005ae4: 80 a0 60 00 cmp %g1, 0 2005ae8: 22 80 00 19 be,a 2005b4c 2005aec: 90 10 00 1d mov %i5, %o0 the_chain = &the_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 ) { 2005af0: fa 07 40 00 ld [ %i5 ], %i5 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005af4: 80 a7 40 1c cmp %i5, %i4 2005af8: 12 bf ff e0 bne 2005a78 2005afc: 80 a6 60 00 cmp %i1, 0 2005b00: 81 c7 e0 08 ret 2005b04: 81 e8 00 00 restore ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { 2005b08: 03 00 80 16 sethi %hi(0x2005800), %g1 2005b0c: 82 10 62 14 or %g1, 0x214, %g1 ! 2005a14 2005b10: c2 00 40 0a ld [ %g1 + %o2 ], %g1 2005b14: 81 c0 40 00 jmp %g1 2005b18: 01 00 00 00 nop case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005b1c: c2 06 80 00 ld [ %i2 ], %g1 2005b20: 90 10 00 11 mov %l1, %o0 2005b24: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005b28: 92 10 20 01 mov 1, %o1 2005b2c: 40 00 3f fa call 2015b14 2005b30: 94 10 20 13 mov 0x13, %o2 2005b34: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 2005b38: c2 00 40 00 ld [ %g1 ], %g1 2005b3c: 80 a0 60 00 cmp %g1, 0 2005b40: 32 bf ff ed bne,a 2005af4 <== ALWAYS TAKEN 2005b44: fa 07 40 00 ld [ %i5 ], %i5 IMFS_dump_directory( the_jnode, level + 1 ); 2005b48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005b4c: 7f ff ff b9 call 2005a30 2005b50: 92 06 60 01 add %i1, 1, %o1 the_chain = &the_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 ) { 2005b54: 10 bf ff e8 b 2005af4 2005b58: fa 07 40 00 ld [ %i5 ], %i5 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2005b5c: c2 06 80 00 ld [ %i2 ], %g1 2005b60: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005b64: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005b68: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 2005b6c: 13 00 80 8d sethi %hi(0x2023400), %o1 2005b70: 40 00 3c 76 call 2014d48 2005b74: 92 12 61 70 or %o1, 0x170, %o1 ! 2023570 default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 2005b78: 40 00 43 ef call 2016b34 2005b7c: 90 10 00 10 mov %l0, %o0 2005b80: 10 bf ff d8 b 2005ae0 2005b84: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2005b88: c2 06 80 00 ld [ %i2 ], %g1 2005b8c: d4 07 60 50 ld [ %i5 + 0x50 ], %o2 2005b90: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005b94: d6 07 60 54 ld [ %i5 + 0x54 ], %o3 2005b98: 13 00 80 8d sethi %hi(0x2023400), %o1 2005b9c: 40 00 3c 6b call 2014d48 2005ba0: 92 12 61 58 or %o1, 0x158, %o1 ! 2023558 2005ba4: 30 bf ff f5 b,a 2005b78 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2005ba8: c2 06 80 00 ld [ %i2 ], %g1 2005bac: 90 10 20 2f mov 0x2f, %o0 2005bb0: 40 00 3c 82 call 2014db8 2005bb4: d2 00 60 08 ld [ %g1 + 8 ], %o1 2005bb8: 30 bf ff f0 b,a 2005b78 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005bbc: c2 06 80 00 ld [ %i2 ], %g1 2005bc0: 90 10 00 12 mov %l2, %o0 2005bc4: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005bc8: 92 10 20 01 mov 1, %o1 2005bcc: 40 00 3f d2 call 2015b14 2005bd0: 94 10 20 12 mov 0x12, %o2 2005bd4: 10 bf ff c3 b 2005ae0 2005bd8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2005bdc: c2 06 80 00 ld [ %i2 ], %g1 2005be0: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005be4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005be8: 13 00 80 8d sethi %hi(0x2023400), %o1 2005bec: 40 00 3c 57 call 2014d48 2005bf0: 92 12 61 80 or %o1, 0x180, %o1 ! 2023580 2005bf4: 30 bf ff e1 b,a 2005b78 =============================================================================== 0200c10c : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200c10c: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; 200c110: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200c114: 90 10 00 18 mov %i0, %o0 200c118: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200c11c: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200c120: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200c124: ba 10 00 18 mov %i0, %i5 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 200c128: 92 10 20 01 mov 1, %o1 200c12c: 40 00 03 50 call 200ce6c 200c130: b0 10 20 01 mov 1, %i0 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200c134: 80 8a 20 ff btst 0xff, %o0 200c138: 02 80 00 36 be 200c210 200c13c: 80 a6 e0 01 cmp %i3, 1 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 200c140: 02 80 00 3c be 200c230 200c144: 80 a6 e0 02 cmp %i3, 2 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200c148: 22 80 00 5a be,a 200c2b0 200c14c: c2 4e 80 00 ldsb [ %i2 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200c150: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); 200c154: b0 07 20 54 add %i4, 0x54, %i0 while ( current != tail ) { 200c158: 80 a6 40 18 cmp %i1, %i0 200c15c: 02 80 00 33 be 200c228 200c160: 90 06 60 0c add %i1, 0xc, %o0 IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 200c164: 92 10 00 1a mov %i2, %o1 200c168: 40 00 16 f9 call 2011d4c 200c16c: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200c170: 80 a2 20 00 cmp %o0, 0 200c174: 12 80 00 29 bne 200c218 200c178: 82 06 40 1b add %i1, %i3, %g1 200c17c: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200c180: 80 a0 60 00 cmp %g1, 0 200c184: 32 80 00 26 bne,a 200c21c 200c188: f2 06 40 00 ld [ %i1 ], %i1 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 200c18c: 80 a6 60 00 cmp %i1, 0 200c190: 02 80 00 20 be 200c210 200c194: b0 10 20 02 mov 2, %i0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 200c198: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 200c19c: c4 07 60 04 ld [ %i5 + 4 ], %g2 200c1a0: c2 00 40 00 ld [ %g1 ], %g1 200c1a4: 80 a0 00 02 cmp %g0, %g2 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 200c1a8: c0 27 60 0c clr [ %i5 + 0xc ] 200c1ac: b0 60 3f ff subx %g0, -1, %i0 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 200c1b0: 80 a0 60 02 cmp %g1, 2 200c1b4: 02 80 00 37 be 200c290 200c1b8: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200c1bc: 80 a0 60 03 cmp %g1, 3 200c1c0: 02 80 00 22 be 200c248 200c1c4: 80 a0 60 00 cmp %g1, 0 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 200c1c8: 32 80 00 26 bne,a 200c260 200c1cc: b0 0e 20 ff and %i0, 0xff, %i0 if ( node->info.directory.mt_fs != NULL ) { 200c1d0: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 200c1d4: 80 a0 60 00 cmp %g1, 0 200c1d8: 02 80 00 48 be 200c2f8 200c1dc: 90 10 00 1d mov %i5, %o0 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200c1e0: d4 06 60 30 ld [ %i1 + 0x30 ], %o2 200c1e4: d6 16 60 3c lduh [ %i1 + 0x3c ], %o3 200c1e8: d8 16 60 3e lduh [ %i1 + 0x3e ], %o4 { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root; 200c1ec: b8 00 60 18 add %g1, 0x18, %i4 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200c1f0: 92 10 20 01 mov 1, %o1 200c1f4: 40 00 03 1e call 200ce6c 200c1f8: b0 10 20 01 mov 1, %i0 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200c1fc: 80 8a 20 ff btst 0xff, %o0 200c200: 02 80 00 04 be 200c210 <== NEVER TAKEN 200c204: 90 10 00 1d mov %i5, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200c208: 7f ff e2 e0 call 2004d88 200c20c: 92 10 00 1c mov %i4, %o1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200c210: 81 c7 e0 08 ret 200c214: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 200c218: f2 06 40 00 ld [ %i1 ], %i1 } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { 200c21c: 80 a6 00 19 cmp %i0, %i1 200c220: 12 bf ff d1 bne 200c164 200c224: 90 06 60 0c add %i1, 0xc, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 200c228: 81 c7 e0 08 ret 200c22c: 91 e8 20 02 restore %g0, 2, %o0 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 200c230: c2 4e 80 00 ldsb [ %i2 ], %g1 200c234: 80 a0 60 2e cmp %g1, 0x2e 200c238: 32 bf ff c7 bne,a 200c154 200c23c: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200c240: 10 bf ff d3 b 200c18c 200c244: b2 10 00 1c mov %i4, %i1 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200c248: 80 88 a0 10 btst 0x10, %g2 200c24c: 32 80 00 22 bne,a 200c2d4 200c250: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 200c254: b0 8e 20 ff andcc %i0, 0xff, %i0 200c258: 22 80 00 1f be,a 200c2d4 200c25c: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 200c260: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 200c264: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 200c268: 84 00 bf ff add %g2, -1, %g2 200c26c: c4 37 20 34 sth %g2, [ %i4 + 0x34 ] ++entry->reference_count; 200c270: c4 16 60 34 lduh [ %i1 + 0x34 ], %g2 200c274: c2 00 60 04 ld [ %g1 + 4 ], %g1 200c278: 84 00 a0 01 inc %g2 200c27c: c4 36 60 34 sth %g2, [ %i1 + 0x34 ] currentloc->node_access = entry; 200c280: f2 27 60 20 st %i1, [ %i5 + 0x20 ] 200c284: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 200c288: 81 c7 e0 08 ret 200c28c: 81 e8 00 00 restore bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 200c290: 80 88 a0 08 btst 8, %g2 200c294: 12 80 00 05 bne 200c2a8 200c298: b0 0e 20 ff and %i0, 0xff, %i0 200c29c: 80 a6 20 00 cmp %i0, 0 200c2a0: 32 bf ff f1 bne,a 200c264 <== ALWAYS TAKEN 200c2a4: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2 entry = entry->info.hard_link.link_node; 200c2a8: 10 bf ff ee b 200c260 200c2ac: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200c2b0: 80 a0 60 2e cmp %g1, 0x2e 200c2b4: 32 bf ff a8 bne,a 200c154 200c2b8: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200c2bc: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200c2c0: 80 a0 60 2e cmp %g1, 0x2e 200c2c4: 32 bf ff a4 bne,a 200c154 <== NEVER TAKEN 200c2c8: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 <== NOT EXECUTED { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; 200c2cc: 10 bf ff b0 b 200c18c 200c2d0: f2 07 20 08 ld [ %i4 + 8 ], %i1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200c2d4: b0 10 20 01 mov 1, %i0 } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { const char *target = entry->info.sym_link.name; rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 200c2d8: 40 00 16 6c call 2011c88 200c2dc: 90 10 00 1c mov %i4, %o0 200c2e0: 92 10 00 1c mov %i4, %o1 200c2e4: 94 10 00 08 mov %o0, %o2 200c2e8: 7f ff e2 c0 call 2004de8 200c2ec: 90 10 00 1d mov %i5, %o0 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200c2f0: 81 c7 e0 08 ret 200c2f4: 81 e8 00 00 restore 200c2f8: 10 bf ff da b 200c260 200c2fc: b0 0e 20 ff and %i0, 0xff, %i0 =============================================================================== 02003ab4 : static off_t IMFS_fifo_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2003ab4: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 2003ab8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2003abc: 92 10 00 19 mov %i1, %o1 2003ac0: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2003ac4: 98 10 00 18 mov %i0, %o4 2003ac8: 94 10 00 1a mov %i2, %o2 2003acc: 40 00 2d b5 call 200f1a0 2003ad0: 96 10 00 1b mov %i3, %o3 2003ad4: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 2003ad8: 80 a6 20 00 cmp %i0, 0 2003adc: 06 80 00 04 bl 2003aec <== ALWAYS TAKEN 2003ae0: b2 10 00 08 mov %o0, %i1 } 2003ae4: 81 c7 e0 08 ret <== NOT EXECUTED 2003ae8: 81 e8 00 00 restore <== NOT EXECUTED off_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 2003aec: 40 00 3b 38 call 20127cc <__errno> 2003af0: 31 3f ff ff sethi %hi(0xfffffc00), %i0 2003af4: 82 20 00 19 neg %i1, %g1 2003af8: c2 22 00 00 st %g1, [ %o0 ] 2003afc: b0 16 23 ff or %i0, 0x3ff, %i0 } 2003b00: 81 c7 e0 08 ret 2003b04: 93 e8 00 18 restore %g0, %i0, %o1 =============================================================================== 02003b08 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2003b08: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2003b0c: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2003b10: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 2003b14: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 2003b18: 92 10 00 19 mov %i1, %o1 2003b1c: 40 00 2d 03 call 200ef28 2003b20: 94 10 00 1a mov %i2, %o2 if (err > 0) { 2003b24: b0 92 20 00 orcc %o0, 0, %i0 2003b28: 04 80 00 09 ble 2003b4c 2003b2c: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 2003b30: 40 00 04 56 call 2004c88 2003b34: 92 10 20 00 clr %o1 2003b38: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003b3c: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2003b40: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003b44: 81 c7 e0 08 ret 2003b48: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003b4c: 80 a6 20 00 cmp %i0, 0 2003b50: 12 80 00 04 bne 2003b60 <== ALWAYS TAKEN 2003b54: 01 00 00 00 nop } 2003b58: 81 c7 e0 08 ret <== NOT EXECUTED 2003b5c: 81 e8 00 00 restore <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 2003b60: 40 00 3b 1b call 20127cc <__errno> 2003b64: 01 00 00 00 nop 2003b68: 82 20 00 18 neg %i0, %g1 2003b6c: c2 22 00 00 st %g1, [ %o0 ] } 2003b70: 81 c7 e0 08 ret 2003b74: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200c38c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200c38c: 9d e3 bf 80 save %sp, -128, %sp /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 200c390: c6 06 20 18 ld [ %i0 + 0x18 ], %g3 200c394: c8 00 e0 08 ld [ %g3 + 8 ], %g4 200c398: d4 00 c0 00 ld [ %g3 ], %o2 200c39c: d6 00 e0 04 ld [ %g3 + 4 ], %o3 200c3a0: d8 00 e0 0c ld [ %g3 + 0xc ], %o4 200c3a4: da 00 e0 10 ld [ %g3 + 0x10 ], %o5 200c3a8: de 00 e0 14 ld [ %g3 + 0x14 ], %o7 200c3ac: f8 00 e0 18 ld [ %g3 + 0x18 ], %i4 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c3b0: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; jnode = (IMFS_jnode_t *)loc.node_access; 200c3b4: ba 10 00 04 mov %g4, %i5 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c3b8: c4 00 40 00 ld [ %g1 ], %g2 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 200c3bc: d4 27 bf e4 st %o2, [ %fp + -28 ] 200c3c0: d6 27 bf e8 st %o3, [ %fp + -24 ] 200c3c4: c8 27 bf ec st %g4, [ %fp + -20 ] 200c3c8: d8 27 bf f0 st %o4, [ %fp + -16 ] 200c3cc: da 27 bf f4 st %o5, [ %fp + -12 ] 200c3d0: de 27 bf f8 st %o7, [ %fp + -8 ] 200c3d4: f8 27 bf fc st %i4, [ %fp + -4 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c3d8: c0 20 e0 08 clr [ %g3 + 8 ] 200c3dc: c2 00 60 04 ld [ %g1 + 4 ], %g1 do { next = jnode->Parent; 200c3e0: f8 07 60 08 ld [ %i5 + 8 ], %i4 loc.node_access = (void *)jnode; 200c3e4: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200c3e8: 80 a0 a0 00 cmp %g2, 0 200c3ec: 12 80 00 1d bne 200c460 <== NEVER TAKEN 200c3f0: c2 27 bf f4 st %g1, [ %fp + -12 ] 200c3f4: 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 ); 200c3f8: 82 07 60 54 add %i5, 0x54, %g1 200c3fc: 80 a0 80 01 cmp %g2, %g1 200c400: 02 80 00 18 be 200c460 200c404: 80 a7 60 00 cmp %i5, 0 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); jnode = next; } if ( jnode != NULL ) { 200c408: 02 80 00 22 be 200c490 <== NEVER TAKEN 200c40c: 01 00 00 00 nop return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 200c410: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200c414: c4 00 40 00 ld [ %g1 ], %g2 if ( IMFS_is_directory( jnode ) ) { 200c418: 80 a0 a0 00 cmp %g2, 0 200c41c: 32 bf ff f1 bne,a 200c3e0 <== NEVER TAKEN 200c420: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c424: c6 07 60 50 ld [ %i5 + 0x50 ], %g3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c428: 88 07 60 54 add %i5, 0x54, %g4 if ( jnode_has_children( jnode ) ) 200c42c: 80 a0 c0 04 cmp %g3, %g4 200c430: 02 bf ff eb be 200c3dc 200c434: 80 a0 e0 00 cmp %g3, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200c438: 02 80 00 16 be 200c490 <== NEVER TAKEN 200c43c: ba 10 00 03 mov %g3, %i5 200c440: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 200c444: c4 00 40 00 ld [ %g1 ], %g2 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 200c448: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 200c44c: f8 07 60 08 ld [ %i5 + 8 ], %i4 loc.node_access = (void *)jnode; 200c450: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200c454: 80 a0 a0 00 cmp %g2, 0 200c458: 02 bf ff e7 be 200c3f4 200c45c: c2 27 bf f4 st %g1, [ %fp + -12 ] result = IMFS_rmnod( NULL, &loc ); 200c460: 90 10 20 00 clr %o0 200c464: 7f ff db a2 call 20032ec 200c468: 92 07 bf e4 add %fp, -28, %o1 if ( result != 0 ) 200c46c: 80 a2 20 00 cmp %o0, 0 200c470: 12 80 00 0a bne 200c498 <== NEVER TAKEN 200c474: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 200c478: 7f ff da bc call 2002f68 200c47c: 90 10 00 1d mov %i5, %o0 jnode = next; 200c480: ba 10 00 1c mov %i4, %i5 } if ( jnode != NULL ) { 200c484: 80 a7 60 00 cmp %i5, 0 200c488: 32 bf ff e3 bne,a 200c414 200c48c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200c490: 81 c7 e0 08 ret 200c494: 81 e8 00 00 restore IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); 200c498: 7f ff ef e9 call 200843c <== NOT EXECUTED 200c49c: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02002e4c : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 2002e4c: 9d e3 bf a0 save %sp, -96, %sp static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 2002e50: 90 10 20 01 mov 1, %o0 2002e54: 40 00 01 cb call 2003580 2002e58: 92 10 20 24 mov 0x24, %o1 if ( fs_info != NULL ) { 2002e5c: ba 92 20 00 orcc %o0, 0, %i5 2002e60: 02 80 00 36 be 2002f38 2002e64: 03 00 80 79 sethi %hi(0x201e400), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e68: c4 00 61 44 ld [ %g1 + 0x144 ], %g2 ! 201e544 memcpy( 2002e6c: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e70: 86 00 a0 01 add %g2, 1, %g3 memcpy( 2002e74: 94 10 20 1c mov 0x1c, %o2 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e78: c4 27 40 00 st %g2, [ %i5 ] 2002e7c: c6 20 61 44 st %g3, [ %g1 + 0x144 ] memcpy( 2002e80: 40 00 38 46 call 2010f98 2002e84: 90 07 60 08 add %i5, 8, %o0 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 2002e88: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002e8c: 90 10 00 1d mov %i5, %o0 2002e90: 96 10 20 00 clr %o3 2002e94: 15 00 80 70 sethi %hi(0x201c000), %o2 2002e98: 9a 10 20 00 clr %o5 2002e9c: 94 12 a0 50 or %o2, 0x50, %o2 2002ea0: 19 00 00 10 sethi %hi(0x4000), %o4 2002ea4: 40 00 24 49 call 200bfc8 2002ea8: 98 13 21 ed or %o4, 0x1ed, %o4 ! 41ed "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 2002eac: b8 92 20 00 orcc %o0, 0, %i4 2002eb0: 02 80 00 22 be 2002f38 <== NEVER TAKEN 2002eb4: 90 06 20 28 add %i0, 0x28, %o0 mt_entry->fs_info = fs_info; 2002eb8: fa 26 20 20 st %i5, [ %i0 + 0x20 ] mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002ebc: 13 00 80 72 sethi %hi(0x201c800), %o1 2002ec0: 94 10 20 30 mov 0x30, %o2 2002ec4: 40 00 38 35 call 2010f98 2002ec8: 92 12 61 3c or %o1, 0x13c, %o1 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 2002ecc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 mt_entry->mt_fs_root->location.node_access = root_node; 2002ed0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2002ed4: c6 00 a0 04 ld [ %g2 + 4 ], %g3 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002ed8: 05 00 80 77 sethi %hi(0x201dc00), %g2 2002edc: c4 00 a1 78 ld [ %g2 + 0x178 ], %g2 ! 201dd78 NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 2002ee0: f8 20 60 08 st %i4, [ %g1 + 8 ] mt_entry->mt_fs_root->location.ops = op_table; 2002ee4: f2 20 60 14 st %i1, [ %g1 + 0x14 ] /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 2002ee8: 80 a0 a0 10 cmp %g2, 0x10 2002eec: 02 80 00 0f be 2002f28 2002ef0: c6 20 60 10 st %g3, [ %g1 + 0x10 ] is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002ef4: 86 10 20 05 mov 5, %g3 2002ef8: 80 a0 a0 0f cmp %g2, 0xf 2002efc: 04 80 00 0a ble 2002f24 2002f00: 82 10 20 20 mov 0x20, %g1 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 2002f04: 80 a0 80 01 cmp %g2, %g1 2002f08: 22 80 00 09 be,a 2002f2c 2002f0c: 03 00 80 79 sethi %hi(0x201e400), %g1 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002f10: 26 80 00 06 bl,a 2002f28 <== NEVER TAKEN 2002f14: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002f18: 86 80 ff ff addcc %g3, -1, %g3 2002f1c: 12 bf ff fa bne 2002f04 <== ALWAYS TAKEN 2002f20: 83 28 60 01 sll %g1, 1, %g1 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 2002f24: 84 10 20 80 mov 0x80, %g2 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002f28: 03 00 80 79 sethi %hi(0x201e400), %g1 2002f2c: c4 20 61 40 st %g2, [ %g1 + 0x140 ] ! 201e540 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 2002f30: 81 c7 e0 08 ret 2002f34: 91 e8 20 00 restore %g0, 0, %o0 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002f38: 40 00 35 bc call 2010628 <__errno> 2002f3c: b0 10 3f ff mov -1, %i0 2002f40: 82 10 20 0c mov 0xc, %g1 2002f44: c2 22 00 00 st %g1, [ %o0 ] 2002f48: 81 c7 e0 08 ret 2002f4c: 81 e8 00 00 restore =============================================================================== 0200489c : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 200489c: 9d e3 bf 40 save %sp, -192, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 20048a0: 03 00 80 89 sethi %hi(0x2022400), %g1 20048a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 202241c 20048a8: c4 00 60 08 ld [ %g1 + 8 ], %g2 switch (mode & S_IFMT) { 20048ac: 03 00 00 08 sethi %hi(0x2000), %g1 void *context ) { int rv = 0; mode &= ~rtems_filesystem_umask; 20048b0: b2 2e 40 02 andn %i1, %g2, %i1 switch (mode & S_IFMT) { 20048b4: 05 00 00 3c sethi %hi(0xf000), %g2 20048b8: 84 0e 40 02 and %i1, %g2, %g2 20048bc: 80 a0 80 01 cmp %g2, %g1 20048c0: 22 80 00 0c be,a 20048f0 20048c4: c2 06 80 00 ld [ %i2 ], %g1 20048c8: 08 80 00 30 bleu 2004988 <== NEVER TAKEN 20048cc: 03 00 00 04 sethi %hi(0x1000), %g1 20048d0: 03 00 00 18 sethi %hi(0x6000), %g1 20048d4: 80 a0 80 01 cmp %g2, %g1 20048d8: 02 80 00 05 be 20048ec 20048dc: 03 00 00 20 sethi %hi(0x8000), %g1 20048e0: 80 a0 80 01 cmp %g2, %g1 20048e4: 12 80 00 2c bne 2004994 <== ALWAYS TAKEN 20048e8: 01 00 00 00 nop rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 20048ec: c2 06 80 00 ld [ %i2 ], %g1 20048f0: 80 a0 60 07 cmp %g1, 7 20048f4: 12 80 00 35 bne 20049c8 20048f8: 92 10 00 18 mov %i0, %o1 rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 20048fc: 94 10 20 78 mov 0x78, %o2 2004900: 40 00 09 2f call 2006dbc 2004904: 90 07 bf a4 add %fp, -92, %o0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 2004908: 7f ff ff d2 call 2004850 200490c: ba 10 00 08 mov %o0, %i5 2004910: 80 8a 20 ff btst 0xff, %o0 2004914: 02 80 00 26 be 20049ac 2004918: 90 07 bf a4 add %fp, -92, %o0 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 200491c: d4 07 bf ac ld [ %fp + -84 ], %o2 2004920: d6 07 bf b0 ld [ %fp + -80 ], %o3 if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 2004924: f6 27 bf e0 st %i3, [ %fp + -32 ] new_node = IMFS_create_node_with_control( 2004928: 90 10 00 1d mov %i5, %o0 200492c: 92 10 00 1a mov %i2, %o1 2004930: 98 10 00 19 mov %i1, %o4 2004934: 9a 07 bf e0 add %fp, -32, %o5 2004938: 40 00 2f 88 call 2010758 200493c: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 2004940: 80 a2 20 00 cmp %o0, 0 2004944: 02 80 00 1d be 20049b8 2004948: 92 10 20 00 clr %o1 IMFS_jnode_t *parent = currentloc->node_access; 200494c: fa 07 60 08 ld [ %i5 + 8 ], %i5 IMFS_update_ctime( parent ); 2004950: 40 00 02 b0 call 2005410 2004954: 90 07 bf f8 add %fp, -8, %o0 2004958: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 200495c: 90 07 bf f8 add %fp, -8, %o0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 2004960: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 2004964: 40 00 02 ab call 2005410 2004968: 92 10 20 00 clr %o1 200496c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2004970: b0 10 20 00 clr %i0 2004974: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2004978: 40 00 09 17 call 2006dd4 200497c: 90 07 bf a4 add %fp, -92, %o0 2004980: 81 c7 e0 08 ret 2004984: 81 e8 00 00 restore { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { 2004988: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200498c: 22 bf ff d9 be,a 20048f0 <== NOT EXECUTED 2004990: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED case S_IFCHR: case S_IFIFO: case S_IFREG: break; default: errno = EINVAL; 2004994: 40 00 41 03 call 2014da0 <__errno> 2004998: b0 10 3f ff mov -1, %i0 200499c: 82 10 20 16 mov 0x16, %g1 20049a0: c2 22 00 00 st %g1, [ %o0 ] 20049a4: 81 c7 e0 08 ret 20049a8: 81 e8 00 00 restore IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 20049ac: 92 10 20 86 mov 0x86, %o1 20049b0: 40 00 08 3b call 2006a9c 20049b4: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 20049b8: 40 00 09 07 call 2006dd4 20049bc: 90 07 bf a4 add %fp, -92, %o0 20049c0: 81 c7 e0 08 ret 20049c4: 81 e8 00 00 restore } else { errno = EINVAL; 20049c8: 40 00 40 f6 call 2014da0 <__errno> 20049cc: b0 10 3f ff mov -1, %i0 20049d0: 82 10 20 16 mov 0x16, %g1 20049d4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } } return rv; } 20049d8: 81 c7 e0 08 ret 20049dc: 81 e8 00 00 restore =============================================================================== 0200f1a8 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200f1a8: 9d e3 bf 98 save %sp, -104, %sp IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f1ac: 03 00 80 79 sethi %hi(0x201e400), %g1 200f1b0: fa 00 61 40 ld [ %g1 + 0x140 ], %i5 ! 201e540 200f1b4: b9 37 60 02 srl %i5, 2, %i4 200f1b8: 92 10 00 1c mov %i4, %o1 200f1bc: 40 00 28 c9 call 20194e0 <.umul> 200f1c0: 90 07 20 01 add %i4, 1, %o0 200f1c4: 92 10 00 1c mov %i4, %o1 200f1c8: 40 00 28 c6 call 20194e0 <.umul> 200f1cc: 90 02 20 01 inc %o0 200f1d0: 92 10 00 1d mov %i5, %o1 200f1d4: 40 00 28 c3 call 20194e0 <.umul> 200f1d8: 90 02 3f ff add %o0, -1, %o0 200f1dc: 82 10 20 00 clr %g1 200f1e0: 80 a0 40 19 cmp %g1, %i1 200f1e4: 04 80 00 42 ble 200f2ec <== ALWAYS TAKEN 200f1e8: b8 10 00 18 mov %i0, %i4 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200f1ec: f0 07 20 50 ld [ %i4 + 0x50 ], %i0 <== NOT EXECUTED 200f1f0: 80 a6 40 18 cmp %i1, %i0 200f1f4: 04 80 00 2a ble 200f29c <== ALWAYS TAKEN 200f1f8: e0 07 20 54 ld [ %i4 + 0x54 ], %l0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f1fc: a3 3f 60 1f sra %i5, 0x1f, %l1 <== NOT EXECUTED 200f200: 96 10 00 1d mov %i5, %o3 200f204: 94 10 00 11 mov %l1, %o2 200f208: 90 10 00 19 mov %i1, %o0 200f20c: 40 00 2a 47 call 2019b28 <__divdi3> 200f210: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f214: 90 10 00 18 mov %i0, %o0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f218: b6 10 00 09 mov %o1, %i3 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f21c: 94 10 00 11 mov %l1, %o2 200f220: 92 10 00 10 mov %l0, %o1 200f224: 40 00 2a 41 call 2019b28 <__divdi3> 200f228: 96 10 00 1d mov %i5, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f22c: 80 a6 c0 09 cmp %i3, %o1 200f230: 0a 80 00 21 bcs 200f2b4 <== NEVER TAKEN 200f234: b0 10 00 09 mov %o1, %i0 200f238: 10 80 00 05 b 200f24c 200f23c: ba 10 00 09 mov %o1, %i5 200f240: 80 a6 c0 1d cmp %i3, %i5 200f244: 0a 80 00 1d bcs 200f2b8 200f248: 92 10 20 00 clr %o1 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200f24c: 92 10 00 1d mov %i5, %o1 200f250: 7f ff ff 39 call 200ef34 200f254: 90 10 00 1c mov %i4, %o0 200f258: 80 a2 20 00 cmp %o0, 0 200f25c: 22 bf ff f9 be,a 200f240 200f260: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200f264: 10 80 00 06 b 200f27c 200f268: 80 a6 00 1d cmp %i0, %i5 IMFS_memfile_remove_block( the_jnode, block ); 200f26c: 90 10 00 1c mov %i4, %o0 200f270: 7f ff ff c2 call 200f178 200f274: 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-- ) { 200f278: 80 a6 00 1d cmp %i0, %i5 200f27c: 08 bf ff fc bleu 200f26c 200f280: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200f284: 40 00 04 e9 call 2010628 <__errno> 200f288: b0 10 3f ff mov -1, %i0 200f28c: 82 10 20 1c mov 0x1c, %g1 200f290: c2 22 00 00 st %g1, [ %o0 ] 200f294: 81 c7 e0 08 ret 200f298: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200f29c: 12 80 00 04 bne 200f2ac <== NEVER TAKEN 200f2a0: 80 a6 80 10 cmp %i2, %l0 200f2a4: 18 bf ff d7 bgu 200f200 200f2a8: a3 3f 60 1f sra %i5, 0x1f, %l1 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 200f2ac: 81 c7 e0 08 ret 200f2b0: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 200f2b4: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200f2b8: f2 27 20 50 st %i1, [ %i4 + 0x50 ] 200f2bc: f4 27 20 54 st %i2, [ %i4 + 0x54 ] IMFS_update_ctime(the_jnode); 200f2c0: 7f ff d1 89 call 20038e4 200f2c4: 90 07 bf f8 add %fp, -8, %o0 200f2c8: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200f2cc: 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); 200f2d0: c2 27 20 48 st %g1, [ %i4 + 0x48 ] IMFS_update_mtime(the_jnode); 200f2d4: 7f ff d1 84 call 20038e4 200f2d8: 92 10 20 00 clr %o1 200f2dc: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f2e0: c2 27 20 44 st %g1, [ %i4 + 0x44 ] return 0; 200f2e4: 81 c7 e0 08 ret 200f2e8: 91 e8 20 00 restore %g0, 0, %o0 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f2ec: 12 80 00 04 bne 200f2fc 200f2f0: 80 a2 00 1a cmp %o0, %i2 200f2f4: 38 bf ff bf bgu,a 200f1f0 200f2f8: f0 07 20 50 ld [ %i4 + 0x50 ], %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 200f2fc: 40 00 04 cb call 2010628 <__errno> 200f300: b0 10 3f ff mov -1, %i0 200f304: 82 10 20 16 mov 0x16, %g1 200f308: c2 22 00 00 st %g1, [ %o0 ] 200f30c: 81 c7 e0 08 ret 200f310: 81 e8 00 00 restore =============================================================================== 0200ea54 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200ea54: 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 ) { 200ea58: 03 00 80 79 sethi %hi(0x201e400), %g1 200ea5c: fa 00 61 40 ld [ %g1 + 0x140 ], %i5 ! 201e540 200ea60: bb 37 60 02 srl %i5, 2, %i5 200ea64: 82 07 7f ff add %i5, -1, %g1 200ea68: 80 a6 40 01 cmp %i1, %g1 200ea6c: 18 80 00 0b bgu 200ea98 200ea70: b8 10 00 18 mov %i0, %i4 p = info->indirect; if ( malloc_it ) { 200ea74: 80 a6 a0 00 cmp %i2, 0 200ea78: 12 80 00 50 bne 200ebb8 200ea7c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200ea80: 80 a2 20 00 cmp %o0, 0 200ea84: 02 80 00 64 be 200ec14 <== NEVER TAKEN 200ea88: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200ea8c: b3 2e 60 02 sll %i1, 2, %i1 200ea90: 81 c7 e0 08 ret 200ea94: 91 ea 00 19 restore %o0, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200ea98: 90 07 60 01 add %i5, 1, %o0 200ea9c: 40 00 2a 91 call 20194e0 <.umul> 200eaa0: 92 10 00 1d mov %i5, %o1 200eaa4: 82 02 3f ff add %o0, -1, %g1 200eaa8: 80 a6 40 01 cmp %i1, %g1 200eaac: 08 80 00 2c bleu 200eb5c 200eab0: b6 10 00 08 mov %o0, %i3 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200eab4: 90 02 20 01 inc %o0 200eab8: 40 00 2a 8a call 20194e0 <.umul> 200eabc: 92 10 00 1d mov %i5, %o1 200eac0: 90 02 3f ff add %o0, -1, %o0 200eac4: 80 a6 40 08 cmp %i1, %o0 200eac8: 18 80 00 53 bgu 200ec14 <== NEVER TAKEN 200eacc: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200ead0: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200ead4: 92 10 00 1d mov %i5, %o1 200ead8: 40 00 2b 68 call 2019878 <.urem> 200eadc: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200eae0: 92 10 00 1d mov %i5, %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; 200eae4: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200eae8: 40 00 2a b8 call 20195c8 <.udiv> 200eaec: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200eaf0: 92 10 00 1d mov %i5, %o1 200eaf4: 40 00 2a b5 call 20195c8 <.udiv> 200eaf8: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200eafc: 92 10 00 1d mov %i5, %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; 200eb00: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200eb04: 40 00 2b 5d call 2019878 <.urem> 200eb08: 90 10 00 1b mov %i3, %o0 p = info->triply_indirect; 200eb0c: c2 07 20 60 ld [ %i4 + 0x60 ], %g1 if ( malloc_it ) { 200eb10: 80 a6 a0 00 cmp %i2, 0 200eb14: 02 80 00 33 be 200ebe0 200eb18: ba 10 00 08 mov %o0, %i5 if ( !p ) { 200eb1c: 80 a0 60 00 cmp %g1, 0 200eb20: 02 80 00 66 be 200ecb8 200eb24: 01 00 00 00 nop if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 200eb28: b3 2e 60 02 sll %i1, 2, %i1 200eb2c: c4 00 40 19 ld [ %g1 + %i1 ], %g2 if ( !p1 ) { 200eb30: 80 a0 a0 00 cmp %g2, 0 200eb34: 02 80 00 5a be 200ec9c 200eb38: b2 00 40 19 add %g1, %i1, %i1 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 200eb3c: bb 2f 60 02 sll %i5, 2, %i5 200eb40: d0 00 80 1d ld [ %g2 + %i5 ], %o0 if ( !p2 ) { 200eb44: 80 a2 20 00 cmp %o0, 0 200eb48: 02 80 00 47 be 200ec64 200eb4c: ba 00 80 1d add %g2, %i5, %i5 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 200eb50: b1 2c 20 02 sll %l0, 2, %i0 200eb54: 81 c7 e0 08 ret 200eb58: 91 ea 00 18 restore %o0, %i0, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 200eb5c: b2 26 40 1d sub %i1, %i5, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200eb60: 92 10 00 1d mov %i5, %o1 200eb64: 40 00 2b 45 call 2019878 <.urem> 200eb68: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200eb6c: 92 10 00 1d mov %i5, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200eb70: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200eb74: 40 00 2a 95 call 20195c8 <.udiv> 200eb78: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; 200eb7c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 if ( malloc_it ) { 200eb80: 80 a6 a0 00 cmp %i2, 0 200eb84: 02 80 00 26 be 200ec1c 200eb88: ba 10 00 08 mov %o0, %i5 if ( !p ) { 200eb8c: 80 a0 60 00 cmp %g1, 0 200eb90: 02 80 00 3c be 200ec80 200eb94: 01 00 00 00 nop if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 200eb98: bb 2f 60 02 sll %i5, 2, %i5 200eb9c: d0 00 40 1d ld [ %g1 + %i5 ], %o0 if ( !p1 ) { 200eba0: 80 a2 20 00 cmp %o0, 0 200eba4: 02 80 00 29 be 200ec48 200eba8: ba 00 40 1d add %g1, %i5, %i5 if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 200ebac: b1 2e e0 02 sll %i3, 2, %i0 200ebb0: 81 c7 e0 08 ret 200ebb4: 91 ea 00 18 restore %o0, %i0, %o0 if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { 200ebb8: 80 a2 20 00 cmp %o0, 0 200ebbc: 32 bf ff b5 bne,a 200ea90 200ebc0: b3 2e 60 02 sll %i1, 2, %i1 p = memfile_alloc_block(); 200ebc4: 7f ff ff 97 call 200ea20 200ebc8: b0 10 20 00 clr %i0 if ( !p ) 200ebcc: 80 a2 20 00 cmp %o0, 0 200ebd0: 02 80 00 11 be 200ec14 <== NEVER TAKEN 200ebd4: 01 00 00 00 nop return 0; info->indirect = p; 200ebd8: 10 bf ff ad b 200ea8c 200ebdc: d0 27 20 58 st %o0, [ %i4 + 0x58 ] p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 200ebe0: 80 a0 60 00 cmp %g1, 0 200ebe4: 02 80 00 0c be 200ec14 <== NEVER TAKEN 200ebe8: b3 2e 60 02 sll %i1, 2, %i1 return 0; p1 = (block_p *) p[ triply ]; 200ebec: c2 00 40 19 ld [ %g1 + %i1 ], %g1 if ( !p1 ) 200ebf0: 80 a0 60 00 cmp %g1, 0 200ebf4: 02 80 00 08 be 200ec14 <== NEVER TAKEN 200ebf8: bb 2a 20 02 sll %o0, 2, %i5 return 0; p2 = (block_p *)p1[ doubly ]; 200ebfc: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p2 ) 200ec00: 80 a0 60 00 cmp %g1, 0 200ec04: 02 80 00 04 be 200ec14 <== NEVER TAKEN 200ec08: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200ec0c: b1 2c 20 02 sll %l0, 2, %i0 200ec10: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200ec14: 81 c7 e0 08 ret 200ec18: 81 e8 00 00 restore } return (block_p *)&p1[ singly ]; } if ( !p ) 200ec1c: 80 a0 60 00 cmp %g1, 0 200ec20: 02 bf ff fd be 200ec14 <== NEVER TAKEN 200ec24: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200ec28: bb 2a 20 02 sll %o0, 2, %i5 200ec2c: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p ) 200ec30: 80 a0 60 00 cmp %g1, 0 200ec34: 02 bf ff f8 be 200ec14 <== NEVER TAKEN 200ec38: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200ec3c: b1 2e e0 02 sll %i3, 2, %i0 200ec40: 81 c7 e0 08 ret 200ec44: 91 e8 40 18 restore %g1, %i0, %o0 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200ec48: 7f ff ff 76 call 200ea20 200ec4c: b0 10 20 00 clr %i0 if ( !p1 ) 200ec50: 80 a2 20 00 cmp %o0, 0 200ec54: 02 bf ff f0 be 200ec14 <== NEVER TAKEN 200ec58: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200ec5c: 10 bf ff d4 b 200ebac 200ec60: d0 27 40 00 st %o0, [ %i5 ] p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 200ec64: 7f ff ff 6f call 200ea20 200ec68: b0 10 20 00 clr %i0 if ( !p2 ) 200ec6c: 80 a2 20 00 cmp %o0, 0 200ec70: 02 bf ff e9 be 200ec14 <== NEVER TAKEN 200ec74: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200ec78: 10 bf ff b6 b 200eb50 200ec7c: d0 27 40 00 st %o0, [ %i5 ] p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200ec80: 7f ff ff 68 call 200ea20 200ec84: b0 10 20 00 clr %i0 if ( !p ) 200ec88: 80 a2 20 00 cmp %o0, 0 200ec8c: 02 bf ff e2 be 200ec14 <== NEVER TAKEN 200ec90: 82 10 00 08 mov %o0, %g1 return 0; info->doubly_indirect = p; 200ec94: 10 bf ff c1 b 200eb98 200ec98: d0 27 20 5c st %o0, [ %i4 + 0x5c ] info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200ec9c: 7f ff ff 61 call 200ea20 200eca0: b0 10 20 00 clr %i0 if ( !p1 ) 200eca4: 80 a2 20 00 cmp %o0, 0 200eca8: 02 bf ff db be 200ec14 <== NEVER TAKEN 200ecac: 84 10 00 08 mov %o0, %g2 return 0; p[ triply ] = (block_p) p1; 200ecb0: 10 bf ff a3 b 200eb3c 200ecb4: d0 26 40 00 st %o0, [ %i1 ] p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200ecb8: 7f ff ff 5a call 200ea20 200ecbc: 01 00 00 00 nop if ( !p ) 200ecc0: 82 92 20 00 orcc %o0, 0, %g1 200ecc4: 02 bf ff d4 be 200ec14 <== NEVER TAKEN 200ecc8: 01 00 00 00 nop return 0; info->triply_indirect = p; 200eccc: 10 bf ff 97 b 200eb28 200ecd0: c2 27 20 60 st %g1, [ %i4 + 0x60 ] =============================================================================== 0200ecd4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200ecd4: 9d e3 bf 98 save %sp, -104, %sp rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 200ecd8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200ecdc: ba 10 00 18 mov %i0, %i5 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 200ece0: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200ece4: 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 ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 200ece8: 80 a0 60 05 cmp %g1, 5 200ecec: 02 80 00 64 be 200ee7c 200ecf0: a2 10 00 1a mov %i2, %l1 /* * 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 ) 200ecf4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 /* * 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; 200ecf8: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200ecfc: 86 10 20 00 clr %g3 200ed00: c8 06 20 54 ld [ %i0 + 0x54 ], %g4 200ed04: 80 a0 c0 02 cmp %g3, %g2 200ed08: 04 80 00 41 ble 200ee0c <== ALWAYS TAKEN 200ed0c: b4 07 00 1a add %i4, %i2, %i2 my_length = the_jnode->info.file.size - start; 200ed10: b8 21 00 01 sub %g4, %g1, %i4 <== NOT EXECUTED */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ed14: 33 00 80 79 sethi %hi(0x201e400), %i1 <== NOT EXECUTED 200ed18: f4 06 61 40 ld [ %i1 + 0x140 ], %i2 ! 201e540 200ed1c: 90 10 00 10 mov %l0, %o0 200ed20: b1 3e a0 1f sra %i2, 0x1f, %i0 200ed24: 92 10 00 11 mov %l1, %o1 200ed28: 94 10 00 18 mov %i0, %o2 200ed2c: 40 00 2c 65 call 2019ec0 <__moddi3> 200ed30: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200ed34: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ed38: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200ed3c: 94 10 00 18 mov %i0, %o2 200ed40: 92 10 00 11 mov %l1, %o1 200ed44: 40 00 2b 79 call 2019b28 <__divdi3> 200ed48: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200ed4c: 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; 200ed50: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200ed54: 80 a4 a0 00 cmp %l2, 0 200ed58: 02 80 00 14 be 200eda8 200ed5c: 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 ); 200ed60: 90 10 00 1d mov %i5, %o0 200ed64: 7f ff ff 3c call 200ea54 200ed68: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ed6c: 80 a2 20 00 cmp %o0, 0 200ed70: 02 80 00 25 be 200ee04 <== NEVER TAKEN 200ed74: b4 26 80 12 sub %i2, %l2, %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; 200ed78: 80 a7 00 1a cmp %i4, %i2 200ed7c: 18 80 00 53 bgu 200eec8 200ed80: b0 10 00 1c mov %i4, %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 ); 200ed84: d2 02 00 00 ld [ %o0 ], %o1 200ed88: 94 10 00 18 mov %i0, %o2 200ed8c: 90 10 00 1b mov %i3, %o0 200ed90: 40 00 08 82 call 2010f98 200ed94: 92 02 40 12 add %o1, %l2, %o1 dest += to_copy; block++; my_length -= to_copy; 200ed98: f4 06 61 40 ld [ %i1 + 0x140 ], %i2 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 ); dest += to_copy; 200ed9c: a2 06 c0 18 add %i3, %i0, %l1 block++; 200eda0: a0 04 20 01 inc %l0 my_length -= to_copy; 200eda4: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200eda8: 80 a7 00 1a cmp %i4, %i2 200edac: 1a 80 00 0e bcc 200ede4 200edb0: 94 10 20 00 clr %o2 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200edb4: 10 80 00 1e b 200ee2c 200edb8: 80 a7 20 00 cmp %i4, 0 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200edbc: d2 00 40 00 ld [ %g1 ], %o1 200edc0: 40 00 08 76 call 2010f98 200edc4: b8 27 00 1a sub %i4, %i2, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200edc8: c2 06 61 40 ld [ %i1 + 0x140 ], %g1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 200edcc: a2 04 40 1a add %l1, %i2, %l1 block++; 200edd0: a0 04 20 01 inc %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200edd4: 80 a0 40 1c cmp %g1, %i4 200edd8: 18 80 00 14 bgu 200ee28 200eddc: b0 06 00 1a add %i0, %i2, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ede0: 94 10 20 00 clr %o2 200ede4: 92 10 00 10 mov %l0, %o1 200ede8: 7f ff ff 1b call 200ea54 200edec: 90 10 00 1d mov %i5, %o0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200edf0: 94 10 00 1a mov %i2, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200edf4: 82 10 00 08 mov %o0, %g1 if ( !block_ptr ) 200edf8: 80 a0 60 00 cmp %g1, 0 200edfc: 12 bf ff f0 bne 200edbc <== ALWAYS TAKEN 200ee00: 90 10 00 11 mov %l1, %o0 } IMFS_update_atime( the_jnode ); return copied; } 200ee04: 81 c7 e0 08 ret <== NOT EXECUTED 200ee08: 81 e8 00 00 restore <== NOT EXECUTED /* * 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 ) 200ee0c: 12 bf ff c3 bne 200ed18 <== NEVER TAKEN 200ee10: 33 00 80 79 sethi %hi(0x201e400), %i1 200ee14: 80 a6 80 04 cmp %i2, %g4 200ee18: 08 bf ff c1 bleu 200ed1c 200ee1c: f4 06 61 40 ld [ %i1 + 0x140 ], %i2 my_length = the_jnode->info.file.size - start; 200ee20: 10 bf ff be b 200ed18 200ee24: b8 21 00 01 sub %g4, %g1, %i4 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200ee28: 80 a7 20 00 cmp %i4, 0 200ee2c: 02 80 00 0e be 200ee64 200ee30: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ee34: 90 10 00 1d mov %i5, %o0 200ee38: 92 10 00 10 mov %l0, %o1 200ee3c: 7f ff ff 06 call 200ea54 200ee40: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ee44: 80 a2 20 00 cmp %o0, 0 200ee48: 02 bf ff ef be 200ee04 <== NEVER TAKEN 200ee4c: 94 10 00 1c mov %i4, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200ee50: d2 02 00 00 ld [ %o0 ], %o1 200ee54: 90 10 00 11 mov %l1, %o0 200ee58: 40 00 08 50 call 2010f98 200ee5c: b0 06 00 1c add %i0, %i4, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200ee60: 90 07 bf f8 add %fp, -8, %o0 200ee64: 7f ff d2 a0 call 20038e4 200ee68: 92 10 20 00 clr %o1 200ee6c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ee70: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200ee74: 81 c7 e0 08 ret 200ee78: 81 e8 00 00 restore if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200ee7c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200ee80: 82 10 20 00 clr %g1 200ee84: 86 a3 40 1a subcc %o5, %i2, %g3 200ee88: 84 63 00 19 subx %o4, %i1, %g2 200ee8c: 80 a0 40 02 cmp %g1, %g2 200ee90: 04 80 00 10 ble 200eed0 <== ALWAYS TAKEN 200ee94: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 my_length = the_jnode->info.linearfile.size - start; 200ee98: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 200ee9c: 92 02 40 11 add %o1, %l1, %o1 200eea0: 94 10 00 18 mov %i0, %o2 200eea4: 40 00 08 3d call 2010f98 200eea8: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200eeac: 90 07 bf f8 add %fp, -8, %o0 200eeb0: 7f ff d2 8d call 20038e4 200eeb4: 92 10 20 00 clr %o1 200eeb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200eebc: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200eec0: 81 c7 e0 08 ret 200eec4: 81 e8 00 00 restore * 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; 200eec8: 10 bf ff af b 200ed84 200eecc: b0 10 00 1a mov %i2, %i0 if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200eed0: 12 80 00 04 bne 200eee0 <== NEVER TAKEN 200eed4: 80 a7 00 03 cmp %i4, %g3 200eed8: 38 bf ff f1 bgu,a 200ee9c <== ALWAYS TAKEN 200eedc: b0 23 40 11 sub %o5, %l1, %i0 my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200eee0: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 200eee4: 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); 200eee8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200eeec: 40 00 08 2b call 2010f98 <== NOT EXECUTED 200eef0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 200eef4: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 200eef8: 7f ff d2 7b call 20038e4 <== NOT EXECUTED 200eefc: 92 10 20 00 clr %o1 <== NOT EXECUTED 200ef00: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200ef04: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED return my_length; 200ef08: 81 c7 e0 08 ret <== NOT EXECUTED 200ef0c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f000 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200f000: 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; 200f004: 39 00 80 79 sethi %hi(0x201e400), %i4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200f008: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 /* * 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; 200f00c: f4 07 21 40 ld [ %i4 + 0x140 ], %i2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200f010: 80 a0 60 00 cmp %g1, 0 200f014: 02 80 00 05 be 200f028 200f018: b5 36 a0 02 srl %i2, 2, %i2 memfile_free_blocks_in_table( &info->indirect, to_free ); 200f01c: 90 06 20 58 add %i0, 0x58, %o0 200f020: 7f ff ff e2 call 200efa8 200f024: 92 10 00 1a mov %i2, %o1 } if ( info->doubly_indirect ) { 200f028: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200f02c: 80 a0 60 00 cmp %g1, 0 200f030: 02 80 00 1b be 200f09c 200f034: c4 07 21 40 ld [ %i4 + 0x140 ], %g2 for ( i=0 ; i <== NEVER TAKEN 200f044: 90 10 20 00 clr %o0 200f048: 37 00 80 79 sethi %hi(0x201e400), %i3 200f04c: ba 10 20 00 clr %i5 200f050: 10 80 00 03 b 200f05c 200f054: b6 16 e1 40 or %i3, 0x140, %i3 200f058: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 if ( info->doubly_indirect[i] ) { 200f05c: 91 2a 20 02 sll %o0, 2, %o0 200f060: c4 00 40 08 ld [ %g1 + %o0 ], %g2 200f064: 80 a0 a0 00 cmp %g2, 0 200f068: 02 80 00 04 be 200f078 <== NEVER TAKEN 200f06c: 90 00 40 08 add %g1, %o0, %o0 memfile_free_blocks_in_table( 200f070: 7f ff ff ce call 200efa8 200f074: 92 10 00 1a mov %i2, %o1 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 200f08c: 90 10 00 1d mov %i5, %o0 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 ); 200f090: 90 06 20 5c add %i0, 0x5c, %o0 200f094: 7f ff ff c5 call 200efa8 200f098: 92 10 00 1a mov %i2, %o1 } if ( info->triply_indirect ) { 200f09c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200f0a0: 80 a2 20 00 cmp %o0, 0 200f0a4: 02 80 00 33 be 200f170 200f0a8: c2 07 21 40 ld [ %i4 + 0x140 ], %g1 for ( i=0 ; i <== NEVER TAKEN 200f0b8: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 200f0bc: f8 02 00 00 ld [ %o0 ], %i4 if ( !p ) /* ensure we have a valid pointer */ 200f0c0: 80 a7 20 00 cmp %i4, 0 200f0c4: 22 80 00 29 be,a 200f168 <== NEVER TAKEN 200f0c8: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200f0cc: 37 00 80 79 sethi %hi(0x201e400), %i3 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200f0d0: a0 10 20 00 clr %l0 if ( !p ) /* ensure we have a valid pointer */ 200f0d4: b2 10 20 00 clr %i1 200f0d8: b6 16 e1 40 or %i3, 0x140, %i3 break; for ( j=0 ; j <== NEVER TAKEN 200f0e4: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 200f0e8: 90 10 20 00 clr %o0 200f0ec: ba 10 20 00 clr %i5 if ( p[j] ) { 200f0f0: 91 2a 20 02 sll %o0, 2, %o0 200f0f4: c2 07 00 08 ld [ %i4 + %o0 ], %g1 200f0f8: 80 a0 60 00 cmp %g1, 0 200f0fc: 02 80 00 04 be 200f10c <== NEVER TAKEN 200f100: 90 07 00 08 add %i4, %o0, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200f104: 7f ff ff a9 call 200efa8 200f108: 92 10 00 1a mov %i2, %o1 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j 200f120: 90 10 00 1d mov %i5, %o0 200f124: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200f128: 90 02 00 10 add %o0, %l0, %o0 200f12c: 7f ff ff 9f call 200efa8 200f130: 92 10 00 1a mov %i2, %o1 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200f148: 90 06 20 60 add %i0, 0x60, %o0 p = (block_p *) info->triply_indirect[i]; 200f14c: d0 06 20 60 ld [ %i0 + 0x60 ], %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. */ IMFS_jnode_t *IMFS_memfile_remove( 200f150: a1 2e 60 02 sll %i1, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200f154: f8 02 00 10 ld [ %o0 + %l0 ], %i4 if ( !p ) /* ensure we have a valid pointer */ 200f158: 80 a7 20 00 cmp %i4, 0 200f15c: 12 bf ff e1 bne 200f0e0 <== ALWAYS TAKEN 200f160: 80 a0 60 00 cmp %g1, 0 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 200f164: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200f168: 7f ff ff 90 call 200efa8 200f16c: 92 10 00 1a mov %i2, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200f170: 81 c7 e0 08 ret 200f174: 81 e8 00 00 restore =============================================================================== 0200f314 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200f314: 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 ) { 200f318: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200f31c: 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 ) { 200f320: 80 a0 60 00 cmp %g1, 0 200f324: 06 80 00 5c bl 200f494 <== NEVER TAKEN 200f328: 94 07 00 1a add %i4, %i2, %o2 200f32c: 80 a0 60 00 cmp %g1, 0 200f330: 22 80 00 56 be,a 200f488 <== ALWAYS TAKEN 200f334: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200f338: 23 00 80 79 sethi %hi(0x201e400), %l1 <== NOT EXECUTED 200f33c: e0 04 61 40 ld [ %l1 + 0x140 ], %l0 ! 201e540 200f340: 92 10 00 1a mov %i2, %o1 200f344: b1 3c 20 1f sra %l0, 0x1f, %i0 200f348: 96 10 00 10 mov %l0, %o3 200f34c: 94 10 00 18 mov %i0, %o2 200f350: 40 00 2a dc call 2019ec0 <__moddi3> 200f354: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f358: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200f35c: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f360: 90 10 00 19 mov %i1, %o0 200f364: 92 10 00 1a mov %i2, %o1 200f368: 40 00 29 f0 call 2019b28 <__divdi3> 200f36c: 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; 200f370: 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 ) { 200f374: 80 a4 a0 00 cmp %l2, 0 200f378: 12 80 00 1a bne 200f3e0 200f37c: b4 10 00 09 mov %o1, %i2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f380: 80 a7 00 10 cmp %i4, %l0 200f384: 1a 80 00 0e bcc 200f3bc 200f388: 92 10 00 1a mov %i2, %o1 * 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 ) { 200f38c: 10 80 00 2a b 200f434 200f390: 80 a7 20 00 cmp %i4, 0 if ( !block_ptr ) 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 ); 200f394: d0 02 00 00 ld [ %o0 ], %o0 200f398: 40 00 07 00 call 2010f98 200f39c: b8 27 00 10 sub %i4, %l0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f3a0: c2 04 61 40 ld [ %l1 + 0x140 ], %g1 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 ); src += to_copy; 200f3a4: b6 06 c0 10 add %i3, %l0, %i3 block++; 200f3a8: b4 06 a0 01 inc %i2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f3ac: 80 a0 40 1c cmp %g1, %i4 200f3b0: 18 80 00 20 bgu 200f430 200f3b4: b0 06 00 10 add %i0, %l0, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f3b8: 92 10 00 1a mov %i2, %o1 200f3bc: 94 10 20 00 clr %o2 200f3c0: 7f ff fd a5 call 200ea54 200f3c4: 90 10 00 1d mov %i5, %o0 if ( !block_ptr ) 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 ); 200f3c8: 92 10 00 1b mov %i3, %o1 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 200f3cc: 80 a2 20 00 cmp %o0, 0 200f3d0: 12 bf ff f1 bne 200f394 <== ALWAYS TAKEN 200f3d4: 94 10 00 10 mov %l0, %o2 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200f3d8: 81 c7 e0 08 ret <== NOT EXECUTED 200f3dc: 81 e8 00 00 restore <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 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 ); 200f3e0: 90 10 00 1d mov %i5, %o0 200f3e4: 94 10 20 00 clr %o2 200f3e8: 7f ff fd 9b call 200ea54 200f3ec: b0 10 20 00 clr %i0 if ( !block_ptr ) 200f3f0: 80 a2 20 00 cmp %o0, 0 200f3f4: 02 80 00 32 be 200f4bc <== NEVER TAKEN 200f3f8: 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; 200f3fc: b0 24 00 12 sub %l0, %l2, %i0 200f400: 80 a6 00 1c cmp %i0, %i4 200f404: 18 80 00 30 bgu 200f4c4 200f408: d0 02 00 00 ld [ %o0 ], %o0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200f40c: 92 10 00 1b mov %i3, %o1 200f410: 90 02 00 12 add %o0, %l2, %o0 200f414: 94 10 00 18 mov %i0, %o2 200f418: 40 00 06 e0 call 2010f98 200f41c: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200f420: b4 06 a0 01 inc %i2 my_length -= to_copy; 200f424: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 200f428: 10 bf ff d6 b 200f380 200f42c: e0 04 61 40 ld [ %l1 + 0x140 ], %l0 * 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 ) { 200f430: 80 a7 20 00 cmp %i4, 0 200f434: 02 80 00 0e be 200f46c 200f438: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f43c: 90 10 00 1d mov %i5, %o0 200f440: 92 10 00 1a mov %i2, %o1 200f444: 7f ff fd 84 call 200ea54 200f448: 94 10 20 00 clr %o2 if ( !block_ptr ) 200f44c: 80 a2 20 00 cmp %o0, 0 200f450: 02 bf ff e2 be 200f3d8 <== NEVER TAKEN 200f454: 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 ); 200f458: d0 02 00 00 ld [ %o0 ], %o0 200f45c: 94 10 00 1c mov %i4, %o2 200f460: 40 00 06 ce call 2010f98 200f464: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200f468: 90 07 bf f8 add %fp, -8, %o0 200f46c: 7f ff d1 1e call 20038e4 200f470: 92 10 20 00 clr %o1 200f474: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f478: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200f47c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200f480: 81 c7 e0 08 ret 200f484: 81 e8 00 00 restore * 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 ) { 200f488: 80 a0 40 0a cmp %g1, %o2 200f48c: 1a bf ff ac bcc 200f33c 200f490: 23 00 80 79 sethi %hi(0x201e400), %l1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200f494: 90 10 00 1d mov %i5, %o0 200f498: 7f ff ff 44 call 200f1a8 200f49c: 92 10 20 00 clr %o1 if ( status ) 200f4a0: 80 a2 20 00 cmp %o0, 0 200f4a4: 02 bf ff a6 be 200f33c 200f4a8: 23 00 80 79 sethi %hi(0x201e400), %l1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200f4ac: 40 00 04 5f call 2010628 <__errno> 200f4b0: b0 10 3f ff mov -1, %i0 200f4b4: 82 10 20 1c mov 0x1c, %g1 200f4b8: c2 22 00 00 st %g1, [ %o0 ] 200f4bc: 81 c7 e0 08 ret 200f4c0: 81 e8 00 00 restore * 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; 200f4c4: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200f4c8: 92 10 00 1b mov %i3, %o1 200f4cc: 90 02 00 12 add %o0, %l2, %o0 200f4d0: 94 10 00 18 mov %i0, %o2 200f4d4: 40 00 06 b1 call 2010f98 200f4d8: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200f4dc: b4 06 a0 01 inc %i2 my_length -= to_copy; 200f4e0: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 200f4e4: 10 bf ff a7 b 200f380 200f4e8: e0 04 61 40 ld [ %l1 + 0x140 ], %l0 =============================================================================== 02003058 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003058: 9d e3 bf 80 save %sp, -128, %sp dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 200305c: 03 00 00 3c sethi %hi(0xf000), %g1 2003060: 07 00 00 10 sethi %hi(0x4000), %g3 2003064: 82 0e c0 01 and %i3, %g1, %g1 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003068: 98 10 00 1b mov %i3, %o4 200306c: 94 10 00 19 mov %i1, %o2 2003070: 96 10 00 1a mov %i2, %o3 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2003074: 80 a0 40 03 cmp %g1, %g3 2003078: 02 80 00 0b be 20030a4 200307c: 84 10 20 00 clr %g2 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 2003080: 07 00 00 20 sethi %hi(0x8000), %g3 2003084: 80 a0 40 03 cmp %g1, %g3 2003088: 02 80 00 29 be 200312c 200308c: 07 00 00 08 sethi %hi(0x2000), %g3 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2003090: 80 a0 40 03 cmp %g1, %g3 2003094: 12 80 00 1d bne 2003108 2003098: 07 00 00 18 sethi %hi(0x6000), %g3 *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 200309c: f8 3f bf e0 std %i4, [ %fp + -32 ] if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; 20030a0: 84 10 20 01 mov 1, %g2 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 20030a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 20030a8: 84 00 a0 02 add %g2, 2, %g2 20030ac: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 20030b0: 85 28 a0 02 sll %g2, 2, %g2 20030b4: d2 00 40 02 ld [ %g1 + %g2 ], %o1 20030b8: 90 10 00 18 mov %i0, %o0 20030bc: 40 00 23 f8 call 200c09c 20030c0: 9a 07 bf e0 add %fp, -32, %o5 IMFS_jnode_t *new_node; get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { 20030c4: 80 a2 20 00 cmp %o0, 0 20030c8: 02 80 00 0e be 2003100 20030cc: 82 10 3f ff mov -1, %g1 IMFS_jnode_t *parent = parentloc->node_access; 20030d0: fa 06 20 08 ld [ %i0 + 8 ], %i5 IMFS_update_ctime( parent ); 20030d4: 92 10 20 00 clr %o1 20030d8: 40 00 02 03 call 20038e4 20030dc: 90 07 bf f8 add %fp, -8, %o0 20030e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 20030e4: 90 07 bf f8 add %fp, -8, %o0 new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); 20030e8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 20030ec: 40 00 01 fe call 20038e4 20030f0: 92 10 20 00 clr %o1 20030f4: c4 07 bf f8 ld [ %fp + -8 ], %g2 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 20030f8: 82 10 20 00 clr %g1 new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); 20030fc: c4 27 60 44 st %g2, [ %i5 + 0x44 ] } else { rv = -1; } return rv; } 2003100: 81 c7 e0 08 ret 2003104: 91 e8 00 01 restore %g0, %g1, %o0 { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2003108: 80 a0 40 03 cmp %g1, %g3 200310c: 22 bf ff e5 be,a 20030a0 2003110: f8 3f bf e0 std %i4, [ %fp + -32 ] rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 2003114: 07 00 00 04 sethi %hi(0x1000), %g3 2003118: 80 a0 40 03 cmp %g1, %g3 200311c: 22 bf ff e2 be,a 20030a4 <== ALWAYS TAKEN 2003120: 84 10 20 06 mov 6, %g2 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 2003124: 10 bf ff e1 b 20030a8 <== NOT EXECUTED 2003128: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 200312c: 10 bf ff de b 20030a4 2003130: 84 10 20 04 mov 4, %g2 =============================================================================== 02003134 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003134: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 2003138: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200313c: c2 00 60 08 ld [ %g1 + 8 ], %g1 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 2003140: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003144: c4 00 80 00 ld [ %g2 ], %g2 2003148: 80 a0 a0 00 cmp %g2, 0 200314c: 12 80 00 0f bne 2003188 2003150: 01 00 00 00 nop if ( node->info.directory.mt_fs == NULL ) { 2003154: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2003158: 80 a0 a0 00 cmp %g2, 0 200315c: 12 80 00 05 bne 2003170 <== NEVER TAKEN 2003160: 01 00 00 00 nop node->info.directory.mt_fs = mt_entry; 2003164: f0 20 60 5c st %i0, [ %g1 + 0x5c ] #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 2003168: 81 c7 e0 08 ret 200316c: 91 e8 20 00 restore %g0, 0, %o0 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 2003170: 40 00 35 2e call 2010628 <__errno> <== NOT EXECUTED 2003174: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003178: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED 200317c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003180: 81 c7 e0 08 ret <== NOT EXECUTED 2003184: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2003188: 40 00 35 28 call 2010628 <__errno> 200318c: b0 10 3f ff mov -1, %i0 2003190: 82 10 20 14 mov 0x14, %g1 2003194: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2003198: 81 c7 e0 08 ret 200319c: 81 e8 00 00 restore =============================================================================== 0200c534 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 200c534: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200c538: c4 06 20 50 ld [ %i0 + 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 ); 200c53c: 82 06 20 54 add %i0, 0x54, %g1 200c540: 80 a0 80 01 cmp %g2, %g1 200c544: 12 80 00 10 bne 200c584 200c548: 80 a6 00 19 cmp %i0, %i1 errno = ENOTEMPTY; node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 200c54c: 02 80 00 08 be 200c56c 200c550: 01 00 00 00 nop 200c554: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200c558: 80 a0 60 00 cmp %g1, 0 200c55c: 12 80 00 04 bne 200c56c <== NEVER TAKEN 200c560: 01 00 00 00 nop errno = EBUSY; node = NULL; } return node; } 200c564: 81 c7 e0 08 ret 200c568: 81 e8 00 00 restore { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { errno = EBUSY; 200c56c: 40 00 10 2f call 2010628 <__errno> 200c570: b0 10 20 00 clr %i0 200c574: 82 10 20 10 mov 0x10, %g1 200c578: c2 22 00 00 st %g1, [ %o0 ] node = NULL; } return node; } 200c57c: 81 c7 e0 08 ret 200c580: 81 e8 00 00 restore IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 200c584: 40 00 10 29 call 2010628 <__errno> 200c588: b0 10 20 00 clr %i0 200c58c: 82 10 20 5a mov 0x5a, %g1 200c590: c2 22 00 00 st %g1, [ %o0 ] 200c594: 81 c7 e0 08 ret 200c598: 81 e8 00 00 restore =============================================================================== 020031e0 : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 20031e0: c8 02 20 08 ld [ %o0 + 8 ], %g4 IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 20031e4: 80 a2 a0 00 cmp %o2, 0 20031e8: 02 80 00 13 be 2003234 <== NEVER TAKEN 20031ec: 90 10 20 00 clr %o0 20031f0: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 20031f4: c4 48 40 00 ldsb [ %g1 ], %g2 20031f8: 80 a0 a0 00 cmp %g2, 0 20031fc: 02 80 00 0e be 2003234 <== NEVER TAKEN 2003200: c2 08 40 00 ldub [ %g1 ], %g1 2003204: 10 80 00 07 b 2003220 2003208: 84 10 20 00 clr %g2 200320c: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 2003210: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3 2003214: 80 a0 e0 00 cmp %g3, 0 2003218: 02 80 00 07 be 2003234 200321c: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 buf[i] = node->info.sym_link.name[i]; 2003220: c2 2a 40 02 stb %g1, [ %o1 + %g2 ] node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2003224: 90 02 20 01 inc %o0 2003228: 80 a2 00 0a cmp %o0, %o2 200322c: 12 bf ff f8 bne 200320c 2003230: 84 10 00 08 mov %o0, %g2 buf[i] = node->info.sym_link.name[i]; return i; } 2003234: 81 c3 e0 08 retl =============================================================================== 0200323c : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 200323c: 9d e3 bf 98 save %sp, -104, %sp int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 2003240: fa 06 60 08 ld [ %i1 + 8 ], %i5 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 2003244: c2 07 60 08 ld [ %i5 + 8 ], %g1 2003248: 80 a0 60 00 cmp %g1, 0 200324c: 02 80 00 22 be 20032d4 <== NEVER TAKEN 2003250: f4 06 a0 08 ld [ %i2 + 8 ], %i2 if ( namelen < IMFS_NAME_MAX ) { 2003254: 80 a7 20 1f cmp %i4, 0x1f 2003258: 18 80 00 19 bgu 20032bc <== NEVER TAKEN 200325c: 94 10 00 1c mov %i4, %o2 memcpy( node->name, name, namelen ); 2003260: 92 10 00 1b mov %i3, %o1 2003264: 40 00 37 4d call 2010f98 2003268: 90 07 60 0c add %i5, 0xc, %o0 node->name [namelen] = '\0'; 200326c: b8 07 40 1c add %i5, %i4, %i4 2003270: c0 2f 20 0c clrb [ %i4 + 0xc ] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2003274: c2 07 60 04 ld [ %i5 + 4 ], %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2003278: c4 07 40 00 ld [ %i5 ], %g2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 200327c: 86 06 a0 54 add %i2, 0x54, %g3 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2003280: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2003284: c4 20 40 00 st %g2, [ %g1 ] Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2003288: c2 06 a0 58 ld [ %i2 + 0x58 ], %g1 static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 200328c: f4 27 60 08 st %i2, [ %i5 + 8 ] the_node->next = tail; 2003290: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003294: fa 26 a0 58 st %i5, [ %i2 + 0x58 ] old_last->next = the_node; 2003298: fa 20 40 00 st %i5, [ %g1 ] the_node->previous = old_last; 200329c: c2 27 60 04 st %g1, [ %i5 + 4 ] IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 20032a0: 90 07 bf f8 add %fp, -8, %o0 20032a4: 40 00 01 90 call 20038e4 20032a8: 92 10 20 00 clr %o1 20032ac: c2 07 bf f8 ld [ %fp + -8 ], %g1 20032b0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 20032b4: 81 c7 e0 08 ret 20032b8: 91 e8 20 00 restore %g0, 0, %o0 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 20032bc: 40 00 34 db call 2010628 <__errno> <== NOT EXECUTED 20032c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20032c4: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 20032c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20032cc: 81 c7 e0 08 ret <== NOT EXECUTED 20032d0: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 20032d4: 40 00 34 d5 call 2010628 <__errno> <== NOT EXECUTED 20032d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20032dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20032e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20032e4: 81 c7 e0 08 ret <== NOT EXECUTED 20032e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020033e8 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 20033e8: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 20033ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20033f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 20033f4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 20033f8: c4 00 80 00 ld [ %g2 ], %g2 20033fc: 80 a0 a0 00 cmp %g2, 0 2003400: 12 80 00 0f bne 200343c <== NEVER TAKEN 2003404: 01 00 00 00 nop if ( node->info.directory.mt_fs == mt_entry ) { 2003408: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 200340c: 80 a0 80 18 cmp %g2, %i0 2003410: 12 80 00 05 bne 2003424 <== NEVER TAKEN 2003414: 01 00 00 00 nop node->info.directory.mt_fs = NULL; 2003418: c0 20 60 5c clr [ %g1 + 0x5c ] #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 200341c: 81 c7 e0 08 ret 2003420: 91 e8 20 00 restore %g0, 0, %o0 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 2003424: 40 00 34 81 call 2010628 <__errno> <== NOT EXECUTED 2003428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200342c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003430: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003434: 81 c7 e0 08 ret <== NOT EXECUTED 2003438: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 200343c: 40 00 34 7b call 2010628 <__errno> <== NOT EXECUTED 2003440: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003444: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2003448: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 200344c: 81 c7 e0 08 ret <== NOT EXECUTED 2003450: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003b08 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 2003b08: 9d e3 bf a0 save %sp, -96, %sp bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b0c: 3b 00 80 77 sethi %hi(0x201dc00), %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b10: 03 00 80 79 sethi %hi(0x201e400), %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b14: ba 17 60 4c or %i5, 0x4c, %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b18: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b1c: f6 0f 60 31 ldub [ %i5 + 0x31 ], %i3 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b20: 80 a0 60 00 cmp %g1, 0 2003b24: 02 80 00 05 be 2003b38 2003b28: b6 1e e0 01 xor %i3, 1, %i3 (*rtems_malloc_statistics_helpers->initialize)(); 2003b2c: c2 00 40 00 ld [ %g1 ], %g1 2003b30: 9f c0 40 00 call %g1 2003b34: 01 00 00 00 nop } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2003b38: 7f ff ff da call 2003aa0 2003b3c: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2003b40: 03 00 80 79 sethi %hi(0x201e400), %g1 2003b44: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 201e510 2003b48: 80 a0 60 00 cmp %g1, 0 2003b4c: 02 80 00 08 be 2003b6c 2003b50: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2003b54: c2 00 40 00 ld [ %g1 ], %g1 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2003b58: b2 06 00 19 add %i0, %i1, %i1 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2003b5c: 9f c0 40 00 call %g1 2003b60: 92 10 00 1a mov %i2, %o1 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; heap_begin = new_heap_begin; 2003b64: b0 10 00 08 mov %o0, %i0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2003b68: b2 26 40 08 sub %i1, %o0, %i1 * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) { 2003b6c: 80 8e e0 ff btst 0xff, %i3 2003b70: 02 80 00 0d be 2003ba4 2003b74: 39 00 80 77 sethi %hi(0x201dc00), %i4 2003b78: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1 2003b7c: 80 a0 60 00 cmp %g1, 0 2003b80: 12 80 00 11 bne 2003bc4 2003b84: d0 07 21 38 ld [ %i4 + 0x138 ], %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 2003b88: 92 10 00 18 mov %i0, %o1 2003b8c: 94 10 00 19 mov %i1, %o2 2003b90: 40 00 15 07 call 2008fac <_Heap_Initialize> 2003b94: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003b98: 80 a2 20 00 cmp %o0, 0 2003b9c: 02 80 00 17 be 2003bf8 2003ba0: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 2003ba4: 3b 00 80 7a sethi %hi(0x201e800), %i5 2003ba8: d0 07 21 38 ld [ %i4 + 0x138 ], %o0 2003bac: 40 00 18 0a call 2009bd4 <_Protected_heap_Get_size> 2003bb0: f8 07 60 d0 ld [ %i5 + 0xd0 ], %i4 2003bb4: b8 02 00 1c add %o0, %i4, %i4 2003bb8: f8 27 60 d0 st %i4, [ %i5 + 0xd0 ] } 2003bbc: 81 c7 e0 08 ret 2003bc0: 81 e8 00 00 restore * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 2003bc4: 92 10 20 00 clr %o1 2003bc8: 94 10 00 19 mov %i1, %o2 2003bcc: 40 00 35 2f call 2011088 2003bd0: 90 10 00 18 mov %i0, %o0 2003bd4: 39 00 80 77 sethi %hi(0x201dc00), %i4 2003bd8: d0 07 21 38 ld [ %i4 + 0x138 ], %o0 ! 201dd38 2003bdc: 92 10 00 18 mov %i0, %o1 2003be0: 94 10 00 19 mov %i1, %o2 2003be4: 40 00 14 f2 call 2008fac <_Heap_Initialize> 2003be8: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003bec: 80 a2 20 00 cmp %o0, 0 2003bf0: 12 bf ff ee bne 2003ba8 <== ALWAYS TAKEN 2003bf4: 3b 00 80 7a sethi %hi(0x201e800), %i5 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003bf8: 40 00 12 11 call 200843c 2003bfc: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 020072ec : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 20072ec: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 20072f0: 80 a6 3f ff cmp %i0, -1 20072f4: 02 80 00 5d be 2007468 20072f8: b6 06 20 b4 add %i0, 0xb4, %i3 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 20072fc: e0 06 21 40 ld [ %i0 + 0x140 ], %l0 2007300: f4 06 20 b8 ld [ %i0 + 0xb8 ], %i2 } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 2007304: f8 06 c0 00 ld [ %i3 ], %i4 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2007308: 82 06 a0 20 add %i2, 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); 200730c: b8 07 3f f0 add %i4, -16, %i4 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2007310: 86 0f 3f fc and %i4, -4, %g3 2007314: 86 00 40 03 add %g1, %g3, %g3 2007318: 80 a0 40 03 cmp %g1, %g3 200731c: 1a 80 00 12 bcc 2007364 <== NEVER TAKEN 2007320: ba 10 20 00 clr %i5 if (*base != U32_PATTERN) 2007324: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4 2007328: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 200732c: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 2007330: 80 a1 00 02 cmp %g4, %g2 2007334: 22 80 00 08 be,a 2007354 <== ALWAYS TAKEN 2007338: 82 00 60 04 add %g1, 4, %g1 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 ) 200733c: 10 80 00 36 b 2007414 <== NOT EXECUTED 2007340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 2007344: 80 a0 80 04 cmp %g2, %g4 2007348: 12 80 00 32 bne 2007410 200734c: ba 10 20 00 clr %i5 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2007350: 82 00 60 04 add %g1, 4, %g1 2007354: 80 a0 c0 01 cmp %g3, %g1 2007358: 38 bf ff fb bgu,a 2007344 <== ALWAYS TAKEN 200735c: c4 00 40 00 ld [ %g1 ], %g2 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; 2007360: ba 10 20 00 clr %i5 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2007364: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2007368: 02 80 00 32 be 2007430 <== NOT EXECUTED 200736c: 33 00 81 ca sethi %hi(0x2072800), %i1 <== NOT EXECUTED #endif { (*print_handler)( 2007370: e2 06 20 08 ld [ %i0 + 8 ], %l1 2007374: 35 00 81 ca sethi %hi(0x2072800), %i2 2007378: 33 00 81 ca sethi %hi(0x2072800), %i1 200737c: e4 06 a0 44 ld [ %i2 + 0x44 ], %l2 2007380: f0 06 60 48 ld [ %i1 + 0x48 ], %i0 2007384: 94 07 bf f8 add %fp, -8, %o2 2007388: 92 10 20 05 mov 5, %o1 200738c: 40 00 19 3b call 200d878 2007390: 90 10 00 11 mov %l1, %o0 2007394: 13 00 81 94 sethi %hi(0x2065000), %o1 2007398: 96 10 00 08 mov %o0, %o3 200739c: 94 10 00 11 mov %l1, %o2 20073a0: 90 10 00 12 mov %l2, %o0 20073a4: 9f c6 00 00 call %i0 20073a8: 92 12 62 10 or %o1, 0x210, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20073ac: d4 06 e0 04 ld [ %i3 + 4 ], %o2 20073b0: d6 06 c0 00 ld [ %i3 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073b4: c2 06 60 48 ld [ %i1 + 0x48 ], %g1 20073b8: d0 06 a0 44 ld [ %i2 + 0x44 ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20073bc: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073c0: 13 00 81 94 sethi %hi(0x2065000), %o1 20073c4: 96 02 80 0b add %o2, %o3, %o3 20073c8: 92 12 62 30 or %o1, 0x230, %o1 20073cc: 98 10 00 10 mov %l0, %o4 20073d0: 9f c0 40 00 call %g1 20073d4: 9a 10 00 1c mov %i4, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073d8: 03 00 81 ca sethi %hi(0x2072800), %g1 20073dc: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 ! 2072840 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073e0: 07 00 81 ca sethi %hi(0x2072800), %g3 20073e4: 05 00 81 ca sethi %hi(0x2072800), %g2 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073e8: 80 a0 60 00 cmp %g1, 0 (*print_handler)( print_context, "Unavailable\n" ); 20073ec: d0 00 a0 44 ld [ %g2 + 0x44 ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073f0: 02 80 00 19 be 2007454 <== NEVER TAKEN 20073f4: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 20073f8: 94 10 00 1d mov %i5, %o2 20073fc: 13 00 81 94 sethi %hi(0x2065000), %o1 2007400: 9f c0 40 00 call %g1 2007404: 92 12 62 60 or %o1, 0x260, %o1 ! 2065260 2007408: 81 c7 e0 08 ret 200740c: 81 e8 00 00 restore 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 ) 2007410: 80 a0 60 00 cmp %g1, 0 2007414: 02 bf ff d4 be 2007364 <== NEVER TAKEN 2007418: 80 a6 20 00 cmp %i0, 0 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 200741c: ba 06 a0 10 add %i2, 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 ); 2007420: ba 07 40 1c add %i5, %i4, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2007424: 12 bf ff d3 bne 2007370 2007428: ba 27 40 01 sub %i5, %g1, %i5 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 ); 200742c: 33 00 81 ca sethi %hi(0x2072800), %i1 2007430: 35 00 81 ca sethi %hi(0x2072800), %i2 2007434: c2 06 60 48 ld [ %i1 + 0x48 ], %g1 2007438: d0 06 a0 44 ld [ %i2 + 0x44 ], %o0 200743c: 94 10 3f ff mov -1, %o2 2007440: 13 00 81 94 sethi %hi(0x2065000), %o1 2007444: 9f c0 40 00 call %g1 2007448: 92 12 62 20 or %o1, 0x220, %o1 ! 2065220 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 200744c: 10 bf ff d9 b 20073b0 2007450: d4 06 e0 04 ld [ %i3 + 4 ], %o2 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 2007454: 13 00 81 94 sethi %hi(0x2065000), %o1 <== NOT EXECUTED 2007458: 9f c0 40 00 call %g1 <== NOT EXECUTED 200745c: 92 12 62 50 or %o1, 0x250, %o1 ! 2065250 <== NOT EXECUTED 2007460: 81 c7 e0 08 ret <== NOT EXECUTED 2007464: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 2007468: 37 00 81 d5 sethi %hi(0x2075400), %i3 200746c: b6 16 e1 ac or %i3, 0x1ac, %i3 ! 20755ac 2007470: f4 06 e0 04 ld [ %i3 + 4 ], %i2 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 2007474: 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) 2007478: 80 a6 a0 00 cmp %i2, 0 200747c: 12 bf ff a2 bne 2007304 <== ALWAYS TAKEN 2007480: b0 10 20 00 clr %i0 2007484: 81 c7 e0 08 ret <== NOT EXECUTED 2007488: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02007584 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2007584: 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"); 2007588: 11 00 81 94 sethi %hi(0x2065000), %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); 200758c: fa 06 20 b8 ld [ %i0 + 0xb8 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2007590: 40 00 0a 9d call 200a004 2007594: 90 12 22 68 or %o0, 0x268, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2007598: 92 10 00 18 mov %i0, %o1 200759c: 11 00 81 94 sethi %hi(0x2065000), %o0 20075a0: 40 00 0a 99 call 200a004 20075a4: 90 12 22 78 or %o0, 0x278, %o0 ! 2065278 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 20075a8: d2 06 20 08 ld [ %i0 + 8 ], %o1 20075ac: 11 00 81 94 sethi %hi(0x2065000), %o0 20075b0: 40 00 0a 95 call 200a004 20075b4: 90 12 22 98 or %o0, 0x298, %o0 ! 2065298 printk( 20075b8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 20075bc: 11 00 81 94 sethi %hi(0x2065000), %o0 20075c0: 40 00 0a 91 call 200a004 20075c4: 90 12 22 b0 or %o0, 0x2b0, %o0 ! 20652b0 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 20075c8: d0 06 20 08 ld [ %i0 + 8 ], %o0 20075cc: 94 07 bf e0 add %fp, -32, %o2 20075d0: 40 00 18 aa call 200d878 20075d4: 92 10 20 20 mov 0x20, %o1 20075d8: 92 10 00 08 mov %o0, %o1 20075dc: 11 00 81 94 sethi %hi(0x2065000), %o0 20075e0: 40 00 0a 89 call 200a004 20075e4: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 20652c8 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 20075e8: d4 06 20 b8 ld [ %i0 + 0xb8 ], %o2 20075ec: 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( 20075f0: 11 00 81 94 sethi %hi(0x2065000), %o0 20075f4: 96 02 80 09 add %o2, %o1, %o3 20075f8: 40 00 0a 83 call 200a004 20075fc: 90 12 22 e0 or %o0, 0x2e0, %o0 "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 2007600: 80 a6 60 00 cmp %i1, 0 2007604: 02 80 00 04 be 2007614 <== ALWAYS TAKEN 2007608: 92 10 20 10 mov 0x10, %o1 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 200760c: 40 00 1b 7e call 200e404 2007610: 90 10 20 81 mov 0x81, %o0 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 2007614: 11 00 81 94 sethi %hi(0x2065000), %o0 2007618: 94 07 60 08 add %i5, 8, %o2 200761c: 90 12 23 18 or %o0, 0x318, %o0 2007620: 40 00 0a 79 call 200a004 2007624: 96 07 60 18 add %i5, 0x18, %o3 2007628: 30 bf ff f9 b,a 200760c =============================================================================== 02008678 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2008678: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200867c: 39 00 80 7b sethi %hi(0x201ec00), %i4 2008680: fa 07 20 24 ld [ %i4 + 0x24 ], %i5 ! 201ec24 <_API_extensions_List> 2008684: b8 17 20 24 or %i4, 0x24, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2008688: b8 07 20 04 add %i4, 4, %i4 200868c: 80 a7 40 1c cmp %i5, %i4 2008690: 02 80 00 09 be 20086b4 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 2008694: 01 00 00 00 nop * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 2008698: c2 07 60 08 ld [ %i5 + 8 ], %g1 200869c: 9f c0 40 00 call %g1 20086a0: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 20086a4: fa 07 40 00 ld [ %i5 ], %i5 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 20086a8: 80 a7 40 1c cmp %i5, %i4 20086ac: 32 bf ff fc bne,a 200869c <_API_extensions_Run_postdriver+0x24> 20086b0: c2 07 60 08 ld [ %i5 + 8 ], %g1 20086b4: 81 c7 e0 08 ret 20086b8: 81 e8 00 00 restore =============================================================================== 020086bc <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20086bc: 9d e3 bf a0 save %sp, -96, %sp 20086c0: 39 00 80 7b sethi %hi(0x201ec00), %i4 20086c4: fa 07 20 24 ld [ %i4 + 0x24 ], %i5 ! 201ec24 <_API_extensions_List> 20086c8: b8 17 20 24 or %i4, 0x24, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 20086cc: b8 07 20 04 add %i4, 4, %i4 20086d0: 80 a7 40 1c cmp %i5, %i4 20086d4: 02 80 00 0a be 20086fc <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 20086d8: 37 00 80 7b sethi %hi(0x201ec00), %i3 20086dc: b6 16 e3 70 or %i3, 0x370, %i3 ! 201ef70 <_Per_CPU_Information> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 20086e0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 20086e4: 9f c0 40 00 call %g1 20086e8: d0 06 e0 0c ld [ %i3 + 0xc ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 20086ec: fa 07 40 00 ld [ %i5 ], %i5 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 20086f0: 80 a7 40 1c cmp %i5, %i4 20086f4: 32 bf ff fc bne,a 20086e4 <_API_extensions_Run_postswitch+0x28> 20086f8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 20086fc: 81 c7 e0 08 ret 2008700: 81 e8 00 00 restore =============================================================================== 0200ad30 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200ad30: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 200ad34: 03 00 80 87 sethi %hi(0x2021c00), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 200ad38: 7f ff e3 49 call 2003a5c 200ad3c: fa 00 63 ac ld [ %g1 + 0x3ac ], %i5 ! 2021fac <_Per_CPU_Information+0xc> 200ad40: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 200ad44: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200ad48: 80 a0 60 00 cmp %g1, 0 200ad4c: 02 80 00 2b be 200adf8 <_CORE_RWLock_Release+0xc8> 200ad50: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 200ad54: 22 80 00 22 be,a 200addc <_CORE_RWLock_Release+0xac> 200ad58: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 200ad5c: c0 27 60 34 clr [ %i5 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 200ad60: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 200ad64: 7f ff e3 42 call 2003a6c 200ad68: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 200ad6c: 40 00 08 18 call 200cdcc <_Thread_queue_Dequeue> 200ad70: 90 10 00 18 mov %i0, %o0 if ( next ) { 200ad74: 80 a2 20 00 cmp %o0, 0 200ad78: 22 80 00 24 be,a 200ae08 <_CORE_RWLock_Release+0xd8> 200ad7c: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 200ad80: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 200ad84: 80 a0 60 01 cmp %g1, 1 200ad88: 02 80 00 22 be 200ae10 <_CORE_RWLock_Release+0xe0> 200ad8c: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200ad90: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200ad94: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200ad98: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200ad9c: 10 80 00 09 b 200adc0 <_CORE_RWLock_Release+0x90> 200ada0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 200ada4: 80 a0 60 01 cmp %g1, 1 200ada8: 02 80 00 0b be 200add4 <_CORE_RWLock_Release+0xa4> <== NEVER TAKEN 200adac: 90 10 00 18 mov %i0, %o0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 200adb0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200adb4: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 200adb8: 40 00 09 15 call 200d20c <_Thread_queue_Extract> 200adbc: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 200adc0: 40 00 09 64 call 200d350 <_Thread_queue_First> 200adc4: 90 10 00 18 mov %i0, %o0 if ( !next || 200adc8: 92 92 20 00 orcc %o0, 0, %o1 200adcc: 32 bf ff f6 bne,a 200ada4 <_CORE_RWLock_Release+0x74> 200add0: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200add4: 81 c7 e0 08 ret 200add8: 91 e8 20 00 restore %g0, 0, %o0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 200addc: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 200ade0: 80 a0 60 00 cmp %g1, 0 200ade4: 02 bf ff de be 200ad5c <_CORE_RWLock_Release+0x2c> 200ade8: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 200adec: 7f ff e3 20 call 2003a6c 200adf0: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 200adf4: 30 80 00 05 b,a 200ae08 <_CORE_RWLock_Release+0xd8> * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 200adf8: 7f ff e3 1d call 2003a6c 200adfc: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200ae00: 82 10 20 02 mov 2, %g1 200ae04: c2 27 60 34 st %g1, [ %i5 + 0x34 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200ae08: 81 c7 e0 08 ret 200ae0c: 81 e8 00 00 restore next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 200ae10: 82 10 20 02 mov 2, %g1 200ae14: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200ae18: 81 c7 e0 08 ret 200ae1c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200ae20 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 200ae20: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200ae24: 90 10 00 18 mov %i0, %o0 200ae28: 40 00 07 0e call 200ca60 <_Thread_Get> 200ae2c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200ae30: c2 07 bf fc ld [ %fp + -4 ], %g1 200ae34: 80 a0 60 00 cmp %g1, 0 200ae38: 12 80 00 09 bne 200ae5c <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 200ae3c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200ae40: 40 00 09 86 call 200d458 <_Thread_queue_Process_timeout> 200ae44: 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--; 200ae48: 03 00 80 86 sethi %hi(0x2021800), %g1 200ae4c: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 2021a60 <_Thread_Dispatch_disable_level> 200ae50: 84 00 bf ff add %g2, -1, %g2 200ae54: c4 20 62 60 st %g2, [ %g1 + 0x260 ] return _Thread_Dispatch_disable_level; 200ae58: c2 00 62 60 ld [ %g1 + 0x260 ], %g1 200ae5c: 81 c7 e0 08 ret 200ae60: 81 e8 00 00 restore =============================================================================== 02011a08 <_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 ) { 2011a08: 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; the_message_queue->number_of_pending_messages = 0; 2011a0c: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 2011a10: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 2011a14: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 2011a18: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2011a1c: c0 26 20 64 clr [ %i0 + 0x64 ] /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 2011a20: 80 8e e0 03 btst 3, %i3 2011a24: 02 80 00 0a be 2011a4c <_CORE_message_queue_Initialize+0x44> 2011a28: b8 10 00 1b mov %i3, %i4 allocated_message_size += sizeof(uint32_t); 2011a2c: b8 06 e0 04 add %i3, 4, %i4 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2011a30: b8 0f 3f fc and %i4, -4, %i4 } if (allocated_message_size < maximum_message_size) 2011a34: 80 a6 c0 1c cmp %i3, %i4 2011a38: 08 80 00 05 bleu 2011a4c <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2011a3c: ba 10 20 00 clr %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2011a40: b0 0f 60 01 and %i5, 1, %i0 2011a44: 81 c7 e0 08 ret 2011a48: 81 e8 00 00 restore /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 2011a4c: b8 07 20 14 add %i4, 0x14, %i4 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2011a50: 90 10 20 00 clr %o0 2011a54: 92 10 00 1a mov %i2, %o1 2011a58: 94 10 20 00 clr %o2 2011a5c: 96 10 00 1c mov %i4, %o3 2011a60: 40 00 45 56 call 2022fb8 <__muldi3> 2011a64: ba 10 20 00 clr %i5 if ( x > SIZE_MAX ) 2011a68: 80 a2 20 00 cmp %o0, 0 2011a6c: 34 bf ff f6 bg,a 2011a44 <_CORE_message_queue_Initialize+0x3c> 2011a70: b0 0f 60 01 and %i5, 1, %i0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 2011a74: 40 00 0c ea call 2014e1c <_Workspace_Allocate> 2011a78: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2011a7c: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2011a80: 80 a2 20 00 cmp %o0, 0 2011a84: 02 bf ff ef be 2011a40 <_CORE_message_queue_Initialize+0x38> 2011a88: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2011a8c: 90 06 20 68 add %i0, 0x68, %o0 2011a90: 94 10 00 1a mov %i2, %o2 2011a94: 7f ff ff c3 call 20119a0 <_Chain_Initialize> 2011a98: 96 10 00 1c mov %i4, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 2011a9c: c4 06 40 00 ld [ %i1 ], %g2 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 ); 2011aa0: 82 06 20 50 add %i0, 0x50, %g1 2011aa4: 84 18 a0 01 xor %g2, 1, %g2 2011aa8: 80 a0 00 02 cmp %g0, %g2 2011aac: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2011ab0: c2 26 20 58 st %g1, [ %i0 + 0x58 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2011ab4: c4 26 20 50 st %g2, [ %i0 + 0x50 ] 2011ab8: 90 10 00 18 mov %i0, %o0 head->previous = NULL; 2011abc: c0 26 20 54 clr [ %i0 + 0x54 ] 2011ac0: 92 60 3f ff subx %g0, -1, %o1 2011ac4: 94 10 20 80 mov 0x80, %o2 2011ac8: 96 10 20 06 mov 6, %o3 2011acc: 40 00 0a 7a call 20144b4 <_Thread_queue_Initialize> 2011ad0: ba 10 20 01 mov 1, %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2011ad4: b0 0f 60 01 and %i5, 1, %i0 2011ad8: 81 c7 e0 08 ret 2011adc: 81 e8 00 00 restore =============================================================================== 02008c60 <_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 ) { 2008c60: 9d e3 bf a0 save %sp, -96, %sp 2008c64: ba 10 00 18 mov %i0, %i5 Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008c68: b0 10 20 00 clr %i0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2008c6c: 40 00 07 de call 200abe4 <_Thread_queue_Dequeue> 2008c70: 90 10 00 1d mov %i5, %o0 2008c74: 80 a2 20 00 cmp %o0, 0 2008c78: 02 80 00 04 be 2008c88 <_CORE_semaphore_Surrender+0x28> 2008c7c: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 2008c80: 81 c7 e0 08 ret 2008c84: 81 e8 00 00 restore if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2008c88: 7f ff e6 8c call 20026b8 2008c8c: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2008c90: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2008c94: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2008c98: 80 a0 40 02 cmp %g1, %g2 2008c9c: 1a 80 00 05 bcc 2008cb0 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 2008ca0: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2008ca4: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008ca8: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2008cac: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2008cb0: 7f ff e6 86 call 20026c8 2008cb4: 01 00 00 00 nop } return status; } 2008cb8: 81 c7 e0 08 ret 2008cbc: 81 e8 00 00 restore =============================================================================== 02008850 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 2008850: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 2008854: c0 26 20 04 clr [ %i0 + 4 ] size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2008858: ba 06 20 04 add %i0, 4, %i5 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200885c: 80 a6 a0 00 cmp %i2, 0 2008860: 02 80 00 12 be 20088a8 <_Chain_Initialize+0x58> <== NEVER TAKEN 2008864: 90 10 00 18 mov %i0, %o0 2008868: b4 06 bf ff add %i2, -1, %i2 { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 200886c: 82 10 00 19 mov %i1, %g1 head->previous = NULL; while ( count-- ) { 2008870: 92 10 00 1a mov %i2, %o1 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 2008874: 10 80 00 05 b 2008888 <_Chain_Initialize+0x38> 2008878: 84 10 00 18 mov %i0, %g2 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200887c: 84 10 00 01 mov %g1, %g2 2008880: b4 06 bf ff add %i2, -1, %i2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 2008884: 82 10 00 03 mov %g3, %g1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 2008888: c2 20 80 00 st %g1, [ %g2 ] next->previous = current; 200888c: c4 20 60 04 st %g2, [ %g1 + 4 ] Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 2008890: 80 a6 a0 00 cmp %i2, 0 2008894: 12 bf ff fa bne 200887c <_Chain_Initialize+0x2c> 2008898: 86 00 40 1b add %g1, %i3, %g3 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 200889c: 40 00 43 11 call 20194e0 <.umul> 20088a0: 90 10 00 1b mov %i3, %o0 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 20088a4: 90 06 40 08 add %i1, %o0, %o0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 20088a8: fa 22 00 00 st %i5, [ %o0 ] tail->previous = current; 20088ac: d0 26 20 08 st %o0, [ %i0 + 8 ] } 20088b0: 81 c7 e0 08 ret 20088b4: 81 e8 00 00 restore =============================================================================== 0200788c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 200788c: 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 ]; 2007890: fa 06 21 58 ld [ %i0 + 0x158 ], %i5 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2007894: 7f ff eb 89 call 20026b8 2007898: f8 06 20 30 ld [ %i0 + 0x30 ], %i4 pending_events = api->pending_events; 200789c: c4 07 40 00 ld [ %i5 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 20078a0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 20078a4: 86 88 40 02 andcc %g1, %g2, %g3 20078a8: 02 80 00 39 be 200798c <_Event_Surrender+0x100> 20078ac: 09 00 80 7b sethi %hi(0x201ec00), %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() && 20078b0: 88 11 23 70 or %g4, 0x370, %g4 ! 201ef70 <_Per_CPU_Information> 20078b4: f2 01 20 08 ld [ %g4 + 8 ], %i1 20078b8: 80 a6 60 00 cmp %i1, 0 20078bc: 32 80 00 1c bne,a 200792c <_Event_Surrender+0xa0> 20078c0: c8 01 20 0c ld [ %g4 + 0xc ], %g4 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 20078c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 20078c8: 80 89 21 00 btst 0x100, %g4 20078cc: 02 80 00 30 be 200798c <_Event_Surrender+0x100> 20078d0: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 20078d4: 02 80 00 04 be 20078e4 <_Event_Surrender+0x58> 20078d8: 80 8f 20 02 btst 2, %i4 20078dc: 02 80 00 2c be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN 20078e0: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20078e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 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) ); 20078e8: 84 28 80 03 andn %g2, %g3, %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 ); 20078ec: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 20078f0: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20078f4: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 20078f8: 7f ff eb 74 call 20026c8 20078fc: 01 00 00 00 nop 2007900: 7f ff eb 6e call 20026b8 2007904: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2007908: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200790c: 80 a0 60 02 cmp %g1, 2 2007910: 02 80 00 21 be 2007994 <_Event_Surrender+0x108> 2007914: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2007918: 7f ff eb 6c call 20026c8 200791c: 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 ); 2007920: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2007924: 40 00 0a d6 call 200a47c <_Thread_Clear_state> 2007928: 81 e8 00 00 restore /* * 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() && 200792c: 80 a6 00 04 cmp %i0, %g4 2007930: 32 bf ff e6 bne,a 20078c8 <_Event_Surrender+0x3c> 2007934: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2007938: 09 00 80 7c sethi %hi(0x201f000), %g4 200793c: f2 01 23 70 ld [ %g4 + 0x370 ], %i1 ! 201f370 <_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 ) && 2007940: 80 a6 60 02 cmp %i1, 2 2007944: 02 80 00 07 be 2007960 <_Event_Surrender+0xd4> <== NEVER TAKEN 2007948: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 200794c: f2 01 23 70 ld [ %g4 + 0x370 ], %i1 * 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) || 2007950: 80 a6 60 01 cmp %i1, 1 2007954: 32 bf ff dd bne,a 20078c8 <_Event_Surrender+0x3c> 2007958: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 200795c: 80 a0 40 03 cmp %g1, %g3 2007960: 02 80 00 04 be 2007970 <_Event_Surrender+0xe4> 2007964: 80 8f 20 02 btst 2, %i4 2007968: 02 80 00 09 be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN 200796c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007970: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2007974: 84 28 80 03 andn %g2, %g3, %g2 if ( _ISR_Is_in_progress() && _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 ); 2007978: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 200797c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007980: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2007984: 82 10 20 03 mov 3, %g1 2007988: c2 21 23 70 st %g1, [ %g4 + 0x370 ] _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200798c: 7f ff eb 4f call 20026c8 2007990: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2007994: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2007998: 7f ff eb 4c call 20026c8 200799c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 20079a0: 40 00 0f 8f call 200b7dc <_Watchdog_Remove> 20079a4: 90 06 20 48 add %i0, 0x48, %o0 20079a8: b2 16 63 f8 or %i1, 0x3f8, %i1 20079ac: 40 00 0a b4 call 200a47c <_Thread_Clear_state> 20079b0: 81 e8 00 00 restore =============================================================================== 020079b4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20079b4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20079b8: 90 10 00 18 mov %i0, %o0 20079bc: 40 00 0b af call 200a878 <_Thread_Get> 20079c0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20079c4: c2 07 bf fc ld [ %fp + -4 ], %g1 20079c8: 80 a0 60 00 cmp %g1, 0 20079cc: 12 80 00 16 bne 2007a24 <_Event_Timeout+0x70> <== NEVER TAKEN 20079d0: 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 ); 20079d4: 7f ff eb 39 call 20026b8 20079d8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 20079dc: 03 00 80 7b sethi %hi(0x201ec00), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 20079e0: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201ef7c <_Per_CPU_Information+0xc> 20079e4: 80 a7 40 01 cmp %i5, %g1 20079e8: 02 80 00 11 be 2007a2c <_Event_Timeout+0x78> 20079ec: c0 27 60 24 clr [ %i5 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20079f0: 82 10 20 06 mov 6, %g1 20079f4: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 20079f8: 7f ff eb 34 call 20026c8 20079fc: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007a00: 90 10 00 1d mov %i5, %o0 2007a04: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2007a08: 40 00 0a 9d call 200a47c <_Thread_Clear_state> 2007a0c: 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--; 2007a10: 03 00 80 7a sethi %hi(0x201e800), %g1 2007a14: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201ea30 <_Thread_Dispatch_disable_level> 2007a18: 84 00 bf ff add %g2, -1, %g2 2007a1c: c4 20 62 30 st %g2, [ %g1 + 0x230 ] return _Thread_Dispatch_disable_level; 2007a20: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 2007a24: 81 c7 e0 08 ret 2007a28: 81 e8 00 00 restore } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 2007a2c: 03 00 80 7c sethi %hi(0x201f000), %g1 2007a30: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 201f370 <_Event_Sync_state> 2007a34: 80 a0 a0 01 cmp %g2, 1 2007a38: 32 bf ff ef bne,a 20079f4 <_Event_Timeout+0x40> 2007a3c: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2007a40: 84 10 20 02 mov 2, %g2 2007a44: c4 20 63 70 st %g2, [ %g1 + 0x370 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2007a48: 10 bf ff eb b 20079f4 <_Event_Timeout+0x40> 2007a4c: 82 10 20 06 mov 6, %g1 =============================================================================== 0200e09c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200e09c: 9d e3 bf 98 save %sp, -104, %sp 200e0a0: ba 10 00 18 mov %i0, %i5 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 200e0a4: a0 06 60 04 add %i1, 4, %l0 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 200e0a8: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 200e0ac: 80 a6 40 10 cmp %i1, %l0 200e0b0: 18 80 00 23 bgu 200e13c <_Heap_Allocate_aligned_with_boundary+0xa0> 200e0b4: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200e0b8: 80 a6 e0 00 cmp %i3, 0 200e0bc: 12 80 00 7d bne 200e2b0 <_Heap_Allocate_aligned_with_boundary+0x214> 200e0c0: 80 a6 40 1b cmp %i1, %i3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200e0c4: e2 07 60 08 ld [ %i5 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200e0c8: 80 a7 40 11 cmp %i5, %l1 200e0cc: 02 80 00 18 be 200e12c <_Heap_Allocate_aligned_with_boundary+0x90> 200e0d0: b8 10 20 00 clr %i4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200e0d4: 82 05 a0 07 add %l6, 7, %g1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200e0d8: ae 10 20 04 mov 4, %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200e0dc: c2 27 bf fc st %g1, [ %fp + -4 ] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200e0e0: 10 80 00 0b b 200e10c <_Heap_Allocate_aligned_with_boundary+0x70> 200e0e4: ae 25 c0 19 sub %l7, %i1, %l7 * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { 200e0e8: 12 80 00 17 bne 200e144 <_Heap_Allocate_aligned_with_boundary+0xa8> 200e0ec: b0 04 60 08 add %l1, 8, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e0f0: 80 a6 20 00 cmp %i0, 0 200e0f4: 12 80 00 5b bne 200e260 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200e0f8: b8 07 20 01 inc %i4 break; } block = block->next; 200e0fc: e2 04 60 08 ld [ %l1 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200e100: 80 a7 40 11 cmp %i5, %l1 200e104: 22 80 00 0b be,a 200e130 <_Heap_Allocate_aligned_with_boundary+0x94> 200e108: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 200e10c: e4 04 60 04 ld [ %l1 + 4 ], %l2 200e110: 80 a4 00 12 cmp %l0, %l2 200e114: 0a bf ff f5 bcs 200e0e8 <_Heap_Allocate_aligned_with_boundary+0x4c> 200e118: 80 a6 a0 00 cmp %i2, 0 if ( alloc_begin != 0 ) { break; } block = block->next; 200e11c: e2 04 60 08 ld [ %l1 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200e120: 80 a7 40 11 cmp %i5, %l1 200e124: 12 bf ff fa bne 200e10c <_Heap_Allocate_aligned_with_boundary+0x70> 200e128: b8 07 20 01 inc %i4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200e12c: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200e130: 80 a0 40 1c cmp %g1, %i4 200e134: 0a 80 00 5a bcs 200e29c <_Heap_Allocate_aligned_with_boundary+0x200> 200e138: b0 10 20 00 clr %i0 stats->max_search = search_count; } return (void *) alloc_begin; } 200e13c: 81 c7 e0 08 ret 200e140: 81 e8 00 00 restore uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200e144: c4 07 bf fc ld [ %fp + -4 ], %g2 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200e148: ea 07 60 14 ld [ %i5 + 0x14 ], %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; 200e14c: a4 0c bf fe and %l2, -2, %l2 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200e150: 82 20 80 15 sub %g2, %l5, %g1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 200e154: a4 04 40 12 add %l1, %l2, %l2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e158: 92 10 00 1a mov %i2, %o1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 200e15c: b0 05 c0 12 add %l7, %l2, %i0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200e160: a4 00 40 12 add %g1, %l2, %l2 200e164: 40 00 2d c5 call 2019878 <.urem> 200e168: 90 10 00 18 mov %i0, %o0 200e16c: b0 26 00 08 sub %i0, %o0, %i0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 200e170: 80 a4 80 18 cmp %l2, %i0 200e174: 1a 80 00 06 bcc 200e18c <_Heap_Allocate_aligned_with_boundary+0xf0> 200e178: a8 04 60 08 add %l1, 8, %l4 200e17c: 90 10 00 12 mov %l2, %o0 200e180: 40 00 2d be call 2019878 <.urem> 200e184: 92 10 00 1a mov %i2, %o1 200e188: b0 24 80 08 sub %l2, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200e18c: 80 a6 e0 00 cmp %i3, 0 200e190: 02 80 00 24 be 200e220 <_Heap_Allocate_aligned_with_boundary+0x184> 200e194: 80 a5 00 18 cmp %l4, %i0 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 200e198: a4 06 00 19 add %i0, %i1, %l2 200e19c: 92 10 00 1b mov %i3, %o1 200e1a0: 40 00 2d b6 call 2019878 <.urem> 200e1a4: 90 10 00 12 mov %l2, %o0 200e1a8: 90 24 80 08 sub %l2, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200e1ac: 80 a6 00 08 cmp %i0, %o0 200e1b0: 1a 80 00 1b bcc 200e21c <_Heap_Allocate_aligned_with_boundary+0x180> 200e1b4: 80 a2 00 12 cmp %o0, %l2 200e1b8: 1a 80 00 1a bcc 200e220 <_Heap_Allocate_aligned_with_boundary+0x184> 200e1bc: 80 a5 00 18 cmp %l4, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200e1c0: a6 05 00 19 add %l4, %i1, %l3 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200e1c4: 80 a4 c0 08 cmp %l3, %o0 200e1c8: 08 80 00 08 bleu 200e1e8 <_Heap_Allocate_aligned_with_boundary+0x14c> 200e1cc: b0 10 20 00 clr %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e1d0: 10 bf ff c9 b 200e0f4 <_Heap_Allocate_aligned_with_boundary+0x58> 200e1d4: 80 a6 20 00 cmp %i0, 0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200e1d8: 1a 80 00 11 bcc 200e21c <_Heap_Allocate_aligned_with_boundary+0x180> 200e1dc: 80 a4 c0 08 cmp %l3, %o0 if ( boundary_line < boundary_floor ) { 200e1e0: 18 bf ff c4 bgu 200e0f0 <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN 200e1e4: b0 10 20 00 clr %i0 return 0; } alloc_begin = boundary_line - alloc_size; 200e1e8: b0 22 00 19 sub %o0, %i1, %i0 200e1ec: 92 10 00 1a mov %i2, %o1 200e1f0: 40 00 2d a2 call 2019878 <.urem> 200e1f4: 90 10 00 18 mov %i0, %o0 200e1f8: 92 10 00 1b mov %i3, %o1 200e1fc: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200e200: a4 06 00 19 add %i0, %i1, %l2 200e204: 40 00 2d 9d call 2019878 <.urem> 200e208: 90 10 00 12 mov %l2, %o0 200e20c: 90 24 80 08 sub %l2, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200e210: 80 a2 00 12 cmp %o0, %l2 200e214: 0a bf ff f1 bcs 200e1d8 <_Heap_Allocate_aligned_with_boundary+0x13c> 200e218: 80 a6 00 08 cmp %i0, %o0 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 200e21c: 80 a5 00 18 cmp %l4, %i0 200e220: 18 80 00 22 bgu 200e2a8 <_Heap_Allocate_aligned_with_boundary+0x20c> 200e224: 82 10 3f f8 mov -8, %g1 200e228: 90 10 00 18 mov %i0, %o0 200e22c: a4 20 40 11 sub %g1, %l1, %l2 200e230: 92 10 00 16 mov %l6, %o1 200e234: 40 00 2d 91 call 2019878 <.urem> 200e238: a4 04 80 18 add %l2, %i0, %l2 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; if ( free_size >= min_block_size || free_size == 0 ) { 200e23c: 90 a4 80 08 subcc %l2, %o0, %o0 200e240: 02 bf ff ad be 200e0f4 <_Heap_Allocate_aligned_with_boundary+0x58> 200e244: 80 a6 20 00 cmp %i0, 0 200e248: 80 a2 00 15 cmp %o0, %l5 return alloc_begin; } } return 0; 200e24c: 82 40 3f ff addx %g0, -1, %g1 200e250: b0 0e 00 01 and %i0, %g1, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e254: 80 a6 20 00 cmp %i0, 0 200e258: 02 bf ff a9 be 200e0fc <_Heap_Allocate_aligned_with_boundary+0x60> 200e25c: b8 07 20 01 inc %i4 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200e260: c4 07 60 48 ld [ %i5 + 0x48 ], %g2 stats->searches += search_count; 200e264: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200e268: 84 00 a0 01 inc %g2 stats->searches += search_count; 200e26c: 82 00 40 1c add %g1, %i4, %g1 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200e270: c4 27 60 48 st %g2, [ %i5 + 0x48 ] stats->searches += search_count; 200e274: c2 27 60 4c st %g1, [ %i5 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200e278: 90 10 00 1d mov %i5, %o0 200e27c: 92 10 00 11 mov %l1, %o1 200e280: 94 10 00 18 mov %i0, %o2 200e284: 7f ff eb 9e call 20090fc <_Heap_Block_allocate> 200e288: 96 10 00 19 mov %i1, %o3 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200e28c: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200e290: 80 a0 40 1c cmp %g1, %i4 200e294: 1a 80 00 03 bcc 200e2a0 <_Heap_Allocate_aligned_with_boundary+0x204> 200e298: 01 00 00 00 nop stats->max_search = search_count; 200e29c: f8 27 60 44 st %i4, [ %i5 + 0x44 ] } return (void *) alloc_begin; } 200e2a0: 81 c7 e0 08 ret 200e2a4: 81 e8 00 00 restore if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 200e2a8: 10 bf ff 92 b 200e0f0 <_Heap_Allocate_aligned_with_boundary+0x54> 200e2ac: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200e2b0: 18 bf ff a3 bgu 200e13c <_Heap_Allocate_aligned_with_boundary+0xa0> 200e2b4: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 200e2b8: 22 bf ff 83 be,a 200e0c4 <_Heap_Allocate_aligned_with_boundary+0x28> 200e2bc: b4 10 00 16 mov %l6, %i2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200e2c0: 10 bf ff 82 b 200e0c8 <_Heap_Allocate_aligned_with_boundary+0x2c> 200e2c4: e2 07 60 08 ld [ %i5 + 8 ], %l1 =============================================================================== 0200e2dc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200e2dc: 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; 200e2e0: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200e2e4: 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; 200e2e8: 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; 200e2ec: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 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; 200e2f0: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 200e2f4: 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; 200e2f8: 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 ) { 200e2fc: 80 a6 40 1d cmp %i1, %i5 200e300: 08 80 00 05 bleu 200e314 <_Heap_Extend+0x38> 200e304: a2 10 20 00 clr %l1 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 200e308: b0 0c 60 01 and %l1, 1, %i0 200e30c: 81 c7 e0 08 ret 200e310: 81 e8 00 00 restore if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200e314: 90 10 00 19 mov %i1, %o0 200e318: 92 10 00 1a mov %i2, %o1 200e31c: 94 10 00 10 mov %l0, %o2 200e320: 98 07 bf f8 add %fp, -8, %o4 200e324: 7f ff eb 17 call 2008f80 <_Heap_Get_first_and_last_block> 200e328: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200e32c: 80 8a 20 ff btst 0xff, %o0 200e330: 02 bf ff f6 be 200e308 <_Heap_Extend+0x2c> 200e334: aa 10 20 00 clr %l5 200e338: a2 10 00 1c mov %i4, %l1 200e33c: ac 10 20 00 clr %l6 200e340: a6 10 20 00 clr %l3 200e344: 10 80 00 14 b 200e394 <_Heap_Extend+0xb8> 200e348: a8 10 20 00 clr %l4 return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200e34c: 2a 80 00 02 bcs,a 200e354 <_Heap_Extend+0x78> 200e350: ac 10 00 11 mov %l1, %l6 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e354: 90 10 00 1a mov %i2, %o0 200e358: 40 00 2e 0f call 2019b94 <.urem> 200e35c: 92 10 00 10 mov %l0, %o1 200e360: 82 06 bf f8 add %i2, -8, %g1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200e364: 80 a6 80 19 cmp %i2, %i1 200e368: 02 80 00 1c be 200e3d8 <_Heap_Extend+0xfc> 200e36c: 82 20 40 08 sub %g1, %o0, %g1 start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200e370: 80 a6 40 1a cmp %i1, %i2 200e374: 38 80 00 02 bgu,a 200e37c <_Heap_Extend+0xa0> 200e378: aa 10 00 01 mov %g1, %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; 200e37c: e2 00 60 04 ld [ %g1 + 4 ], %l1 200e380: a2 0c 7f fe and %l1, -2, %l1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e384: a2 00 40 11 add %g1, %l1, %l1 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200e388: 80 a7 00 11 cmp %i4, %l1 200e38c: 22 80 00 1b be,a 200e3f8 <_Heap_Extend+0x11c> 200e390: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 200e394: 80 a4 40 1c cmp %l1, %i4 200e398: 02 80 00 66 be 200e530 <_Heap_Extend+0x254> 200e39c: 82 10 00 11 mov %l1, %g1 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 ( 200e3a0: 80 a0 40 1d cmp %g1, %i5 200e3a4: 0a 80 00 70 bcs 200e564 <_Heap_Extend+0x288> 200e3a8: f4 04 40 00 ld [ %l1 ], %i2 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 200e3ac: 80 a0 40 1d cmp %g1, %i5 200e3b0: 12 bf ff e7 bne 200e34c <_Heap_Extend+0x70> 200e3b4: 80 a7 40 1a cmp %i5, %i2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e3b8: 90 10 00 1a mov %i2, %o0 200e3bc: 40 00 2d f6 call 2019b94 <.urem> 200e3c0: 92 10 00 10 mov %l0, %o1 200e3c4: 82 06 bf f8 add %i2, -8, %g1 200e3c8: a8 10 00 11 mov %l1, %l4 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200e3cc: 80 a6 80 19 cmp %i2, %i1 200e3d0: 12 bf ff e8 bne 200e370 <_Heap_Extend+0x94> <== ALWAYS TAKEN 200e3d4: 82 20 40 08 sub %g1, %o0, %g1 start_block->prev_size = extend_area_end; 200e3d8: fa 24 40 00 st %i5, [ %l1 ] - 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; 200e3dc: e2 00 60 04 ld [ %g1 + 4 ], %l1 200e3e0: a2 0c 7f fe and %l1, -2, %l1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e3e4: a2 00 40 11 add %g1, %l1, %l1 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200e3e8: 80 a7 00 11 cmp %i4, %l1 200e3ec: 12 bf ff ea bne 200e394 <_Heap_Extend+0xb8> <== NEVER TAKEN 200e3f0: a6 10 00 01 mov %g1, %l3 if ( extend_area_begin < heap->area_begin ) { 200e3f4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200e3f8: 80 a6 40 01 cmp %i1, %g1 200e3fc: 3a 80 00 55 bcc,a 200e550 <_Heap_Extend+0x274> 200e400: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200e404: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 200e408: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e40c: c4 07 bf fc ld [ %fp + -4 ], %g2 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 ) { 200e410: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 200e414: 86 20 80 01 sub %g2, %g1, %g3 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 200e418: fa 20 40 00 st %i5, [ %g1 ] extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200e41c: b8 10 e0 01 or %g3, 1, %i4 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 = 200e420: f8 20 60 04 st %i4, [ %g1 + 4 ] extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 200e424: c6 20 80 00 st %g3, [ %g2 ] 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 ) { 200e428: 80 a1 00 01 cmp %g4, %g1 200e42c: 08 80 00 43 bleu 200e538 <_Heap_Extend+0x25c> 200e430: c0 20 a0 04 clr [ %g2 + 4 ] heap->first_block = extend_first_block; 200e434: c2 26 20 20 st %g1, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200e438: 80 a5 20 00 cmp %l4, 0 200e43c: 02 80 00 63 be 200e5c8 <_Heap_Extend+0x2ec> 200e440: 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; 200e444: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 200e448: 92 10 00 1c mov %i4, %o1 200e44c: 40 00 2d d2 call 2019b94 <.urem> 200e450: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200e454: 80 a2 20 00 cmp %o0, 0 200e458: 02 80 00 04 be 200e468 <_Heap_Extend+0x18c> 200e45c: c4 05 00 00 ld [ %l4 ], %g2 return value - remainder + alignment; 200e460: b2 06 40 1c add %i1, %i4, %i1 200e464: 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 = 200e468: 82 06 7f f8 add %i1, -8, %g1 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; 200e46c: c4 26 7f f8 st %g2, [ %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 = 200e470: 84 25 00 01 sub %l4, %g1, %g2 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; 200e474: 84 10 a0 01 or %g2, 1, %g2 _Heap_Free_block( heap, new_first_block ); 200e478: 90 10 00 18 mov %i0, %o0 200e47c: 92 10 00 01 mov %g1, %o1 200e480: 7f ff ff 8d call 200e2b4 <_Heap_Free_block> 200e484: c4 26 7f fc st %g2, [ %i1 + -4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200e488: 80 a4 e0 00 cmp %l3, 0 200e48c: 02 80 00 3b be 200e578 <_Heap_Extend+0x29c> 200e490: 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); 200e494: 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( 200e498: ba 27 40 13 sub %i5, %l3, %i5 200e49c: 40 00 2d be call 2019b94 <.urem> 200e4a0: 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) 200e4a4: c2 04 e0 04 ld [ %l3 + 4 ], %g1 200e4a8: ba 27 40 08 sub %i5, %o0, %i5 200e4ac: 82 20 40 1d sub %g1, %i5, %g1 | HEAP_PREV_BLOCK_USED; 200e4b0: 82 10 60 01 or %g1, 1, %g1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200e4b4: 84 07 40 13 add %i5, %l3, %g2 200e4b8: c2 20 a0 04 st %g1, [ %g2 + 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; 200e4bc: c2 04 e0 04 ld [ %l3 + 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 ); 200e4c0: 90 10 00 18 mov %i0, %o0 200e4c4: 82 08 60 01 and %g1, 1, %g1 200e4c8: 92 10 00 13 mov %l3, %o1 block->size_and_flag = size | flag; 200e4cc: ba 17 40 01 or %i5, %g1, %i5 200e4d0: 7f ff ff 79 call 200e2b4 <_Heap_Free_block> 200e4d4: fa 24 e0 04 st %i5, [ %l3 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200e4d8: 80 a4 e0 00 cmp %l3, 0 200e4dc: 02 80 00 34 be 200e5ac <_Heap_Extend+0x2d0> 200e4e0: 80 a5 20 00 cmp %l4, 0 */ 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 200e4e4: 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( 200e4e8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 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; 200e4ec: c8 00 60 04 ld [ %g1 + 4 ], %g4 _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 200e4f0: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200e4f4: c6 06 20 30 ld [ %i0 + 0x30 ], %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( 200e4f8: ba 27 40 01 sub %i5, %g1, %i5 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; 200e4fc: 88 09 20 01 and %g4, 1, %g4 block->size_and_flag = size | flag; 200e500: 88 17 40 04 or %i5, %g4, %g4 200e504: c8 20 60 04 st %g4, [ %g1 + 4 ] 200e508: a4 20 c0 12 sub %g3, %l2, %l2 /* Statistics */ stats->size += extended_size; 200e50c: 82 00 80 12 add %g2, %l2, %g1 200e510: c2 26 20 2c st %g1, [ %i0 + 0x2c ] if ( extended_size_ptr != NULL ) 200e514: 80 a6 e0 00 cmp %i3, 0 200e518: 02 bf ff 7c be 200e308 <_Heap_Extend+0x2c> <== NEVER TAKEN 200e51c: a2 10 20 01 mov 1, %l1 *extended_size_ptr = extended_size; 200e520: e4 26 c0 00 st %l2, [ %i3 ] return true; } 200e524: b0 0c 60 01 and %l1, 1, %i0 200e528: 81 c7 e0 08 ret 200e52c: 81 e8 00 00 restore return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 200e530: 10 bf ff 9c b 200e3a0 <_Heap_Extend+0xc4> 200e534: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 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 ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200e538: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200e53c: 80 a0 40 02 cmp %g1, %g2 200e540: 2a bf ff be bcs,a 200e438 <_Heap_Extend+0x15c> 200e544: c4 26 20 24 st %g2, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200e548: 10 bf ff bd b 200e43c <_Heap_Extend+0x160> 200e54c: 80 a5 20 00 cmp %l4, 0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 200e550: 80 a7 40 01 cmp %i5, %g1 200e554: 38 bf ff ad bgu,a 200e408 <_Heap_Extend+0x12c> 200e558: 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; 200e55c: 10 bf ff ac b 200e40c <_Heap_Extend+0x130> 200e560: c2 07 bf f8 ld [ %fp + -8 ], %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 ( 200e564: 80 a6 40 1a cmp %i1, %i2 200e568: 1a bf ff 92 bcc 200e3b0 <_Heap_Extend+0xd4> 200e56c: 80 a0 40 1d cmp %g1, %i5 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 200e570: 10 bf ff 66 b 200e308 <_Heap_Extend+0x2c> 200e574: a2 10 20 00 clr %l1 ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 200e578: 80 a5 60 00 cmp %l5, 0 200e57c: 02 bf ff d7 be 200e4d8 <_Heap_Extend+0x1fc> 200e580: 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; 200e584: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200e588: c2 07 bf fc ld [ %fp + -4 ], %g1 200e58c: 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 ); 200e590: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200e594: 84 10 80 03 or %g2, %g3, %g2 200e598: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200e59c: c4 00 60 04 ld [ %g1 + 4 ], %g2 200e5a0: 84 10 a0 01 or %g2, 1, %g2 200e5a4: 10 bf ff cd b 200e4d8 <_Heap_Extend+0x1fc> 200e5a8: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200e5ac: 32 bf ff cf bne,a 200e4e8 <_Heap_Extend+0x20c> 200e5b0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200e5b4: d2 07 bf f8 ld [ %fp + -8 ], %o1 200e5b8: 7f ff ff 3f call 200e2b4 <_Heap_Free_block> 200e5bc: 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 200e5c0: 10 bf ff ca b 200e4e8 <_Heap_Extend+0x20c> 200e5c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 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 ) { 200e5c8: 80 a5 a0 00 cmp %l6, 0 200e5cc: 02 bf ff b0 be 200e48c <_Heap_Extend+0x1b0> 200e5d0: 80 a4 e0 00 cmp %l3, 0 { 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; 200e5d4: ac 25 80 02 sub %l6, %g2, %l6 200e5d8: 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 = 200e5dc: 10 bf ff ac b 200e48c <_Heap_Extend+0x1b0> 200e5e0: ec 20 a0 04 st %l6, [ %g2 + 4 ] =============================================================================== 0200e2c8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200e2c8: 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 ) { 200e2cc: 80 a6 60 00 cmp %i1, 0 200e2d0: 02 80 00 57 be 200e42c <_Heap_Free+0x164> 200e2d4: 84 10 20 01 mov 1, %g2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e2d8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e2dc: 40 00 2d 67 call 2019878 <.urem> 200e2e0: 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 200e2e4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e2e8: 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); 200e2ec: 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; 200e2f0: 80 a7 40 01 cmp %i5, %g1 200e2f4: 0a 80 00 4e bcs 200e42c <_Heap_Free+0x164> 200e2f8: 84 10 20 00 clr %g2 200e2fc: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200e300: 80 a7 40 04 cmp %i5, %g4 200e304: 38 80 00 4b bgu,a 200e430 <_Heap_Free+0x168> 200e308: b0 08 a0 01 and %g2, 1, %i0 - 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; 200e30c: de 07 60 04 ld [ %i5 + 4 ], %o7 200e310: b2 0b ff fe and %o7, -2, %i1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e314: 86 07 40 19 add %i5, %i1, %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; 200e318: 80 a0 40 03 cmp %g1, %g3 200e31c: 38 80 00 45 bgu,a 200e430 <_Heap_Free+0x168> <== NEVER TAKEN 200e320: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 200e324: 80 a1 00 03 cmp %g4, %g3 200e328: 2a 80 00 42 bcs,a 200e430 <_Heap_Free+0x168> <== NEVER TAKEN 200e32c: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 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; 200e330: da 00 e0 04 ld [ %g3 + 4 ], %o5 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200e334: 80 8b 60 01 btst 1, %o5 200e338: 02 80 00 3d be 200e42c <_Heap_Free+0x164> <== NEVER TAKEN 200e33c: 98 0b 7f fe and %o5, -2, %o4 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 )); 200e340: 80 a1 00 03 cmp %g4, %g3 200e344: 02 80 00 06 be 200e35c <_Heap_Free+0x94> 200e348: 9a 10 20 00 clr %o5 200e34c: 84 00 c0 0c add %g3, %o4, %g2 200e350: da 00 a0 04 ld [ %g2 + 4 ], %o5 200e354: 9a 0b 60 01 and %o5, 1, %o5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200e358: 9a 1b 60 01 xor %o5, 1, %o5 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 )); if ( !_Heap_Is_prev_used( block ) ) { 200e35c: 80 8b e0 01 btst 1, %o7 200e360: 12 80 00 1d bne 200e3d4 <_Heap_Free+0x10c> 200e364: 80 8b 60 ff btst 0xff, %o5 uintptr_t const prev_size = block->prev_size; 200e368: 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); 200e36c: 9e 27 40 0b sub %i5, %o3, %o7 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; 200e370: 80 a0 40 0f cmp %g1, %o7 200e374: 18 80 00 2e bgu 200e42c <_Heap_Free+0x164> <== NEVER TAKEN 200e378: 84 10 20 00 clr %g2 200e37c: 80 a1 00 0f cmp %g4, %o7 200e380: 2a 80 00 2c bcs,a 200e430 <_Heap_Free+0x168> <== NEVER TAKEN 200e384: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 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; 200e388: c2 03 e0 04 ld [ %o7 + 4 ], %g1 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) ) { 200e38c: 80 88 60 01 btst 1, %g1 200e390: 02 80 00 27 be 200e42c <_Heap_Free+0x164> <== NEVER TAKEN 200e394: 80 8b 60 ff btst 0xff, %o5 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200e398: 22 80 00 3a be,a 200e480 <_Heap_Free+0x1b8> 200e39c: 96 06 40 0b add %i1, %o3, %o3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200e3a0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 Heap_Block *prev = block->prev; 200e3a4: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200e3a8: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 prev->next = next; 200e3ac: c2 20 a0 08 st %g1, [ %g2 + 8 ] next->prev = prev; 200e3b0: c4 20 60 0c st %g2, [ %g1 + 0xc ] 200e3b4: 82 00 ff ff add %g3, -1, %g1 200e3b8: c2 26 20 38 st %g1, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200e3bc: 98 06 40 0c add %i1, %o4, %o4 200e3c0: 96 03 00 0b add %o4, %o3, %o3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200e3c4: 82 12 e0 01 or %o3, 1, %g1 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200e3c8: d6 23 c0 0b st %o3, [ %o7 + %o3 ] 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; 200e3cc: 10 80 00 0e b 200e404 <_Heap_Free+0x13c> 200e3d0: c2 23 e0 04 st %g1, [ %o7 + 4 ] 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; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200e3d4: 22 80 00 19 be,a 200e438 <_Heap_Free+0x170> 200e3d8: c4 06 20 08 ld [ %i0 + 8 ], %g2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200e3dc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 Heap_Block *prev = old_block->prev; 200e3e0: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 new_block->next = next; 200e3e4: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = prev; 200e3e8: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200e3ec: 98 03 00 19 add %o4, %i1, %o4 next->prev = new_block; 200e3f0: fa 20 a0 0c st %i5, [ %g2 + 0xc ] prev->next = new_block; 200e3f4: fa 20 60 08 st %i5, [ %g1 + 8 ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200e3f8: 84 13 20 01 or %o4, 1, %g2 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200e3fc: d8 27 40 0c st %o4, [ %i5 + %o4 ] 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; 200e400: c4 27 60 04 st %g2, [ %i5 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e404: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200e408: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200e40c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e410: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; 200e414: 82 00 60 01 inc %g1 stats->free_size += block_size; 200e418: b2 00 c0 19 add %g3, %i1, %i1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e41c: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; 200e420: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200e424: f2 26 20 30 st %i1, [ %i0 + 0x30 ] return( true ); 200e428: 84 10 20 01 mov 1, %g2 } 200e42c: b0 08 a0 01 and %g2, 1, %i0 200e430: 81 c7 e0 08 ret 200e434: 81 e8 00 00 restore 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; 200e438: 82 16 60 01 or %i1, 1, %g1 200e43c: c2 27 60 04 st %g1, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200e440: c8 00 e0 04 ld [ %g3 + 4 ], %g4 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200e444: f0 27 60 0c st %i0, [ %i5 + 0xc ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200e448: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200e44c: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200e450: fa 20 a0 0c st %i5, [ %g2 + 0xc ] } 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; 200e454: 84 09 3f fe and %g4, -2, %g2 next_block->prev_size = block_size; 200e458: f2 27 40 19 st %i1, [ %i5 + %i1 ] } 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; 200e45c: c4 20 e0 04 st %g2, [ %g3 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { 200e460: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 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; 200e464: 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; 200e468: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200e46c: 80 a0 40 02 cmp %g1, %g2 200e470: 08 bf ff e5 bleu 200e404 <_Heap_Free+0x13c> 200e474: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200e478: 10 bf ff e3 b 200e404 <_Heap_Free+0x13c> 200e47c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 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; 200e480: 82 12 e0 01 or %o3, 1, %g1 200e484: c2 23 e0 04 st %g1, [ %o7 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200e488: c2 00 e0 04 ld [ %g3 + 4 ], %g1 next_block->prev_size = size; 200e48c: d6 27 40 19 st %o3, [ %i5 + %i1 ] _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; 200e490: 82 08 7f fe and %g1, -2, %g1 200e494: 10 bf ff dc b 200e404 <_Heap_Free+0x13c> 200e498: c2 20 e0 04 st %g1, [ %g3 + 4 ] =============================================================================== 0202ed4c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 202ed4c: 9d e3 bf a0 save %sp, -96, %sp return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 202ed50: c2 06 20 08 ld [ %i0 + 8 ], %g1 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 202ed54: c0 26 40 00 clr [ %i1 ] info->largest = 0; 202ed58: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 202ed5c: 80 a6 00 01 cmp %i0, %g1 202ed60: 02 80 00 14 be 202edb0 <_Heap_Get_free_information+0x64> <== NEVER TAKEN 202ed64: c0 26 60 08 clr [ %i1 + 8 ] 202ed68: 88 10 20 01 mov 1, %g4 202ed6c: 9e 10 20 00 clr %o7 202ed70: 10 80 00 03 b 202ed7c <_Heap_Get_free_information+0x30> 202ed74: 86 10 20 00 clr %g3 202ed78: 88 10 00 0d mov %o5, %g4 - 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; 202ed7c: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_block != tail; the_block = the_block->next) 202ed80: 9a 01 20 01 add %g4, 1, %o5 202ed84: 84 08 bf fe and %g2, -2, %g2 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 202ed88: 80 a0 80 0f cmp %g2, %o7 202ed8c: 08 80 00 03 bleu 202ed98 <_Heap_Get_free_information+0x4c> 202ed90: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 202ed94: c4 26 60 04 st %g2, [ %i1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 202ed98: c2 00 60 08 ld [ %g1 + 8 ], %g1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 202ed9c: 80 a6 00 01 cmp %i0, %g1 202eda0: 32 bf ff f6 bne,a 202ed78 <_Heap_Get_free_information+0x2c> 202eda4: de 06 60 04 ld [ %i1 + 4 ], %o7 202eda8: c8 26 40 00 st %g4, [ %i1 ] 202edac: c6 26 60 08 st %g3, [ %i1 + 8 ] 202edb0: 81 c7 e0 08 ret 202edb4: 81 e8 00 00 restore =============================================================================== 0200ae48 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, uintptr_t remaining_free_space ) { 200ae48: 9d e3 bf a0 save %sp, -96, %sp void *free_space = remaining_free_space > 0 ? _Heap_Allocate( heap, remaining_free_space ) : NULL; 200ae4c: b4 10 20 00 clr %i2 200ae50: 80 a6 60 00 cmp %i1, 0 200ae54: 12 80 00 1c bne 200aec4 <_Heap_Greedy_allocate+0x7c> 200ae58: b8 10 00 18 mov %i0, %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200ae5c: fa 07 20 08 ld [ %i4 + 8 ], %i5 Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; 200ae60: b0 10 20 00 clr %i0 while ( current != free_list_tail ) { 200ae64: 80 a7 00 1d cmp %i4, %i5 200ae68: 12 80 00 05 bne 200ae7c <_Heap_Greedy_allocate+0x34> <== ALWAYS TAKEN 200ae6c: b6 10 20 00 clr %i3 current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); } _Heap_Free( heap, free_space ); 200ae70: 10 80 00 11 b 200aeb4 <_Heap_Greedy_allocate+0x6c> <== NOT EXECUTED 200ae74: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); 200ae78: ba 10 00 01 mov %g1, %i5 - 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; 200ae7c: d6 07 60 04 ld [ %i5 + 4 ], %o3 Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; while ( current != free_list_tail ) { _Heap_Block_allocate( 200ae80: 92 10 00 1d mov %i5, %o1 200ae84: 96 0a ff fe and %o3, -2, %o3 200ae88: 94 07 60 08 add %i5, 8, %o2 200ae8c: 90 10 00 1c mov %i4, %o0 200ae90: 40 00 00 e6 call 200b228 <_Heap_Block_allocate> 200ae94: 96 02 ff f8 add %o3, -8, %o3 current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 200ae98: f6 27 60 08 st %i3, [ %i5 + 8 ] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200ae9c: c2 07 20 08 ld [ %i4 + 8 ], %g1 : NULL; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; while ( current != free_list_tail ) { 200aea0: 80 a7 00 01 cmp %i4, %g1 200aea4: 12 bf ff f5 bne 200ae78 <_Heap_Greedy_allocate+0x30> 200aea8: b6 10 00 1d mov %i5, %i3 200aeac: b0 10 00 1d mov %i5, %i0 current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); } _Heap_Free( heap, free_space ); 200aeb0: 90 10 00 1c mov %i4, %o0 200aeb4: 40 00 1f 1d call 2012b28 <_Heap_Free> 200aeb8: 92 10 00 1a mov %i2, %o1 return blocks; } 200aebc: 81 c7 e0 08 ret 200aec0: 81 e8 00 00 restore * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 200aec4: 90 10 00 18 mov %i0, %o0 200aec8: 92 10 00 19 mov %i1, %o1 200aecc: 94 10 20 00 clr %o2 200aed0: 40 00 1e 8b call 20128fc <_Heap_Allocate_aligned_with_boundary> 200aed4: 96 10 20 00 clr %o3 200aed8: 10 bf ff e1 b 200ae5c <_Heap_Greedy_allocate+0x14> 200aedc: b4 10 00 08 mov %o0, %i2 =============================================================================== 0200aee0 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { 200aee0: 9d e3 bf a0 save %sp, -96, %sp while ( blocks != NULL ) { 200aee4: 80 a6 60 00 cmp %i1, 0 200aee8: 32 80 00 04 bne,a 200aef8 <_Heap_Greedy_free+0x18> <== ALWAYS TAKEN 200aeec: fa 06 60 08 ld [ %i1 + 8 ], %i5 200aef0: 30 80 00 0a b,a 200af18 <_Heap_Greedy_free+0x38> <== NOT EXECUTED Heap_Block *current = blocks; blocks = blocks->next; 200aef4: fa 06 60 08 ld [ %i1 + 8 ], %i5 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 200aef8: 92 06 60 08 add %i1, 8, %o1 200aefc: 40 00 1f 0b call 2012b28 <_Heap_Free> 200af00: 90 10 00 18 mov %i0, %o0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 200af04: 80 a7 60 00 cmp %i5, 0 200af08: 12 bf ff fb bne 200aef4 <_Heap_Greedy_free+0x14> 200af0c: b2 10 00 1d mov %i5, %i1 200af10: 81 c7 e0 08 ret 200af14: 81 e8 00 00 restore 200af18: 81 c7 e0 08 ret <== NOT EXECUTED 200af1c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02045000 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 2045000: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; 2045004: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 Heap_Block *end = heap->last_block; 2045008: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 bool stop = false; while ( !stop && current != end ) { 204500c: 80 a7 00 1d cmp %i4, %i5 2045010: 32 80 00 06 bne,a 2045028 <_Heap_Iterate+0x28> <== ALWAYS TAKEN 2045014: d2 07 20 04 ld [ %i4 + 4 ], %o1 2045018: 30 80 00 0e b,a 2045050 <_Heap_Iterate+0x50> <== NOT EXECUTED 204501c: 02 80 00 0d be 2045050 <_Heap_Iterate+0x50> 2045020: 01 00 00 00 nop - 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; 2045024: d2 07 20 04 ld [ %i4 + 4 ], %o1 uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); 2045028: 90 10 00 1c mov %i4, %o0 204502c: 92 0a 7f fe and %o1, -2, %o1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2045030: b8 07 00 09 add %i4, %o1, %i4 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; 2045034: d4 07 20 04 ld [ %i4 + 4 ], %o2 2045038: 96 10 00 1a mov %i2, %o3 204503c: 9f c6 40 00 call %i1 2045040: 94 0a a0 01 and %o2, 1, %o2 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 2045044: 80 8a 20 ff btst 0xff, %o0 2045048: 02 bf ff f5 be 204501c <_Heap_Iterate+0x1c> <== ALWAYS TAKEN 204504c: 80 a7 40 1c cmp %i5, %i4 2045050: 81 c7 e0 08 ret 2045054: 81 e8 00 00 restore =============================================================================== 0200e5bc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200e5bc: 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); 200e5c0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e5c4: 40 00 2c ad call 2019878 <.urem> 200e5c8: 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 200e5cc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e5d0: 84 06 7f f8 add %i1, -8, %g2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200e5d4: 84 20 80 08 sub %g2, %o0, %g2 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; 200e5d8: 80 a0 80 01 cmp %g2, %g1 200e5dc: 0a 80 00 16 bcs 200e634 <_Heap_Size_of_alloc_area+0x78> 200e5e0: 86 10 20 00 clr %g3 200e5e4: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200e5e8: 80 a0 80 04 cmp %g2, %g4 200e5ec: 18 80 00 13 bgu 200e638 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200e5f0: b0 08 e0 01 and %g3, 1, %i0 - 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; 200e5f4: f0 00 a0 04 ld [ %g2 + 4 ], %i0 200e5f8: b0 0e 3f fe and %i0, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e5fc: 84 00 80 18 add %g2, %i0, %g2 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; 200e600: 80 a0 40 02 cmp %g1, %g2 200e604: 18 80 00 0d bgu 200e638 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200e608: b0 08 e0 01 and %g3, 1, %i0 200e60c: 80 a1 00 02 cmp %g4, %g2 200e610: 0a 80 00 0a bcs 200e638 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200e614: 01 00 00 00 nop 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; 200e618: c2 00 a0 04 ld [ %g2 + 4 ], %g1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200e61c: 80 88 60 01 btst 1, %g1 200e620: 02 80 00 06 be 200e638 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200e624: 84 20 80 19 sub %g2, %i1, %g2 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200e628: 86 10 20 01 mov 1, %g3 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 200e62c: 84 00 a0 04 add %g2, 4, %g2 200e630: c4 26 80 00 st %g2, [ %i2 ] return true; } 200e634: b0 08 e0 01 and %g3, 1, %i0 200e638: 81 c7 e0 08 ret 200e63c: 81 e8 00 00 restore =============================================================================== 02009eb8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2009eb8: 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; 2009ebc: 3b 00 80 27 sethi %hi(0x2009c00), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2009ec0: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 2009ec4: f6 06 20 14 ld [ %i0 + 0x14 ], %i3 Heap_Block *const first_block = heap->first_block; 2009ec8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 Heap_Block *const last_block = heap->last_block; 2009ecc: 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; 2009ed0: 80 a6 a0 00 cmp %i2, 0 2009ed4: 02 80 00 04 be 2009ee4 <_Heap_Walk+0x2c> 2009ed8: ba 17 62 4c or %i5, 0x24c, %i5 2009edc: 3b 00 80 27 sethi %hi(0x2009c00), %i5 2009ee0: ba 17 62 54 or %i5, 0x254, %i5 ! 2009e54 <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2009ee4: 03 00 80 84 sethi %hi(0x2021000), %g1 2009ee8: c4 00 60 78 ld [ %g1 + 0x78 ], %g2 ! 2021078 <_System_state_Current> 2009eec: 80 a0 a0 03 cmp %g2, 3 2009ef0: 02 80 00 05 be 2009f04 <_Heap_Walk+0x4c> 2009ef4: 82 10 20 01 mov 1, %g1 block = next_block; } while ( block != first_block ); return true; } 2009ef8: b0 08 60 01 and %g1, 1, %i0 2009efc: 81 c7 e0 08 ret 2009f00: 81 e8 00 00 restore 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)( 2009f04: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2009f08: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2009f0c: c4 06 20 08 ld [ %i0 + 8 ], %g2 2009f10: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009f14: 90 10 00 19 mov %i1, %o0 2009f18: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009f1c: f8 23 a0 60 st %i4, [ %sp + 0x60 ] 2009f20: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 2009f24: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2009f28: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2009f2c: 92 10 20 00 clr %o1 2009f30: 96 10 00 10 mov %l0, %o3 2009f34: 15 00 80 76 sethi %hi(0x201d800), %o2 2009f38: 98 10 00 1b mov %i3, %o4 2009f3c: 9f c7 40 00 call %i5 2009f40: 94 12 a1 48 or %o2, 0x148, %o2 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2009f44: 80 a4 20 00 cmp %l0, 0 2009f48: 02 80 00 28 be 2009fe8 <_Heap_Walk+0x130> 2009f4c: 80 8c 20 07 btst 7, %l0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009f50: 12 80 00 2d bne 200a004 <_Heap_Walk+0x14c> 2009f54: 90 10 00 1b mov %i3, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009f58: 7f ff de dd call 2001acc <.urem> 2009f5c: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2009f60: 80 a2 20 00 cmp %o0, 0 2009f64: 12 80 00 30 bne 200a024 <_Heap_Walk+0x16c> 2009f68: 90 07 20 08 add %i4, 8, %o0 2009f6c: 7f ff de d8 call 2001acc <.urem> 2009f70: 92 10 00 10 mov %l0, %o1 ); return false; } if ( 2009f74: 80 a2 20 00 cmp %o0, 0 2009f78: 32 80 00 33 bne,a 200a044 <_Heap_Walk+0x18c> 2009f7c: 90 10 00 19 mov %i1, %o0 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; 2009f80: e8 07 20 04 ld [ %i4 + 4 ], %l4 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2009f84: 80 8d 20 01 btst 1, %l4 2009f88: 22 80 00 36 be,a 200a060 <_Heap_Walk+0x1a8> 2009f8c: 90 10 00 19 mov %i1, %o0 - 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; 2009f90: c2 04 60 04 ld [ %l1 + 4 ], %g1 2009f94: 82 08 7f fe and %g1, -2, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2009f98: 82 04 40 01 add %l1, %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; 2009f9c: c4 00 60 04 ld [ %g1 + 4 ], %g2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2009fa0: 80 88 a0 01 btst 1, %g2 2009fa4: 02 80 00 0a be 2009fcc <_Heap_Walk+0x114> 2009fa8: 80 a7 00 01 cmp %i4, %g1 ); return false; } if ( 2009fac: 02 80 00 33 be 200a078 <_Heap_Walk+0x1c0> 2009fb0: 90 10 00 19 mov %i1, %o0 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2009fb4: 92 10 20 01 mov 1, %o1 2009fb8: 15 00 80 76 sethi %hi(0x201d800), %o2 2009fbc: 9f c7 40 00 call %i5 2009fc0: 94 12 a2 c0 or %o2, 0x2c0, %o2 ! 201dac0 <__log2table+0x2d8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009fc4: 10 bf ff cd b 2009ef8 <_Heap_Walk+0x40> 2009fc8: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 2009fcc: 90 10 00 19 mov %i1, %o0 2009fd0: 92 10 20 01 mov 1, %o1 2009fd4: 15 00 80 76 sethi %hi(0x201d800), %o2 2009fd8: 9f c7 40 00 call %i5 2009fdc: 94 12 a2 a8 or %o2, 0x2a8, %o2 ! 201daa8 <__log2table+0x2c0> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009fe0: 10 bf ff c6 b 2009ef8 <_Heap_Walk+0x40> 2009fe4: 82 10 20 00 clr %g1 first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 2009fe8: 90 10 00 19 mov %i1, %o0 2009fec: 92 10 20 01 mov 1, %o1 2009ff0: 15 00 80 76 sethi %hi(0x201d800), %o2 2009ff4: 9f c7 40 00 call %i5 2009ff8: 94 12 a1 e0 or %o2, 0x1e0, %o2 ! 201d9e0 <__log2table+0x1f8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009ffc: 10 bf ff bf b 2009ef8 <_Heap_Walk+0x40> 200a000: 82 10 20 00 clr %g1 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 200a004: 90 10 00 19 mov %i1, %o0 200a008: 92 10 20 01 mov 1, %o1 200a00c: 96 10 00 10 mov %l0, %o3 200a010: 15 00 80 76 sethi %hi(0x201d800), %o2 200a014: 9f c7 40 00 call %i5 200a018: 94 12 a1 f8 or %o2, 0x1f8, %o2 ! 201d9f8 <__log2table+0x210> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a01c: 10 bf ff b7 b 2009ef8 <_Heap_Walk+0x40> 200a020: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 200a024: 90 10 00 19 mov %i1, %o0 200a028: 92 10 20 01 mov 1, %o1 200a02c: 96 10 00 1b mov %i3, %o3 200a030: 15 00 80 76 sethi %hi(0x201d800), %o2 200a034: 9f c7 40 00 call %i5 200a038: 94 12 a2 18 or %o2, 0x218, %o2 ! 201da18 <__log2table+0x230> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a03c: 10 bf ff af b 2009ef8 <_Heap_Walk+0x40> 200a040: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 200a044: 92 10 20 01 mov 1, %o1 200a048: 96 10 00 1c mov %i4, %o3 200a04c: 15 00 80 76 sethi %hi(0x201d800), %o2 200a050: 9f c7 40 00 call %i5 200a054: 94 12 a2 40 or %o2, 0x240, %o2 ! 201da40 <__log2table+0x258> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a058: 10 bf ff a8 b 2009ef8 <_Heap_Walk+0x40> 200a05c: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 200a060: 92 10 20 01 mov 1, %o1 200a064: 15 00 80 76 sethi %hi(0x201d800), %o2 200a068: 9f c7 40 00 call %i5 200a06c: 94 12 a2 78 or %o2, 0x278, %o2 ! 201da78 <__log2table+0x290> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a070: 10 bf ff a2 b 2009ef8 <_Heap_Walk+0x40> 200a074: 82 10 20 00 clr %g1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200a078: f4 06 20 08 ld [ %i0 + 8 ], %i2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 200a07c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 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 ) { 200a080: 80 a6 00 1a cmp %i0, %i2 200a084: 02 80 00 0d be 200a0b8 <_Heap_Walk+0x200> 200a088: c2 06 20 20 ld [ %i0 + 0x20 ], %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; 200a08c: 80 a0 40 1a cmp %g1, %i2 200a090: 28 80 00 bc bleu,a 200a380 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN 200a094: e6 06 20 24 ld [ %i0 + 0x24 ], %l3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 200a098: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200a09c: 92 10 20 01 mov 1, %o1 200a0a0: 96 10 00 1a mov %i2, %o3 200a0a4: 15 00 80 76 sethi %hi(0x201d800), %o2 200a0a8: 9f c7 40 00 call %i5 200a0ac: 94 12 a2 f0 or %o2, 0x2f0, %o2 ! 201daf0 <__log2table+0x308> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a0b0: 10 bf ff 92 b 2009ef8 <_Heap_Walk+0x40> 200a0b4: 82 10 20 00 clr %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a0b8: 2d 00 80 77 sethi %hi(0x201dc00), %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)( 200a0bc: 2f 00 80 77 sethi %hi(0x201dc00), %l7 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a0c0: a4 10 00 1c mov %i4, %l2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a0c4: ac 15 a1 20 or %l6, 0x120, %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)( 200a0c8: ae 15 e1 08 or %l7, 0x108, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a0cc: 2b 00 80 77 sethi %hi(0x201dc00), %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; 200a0d0: a6 0d 3f fe and %l4, -2, %l3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200a0d4: b4 04 c0 12 add %l3, %l2, %i2 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; 200a0d8: 80 a0 40 1a cmp %g1, %i2 200a0dc: 28 80 00 0b bleu,a 200a108 <_Heap_Walk+0x250> <== ALWAYS TAKEN 200a0e0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 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 ) ) { (*printer)( 200a0e4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200a0e8: 92 10 20 01 mov 1, %o1 200a0ec: 96 10 00 12 mov %l2, %o3 200a0f0: 15 00 80 76 sethi %hi(0x201d800), %o2 200a0f4: 98 10 00 1a mov %i2, %o4 200a0f8: 9f c7 40 00 call %i5 200a0fc: 94 12 a3 98 or %o2, 0x398, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 200a100: 10 bf ff 7e b 2009ef8 <_Heap_Walk+0x40> 200a104: 82 10 20 00 clr %g1 200a108: 80 a0 40 1a cmp %g1, %i2 200a10c: 0a bf ff f7 bcs 200a0e8 <_Heap_Walk+0x230> 200a110: 90 10 00 19 mov %i1, %o0 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; 200a114: 82 1c 80 11 xor %l2, %l1, %g1 200a118: 80 a0 00 01 cmp %g0, %g1 200a11c: 82 40 20 00 addx %g0, 0, %g1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a120: 90 10 00 13 mov %l3, %o0 200a124: c2 27 bf fc st %g1, [ %fp + -4 ] 200a128: 7f ff de 69 call 2001acc <.urem> 200a12c: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 200a130: 80 a2 20 00 cmp %o0, 0 200a134: 02 80 00 05 be 200a148 <_Heap_Walk+0x290> 200a138: c2 07 bf fc ld [ %fp + -4 ], %g1 200a13c: 80 88 60 ff btst 0xff, %g1 200a140: 12 80 00 76 bne 200a318 <_Heap_Walk+0x460> 200a144: 90 10 00 19 mov %i1, %o0 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 200a148: 80 a6 c0 13 cmp %i3, %l3 200a14c: 08 80 00 05 bleu 200a160 <_Heap_Walk+0x2a8> 200a150: 80 a4 80 1a cmp %l2, %i2 200a154: 80 88 60 ff btst 0xff, %g1 200a158: 12 80 00 78 bne 200a338 <_Heap_Walk+0x480> <== ALWAYS TAKEN 200a15c: 80 a4 80 1a cmp %l2, %i2 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 200a160: 2a 80 00 06 bcs,a 200a178 <_Heap_Walk+0x2c0> 200a164: c2 06 a0 04 ld [ %i2 + 4 ], %g1 200a168: 80 88 60 ff btst 0xff, %g1 200a16c: 12 80 00 7d bne 200a360 <_Heap_Walk+0x4a8> 200a170: 90 10 00 19 mov %i1, %o0 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; 200a174: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200a178: 80 88 60 01 btst 1, %g1 200a17c: 02 80 00 19 be 200a1e0 <_Heap_Walk+0x328> 200a180: a8 0d 20 01 and %l4, 1, %l4 if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 200a184: 80 a5 20 00 cmp %l4, 0 200a188: 22 80 00 0e be,a 200a1c0 <_Heap_Walk+0x308> 200a18c: da 04 80 00 ld [ %l2 ], %o5 (*printer)( 200a190: 90 10 00 19 mov %i1, %o0 200a194: 92 10 20 00 clr %o1 200a198: 94 10 00 17 mov %l7, %o2 200a19c: 96 10 00 12 mov %l2, %o3 200a1a0: 9f c7 40 00 call %i5 200a1a4: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 200a1a8: 80 a7 00 1a cmp %i4, %i2 200a1ac: 02 80 00 42 be 200a2b4 <_Heap_Walk+0x3fc> 200a1b0: a4 10 00 1a mov %i2, %l2 200a1b4: e8 06 a0 04 ld [ %i2 + 4 ], %l4 200a1b8: 10 bf ff c6 b 200a0d0 <_Heap_Walk+0x218> 200a1bc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a1c0: 96 10 00 12 mov %l2, %o3 200a1c4: 90 10 00 19 mov %i1, %o0 200a1c8: 92 10 20 00 clr %o1 200a1cc: 94 10 00 16 mov %l6, %o2 200a1d0: 9f c7 40 00 call %i5 200a1d4: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 200a1d8: 10 bf ff f5 b 200a1ac <_Heap_Walk+0x2f4> 200a1dc: 80 a7 00 1a cmp %i4, %i2 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 ? 200a1e0: da 04 a0 0c ld [ %l2 + 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)( 200a1e4: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a1e8: 05 00 80 76 sethi %hi(0x201d800), %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; 200a1ec: c8 06 20 0c ld [ %i0 + 0xc ], %g4 200a1f0: 80 a0 40 0d cmp %g1, %o5 200a1f4: 02 80 00 05 be 200a208 <_Heap_Walk+0x350> 200a1f8: 86 10 a1 08 or %g2, 0x108, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 200a1fc: 80 a6 00 0d cmp %i0, %o5 200a200: 02 80 00 3c be 200a2f0 <_Heap_Walk+0x438> 200a204: 86 15 60 d0 or %l5, 0xd0, %g3 block->next, block->next == last_free_block ? 200a208: c2 04 a0 08 ld [ %l2 + 8 ], %g1 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)( 200a20c: 1f 00 80 76 sethi %hi(0x201d800), %o7 200a210: 80 a1 00 01 cmp %g4, %g1 200a214: 02 80 00 05 be 200a228 <_Heap_Walk+0x370> 200a218: 84 13 e1 28 or %o7, 0x128, %g2 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a21c: 80 a6 00 01 cmp %i0, %g1 200a220: 02 80 00 31 be 200a2e4 <_Heap_Walk+0x42c> 200a224: 84 15 60 d0 or %l5, 0xd0, %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)( 200a228: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 200a22c: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 200a230: c4 23 a0 64 st %g2, [ %sp + 0x64 ] 200a234: 90 10 00 19 mov %i1, %o0 200a238: 92 10 20 00 clr %o1 200a23c: 15 00 80 77 sethi %hi(0x201dc00), %o2 200a240: 96 10 00 12 mov %l2, %o3 200a244: 94 12 a0 60 or %o2, 0x60, %o2 200a248: 9f c7 40 00 call %i5 200a24c: 98 10 00 13 mov %l3, %o4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 200a250: da 06 80 00 ld [ %i2 ], %o5 200a254: 80 a4 c0 0d cmp %l3, %o5 200a258: 12 80 00 19 bne 200a2bc <_Heap_Walk+0x404> 200a25c: 80 a5 20 00 cmp %l4, 0 ); return false; } if ( !prev_used ) { 200a260: 02 80 00 27 be 200a2fc <_Heap_Walk+0x444> 200a264: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200a268: c2 06 20 08 ld [ %i0 + 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 ) { 200a26c: 80 a6 00 01 cmp %i0, %g1 200a270: 02 80 00 0b be 200a29c <_Heap_Walk+0x3e4> <== NEVER TAKEN 200a274: 92 10 20 01 mov 1, %o1 if ( free_block == block ) { 200a278: 80 a4 80 01 cmp %l2, %g1 200a27c: 02 bf ff cc be 200a1ac <_Heap_Walk+0x2f4> 200a280: 80 a7 00 1a cmp %i4, %i2 return true; } free_block = free_block->next; 200a284: 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 ) { 200a288: 80 a6 00 01 cmp %i0, %g1 200a28c: 12 bf ff fc bne 200a27c <_Heap_Walk+0x3c4> 200a290: 80 a4 80 01 cmp %l2, %g1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 200a294: 90 10 00 19 mov %i1, %o0 200a298: 92 10 20 01 mov 1, %o1 200a29c: 96 10 00 12 mov %l2, %o3 200a2a0: 15 00 80 77 sethi %hi(0x201dc00), %o2 200a2a4: 9f c7 40 00 call %i5 200a2a8: 94 12 a1 48 or %o2, 0x148, %o2 ! 201dd48 <__log2table+0x560> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a2ac: 10 bf ff 13 b 2009ef8 <_Heap_Walk+0x40> 200a2b0: 82 10 20 00 clr %g1 } block = next_block; } while ( block != first_block ); return true; 200a2b4: 10 bf ff 11 b 2009ef8 <_Heap_Walk+0x40> 200a2b8: 82 10 20 01 mov 1, %g1 " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 200a2bc: f4 23 a0 5c st %i2, [ %sp + 0x5c ] 200a2c0: 90 10 00 19 mov %i1, %o0 200a2c4: 92 10 20 01 mov 1, %o1 200a2c8: 96 10 00 12 mov %l2, %o3 200a2cc: 15 00 80 77 sethi %hi(0x201dc00), %o2 200a2d0: 98 10 00 13 mov %l3, %o4 200a2d4: 9f c7 40 00 call %i5 200a2d8: 94 12 a0 98 or %o2, 0x98, %o2 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a2dc: 10 bf ff 07 b 2009ef8 <_Heap_Walk+0x40> 200a2e0: 82 10 20 00 clr %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a2e4: 05 00 80 76 sethi %hi(0x201d800), %g2 200a2e8: 10 bf ff d0 b 200a228 <_Heap_Walk+0x370> 200a2ec: 84 10 a1 38 or %g2, 0x138, %g2 ! 201d938 <__log2table+0x150> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 200a2f0: 07 00 80 76 sethi %hi(0x201d800), %g3 200a2f4: 10 bf ff c5 b 200a208 <_Heap_Walk+0x350> 200a2f8: 86 10 e1 18 or %g3, 0x118, %g3 ! 201d918 <__log2table+0x130> return false; } if ( !prev_used ) { (*printer)( 200a2fc: 92 10 20 01 mov 1, %o1 200a300: 96 10 00 12 mov %l2, %o3 200a304: 15 00 80 77 sethi %hi(0x201dc00), %o2 200a308: 9f c7 40 00 call %i5 200a30c: 94 12 a0 d8 or %o2, 0xd8, %o2 ! 201dcd8 <__log2table+0x4f0> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a310: 10 bf fe fa b 2009ef8 <_Heap_Walk+0x40> 200a314: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 200a318: 92 10 20 01 mov 1, %o1 200a31c: 96 10 00 12 mov %l2, %o3 200a320: 15 00 80 76 sethi %hi(0x201d800), %o2 200a324: 98 10 00 13 mov %l3, %o4 200a328: 9f c7 40 00 call %i5 200a32c: 94 12 a3 c8 or %o2, 0x3c8, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 200a330: 10 bf fe f2 b 2009ef8 <_Heap_Walk+0x40> 200a334: 82 10 20 00 clr %g1 } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 200a338: 90 10 00 19 mov %i1, %o0 200a33c: 92 10 20 01 mov 1, %o1 200a340: 96 10 00 12 mov %l2, %o3 200a344: 15 00 80 76 sethi %hi(0x201d800), %o2 200a348: 98 10 00 13 mov %l3, %o4 200a34c: 94 12 a3 f8 or %o2, 0x3f8, %o2 200a350: 9f c7 40 00 call %i5 200a354: 9a 10 00 1b mov %i3, %o5 block, block_size, min_block_size ); return false; 200a358: 10 bf fe e8 b 2009ef8 <_Heap_Walk+0x40> 200a35c: 82 10 20 00 clr %g1 } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 200a360: 92 10 20 01 mov 1, %o1 200a364: 96 10 00 12 mov %l2, %o3 200a368: 15 00 80 77 sethi %hi(0x201dc00), %o2 200a36c: 98 10 00 1a mov %i2, %o4 200a370: 9f c7 40 00 call %i5 200a374: 94 12 a0 28 or %o2, 0x28, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 200a378: 10 bf fe e0 b 2009ef8 <_Heap_Walk+0x40> 200a37c: 82 10 20 00 clr %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; 200a380: 80 a4 c0 1a cmp %l3, %i2 200a384: 0a bf ff 46 bcs 200a09c <_Heap_Walk+0x1e4> <== NEVER TAKEN 200a388: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a38c: c2 27 bf fc st %g1, [ %fp + -4 ] 200a390: 90 06 a0 08 add %i2, 8, %o0 200a394: 7f ff dd ce call 2001acc <.urem> 200a398: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 200a39c: 80 a2 20 00 cmp %o0, 0 200a3a0: 12 80 00 36 bne 200a478 <_Heap_Walk+0x5c0> <== NEVER TAKEN 200a3a4: c2 07 bf fc ld [ %fp + -4 ], %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; 200a3a8: c4 06 a0 04 ld [ %i2 + 4 ], %g2 200a3ac: 84 08 bf fe and %g2, -2, %g2 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; 200a3b0: 84 06 80 02 add %i2, %g2, %g2 200a3b4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a3b8: 80 88 a0 01 btst 1, %g2 200a3bc: 12 80 00 27 bne 200a458 <_Heap_Walk+0x5a0> <== NEVER TAKEN 200a3c0: 84 10 00 18 mov %i0, %g2 200a3c4: 10 80 00 19 b 200a428 <_Heap_Walk+0x570> 200a3c8: a4 10 00 1a mov %i2, %l2 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 ) { 200a3cc: 80 a6 00 1a cmp %i0, %i2 200a3d0: 02 bf ff 3a be 200a0b8 <_Heap_Walk+0x200> 200a3d4: 80 a6 80 01 cmp %i2, %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; 200a3d8: 0a bf ff 31 bcs 200a09c <_Heap_Walk+0x1e4> 200a3dc: 90 10 00 19 mov %i1, %o0 200a3e0: 80 a6 80 13 cmp %i2, %l3 200a3e4: 18 bf ff 2f bgu 200a0a0 <_Heap_Walk+0x1e8> <== NEVER TAKEN 200a3e8: 92 10 20 01 mov 1, %o1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a3ec: c2 27 bf fc st %g1, [ %fp + -4 ] 200a3f0: 90 06 a0 08 add %i2, 8, %o0 200a3f4: 7f ff dd b6 call 2001acc <.urem> 200a3f8: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 200a3fc: 80 a2 20 00 cmp %o0, 0 200a400: 12 80 00 1e bne 200a478 <_Heap_Walk+0x5c0> 200a404: c2 07 bf fc ld [ %fp + -4 ], %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; 200a408: c6 06 a0 04 ld [ %i2 + 4 ], %g3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a40c: 84 10 00 12 mov %l2, %g2 200a410: 86 08 ff fe and %g3, -2, %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; 200a414: 86 00 c0 1a add %g3, %i2, %g3 200a418: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200a41c: 80 88 e0 01 btst 1, %g3 200a420: 12 80 00 0e bne 200a458 <_Heap_Walk+0x5a0> 200a424: a4 10 00 1a mov %i2, %l2 ); return false; } if ( free_block->prev != prev_block ) { 200a428: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 200a42c: 80 a3 00 02 cmp %o4, %g2 200a430: 22 bf ff e7 be,a 200a3cc <_Heap_Walk+0x514> 200a434: f4 06 a0 08 ld [ %i2 + 8 ], %i2 (*printer)( 200a438: 90 10 00 19 mov %i1, %o0 200a43c: 92 10 20 01 mov 1, %o1 200a440: 96 10 00 1a mov %i2, %o3 200a444: 15 00 80 76 sethi %hi(0x201d800), %o2 200a448: 9f c7 40 00 call %i5 200a44c: 94 12 a3 60 or %o2, 0x360, %o2 ! 201db60 <__log2table+0x378> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a450: 10 bf fe aa b 2009ef8 <_Heap_Walk+0x40> 200a454: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 200a458: 90 10 00 19 mov %i1, %o0 200a45c: 92 10 20 01 mov 1, %o1 200a460: 96 10 00 1a mov %i2, %o3 200a464: 15 00 80 76 sethi %hi(0x201d800), %o2 200a468: 9f c7 40 00 call %i5 200a46c: 94 12 a3 40 or %o2, 0x340, %o2 ! 201db40 <__log2table+0x358> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a470: 10 bf fe a2 b 2009ef8 <_Heap_Walk+0x40> 200a474: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 200a478: 90 10 00 19 mov %i1, %o0 200a47c: 92 10 20 01 mov 1, %o1 200a480: 96 10 00 1a mov %i2, %o3 200a484: 15 00 80 76 sethi %hi(0x201d800), %o2 200a488: 9f c7 40 00 call %i5 200a48c: 94 12 a3 10 or %o2, 0x310, %o2 ! 201db10 <__log2table+0x328> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a490: 10 bf fe 9a b 2009ef8 <_Heap_Walk+0x40> 200a494: 82 10 20 00 clr %g1 =============================================================================== 0200852c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 200852c: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2008530: 39 00 80 7c sethi %hi(0x201f000), %i4 2008534: c2 07 23 b4 ld [ %i4 + 0x3b4 ], %g1 ! 201f3b4 <_IO_Number_of_drivers> 2008538: 80 a0 60 00 cmp %g1, 0 200853c: 02 80 00 0c be 200856c <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 2008540: ba 10 20 00 clr %i5 2008544: b8 17 23 b4 or %i4, 0x3b4, %i4 (void) rtems_io_initialize( major, 0, NULL ); 2008548: 90 10 00 1d mov %i5, %o0 200854c: 92 10 20 00 clr %o1 2008550: 40 00 16 47 call 200de6c 2008554: 94 10 20 00 clr %o2 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2008558: c2 07 00 00 ld [ %i4 ], %g1 200855c: ba 07 60 01 inc %i5 2008560: 80 a0 40 1d cmp %g1, %i5 2008564: 18 bf ff fa bgu 200854c <_IO_Initialize_all_drivers+0x20> 2008568: 90 10 00 1d mov %i5, %o0 200856c: 81 c7 e0 08 ret 2008570: 81 e8 00 00 restore =============================================================================== 02008460 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 2008460: 9d e3 bf a0 save %sp, -96, %sp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 2008464: 03 00 80 77 sethi %hi(0x201dc00), %g1 2008468: 82 10 60 4c or %g1, 0x4c, %g1 ! 201dc4c drivers_in_table = Configuration.number_of_device_drivers; 200846c: f8 00 60 38 ld [ %g1 + 0x38 ], %i4 number_of_drivers = Configuration.maximum_drivers; 2008470: f2 00 60 34 ld [ %g1 + 0x34 ], %i1 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 2008474: 80 a7 00 19 cmp %i4, %i1 2008478: 0a 80 00 08 bcs 2008498 <_IO_Manager_initialization+0x38> 200847c: fa 00 60 3c ld [ %g1 + 0x3c ], %i5 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 2008480: 03 00 80 7c sethi %hi(0x201f000), %g1 2008484: fa 20 63 b8 st %i5, [ %g1 + 0x3b8 ] ! 201f3b8 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 2008488: 03 00 80 7c sethi %hi(0x201f000), %g1 200848c: f8 20 63 b4 st %i4, [ %g1 + 0x3b4 ] ! 201f3b4 <_IO_Number_of_drivers> return; 2008490: 81 c7 e0 08 ret 2008494: 81 e8 00 00 restore * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) 2008498: 83 2e 60 03 sll %i1, 3, %g1 200849c: b5 2e 60 05 sll %i1, 5, %i2 20084a0: b4 26 80 01 sub %i2, %g1, %i2 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 20084a4: 40 00 0d 5e call 200ba1c <_Workspace_Allocate_or_fatal_error> 20084a8: 90 10 00 1a mov %i2, %o0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 20084ac: 03 00 80 7c sethi %hi(0x201f000), %g1 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 20084b0: 37 00 80 7c sethi %hi(0x201f000), %i3 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 20084b4: f2 20 63 b4 st %i1, [ %g1 + 0x3b4 ] /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 20084b8: d0 26 e3 b8 st %o0, [ %i3 + 0x3b8 ] _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 20084bc: 92 10 20 00 clr %o1 20084c0: 40 00 22 f2 call 2011088 20084c4: 94 10 00 1a mov %i2, %o2 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20084c8: 80 a7 20 00 cmp %i4, 0 20084cc: 02 bf ff f1 be 2008490 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 20084d0: f6 06 e3 b8 ld [ %i3 + 0x3b8 ], %i3 20084d4: 82 10 20 00 clr %g1 20084d8: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 20084dc: c4 07 40 01 ld [ %i5 + %g1 ], %g2 20084e0: 86 07 40 01 add %i5, %g1, %g3 20084e4: c4 26 c0 01 st %g2, [ %i3 + %g1 ] 20084e8: f4 00 e0 04 ld [ %g3 + 4 ], %i2 20084ec: 84 06 c0 01 add %i3, %g1, %g2 20084f0: f4 20 a0 04 st %i2, [ %g2 + 4 ] 20084f4: f4 00 e0 08 ld [ %g3 + 8 ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20084f8: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 20084fc: f4 20 a0 08 st %i2, [ %g2 + 8 ] 2008500: f4 00 e0 0c ld [ %g3 + 0xc ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2008504: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 2008508: f4 20 a0 0c st %i2, [ %g2 + 0xc ] 200850c: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2008510: 80 a1 00 1c cmp %g4, %i4 _IO_Driver_address_table[index] = driver_table[index]; 2008514: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] 2008518: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 200851c: 12 bf ff f0 bne 20084dc <_IO_Manager_initialization+0x7c> 2008520: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 2008524: 81 c7 e0 08 ret 2008528: 81 e8 00 00 restore =============================================================================== 020092dc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20092dc: 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 ) 20092e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20092e4: 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 ) 20092e8: 80 a0 60 00 cmp %g1, 0 20092ec: 02 80 00 19 be 2009350 <_Objects_Allocate+0x74> <== NEVER TAKEN 20092f0: 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 ); 20092f4: b8 07 60 20 add %i5, 0x20, %i4 20092f8: 7f ff fd 47 call 2008814 <_Chain_Get> 20092fc: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2009300: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2009304: 80 a0 60 00 cmp %g1, 0 2009308: 02 80 00 12 be 2009350 <_Objects_Allocate+0x74> 200930c: 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 ) { 2009310: 80 a2 20 00 cmp %o0, 0 2009314: 02 80 00 11 be 2009358 <_Objects_Allocate+0x7c> 2009318: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 200931c: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2009320: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2009324: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 2009328: 40 00 40 a8 call 20195c8 <.udiv> 200932c: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2009330: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2009334: 91 2a 20 02 sll %o0, 2, %o0 2009338: c6 00 40 08 ld [ %g1 + %o0 ], %g3 information->inactive--; 200933c: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2009340: 86 00 ff ff add %g3, -1, %g3 2009344: c6 20 40 08 st %g3, [ %g1 + %o0 ] information->inactive--; 2009348: 82 00 bf ff add %g2, -1, %g1 200934c: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2009350: 81 c7 e0 08 ret 2009354: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 2009358: 40 00 00 10 call 2009398 <_Objects_Extend_information> 200935c: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2009360: 7f ff fd 2d call 2008814 <_Chain_Get> 2009364: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2009368: b0 92 20 00 orcc %o0, 0, %i0 200936c: 32 bf ff ed bne,a 2009320 <_Objects_Allocate+0x44> 2009370: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 ); } #endif return the_object; } 2009374: 81 c7 e0 08 ret 2009378: 81 e8 00 00 restore =============================================================================== 02009398 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2009398: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 200939c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 20093a0: f8 16 20 0a lduh [ %i0 + 0xa ], %i4 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 20093a4: 80 a4 20 00 cmp %l0, 0 20093a8: 02 80 00 a6 be 2009640 <_Objects_Extend_information+0x2a8> 20093ac: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1 block_count = 0; else { block_count = information->maximum / information->allocation_size; 20093b0: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2 20093b4: b3 2e 60 10 sll %i1, 0x10, %i1 20093b8: 92 10 00 1a mov %i2, %o1 20093bc: 40 00 40 83 call 20195c8 <.udiv> 20093c0: 91 36 60 10 srl %i1, 0x10, %o0 20093c4: a7 2a 20 10 sll %o0, 0x10, %l3 20093c8: a7 34 e0 10 srl %l3, 0x10, %l3 for ( ; block < block_count; block++ ) { 20093cc: 80 a4 e0 00 cmp %l3, 0 20093d0: 02 80 00 a3 be 200965c <_Objects_Extend_information+0x2c4><== NEVER TAKEN 20093d4: 90 10 00 1a mov %i2, %o0 if ( information->object_blocks[ block ] == NULL ) { 20093d8: c2 04 00 00 ld [ %l0 ], %g1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 20093dc: ba 10 00 1c mov %i4, %i5 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 20093e0: 80 a0 60 00 cmp %g1, 0 20093e4: 12 80 00 08 bne 2009404 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN 20093e8: b6 10 20 00 clr %i3 do_extend = false; 20093ec: 10 80 00 a0 b 200966c <_Objects_Extend_information+0x2d4> <== NOT EXECUTED 20093f0: b4 10 20 00 clr %i2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 20093f4: c2 04 00 01 ld [ %l0 + %g1 ], %g1 20093f8: 80 a0 60 00 cmp %g1, 0 20093fc: 22 80 00 08 be,a 200941c <_Objects_Extend_information+0x84> 2009400: b4 10 20 00 clr %i2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2009404: b6 06 e0 01 inc %i3 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 2009408: ba 07 40 1a add %i5, %i2, %i5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 200940c: 80 a4 c0 1b cmp %l3, %i3 2009410: 18 bf ff f9 bgu 20093f4 <_Objects_Extend_information+0x5c> 2009414: 83 2e e0 02 sll %i3, 2, %g1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 2009418: b4 10 20 01 mov 1, %i2 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 200941c: b3 36 60 10 srl %i1, 0x10, %i1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 2009420: 03 00 00 3f sethi %hi(0xfc00), %g1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2009424: b2 06 40 08 add %i1, %o0, %i1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 2009428: 82 10 63 ff or %g1, 0x3ff, %g1 200942c: 80 a6 40 01 cmp %i1, %g1 2009430: 18 80 00 93 bgu 200967c <_Objects_Extend_information+0x2e4> 2009434: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 2009438: 40 00 40 2a call 20194e0 <.umul> 200943c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2009440: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2009444: 80 a0 60 00 cmp %g1, 0 2009448: 02 80 00 6a be 20095f0 <_Objects_Extend_information+0x258> 200944c: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 2009450: 40 00 09 65 call 200b9e4 <_Workspace_Allocate> 2009454: 01 00 00 00 nop if ( !new_object_block ) 2009458: a0 92 20 00 orcc %o0, 0, %l0 200945c: 02 80 00 88 be 200967c <_Objects_Extend_information+0x2e4> 2009460: 01 00 00 00 nop } /* * Do we need to grow the tables? */ if ( do_extend ) { 2009464: 80 8e a0 ff btst 0xff, %i2 2009468: 22 80 00 3f be,a 2009564 <_Objects_Extend_information+0x1cc> 200946c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 2009470: b4 04 e0 01 add %l3, 1, %i2 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 2009474: 91 2e a0 01 sll %i2, 1, %o0 2009478: 90 02 00 1a add %o0, %i2, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 200947c: 90 06 40 08 add %i1, %o0, %o0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 2009480: 90 02 00 1c add %o0, %i4, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2009484: 40 00 09 58 call 200b9e4 <_Workspace_Allocate> 2009488: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 200948c: a2 92 20 00 orcc %o0, 0, %l1 2009490: 02 80 00 79 be 2009674 <_Objects_Extend_information+0x2dc> 2009494: b5 2e a0 02 sll %i2, 2, %i2 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2009498: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200949c: 80 a7 00 01 cmp %i4, %g1 20094a0: a4 04 40 1a add %l1, %i2, %l2 20094a4: 0a 80 00 57 bcs 2009600 <_Objects_Extend_information+0x268> 20094a8: b4 04 80 1a add %l2, %i2, %i2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20094ac: 80 a7 20 00 cmp %i4, 0 20094b0: 02 80 00 07 be 20094cc <_Objects_Extend_information+0x134><== NEVER TAKEN 20094b4: 82 10 20 00 clr %g1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 20094b8: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20094bc: 82 00 60 01 inc %g1 20094c0: 80 a7 00 01 cmp %i4, %g1 20094c4: 18 bf ff fd bgu 20094b8 <_Objects_Extend_information+0x120><== NEVER TAKEN 20094c8: c0 20 80 1a clr [ %g2 + %i2 ] 20094cc: a7 2c e0 02 sll %l3, 2, %l3 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20094d0: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20094d4: c0 24 40 13 clr [ %l1 + %l3 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20094d8: 86 07 40 03 add %i5, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 20094dc: 80 a7 40 03 cmp %i5, %g3 20094e0: 1a 80 00 0a bcc 2009508 <_Objects_Extend_information+0x170><== NEVER TAKEN 20094e4: c0 24 80 13 clr [ %l2 + %l3 ] * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 20094e8: 83 2f 60 02 sll %i5, 2, %g1 20094ec: 84 10 00 1d mov %i5, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 20094f0: 82 06 80 01 add %i2, %g1, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 20094f4: c0 20 40 00 clr [ %g1 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 20094f8: 84 00 a0 01 inc %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 20094fc: 80 a0 c0 02 cmp %g3, %g2 2009500: 18 bf ff fd bgu 20094f4 <_Objects_Extend_information+0x15c> 2009504: 82 00 60 04 add %g1, 4, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2009508: 7f ff e4 6c call 20026b8 200950c: 01 00 00 00 nop uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 2009510: c6 06 00 00 ld [ %i0 ], %g3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2009514: c4 16 20 04 lduh [ %i0 + 4 ], %g2 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2009518: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 200951c: f2 36 20 10 sth %i1, [ %i0 + 0x10 ] 2009520: 87 28 e0 18 sll %g3, 0x18, %g3 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2009524: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2009528: e2 26 20 34 st %l1, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; 200952c: e4 26 20 30 st %l2, [ %i0 + 0x30 ] information->local_table = local_table; 2009530: f4 26 20 1c st %i2, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2009534: b3 2e 60 10 sll %i1, 0x10, %i1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 2009538: 03 00 00 40 sethi %hi(0x10000), %g1 200953c: b3 36 60 10 srl %i1, 0x10, %i1 2009540: 82 10 c0 01 or %g3, %g1, %g1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2009544: 82 10 40 02 or %g1, %g2, %g1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 2009548: 82 10 40 19 or %g1, %i1, %g1 200954c: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2009550: 7f ff e4 5e call 20026c8 2009554: 01 00 00 00 nop _Workspace_Free( old_tables ); 2009558: 40 00 09 2b call 200ba04 <_Workspace_Free> 200955c: 90 10 00 1c mov %i4, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2009560: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2009564: b7 2e e0 02 sll %i3, 2, %i3 2009568: e0 20 40 1b st %l0, [ %g1 + %i3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 200956c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2009570: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2009574: d2 00 40 1b ld [ %g1 + %i3 ], %o1 2009578: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 200957c: 90 07 bf f4 add %fp, -12, %o0 2009580: 7f ff fc b4 call 2008850 <_Chain_Initialize> 2009584: 39 00 00 40 sethi %hi(0x10000), %i4 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 2009588: 10 80 00 0d b 20095bc <_Objects_Extend_information+0x224> 200958c: b4 06 20 20 add %i0, 0x20, %i2 the_object->id = _Objects_Build_id( 2009590: c6 16 20 04 lduh [ %i0 + 4 ], %g3 2009594: 85 28 a0 18 sll %g2, 0x18, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2009598: 87 28 e0 1b sll %g3, 0x1b, %g3 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 200959c: 84 10 80 1c or %g2, %i4, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 20095a0: 84 10 80 03 or %g2, %g3, %g2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 20095a4: 84 10 80 1d or %g2, %i5, %g2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20095a8: 90 10 00 1a mov %i2, %o0 20095ac: 92 10 00 01 mov %g1, %o1 index++; 20095b0: ba 07 60 01 inc %i5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20095b4: 7f ff fc 8d call 20087e8 <_Chain_Append> 20095b8: c4 20 60 08 st %g2, [ %g1 + 8 ] /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 20095bc: 7f ff fc 96 call 2008814 <_Chain_Get> 20095c0: 90 07 bf f4 add %fp, -12, %o0 20095c4: 82 92 20 00 orcc %o0, 0, %g1 20095c8: 32 bf ff f2 bne,a 2009590 <_Objects_Extend_information+0x1f8> 20095cc: c4 06 00 00 ld [ %i0 ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20095d0: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20095d4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 20095d8: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20095dc: c8 20 c0 1b st %g4, [ %g3 + %i3 ] information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 20095e0: 82 00 80 04 add %g2, %g4, %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 20095e4: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20095e8: 81 c7 e0 08 ret 20095ec: 81 e8 00 00 restore if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 20095f0: 40 00 09 0b call 200ba1c <_Workspace_Allocate_or_fatal_error> 20095f4: 01 00 00 00 nop 20095f8: 10 bf ff 9b b 2009464 <_Objects_Extend_information+0xcc> 20095fc: a0 10 00 08 mov %o0, %l0 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2009600: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2009604: a7 2c e0 02 sll %l3, 2, %l3 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2009608: 40 00 1e 64 call 2010f98 200960c: 94 10 00 13 mov %l3, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2009610: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2009614: 94 10 00 13 mov %l3, %o2 2009618: 40 00 1e 60 call 2010f98 200961c: 90 10 00 12 mov %l2, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 2009620: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2009624: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 2009628: b8 07 00 01 add %i4, %g1, %i4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 200962c: 90 10 00 1a mov %i2, %o0 2009630: 40 00 1e 5a call 2010f98 2009634: 95 2f 20 02 sll %i4, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2009638: 10 bf ff a7 b 20094d4 <_Objects_Extend_information+0x13c> 200963c: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 2009640: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 2009644: ba 10 00 1c mov %i4, %i5 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 2009648: b4 10 20 01 mov 1, %i2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 200964c: b6 10 20 00 clr %i3 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 2009650: a6 10 20 00 clr %l3 2009654: 10 bf ff 72 b 200941c <_Objects_Extend_information+0x84> 2009658: b3 2e 60 10 sll %i1, 0x10, %i1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 200965c: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 2009660: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 2009664: 10 bf ff 6e b 200941c <_Objects_Extend_information+0x84> <== NOT EXECUTED 2009668: b6 10 20 00 clr %i3 <== NOT EXECUTED 200966c: 10 bf ff 6c b 200941c <_Objects_Extend_information+0x84> <== NOT EXECUTED 2009670: b6 10 20 00 clr %i3 <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 2009674: 40 00 08 e4 call 200ba04 <_Workspace_Free> 2009678: 90 10 00 10 mov %l0, %o0 return; 200967c: 81 c7 e0 08 ret 2009680: 81 e8 00 00 restore =============================================================================== 02009728 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2009728: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 200972c: 80 a6 60 00 cmp %i1, 0 2009730: 02 80 00 17 be 200978c <_Objects_Get_information+0x64> 2009734: 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 ); 2009738: 40 00 13 c2 call 200e640 <_Objects_API_maximum_class> 200973c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2009740: 80 a2 20 00 cmp %o0, 0 2009744: 02 80 00 12 be 200978c <_Objects_Get_information+0x64> 2009748: 80 a2 00 19 cmp %o0, %i1 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 200974c: 0a 80 00 10 bcs 200978c <_Objects_Get_information+0x64> 2009750: 03 00 80 7a sethi %hi(0x201e800), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2009754: b1 2e 20 02 sll %i0, 2, %i0 2009758: 82 10 61 98 or %g1, 0x198, %g1 200975c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2009760: 80 a0 60 00 cmp %g1, 0 2009764: 02 80 00 0a be 200978c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009768: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 200976c: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2009770: 80 a7 60 00 cmp %i5, 0 2009774: 02 80 00 06 be 200978c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009778: 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 ) 200977c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2009780: 80 a0 00 01 cmp %g0, %g1 2009784: 82 60 20 00 subx %g0, 0, %g1 2009788: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 200978c: 81 c7 e0 08 ret 2009790: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02018194 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 2018194: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 2018198: 80 a6 60 00 cmp %i1, 0 201819c: 02 80 00 41 be 20182a0 <_Objects_Get_name_as_string+0x10c> 20181a0: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( name == NULL ) 20181a4: 02 80 00 3a be 201828c <_Objects_Get_name_as_string+0xf8> 20181a8: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 20181ac: 02 80 00 3a be 2018294 <_Objects_Get_name_as_string+0x100> 20181b0: 03 00 80 c8 sethi %hi(0x2032000), %g1 information = _Objects_Get_information_id( tmpId ); 20181b4: 7f ff df 33 call 200fe80 <_Objects_Get_information_id> 20181b8: 90 10 00 18 mov %i0, %o0 if ( !information ) 20181bc: ba 92 20 00 orcc %o0, 0, %i5 20181c0: 02 80 00 38 be 20182a0 <_Objects_Get_name_as_string+0x10c> 20181c4: 92 10 00 18 mov %i0, %o1 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 20181c8: 7f ff df 6c call 200ff78 <_Objects_Get> 20181cc: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 20181d0: c2 07 bf fc ld [ %fp + -4 ], %g1 20181d4: 80 a0 60 00 cmp %g1, 0 20181d8: 32 80 00 33 bne,a 20182a4 <_Objects_Get_name_as_string+0x110> 20181dc: b4 10 20 00 clr %i2 return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 20181e0: c2 0f 60 38 ldub [ %i5 + 0x38 ], %g1 20181e4: 80 a0 60 00 cmp %g1, 0 20181e8: 32 80 00 31 bne,a 20182ac <_Objects_Get_name_as_string+0x118> 20181ec: c4 02 20 0c ld [ %o0 + 0xc ], %g2 s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 20181f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 20181f4: c0 2f bf f4 clrb [ %fp + -12 ] { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 20181f8: 85 30 60 08 srl %g1, 8, %g2 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 20181fc: 89 30 60 18 srl %g1, 0x18, %g4 lname[ 1 ] = (u32_name >> 16) & 0xff; 2018200: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; 2018204: c4 2f bf f2 stb %g2, [ %fp + -14 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2018208: c8 2f bf f0 stb %g4, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; 201820c: c6 2f bf f1 stb %g3, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 2018210: c2 2f bf f3 stb %g1, [ %fp + -13 ] lname[ 4 ] = '\0'; s = lname; 2018214: 84 07 bf f0 add %fp, -16, %g2 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2018218: b2 86 7f ff addcc %i1, -1, %i1 201821c: 02 80 00 1a be 2018284 <_Objects_Get_name_as_string+0xf0> <== NEVER TAKEN 2018220: 82 10 00 1a mov %i2, %g1 2018224: c8 48 80 00 ldsb [ %g2 ], %g4 2018228: 80 a1 20 00 cmp %g4, 0 201822c: 02 80 00 16 be 2018284 <_Objects_Get_name_as_string+0xf0> 2018230: c6 08 80 00 ldub [ %g2 ], %g3 2018234: 31 00 80 c2 sethi %hi(0x2030800), %i0 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 2018238: b2 06 80 19 add %i2, %i1, %i1 201823c: 10 80 00 05 b 2018250 <_Objects_Get_name_as_string+0xbc> 2018240: b0 16 23 d8 or %i0, 0x3d8, %i0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2018244: 80 a1 20 00 cmp %g4, 0 2018248: 02 80 00 0f be 2018284 <_Objects_Get_name_as_string+0xf0> 201824c: c6 08 80 00 ldub [ %g2 ], %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; 2018250: fa 06 00 00 ld [ %i0 ], %i5 2018254: 88 08 e0 ff and %g3, 0xff, %g4 2018258: 88 07 40 04 add %i5, %g4, %g4 201825c: c8 49 20 01 ldsb [ %g4 + 1 ], %g4 2018260: 80 89 20 97 btst 0x97, %g4 2018264: 12 80 00 03 bne 2018270 <_Objects_Get_name_as_string+0xdc> 2018268: 84 00 a0 01 inc %g2 201826c: 86 10 20 2a mov 0x2a, %g3 2018270: c6 28 40 00 stb %g3, [ %g1 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2018274: 82 00 60 01 inc %g1 2018278: 80 a0 40 19 cmp %g1, %i1 201827c: 32 bf ff f2 bne,a 2018244 <_Objects_Get_name_as_string+0xb0> 2018280: c8 48 80 00 ldsb [ %g2 ], %g4 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 2018284: 7f ff e3 75 call 2011058 <_Thread_Enable_dispatch> 2018288: c0 28 40 00 clrb [ %g1 ] return name; } return NULL; /* unreachable path */ } 201828c: 81 c7 e0 08 ret 2018290: 91 e8 00 1a restore %g0, %i2, %o0 return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2018294: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 2018298: 10 bf ff c7 b 20181b4 <_Objects_Get_name_as_string+0x20> 201829c: f0 00 60 08 ld [ %g1 + 8 ], %i0 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 20182a0: b4 10 20 00 clr %i2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 20182a4: 81 c7 e0 08 ret 20182a8: 91 e8 00 1a restore %g0, %i2, %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 20182ac: 80 a0 a0 00 cmp %g2, 0 20182b0: 12 bf ff da bne 2018218 <_Objects_Get_name_as_string+0x84> 20182b4: 82 10 00 1a mov %i2, %g1 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 20182b8: 7f ff e3 68 call 2011058 <_Thread_Enable_dispatch> 20182bc: c0 28 40 00 clrb [ %g1 ] 20182c0: 30 bf ff f3 b,a 201828c <_Objects_Get_name_as_string+0xf8> =============================================================================== 0201ad98 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 201ad98: 9d e3 bf a0 save %sp, -96, %sp Objects_Control *object; Objects_Id next_id; if ( !information ) return NULL; 201ad9c: 90 10 20 00 clr %o0 ) { Objects_Control *object; Objects_Id next_id; if ( !information ) 201ada0: 80 a6 20 00 cmp %i0, 0 201ada4: 02 80 00 19 be 201ae08 <_Objects_Get_next+0x70> 201ada8: ba 10 00 18 mov %i0, %i5 return NULL; if ( !location_p ) 201adac: 80 a6 a0 00 cmp %i2, 0 201adb0: 02 80 00 16 be 201ae08 <_Objects_Get_next+0x70> 201adb4: 80 a6 e0 00 cmp %i3, 0 return NULL; if ( !next_id_p ) 201adb8: 02 80 00 14 be 201ae08 <_Objects_Get_next+0x70> 201adbc: 83 2e 60 10 sll %i1, 0x10, %g1 return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 201adc0: 80 a0 60 00 cmp %g1, 0 201adc4: 22 80 00 13 be,a 201ae10 <_Objects_Get_next+0x78> 201adc8: f2 06 20 08 ld [ %i0 + 8 ], %i1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201adcc: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 201add0: 83 2e 60 10 sll %i1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 201add4: 92 10 00 19 mov %i1, %o1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201add8: 83 30 60 10 srl %g1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 201addc: 90 10 00 1d mov %i5, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201ade0: 80 a0 80 01 cmp %g2, %g1 201ade4: 0a 80 00 13 bcs 201ae30 <_Objects_Get_next+0x98> 201ade8: 94 10 00 1a mov %i2, %o2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 201adec: 7f ff d4 63 call 200ff78 <_Objects_Get> 201adf0: b2 06 60 01 inc %i1 next_id++; } while (*location_p != OBJECTS_LOCAL); 201adf4: c2 06 80 00 ld [ %i2 ], %g1 201adf8: 80 a0 60 00 cmp %g1, 0 201adfc: 32 bf ff f5 bne,a 201add0 <_Objects_Get_next+0x38> 201ae00: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 *next_id_p = next_id; 201ae04: f2 26 c0 00 st %i1, [ %i3 ] return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 201ae08: 81 c7 e0 08 ret 201ae0c: 91 e8 00 08 restore %g0, %o0, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201ae10: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 201ae14: 83 2e 60 10 sll %i1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 201ae18: 92 10 00 19 mov %i1, %o1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201ae1c: 83 30 60 10 srl %g1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 201ae20: 90 10 00 1d mov %i5, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 201ae24: 80 a0 80 01 cmp %g2, %g1 201ae28: 1a bf ff f1 bcc 201adec <_Objects_Get_next+0x54> <== ALWAYS TAKEN 201ae2c: 94 10 00 1a mov %i2, %o2 { *location_p = OBJECTS_ERROR; 201ae30: 82 10 20 01 mov 1, %g1 201ae34: c2 26 80 00 st %g1, [ %i2 ] *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 201ae38: 90 10 20 00 clr %o0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 201ae3c: 82 10 3f ff mov -1, %g1 201ae40: c2 26 c0 00 st %g1, [ %i3 ] return 0; } 201ae44: 81 c7 e0 08 ret 201ae48: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200fff0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200fff0: 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; 200fff4: 80 a6 20 00 cmp %i0, 0 200fff8: 12 80 00 06 bne 2010010 <_Objects_Id_to_name+0x20> 200fffc: 83 36 20 18 srl %i0, 0x18, %g1 2010000: 03 00 80 c8 sethi %hi(0x2032000), %g1 2010004: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 20322bc <_Per_CPU_Information+0xc> 2010008: f0 00 60 08 ld [ %g1 + 8 ], %i0 201000c: 83 36 20 18 srl %i0, 0x18, %g1 2010010: 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 ) 2010014: 84 00 7f ff add %g1, -1, %g2 2010018: 80 a0 a0 02 cmp %g2, 2 201001c: 18 80 00 12 bgu 2010064 <_Objects_Id_to_name+0x74> 2010020: 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 ] ) 2010024: 83 28 60 02 sll %g1, 2, %g1 2010028: 05 00 80 c7 sethi %hi(0x2031c00), %g2 201002c: 84 10 a0 98 or %g2, 0x98, %g2 ! 2031c98 <_Objects_Information_table> 2010030: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2010034: 80 a0 60 00 cmp %g1, 0 2010038: 02 80 00 0b be 2010064 <_Objects_Id_to_name+0x74> 201003c: 85 36 20 1b srl %i0, 0x1b, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 2010040: 85 28 a0 02 sll %g2, 2, %g2 2010044: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 2010048: 80 a2 20 00 cmp %o0, 0 201004c: 02 80 00 06 be 2010064 <_Objects_Id_to_name+0x74> <== NEVER TAKEN 2010050: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 2010054: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2010058: 80 a0 60 00 cmp %g1, 0 201005c: 02 80 00 04 be 201006c <_Objects_Id_to_name+0x7c> <== ALWAYS TAKEN 2010060: 92 10 00 18 mov %i0, %o1 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 2010064: 81 c7 e0 08 ret 2010068: 91 e8 00 1d restore %g0, %i5, %o0 #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 ); 201006c: 7f ff ff c3 call 200ff78 <_Objects_Get> 2010070: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2010074: 80 a2 20 00 cmp %o0, 0 2010078: 02 bf ff fb be 2010064 <_Objects_Id_to_name+0x74> 201007c: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 2010080: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2010084: 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(); 2010088: 40 00 03 f4 call 2011058 <_Thread_Enable_dispatch> 201008c: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2010090: 30 bf ff f5 b,a 2010064 <_Objects_Id_to_name+0x74> =============================================================================== 02009a38 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2009a38: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 2009a3c: fa 16 20 0a lduh [ %i0 + 0xa ], %i5 block_count = (information->maximum - index_base) / 2009a40: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4 2009a44: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2009a48: 92 10 00 1c mov %i4, %o1 2009a4c: 40 00 3e df call 20195c8 <.udiv> 2009a50: 90 22 00 1d sub %o0, %i5, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2009a54: 80 a2 20 00 cmp %o0, 0 2009a58: 02 80 00 34 be 2009b28 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN 2009a5c: 01 00 00 00 nop if ( information->inactive_per_block[ block ] == 2009a60: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 2009a64: c2 01 00 00 ld [ %g4 ], %g1 2009a68: 80 a7 00 01 cmp %i4, %g1 2009a6c: 02 80 00 0f be 2009aa8 <_Objects_Shrink_information+0x70> <== NEVER TAKEN 2009a70: 82 10 20 00 clr %g1 2009a74: 10 80 00 07 b 2009a90 <_Objects_Shrink_information+0x58> 2009a78: b6 10 20 04 mov 4, %i3 * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 2009a7c: 86 06 e0 04 add %i3, 4, %g3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 2009a80: 80 a7 00 02 cmp %i4, %g2 2009a84: 02 80 00 0a be 2009aac <_Objects_Shrink_information+0x74> 2009a88: ba 07 40 1c add %i5, %i4, %i5 2009a8c: b6 10 00 03 mov %g3, %i3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2009a90: 82 00 60 01 inc %g1 2009a94: 80 a0 40 08 cmp %g1, %o0 2009a98: 32 bf ff f9 bne,a 2009a7c <_Objects_Shrink_information+0x44> 2009a9c: c4 01 00 1b ld [ %g4 + %i3 ], %g2 2009aa0: 81 c7 e0 08 ret 2009aa4: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == 2009aa8: b6 10 20 00 clr %i3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2009aac: 10 80 00 06 b 2009ac4 <_Objects_Shrink_information+0x8c> 2009ab0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 2009ab4: 80 a7 20 00 cmp %i4, 0 2009ab8: 22 80 00 12 be,a 2009b00 <_Objects_Shrink_information+0xc8> 2009abc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 2009ac0: 90 10 00 1c mov %i4, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 2009ac4: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 2009ac8: 80 a0 40 1d cmp %g1, %i5 2009acc: 0a bf ff fa bcs 2009ab4 <_Objects_Shrink_information+0x7c> 2009ad0: f8 02 00 00 ld [ %o0 ], %i4 (index < (index_base + information->allocation_size))) { 2009ad4: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2009ad8: 84 07 40 02 add %i5, %g2, %g2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 2009adc: 80 a0 40 02 cmp %g1, %g2 2009ae0: 1a bf ff f6 bcc 2009ab8 <_Objects_Shrink_information+0x80> 2009ae4: 80 a7 20 00 cmp %i4, 0 (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 2009ae8: 40 00 10 f9 call 200decc <_Chain_Extract> 2009aec: 01 00 00 00 nop } } while ( the_object ); 2009af0: 80 a7 20 00 cmp %i4, 0 2009af4: 12 bf ff f4 bne 2009ac4 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN 2009af8: 90 10 00 1c mov %i4, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2009afc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2009b00: 40 00 07 c1 call 200ba04 <_Workspace_Free> 2009b04: d0 00 40 1b ld [ %g1 + %i3 ], %o0 information->object_blocks[ block ] = NULL; 2009b08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2009b0c: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2009b10: c0 20 40 1b clr [ %g1 + %i3 ] information->inactive_per_block[ block ] = 0; 2009b14: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive -= information->allocation_size; 2009b18: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2009b1c: c0 20 c0 1b clr [ %g3 + %i3 ] information->inactive -= information->allocation_size; 2009b20: 82 20 80 01 sub %g2, %g1, %g1 2009b24: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] return; 2009b28: 81 c7 e0 08 ret 2009b2c: 81 e8 00 00 restore =============================================================================== 0200fc10 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200fc10: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 200fc14: f4 06 20 08 ld [ %i0 + 8 ], %i2 200fc18: 3b 00 80 7b sethi %hi(0x201ec00), %i5 200fc1c: b3 36 a0 18 srl %i2, 0x18, %i1 200fc20: ba 17 62 48 or %i5, 0x248, %i5 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 200fc24: b5 2e a0 10 sll %i2, 0x10, %i2 200fc28: b2 0e 60 07 and %i1, 7, %i1 200fc2c: b5 36 a0 0e srl %i2, 0xe, %i2 200fc30: b2 06 60 04 add %i1, 4, %i1 200fc34: b3 2e 60 02 sll %i1, 2, %i1 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 200fc38: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 200fc3c: 80 a6 e0 00 cmp %i3, 0 200fc40: 02 80 00 20 be 200fcc0 <_POSIX_Keys_Run_destructors+0xb0> 200fc44: b8 10 20 01 mov 1, %i4 200fc48: 84 10 20 01 mov 1, %g2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200fc4c: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 _POSIX_Keys_Information.local_table [ index ]; 200fc50: 83 2f 20 10 sll %i4, 0x10, %g1 Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200fc54: 83 30 60 0e srl %g1, 0xe, %g1 200fc58: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 200fc5c: 80 a0 60 00 cmp %g1, 0 200fc60: 02 80 00 10 be 200fca0 <_POSIX_Keys_Run_destructors+0x90> 200fc64: 86 00 40 19 add %g1, %i1, %g3 200fc68: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 200fc6c: 80 a1 20 00 cmp %g4, 0 200fc70: 22 80 00 0d be,a 200fca4 <_POSIX_Keys_Run_destructors+0x94> 200fc74: b8 07 20 01 inc %i4 void *value = key->Values [ thread_api ][ thread_index ]; 200fc78: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200fc7c: d0 00 c0 1a ld [ %g3 + %i2 ], %o0 if ( value != NULL ) { 200fc80: 80 a2 20 00 cmp %o0, 0 200fc84: 22 80 00 08 be,a 200fca4 <_POSIX_Keys_Run_destructors+0x94><== ALWAYS TAKEN 200fc88: b8 07 20 01 inc %i4 key->Values [ thread_api ][ thread_index ] = NULL; 200fc8c: c0 20 c0 1a clr [ %g3 + %i2 ] <== NOT EXECUTED (*key->destructor)( value ); 200fc90: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200fc94: 9f c0 40 00 call %g1 <== NOT EXECUTED 200fc98: 01 00 00 00 nop <== NOT EXECUTED done = false; 200fc9c: 84 10 20 00 clr %g2 ! 0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 200fca0: b8 07 20 01 inc %i4 200fca4: 83 2f 20 10 sll %i4, 0x10, %g1 200fca8: 83 30 60 10 srl %g1, 0x10, %g1 200fcac: 80 a6 c0 01 cmp %i3, %g1 200fcb0: 1a bf ff e7 bcc 200fc4c <_POSIX_Keys_Run_destructors+0x3c> 200fcb4: 80 88 a0 ff btst 0xff, %g2 * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 200fcb8: 22 bf ff e1 be,a 200fc3c <_POSIX_Keys_Run_destructors+0x2c><== NEVER TAKEN 200fcbc: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 <== NOT EXECUTED 200fcc0: 81 c7 e0 08 ret 200fcc4: 81 e8 00 00 restore =============================================================================== 0200cbf4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200cbf4: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 200cbf8: 11 00 80 ae sethi %hi(0x202b800), %o0 200cbfc: 92 10 00 18 mov %i0, %o1 200cc00: 90 12 23 7c or %o0, 0x37c, %o0 200cc04: 40 00 0d 72 call 20101cc <_Objects_Get> 200cc08: 94 07 bf f8 add %fp, -8, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200cc0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200cc10: 80 a0 60 00 cmp %g1, 0 200cc14: 22 80 00 08 be,a 200cc34 <_POSIX_Message_queue_Receive_support+0x40> 200cc18: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200cc1c: 40 00 2a f8 call 20177fc <__errno> 200cc20: b0 10 3f ff mov -1, %i0 200cc24: 82 10 20 09 mov 9, %g1 200cc28: c2 22 00 00 st %g1, [ %o0 ] } 200cc2c: 81 c7 e0 08 ret 200cc30: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200cc34: 84 08 60 03 and %g1, 3, %g2 200cc38: 80 a0 a0 01 cmp %g2, 1 200cc3c: 02 80 00 3a be 200cd24 <_POSIX_Message_queue_Receive_support+0x130> 200cc40: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200cc44: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200cc48: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200cc4c: 80 a0 80 1a cmp %g2, %i2 200cc50: 18 80 00 24 bgu 200cce0 <_POSIX_Message_queue_Receive_support+0xec> 200cc54: 84 10 3f ff mov -1, %g2 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200cc58: c4 27 bf fc st %g2, [ %fp + -4 ] /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200cc5c: 80 a7 20 00 cmp %i4, 0 200cc60: 12 80 00 1b bne 200cccc <_POSIX_Message_queue_Receive_support+0xd8> 200cc64: 98 10 20 00 clr %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200cc68: 9a 10 00 1d mov %i5, %o5 200cc6c: 90 02 20 1c add %o0, 0x1c, %o0 200cc70: 92 10 00 18 mov %i0, %o1 200cc74: 94 10 00 19 mov %i1, %o2 200cc78: 96 07 bf fc add %fp, -4, %o3 200cc7c: 40 00 08 e8 call 200f01c <_CORE_message_queue_Seize> 200cc80: 98 0b 20 01 and %o4, 1, %o4 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200cc84: 40 00 11 59 call 20111e8 <_Thread_Enable_dispatch> 200cc88: 3b 00 80 ae sethi %hi(0x202b800), %i5 if (msg_prio) { 200cc8c: 80 a6 e0 00 cmp %i3, 0 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200cc90: ba 17 63 f0 or %i5, 0x3f0, %i5 do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { 200cc94: 02 80 00 07 be 200ccb0 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN 200cc98: c2 07 60 0c ld [ %i5 + 0xc ], %g1 RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); 200cc9c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 200cca0: 85 38 e0 1f sra %g3, 0x1f, %g2 200cca4: 86 18 80 03 xor %g2, %g3, %g3 200cca8: 84 20 c0 02 sub %g3, %g2, %g2 *msg_prio = _POSIX_Message_queue_Priority_from_core( 200ccac: c4 26 c0 00 st %g2, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200ccb0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200ccb4: 80 a0 60 00 cmp %g1, 0 200ccb8: 12 80 00 12 bne 200cd00 <_POSIX_Message_queue_Receive_support+0x10c> 200ccbc: 01 00 00 00 nop return length_out; 200ccc0: f0 07 bf fc ld [ %fp + -4 ], %i0 200ccc4: 81 c7 e0 08 ret 200ccc8: 81 e8 00 00 restore /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 200cccc: 05 00 00 10 sethi %hi(0x4000), %g2 200ccd0: 82 08 40 02 and %g1, %g2, %g1 200ccd4: 80 a0 00 01 cmp %g0, %g1 200ccd8: 10 bf ff e4 b 200cc68 <_POSIX_Message_queue_Receive_support+0x74> 200ccdc: 98 60 3f ff subx %g0, -1, %o4 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 200cce0: 40 00 11 42 call 20111e8 <_Thread_Enable_dispatch> 200cce4: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200cce8: 40 00 2a c5 call 20177fc <__errno> 200ccec: 01 00 00 00 nop 200ccf0: 82 10 20 7a mov 0x7a, %g1 ! 7a 200ccf4: c2 22 00 00 st %g1, [ %o0 ] 200ccf8: 81 c7 e0 08 ret 200ccfc: 81 e8 00 00 restore } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 200cd00: 40 00 2a bf call 20177fc <__errno> 200cd04: b0 10 3f ff mov -1, %i0 200cd08: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cd0c: b6 10 00 08 mov %o0, %i3 200cd10: 40 00 00 a3 call 200cf9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200cd14: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200cd18: d0 26 c0 00 st %o0, [ %i3 ] 200cd1c: 81 c7 e0 08 ret 200cd20: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 200cd24: 40 00 11 31 call 20111e8 <_Thread_Enable_dispatch> 200cd28: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200cd2c: 40 00 2a b4 call 20177fc <__errno> 200cd30: 01 00 00 00 nop 200cd34: 82 10 20 09 mov 9, %g1 ! 9 200cd38: c2 22 00 00 st %g1, [ %o0 ] 200cd3c: 81 c7 e0 08 ret 200cd40: 81 e8 00 00 restore =============================================================================== 0200f8c4 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200f8c4: 9d e3 bf a0 save %sp, -96, %sp POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 200f8c8: 80 a6 a0 00 cmp %i2, 0 200f8cc: 12 80 00 30 bne 200f98c <_POSIX_Semaphore_Create_support+0xc8> 200f8d0: 03 00 80 8d sethi %hi(0x2023400), %g1 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200f8d4: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2023540 <_Thread_Dispatch_disable_level> 200f8d8: 84 00 a0 01 inc %g2 200f8dc: c4 20 61 40 st %g2, [ %g1 + 0x140 ] return _Thread_Dispatch_disable_level; 200f8e0: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200f8e4: 35 00 80 8e sethi %hi(0x2023800), %i2 200f8e8: 7f ff ed a6 call 200af80 <_Objects_Allocate> 200f8ec: 90 16 a0 40 or %i2, 0x40, %o0 ! 2023840 <_POSIX_Semaphore_Information> rtems_set_errno_and_return_minus_one( ENOSYS ); _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200f8f0: ba 92 20 00 orcc %o0, 0, %i5 200f8f4: 02 80 00 2c be 200f9a4 <_POSIX_Semaphore_Create_support+0xe0> 200f8f8: 80 a6 20 00 cmp %i0, 0 /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { 200f8fc: 02 80 00 1e be 200f974 <_POSIX_Semaphore_Create_support+0xb0> 200f900: 92 10 00 19 mov %i1, %o1 name = _Workspace_String_duplicate( name_arg, name_len ); 200f904: 40 00 04 ad call 2010bb8 <_Workspace_String_duplicate> 200f908: 90 10 00 18 mov %i0, %o0 if ( !name ) { 200f90c: b2 92 20 00 orcc %o0, 0, %i1 200f910: 02 80 00 2d be 200f9c4 <_POSIX_Semaphore_Create_support+0x100><== NEVER TAKEN 200f914: 82 10 20 01 mov 1, %g1 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; 200f918: 84 10 20 01 mov 1, %g2 } } else { name = NULL; } the_semaphore->process_shared = pshared; 200f91c: c0 27 60 10 clr [ %i5 + 0x10 ] if ( name ) { the_semaphore->named = true; 200f920: c4 2f 60 14 stb %g2, [ %i5 + 0x14 ] the_semaphore->open_count = 1; 200f924: c2 27 60 18 st %g1, [ %i5 + 0x18 ] the_semaphore->linked = true; 200f928: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ] the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f92c: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f930: 90 07 60 1c add %i5, 0x1c, %o0 200f934: 92 07 60 5c add %i5, 0x5c, %o1 200f938: 94 10 00 1b mov %i3, %o2 the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f93c: c2 27 60 5c st %g1, [ %i5 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f940: 7f ff eb dc call 200a8b0 <_CORE_semaphore_Initialize> 200f944: c0 27 60 60 clr [ %i5 + 0x60 ] Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 200f948: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200f94c: b4 16 a0 40 or %i2, 0x40, %i2 200f950: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2 200f954: 83 28 60 02 sll %g1, 2, %g1 200f958: fa 20 80 01 st %i5, [ %g2 + %g1 ] the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 200f95c: f2 27 60 0c st %i1, [ %i5 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 200f960: fa 27 00 00 st %i5, [ %i4 ] _Thread_Enable_dispatch(); 200f964: 7f ff f2 ec call 200c514 <_Thread_Enable_dispatch> 200f968: b0 10 20 00 clr %i0 return 0; } 200f96c: 81 c7 e0 08 ret 200f970: 81 e8 00 00 restore } } else { name = NULL; } the_semaphore->process_shared = pshared; 200f974: c0 27 60 10 clr [ %i5 + 0x10 ] if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 200f978: c0 2f 60 14 clrb [ %i5 + 0x14 ] the_semaphore->open_count = 0; 200f97c: c0 27 60 18 clr [ %i5 + 0x18 ] the_semaphore->linked = false; 200f980: c0 2f 60 15 clrb [ %i5 + 0x15 ] _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } } else { name = NULL; 200f984: 10 bf ff ea b 200f92c <_POSIX_Semaphore_Create_support+0x68> 200f988: b2 10 20 00 clr %i1 CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 200f98c: 40 00 0a ff call 2012588 <__errno> 200f990: b0 10 3f ff mov -1, %i0 200f994: 82 10 20 58 mov 0x58, %g1 200f998: c2 22 00 00 st %g1, [ %o0 ] 200f99c: 81 c7 e0 08 ret 200f9a0: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 200f9a4: 7f ff f2 dc call 200c514 <_Thread_Enable_dispatch> 200f9a8: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 200f9ac: 40 00 0a f7 call 2012588 <__errno> 200f9b0: 01 00 00 00 nop 200f9b4: 82 10 20 1c mov 0x1c, %g1 ! 1c 200f9b8: c2 22 00 00 st %g1, [ %o0 ] 200f9bc: 81 c7 e0 08 ret 200f9c0: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 200f9c4: 90 16 a0 40 or %i2, 0x40, %o0 <== NOT EXECUTED 200f9c8: 7f ff ee 58 call 200b328 <_Objects_Free> <== NOT EXECUTED 200f9cc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED */ if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); if ( !name ) { _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200f9d0: 7f ff f2 d1 call 200c514 <_Thread_Enable_dispatch> <== NOT EXECUTED 200f9d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 200f9d8: 40 00 0a ec call 2012588 <__errno> <== NOT EXECUTED 200f9dc: 01 00 00 00 nop <== NOT EXECUTED 200f9e0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200f9e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f9e8: 81 c7 e0 08 ret <== NOT EXECUTED 200f9ec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200d328 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d328: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200d32c: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200d330: 80 a0 a0 00 cmp %g2, 0 200d334: 12 80 00 06 bne 200d34c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN 200d338: 01 00 00 00 nop 200d33c: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200d340: 80 a0 a0 01 cmp %g2, 1 200d344: 22 80 00 05 be,a 200d358 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30> 200d348: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 200d34c: 82 13 c0 00 mov %o7, %g1 200d350: 7f ff f5 89 call 200a974 <_Thread_Enable_dispatch> 200d354: 9e 10 40 00 mov %g1, %o7 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200d358: 80 a0 60 00 cmp %g1, 0 200d35c: 02 bf ff fc be 200d34c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24> 200d360: 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--; 200d364: 03 00 80 7b sethi %hi(0x201ec00), %g1 200d368: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 201ef80 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200d36c: 92 10 3f ff mov -1, %o1 200d370: 84 00 bf ff add %g2, -1, %g2 200d374: c4 20 63 80 st %g2, [ %g1 + 0x380 ] return _Thread_Dispatch_disable_level; 200d378: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 200d37c: 82 13 c0 00 mov %o7, %g1 200d380: 40 00 01 da call 200dae8 <_POSIX_Thread_Exit> 200d384: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200e830 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200e830: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200e834: d0 06 40 00 ld [ %i1 ], %o0 200e838: 7f ff ff f1 call 200e7fc <_POSIX_Priority_Is_valid> 200e83c: ba 10 00 18 mov %i0, %i5 200e840: 80 8a 20 ff btst 0xff, %o0 200e844: 02 80 00 34 be 200e914 <_POSIX_Thread_Translate_sched_param+0xe4><== NEVER TAKEN 200e848: b0 10 20 16 mov 0x16, %i0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200e84c: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; 200e850: c0 26 c0 00 clr [ %i3 ] if ( policy == SCHED_OTHER ) { 200e854: 80 a7 60 00 cmp %i5, 0 200e858: 02 80 00 2d be 200e90c <_POSIX_Thread_Translate_sched_param+0xdc> 200e85c: b0 10 20 00 clr %i0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 200e860: 80 a7 60 01 cmp %i5, 1 200e864: 02 80 00 2c be 200e914 <_POSIX_Thread_Translate_sched_param+0xe4> 200e868: 80 a7 60 02 cmp %i5, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200e86c: 02 80 00 2c be 200e91c <_POSIX_Thread_Translate_sched_param+0xec> 200e870: 80 a7 60 04 cmp %i5, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 200e874: 12 80 00 28 bne 200e914 <_POSIX_Thread_Translate_sched_param+0xe4> 200e878: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_repl_period.tv_sec == 0) && 200e87c: c2 06 60 08 ld [ %i1 + 8 ], %g1 200e880: 80 a0 60 00 cmp %g1, 0 200e884: 32 80 00 07 bne,a 200e8a0 <_POSIX_Thread_Translate_sched_param+0x70> 200e888: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200e88c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200e890: 80 a0 60 00 cmp %g1, 0 200e894: 02 80 00 23 be 200e920 <_POSIX_Thread_Translate_sched_param+0xf0> 200e898: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200e89c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200e8a0: 80 a0 60 00 cmp %g1, 0 200e8a4: 12 80 00 06 bne 200e8bc <_POSIX_Thread_Translate_sched_param+0x8c> 200e8a8: 01 00 00 00 nop 200e8ac: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200e8b0: 80 a0 60 00 cmp %g1, 0 200e8b4: 02 80 00 18 be 200e914 <_POSIX_Thread_Translate_sched_param+0xe4> 200e8b8: b0 10 20 16 mov 0x16, %i0 (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200e8bc: 7f ff f6 a3 call 200c348 <_Timespec_To_ticks> 200e8c0: 90 06 60 08 add %i1, 8, %o0 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 200e8c4: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200e8c8: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200e8cc: 7f ff f6 9f call 200c348 <_Timespec_To_ticks> 200e8d0: 90 06 60 10 add %i1, 0x10, %o0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200e8d4: 80 a7 40 08 cmp %i5, %o0 200e8d8: 0a 80 00 12 bcs 200e920 <_POSIX_Thread_Translate_sched_param+0xf0> 200e8dc: 01 00 00 00 nop _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 200e8e0: 7f ff ff c7 call 200e7fc <_POSIX_Priority_Is_valid> 200e8e4: d0 06 60 04 ld [ %i1 + 4 ], %o0 200e8e8: 80 8a 20 ff btst 0xff, %o0 200e8ec: 02 80 00 0a be 200e914 <_POSIX_Thread_Translate_sched_param+0xe4> 200e8f0: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200e8f4: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200e8f8: 03 00 80 20 sethi %hi(0x2008000), %g1 200e8fc: 82 10 63 2c or %g1, 0x32c, %g1 ! 200832c <_POSIX_Threads_Sporadic_budget_callout> 200e900: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200e904: 81 c7 e0 08 ret 200e908: 91 e8 20 00 restore %g0, 0, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200e90c: 82 10 20 01 mov 1, %g1 200e910: c2 26 80 00 st %g1, [ %i2 ] return 0; 200e914: 81 c7 e0 08 ret 200e918: 81 e8 00 00 restore *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200e91c: fa 26 80 00 st %i5, [ %i2 ] return 0; 200e920: 81 c7 e0 08 ret 200e924: 81 e8 00 00 restore =============================================================================== 0200d664 <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200d664: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 200d668: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200d66c: 40 00 09 4d call 200fba0 <_POSIX_Threads_cancel_run> 200d670: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200d674: 90 10 00 19 mov %i1, %o0 200d678: 40 00 09 66 call 200fc10 <_POSIX_Keys_Run_destructors> 200d67c: ba 06 20 44 add %i0, 0x44, %i5 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200d680: 10 80 00 03 b 200d68c <_POSIX_Threads_Delete_extension+0x28> 200d684: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200d688: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200d68c: 7f ff f5 56 call 200abe4 <_Thread_queue_Dequeue> 200d690: 90 10 00 1d mov %i5, %o0 200d694: 80 a2 20 00 cmp %o0, 0 200d698: 32 bf ff fc bne,a 200d688 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200d69c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200d6a0: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200d6a4: 80 a0 60 04 cmp %g1, 4 200d6a8: 02 80 00 05 be 200d6bc <_POSIX_Threads_Delete_extension+0x58> 200d6ac: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200d6b0: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200d6b4: 7f ff f8 d4 call 200ba04 <_Workspace_Free> 200d6b8: 81 e8 00 00 restore while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 200d6bc: 7f ff f8 48 call 200b7dc <_Watchdog_Remove> 200d6c0: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200d6c4: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200d6c8: 7f ff f8 cf call 200ba04 <_Workspace_Free> 200d6cc: 81 e8 00 00 restore =============================================================================== 02008048 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 2008048: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 200804c: 03 00 80 8a sethi %hi(0x2022800), %g1 2008050: 82 10 62 2c or %g1, 0x22c, %g1 ! 2022a2c maximum = Configuration_POSIX_API.number_of_initialization_threads; 2008054: f6 00 60 30 ld [ %g1 + 0x30 ], %i3 if ( !user_threads || maximum == 0 ) 2008058: 80 a6 e0 00 cmp %i3, 0 200805c: 02 80 00 18 be 20080bc <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN 2008060: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 2008064: 80 a7 60 00 cmp %i5, 0 2008068: 02 80 00 15 be 20080bc <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN 200806c: b8 10 20 00 clr %i4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2008070: 40 00 1a 2e call 200e928 2008074: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 2008078: 92 10 20 02 mov 2, %o1 200807c: 40 00 1a 37 call 200e958 2008080: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2008084: d2 07 60 04 ld [ %i5 + 4 ], %o1 2008088: 40 00 1a 44 call 200e998 200808c: 90 07 bf bc add %fp, -68, %o0 status = pthread_create( 2008090: d4 07 40 00 ld [ %i5 ], %o2 2008094: 90 07 bf fc add %fp, -4, %o0 2008098: 92 07 bf bc add %fp, -68, %o1 200809c: 7f ff fe fd call 2007c90 20080a0: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 20080a4: 94 92 20 00 orcc %o0, 0, %o2 20080a8: 12 80 00 07 bne 20080c4 <_POSIX_Threads_Initialize_user_threads_body+0x7c> 20080ac: b8 07 20 01 inc %i4 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 20080b0: 80 a7 00 1b cmp %i4, %i3 20080b4: 12 bf ff ef bne 2008070 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN 20080b8: ba 07 60 08 add %i5, 8, %i5 20080bc: 81 c7 e0 08 ret 20080c0: 81 e8 00 00 restore &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 20080c4: 90 10 20 02 mov 2, %o0 20080c8: 40 00 08 6e call 200a280 <_Internal_error_Occurred> 20080cc: 92 10 20 01 mov 1, %o1 =============================================================================== 0200d7e8 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200d7e8: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d7ec: fa 06 61 5c ld [ %i1 + 0x15c ], %i5 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200d7f0: 40 00 04 59 call 200e954 <_Timespec_To_ticks> 200d7f4: 90 07 60 98 add %i5, 0x98, %o0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200d7f8: c4 07 60 88 ld [ %i5 + 0x88 ], %g2 200d7fc: 03 00 80 77 sethi %hi(0x201dc00), %g1 200d800: d2 08 60 94 ldub [ %g1 + 0x94 ], %o1 ! 201dc94 */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200d804: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200d808: 92 22 40 02 sub %o1, %g2, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 200d80c: d0 26 60 74 st %o0, [ %i1 + 0x74 ] */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200d810: 80 a0 60 00 cmp %g1, 0 200d814: 12 80 00 06 bne 200d82c <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN 200d818: d2 26 60 18 st %o1, [ %i1 + 0x18 ] /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 200d81c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200d820: 80 a0 40 09 cmp %g1, %o1 200d824: 38 80 00 09 bgu,a 200d848 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200d828: 90 10 00 19 mov %i1, %o0 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200d82c: 40 00 04 4a call 200e954 <_Timespec_To_ticks> 200d830: 90 07 60 90 add %i5, 0x90, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200d834: 31 00 80 7a sethi %hi(0x201e800), %i0 200d838: b2 07 60 a8 add %i5, 0xa8, %i1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200d83c: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200d840: 7f ff f7 85 call 200b654 <_Watchdog_Insert> 200d844: 91 ee 22 f0 restore %i0, 0x2f0, %o0 if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 200d848: 7f ff f2 c2 call 200a350 <_Thread_Change_priority> 200d84c: 94 10 20 01 mov 1, %o2 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200d850: 40 00 04 41 call 200e954 <_Timespec_To_ticks> 200d854: 90 07 60 90 add %i5, 0x90, %o0 200d858: 31 00 80 7a sethi %hi(0x201e800), %i0 200d85c: b2 07 60 a8 add %i5, 0xa8, %i1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200d860: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200d864: 7f ff f7 7c call 200b654 <_Watchdog_Insert> 200d868: 91 ee 22 f0 restore %i0, 0x2f0, %o0 =============================================================================== 0200d86c <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d86c: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 200d870: c6 00 a0 8c ld [ %g2 + 0x8c ], %g3 200d874: 05 00 80 77 sethi %hi(0x201dc00), %g2 200d878: d2 08 a0 94 ldub [ %g2 + 0x94 ], %o1 ! 201dc94 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200d87c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200d880: 92 22 40 03 sub %o1, %g3, %o1 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 200d884: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 200d888: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200d88c: 80 a0 a0 00 cmp %g2, 0 200d890: 12 80 00 06 bne 200d8a8 <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN 200d894: c6 22 20 74 st %g3, [ %o0 + 0x74 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 200d898: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200d89c: 80 a0 40 09 cmp %g1, %o1 200d8a0: 0a 80 00 04 bcs 200d8b0 <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN 200d8a4: 94 10 20 01 mov 1, %o2 200d8a8: 81 c3 e0 08 retl <== NOT EXECUTED 200d8ac: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 200d8b0: 82 13 c0 00 mov %o7, %g1 200d8b4: 7f ff f2 a7 call 200a350 <_Thread_Change_priority> 200d8b8: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200fba0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200fba0: 9d e3 bf a0 save %sp, -96, %sp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200fba4: f8 06 21 5c ld [ %i0 + 0x15c ], %i4 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200fba8: 84 10 20 01 mov 1, %g2 while ( !_Chain_Is_empty( handler_stack ) ) { 200fbac: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200fbb0: b6 07 20 e8 add %i4, 0xe8, %i3 200fbb4: 80 a0 40 1b cmp %g1, %i3 200fbb8: 02 80 00 14 be 200fc08 <_POSIX_Threads_cancel_run+0x68> 200fbbc: c4 27 20 d8 st %g2, [ %i4 + 0xd8 ] _ISR_Disable( level ); 200fbc0: 7f ff ca be call 20026b8 200fbc4: 01 00 00 00 nop handler = (POSIX_Cancel_Handler_control *) 200fbc8: fa 07 20 ec ld [ %i4 + 0xec ], %i5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200fbcc: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 200fbd0: c2 07 60 04 ld [ %i5 + 4 ], %g1 next->previous = previous; 200fbd4: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 200fbd8: c4 20 40 00 st %g2, [ %g1 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200fbdc: 7f ff ca bb call 20026c8 200fbe0: 01 00 00 00 nop (*handler->routine)( handler->arg ); 200fbe4: c2 07 60 08 ld [ %i5 + 8 ], %g1 200fbe8: 9f c0 40 00 call %g1 200fbec: d0 07 60 0c ld [ %i5 + 0xc ], %o0 _Workspace_Free( handler ); 200fbf0: 7f ff ef 85 call 200ba04 <_Workspace_Free> 200fbf4: 90 10 00 1d mov %i5, %o0 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 200fbf8: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1 200fbfc: 80 a0 40 1b cmp %g1, %i3 200fc00: 12 bf ff f0 bne 200fbc0 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN 200fc04: 01 00 00 00 nop 200fc08: 81 c7 e0 08 ret 200fc0c: 81 e8 00 00 restore =============================================================================== 02007af8 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 2007af8: 9d e3 bf 98 save %sp, -104, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2007afc: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007b00: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2007b04: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007b08: 80 a0 60 00 cmp %g1, 0 2007b0c: 12 80 00 0e bne 2007b44 <_POSIX_Timer_TSR+0x4c> 2007b10: c4 26 60 68 st %g2, [ %i1 + 0x68 ] 2007b14: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2007b18: 80 a0 60 00 cmp %g1, 0 2007b1c: 32 80 00 0b bne,a 2007b48 <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN 2007b20: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2007b24: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2007b28: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 2007b2c: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2007b30: 40 00 18 9c call 200dda0 2007b34: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2007b38: c0 26 60 68 clr [ %i1 + 0x68 ] 2007b3c: 81 c7 e0 08 ret 2007b40: 81 e8 00 00 restore ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2007b44: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2007b48: d4 06 60 08 ld [ %i1 + 8 ], %o2 2007b4c: 90 06 60 10 add %i1, 0x10, %o0 2007b50: 98 10 00 19 mov %i1, %o4 2007b54: 17 00 80 1e sethi %hi(0x2007800), %o3 2007b58: 40 00 19 b2 call 200e220 <_POSIX_Timer_Insert_helper> 2007b5c: 96 12 e2 f8 or %o3, 0x2f8, %o3 ! 2007af8 <_POSIX_Timer_TSR> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2007b60: 80 8a 20 ff btst 0xff, %o0 2007b64: 02 bf ff f6 be 2007b3c <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN 2007b68: 01 00 00 00 nop struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007b6c: 40 00 06 0c call 200939c <_TOD_Get_as_timestamp> 2007b70: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007b74: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007b78: 94 10 20 00 clr %o2 2007b7c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007b80: 90 10 00 1c mov %i4, %o0 2007b84: 96 12 e2 00 or %o3, 0x200, %o3 2007b88: 40 00 4b 21 call 201a80c <__divdi3> 2007b8c: 92 10 00 1d mov %i5, %o1 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007b90: 94 10 20 00 clr %o2 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007b94: d2 26 60 6c st %o1, [ %i1 + 0x6c ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007b98: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007b9c: 90 10 00 1c mov %i4, %o0 2007ba0: 96 12 e2 00 or %o3, 0x200, %o3 2007ba4: 40 00 4c 00 call 201aba4 <__moddi3> 2007ba8: 92 10 00 1d mov %i5, %o1 /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2007bac: 82 10 20 03 mov 3, %g1 2007bb0: d2 26 60 70 st %o1, [ %i1 + 0x70 ] 2007bb4: 10 bf ff de b 2007b2c <_POSIX_Timer_TSR+0x34> 2007bb8: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] =============================================================================== 0200fcc8 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200fcc8: 9d e3 bf 68 save %sp, -152, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200fccc: 98 10 20 01 mov 1, %o4 200fcd0: 90 10 00 18 mov %i0, %o0 200fcd4: 92 10 00 19 mov %i1, %o1 200fcd8: 94 07 bf f4 add %fp, -12, %o2 200fcdc: 40 00 00 2e call 200fd94 <_POSIX_signals_Clear_signals> 200fce0: 96 10 00 1a mov %i2, %o3 200fce4: 80 8a 20 ff btst 0xff, %o0 200fce8: 02 80 00 23 be 200fd74 <_POSIX_signals_Check_signal+0xac> 200fcec: 82 10 20 00 clr %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200fcf0: 85 2e 60 02 sll %i1, 2, %g2 200fcf4: 37 00 80 7b sethi %hi(0x201ec00), %i3 200fcf8: b9 2e 60 04 sll %i1, 4, %i4 200fcfc: b6 16 e3 d0 or %i3, 0x3d0, %i3 200fd00: b8 27 00 02 sub %i4, %g2, %i4 200fd04: 84 06 c0 1c add %i3, %i4, %g2 200fd08: fa 00 a0 08 ld [ %g2 + 8 ], %i5 200fd0c: 80 a7 60 01 cmp %i5, 1 200fd10: 02 80 00 19 be 200fd74 <_POSIX_signals_Check_signal+0xac> <== NEVER TAKEN 200fd14: 21 00 80 7b sethi %hi(0x201ec00), %l0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200fd18: f4 06 20 d0 ld [ %i0 + 0xd0 ], %i2 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200fd1c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200fd20: a0 14 23 70 or %l0, 0x370, %l0 200fd24: d2 04 20 0c ld [ %l0 + 0xc ], %o1 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200fd28: 82 10 40 1a or %g1, %i2, %g1 /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200fd2c: 90 07 bf cc add %fp, -52, %o0 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200fd30: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ] /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200fd34: 92 02 60 20 add %o1, 0x20, %o1 200fd38: 40 00 04 98 call 2010f98 200fd3c: 94 10 20 28 mov 0x28, %o2 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200fd40: c2 06 c0 1c ld [ %i3 + %i4 ], %g1 200fd44: 80 a0 60 02 cmp %g1, 2 200fd48: 02 80 00 0e be 200fd80 <_POSIX_signals_Check_signal+0xb8> 200fd4c: 90 10 00 19 mov %i1, %o0 &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200fd50: 9f c7 40 00 call %i5 200fd54: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 200fd58: d0 04 20 0c ld [ %l0 + 0xc ], %o0 200fd5c: 92 07 bf cc add %fp, -52, %o1 200fd60: 90 02 20 20 add %o0, 0x20, %o0 200fd64: 40 00 04 8d call 2010f98 200fd68: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 200fd6c: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200fd70: f4 26 20 d0 st %i2, [ %i0 + 0xd0 ] return true; } 200fd74: b0 08 60 01 and %g1, 1, %i0 200fd78: 81 c7 e0 08 ret 200fd7c: 81 e8 00 00 restore /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200fd80: 92 07 bf f4 add %fp, -12, %o1 200fd84: 9f c7 40 00 call %i5 200fd88: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200fd8c: 10 bf ff f4 b 200fd5c <_POSIX_signals_Check_signal+0x94> 200fd90: d0 04 20 0c ld [ %l0 + 0xc ], %o0 =============================================================================== 0201057c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 201057c: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 2010580: 7f ff c8 4e call 20026b8 2010584: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 2010588: 85 2e 20 04 sll %i0, 4, %g2 201058c: 83 2e 20 02 sll %i0, 2, %g1 2010590: 82 20 80 01 sub %g2, %g1, %g1 2010594: 05 00 80 7b sethi %hi(0x201ec00), %g2 2010598: 84 10 a3 d0 or %g2, 0x3d0, %g2 ! 201efd0 <_POSIX_signals_Vectors> 201059c: c4 00 80 01 ld [ %g2 + %g1 ], %g2 20105a0: 80 a0 a0 02 cmp %g2, 2 20105a4: 02 80 00 0b be 20105d0 <_POSIX_signals_Clear_process_signals+0x54> 20105a8: 05 00 80 7c sethi %hi(0x201f000), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 20105ac: 03 00 80 7c sethi %hi(0x201f000), %g1 20105b0: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 201f1c4 <_POSIX_signals_Pending> 20105b4: 86 10 20 01 mov 1, %g3 20105b8: b0 06 3f ff add %i0, -1, %i0 20105bc: b1 28 c0 18 sll %g3, %i0, %i0 20105c0: b0 28 80 18 andn %g2, %i0, %i0 20105c4: f0 20 61 c4 st %i0, [ %g1 + 0x1c4 ] } _ISR_Enable( level ); 20105c8: 7f ff c8 40 call 20026c8 20105cc: 91 e8 00 08 restore %g0, %o0, %o0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 20105d0: 84 10 a1 c8 or %g2, 0x1c8, %g2 20105d4: c6 00 40 02 ld [ %g1 + %g2 ], %g3 20105d8: 82 00 40 02 add %g1, %g2, %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 20105dc: 82 00 60 04 add %g1, 4, %g1 20105e0: 80 a0 c0 01 cmp %g3, %g1 20105e4: 02 bf ff f3 be 20105b0 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN 20105e8: 03 00 80 7c sethi %hi(0x201f000), %g1 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 20105ec: 7f ff c8 37 call 20026c8 <== NOT EXECUTED 20105f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200d3b4 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200d3b4: 9d e3 bf a0 save %sp, -96, %sp /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 200d3b8: 35 00 80 7b sethi %hi(0x201ec00), %i2 POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d3bc: f8 06 21 5c ld [ %i0 + 0x15c ], %i4 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 200d3c0: b4 16 a3 70 or %i2, 0x370, %i2 200d3c4: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 200d3c8: 80 a7 20 00 cmp %i4, 0 200d3cc: 02 80 00 34 be 200d49c <_POSIX_signals_Post_switch_extension+0xe8> 200d3d0: f2 00 60 34 ld [ %g1 + 0x34 ], %i1 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 200d3d4: 7f ff d4 b9 call 20026b8 200d3d8: 37 00 80 7c sethi %hi(0x201f000), %i3 200d3dc: b6 16 e1 c4 or %i3, 0x1c4, %i3 ! 201f1c4 <_POSIX_signals_Pending> if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d3e0: c6 06 c0 00 ld [ %i3 ], %g3 200d3e4: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 200d3e8: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d3ec: 82 10 c0 01 or %g3, %g1, %g1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 200d3f0: 80 a8 40 02 andncc %g1, %g2, %g0 200d3f4: 02 80 00 26 be 200d48c <_POSIX_signals_Post_switch_extension+0xd8> 200d3f8: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200d3fc: 7f ff d4 b3 call 20026c8 200d400: ba 10 20 1b mov 0x1b, %i5 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 200d404: 92 10 00 1d mov %i5, %o1 200d408: 94 10 20 00 clr %o2 200d40c: 40 00 0a 2f call 200fcc8 <_POSIX_signals_Check_signal> 200d410: 90 10 00 1c mov %i4, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d414: 92 10 00 1d mov %i5, %o1 200d418: 90 10 00 1c mov %i4, %o0 200d41c: 40 00 0a 2b call 200fcc8 <_POSIX_signals_Check_signal> 200d420: 94 10 20 01 mov 1, %o2 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200d424: ba 07 60 01 inc %i5 200d428: 80 a7 60 20 cmp %i5, 0x20 200d42c: 12 bf ff f7 bne 200d408 <_POSIX_signals_Post_switch_extension+0x54> 200d430: 92 10 00 1d mov %i5, %o1 200d434: ba 10 20 01 mov 1, %i5 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 200d438: 92 10 00 1d mov %i5, %o1 200d43c: 94 10 20 00 clr %o2 200d440: 40 00 0a 22 call 200fcc8 <_POSIX_signals_Check_signal> 200d444: 90 10 00 1c mov %i4, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d448: 92 10 00 1d mov %i5, %o1 200d44c: 90 10 00 1c mov %i4, %o0 200d450: 40 00 0a 1e call 200fcc8 <_POSIX_signals_Check_signal> 200d454: 94 10 20 01 mov 1, %o2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200d458: ba 07 60 01 inc %i5 200d45c: 80 a7 60 1b cmp %i5, 0x1b 200d460: 12 bf ff f7 bne 200d43c <_POSIX_signals_Post_switch_extension+0x88> 200d464: 92 10 00 1d mov %i5, %o1 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 200d468: 7f ff d4 94 call 20026b8 200d46c: 01 00 00 00 nop if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d470: c6 06 c0 00 ld [ %i3 ], %g3 200d474: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 200d478: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d47c: 82 10 c0 01 or %g3, %g1, %g1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 200d480: 80 a8 40 02 andncc %g1, %g2, %g0 200d484: 12 bf ff de bne 200d3fc <_POSIX_signals_Post_switch_extension+0x48><== NEVER TAKEN 200d488: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200d48c: 7f ff d4 8f call 20026c8 200d490: 01 00 00 00 nop _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 200d494: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 200d498: f2 20 60 34 st %i1, [ %g1 + 0x34 ] 200d49c: 81 c7 e0 08 ret 200d4a0: 81 e8 00 00 restore =============================================================================== 0201b58c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 201b58c: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201b590: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201b594: 05 04 00 20 sethi %hi(0x10008000), %g2 201b598: 86 10 20 01 mov 1, %g3 201b59c: ba 06 7f ff add %i1, -1, %i5 201b5a0: 88 08 40 02 and %g1, %g2, %g4 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 201b5a4: da 06 21 5c ld [ %i0 + 0x15c ], %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201b5a8: 80 a1 00 02 cmp %g4, %g2 201b5ac: 02 80 00 1c be 201b61c <_POSIX_signals_Unblock_thread+0x90> 201b5b0: 9f 28 c0 1d sll %g3, %i5, %o7 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 201b5b4: c4 03 60 d0 ld [ %o5 + 0xd0 ], %g2 201b5b8: 80 ab c0 02 andncc %o7, %g2, %g0 201b5bc: 02 80 00 15 be 201b610 <_POSIX_signals_Unblock_thread+0x84> 201b5c0: ba 10 20 00 clr %i5 201b5c4: 05 04 00 00 sethi %hi(0x10000000), %g2 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 201b5c8: 80 88 40 02 btst %g1, %g2 201b5cc: 02 80 00 29 be 201b670 <_POSIX_signals_Unblock_thread+0xe4> 201b5d0: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 201b5d4: 84 10 20 04 mov 4, %g2 201b5d8: c4 26 20 34 st %g2, [ %i0 + 0x34 ] */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 201b5dc: 05 00 00 ef sethi %hi(0x3bc00), %g2 201b5e0: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 201b5e4: 80 88 40 02 btst %g1, %g2 201b5e8: 12 80 00 36 bne 201b6c0 <_POSIX_signals_Unblock_thread+0x134> 201b5ec: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 201b5f0: 22 80 00 09 be,a 201b614 <_POSIX_signals_Unblock_thread+0x88><== NEVER TAKEN 201b5f4: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 201b5f8: 7f ff c0 79 call 200b7dc <_Watchdog_Remove> 201b5fc: 90 06 20 48 add %i0, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 201b600: 13 04 00 ff sethi %hi(0x1003fc00), %o1 201b604: 90 10 00 18 mov %i0, %o0 201b608: 7f ff bb 9d call 200a47c <_Thread_Clear_state> 201b60c: 92 12 63 f8 or %o1, 0x3f8, %o1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 201b610: b0 0f 60 01 and %i5, 1, %i0 201b614: 81 c7 e0 08 ret 201b618: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 201b61c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201b620: 80 8b c0 01 btst %o7, %g1 201b624: 22 80 00 21 be,a 201b6a8 <_POSIX_signals_Unblock_thread+0x11c> 201b628: c2 03 60 d0 ld [ %o5 + 0xd0 ], %g1 the_thread->Wait.return_code = EINTR; 201b62c: 82 10 20 04 mov 4, %g1 201b630: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 201b634: 80 a6 a0 00 cmp %i2, 0 201b638: 02 80 00 27 be 201b6d4 <_POSIX_signals_Unblock_thread+0x148> 201b63c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 201b640: c4 06 80 00 ld [ %i2 ], %g2 201b644: c4 20 40 00 st %g2, [ %g1 ] 201b648: c4 06 a0 04 ld [ %i2 + 4 ], %g2 201b64c: c4 20 60 04 st %g2, [ %g1 + 4 ] 201b650: c4 06 a0 08 ld [ %i2 + 8 ], %g2 201b654: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 201b658: 90 10 00 18 mov %i0, %o0 201b65c: 7f ff be 72 call 200b024 <_Thread_queue_Extract_with_proxy> 201b660: ba 10 20 01 mov 1, %i5 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 201b664: b0 0f 60 01 and %i5, 1, %i0 201b668: 81 c7 e0 08 ret 201b66c: 81 e8 00 00 restore else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 201b670: 12 bf ff e8 bne 201b610 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN 201b674: 03 00 80 7b sethi %hi(0x201ec00), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201b678: 82 10 63 70 or %g1, 0x370, %g1 ! 201ef70 <_Per_CPU_Information> 201b67c: c4 00 60 08 ld [ %g1 + 8 ], %g2 201b680: 80 a0 a0 00 cmp %g2, 0 201b684: 22 bf ff e4 be,a 201b614 <_POSIX_signals_Unblock_thread+0x88> 201b688: b0 0f 60 01 and %i5, 1, %i0 201b68c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 201b690: 80 a6 00 02 cmp %i0, %g2 201b694: 22 bf ff df be,a 201b610 <_POSIX_signals_Unblock_thread+0x84><== ALWAYS TAKEN 201b698: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] 201b69c: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED 201b6a0: 81 c7 e0 08 ret <== NOT EXECUTED 201b6a4: 81 e8 00 00 restore <== NOT EXECUTED * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 201b6a8: 80 ab c0 01 andncc %o7, %g1, %g0 201b6ac: 12 bf ff e0 bne 201b62c <_POSIX_signals_Unblock_thread+0xa0> 201b6b0: ba 10 20 00 clr %i5 201b6b4: b0 0f 60 01 and %i5, 1, %i0 201b6b8: 81 c7 e0 08 ret 201b6bc: 81 e8 00 00 restore /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 201b6c0: 7f ff be 59 call 200b024 <_Thread_queue_Extract_with_proxy> 201b6c4: 90 10 00 18 mov %i0, %o0 201b6c8: b0 0f 60 01 and %i5, 1, %i0 201b6cc: 81 c7 e0 08 ret 201b6d0: 81 e8 00 00 restore the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 201b6d4: 84 10 20 01 mov 1, %g2 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 201b6d8: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; 201b6dc: c4 20 60 04 st %g2, [ %g1 + 4 ] the_info->si_value.sival_int = 0; 201b6e0: 10 bf ff de b 201b658 <_POSIX_signals_Unblock_thread+0xcc> 201b6e4: c0 20 60 08 clr [ %g1 + 8 ] =============================================================================== 0200aa78 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200aa78: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200aa7c: 80 a6 60 00 cmp %i1, 0 200aa80: 02 80 00 4c be 200abb0 <_RBTree_Extract_unprotected+0x138> 200aa84: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200aa88: c2 06 20 08 ld [ %i0 + 8 ], %g1 200aa8c: 80 a0 40 19 cmp %g1, %i1 200aa90: 22 80 00 59 be,a 200abf4 <_RBTree_Extract_unprotected+0x17c> 200aa94: c2 06 60 08 ld [ %i1 + 8 ], %g1 the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 200aa98: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200aa9c: 80 a0 40 19 cmp %g1, %i1 200aaa0: 22 80 00 46 be,a 200abb8 <_RBTree_Extract_unprotected+0x140> 200aaa4: c2 06 60 04 ld [ %i1 + 4 ], %g1 * 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]) { 200aaa8: fa 06 60 04 ld [ %i1 + 4 ], %i5 200aaac: 80 a7 60 00 cmp %i5, 0 200aab0: 22 80 00 4a be,a 200abd8 <_RBTree_Extract_unprotected+0x160> 200aab4: f8 06 60 08 ld [ %i1 + 8 ], %i4 200aab8: c2 06 60 08 ld [ %i1 + 8 ], %g1 200aabc: 80 a0 60 00 cmp %g1, 0 200aac0: 32 80 00 05 bne,a 200aad4 <_RBTree_Extract_unprotected+0x5c> 200aac4: c2 07 60 08 ld [ %i5 + 8 ], %g1 200aac8: 10 80 00 50 b 200ac08 <_RBTree_Extract_unprotected+0x190> 200aacc: b8 10 00 1d mov %i5, %i4 target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 200aad0: c2 07 60 08 ld [ %i5 + 8 ], %g1 200aad4: 80 a0 60 00 cmp %g1, 0 200aad8: 32 bf ff fe bne,a 200aad0 <_RBTree_Extract_unprotected+0x58> 200aadc: 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]; 200aae0: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200aae4: 80 a7 20 00 cmp %i4, 0 200aae8: 02 80 00 54 be 200ac38 <_RBTree_Extract_unprotected+0x1c0> 200aaec: 01 00 00 00 nop leaf->parent = target->parent; 200aaf0: c2 07 40 00 ld [ %i5 ], %g1 200aaf4: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 200aaf8: c4 07 40 00 ld [ %i5 ], %g2 target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200aafc: c2 06 40 00 ld [ %i1 ], %g1 } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 200ab00: c8 00 a0 04 ld [ %g2 + 4 ], %g4 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; 200ab04: c6 07 60 0c ld [ %i5 + 0xc ], %g3 dir = target != target->parent->child[0]; 200ab08: 88 19 00 1d xor %g4, %i5, %g4 200ab0c: 80 a0 00 04 cmp %g0, %g4 200ab10: 88 40 20 00 addx %g0, 0, %g4 target->parent->child[dir] = leaf; 200ab14: 89 29 20 02 sll %g4, 2, %g4 200ab18: 84 00 80 04 add %g2, %g4, %g2 200ab1c: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200ab20: c4 00 60 04 ld [ %g1 + 4 ], %g2 200ab24: 84 18 80 19 xor %g2, %i1, %g2 200ab28: 80 a0 00 02 cmp %g0, %g2 200ab2c: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = target; 200ab30: 85 28 a0 02 sll %g2, 2, %g2 200ab34: 82 00 40 02 add %g1, %g2, %g1 200ab38: fa 20 60 04 st %i5, [ %g1 + 4 ] /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 200ab3c: c2 06 60 08 ld [ %i1 + 8 ], %g1 200ab40: c2 27 60 08 st %g1, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200ab44: c2 06 60 08 ld [ %i1 + 8 ], %g1 200ab48: 80 a0 60 00 cmp %g1, 0 200ab4c: 32 80 00 02 bne,a 200ab54 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN 200ab50: fa 20 40 00 st %i5, [ %g1 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200ab54: c2 06 60 04 ld [ %i1 + 4 ], %g1 200ab58: c2 27 60 04 st %g1, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200ab5c: c2 06 60 04 ld [ %i1 + 4 ], %g1 200ab60: 80 a0 60 00 cmp %g1, 0 200ab64: 32 80 00 02 bne,a 200ab6c <_RBTree_Extract_unprotected+0xf4> 200ab68: fa 20 40 00 st %i5, [ %g1 ] /* 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; 200ab6c: c4 06 40 00 ld [ %i1 ], %g2 target->color = the_node->color; 200ab70: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* 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; 200ab74: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200ab78: c2 27 60 0c st %g1, [ %i5 + 0xc ] /* 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 */ 200ab7c: 80 a0 e0 00 cmp %g3, 0 200ab80: 32 80 00 06 bne,a 200ab98 <_RBTree_Extract_unprotected+0x120> 200ab84: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200ab88: 80 a7 20 00 cmp %i4, 0 200ab8c: 32 80 00 02 bne,a 200ab94 <_RBTree_Extract_unprotected+0x11c> 200ab90: 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; 200ab94: 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; 200ab98: c0 26 60 08 clr [ %i1 + 8 ] 200ab9c: c0 26 60 04 clr [ %i1 + 4 ] 200aba0: 80 a0 60 00 cmp %g1, 0 200aba4: 02 80 00 03 be 200abb0 <_RBTree_Extract_unprotected+0x138> 200aba8: c0 26 40 00 clr [ %i1 ] 200abac: c0 20 60 0c clr [ %g1 + 0xc ] 200abb0: 81 c7 e0 08 ret 200abb4: 81 e8 00 00 restore the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) 200abb8: 80 a0 60 00 cmp %g1, 0 200abbc: 22 80 00 28 be,a 200ac5c <_RBTree_Extract_unprotected+0x1e4> 200abc0: c2 06 40 00 ld [ %i1 ], %g1 * 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]) { 200abc4: fa 06 60 04 ld [ %i1 + 4 ], %i5 200abc8: 80 a7 60 00 cmp %i5, 0 200abcc: 12 bf ff bb bne 200aab8 <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN 200abd0: c2 26 20 0c st %g1, [ %i0 + 0xc ] * the_node's location in the tree. This may cause the coloring to be * 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]; 200abd4: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED if( leaf ) { 200abd8: 80 a7 20 00 cmp %i4, 0 200abdc: 32 80 00 0c bne,a 200ac0c <_RBTree_Extract_unprotected+0x194> 200abe0: c2 06 40 00 ld [ %i1 ], %g1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 200abe4: 7f ff fe d0 call 200a724 <_RBTree_Extract_validate_unprotected> 200abe8: 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]; 200abec: 10 80 00 0a b 200ac14 <_RBTree_Extract_unprotected+0x19c> 200abf0: c2 06 40 00 ld [ %i1 ], %g1 if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) 200abf4: 80 a0 60 00 cmp %g1, 0 200abf8: 22 80 00 14 be,a 200ac48 <_RBTree_Extract_unprotected+0x1d0> 200abfc: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200ac00: 10 bf ff a6 b 200aa98 <_RBTree_Extract_unprotected+0x20> 200ac04: c2 26 20 08 st %g1, [ %i0 + 8 ] * 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 ) { leaf->parent = the_node->parent; 200ac08: c2 06 40 00 ld [ %i1 ], %g1 200ac0c: c2 27 00 00 st %g1, [ %i4 ] _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200ac10: c2 06 40 00 ld [ %i1 ], %g1 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; 200ac14: c6 06 60 0c ld [ %i1 + 0xc ], %g3 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200ac18: c4 00 60 04 ld [ %g1 + 4 ], %g2 200ac1c: 84 18 80 19 xor %g2, %i1, %g2 200ac20: 80 a0 00 02 cmp %g0, %g2 200ac24: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = leaf; 200ac28: 85 28 a0 02 sll %g2, 2, %g2 200ac2c: 82 00 40 02 add %g1, %g2, %g1 200ac30: 10 bf ff d3 b 200ab7c <_RBTree_Extract_unprotected+0x104> 200ac34: f8 20 60 04 st %i4, [ %g1 + 4 ] leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200ac38: 7f ff fe bb call 200a724 <_RBTree_Extract_validate_unprotected> 200ac3c: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200ac40: 10 bf ff af b 200aafc <_RBTree_Extract_unprotected+0x84> 200ac44: c4 07 40 00 ld [ %i5 ], %g2 if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200ac48: 80 a6 00 01 cmp %i0, %g1 200ac4c: 12 bf ff 93 bne 200aa98 <_RBTree_Extract_unprotected+0x20> 200ac50: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200ac54: 10 bf ff 91 b 200aa98 <_RBTree_Extract_unprotected+0x20> 200ac58: c0 26 20 08 clr [ %i0 + 8 ] if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200ac5c: 80 a6 00 01 cmp %i0, %g1 200ac60: 12 bf ff 92 bne 200aaa8 <_RBTree_Extract_unprotected+0x30> 200ac64: c2 26 20 0c st %g1, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200ac68: 10 bf ff 90 b 200aaa8 <_RBTree_Extract_unprotected+0x30> 200ac6c: c0 26 20 0c clr [ %i0 + 0xc ] =============================================================================== 0200a724 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200a724: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200a728: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; 200a72c: c4 00 40 00 ld [ %g1 ], %g2 200a730: 80 a0 a0 00 cmp %g2, 0 200a734: 02 80 00 ca be 200aa5c <_RBTree_Extract_validate_unprotected+0x338> 200a738: 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 == the_node->parent->child[RBT_LEFT]) 200a73c: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a740: 80 a6 00 02 cmp %i0, %g2 200a744: 22 80 00 02 be,a 200a74c <_RBTree_Extract_validate_unprotected+0x28> 200a748: c4 00 60 08 ld [ %g1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a74c: c6 06 20 0c ld [ %i0 + 0xc ], %g3 200a750: 80 a0 e0 01 cmp %g3, 1 200a754: 22 80 00 5e be,a 200a8cc <_RBTree_Extract_validate_unprotected+0x1a8> 200a758: c2 06 00 00 ld [ %i0 ], %g1 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) { 200a75c: c6 00 40 00 ld [ %g1 ], %g3 200a760: 80 a0 e0 00 cmp %g3, 0 200a764: 02 80 00 59 be 200a8c8 <_RBTree_Extract_validate_unprotected+0x1a4> 200a768: 80 a0 a0 00 cmp %g2, 0 200a76c: 22 80 00 07 be,a 200a788 <_RBTree_Extract_validate_unprotected+0x64><== NEVER TAKEN 200a770: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED 200a774: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 200a778: 80 a1 20 01 cmp %g4, 1 200a77c: 22 80 00 29 be,a 200a820 <_RBTree_Extract_validate_unprotected+0xfc> 200a780: de 00 60 04 ld [ %g1 + 4 ], %o7 _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200a784: c6 00 a0 08 ld [ %g2 + 8 ], %g3 200a788: 80 a0 e0 00 cmp %g3, 0 200a78c: 22 80 00 07 be,a 200a7a8 <_RBTree_Extract_validate_unprotected+0x84> 200a790: c8 00 a0 04 ld [ %g2 + 4 ], %g4 200a794: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 200a798: 80 a1 20 01 cmp %g4, 1 200a79c: 22 80 00 52 be,a 200a8e4 <_RBTree_Extract_validate_unprotected+0x1c0> 200a7a0: c8 00 60 04 ld [ %g1 + 4 ], %g4 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200a7a4: c8 00 a0 04 ld [ %g2 + 4 ], %g4 200a7a8: 80 a1 20 00 cmp %g4, 0 200a7ac: 22 80 00 07 be,a 200a7c8 <_RBTree_Extract_validate_unprotected+0xa4> 200a7b0: 86 10 20 01 mov 1, %g3 200a7b4: c8 01 20 0c ld [ %g4 + 0xc ], %g4 200a7b8: 80 a1 20 01 cmp %g4, 1 200a7bc: 22 80 00 4a be,a 200a8e4 <_RBTree_Extract_validate_unprotected+0x1c0> 200a7c0: c8 00 60 04 ld [ %g1 + 4 ], %g4 sibling->color = RBT_RED; 200a7c4: 86 10 20 01 mov 1, %g3 200a7c8: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 200a7cc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a7d0: 80 a0 a0 01 cmp %g2, 1 200a7d4: 22 80 00 3d be,a 200a8c8 <_RBTree_Extract_validate_unprotected+0x1a4> 200a7d8: c0 20 60 0c clr [ %g1 + 0xc ] if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 200a7dc: c6 00 40 00 ld [ %g1 ], %g3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200a7e0: 80 a0 e0 00 cmp %g3, 0 200a7e4: 02 80 00 0a be 200a80c <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN 200a7e8: 84 10 20 00 clr %g2 if(!(the_node->parent->parent)) return NULL; 200a7ec: c8 00 c0 00 ld [ %g3 ], %g4 200a7f0: 80 a1 20 00 cmp %g4, 0 200a7f4: 02 80 00 07 be 200a810 <_RBTree_Extract_validate_unprotected+0xec> 200a7f8: b0 10 00 01 mov %g1, %i0 if(the_node == the_node->parent->child[RBT_LEFT]) 200a7fc: c4 00 e0 04 ld [ %g3 + 4 ], %g2 200a800: 80 a0 40 02 cmp %g1, %g2 200a804: 22 80 00 05 be,a 200a818 <_RBTree_Extract_validate_unprotected+0xf4> 200a808: c4 00 e0 08 ld [ %g3 + 8 ], %g2 c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 200a80c: b0 10 00 01 mov %g1, %i0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200a810: 10 bf ff cf b 200a74c <_RBTree_Extract_validate_unprotected+0x28> 200a814: 82 10 00 03 mov %g3, %g1 200a818: 10 bf ff cd b 200a74c <_RBTree_Extract_validate_unprotected+0x28> 200a81c: 82 10 00 03 mov %g3, %g1 * 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; 200a820: c8 20 60 0c st %g4, [ %g1 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200a824: 88 1b c0 18 xor %o7, %i0, %g4 200a828: 80 a0 00 04 cmp %g0, %g4 200a82c: 9a 40 20 00 addx %g0, 0, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a830: 98 1b 60 01 xor %o5, 1, %o4 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a834: 89 2b 20 02 sll %o4, 2, %g4 200a838: 96 00 40 04 add %g1, %g4, %o3 200a83c: d6 02 e0 04 ld [ %o3 + 4 ], %o3 * 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; 200a840: c0 20 a0 0c clr [ %g2 + 0xc ] 200a844: 80 a2 e0 00 cmp %o3, 0 200a848: 02 bf ff cf be 200a784 <_RBTree_Extract_validate_unprotected+0x60><== NEVER TAKEN 200a84c: 84 10 20 00 clr %g2 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a850: 80 a3 20 00 cmp %o4, 0 200a854: 02 80 00 04 be 200a864 <_RBTree_Extract_validate_unprotected+0x140> 200a858: 96 10 20 00 clr %o3 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a85c: de 00 60 08 ld [ %g1 + 8 ], %o7 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a860: 96 10 20 01 mov 1, %o3 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a864: 9b 2b 60 02 sll %o5, 2, %o5 200a868: 84 03 c0 0d add %o7, %o5, %g2 200a86c: d8 00 a0 04 ld [ %g2 + 4 ], %o4 200a870: 97 2a e0 02 sll %o3, 2, %o3 200a874: 96 00 40 0b add %g1, %o3, %o3 200a878: d8 22 e0 04 st %o4, [ %o3 + 4 ] if (c->child[dir]) 200a87c: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200a880: 80 a0 a0 00 cmp %g2, 0 200a884: 02 80 00 04 be 200a894 <_RBTree_Extract_validate_unprotected+0x170><== NEVER TAKEN 200a888: 9a 03 c0 0d add %o7, %o5, %o5 c->child[dir]->parent = the_node; 200a88c: c2 20 80 00 st %g1, [ %g2 ] 200a890: c6 00 40 00 ld [ %g1 ], %g3 c->child[dir] = the_node; 200a894: c2 23 60 04 st %g1, [ %o5 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a898: c4 00 e0 04 ld [ %g3 + 4 ], %g2 c->parent = the_node->parent; 200a89c: c6 23 c0 00 st %g3, [ %o7 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a8a0: 84 18 40 02 xor %g1, %g2, %g2 200a8a4: 80 a0 00 02 cmp %g0, %g2 200a8a8: 84 40 20 00 addx %g0, 0, %g2 200a8ac: 85 28 a0 02 sll %g2, 2, %g2 200a8b0: 84 00 c0 02 add %g3, %g2, %g2 c->parent = the_node->parent; the_node->parent = c; 200a8b4: 88 00 40 04 add %g1, %g4, %g4 if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a8b8: de 20 a0 04 st %o7, [ %g2 + 4 ] c->parent = the_node->parent; the_node->parent = c; 200a8bc: de 20 40 00 st %o7, [ %g1 ] 200a8c0: 10 bf ff b1 b 200a784 <_RBTree_Extract_validate_unprotected+0x60> 200a8c4: c4 01 20 04 ld [ %g4 + 4 ], %g2 sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200a8c8: c2 06 00 00 ld [ %i0 ], %g1 200a8cc: c2 00 40 00 ld [ %g1 ], %g1 200a8d0: 80 a0 60 00 cmp %g1, 0 200a8d4: 22 80 00 02 be,a 200a8dc <_RBTree_Extract_validate_unprotected+0x1b8> 200a8d8: c0 26 20 0c clr [ %i0 + 0xc ] 200a8dc: 81 c7 e0 08 ret 200a8e0: 81 e8 00 00 restore * 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]; 200a8e4: 88 19 00 18 xor %g4, %i0, %g4 200a8e8: 80 a0 00 04 cmp %g0, %g4 200a8ec: 9a 40 20 00 addx %g0, 0, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a8f0: 98 1b 60 01 xor %o5, 1, %o4 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 200a8f4: 9f 2b 20 02 sll %o4, 2, %o7 200a8f8: 88 00 80 0f add %g2, %o7, %g4 200a8fc: c8 01 20 04 ld [ %g4 + 4 ], %g4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a900: 80 a1 20 00 cmp %g4, 0 200a904: 02 80 00 06 be 200a91c <_RBTree_Extract_validate_unprotected+0x1f8> 200a908: 96 10 20 01 mov 1, %o3 200a90c: d6 01 20 0c ld [ %g4 + 0xc ], %o3 200a910: 80 a2 e0 01 cmp %o3, 1 200a914: 02 80 00 56 be 200aa6c <_RBTree_Extract_validate_unprotected+0x348> 200a918: 96 10 20 01 mov 1, %o3 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 200a91c: 89 2b 60 02 sll %o5, 2, %g4 200a920: 88 00 80 04 add %g2, %g4, %g4 200a924: d4 01 20 04 ld [ %g4 + 4 ], %o2 * 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[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; 200a928: d6 20 a0 0c st %o3, [ %g2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a92c: 88 1b 20 01 xor %o4, 1, %g4 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a930: 97 29 20 02 sll %g4, 2, %o3 200a934: 96 00 80 0b add %g2, %o3, %o3 200a938: d6 02 e0 04 ld [ %o3 + 4 ], %o3 200a93c: 80 a2 e0 00 cmp %o3, 0 200a940: 02 80 00 1c be 200a9b0 <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN 200a944: c0 22 a0 0c clr [ %o2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a948: 80 a1 20 00 cmp %g4, 0 200a94c: 12 80 00 04 bne 200a95c <_RBTree_Extract_validate_unprotected+0x238> 200a950: 96 10 20 01 mov 1, %o3 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a954: c6 00 a0 04 ld [ %g2 + 4 ], %g3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a958: 96 10 20 00 clr %o3 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a95c: 88 00 c0 0f add %g3, %o7, %g4 200a960: d4 01 20 04 ld [ %g4 + 4 ], %o2 200a964: 97 2a e0 02 sll %o3, 2, %o3 200a968: 96 00 80 0b add %g2, %o3, %o3 200a96c: d4 22 e0 04 st %o2, [ %o3 + 4 ] if (c->child[dir]) 200a970: c8 01 20 04 ld [ %g4 + 4 ], %g4 200a974: 80 a1 20 00 cmp %g4, 0 200a978: 32 80 00 02 bne,a 200a980 <_RBTree_Extract_validate_unprotected+0x25c> 200a97c: c4 21 00 00 st %g2, [ %g4 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a980: c8 00 80 00 ld [ %g2 ], %g4 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200a984: 96 00 c0 0f add %g3, %o7, %o3 200a988: c4 22 e0 04 st %g2, [ %o3 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a98c: d6 01 20 04 ld [ %g4 + 4 ], %o3 c->parent = the_node->parent; 200a990: c8 20 c0 00 st %g4, [ %g3 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a994: 96 18 80 0b xor %g2, %o3, %o3 c->parent = the_node->parent; the_node->parent = c; 200a998: c6 20 80 00 st %g3, [ %g2 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a99c: 80 a0 00 0b cmp %g0, %o3 200a9a0: 84 40 20 00 addx %g0, 0, %g2 200a9a4: 85 28 a0 02 sll %g2, 2, %g2 200a9a8: 88 01 00 02 add %g4, %g2, %g4 200a9ac: c6 21 20 04 st %g3, [ %g4 + 4 ] sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a9b0: 84 00 40 0f add %g1, %o7, %g2 200a9b4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200a9b8: 9e 00 80 0f add %g2, %o7, %o7 200a9bc: c8 03 e0 04 ld [ %o7 + 4 ], %g4 200a9c0: 9e 10 00 02 mov %g2, %o7 } sibling->color = parent->color; 200a9c4: c6 00 60 0c ld [ %g1 + 0xc ], %g3 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a9c8: 80 a3 e0 00 cmp %o7, 0 200a9cc: c6 20 a0 0c st %g3, [ %g2 + 0xc ] parent->color = RBT_BLACK; 200a9d0: c0 20 60 0c clr [ %g1 + 0xc ] 200a9d4: 02 bf ff bd be 200a8c8 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN 200a9d8: c0 21 20 0c clr [ %g4 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a9dc: 80 a3 20 00 cmp %o4, 0 200a9e0: 22 80 00 21 be,a 200aa64 <_RBTree_Extract_validate_unprotected+0x340> 200a9e4: c4 00 60 04 ld [ %g1 + 4 ], %g2 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a9e8: c4 00 60 08 ld [ %g1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a9ec: 88 10 20 01 mov 1, %g4 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a9f0: 9b 2b 60 02 sll %o5, 2, %o5 200a9f4: 86 00 80 0d add %g2, %o5, %g3 200a9f8: de 00 e0 04 ld [ %g3 + 4 ], %o7 200a9fc: 89 29 20 02 sll %g4, 2, %g4 200aa00: 88 00 40 04 add %g1, %g4, %g4 200aa04: de 21 20 04 st %o7, [ %g4 + 4 ] if (c->child[dir]) 200aa08: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200aa0c: 80 a0 e0 00 cmp %g3, 0 200aa10: 32 80 00 02 bne,a 200aa18 <_RBTree_Extract_validate_unprotected+0x2f4> 200aa14: c2 20 c0 00 st %g1, [ %g3 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aa18: c6 00 40 00 ld [ %g1 ], %g3 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200aa1c: 9a 00 80 0d add %g2, %o5, %o5 200aa20: c2 23 60 04 st %g1, [ %o5 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aa24: c8 00 e0 04 ld [ %g3 + 4 ], %g4 c->parent = the_node->parent; 200aa28: c6 20 80 00 st %g3, [ %g2 ] the_node->parent = c; 200aa2c: c4 20 40 00 st %g2, [ %g1 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aa30: 88 18 40 04 xor %g1, %g4, %g4 200aa34: 80 a0 00 04 cmp %g0, %g4 200aa38: 82 40 20 00 addx %g0, 0, %g1 200aa3c: 83 28 60 02 sll %g1, 2, %g1 200aa40: 86 00 c0 01 add %g3, %g1, %g3 sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200aa44: c2 06 00 00 ld [ %i0 ], %g1 200aa48: c4 20 e0 04 st %g2, [ %g3 + 4 ] 200aa4c: c2 00 40 00 ld [ %g1 ], %g1 200aa50: 80 a0 60 00 cmp %g1, 0 200aa54: 22 bf ff a2 be,a 200a8dc <_RBTree_Extract_validate_unprotected+0x1b8><== NEVER TAKEN 200aa58: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 200aa5c: 81 c7 e0 08 ret 200aa60: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200aa64: 10 bf ff e3 b 200a9f0 <_RBTree_Extract_validate_unprotected+0x2cc> 200aa68: 88 10 20 00 clr %g4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200aa6c: 9e 00 40 0f add %g1, %o7, %o7 200aa70: 10 bf ff d5 b 200a9c4 <_RBTree_Extract_validate_unprotected+0x2a0> 200aa74: de 03 e0 04 ld [ %o7 + 4 ], %o7 =============================================================================== 0200b730 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 200b730: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 200b734: 7f ff e1 a6 call 2003dcc 200b738: b8 10 00 18 mov %i0, %i4 200b73c: ba 10 00 08 mov %o0, %i5 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 200b740: f6 06 20 04 ld [ %i0 + 4 ], %i3 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200b744: 80 a6 e0 00 cmp %i3, 0 200b748: 02 80 00 15 be 200b79c <_RBTree_Find+0x6c> <== NEVER TAKEN 200b74c: b0 10 20 00 clr %i0 compare_result = the_rbtree->compare_function(the_node, iter_node); 200b750: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200b754: 92 10 00 1b mov %i3, %o1 200b758: 9f c0 40 00 call %g1 200b75c: 90 10 00 19 mov %i1, %o0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = 200b760: 83 3a 20 1f sra %o0, 0x1f, %g1 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { 200b764: 80 a2 20 00 cmp %o0, 0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = 200b768: 82 20 40 08 sub %g1, %o0, %g1 200b76c: 83 30 60 1f srl %g1, 0x1f, %g1 (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 200b770: 83 28 60 02 sll %g1, 2, %g1 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { 200b774: 12 80 00 06 bne 200b78c <_RBTree_Find+0x5c> 200b778: 82 06 c0 01 add %i3, %g1, %g1 found = iter_node; if ( the_rbtree->is_unique ) 200b77c: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2 200b780: 80 a0 a0 00 cmp %g2, 0 200b784: 12 80 00 0a bne 200b7ac <_RBTree_Find+0x7c> 200b788: b0 10 00 1b mov %i3, %i0 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 200b78c: f6 00 60 04 ld [ %g1 + 4 ], %i3 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200b790: 80 a6 e0 00 cmp %i3, 0 200b794: 32 bf ff f0 bne,a 200b754 <_RBTree_Find+0x24> 200b798: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 200b79c: 7f ff e1 90 call 2003ddc 200b7a0: 90 10 00 1d mov %i5, %o0 return return_node; } 200b7a4: 81 c7 e0 08 ret 200b7a8: 81 e8 00 00 restore RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 200b7ac: 7f ff e1 8c call 2003ddc 200b7b0: 90 10 00 1d mov %i5, %o0 return return_node; } 200b7b4: 81 c7 e0 08 ret 200b7b8: 81 e8 00 00 restore =============================================================================== 0200bbb8 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200bbb8: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200bbbc: 80 a6 20 00 cmp %i0, 0 200bbc0: 02 80 00 0f be 200bbfc <_RBTree_Initialize+0x44> <== NEVER TAKEN 200bbc4: 80 a6 e0 00 cmp %i3, 0 RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200bbc8: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200bbcc: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200bbd0: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200bbd4: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200bbd8: f2 26 20 10 st %i1, [ %i0 + 0x10 ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 200bbdc: 02 80 00 08 be 200bbfc <_RBTree_Initialize+0x44> <== NEVER TAKEN 200bbe0: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 200bbe4: 92 10 00 1a mov %i2, %o1 200bbe8: 7f ff ff b5 call 200babc <_RBTree_Insert> 200bbec: 90 10 00 18 mov %i0, %o0 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 200bbf0: b6 86 ff ff addcc %i3, -1, %i3 200bbf4: 12 bf ff fc bne 200bbe4 <_RBTree_Initialize+0x2c> 200bbf8: b4 06 80 1c add %i2, %i4, %i2 200bbfc: 81 c7 e0 08 ret 200bc00: 81 e8 00 00 restore =============================================================================== 0200ac98 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200ac98: 9d e3 bf a0 save %sp, -96, %sp 200ac9c: b8 10 00 18 mov %i0, %i4 if(!the_node) return (RBTree_Node*)-1; 200aca0: 80 a6 60 00 cmp %i1, 0 200aca4: 02 80 00 96 be 200aefc <_RBTree_Insert_unprotected+0x264> 200aca8: b0 10 3f ff mov -1, %i0 RBTree_Node *iter_node = the_rbtree->root; 200acac: fa 07 20 04 ld [ %i4 + 4 ], %i5 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200acb0: 80 a7 60 00 cmp %i5, 0 200acb4: 32 80 00 05 bne,a 200acc8 <_RBTree_Insert_unprotected+0x30> 200acb8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200acbc: 10 80 00 a0 b 200af3c <_RBTree_Insert_unprotected+0x2a4> 200acc0: c0 26 60 0c clr [ %i1 + 0xc ] the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 200acc4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200acc8: 92 10 00 1d mov %i5, %o1 200accc: 9f c0 40 00 call %g1 200acd0: 90 10 00 19 mov %i1, %o0 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200acd4: c2 0f 20 14 ldub [ %i4 + 0x14 ], %g1 200acd8: 80 a0 60 00 cmp %g1, 0 200acdc: 22 80 00 05 be,a 200acf0 <_RBTree_Insert_unprotected+0x58> 200ace0: 90 38 00 08 xnor %g0, %o0, %o0 200ace4: 80 a2 20 00 cmp %o0, 0 200ace8: 02 80 00 87 be 200af04 <_RBTree_Insert_unprotected+0x26c> 200acec: 90 38 00 08 xnor %g0, %o0, %o0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200acf0: 91 32 20 1f srl %o0, 0x1f, %o0 if (!iter_node->child[dir]) { 200acf4: 83 2a 20 02 sll %o0, 2, %g1 200acf8: 82 07 40 01 add %i5, %g1, %g1 200acfc: f0 00 60 04 ld [ %g1 + 4 ], %i0 200ad00: 80 a6 20 00 cmp %i0, 0 200ad04: 32 bf ff f0 bne,a 200acc4 <_RBTree_Insert_unprotected+0x2c> 200ad08: ba 10 00 18 mov %i0, %i5 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200ad0c: c0 26 60 08 clr [ %i1 + 8 ] 200ad10: c0 26 60 04 clr [ %i1 + 4 ] RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200ad14: 90 02 20 02 add %o0, 2, %o0 200ad18: 91 2a 20 02 sll %o0, 2, %o0 the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200ad1c: c4 07 00 08 ld [ %i4 + %o0 ], %g2 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; 200ad20: f2 20 60 04 st %i1, [ %g1 + 4 ] the_node->parent = iter_node; 200ad24: fa 26 40 00 st %i5, [ %i1 ] if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; 200ad28: 82 10 20 01 mov 1, %g1 iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200ad2c: 80 a0 80 1d cmp %g2, %i5 200ad30: 02 80 00 81 be 200af34 <_RBTree_Insert_unprotected+0x29c> 200ad34: c2 26 60 0c st %g1, [ %i1 + 0xc ] if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; 200ad38: 9a 10 20 01 mov 1, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200ad3c: c2 07 40 00 ld [ %i5 ], %g1 200ad40: 84 90 60 00 orcc %g1, 0, %g2 200ad44: 22 80 00 6e be,a 200aefc <_RBTree_Insert_unprotected+0x264> 200ad48: c0 26 60 0c clr [ %i1 + 0xc ] */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200ad4c: c6 07 60 0c ld [ %i5 + 0xc ], %g3 200ad50: 80 a0 e0 01 cmp %g3, 1 200ad54: 12 80 00 6d bne 200af08 <_RBTree_Insert_unprotected+0x270> 200ad58: 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; 200ad5c: de 00 40 00 ld [ %g1 ], %o7 200ad60: 80 a3 e0 00 cmp %o7, 0 200ad64: 02 80 00 0c be 200ad94 <_RBTree_Insert_unprotected+0xfc> <== NEVER TAKEN 200ad68: f8 00 60 04 ld [ %g1 + 4 ], %i4 { 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]) 200ad6c: 80 a7 00 1d cmp %i4, %i5 200ad70: 02 80 00 6f be 200af2c <_RBTree_Insert_unprotected+0x294> 200ad74: 86 10 00 1c mov %i4, %g3 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200ad78: 80 a0 e0 00 cmp %g3, 0 200ad7c: 22 80 00 07 be,a 200ad98 <_RBTree_Insert_unprotected+0x100> 200ad80: c8 07 60 04 ld [ %i5 + 4 ], %g4 200ad84: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 200ad88: 80 a1 20 01 cmp %g4, 1 200ad8c: 22 80 00 61 be,a 200af10 <_RBTree_Insert_unprotected+0x278> 200ad90: c0 27 60 0c clr [ %i5 + 0xc ] 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]; 200ad94: c8 07 60 04 ld [ %i5 + 4 ], %g4 RBTree_Direction pdir = the_node->parent != g->child[0]; 200ad98: b8 1f 00 1d xor %i4, %i5, %i4 200ad9c: 80 a0 00 1c cmp %g0, %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]; 200ada0: b8 1e 40 04 xor %i1, %g4, %i4 RBTree_Direction pdir = the_node->parent != g->child[0]; 200ada4: 86 40 20 00 addx %g0, 0, %g3 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]; 200ada8: 80 a0 00 1c cmp %g0, %i4 200adac: b8 40 20 00 addx %g0, 0, %i4 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 200adb0: 80 a7 00 03 cmp %i4, %g3 200adb4: 02 80 00 27 be 200ae50 <_RBTree_Insert_unprotected+0x1b8> 200adb8: 9e 18 e0 01 xor %g3, 1, %o7 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200adbc: b9 2b e0 02 sll %o7, 2, %i4 200adc0: b8 07 40 1c add %i5, %i4, %i4 200adc4: d8 07 20 04 ld [ %i4 + 4 ], %o4 200adc8: 80 a3 20 00 cmp %o4, 0 200adcc: 02 80 00 1e be 200ae44 <_RBTree_Insert_unprotected+0x1ac> <== NEVER TAKEN 200add0: b9 28 e0 02 sll %g3, 2, %i4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200add4: 80 a3 e0 00 cmp %o7, 0 200add8: 02 80 00 05 be 200adec <_RBTree_Insert_unprotected+0x154> 200addc: 98 10 20 00 clr %o4 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200ade0: c8 07 60 08 ld [ %i5 + 8 ], %g4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ade4: 98 10 20 01 mov 1, %o4 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200ade8: b9 28 e0 02 sll %g3, 2, %i4 200adec: 9e 01 00 1c add %g4, %i4, %o7 200adf0: d6 03 e0 04 ld [ %o7 + 4 ], %o3 200adf4: 99 2b 20 02 sll %o4, 2, %o4 200adf8: 98 07 40 0c add %i5, %o4, %o4 200adfc: d6 23 20 04 st %o3, [ %o4 + 4 ] if (c->child[dir]) 200ae00: de 03 e0 04 ld [ %o7 + 4 ], %o7 200ae04: 80 a3 e0 00 cmp %o7, 0 200ae08: 22 80 00 05 be,a 200ae1c <_RBTree_Insert_unprotected+0x184> 200ae0c: 9e 01 00 1c add %g4, %i4, %o7 c->child[dir]->parent = the_node; 200ae10: fa 23 c0 00 st %i5, [ %o7 ] 200ae14: c2 07 40 00 ld [ %i5 ], %g1 c->child[dir] = the_node; 200ae18: 9e 01 00 1c add %g4, %i4, %o7 200ae1c: fa 23 e0 04 st %i5, [ %o7 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae20: de 00 60 04 ld [ %g1 + 4 ], %o7 c->parent = the_node->parent; 200ae24: c2 21 00 00 st %g1, [ %g4 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae28: 9e 1b c0 1d xor %o7, %i5, %o7 c->parent = the_node->parent; the_node->parent = c; 200ae2c: c8 27 40 00 st %g4, [ %i5 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae30: 80 a0 00 0f cmp %g0, %o7 200ae34: ba 40 20 00 addx %g0, 0, %i5 200ae38: bb 2f 60 02 sll %i5, 2, %i5 200ae3c: 82 00 40 1d add %g1, %i5, %g1 200ae40: c8 20 60 04 st %g4, [ %g1 + 4 ] _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 200ae44: b2 06 40 1c add %i1, %i4, %i1 200ae48: f2 06 60 04 ld [ %i1 + 4 ], %i1 200ae4c: fa 06 40 00 ld [ %i1 ], %i5 } the_node->parent->color = RBT_BLACK; 200ae50: c0 27 60 0c clr [ %i5 + 0xc ] g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200ae54: 86 23 40 03 sub %o5, %g3, %g3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ae58: 80 a0 00 03 cmp %g0, %g3 200ae5c: 82 60 3f ff subx %g0, -1, %g1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200ae60: 89 28 60 02 sll %g1, 2, %g4 200ae64: 88 00 80 04 add %g2, %g4, %g4 200ae68: c8 01 20 04 ld [ %g4 + 4 ], %g4 200ae6c: 80 a1 20 00 cmp %g4, 0 200ae70: 02 bf ff b3 be 200ad3c <_RBTree_Insert_unprotected+0xa4> <== NEVER TAKEN 200ae74: da 20 a0 0c st %o5, [ %g2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ae78: 80 a0 60 00 cmp %g1, 0 200ae7c: 22 80 00 2a be,a 200af24 <_RBTree_Insert_unprotected+0x28c> 200ae80: c2 00 a0 04 ld [ %g2 + 4 ], %g1 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200ae84: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ae88: ba 10 20 01 mov 1, %i5 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200ae8c: 87 28 e0 02 sll %g3, 2, %g3 200ae90: 88 00 40 03 add %g1, %g3, %g4 200ae94: f8 01 20 04 ld [ %g4 + 4 ], %i4 200ae98: bb 2f 60 02 sll %i5, 2, %i5 200ae9c: ba 00 80 1d add %g2, %i5, %i5 200aea0: f8 27 60 04 st %i4, [ %i5 + 4 ] if (c->child[dir]) 200aea4: c8 01 20 04 ld [ %g4 + 4 ], %g4 200aea8: 80 a1 20 00 cmp %g4, 0 200aeac: 32 80 00 02 bne,a 200aeb4 <_RBTree_Insert_unprotected+0x21c> 200aeb0: c4 21 00 00 st %g2, [ %g4 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aeb4: c8 00 80 00 ld [ %g2 ], %g4 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200aeb8: 86 00 40 03 add %g1, %g3, %g3 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; 200aebc: c8 20 40 00 st %g4, [ %g1 ] the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200aec0: c4 20 e0 04 st %g2, [ %g3 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 200aec4: c2 20 80 00 st %g1, [ %g2 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aec8: c6 01 20 04 ld [ %g4 + 4 ], %g3 c->parent = the_node->parent; the_node->parent = c; 200aecc: fa 06 40 00 ld [ %i1 ], %i5 if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200aed0: 86 18 80 03 xor %g2, %g3, %g3 200aed4: 80 a0 00 03 cmp %g0, %g3 200aed8: 84 40 20 00 addx %g0, 0, %g2 200aedc: 85 28 a0 02 sll %g2, 2, %g2 200aee0: 88 01 00 02 add %g4, %g2, %g4 200aee4: c2 21 20 04 st %g1, [ %g4 + 4 ] */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200aee8: c2 07 40 00 ld [ %i5 ], %g1 200aeec: 84 90 60 00 orcc %g1, 0, %g2 200aef0: 32 bf ff 98 bne,a 200ad50 <_RBTree_Insert_unprotected+0xb8><== ALWAYS TAKEN 200aef4: c6 07 60 0c ld [ %i5 + 0xc ], %g3 } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200aef8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 200aefc: 81 c7 e0 08 ret 200af00: 81 e8 00 00 restore the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200af04: b0 10 00 1d mov %i5, %i0 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200af08: 81 c7 e0 08 ret 200af0c: 81 e8 00 00 restore 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; u->color = RBT_BLACK; 200af10: c0 20 e0 0c clr [ %g3 + 0xc ] g->color = RBT_RED; 200af14: c8 20 60 0c st %g4, [ %g1 + 0xc ] 200af18: ba 10 00 0f mov %o7, %i5 200af1c: 10 bf ff 88 b 200ad3c <_RBTree_Insert_unprotected+0xa4> 200af20: b2 10 00 01 mov %g1, %i1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200af24: 10 bf ff da b 200ae8c <_RBTree_Insert_unprotected+0x1f4> 200af28: ba 10 20 00 clr %i5 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]) return the_node->parent->child[RBT_RIGHT]; 200af2c: 10 bf ff 93 b 200ad78 <_RBTree_Insert_unprotected+0xe0> 200af30: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; 200af34: 10 bf ff 81 b 200ad38 <_RBTree_Insert_unprotected+0xa0> 200af38: f2 27 00 08 st %i1, [ %i4 + %o0 ] RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; the_rbtree->root = the_node; 200af3c: f2 27 20 04 st %i1, [ %i4 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200af40: f2 27 20 0c st %i1, [ %i4 + 0xc ] 200af44: f2 27 20 08 st %i1, [ %i4 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200af48: f8 26 40 00 st %i4, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200af4c: c0 26 60 08 clr [ %i1 + 8 ] 200af50: c0 26 60 04 clr [ %i1 + 4 ] } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; 200af54: 81 c7 e0 08 ret 200af58: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200af70 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200af70: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200af74: 80 a0 00 19 cmp %g0, %i1 200af78: 82 60 3f ff subx %g0, -1, %g1 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200af7c: 82 00 60 02 add %g1, 2, %g1 200af80: 83 28 60 02 sll %g1, 2, %g1 200af84: fa 06 00 01 ld [ %i0 + %g1 ], %i5 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 200af88: 80 a7 60 00 cmp %i5, 0 200af8c: 02 80 00 0d be 200afc0 <_RBTree_Iterate_unprotected+0x50> 200af90: 90 10 00 1d mov %i5, %o0 stop = (*visitor)( current, dir, visitor_arg ); 200af94: 92 10 00 19 mov %i1, %o1 200af98: 9f c6 80 00 call %i2 200af9c: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200afa0: 92 10 00 1d mov %i5, %o1 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); 200afa4: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200afa8: 94 10 00 19 mov %i1, %o2 200afac: 40 00 00 07 call 200afc8 <_RBTree_Next_unprotected> 200afb0: 90 10 00 18 mov %i0, %o0 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 200afb4: 80 8f 20 ff btst 0xff, %i4 200afb8: 02 bf ff f4 be 200af88 <_RBTree_Iterate_unprotected+0x18> <== ALWAYS TAKEN 200afbc: ba 10 00 08 mov %o0, %i5 200afc0: 81 c7 e0 08 ret 200afc4: 81 e8 00 00 restore =============================================================================== 0200afc8 <_RBTree_Next_unprotected>: const RBTree_Node *node, RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; 200afc8: 85 2a a0 02 sll %o2, 2, %g2 200afcc: 82 02 40 02 add %o1, %g2, %g1 200afd0: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200afd4: 80 a0 00 0a cmp %g0, %o2 200afd8: 86 60 3f ff subx %g0, -1, %g3 RBTree_Node *next = NULL; if ( current != NULL ) { 200afdc: 80 a0 60 00 cmp %g1, 0 200afe0: 02 80 00 0a be 200b008 <_RBTree_Next_unprotected+0x40> 200afe4: 94 10 00 08 mov %o0, %o2 200afe8: 87 28 e0 02 sll %g3, 2, %g3 next = current; while ( (current = current->child [opp_dir]) != NULL ) { 200afec: 84 00 40 03 add %g1, %g3, %g2 200aff0: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200aff4: 80 a0 a0 00 cmp %g2, 0 200aff8: 32 bf ff fd bne,a 200afec <_RBTree_Next_unprotected+0x24> 200affc: 82 10 00 02 mov %g2, %g1 RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; 200b000: 81 c3 e0 08 retl 200b004: 90 10 00 01 mov %g1, %o0 while ( (current = current->child [opp_dir]) != NULL ) { next = current; } } else { const RBTree_Node *null = (const RBTree_Node *) rbtree; RBTree_Node *parent = node->parent; 200b008: c8 02 40 00 ld [ %o1 ], %g4 if ( parent != null && node == parent->child [opp_dir] ) { 200b00c: 80 a2 80 04 cmp %o2, %g4 200b010: 02 80 00 19 be 200b074 <_RBTree_Next_unprotected+0xac> 200b014: 90 10 20 00 clr %o0 200b018: 87 28 e0 02 sll %g3, 2, %g3 200b01c: 86 01 00 03 add %g4, %g3, %g3 200b020: c2 00 e0 04 ld [ %g3 + 4 ], %g1 200b024: 80 a0 40 09 cmp %g1, %o1 200b028: 02 80 00 13 be 200b074 <_RBTree_Next_unprotected+0xac> 200b02c: 90 10 00 04 mov %g4, %o0 next = parent; } else { while ( parent != null && node == parent->child [dir] ) { 200b030: 82 01 00 02 add %g4, %g2, %g1 200b034: c2 00 60 04 ld [ %g1 + 4 ], %g1 200b038: 80 a2 40 01 cmp %o1, %g1 200b03c: 22 80 00 09 be,a 200b060 <_RBTree_Next_unprotected+0x98> <== ALWAYS TAKEN 200b040: c2 01 00 00 ld [ %g4 ], %g1 200b044: 10 bf ff ef b 200b000 <_RBTree_Next_unprotected+0x38> <== NOT EXECUTED 200b048: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED 200b04c: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200b050: 80 a0 c0 04 cmp %g3, %g4 200b054: 12 bf ff eb bne 200b000 <_RBTree_Next_unprotected+0x38> 200b058: 88 10 00 01 mov %g1, %g4 node = parent; parent = node->parent; 200b05c: c2 01 00 00 ld [ %g4 ], %g1 RBTree_Node *parent = node->parent; if ( parent != null && node == parent->child [opp_dir] ) { next = parent; } else { while ( parent != null && node == parent->child [dir] ) { 200b060: 80 a2 80 01 cmp %o2, %g1 200b064: 12 bf ff fa bne 200b04c <_RBTree_Next_unprotected+0x84> 200b068: 86 00 40 02 add %g1, %g2, %g3 } } } return next; } 200b06c: 81 c3 e0 08 retl 200b070: 90 10 20 00 clr %o0 200b074: 81 c3 e0 08 retl =============================================================================== 02008104 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 2008104: 9d e3 bf 98 save %sp, -104, %sp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 2008108: 03 00 80 77 sethi %hi(0x201dc00), %g1 200810c: 82 10 60 9c or %g1, 0x9c, %g1 ! 201dc9c 2008110: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 2008114: 80 a7 60 00 cmp %i5, 0 2008118: 02 80 00 18 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74> 200811c: f6 00 60 28 ld [ %g1 + 0x28 ], %i3 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2008120: 80 a6 e0 00 cmp %i3, 0 2008124: 02 80 00 15 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN 2008128: b8 10 20 00 clr %i4 return_value = rtems_task_create( 200812c: d4 07 60 04 ld [ %i5 + 4 ], %o2 2008130: d0 07 40 00 ld [ %i5 ], %o0 2008134: d2 07 60 08 ld [ %i5 + 8 ], %o1 2008138: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 200813c: d8 07 60 0c ld [ %i5 + 0xc ], %o4 2008140: 7f ff ff 70 call 2007f00 2008144: 9a 07 bf fc add %fp, -4, %o5 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 2008148: 94 92 20 00 orcc %o0, 0, %o2 200814c: 12 80 00 0d bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 2008150: d0 07 bf fc ld [ %fp + -4 ], %o0 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 2008154: d4 07 60 18 ld [ %i5 + 0x18 ], %o2 2008158: 40 00 00 0e call 2008190 200815c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 2008160: 94 92 20 00 orcc %o0, 0, %o2 2008164: 12 80 00 07 bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 2008168: b8 07 20 01 inc %i4 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 200816c: 80 a7 00 1b cmp %i4, %i3 2008170: 12 bf ff ef bne 200812c <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN 2008174: ba 07 60 1c add %i5, 0x1c, %i5 2008178: 81 c7 e0 08 ret 200817c: 81 e8 00 00 restore id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 2008180: 90 10 20 01 mov 1, %o0 2008184: 40 00 04 29 call 2009228 <_Internal_error_Occurred> 2008188: 92 10 20 01 mov 1, %o1 =============================================================================== 0200db94 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200db94: c2 02 21 64 ld [ %o0 + 0x164 ], %g1 while (tvp) { 200db98: 80 a0 60 00 cmp %g1, 0 200db9c: 22 80 00 0c be,a 200dbcc <_RTEMS_tasks_Switch_extension+0x38> 200dba0: c2 02 61 64 ld [ %o1 + 0x164 ], %g1 tvp->tval = *tvp->ptr; 200dba4: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200dba8: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200dbac: c8 00 80 00 ld [ %g2 ], %g4 200dbb0: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; 200dbb4: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200dbb8: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200dbbc: 80 a0 60 00 cmp %g1, 0 200dbc0: 32 bf ff fa bne,a 200dba8 <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN 200dbc4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 200dbc8: c2 02 61 64 ld [ %o1 + 0x164 ], %g1 while (tvp) { 200dbcc: 80 a0 60 00 cmp %g1, 0 200dbd0: 02 80 00 0b be 200dbfc <_RTEMS_tasks_Switch_extension+0x68> 200dbd4: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200dbd8: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200dbdc: c6 00 60 0c ld [ %g1 + 0xc ], %g3 tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 200dbe0: c8 00 80 00 ld [ %g2 ], %g4 200dbe4: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; 200dbe8: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200dbec: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200dbf0: 80 a0 60 00 cmp %g1, 0 200dbf4: 32 bf ff fa bne,a 200dbdc <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN 200dbf8: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 200dbfc: 81 c3 e0 08 retl =============================================================================== 02044888 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 2044888: 9d e3 bf 98 save %sp, -104, %sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 204488c: fa 06 20 40 ld [ %i0 + 0x40 ], %i5 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2044890: 7f ff a7 dc call 202e800 <_TOD_Get_uptime> 2044894: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2044898: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 _Timestamp_Subtract( 204489c: c4 1f bf f8 ldd [ %fp + -8 ], %g2 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 20448a0: 03 00 81 d7 sethi %hi(0x2075c00), %g1 20448a4: 82 10 60 70 or %g1, 0x70, %g1 ! 2075c70 <_Per_CPU_Information> 20448a8: c8 00 60 0c ld [ %g1 + 0xc ], %g4 20448ac: 9a a0 c0 0d subcc %g3, %o5, %o5 20448b0: 98 60 80 0c subx %g2, %o4, %o4 20448b4: d8 3e 40 00 std %o4, [ %i1 ] 20448b8: 80 a1 00 1d cmp %g4, %i5 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 20448bc: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 20448c0: 02 80 00 05 be 20448d4 <_Rate_monotonic_Get_status+0x4c> 20448c4: b2 10 20 01 mov 1, %i1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 20448c8: b0 0e 60 01 and %i1, 1, %i0 20448cc: 81 c7 e0 08 ret 20448d0: 81 e8 00 00 restore 20448d4: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20448d8: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0 20448dc: 86 a0 c0 0b subcc %g3, %o3, %g3 20448e0: 84 60 80 0a subx %g2, %o2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 20448e4: 86 83 40 03 addcc %o5, %g3, %g3 20448e8: 84 43 00 02 addx %o4, %g2, %g2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 20448ec: 80 a6 00 02 cmp %i0, %g2 20448f0: 34 bf ff f6 bg,a 20448c8 <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN 20448f4: b2 10 20 00 clr %i1 <== NOT EXECUTED 20448f8: 02 80 00 09 be 204491c <_Rate_monotonic_Get_status+0x94> 20448fc: 80 a6 40 03 cmp %i1, %g3 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2044900: 86 a0 c0 19 subcc %g3, %i1, %g3 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 2044904: b2 10 20 01 mov 1, %i1 2044908: 84 60 80 18 subx %g2, %i0, %g2 } 204490c: b0 0e 60 01 and %i1, 1, %i0 2044910: c4 3e 80 00 std %g2, [ %i2 ] 2044914: 81 c7 e0 08 ret 2044918: 81 e8 00 00 restore /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 204491c: 28 bf ff fa bleu,a 2044904 <_Rate_monotonic_Get_status+0x7c> 2044920: 86 a0 c0 19 subcc %g3, %i1, %g3 return false; 2044924: 10 bf ff e9 b 20448c8 <_Rate_monotonic_Get_status+0x40> 2044928: b2 10 20 00 clr %i1 =============================================================================== 02044cc8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2044cc8: 9d e3 bf 98 save %sp, -104, %sp 2044ccc: 11 00 81 d8 sethi %hi(0x2076000), %o0 2044cd0: 92 10 00 18 mov %i0, %o1 2044cd4: 90 12 22 e0 or %o0, 0x2e0, %o0 2044cd8: 7f ff 2b a9 call 200fb7c <_Objects_Get> 2044cdc: 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 ) { 2044ce0: c2 07 bf fc ld [ %fp + -4 ], %g1 2044ce4: 80 a0 60 00 cmp %g1, 0 2044ce8: 12 80 00 17 bne 2044d44 <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN 2044cec: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 2044cf0: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2044cf4: 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); 2044cf8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2044cfc: 80 88 80 01 btst %g2, %g1 2044d00: 22 80 00 08 be,a 2044d20 <_Rate_monotonic_Timeout+0x58> 2044d04: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2044d08: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2044d0c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2044d10: 80 a0 80 01 cmp %g2, %g1 2044d14: 02 80 00 1a be 2044d7c <_Rate_monotonic_Timeout+0xb4> 2044d18: 13 04 00 ff sethi %hi(0x1003fc00), %o1 _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 ) { 2044d1c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2044d20: 80 a0 60 01 cmp %g1, 1 2044d24: 02 80 00 0a be 2044d4c <_Rate_monotonic_Timeout+0x84> 2044d28: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2044d2c: 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--; 2044d30: 03 00 81 d5 sethi %hi(0x2075400), %g1 2044d34: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 2075730 <_Thread_Dispatch_disable_level> 2044d38: 84 00 bf ff add %g2, -1, %g2 2044d3c: c4 20 63 30 st %g2, [ %g1 + 0x330 ] return _Thread_Dispatch_disable_level; 2044d40: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 2044d44: 81 c7 e0 08 ret 2044d48: 81 e8 00 00 restore _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 ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2044d4c: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 2044d50: 90 10 00 1d mov %i5, %o0 _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 ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2044d54: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2044d58: 7f ff ff 44 call 2044a68 <_Rate_monotonic_Initiate_statistics> 2044d5c: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2044d60: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2044d64: 11 00 81 d5 sethi %hi(0x2075400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2044d68: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2044d6c: 90 12 23 f0 or %o0, 0x3f0, %o0 2044d70: 7f ff 32 f6 call 2011948 <_Watchdog_Insert> 2044d74: 92 07 60 10 add %i5, 0x10, %o1 2044d78: 30 bf ff ee b,a 2044d30 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2044d7c: 7f ff 2e 7d call 2010770 <_Thread_Clear_state> 2044d80: 92 12 63 f8 or %o1, 0x3f8, %o1 the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2044d84: 10 bf ff f5 b 2044d58 <_Rate_monotonic_Timeout+0x90> 2044d88: 90 10 00 1d mov %i5, %o0 =============================================================================== 0204492c <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 204492c: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2044930: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2044934: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2044938: 84 00 a0 01 inc %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 204493c: 80 a0 60 04 cmp %g1, 4 2044940: 02 80 00 46 be 2044a58 <_Rate_monotonic_Update_statistics+0x12c> 2044944: c4 26 20 58 st %g2, [ %i0 + 0x58 ] stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 2044948: 90 10 00 18 mov %i0, %o0 204494c: 92 07 bf f8 add %fp, -8, %o1 2044950: 7f ff ff ce call 2044888 <_Rate_monotonic_Get_status> 2044954: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 2044958: 80 8a 20 ff btst 0xff, %o0 204495c: 02 80 00 21 be 20449e0 <_Rate_monotonic_Update_statistics+0xb4> 2044960: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2044964: d8 1e 20 70 ldd [ %i0 + 0x70 ], %o4 * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 2044968: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 204496c: 9a 83 40 03 addcc %o5, %g3, %o5 2044970: 98 43 00 02 addx %o4, %g2, %o4 2044974: 80 a0 40 02 cmp %g1, %g2 2044978: 04 80 00 1c ble 20449e8 <_Rate_monotonic_Update_statistics+0xbc> 204497c: d8 3e 20 70 std %o4, [ %i0 + 0x70 ] stats->min_cpu_time = executed; 2044980: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2044984: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 2044988: 80 a0 40 02 cmp %g1, %g2 204498c: 26 80 00 05 bl,a 20449a0 <_Rate_monotonic_Update_statistics+0x74><== NEVER TAKEN 2044990: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 2044994: 80 a0 40 02 cmp %g1, %g2 2044998: 22 80 00 2b be,a 2044a44 <_Rate_monotonic_Update_statistics+0x118><== ALWAYS TAKEN 204499c: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 20449a0: c4 1f bf f8 ldd [ %fp + -8 ], %g2 20449a4: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 20449a8: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 20449ac: 9a 83 40 03 addcc %o5, %g3, %o5 20449b0: 98 43 00 02 addx %o4, %g2, %o4 20449b4: 80 a0 40 02 cmp %g1, %g2 20449b8: 14 80 00 1e bg 2044a30 <_Rate_monotonic_Update_statistics+0x104> 20449bc: d8 3e 20 88 std %o4, [ %i0 + 0x88 ] 20449c0: 80 a0 40 02 cmp %g1, %g2 20449c4: 22 80 00 18 be,a 2044a24 <_Rate_monotonic_Update_statistics+0xf8><== ALWAYS TAKEN 20449c8: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 20449cc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 20449d0: 80 a0 40 02 cmp %g1, %g2 20449d4: 16 80 00 0d bge 2044a08 <_Rate_monotonic_Update_statistics+0xdc><== ALWAYS TAKEN 20449d8: 01 00 00 00 nop stats->max_wall_time = since_last_period; 20449dc: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 20449e0: 81 c7 e0 08 ret 20449e4: 81 e8 00 00 restore * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 20449e8: 32 bf ff e8 bne,a 2044988 <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN 20449ec: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 20449f0: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 20449f4: 80 a0 40 03 cmp %g1, %g3 20449f8: 28 bf ff e4 bleu,a 2044988 <_Rate_monotonic_Update_statistics+0x5c> 20449fc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 2044a00: 10 bf ff e1 b 2044984 <_Rate_monotonic_Update_statistics+0x58> 2044a04: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2044a08: 12 bf ff f6 bne 20449e0 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 2044a0c: 01 00 00 00 nop 2044a10: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2044a14: 80 a0 40 03 cmp %g1, %g3 2044a18: 2a bf ff f2 bcs,a 20449e0 <_Rate_monotonic_Update_statistics+0xb4> 2044a1c: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 2044a20: 30 bf ff f0 b,a 20449e0 <_Rate_monotonic_Update_statistics+0xb4> * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 2044a24: 80 a0 40 03 cmp %g1, %g3 2044a28: 28 bf ff ea bleu,a 20449d0 <_Rate_monotonic_Update_statistics+0xa4> 2044a2c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2044a30: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2044a34: 80 a0 40 02 cmp %g1, %g2 2044a38: 06 bf ff e9 bl 20449dc <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 2044a3c: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] 2044a40: 30 bf ff f2 b,a 2044a08 <_Rate_monotonic_Update_statistics+0xdc> _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) stats->min_cpu_time = executed; if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2044a44: 80 a0 40 03 cmp %g1, %g3 2044a48: 3a bf ff d7 bcc,a 20449a4 <_Rate_monotonic_Update_statistics+0x78> 2044a4c: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 2044a50: 10 bf ff d4 b 20449a0 <_Rate_monotonic_Update_statistics+0x74> 2044a54: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 2044a58: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 2044a5c: 82 00 60 01 inc %g1 2044a60: 10 bf ff ba b 2044948 <_Rate_monotonic_Update_statistics+0x1c> 2044a64: c2 26 20 5c st %g1, [ %i0 + 0x5c ] =============================================================================== 0200bb24 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200bb24: 9d e3 bf 98 save %sp, -104, %sp Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200bb28: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200bb2c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bb30: 80 a0 40 09 cmp %g1, %o1 200bb34: 32 80 00 02 bne,a 200bb3c <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200bb38: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200bb3c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200bb40: 80 a0 40 09 cmp %g1, %o1 200bb44: 02 80 00 04 be 200bb54 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200bb48: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200bb4c: 40 00 01 9b call 200c1b8 <_Thread_Change_priority> 200bb50: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200bb54: f0 06 20 88 ld [ %i0 + 0x88 ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200bb58: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bb5c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200bb60: 80 a0 a0 00 cmp %g2, 0 200bb64: 02 80 00 09 be 200bb88 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200bb68: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200bb6c: d0 00 40 00 ld [ %g1 ], %o0 200bb70: 7f ff ff d1 call 200bab4 <_Scheduler_CBS_Get_server_id> 200bb74: 92 07 bf fc add %fp, -4, %o1 sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 200bb78: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bb7c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200bb80: 9f c0 40 00 call %g1 200bb84: d0 07 bf fc ld [ %fp + -4 ], %o0 200bb88: 81 c7 e0 08 ret 200bb8c: 81 e8 00 00 restore =============================================================================== 0200b68c <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { 200b68c: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b690: 39 00 80 85 sethi %hi(0x2021400), %i4 200b694: c2 07 20 e8 ld [ %i4 + 0xe8 ], %g1 ! 20214e8 <_Scheduler_CBS_Maximum_servers> 200b698: 80 a0 60 00 cmp %g1, 0 200b69c: 02 80 00 18 be 200b6fc <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN 200b6a0: 03 00 80 89 sethi %hi(0x2022400), %g1 200b6a4: 37 00 80 89 sethi %hi(0x2022400), %i3 200b6a8: c4 06 e3 c8 ld [ %i3 + 0x3c8 ], %g2 ! 20227c8 <_Scheduler_CBS_Server_list> 200b6ac: ba 10 20 00 clr %i5 200b6b0: b8 17 20 e8 or %i4, 0xe8, %i4 if ( _Scheduler_CBS_Server_list[ i ] ) 200b6b4: 83 2f 60 02 sll %i5, 2, %g1 200b6b8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200b6bc: 80 a0 60 00 cmp %g1, 0 200b6c0: 02 80 00 05 be 200b6d4 <_Scheduler_CBS_Cleanup+0x48> 200b6c4: 90 10 00 1d mov %i5, %o0 _Scheduler_CBS_Destroy_server( i ); 200b6c8: 40 00 00 45 call 200b7dc <_Scheduler_CBS_Destroy_server> 200b6cc: 01 00 00 00 nop 200b6d0: c4 06 e3 c8 ld [ %i3 + 0x3c8 ], %g2 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b6d4: c2 07 00 00 ld [ %i4 ], %g1 200b6d8: ba 07 60 01 inc %i5 200b6dc: 80 a0 40 1d cmp %g1, %i5 200b6e0: 18 bf ff f6 bgu 200b6b8 <_Scheduler_CBS_Cleanup+0x2c> 200b6e4: 83 2f 60 02 sll %i5, 2, %g1 if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); return SCHEDULER_CBS_OK; } 200b6e8: b0 10 20 00 clr %i0 for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); 200b6ec: 40 00 08 60 call 200d86c <_Workspace_Free> 200b6f0: 90 10 00 02 mov %g2, %o0 return SCHEDULER_CBS_OK; } 200b6f4: 81 c7 e0 08 ret 200b6f8: 81 e8 00 00 restore int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b6fc: 10 bf ff fb b 200b6e8 <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED 200b700: c4 00 63 c8 ld [ %g1 + 0x3c8 ], %g2 <== NOT EXECUTED =============================================================================== 0200b704 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b704: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b708: c2 06 20 04 ld [ %i0 + 4 ], %g1 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b70c: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b710: 80 a0 60 00 cmp %g1, 0 200b714: 04 80 00 30 ble 200b7d4 <_Scheduler_CBS_Create_server+0xd0> 200b718: b0 10 3f ee mov -18, %i0 200b71c: c2 07 40 00 ld [ %i5 ], %g1 200b720: 80 a0 60 00 cmp %g1, 0 200b724: 04 80 00 2c ble 200b7d4 <_Scheduler_CBS_Create_server+0xd0> 200b728: 03 00 80 85 sethi %hi(0x2021400), %g1 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b72c: c6 00 60 e8 ld [ %g1 + 0xe8 ], %g3 ! 20214e8 <_Scheduler_CBS_Maximum_servers> 200b730: 80 a0 e0 00 cmp %g3, 0 200b734: 02 80 00 28 be 200b7d4 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200b738: b0 10 3f e6 mov -26, %i0 if ( !_Scheduler_CBS_Server_list[i] ) 200b73c: 37 00 80 89 sethi %hi(0x2022400), %i3 200b740: f8 06 e3 c8 ld [ %i3 + 0x3c8 ], %i4 ! 20227c8 <_Scheduler_CBS_Server_list> 200b744: c2 07 00 00 ld [ %i4 ], %g1 200b748: 80 a0 60 00 cmp %g1, 0 200b74c: 02 80 00 0e be 200b784 <_Scheduler_CBS_Create_server+0x80> 200b750: 82 10 20 00 clr %g1 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b754: 10 80 00 07 b 200b770 <_Scheduler_CBS_Create_server+0x6c> 200b758: 82 00 60 01 inc %g1 if ( !_Scheduler_CBS_Server_list[i] ) 200b75c: c4 07 00 18 ld [ %i4 + %i0 ], %g2 200b760: 80 a0 a0 00 cmp %g2, 0 200b764: 22 80 00 0a be,a 200b78c <_Scheduler_CBS_Create_server+0x88> 200b768: c2 26 80 00 st %g1, [ %i2 ] params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b76c: 82 00 60 01 inc %g1 200b770: 80 a0 40 03 cmp %g1, %g3 200b774: 12 bf ff fa bne 200b75c <_Scheduler_CBS_Create_server+0x58> 200b778: b1 28 60 02 sll %g1, 2, %i0 if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 200b77c: 81 c7 e0 08 ret 200b780: 91 e8 3f e6 restore %g0, -26, %o0 params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( !_Scheduler_CBS_Server_list[i] ) 200b784: b0 10 20 00 clr %i0 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200b788: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200b78c: 40 00 08 30 call 200d84c <_Workspace_Allocate> 200b790: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200b794: c2 06 80 00 ld [ %i2 ], %g1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 200b798: d0 27 00 18 st %o0, [ %i4 + %i0 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200b79c: c4 06 e3 c8 ld [ %i3 + 0x3c8 ], %g2 200b7a0: 83 28 60 02 sll %g1, 2, %g1 200b7a4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200b7a8: 80 a0 60 00 cmp %g1, 0 200b7ac: 02 80 00 0a be 200b7d4 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200b7b0: b0 10 3f ef mov -17, %i0 return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b7b4: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200b7b8: b0 10 20 00 clr %i0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b7bc: c4 20 60 04 st %g2, [ %g1 + 4 ] 200b7c0: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200b7c4: f2 20 60 0c st %i1, [ %g1 + 0xc ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b7c8: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200b7cc: 84 10 3f ff mov -1, %g2 200b7d0: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 200b7d4: 81 c7 e0 08 ret 200b7d8: 81 e8 00 00 restore =============================================================================== 0200b84c <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200b84c: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 200b850: 92 07 bf fc add %fp, -4, %o1 200b854: 40 00 03 a3 call 200c6e0 <_Thread_Get> 200b858: 90 10 00 19 mov %i1, %o0 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200b85c: ba 92 20 00 orcc %o0, 0, %i5 200b860: 22 80 00 05 be,a 200b874 <_Scheduler_CBS_Detach_thread+0x28> 200b864: 03 00 80 85 sethi %hi(0x2021400), %g1 _Thread_Enable_dispatch(); 200b868: 40 00 03 91 call 200c6ac <_Thread_Enable_dispatch> 200b86c: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b870: 03 00 80 85 sethi %hi(0x2021400), %g1 200b874: c4 00 60 e8 ld [ %g1 + 0xe8 ], %g2 ! 20214e8 <_Scheduler_CBS_Maximum_servers> 200b878: 80 a0 80 18 cmp %g2, %i0 200b87c: 08 80 00 1b bleu 200b8e8 <_Scheduler_CBS_Detach_thread+0x9c> 200b880: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b884: 80 a7 60 00 cmp %i5, 0 200b888: 02 80 00 18 be 200b8e8 <_Scheduler_CBS_Detach_thread+0x9c> 200b88c: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b890: 03 00 80 89 sethi %hi(0x2022400), %g1 200b894: c2 00 63 c8 ld [ %g1 + 0x3c8 ], %g1 ! 20227c8 <_Scheduler_CBS_Server_list> 200b898: b1 2e 20 02 sll %i0, 2, %i0 200b89c: c4 00 40 18 ld [ %g1 + %i0 ], %g2 200b8a0: 80 a0 a0 00 cmp %g2, 0 200b8a4: 02 80 00 11 be 200b8e8 <_Scheduler_CBS_Detach_thread+0x9c> 200b8a8: 82 10 3f e7 mov -25, %g1 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 200b8ac: c6 00 80 00 ld [ %g2 ], %g3 200b8b0: 80 a0 c0 19 cmp %g3, %i1 200b8b4: 12 80 00 0d bne 200b8e8 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b8b8: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b8bc: c8 07 60 88 ld [ %i5 + 0x88 ], %g4 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b8c0: 82 10 3f ff mov -1, %g1 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b8c4: c6 07 60 a0 ld [ %i5 + 0xa0 ], %g3 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b8c8: c2 20 80 00 st %g1, [ %g2 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b8cc: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200b8d0: c4 07 60 a4 ld [ %i5 + 0xa4 ], %g2 if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b8d4: c0 21 20 18 clr [ %g4 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b8d8: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b8dc: c6 27 60 78 st %g3, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b8e0: c4 27 60 7c st %g2, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; 200b8e4: 82 10 20 00 clr %g1 } 200b8e8: 81 c7 e0 08 ret 200b8ec: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200bab4 <_Scheduler_CBS_Get_server_id>: int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200bab4: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200bab8: 03 00 80 85 sethi %hi(0x2021400), %g1 200babc: c2 00 60 e8 ld [ %g1 + 0xe8 ], %g1 ! 20214e8 <_Scheduler_CBS_Maximum_servers> int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200bac0: 84 10 00 18 mov %i0, %g2 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200bac4: 80 a0 60 00 cmp %g1, 0 200bac8: 02 80 00 13 be 200bb14 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN 200bacc: b0 10 3f e7 mov -25, %i0 200bad0: 07 00 80 89 sethi %hi(0x2022400), %g3 200bad4: de 00 e3 c8 ld [ %g3 + 0x3c8 ], %o7 ! 20227c8 <_Scheduler_CBS_Server_list> 200bad8: 86 10 20 00 clr %g3 #include #include #include #include int _Scheduler_CBS_Get_server_id ( 200badc: 89 28 e0 02 sll %g3, 2, %g4 Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && 200bae0: c8 03 c0 04 ld [ %o7 + %g4 ], %g4 200bae4: 80 a1 20 00 cmp %g4, 0 200bae8: 22 80 00 07 be,a 200bb04 <_Scheduler_CBS_Get_server_id+0x50> 200baec: 86 00 e0 01 inc %g3 200baf0: c8 01 00 00 ld [ %g4 ], %g4 200baf4: 80 a1 00 02 cmp %g4, %g2 200baf8: 22 80 00 09 be,a 200bb1c <_Scheduler_CBS_Get_server_id+0x68> 200bafc: c6 26 40 00 st %g3, [ %i1 ] rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200bb00: 86 00 e0 01 inc %g3 200bb04: 80 a0 c0 01 cmp %g3, %g1 200bb08: 12 bf ff f6 bne 200bae0 <_Scheduler_CBS_Get_server_id+0x2c> 200bb0c: 89 28 e0 02 sll %g3, 2, %g4 _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; 200bb10: b0 10 3f e7 mov -25, %i0 } 200bb14: 81 c7 e0 08 ret 200bb18: 81 e8 00 00 restore unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; 200bb1c: 81 c7 e0 08 ret 200bb20: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200bb90 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200bb90: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); 200bb94: 3b 00 80 85 sethi %hi(0x2021400), %i5 200bb98: d0 07 60 e8 ld [ %i5 + 0xe8 ], %o0 ! 20214e8 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200bb9c: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200bba0: 40 00 07 2b call 200d84c <_Workspace_Allocate> 200bba4: 91 2a 20 02 sll %o0, 2, %o0 200bba8: 09 00 80 89 sethi %hi(0x2022400), %g4 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200bbac: 80 a2 20 00 cmp %o0, 0 200bbb0: 02 80 00 0f be 200bbec <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200bbb4: d0 21 23 c8 st %o0, [ %g4 + 0x3c8 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200bbb8: c6 07 60 e8 ld [ %i5 + 0xe8 ], %g3 200bbbc: 80 a0 e0 00 cmp %g3, 0 200bbc0: 02 80 00 0b be 200bbec <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200bbc4: b0 10 20 00 clr %i0 200bbc8: 10 80 00 03 b 200bbd4 <_Scheduler_CBS_Initialize+0x44> 200bbcc: 82 10 20 00 clr %g1 200bbd0: d0 01 23 c8 ld [ %g4 + 0x3c8 ], %o0 _Scheduler_CBS_Server_list[i] = NULL; 200bbd4: 85 28 60 02 sll %g1, 2, %g2 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200bbd8: 82 00 60 01 inc %g1 200bbdc: 80 a0 40 03 cmp %g1, %g3 200bbe0: 12 bf ff fc bne 200bbd0 <_Scheduler_CBS_Initialize+0x40> 200bbe4: c0 22 00 02 clr [ %o0 + %g2 ] _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200bbe8: b0 10 20 00 clr %i0 } 200bbec: 81 c7 e0 08 ret 200bbf0: 81 e8 00 00 restore =============================================================================== 0200a6e8 <_Scheduler_CBS_Release_job>: { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 200a6e8: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 200a6ec: 80 a2 60 00 cmp %o1, 0 200a6f0: 02 80 00 11 be 200a734 <_Scheduler_CBS_Release_job+0x4c> 200a6f4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 200a6f8: 80 a0 60 00 cmp %g1, 0 200a6fc: 02 80 00 13 be 200a748 <_Scheduler_CBS_Release_job+0x60> 200a700: 07 00 80 81 sethi %hi(0x2020400), %g3 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 200a704: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a708: d2 00 e3 50 ld [ %g3 + 0x350 ], %o1 200a70c: 92 02 40 02 add %o1, %g2, %o1 200a710: 05 20 00 00 sethi %hi(0x80000000), %g2 200a714: 92 2a 40 02 andn %o1, %g2, %o1 new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; 200a718: c2 00 60 08 ld [ %g1 + 8 ], %g1 200a71c: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 200a720: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 200a724: 94 10 20 01 mov 1, %o2 200a728: 82 13 c0 00 mov %o7, %g1 200a72c: 40 00 01 47 call 200ac48 <_Thread_Change_priority> 200a730: 9e 10 40 00 mov %g1, %o7 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) 200a734: 80 a0 60 00 cmp %g1, 0 200a738: 12 bf ff f8 bne 200a718 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN 200a73c: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 200a740: 10 bf ff f9 b 200a724 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED 200a744: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 200a748: 03 00 80 81 sethi %hi(0x2020400), %g1 200a74c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 2020750 <_Watchdog_Ticks_since_boot> 200a750: 92 02 40 01 add %o1, %g1, %o1 200a754: 03 20 00 00 sethi %hi(0x80000000), %g1 200a758: 10 bf ff f2 b 200a720 <_Scheduler_CBS_Release_job+0x38> 200a75c: 92 2a 40 01 andn %o1, %g1, %o1 =============================================================================== 0200a760 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a760: 9d e3 bf a0 save %sp, -96, %sp Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 200a764: 40 00 00 5b call 200a8d0 <_Scheduler_EDF_Enqueue> 200a768: 90 10 00 18 mov %i0, %o0 /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 200a76c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a770: fa 00 60 18 ld [ %g1 + 0x18 ], %i5 * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 200a774: 80 a7 60 00 cmp %i5, 0 200a778: 02 80 00 19 be 200a7dc <_Scheduler_CBS_Unblock+0x7c> 200a77c: 03 00 80 81 sethi %hi(0x2020400), %g1 time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a780: d2 07 60 04 ld [ %i5 + 4 ], %o1 */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 200a784: d0 00 63 50 ld [ %g1 + 0x350 ], %o0 200a788: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a78c: 40 00 41 bf call 201ae88 <.umul> 200a790: 90 27 00 08 sub %i4, %o0, %o0 200a794: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a798: b6 10 00 08 mov %o0, %i3 200a79c: 40 00 41 bb call 201ae88 <.umul> 200a7a0: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a7a4: 80 a6 c0 08 cmp %i3, %o0 200a7a8: 24 80 00 0e ble,a 200a7e0 <_Scheduler_CBS_Unblock+0x80> 200a7ac: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a7b0: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a7b4: 80 a7 00 09 cmp %i4, %o1 200a7b8: 32 80 00 02 bne,a 200a7c0 <_Scheduler_CBS_Unblock+0x60> 200a7bc: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a7c0: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a7c4: 80 a2 00 09 cmp %o0, %o1 200a7c8: 02 80 00 07 be 200a7e4 <_Scheduler_CBS_Unblock+0x84> 200a7cc: 3b 00 80 82 sethi %hi(0x2020800), %i5 _Thread_Change_priority(the_thread, new_priority, true); 200a7d0: 90 10 00 18 mov %i0, %o0 200a7d4: 40 00 01 1d call 200ac48 <_Thread_Change_priority> 200a7d8: 94 10 20 01 mov 1, %o2 200a7dc: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 200a7e0: 3b 00 80 82 sethi %hi(0x2020800), %i5 200a7e4: ba 17 63 80 or %i5, 0x380, %i5 ! 2020b80 <_Per_CPU_Information> 200a7e8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a7ec: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 200a7f0: 03 00 80 7e sethi %hi(0x201f800), %g1 200a7f4: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 201f8fc <_Scheduler+0x30> 200a7f8: 9f c0 40 00 call %g1 200a7fc: 01 00 00 00 nop 200a800: 80 a2 20 00 cmp %o0, 0 200a804: 04 80 00 0a ble 200a82c <_Scheduler_CBS_Unblock+0xcc> 200a808: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a80c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 200a810: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a814: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a818: 80 a0 60 00 cmp %g1, 0 200a81c: 22 80 00 06 be,a 200a834 <_Scheduler_CBS_Unblock+0xd4> 200a820: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a824: 82 10 20 01 mov 1, %g1 200a828: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 200a82c: 81 c7 e0 08 ret 200a830: 81 e8 00 00 restore * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a834: 80 a0 60 00 cmp %g1, 0 200a838: 12 bf ff fd bne 200a82c <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN 200a83c: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a840: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 200a844: 30 bf ff fa b,a 200a82c <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED =============================================================================== 0200a848 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 200a848: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 200a84c: 40 00 06 d3 call 200c398 <_Workspace_Allocate> 200a850: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 200a854: 80 a2 20 00 cmp %o0, 0 200a858: 02 80 00 05 be 200a86c <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 200a85c: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 200a860: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 200a864: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 200a868: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 200a86c: 81 c7 e0 08 ret 200a870: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a8d8 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a8d8: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a8dc: 7f ff ff a5 call 200a770 <_Scheduler_EDF_Enqueue> 200a8e0: 90 10 00 18 mov %i0, %o0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( 200a8e4: 3b 00 80 82 sethi %hi(0x2020800), %i5 200a8e8: ba 17 62 e0 or %i5, 0x2e0, %i5 ! 2020ae0 <_Per_CPU_Information> 200a8ec: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a8f0: d0 00 60 14 ld [ %g1 + 0x14 ], %o0 200a8f4: 03 00 80 7e sethi %hi(0x201f800), %g1 200a8f8: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 ! 201f85c <_Scheduler+0x30> 200a8fc: 9f c0 40 00 call %g1 200a900: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a904: 80 a2 20 00 cmp %o0, 0 200a908: 26 80 00 04 bl,a 200a918 <_Scheduler_EDF_Unblock+0x40> 200a90c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200a910: 81 c7 e0 08 ret 200a914: 81 e8 00 00 restore _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 200a918: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a91c: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a920: 80 a0 60 00 cmp %g1, 0 200a924: 22 80 00 06 be,a 200a93c <_Scheduler_EDF_Unblock+0x64> 200a928: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a92c: 82 10 20 01 mov 1, %g1 200a930: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 200a934: 81 c7 e0 08 ret 200a938: 81 e8 00 00 restore */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a93c: 80 a0 60 00 cmp %g1, 0 200a940: 12 bf ff f4 bne 200a910 <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN 200a944: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a948: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 200a94c: 30 bf ff fa b,a 200a934 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED =============================================================================== 0200a078 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 200a078: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 200a07c: 03 00 80 7b sethi %hi(0x201ec00), %g1 200a080: d0 00 63 7c ld [ %g1 + 0x37c ], %o0 ! 201ef7c <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 200a084: c2 0a 20 70 ldub [ %o0 + 0x70 ], %g1 200a088: 80 a0 60 00 cmp %g1, 0 200a08c: 02 80 00 26 be 200a124 <_Scheduler_priority_Tick+0xac> 200a090: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 200a094: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 200a098: 80 a0 60 00 cmp %g1, 0 200a09c: 12 80 00 22 bne 200a124 <_Scheduler_priority_Tick+0xac> 200a0a0: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 200a0a4: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 200a0a8: 80 a0 60 01 cmp %g1, 1 200a0ac: 0a 80 00 07 bcs 200a0c8 <_Scheduler_priority_Tick+0x50> 200a0b0: 80 a0 60 02 cmp %g1, 2 200a0b4: 28 80 00 10 bleu,a 200a0f4 <_Scheduler_priority_Tick+0x7c> 200a0b8: c2 02 20 74 ld [ %o0 + 0x74 ], %g1 200a0bc: 80 a0 60 03 cmp %g1, 3 200a0c0: 22 80 00 04 be,a 200a0d0 <_Scheduler_priority_Tick+0x58> <== ALWAYS TAKEN 200a0c4: c2 02 20 74 ld [ %o0 + 0x74 ], %g1 200a0c8: 81 c7 e0 08 ret 200a0cc: 81 e8 00 00 restore } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 200a0d0: 82 00 7f ff add %g1, -1, %g1 200a0d4: 80 a0 60 00 cmp %g1, 0 200a0d8: 12 bf ff fc bne 200a0c8 <_Scheduler_priority_Tick+0x50> 200a0dc: c2 22 20 74 st %g1, [ %o0 + 0x74 ] (*executing->budget_callout)( executing ); 200a0e0: c2 02 20 7c ld [ %o0 + 0x7c ], %g1 200a0e4: 9f c0 40 00 call %g1 200a0e8: 01 00 00 00 nop 200a0ec: 81 c7 e0 08 ret 200a0f0: 81 e8 00 00 restore case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 200a0f4: 82 00 7f ff add %g1, -1, %g1 200a0f8: 80 a0 60 00 cmp %g1, 0 200a0fc: 14 bf ff f3 bg 200a0c8 <_Scheduler_priority_Tick+0x50> 200a100: c2 22 20 74 st %g1, [ %o0 + 0x74 ] * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 200a104: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a108: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 201dd48 <_Scheduler+0xc> 200a10c: 9f c0 40 00 call %g1 200a110: d0 27 bf fc st %o0, [ %fp + -4 ] * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a114: 03 00 80 7a sethi %hi(0x201e800), %g1 200a118: d0 07 bf fc ld [ %fp + -4 ], %o0 200a11c: c2 00 61 94 ld [ %g1 + 0x194 ], %g1 200a120: c2 22 20 74 st %g1, [ %o0 + 0x74 ] 200a124: 81 c7 e0 08 ret 200a128: 81 e8 00 00 restore =============================================================================== 0200a8e4 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; 200a8e4: 03 00 80 7b sethi %hi(0x201ec00), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200a8e8: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 201ed1c <_Scheduler> */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 200a8ec: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 200a8f0: c2 00 40 00 ld [ %g1 ], %g1 200a8f4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200a8f8: 80 a0 80 03 cmp %g2, %g3 200a8fc: 3a 80 00 08 bcc,a 200a91c <_Scheduler_simple_Ready_queue_enqueue_first+0x38> 200a900: c2 00 60 04 ld [ %g1 + 4 ], %g1 * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { 200a904: c2 00 40 00 ld [ %g1 ], %g1 current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 200a908: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200a90c: 80 a0 80 03 cmp %g2, %g3 200a910: 2a bf ff fe bcs,a 200a908 <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN 200a914: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED current = (Thread_Control *)current->Object.Node.previous; 200a918: c2 00 60 04 ld [ %g1 + 4 ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 200a91c: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 200a920: c2 22 20 04 st %g1, [ %o0 + 4 ] before_node = after_node->next; after_node->next = the_node; 200a924: d0 20 40 00 st %o0, [ %g1 ] the_node->next = before_node; 200a928: c4 22 00 00 st %g2, [ %o0 ] } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 200a92c: 81 c3 e0 08 retl 200a930: d0 20 a0 04 st %o0, [ %g2 + 4 ] =============================================================================== 02008d34 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 2008d34: 9d e3 bf a0 save %sp, -96, %sp static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d38: 09 00 80 7a sethi %hi(0x201e800), %g4 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008d3c: 05 00 80 77 sethi %hi(0x201dc00), %g2 2008d40: d8 19 22 b0 ldd [ %g4 + 0x2b0 ], %o4 2008d44: c6 00 a0 5c ld [ %g2 + 0x5c ], %g3 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d48: 03 00 80 7a sethi %hi(0x201e800), %g1 2008d4c: f8 18 62 c0 ldd [ %g1 + 0x2c0 ], %i4 ! 201eac0 <_TOD_Now> 2008d50: 9f 28 e0 07 sll %g3, 7, %o7 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008d54: 37 00 80 7a sethi %hi(0x201e800), %i3 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008d58: 85 28 e0 02 sll %g3, 2, %g2 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008d5c: f4 06 e3 40 ld [ %i3 + 0x340 ], %i2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008d60: 84 23 c0 02 sub %o7, %g2, %g2 2008d64: 84 00 80 03 add %g2, %g3, %g2 2008d68: 85 28 a0 03 sll %g2, 3, %g2 2008d6c: 86 10 00 02 mov %g2, %g3 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d70: 9a 80 c0 0d addcc %g3, %o5, %o5 2008d74: 84 10 20 00 clr %g2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d78: 92 10 00 1d mov %i5, %o1 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d7c: 98 40 80 0c addx %g2, %o4, %o4 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008d80: ba 80 c0 1d addcc %g3, %i5, %i5 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008d84: b4 06 a0 01 inc %i2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d88: 94 10 20 00 clr %o2 2008d8c: f4 26 e3 40 st %i2, [ %i3 + 0x340 ] 2008d90: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d94: d8 39 22 b0 std %o4, [ %g4 + 0x2b0 ] Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008d98: b8 40 80 1c addx %g2, %i4, %i4 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d9c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 *_time += *_add; 2008da0: f8 38 62 c0 std %i4, [ %g1 + 0x2c0 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008da4: 40 00 43 61 call 2019b28 <__divdi3> 2008da8: 96 12 e2 00 or %o3, 0x200, %o3 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008dac: 94 10 20 00 clr %o2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008db0: b6 10 00 08 mov %o0, %i3 2008db4: b4 10 00 09 mov %o1, %i2 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008db8: 90 10 00 1c mov %i4, %o0 2008dbc: 92 10 00 1d mov %i5, %o1 2008dc0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2008dc4: 40 00 43 59 call 2019b28 <__divdi3> 2008dc8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 2008dcc: 80 a6 c0 08 cmp %i3, %o0 2008dd0: 02 80 00 05 be 2008de4 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN 2008dd4: 80 a6 80 09 cmp %i2, %o1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2008dd8: 31 00 80 7a sethi %hi(0x201e800), %i0 <== NOT EXECUTED 2008ddc: 40 00 0a b6 call 200b8b4 <_Watchdog_Tickle> 2008de0: 91 ee 22 e4 restore %i0, 0x2e4, %o0 2008de4: 12 bf ff fe bne 2008ddc <_TOD_Tickle_ticks+0xa8> 2008de8: 31 00 80 7a sethi %hi(0x201e800), %i0 2008dec: 81 c7 e0 08 ret 2008df0: 81 e8 00 00 restore =============================================================================== 020089e4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 20089e4: 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(); 20089e8: 03 00 80 80 sethi %hi(0x2020000), %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; 20089ec: 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) || 20089f0: 80 a6 20 00 cmp %i0, 0 20089f4: 02 80 00 2c be 2008aa4 <_TOD_Validate+0xc0> <== NEVER TAKEN 20089f8: d2 00 63 0c ld [ %g1 + 0x30c ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 20089fc: 11 00 03 d0 sethi %hi(0xf4000), %o0 2008a00: 40 00 4a f3 call 201b5cc <.udiv> 2008a04: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2008a08: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008a0c: 80 a2 00 01 cmp %o0, %g1 2008a10: 28 80 00 26 bleu,a 2008aa8 <_TOD_Validate+0xc4> 2008a14: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2008a18: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008a1c: 80 a0 60 3b cmp %g1, 0x3b 2008a20: 38 80 00 22 bgu,a 2008aa8 <_TOD_Validate+0xc4> 2008a24: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2008a28: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2008a2c: 80 a0 60 3b cmp %g1, 0x3b 2008a30: 38 80 00 1e bgu,a 2008aa8 <_TOD_Validate+0xc4> 2008a34: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2008a38: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008a3c: 80 a0 60 17 cmp %g1, 0x17 2008a40: 38 80 00 1a bgu,a 2008aa8 <_TOD_Validate+0xc4> 2008a44: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 2008a48: 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) || 2008a4c: 80 a0 60 00 cmp %g1, 0 2008a50: 02 80 00 15 be 2008aa4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008a54: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 2008a58: 38 80 00 14 bgu,a 2008aa8 <_TOD_Validate+0xc4> 2008a5c: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2008a60: c4 06 00 00 ld [ %i0 ], %g2 (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) || 2008a64: 80 a0 a7 c3 cmp %g2, 0x7c3 2008a68: 28 80 00 10 bleu,a 2008aa8 <_TOD_Validate+0xc4> 2008a6c: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 2008a70: c6 06 20 08 ld [ %i0 + 8 ], %g3 (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) || 2008a74: 80 a0 e0 00 cmp %g3, 0 2008a78: 02 80 00 0b be 2008aa4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008a7c: 80 88 a0 03 btst 3, %g2 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008a80: 32 80 00 0c bne,a 2008ab0 <_TOD_Validate+0xcc> 2008a84: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2008a88: 82 00 60 0d add %g1, 0xd, %g1 2008a8c: 05 00 80 7b sethi %hi(0x201ec00), %g2 2008a90: 83 28 60 02 sll %g1, 2, %g1 2008a94: 84 10 a1 48 or %g2, 0x148, %g2 2008a98: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2008a9c: 80 a0 40 03 cmp %g1, %g3 2008aa0: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 2008aa4: b0 0f 60 01 and %i5, 1, %i0 2008aa8: 81 c7 e0 08 ret 2008aac: 81 e8 00 00 restore return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2008ab0: 05 00 80 7b sethi %hi(0x201ec00), %g2 2008ab4: 84 10 a1 48 or %g2, 0x148, %g2 ! 201ed48 <_TOD_Days_per_month> 2008ab8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2008abc: 80 a0 40 03 cmp %g1, %g3 2008ac0: 10 bf ff f9 b 2008aa4 <_TOD_Validate+0xc0> 2008ac4: ba 60 3f ff subx %g0, -1, %i5 =============================================================================== 0200a350 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 200a350: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 200a354: 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 ); 200a358: 40 00 03 ad call 200b20c <_Thread_Set_transient> 200a35c: 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 ) 200a360: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a364: 80 a0 40 19 cmp %g1, %i1 200a368: 02 80 00 05 be 200a37c <_Thread_Change_priority+0x2c> 200a36c: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 200a370: 90 10 00 18 mov %i0, %o0 200a374: 40 00 03 8c call 200b1a4 <_Thread_Set_priority> 200a378: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 200a37c: 7f ff e0 cf call 20026b8 200a380: 01 00 00 00 nop 200a384: b2 10 00 08 mov %o0, %i1 /* * 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; 200a388: f6 07 60 10 ld [ %i5 + 0x10 ], %i3 if ( state != STATES_TRANSIENT ) { 200a38c: 80 a6 e0 04 cmp %i3, 4 200a390: 02 80 00 18 be 200a3f0 <_Thread_Change_priority+0xa0> 200a394: 80 8f 20 04 btst 4, %i4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 200a398: 02 80 00 0b be 200a3c4 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 200a39c: 82 0e ff fb and %i3, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 200a3a0: 7f ff e0 ca call 20026c8 <== NOT EXECUTED 200a3a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 200a3a8: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 200a3ac: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 200a3b0: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED 200a3b4: 32 80 00 0d bne,a 200a3e8 <_Thread_Change_priority+0x98> <== NOT EXECUTED 200a3b8: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED 200a3bc: 81 c7 e0 08 ret 200a3c0: 81 e8 00 00 restore */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 200a3c4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 200a3c8: 7f ff e0 c0 call 20026c8 200a3cc: 90 10 00 19 mov %i1, %o0 200a3d0: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a3d4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200a3d8: 80 8e c0 01 btst %i3, %g1 200a3dc: 02 bf ff f8 be 200a3bc <_Thread_Change_priority+0x6c> 200a3e0: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 200a3e4: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 200a3e8: 40 00 03 3e call 200b0e0 <_Thread_queue_Requeue> 200a3ec: 93 e8 00 1d restore %g0, %i5, %o1 200a3f0: 39 00 80 77 sethi %hi(0x201dc00), %i4 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 200a3f4: 12 80 00 08 bne 200a414 <_Thread_Change_priority+0xc4> <== NEVER TAKEN 200a3f8: b8 17 21 3c or %i4, 0x13c, %i4 ! 201dd3c <_Scheduler> * 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 ); if ( prepend_it ) 200a3fc: 80 a6 a0 00 cmp %i2, 0 200a400: 02 80 00 1b be 200a46c <_Thread_Change_priority+0x11c> 200a404: c0 27 60 10 clr [ %i5 + 0x10 ] */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 200a408: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 200a40c: 9f c0 40 00 call %g1 200a410: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 200a414: 7f ff e0 ad call 20026c8 200a418: 90 10 00 19 mov %i1, %o0 200a41c: 7f ff e0 a7 call 20026b8 200a420: 01 00 00 00 nop 200a424: 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(); 200a428: c2 07 20 08 ld [ %i4 + 8 ], %g1 200a42c: 9f c0 40 00 call %g1 200a430: 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 ); 200a434: 03 00 80 7b sethi %hi(0x201ec00), %g1 200a438: 82 10 63 70 or %g1, 0x370, %g1 ! 201ef70 <_Per_CPU_Information> 200a43c: 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() && 200a440: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200a444: 80 a0 80 03 cmp %g2, %g3 200a448: 02 80 00 07 be 200a464 <_Thread_Change_priority+0x114> 200a44c: 01 00 00 00 nop 200a450: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 200a454: 80 a0 a0 00 cmp %g2, 0 200a458: 02 80 00 03 be 200a464 <_Thread_Change_priority+0x114> 200a45c: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 200a460: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 200a464: 7f ff e0 99 call 20026c8 200a468: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 200a46c: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200a470: 9f c0 40 00 call %g1 200a474: 90 10 00 1d mov %i5, %o0 200a478: 30 bf ff e7 b,a 200a414 <_Thread_Change_priority+0xc4> =============================================================================== 0200a694 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a694: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a698: 90 10 00 18 mov %i0, %o0 200a69c: 40 00 00 77 call 200a878 <_Thread_Get> 200a6a0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a6a4: c2 07 bf fc ld [ %fp + -4 ], %g1 200a6a8: 80 a0 60 00 cmp %g1, 0 200a6ac: 12 80 00 09 bne 200a6d0 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 200a6b0: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 200a6b4: 7f ff ff 72 call 200a47c <_Thread_Clear_state> 200a6b8: 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--; 200a6bc: 03 00 80 7a sethi %hi(0x201e800), %g1 200a6c0: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201ea30 <_Thread_Dispatch_disable_level> 200a6c4: 84 00 bf ff add %g2, -1, %g2 200a6c8: c4 20 62 30 st %g2, [ %g1 + 0x230 ] return _Thread_Dispatch_disable_level; 200a6cc: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 200a6d0: 81 c7 e0 08 ret 200a6d4: 81 e8 00 00 restore =============================================================================== 0200a6d8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 200a6d8: 9d e3 bf 98 save %sp, -104, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200a6dc: 31 00 80 7a sethi %hi(0x201e800), %i0 200a6e0: c2 06 22 30 ld [ %i0 + 0x230 ], %g1 ! 201ea30 <_Thread_Dispatch_disable_level> 200a6e4: 82 00 60 01 inc %g1 200a6e8: c2 26 22 30 st %g1, [ %i0 + 0x230 ] return _Thread_Dispatch_disable_level; 200a6ec: c2 06 22 30 ld [ %i0 + 0x230 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 200a6f0: 39 00 80 7b sethi %hi(0x201ec00), %i4 200a6f4: b8 17 23 70 or %i4, 0x370, %i4 ! 201ef70 <_Per_CPU_Information> _ISR_Disable( level ); 200a6f8: 7f ff df f0 call 20026b8 200a6fc: fa 07 20 0c ld [ %i4 + 0xc ], %i5 while ( _Thread_Dispatch_necessary == true ) { 200a700: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 200a704: 80 a0 60 00 cmp %g1, 0 200a708: 02 80 00 45 be 200a81c <_Thread_Dispatch+0x144> 200a70c: 01 00 00 00 nop heir = _Thread_Heir; 200a710: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 200a714: c0 2f 20 18 clrb [ %i4 + 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 ) 200a718: 80 a7 40 1b cmp %i5, %i3 200a71c: 02 80 00 40 be 200a81c <_Thread_Dispatch+0x144> 200a720: f6 27 20 0c st %i3, [ %i4 + 0xc ] 200a724: 33 00 80 7a sethi %hi(0x201e800), %i1 #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; 200a728: 21 00 80 7a sethi %hi(0x201e800), %l0 200a72c: b2 16 62 bc or %i1, 0x2bc, %i1 #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 ); 200a730: 10 80 00 35 b 200a804 <_Thread_Dispatch+0x12c> 200a734: 35 00 80 7a sethi %hi(0x201e800), %i2 _ISR_Enable( level ); 200a738: 7f ff df e4 call 20026c8 200a73c: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 200a740: 40 00 0e 45 call 200e054 <_TOD_Get_uptime> 200a744: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a748: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a74c: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2 _Timestamp_Subtract( 200a750: d8 1f bf f8 ldd [ %fp + -8 ], %o4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a754: c2 06 40 00 ld [ %i1 ], %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a758: 86 a3 40 03 subcc %o5, %g3, %g3 200a75c: 84 63 00 02 subx %o4, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a760: 86 82 c0 03 addcc %o3, %g3, %g3 200a764: 84 42 80 02 addx %o2, %g2, %g2 200a768: c4 3f 60 80 std %g2, [ %i5 + 0x80 ] 200a76c: 80 a0 60 00 cmp %g1, 0 200a770: 02 80 00 06 be 200a788 <_Thread_Dispatch+0xb0> <== NEVER TAKEN 200a774: d8 3f 20 20 std %o4, [ %i4 + 0x20 ] executing->libc_reent = *_Thread_libc_reent; 200a778: c4 00 40 00 ld [ %g1 ], %g2 200a77c: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 200a780: c4 06 e1 54 ld [ %i3 + 0x154 ], %g2 200a784: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 200a788: 90 10 00 1d mov %i5, %o0 200a78c: 40 00 03 a0 call 200b60c <_User_extensions_Thread_switch> 200a790: 92 10 00 1b mov %i3, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 200a794: 90 07 60 c8 add %i5, 0xc8, %o0 200a798: 40 00 04 ea call 200bb40 <_CPU_Context_switch> 200a79c: 92 06 e0 c8 add %i3, 0xc8, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200a7a0: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200a7a4: 80 a0 60 00 cmp %g1, 0 200a7a8: 02 80 00 0c be 200a7d8 <_Thread_Dispatch+0x100> 200a7ac: d0 06 a2 b8 ld [ %i2 + 0x2b8 ], %o0 200a7b0: 80 a7 40 08 cmp %i5, %o0 200a7b4: 02 80 00 09 be 200a7d8 <_Thread_Dispatch+0x100> 200a7b8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200a7bc: 02 80 00 04 be 200a7cc <_Thread_Dispatch+0xf4> 200a7c0: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200a7c4: 40 00 04 a5 call 200ba58 <_CPU_Context_save_fp> 200a7c8: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 200a7cc: 40 00 04 c0 call 200bacc <_CPU_Context_restore_fp> 200a7d0: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 200a7d4: fa 26 a2 b8 st %i5, [ %i2 + 0x2b8 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 200a7d8: 7f ff df b8 call 20026b8 200a7dc: fa 07 20 0c ld [ %i4 + 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 ) { 200a7e0: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 200a7e4: 80 a0 60 00 cmp %g1, 0 200a7e8: 02 80 00 0d be 200a81c <_Thread_Dispatch+0x144> 200a7ec: 01 00 00 00 nop heir = _Thread_Heir; 200a7f0: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 200a7f4: c0 2f 20 18 clrb [ %i4 + 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 ) 200a7f8: 80 a6 c0 1d cmp %i3, %i5 200a7fc: 02 80 00 08 be 200a81c <_Thread_Dispatch+0x144> <== NEVER TAKEN 200a800: f6 27 20 0c st %i3, [ %i4 + 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 ) 200a804: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1 200a808: 80 a0 60 01 cmp %g1, 1 200a80c: 12 bf ff cb bne 200a738 <_Thread_Dispatch+0x60> 200a810: c2 04 21 94 ld [ %l0 + 0x194 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a814: 10 bf ff c9 b 200a738 <_Thread_Dispatch+0x60> 200a818: c2 26 e0 74 st %g1, [ %i3 + 0x74 ] _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 200a81c: 7f ff df ab call 20026c8 200a820: 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--; 200a824: c2 06 22 30 ld [ %i0 + 0x230 ], %g1 200a828: 82 00 7f ff add %g1, -1, %g1 200a82c: c2 26 22 30 st %g1, [ %i0 + 0x230 ] return _Thread_Dispatch_disable_level; 200a830: c2 06 22 30 ld [ %i0 + 0x230 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 200a834: 7f ff f7 a2 call 20086bc <_API_extensions_Run_postswitch> 200a838: 01 00 00 00 nop } 200a83c: 81 c7 e0 08 ret 200a840: 81 e8 00 00 restore =============================================================================== 020103c0 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 20103c0: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 20103c4: 03 00 80 7b sethi %hi(0x201ec00), %g1 20103c8: fa 00 63 7c ld [ %g1 + 0x37c ], %i5 ! 201ef7c <_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(); 20103cc: 3f 00 80 40 sethi %hi(0x2010000), %i7 20103d0: be 17 e3 c0 or %i7, 0x3c0, %i7 ! 20103c0 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 20103d4: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 20103d8: 7f ff c8 bc call 20026c8 20103dc: 91 2a 20 08 sll %o0, 8, %o0 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 20103e0: c4 07 61 50 ld [ %i5 + 0x150 ], %g2 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 20103e4: 03 00 80 79 sethi %hi(0x201e400), %g1 doneConstructors = true; 20103e8: 86 10 20 01 mov 1, %g3 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 20103ec: f6 08 62 58 ldub [ %g1 + 0x258 ], %i3 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 20103f0: 80 a0 a0 00 cmp %g2, 0 20103f4: 02 80 00 0c be 2010424 <_Thread_Handler+0x64> 20103f8: c6 28 62 58 stb %g3, [ %g1 + 0x258 ] #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 ); 20103fc: 39 00 80 7a sethi %hi(0x201e800), %i4 2010400: d0 07 22 b8 ld [ %i4 + 0x2b8 ], %o0 ! 201eab8 <_Thread_Allocated_fp> 2010404: 80 a7 40 08 cmp %i5, %o0 2010408: 02 80 00 07 be 2010424 <_Thread_Handler+0x64> 201040c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2010410: 22 80 00 05 be,a 2010424 <_Thread_Handler+0x64> 2010414: fa 27 22 b8 st %i5, [ %i4 + 0x2b8 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2010418: 7f ff ed 90 call 200ba58 <_CPU_Context_save_fp> 201041c: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 2010420: fa 27 22 b8 st %i5, [ %i4 + 0x2b8 ] /* * 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 ); 2010424: 7f ff eb f8 call 200b404 <_User_extensions_Thread_begin> 2010428: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 201042c: 7f ff e9 06 call 200a844 <_Thread_Enable_dispatch> 2010430: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { 2010434: 80 8e e0 ff btst 0xff, %i3 2010438: 02 80 00 0e be 2010470 <_Thread_Handler+0xb0> 201043c: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 2010440: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 2010444: 80 a0 60 00 cmp %g1, 0 2010448: 02 80 00 0e be 2010480 <_Thread_Handler+0xc0> 201044c: 80 a0 60 01 cmp %g1, 1 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 2010450: 22 80 00 11 be,a 2010494 <_Thread_Handler+0xd4> <== ALWAYS TAKEN 2010454: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 * 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 ); 2010458: 7f ff eb ff call 200b454 <_User_extensions_Thread_exitted> 201045c: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 2010460: 90 10 20 00 clr %o0 2010464: 92 10 20 01 mov 1, %o1 2010468: 7f ff e3 70 call 2009228 <_Internal_error_Occurred> 201046c: 94 10 20 05 mov 5, %o2 * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); 2010470: 40 00 35 e8 call 201dc10 <_init> 2010474: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 2010478: 10 bf ff f3 b 2010444 <_Thread_Handler+0x84> 201047c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 2010480: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 2010484: 9f c0 40 00 call %g1 2010488: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 201048c: 10 bf ff f3 b 2010458 <_Thread_Handler+0x98> 2010490: d0 27 60 28 st %o0, [ %i5 + 0x28 ] ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 2010494: 9f c0 40 00 call %g1 2010498: d0 07 60 94 ld [ %i5 + 0x94 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 201049c: 10 bf ff ef b 2010458 <_Thread_Handler+0x98> 20104a0: d0 27 60 28 st %o0, [ %i5 + 0x28 ] =============================================================================== 0200ab30 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 200ab30: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200ab34: 05 00 80 77 sethi %hi(0x201dc00), %g2 200ab38: 84 10 a0 4c or %g2, 0x4c, %g2 ! 201dc4c #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200ab3c: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 * Output parameters: NONE */ void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200ab40: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200ab44: f8 00 a0 0c ld [ %g2 + 0xc ], %i4 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200ab48: 80 a0 e0 00 cmp %g3, 0 200ab4c: 02 80 00 21 be 200abd0 <_Thread_Handler_initialization+0xa0> 200ab50: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200ab54: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 200ab58: 80 a0 e0 00 cmp %g3, 0 200ab5c: 02 80 00 1d be 200abd0 <_Thread_Handler_initialization+0xa0><== NEVER TAKEN 200ab60: 80 a0 60 00 cmp %g1, 0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200ab64: 22 80 00 05 be,a 200ab78 <_Thread_Handler_initialization+0x48> 200ab68: 03 00 80 7b sethi %hi(0x201ec00), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200ab6c: 9f c0 40 00 call %g1 200ab70: d0 00 a0 08 ld [ %g2 + 8 ], %o0 _Thread_Dispatch_necessary = false; 200ab74: 03 00 80 7b sethi %hi(0x201ec00), %g1 200ab78: 82 10 63 70 or %g1, 0x370, %g1 ! 201ef70 <_Per_CPU_Information> 200ab7c: c0 28 60 18 clrb [ %g1 + 0x18 ] _Thread_Executing = NULL; 200ab80: c0 20 60 0c clr [ %g1 + 0xc ] _Thread_Heir = NULL; 200ab84: c0 20 60 10 clr [ %g1 + 0x10 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200ab88: 03 00 80 7a sethi %hi(0x201e800), %g1 200ab8c: c0 20 62 b8 clr [ %g1 + 0x2b8 ] ! 201eab8 <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200ab90: 03 00 80 7a sethi %hi(0x201e800), %g1 200ab94: f8 20 62 c8 st %i4, [ %g1 + 0x2c8 ] ! 201eac8 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200ab98: 03 00 80 7a sethi %hi(0x201e800), %g1 200ab9c: fa 20 61 94 st %i5, [ %g1 + 0x194 ] ! 201e994 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200aba0: 82 10 20 08 mov 8, %g1 200aba4: 11 00 80 7a sethi %hi(0x201e800), %o0 200aba8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200abac: 90 12 23 48 or %o0, 0x348, %o0 200abb0: 92 10 20 01 mov 1, %o1 200abb4: 94 10 20 01 mov 1, %o2 200abb8: 96 10 20 01 mov 1, %o3 200abbc: 98 10 21 68 mov 0x168, %o4 200abc0: 7f ff fb 30 call 2009880 <_Objects_Initialize_information> 200abc4: 9a 10 20 00 clr %o5 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 200abc8: 81 c7 e0 08 ret 200abcc: 81 e8 00 00 restore _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200abd0: 90 10 20 00 clr %o0 200abd4: 92 10 20 01 mov 1, %o1 200abd8: 7f ff f9 94 call 2009228 <_Internal_error_Occurred> 200abdc: 94 10 20 0e mov 0xe, %o2 =============================================================================== 0200a928 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a928: 9d e3 bf a0 save %sp, -96, %sp 200a92c: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 200a930: c0 26 61 58 clr [ %i1 + 0x158 ] 200a934: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a938: c0 26 61 54 clr [ %i1 + 0x154 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a93c: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 200a940: e4 00 40 00 ld [ %g1 ], %l2 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 200a944: 80 a6 a0 00 cmp %i2, 0 200a948: 02 80 00 6b be 200aaf4 <_Thread_Initialize+0x1cc> 200a94c: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 200a950: c0 2e 60 b0 clrb [ %i1 + 0xb0 ] 200a954: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a958: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ] the_stack->size = size; 200a95c: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200a960: 80 a7 20 00 cmp %i4, 0 200a964: 12 80 00 48 bne 200aa84 <_Thread_Initialize+0x15c> 200a968: b6 10 20 00 clr %i3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a96c: 39 00 80 7a sethi %hi(0x201e800), %i4 200a970: c2 07 22 c8 ld [ %i4 + 0x2c8 ], %g1 ! 201eac8 <_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; 200a974: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 200a978: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a97c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a980: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a984: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a988: 80 a0 60 00 cmp %g1, 0 200a98c: 12 80 00 46 bne 200aaa4 <_Thread_Initialize+0x17c> 200a990: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200a994: c0 26 61 60 clr [ %i1 + 0x160 ] * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 200a998: b4 10 20 00 clr %i2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a99c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a9a0: e2 2e 60 9c stb %l1, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 200a9a4: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 200a9a8: 80 a4 20 02 cmp %l0, 2 200a9ac: 12 80 00 05 bne 200a9c0 <_Thread_Initialize+0x98> 200a9b0: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a9b4: 03 00 80 7a sethi %hi(0x201e800), %g1 200a9b8: c2 00 61 94 ld [ %g1 + 0x194 ], %g1 ! 201e994 <_Thread_Ticks_per_timeslice> 200a9bc: c2 26 60 74 st %g1, [ %i1 + 0x74 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a9c0: c4 07 a0 68 ld [ %fp + 0x68 ], %g2 */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a9c4: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a9c8: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201dd54 <_Scheduler+0x18> 200a9cc: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 200a9d0: 84 10 20 01 mov 1, %g2 the_thread->Wait.queue = NULL; 200a9d4: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 200a9d8: c4 26 60 10 st %g2, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 200a9dc: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 200a9e0: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a9e4: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a9e8: 9f c0 40 00 call %g1 200a9ec: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a9f0: b8 92 20 00 orcc %o0, 0, %i4 200a9f4: 22 80 00 13 be,a 200aa40 <_Thread_Initialize+0x118> 200a9f8: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 200a9fc: 90 10 00 19 mov %i1, %o0 200aa00: 40 00 01 e9 call 200b1a4 <_Thread_Set_priority> 200aa04: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200aa08: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200aa0c: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200aa10: c0 26 60 80 clr [ %i1 + 0x80 ] 200aa14: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200aa18: 83 28 60 02 sll %g1, 2, %g1 200aa1c: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200aa20: e4 26 60 0c st %l2, [ %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 ); 200aa24: 90 10 00 19 mov %i1, %o0 200aa28: 40 00 02 b2 call 200b4f0 <_User_extensions_Thread_create> 200aa2c: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200aa30: 80 8a 20 ff btst 0xff, %o0 200aa34: 32 80 00 12 bne,a 200aa7c <_Thread_Initialize+0x154> 200aa38: b0 0e 20 01 and %i0, 1, %i0 return true; failed: _Workspace_Free( the_thread->libc_reent ); 200aa3c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 200aa40: 40 00 03 f1 call 200ba04 <_Workspace_Free> 200aa44: b0 10 20 00 clr %i0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200aa48: 40 00 03 ef call 200ba04 <_Workspace_Free> 200aa4c: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 200aa50: 40 00 03 ed call 200ba04 <_Workspace_Free> 200aa54: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 200aa58: 40 00 03 eb call 200ba04 <_Workspace_Free> 200aa5c: 90 10 00 1a mov %i2, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200aa60: 40 00 03 e9 call 200ba04 <_Workspace_Free> 200aa64: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200aa68: 40 00 03 e7 call 200ba04 <_Workspace_Free> 200aa6c: 90 10 00 1c mov %i4, %o0 _Thread_Stack_Free( the_thread ); 200aa70: 40 00 02 07 call 200b28c <_Thread_Stack_Free> 200aa74: 90 10 00 19 mov %i1, %o0 return false; } 200aa78: b0 0e 20 01 and %i0, 1, %i0 200aa7c: 81 c7 e0 08 ret 200aa80: 81 e8 00 00 restore /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200aa84: 40 00 03 d8 call 200b9e4 <_Workspace_Allocate> 200aa88: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200aa8c: b6 92 20 00 orcc %o0, 0, %i3 200aa90: 32 bf ff b8 bne,a 200a970 <_Thread_Initialize+0x48> 200aa94: 39 00 80 7a sethi %hi(0x201e800), %i4 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 200aa98: b4 10 20 00 clr %i2 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; 200aa9c: 10 bf ff e8 b 200aa3c <_Thread_Initialize+0x114> 200aaa0: b8 10 20 00 clr %i4 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 200aaa4: 82 00 60 01 inc %g1 200aaa8: 40 00 03 cf call 200b9e4 <_Workspace_Allocate> 200aaac: 91 28 60 02 sll %g1, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200aab0: b4 92 20 00 orcc %o0, 0, %i2 200aab4: 02 80 00 1d be 200ab28 <_Thread_Initialize+0x200> 200aab8: 86 10 00 1a mov %i2, %g3 goto failed; } the_thread->extensions = (void **) extensions_area; 200aabc: f4 26 61 60 st %i2, [ %i1 + 0x160 ] 200aac0: c8 07 22 c8 ld [ %i4 + 0x2c8 ], %g4 * 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++ ) 200aac4: 84 10 20 00 clr %g2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200aac8: 10 80 00 03 b 200aad4 <_Thread_Initialize+0x1ac> 200aacc: 82 10 20 00 clr %g1 200aad0: c6 06 61 60 ld [ %i1 + 0x160 ], %g3 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 200aad4: 85 28 a0 02 sll %g2, 2, %g2 200aad8: c0 20 c0 02 clr [ %g3 + %g2 ] * 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++ ) 200aadc: 82 00 60 01 inc %g1 200aae0: 80 a0 40 04 cmp %g1, %g4 200aae4: 08 bf ff fb bleu 200aad0 <_Thread_Initialize+0x1a8> 200aae8: 84 10 00 01 mov %g1, %g2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200aaec: 10 bf ff ad b 200a9a0 <_Thread_Initialize+0x78> 200aaf0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200aaf4: 90 10 00 19 mov %i1, %o0 200aaf8: 40 00 01 d4 call 200b248 <_Thread_Stack_Allocate> 200aafc: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200ab00: 80 a2 00 1b cmp %o0, %i3 200ab04: 0a 80 00 07 bcs 200ab20 <_Thread_Initialize+0x1f8> 200ab08: 80 a2 20 00 cmp %o0, 0 200ab0c: 02 80 00 05 be 200ab20 <_Thread_Initialize+0x1f8> <== NEVER TAKEN 200ab10: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 200ab14: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2 the_thread->Start.core_allocated_stack = true; 200ab18: 10 bf ff 90 b 200a958 <_Thread_Initialize+0x30> 200ab1c: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ] stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 200ab20: 10 bf ff d6 b 200aa78 <_Thread_Initialize+0x150> 200ab24: b0 10 20 00 clr %i0 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; 200ab28: 10 bf ff c5 b 200aa3c <_Thread_Initialize+0x114> 200ab2c: b8 10 20 00 clr %i4 =============================================================================== 0200b28c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200b28c: 9d e3 bf a0 save %sp, -96, %sp #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200b290: c2 0e 20 b0 ldub [ %i0 + 0xb0 ], %g1 200b294: 80 a0 60 00 cmp %g1, 0 void _Thread_Stack_Free( Thread_Control *the_thread ) { rtems_stack_free_hook stack_free_hook = 200b298: 03 00 80 77 sethi %hi(0x201dc00), %g1 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200b29c: 02 80 00 04 be 200b2ac <_Thread_Stack_Free+0x20> <== NEVER TAKEN 200b2a0: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201dc78 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 200b2a4: 9f c0 40 00 call %g1 200b2a8: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0 200b2ac: 81 c7 e0 08 ret 200b2b0: 81 e8 00 00 restore =============================================================================== 0200b0e0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200b0e0: 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 ) 200b0e4: 80 a6 20 00 cmp %i0, 0 200b0e8: 02 80 00 13 be 200b134 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 200b0ec: 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 ) { 200b0f0: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200b0f4: 80 a7 20 01 cmp %i4, 1 200b0f8: 02 80 00 04 be 200b108 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 200b0fc: 01 00 00 00 nop 200b100: 81 c7 e0 08 ret <== NOT EXECUTED 200b104: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200b108: 7f ff dd 6c call 20026b8 200b10c: 01 00 00 00 nop 200b110: ba 10 00 08 mov %o0, %i5 200b114: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200b118: 03 00 00 ef sethi %hi(0x3bc00), %g1 200b11c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200b120: 80 88 80 01 btst %g2, %g1 200b124: 12 80 00 06 bne 200b13c <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 200b128: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 200b12c: 7f ff dd 67 call 20026c8 200b130: 90 10 00 1d mov %i5, %o0 200b134: 81 c7 e0 08 ret 200b138: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200b13c: 92 10 00 19 mov %i1, %o1 200b140: 94 10 20 01 mov 1, %o2 200b144: 40 00 0d a8 call 200e7e4 <_Thread_queue_Extract_priority_helper> 200b148: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200b14c: 90 10 00 18 mov %i0, %o0 200b150: 92 10 00 19 mov %i1, %o1 200b154: 7f ff ff 35 call 200ae28 <_Thread_queue_Enqueue_priority> 200b158: 94 07 bf fc add %fp, -4, %o2 200b15c: 30 bf ff f4 b,a 200b12c <_Thread_queue_Requeue+0x4c> =============================================================================== 0200b160 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200b160: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200b164: 90 10 00 18 mov %i0, %o0 200b168: 7f ff fd c4 call 200a878 <_Thread_Get> 200b16c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b170: c2 07 bf fc ld [ %fp + -4 ], %g1 200b174: 80 a0 60 00 cmp %g1, 0 200b178: 12 80 00 09 bne 200b19c <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200b17c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200b180: 40 00 0d d2 call 200e8c8 <_Thread_queue_Process_timeout> 200b184: 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--; 200b188: 03 00 80 7a sethi %hi(0x201e800), %g1 200b18c: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201ea30 <_Thread_Dispatch_disable_level> 200b190: 84 00 bf ff add %g2, -1, %g2 200b194: c4 20 62 30 st %g2, [ %g1 + 0x230 ] return _Thread_Dispatch_disable_level; 200b198: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 200b19c: 81 c7 e0 08 ret 200b1a0: 81 e8 00 00 restore =============================================================================== 02017c1c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2017c1c: 9d e3 bf 88 save %sp, -120, %sp 2017c20: 21 00 80 f2 sethi %hi(0x203c800), %l0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017c24: a4 07 bf e8 add %fp, -24, %l2 2017c28: b4 07 bf ec add %fp, -20, %i2 2017c2c: b8 07 bf f4 add %fp, -12, %i4 2017c30: a2 07 bf f8 add %fp, -8, %l1 2017c34: 33 00 80 f2 sethi %hi(0x203c800), %i1 2017c38: 27 00 80 f2 sethi %hi(0x203c800), %l3 2017c3c: f4 27 bf e8 st %i2, [ %fp + -24 ] head->previous = NULL; 2017c40: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2017c44: e4 27 bf f0 st %l2, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017c48: e2 27 bf f4 st %l1, [ %fp + -12 ] head->previous = NULL; 2017c4c: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2017c50: f8 27 bf fc st %i4, [ %fp + -4 ] 2017c54: a0 14 23 80 or %l0, 0x380, %l0 2017c58: ba 06 20 30 add %i0, 0x30, %i5 2017c5c: b2 16 63 00 or %i1, 0x300, %i1 2017c60: b6 06 20 68 add %i0, 0x68, %i3 2017c64: a6 14 e2 70 or %l3, 0x270, %l3 2017c68: ac 06 20 08 add %i0, 8, %l6 2017c6c: aa 06 20 40 add %i0, 0x40, %l5 _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; 2017c70: a8 10 20 01 mov 1, %l4 { /* * 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; 2017c74: e4 26 20 78 st %l2, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2017c78: c2 04 00 00 ld [ %l0 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2017c7c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017c80: 90 10 00 1d mov %i5, %o0 2017c84: 92 20 40 09 sub %g1, %o1, %o1 2017c88: 94 10 00 1c mov %i4, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017c8c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017c90: 40 00 13 07 call 201c8ac <_Watchdog_Adjust_to_chain> 2017c94: 01 00 00 00 nop 2017c98: d0 1e 40 00 ldd [ %i1 ], %o0 2017c9c: 94 10 20 00 clr %o2 2017ca0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2017ca4: 40 00 52 0d call 202c4d8 <__divdi3> 2017ca8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2017cac: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 /* * 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 ) { 2017cb0: 80 a2 40 0a cmp %o1, %o2 2017cb4: 18 80 00 2b bgu 2017d60 <_Timer_server_Body+0x144> 2017cb8: ae 10 00 09 mov %o1, %l7 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 2017cbc: 80 a2 40 0a cmp %o1, %o2 2017cc0: 0a 80 00 20 bcs 2017d40 <_Timer_server_Body+0x124> 2017cc4: 90 10 00 1b mov %i3, %o0 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2017cc8: ee 26 20 74 st %l7, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017ccc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017cd0: 40 00 03 1a call 2018938 <_Chain_Get> 2017cd4: 01 00 00 00 nop if ( timer == NULL ) { 2017cd8: 92 92 20 00 orcc %o0, 0, %o1 2017cdc: 02 80 00 10 be 2017d1c <_Timer_server_Body+0x100> 2017ce0: 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 ) { 2017ce4: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2017ce8: 80 a0 60 01 cmp %g1, 1 2017cec: 02 80 00 19 be 2017d50 <_Timer_server_Body+0x134> 2017cf0: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017cf4: 12 bf ff f6 bne 2017ccc <_Timer_server_Body+0xb0> <== NEVER TAKEN 2017cf8: 92 02 60 10 add %o1, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017cfc: 40 00 13 1d call 201c970 <_Watchdog_Insert> 2017d00: 90 10 00 1b mov %i3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017d04: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017d08: 40 00 03 0c call 2018938 <_Chain_Get> 2017d0c: 01 00 00 00 nop if ( timer == NULL ) { 2017d10: 92 92 20 00 orcc %o0, 0, %o1 2017d14: 32 bf ff f5 bne,a 2017ce8 <_Timer_server_Body+0xcc> <== NEVER TAKEN 2017d18: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 2017d1c: 7f ff dd a7 call 200f3b8 2017d20: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2017d24: c2 07 bf e8 ld [ %fp + -24 ], %g1 2017d28: 80 a0 40 1a cmp %g1, %i2 2017d2c: 02 80 00 12 be 2017d74 <_Timer_server_Body+0x158> <== ALWAYS TAKEN 2017d30: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2017d34: 7f ff dd a5 call 200f3c8 <== NOT EXECUTED 2017d38: 01 00 00 00 nop <== NOT EXECUTED 2017d3c: 30 bf ff cf b,a 2017c78 <_Timer_server_Body+0x5c> <== NOT EXECUTED /* * 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 ); 2017d40: 92 10 20 01 mov 1, %o1 ! 1 2017d44: 40 00 12 ab call 201c7f0 <_Watchdog_Adjust> 2017d48: 94 22 80 17 sub %o2, %l7, %o2 2017d4c: 30 bf ff df b,a 2017cc8 <_Timer_server_Body+0xac> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017d50: 90 10 00 1d mov %i5, %o0 2017d54: 40 00 13 07 call 201c970 <_Watchdog_Insert> 2017d58: 92 02 60 10 add %o1, 0x10, %o1 2017d5c: 30 bf ff dc b,a 2017ccc <_Timer_server_Body+0xb0> /* * 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 ); 2017d60: 92 22 40 0a sub %o1, %o2, %o1 2017d64: 90 10 00 1b mov %i3, %o0 2017d68: 40 00 12 d1 call 201c8ac <_Watchdog_Adjust_to_chain> 2017d6c: 94 10 00 1c mov %i4, %o2 2017d70: 30 bf ff d6 b,a 2017cc8 <_Timer_server_Body+0xac> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 2017d74: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2017d78: 7f ff dd 94 call 200f3c8 2017d7c: 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 ) ) { 2017d80: c2 07 bf f4 ld [ %fp + -12 ], %g1 2017d84: 80 a0 40 11 cmp %g1, %l1 2017d88: 12 80 00 0c bne 2017db8 <_Timer_server_Body+0x19c> 2017d8c: 01 00 00 00 nop 2017d90: 30 80 00 13 b,a 2017ddc <_Timer_server_Body+0x1c0> Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; new_first->previous = head; 2017d94: f8 20 60 04 st %i4, [ %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; 2017d98: c2 27 bf f4 st %g1, [ %fp + -12 ] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 2017d9c: c0 25 e0 08 clr [ %l7 + 8 ] _ISR_Enable( level ); 2017da0: 7f ff dd 8a call 200f3c8 2017da4: 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 ); 2017da8: d0 05 e0 20 ld [ %l7 + 0x20 ], %o0 2017dac: c2 05 e0 1c ld [ %l7 + 0x1c ], %g1 2017db0: 9f c0 40 00 call %g1 2017db4: d2 05 e0 24 ld [ %l7 + 0x24 ], %o1 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2017db8: 7f ff dd 80 call 200f3b8 2017dbc: 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; 2017dc0: ee 07 bf f4 ld [ %fp + -12 ], %l7 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2017dc4: 80 a5 c0 11 cmp %l7, %l1 2017dc8: 32 bf ff f3 bne,a 2017d94 <_Timer_server_Body+0x178> 2017dcc: c2 05 c0 00 ld [ %l7 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 2017dd0: 7f ff dd 7e call 200f3c8 2017dd4: 01 00 00 00 nop 2017dd8: 30 bf ff a7 b,a 2017c74 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017ddc: c0 2e 20 7c clrb [ %i0 + 0x7c ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2017de0: c2 04 c0 00 ld [ %l3 ], %g1 2017de4: 82 00 60 01 inc %g1 2017de8: c2 24 c0 00 st %g1, [ %l3 ] return _Thread_Dispatch_disable_level; 2017dec: c2 04 c0 00 ld [ %l3 ], %g1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2017df0: d0 06 00 00 ld [ %i0 ], %o0 2017df4: 40 00 11 46 call 201c30c <_Thread_Set_state> 2017df8: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017dfc: 7f ff ff 60 call 2017b7c <_Timer_server_Reset_interval_system_watchdog> 2017e00: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017e04: 7f ff ff 72 call 2017bcc <_Timer_server_Reset_tod_system_watchdog> 2017e08: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017e0c: 40 00 0e bc call 201b8fc <_Thread_Enable_dispatch> 2017e10: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017e14: 90 10 00 16 mov %l6, %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; 2017e18: e8 2e 20 7c stb %l4, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017e1c: 40 00 13 37 call 201caf8 <_Watchdog_Remove> 2017e20: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017e24: 40 00 13 35 call 201caf8 <_Watchdog_Remove> 2017e28: 90 10 00 15 mov %l5, %o0 2017e2c: 30 bf ff 92 b,a 2017c74 <_Timer_server_Body+0x58> =============================================================================== 02017e30 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2017e30: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2017e34: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2017e38: 80 a0 60 00 cmp %g1, 0 2017e3c: 02 80 00 05 be 2017e50 <_Timer_server_Schedule_operation_method+0x20> 2017e40: ba 10 00 19 mov %i1, %i5 * 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 ); 2017e44: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2017e48: 40 00 02 b1 call 201890c <_Chain_Append> 2017e4c: 81 e8 00 00 restore * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2017e50: 03 00 80 f2 sethi %hi(0x203c800), %g1 2017e54: c4 00 62 70 ld [ %g1 + 0x270 ], %g2 ! 203ca70 <_Thread_Dispatch_disable_level> 2017e58: 84 00 a0 01 inc %g2 2017e5c: c4 20 62 70 st %g2, [ %g1 + 0x270 ] return _Thread_Dispatch_disable_level; 2017e60: c2 00 62 70 ld [ %g1 + 0x270 ], %g1 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2017e64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2017e68: 80 a0 60 01 cmp %g1, 1 2017e6c: 02 80 00 2d be 2017f20 <_Timer_server_Schedule_operation_method+0xf0> 2017e70: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017e74: 02 80 00 04 be 2017e84 <_Timer_server_Schedule_operation_method+0x54> 2017e78: 01 00 00 00 nop if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017e7c: 40 00 0e a0 call 201b8fc <_Thread_Enable_dispatch> 2017e80: 81 e8 00 00 restore } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017e84: 7f ff dd 4d call 200f3b8 2017e88: 01 00 00 00 nop 2017e8c: b8 10 00 08 mov %o0, %i4 2017e90: 03 00 80 f2 sethi %hi(0x203c800), %g1 2017e94: d0 18 63 00 ldd [ %g1 + 0x300 ], %o0 ! 203cb00 <_TOD_Now> 2017e98: 94 10 20 00 clr %o2 2017e9c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2017ea0: 40 00 51 8e call 202c4d8 <__divdi3> 2017ea4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017ea8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2017eac: c4 06 20 74 ld [ %i0 + 0x74 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2017eb0: 86 06 20 6c add %i0, 0x6c, %g3 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017eb4: 80 a0 40 03 cmp %g1, %g3 2017eb8: 02 80 00 0c be 2017ee8 <_Timer_server_Schedule_operation_method+0xb8> 2017ebc: 80 a2 40 02 cmp %o1, %g2 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2017ec0: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2017ec4: 86 01 00 02 add %g4, %g2, %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 ) { 2017ec8: 08 80 00 07 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4> 2017ecc: 86 20 c0 09 sub %g3, %o1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017ed0: 84 22 40 02 sub %o1, %g2, %g2 if (delta_interval > delta) { 2017ed4: 80 a1 00 02 cmp %g4, %g2 2017ed8: 08 80 00 03 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN 2017edc: 86 10 20 00 clr %g3 delta_interval -= delta; 2017ee0: 86 21 00 02 sub %g4, %g2, %g3 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 2017ee4: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2017ee8: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 2017eec: 7f ff dd 37 call 200f3c8 2017ef0: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017ef4: 90 06 20 68 add %i0, 0x68, %o0 2017ef8: 40 00 12 9e call 201c970 <_Watchdog_Insert> 2017efc: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017f00: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017f04: 80 a0 60 00 cmp %g1, 0 2017f08: 12 bf ff dd bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c> 2017f0c: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2017f10: 7f ff ff 2f call 2017bcc <_Timer_server_Reset_tod_system_watchdog> 2017f14: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2017f18: 40 00 0e 79 call 201b8fc <_Thread_Enable_dispatch> 2017f1c: 81 e8 00 00 restore if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017f20: 7f ff dd 26 call 200f3b8 2017f24: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2017f28: 05 00 80 f2 sethi %hi(0x203c800), %g2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017f2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2017f30: c4 00 a3 80 ld [ %g2 + 0x380 ], %g2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2017f34: 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 ); 2017f38: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017f3c: 80 a0 40 03 cmp %g1, %g3 2017f40: 02 80 00 08 be 2017f60 <_Timer_server_Schedule_operation_method+0x130> 2017f44: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2017f48: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 if (delta_interval > delta) { 2017f4c: 80 a1 00 1c cmp %g4, %i4 2017f50: 1a 80 00 03 bcc 2017f5c <_Timer_server_Schedule_operation_method+0x12c> 2017f54: 86 10 20 00 clr %g3 delta_interval -= delta; 2017f58: 86 27 00 04 sub %i4, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2017f5c: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2017f60: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2017f64: 7f ff dd 19 call 200f3c8 2017f68: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017f6c: 90 06 20 30 add %i0, 0x30, %o0 2017f70: 40 00 12 80 call 201c970 <_Watchdog_Insert> 2017f74: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017f78: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017f7c: 80 a0 60 00 cmp %g1, 0 2017f80: 12 bf ff bf bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c> 2017f84: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 2017f88: 7f ff fe fd call 2017b7c <_Timer_server_Reset_interval_system_watchdog> 2017f8c: 90 10 00 18 mov %i0, %o0 if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017f90: 40 00 0e 5b call 201b8fc <_Thread_Enable_dispatch> 2017f94: 81 e8 00 00 restore =============================================================================== 0200d184 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 200d184: 9d e3 bf a0 save %sp, -96, %sp 200d188: 82 10 00 18 mov %i0, %g1 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200d18c: c6 06 00 00 ld [ %i0 ], %g3 time->tv_nsec += add->tv_nsec; 200d190: c8 00 60 04 ld [ %g1 + 4 ], %g4 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 200d194: f0 06 40 00 ld [ %i1 ], %i0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200d198: c4 06 60 04 ld [ %i1 + 4 ], %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200d19c: 86 00 c0 18 add %g3, %i0, %g3 time->tv_nsec += add->tv_nsec; 200d1a0: 84 01 00 02 add %g4, %g2, %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200d1a4: c6 20 40 00 st %g3, [ %g1 ] time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200d1a8: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 200d1ac: 88 11 21 ff or %g4, 0x1ff, %g4 ! 3b9ac9ff 200d1b0: 80 a0 80 04 cmp %g2, %g4 200d1b4: 08 80 00 0b bleu 200d1e0 <_Timespec_Add_to+0x5c> <== ALWAYS TAKEN 200d1b8: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200d1bc: 1f 31 19 4d sethi %hi(0xc4653400), %o7 <== NOT EXECUTED 200d1c0: 9e 13 e2 00 or %o7, 0x200, %o7 ! c4653600 <== NOT EXECUTED 200d1c4: 84 00 80 0f add %g2, %o7, %g2 <== NOT EXECUTED time->tv_sec++; 200d1c8: 86 00 e0 01 inc %g3 <== NOT EXECUTED /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200d1cc: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 200d1d0: 18 bf ff fd bgu 200d1c4 <_Timespec_Add_to+0x40> <== NOT EXECUTED 200d1d4: b0 06 20 01 inc %i0 <== NOT EXECUTED 200d1d8: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 200d1dc: c6 20 40 00 st %g3, [ %g1 ] <== NOT EXECUTED time->tv_sec++; seconds++; } return seconds; } 200d1e0: 81 c7 e0 08 ret 200d1e4: 81 e8 00 00 restore =============================================================================== 0200acb8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200acb8: 9d e3 bf 88 save %sp, -120, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200acbc: da 06 40 00 ld [ %i1 ], %o5 right += rhs->tv_nsec; 200acc0: ea 06 60 04 ld [ %i1 + 4 ], %l5 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200acc4: 99 3b 60 1f sra %o5, 0x1f, %o4 200acc8: 83 2b 20 03 sll %o4, 3, %g1 200accc: 87 2b 60 03 sll %o5, 3, %g3 200acd0: 89 33 60 1d srl %o5, 0x1d, %g4 200acd4: 84 11 00 01 or %g4, %g1, %g2 200acd8: 83 30 e0 1b srl %g3, 0x1b, %g1 200acdc: 95 28 a0 05 sll %g2, 5, %o2 200ace0: 97 28 e0 05 sll %g3, 5, %o3 200ace4: 94 10 40 0a or %g1, %o2, %o2 200ace8: 96 a2 c0 03 subcc %o3, %g3, %o3 200acec: 83 32 e0 1a srl %o3, 0x1a, %g1 200acf0: 94 62 80 02 subx %o2, %g2, %o2 200acf4: 93 2a e0 06 sll %o3, 6, %o1 200acf8: 91 2a a0 06 sll %o2, 6, %o0 200acfc: 96 a2 40 0b subcc %o1, %o3, %o3 200ad00: 90 10 40 08 or %g1, %o0, %o0 200ad04: 94 62 00 0a subx %o0, %o2, %o2 200ad08: 96 82 c0 0d addcc %o3, %o5, %o3 200ad0c: 83 32 e0 1e srl %o3, 0x1e, %g1 200ad10: 94 42 80 0c addx %o2, %o4, %o2 200ad14: bb 2a e0 02 sll %o3, 2, %i5 200ad18: b9 2a a0 02 sll %o2, 2, %i4 200ad1c: 96 82 c0 1d addcc %o3, %i5, %o3 200ad20: b8 10 40 1c or %g1, %i4, %i4 200ad24: 83 32 e0 1e srl %o3, 0x1e, %g1 200ad28: 94 42 80 1c addx %o2, %i4, %o2 200ad2c: a3 2a e0 02 sll %o3, 2, %l1 200ad30: a1 2a a0 02 sll %o2, 2, %l0 200ad34: 96 82 c0 11 addcc %o3, %l1, %o3 200ad38: a0 10 40 10 or %g1, %l0, %l0 200ad3c: 83 32 e0 1e srl %o3, 0x1e, %g1 200ad40: 94 42 80 10 addx %o2, %l0, %o2 200ad44: a7 2a e0 02 sll %o3, 2, %l3 200ad48: a5 2a a0 02 sll %o2, 2, %l2 200ad4c: 96 82 c0 13 addcc %o3, %l3, %o3 200ad50: a4 10 40 12 or %g1, %l2, %l2 200ad54: 83 2a e0 09 sll %o3, 9, %g1 200ad58: 94 42 80 12 addx %o2, %l2, %o2 200ad5c: 87 32 e0 17 srl %o3, 0x17, %g3 200ad60: 85 2a a0 09 sll %o2, 9, %g2 right += rhs->tv_nsec; 200ad64: 96 80 40 15 addcc %g1, %l5, %o3 200ad68: a9 3d 60 1f sra %l5, 0x1f, %l4 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200ad6c: 94 10 c0 02 or %g3, %g2, %o2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200ad70: c8 06 00 00 ld [ %i0 ], %g4 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200ad74: 94 42 80 14 addx %o2, %l4, %o2 if ( right == 0 ) { 200ad78: 80 92 80 0b orcc %o2, %o3, %g0 200ad7c: 02 80 00 64 be 200af0c <_Timespec_Divide+0x254> <== ALWAYS TAKEN 200ad80: c2 06 20 04 ld [ %i0 + 4 ], %g1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 200ad84: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 200ad88: 83 38 60 1f sra %g1, 0x1f, %g1 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200ad8c: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED 200ad90: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED 200ad94: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED 200ad98: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED 200ad9c: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED left += lhs->tv_nsec; 200ada0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200ada4: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 200ada8: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 200adac: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED 200adb0: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED 200adb4: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED 200adb8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED 200adbc: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 200adc0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 200adc4: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 200adc8: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED 200adcc: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED 200add0: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200add4: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED 200add8: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200addc: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ade0: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200ade4: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED 200ade8: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED 200adec: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED 200adf0: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED 200adf4: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200adf8: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 200adfc: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED 200ae00: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED 200ae04: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED 200ae08: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED 200ae0c: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED 200ae10: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED 200ae14: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ae18: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED 200ae1c: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED 200ae20: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED 200ae24: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED 200ae28: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED 200ae2c: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED 200ae30: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED left += lhs->tv_nsec; 200ae34: f8 1f bf e8 ldd [ %fp + -24 ], %i4 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200ae38: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED left += lhs->tv_nsec; 200ae3c: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED 200ae40: 98 40 80 1c addx %g2, %i4, %o4 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200ae44: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED 200ae48: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED 200ae4c: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED 200ae50: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED 200ae54: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED 200ae58: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED 200ae5c: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED 200ae60: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED 200ae64: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED 200ae68: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED 200ae6c: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED 200ae70: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED 200ae74: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200ae78: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200ae7c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ae80: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED 200ae84: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200ae88: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED 200ae8c: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED 200ae90: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200ae94: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200ae98: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200ae9c: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200aea0: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200aea4: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED 200aea8: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200aeac: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED 200aeb0: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED 200aeb4: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED 200aeb8: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED 200aebc: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200aec0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200aec4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200aec8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200aecc: 40 00 3b e5 call 2019e60 <__udivdi3> <== NOT EXECUTED 200aed0: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED *ival_percentage = answer / 1000; 200aed4: 94 10 20 00 clr %o2 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200aed8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200aedc: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED *ival_percentage = answer / 1000; 200aee0: 40 00 3b e0 call 2019e60 <__udivdi3> <== NOT EXECUTED 200aee4: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200aee8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200aeec: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200aef0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200aef4: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200aef8: 40 00 3c af call 201a1b4 <__umoddi3> <== NOT EXECUTED 200aefc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200af00: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED 200af04: 81 c7 e0 08 ret <== NOT EXECUTED 200af08: 81 e8 00 00 restore <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 200af0c: c0 26 80 00 clr [ %i2 ] *fval_percentage = 0; 200af10: c0 26 c0 00 clr [ %i3 ] return; 200af14: 81 c7 e0 08 ret 200af18: 81 e8 00 00 restore =============================================================================== 0200cc38 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200cc38: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200cc3c: d4 1e 40 00 ldd [ %i1 ], %o2 200cc40: 80 92 80 0b orcc %o2, %o3, %g0 200cc44: 22 80 00 2f be,a 200cd00 <_Timestamp64_Divide+0xc8> <== NEVER TAKEN 200cc48: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 200cc4c: f8 1e 00 00 ldd [ %i0 ], %i4 200cc50: 83 2f 20 02 sll %i4, 2, %g1 200cc54: 9b 2f 60 02 sll %i5, 2, %o5 200cc58: 89 37 60 1e srl %i5, 0x1e, %g4 200cc5c: 98 11 00 01 or %g4, %g1, %o4 200cc60: 83 33 60 1b srl %o5, 0x1b, %g1 200cc64: 85 2b 20 05 sll %o4, 5, %g2 200cc68: 87 2b 60 05 sll %o5, 5, %g3 200cc6c: 84 10 40 02 or %g1, %g2, %g2 200cc70: 86 a0 c0 0d subcc %g3, %o5, %g3 200cc74: 84 60 80 0c subx %g2, %o4, %g2 200cc78: 86 80 c0 1d addcc %g3, %i5, %g3 200cc7c: 83 30 e0 1e srl %g3, 0x1e, %g1 200cc80: 84 40 80 1c addx %g2, %i4, %g2 200cc84: 93 28 e0 02 sll %g3, 2, %o1 200cc88: 91 28 a0 02 sll %g2, 2, %o0 200cc8c: 86 80 c0 09 addcc %g3, %o1, %g3 200cc90: 90 10 40 08 or %g1, %o0, %o0 200cc94: 83 30 e0 1e srl %g3, 0x1e, %g1 200cc98: 84 40 80 08 addx %g2, %o0, %g2 200cc9c: b3 28 e0 02 sll %g3, 2, %i1 200cca0: b1 28 a0 02 sll %g2, 2, %i0 200cca4: 92 80 c0 19 addcc %g3, %i1, %o1 200cca8: b0 10 40 18 or %g1, %i0, %i0 200ccac: 87 32 60 1b srl %o1, 0x1b, %g3 200ccb0: 90 40 80 18 addx %g2, %i0, %o0 200ccb4: 83 2a 60 05 sll %o1, 5, %g1 200ccb8: 85 2a 20 05 sll %o0, 5, %g2 200ccbc: 92 10 00 01 mov %g1, %o1 200ccc0: 40 00 3b 9b call 201bb2c <__divdi3> 200ccc4: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200ccc8: 94 10 20 00 clr %o2 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 200cccc: b0 10 00 08 mov %o0, %i0 200ccd0: b8 10 00 09 mov %o1, %i4 *_ival_percentage = answer / 1000; 200ccd4: 40 00 3b 96 call 201bb2c <__divdi3> 200ccd8: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200ccdc: 90 10 00 18 mov %i0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200cce0: d2 26 80 00 st %o1, [ %i2 ] *_fval_percentage = answer % 1000; 200cce4: 94 10 20 00 clr %o2 200cce8: 96 10 23 e8 mov 0x3e8, %o3 200ccec: 40 00 3c 76 call 201bec4 <__moddi3> 200ccf0: 92 10 00 1c mov %i4, %o1 200ccf4: d2 26 c0 00 st %o1, [ %i3 ] 200ccf8: 81 c7 e0 08 ret 200ccfc: 81 e8 00 00 restore { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; 200cd00: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200cd04: 81 c7 e0 08 ret <== NOT EXECUTED 200cd08: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b4a0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 200b4a0: 9d e3 bf a0 save %sp, -96, %sp 200b4a4: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b4a8: b8 17 20 18 or %i4, 0x18, %i4 ! 201ec18 <_User_extensions_List> 200b4ac: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b4b0: 80 a7 40 1c cmp %i5, %i4 200b4b4: 02 80 00 0d be 200b4e8 <_User_extensions_Fatal+0x48> <== NEVER TAKEN 200b4b8: 01 00 00 00 nop !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 200b4bc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200b4c0: 80 a0 60 00 cmp %g1, 0 200b4c4: 02 80 00 05 be 200b4d8 <_User_extensions_Fatal+0x38> 200b4c8: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 200b4cc: 92 10 00 19 mov %i1, %o1 200b4d0: 9f c0 40 00 call %g1 200b4d4: 94 10 00 1a mov %i2, %o2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b4d8: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b4dc: 80 a7 40 1c cmp %i5, %i4 200b4e0: 32 bf ff f8 bne,a 200b4c0 <_User_extensions_Fatal+0x20> 200b4e4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200b4e8: 81 c7 e0 08 ret 200b4ec: 81 e8 00 00 restore =============================================================================== 0200b34c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200b34c: 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; 200b350: 07 00 80 77 sethi %hi(0x201dc00), %g3 200b354: 86 10 e0 4c or %g3, 0x4c, %g3 ! 201dc4c initial_extensions = Configuration.User_extension_table; 200b358: f6 00 e0 44 ld [ %g3 + 0x44 ], %i3 200b35c: 3b 00 80 7b sethi %hi(0x201ec00), %i5 200b360: 09 00 80 7a sethi %hi(0x201e800), %g4 200b364: 84 17 60 18 or %i5, 0x18, %g2 200b368: 82 11 22 34 or %g4, 0x234, %g1 200b36c: b4 00 a0 04 add %g2, 4, %i2 200b370: b8 00 60 04 add %g1, 4, %i4 200b374: f4 27 60 18 st %i2, [ %i5 + 0x18 ] head->previous = NULL; 200b378: c0 20 a0 04 clr [ %g2 + 4 ] tail->previous = head; 200b37c: c4 20 a0 08 st %g2, [ %g2 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200b380: f8 21 22 34 st %i4, [ %g4 + 0x234 ] head->previous = NULL; 200b384: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200b388: c2 20 60 08 st %g1, [ %g1 + 8 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200b38c: 80 a6 e0 00 cmp %i3, 0 200b390: 02 80 00 1b be 200b3fc <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200b394: f4 00 e0 40 ld [ %g3 + 0x40 ], %i2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200b398: 83 2e a0 02 sll %i2, 2, %g1 200b39c: b9 2e a0 04 sll %i2, 4, %i4 200b3a0: b8 27 00 01 sub %i4, %g1, %i4 200b3a4: b8 07 00 1a add %i4, %i2, %i4 200b3a8: b9 2f 20 02 sll %i4, 2, %i4 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200b3ac: 40 00 01 9c call 200ba1c <_Workspace_Allocate_or_fatal_error> 200b3b0: 90 10 00 1c mov %i4, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200b3b4: 92 10 20 00 clr %o1 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200b3b8: ba 10 00 08 mov %o0, %i5 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200b3bc: 40 00 17 33 call 2011088 200b3c0: 94 10 00 1c mov %i4, %o2 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200b3c4: 80 a6 a0 00 cmp %i2, 0 200b3c8: 02 80 00 0d be 200b3fc <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200b3cc: b8 10 20 00 clr %i4 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 200b3d0: 92 10 00 1b mov %i3, %o1 200b3d4: 94 10 20 20 mov 0x20, %o2 200b3d8: 40 00 16 f0 call 2010f98 200b3dc: 90 07 60 14 add %i5, 0x14, %o0 _User_extensions_Add_set( extension ); 200b3e0: 40 00 0d 7e call 200e9d8 <_User_extensions_Add_set> 200b3e4: 90 10 00 1d mov %i5, %o0 200b3e8: b8 07 20 01 inc %i4 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200b3ec: ba 07 60 34 add %i5, 0x34, %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200b3f0: 80 a7 00 1a cmp %i4, %i2 200b3f4: 12 bf ff f7 bne 200b3d0 <_User_extensions_Handler_initialization+0x84> 200b3f8: b6 06 e0 20 add %i3, 0x20, %i3 200b3fc: 81 c7 e0 08 ret 200b400: 81 e8 00 00 restore =============================================================================== 0200b404 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 200b404: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b408: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b40c: fa 07 20 18 ld [ %i4 + 0x18 ], %i5 ! 201ec18 <_User_extensions_List> 200b410: b8 17 20 18 or %i4, 0x18, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b414: b8 07 20 04 add %i4, 4, %i4 200b418: 80 a7 40 1c cmp %i5, %i4 200b41c: 02 80 00 0c be 200b44c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 200b420: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 200b424: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200b428: 80 a0 60 00 cmp %g1, 0 200b42c: 02 80 00 04 be 200b43c <_User_extensions_Thread_begin+0x38> 200b430: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 200b434: 9f c0 40 00 call %g1 200b438: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b43c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b440: 80 a7 40 1c cmp %i5, %i4 200b444: 32 bf ff f9 bne,a 200b428 <_User_extensions_Thread_begin+0x24> 200b448: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200b44c: 81 c7 e0 08 ret 200b450: 81 e8 00 00 restore =============================================================================== 0200b4f0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 200b4f0: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b4f4: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b4f8: fa 07 20 18 ld [ %i4 + 0x18 ], %i5 ! 201ec18 <_User_extensions_List> 200b4fc: b8 17 20 18 or %i4, 0x18, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 200b500: b8 07 20 04 add %i4, 4, %i4 200b504: 80 a7 40 1c cmp %i5, %i4 200b508: 02 80 00 12 be 200b550 <_User_extensions_Thread_create+0x60><== NEVER TAKEN 200b50c: 82 10 20 01 mov 1, %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 200b510: 37 00 80 7b sethi %hi(0x201ec00), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 200b514: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200b518: 80 a0 60 00 cmp %g1, 0 200b51c: 02 80 00 08 be 200b53c <_User_extensions_Thread_create+0x4c> 200b520: 84 16 e3 70 or %i3, 0x370, %g2 status = (*the_extension->Callouts.thread_create)( 200b524: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b528: 9f c0 40 00 call %g1 200b52c: 92 10 00 18 mov %i0, %o1 _Thread_Executing, the_thread ); if ( !status ) 200b530: 80 8a 20 ff btst 0xff, %o0 200b534: 02 80 00 0a be 200b55c <_User_extensions_Thread_create+0x6c> 200b538: 82 10 20 00 clr %g1 User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b53c: fa 07 40 00 ld [ %i5 ], %i5 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 200b540: 80 a7 40 1c cmp %i5, %i4 200b544: 32 bf ff f5 bne,a 200b518 <_User_extensions_Thread_create+0x28> 200b548: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 if ( !status ) return false; } } return true; 200b54c: 82 10 20 01 mov 1, %g1 } 200b550: b0 08 60 01 and %g1, 1, %i0 200b554: 81 c7 e0 08 ret 200b558: 81 e8 00 00 restore 200b55c: b0 08 60 01 and %g1, 1, %i0 200b560: 81 c7 e0 08 ret 200b564: 81 e8 00 00 restore =============================================================================== 0200b568 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 200b568: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 200b56c: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b570: b8 17 20 18 or %i4, 0x18, %i4 ! 201ec18 <_User_extensions_List> 200b574: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b578: 80 a7 40 1c cmp %i5, %i4 200b57c: 02 80 00 0d be 200b5b0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 200b580: 37 00 80 7b sethi %hi(0x201ec00), %i3 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 200b584: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200b588: 80 a0 60 00 cmp %g1, 0 200b58c: 02 80 00 05 be 200b5a0 <_User_extensions_Thread_delete+0x38> 200b590: 84 16 e3 70 or %i3, 0x370, %g2 (*the_extension->Callouts.thread_delete)( 200b594: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b598: 9f c0 40 00 call %g1 200b59c: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b5a0: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b5a4: 80 a7 40 1c cmp %i5, %i4 200b5a8: 32 bf ff f8 bne,a 200b588 <_User_extensions_Thread_delete+0x20> 200b5ac: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200b5b0: 81 c7 e0 08 ret 200b5b4: 81 e8 00 00 restore =============================================================================== 0200b454 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 200b454: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 200b458: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b45c: b8 17 20 18 or %i4, 0x18, %i4 ! 201ec18 <_User_extensions_List> 200b460: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b464: 80 a7 40 1c cmp %i5, %i4 200b468: 02 80 00 0c be 200b498 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 200b46c: 01 00 00 00 nop !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 200b470: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200b474: 80 a0 60 00 cmp %g1, 0 200b478: 02 80 00 04 be 200b488 <_User_extensions_Thread_exitted+0x34> 200b47c: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 200b480: 9f c0 40 00 call %g1 200b484: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b488: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b48c: 80 a7 40 1c cmp %i5, %i4 200b490: 32 bf ff f9 bne,a 200b474 <_User_extensions_Thread_exitted+0x20> 200b494: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200b498: 81 c7 e0 08 ret 200b49c: 81 e8 00 00 restore =============================================================================== 0200bdf8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200bdf8: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200bdfc: 39 00 80 7d sethi %hi(0x201f400), %i4 200be00: fa 07 23 38 ld [ %i4 + 0x338 ], %i5 ! 201f738 <_User_extensions_List> 200be04: b8 17 23 38 or %i4, 0x338, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200be08: b8 07 20 04 add %i4, 4, %i4 200be0c: 80 a7 40 1c cmp %i5, %i4 200be10: 02 80 00 0d be 200be44 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200be14: 37 00 80 7e sethi %hi(0x201f800), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 200be18: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200be1c: 80 a0 60 00 cmp %g1, 0 200be20: 02 80 00 05 be 200be34 <_User_extensions_Thread_restart+0x3c> 200be24: 84 16 e2 90 or %i3, 0x290, %g2 (*the_extension->Callouts.thread_restart)( 200be28: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200be2c: 9f c0 40 00 call %g1 200be30: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200be34: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200be38: 80 a7 40 1c cmp %i5, %i4 200be3c: 32 bf ff f8 bne,a 200be1c <_User_extensions_Thread_restart+0x24> 200be40: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200be44: 81 c7 e0 08 ret 200be48: 81 e8 00 00 restore =============================================================================== 0200b5b8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 200b5b8: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b5bc: 39 00 80 7b sethi %hi(0x201ec00), %i4 200b5c0: fa 07 20 18 ld [ %i4 + 0x18 ], %i5 ! 201ec18 <_User_extensions_List> 200b5c4: b8 17 20 18 or %i4, 0x18, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b5c8: b8 07 20 04 add %i4, 4, %i4 200b5cc: 80 a7 40 1c cmp %i5, %i4 200b5d0: 02 80 00 0d be 200b604 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 200b5d4: 37 00 80 7b sethi %hi(0x201ec00), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 200b5d8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b5dc: 80 a0 60 00 cmp %g1, 0 200b5e0: 02 80 00 05 be 200b5f4 <_User_extensions_Thread_start+0x3c> 200b5e4: 84 16 e3 70 or %i3, 0x370, %g2 (*the_extension->Callouts.thread_start)( 200b5e8: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b5ec: 9f c0 40 00 call %g1 200b5f0: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b5f4: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b5f8: 80 a7 40 1c cmp %i5, %i4 200b5fc: 32 bf ff f8 bne,a 200b5dc <_User_extensions_Thread_start+0x24> 200b600: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b604: 81 c7 e0 08 ret 200b608: 81 e8 00 00 restore =============================================================================== 0200b60c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 200b60c: 9d e3 bf a0 save %sp, -96, %sp 200b610: 39 00 80 7a sethi %hi(0x201e800), %i4 200b614: fa 07 22 34 ld [ %i4 + 0x234 ], %i5 ! 201ea34 <_User_extensions_Switches_list> 200b618: b8 17 22 34 or %i4, 0x234, %i4 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 200b61c: b8 07 20 04 add %i4, 4, %i4 200b620: 80 a7 40 1c cmp %i5, %i4 200b624: 02 80 00 0a be 200b64c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200b628: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 200b62c: c2 07 60 08 ld [ %i5 + 8 ], %g1 200b630: 90 10 00 18 mov %i0, %o0 200b634: 9f c0 40 00 call %g1 200b638: 92 10 00 19 mov %i1, %o1 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 200b63c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 200b640: 80 a7 40 1c cmp %i5, %i4 200b644: 32 bf ff fb bne,a 200b630 <_User_extensions_Thread_switch+0x24> 200b648: c2 07 60 08 ld [ %i5 + 8 ], %g1 200b64c: 81 c7 e0 08 ret 200b650: 81 e8 00 00 restore =============================================================================== 0200d054 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200d054: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200d058: 7f ff d8 eb call 2003404 200d05c: 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; 200d060: 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 ); 200d064: b6 06 20 04 add %i0, 4, %i3 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200d068: 80 a0 40 1b cmp %g1, %i3 200d06c: 02 80 00 1e be 200d0e4 <_Watchdog_Adjust+0x90> 200d070: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200d074: 12 80 00 1e bne 200d0ec <_Watchdog_Adjust+0x98> 200d078: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200d07c: 80 a6 a0 00 cmp %i2, 0 200d080: 02 80 00 19 be 200d0e4 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200d084: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200d088: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200d08c: 80 a6 80 1c cmp %i2, %i4 200d090: 1a 80 00 0a bcc 200d0b8 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN 200d094: b2 10 20 01 mov 1, %i1 _Watchdog_First( header )->delta_interval -= units; 200d098: 10 80 00 1c b 200d108 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED 200d09c: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200d0a0: 02 80 00 11 be 200d0e4 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200d0a4: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200d0a8: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200d0ac: 80 a7 00 1a cmp %i4, %i2 200d0b0: 38 80 00 16 bgu,a 200d108 <_Watchdog_Adjust+0xb4> 200d0b4: b8 27 00 1a sub %i4, %i2, %i4 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 200d0b8: f2 20 60 10 st %i1, [ %g1 + 0x10 ] _ISR_Enable( level ); 200d0bc: 7f ff d8 d6 call 2003414 200d0c0: 01 00 00 00 nop _Watchdog_Tickle( header ); 200d0c4: 40 00 00 ab call 200d370 <_Watchdog_Tickle> 200d0c8: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200d0cc: 7f ff d8 ce call 2003404 200d0d0: 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; 200d0d4: c2 07 40 00 ld [ %i5 ], %g1 if ( _Chain_Is_empty( header ) ) 200d0d8: 80 a6 c0 01 cmp %i3, %g1 200d0dc: 32 bf ff f1 bne,a 200d0a0 <_Watchdog_Adjust+0x4c> 200d0e0: b4 a6 80 1c subcc %i2, %i4, %i2 } break; } } _ISR_Enable( level ); 200d0e4: 7f ff d8 cc call 2003414 200d0e8: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200d0ec: 12 bf ff fe bne 200d0e4 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200d0f0: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200d0f4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200d0f8: b4 00 80 1a add %g2, %i2, %i2 200d0fc: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200d100: 7f ff d8 c5 call 2003414 200d104: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 200d108: 10 bf ff f7 b 200d0e4 <_Watchdog_Adjust+0x90> 200d10c: f8 20 60 10 st %i4, [ %g1 + 0x10 ] =============================================================================== 0200b7dc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200b7dc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200b7e0: 7f ff db b6 call 20026b8 200b7e4: 01 00 00 00 nop previous_state = the_watchdog->state; 200b7e8: fa 06 20 08 ld [ %i0 + 8 ], %i5 switch ( previous_state ) { 200b7ec: 80 a7 60 01 cmp %i5, 1 200b7f0: 02 80 00 2a be 200b898 <_Watchdog_Remove+0xbc> 200b7f4: 03 00 80 7a sethi %hi(0x201e800), %g1 200b7f8: 1a 80 00 09 bcc 200b81c <_Watchdog_Remove+0x40> 200b7fc: 80 a7 60 03 cmp %i5, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b800: 03 00 80 7a sethi %hi(0x201e800), %g1 200b804: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 201eb40 <_Watchdog_Ticks_since_boot> 200b808: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b80c: 7f ff db af call 20026c8 200b810: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b814: 81 c7 e0 08 ret 200b818: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200b81c: 18 bf ff fa bgu 200b804 <_Watchdog_Remove+0x28> <== NEVER TAKEN 200b820: 03 00 80 7a sethi %hi(0x201e800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 200b824: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200b828: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200b82c: c4 00 40 00 ld [ %g1 ], %g2 200b830: 80 a0 a0 00 cmp %g2, 0 200b834: 02 80 00 07 be 200b850 <_Watchdog_Remove+0x74> 200b838: 05 00 80 7a sethi %hi(0x201e800), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200b83c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200b840: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b844: 84 00 c0 02 add %g3, %g2, %g2 200b848: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200b84c: 05 00 80 7a sethi %hi(0x201e800), %g2 200b850: c4 00 a3 3c ld [ %g2 + 0x33c ], %g2 ! 201eb3c <_Watchdog_Sync_count> 200b854: 80 a0 a0 00 cmp %g2, 0 200b858: 22 80 00 07 be,a 200b874 <_Watchdog_Remove+0x98> 200b85c: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200b860: 05 00 80 7b sethi %hi(0x201ec00), %g2 200b864: c6 00 a3 78 ld [ %g2 + 0x378 ], %g3 ! 201ef78 <_Per_CPU_Information+0x8> 200b868: 05 00 80 7a sethi %hi(0x201e800), %g2 200b86c: c6 20 a2 dc st %g3, [ %g2 + 0x2dc ] ! 201eadc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200b870: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; 200b874: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200b878: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b87c: 03 00 80 7a sethi %hi(0x201e800), %g1 200b880: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 201eb40 <_Watchdog_Ticks_since_boot> 200b884: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b888: 7f ff db 90 call 20026c8 200b88c: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b890: 81 c7 e0 08 ret 200b894: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b898: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 200b89c: c0 26 20 08 clr [ %i0 + 8 ] _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b8a0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b8a4: 7f ff db 89 call 20026c8 200b8a8: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b8ac: 81 c7 e0 08 ret 200b8b0: 81 e8 00 00 restore =============================================================================== 0200c9f4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c9f4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c9f8: 7f ff d9 64 call 2002f88 200c9fc: 01 00 00 00 nop 200ca00: ba 10 00 08 mov %o0, %i5 printk( "Watchdog Chain: %s %p\n", name, header ); 200ca04: 11 00 80 79 sethi %hi(0x201e400), %o0 200ca08: 94 10 00 19 mov %i1, %o2 200ca0c: 92 10 00 18 mov %i0, %o1 200ca10: 7f ff e1 78 call 2004ff0 200ca14: 90 12 23 70 or %o0, 0x370, %o0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200ca18: 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 ); 200ca1c: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200ca20: 80 a7 00 19 cmp %i4, %i1 200ca24: 02 80 00 0f be 200ca60 <_Watchdog_Report_chain+0x6c> 200ca28: 11 00 80 79 sethi %hi(0x201e400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200ca2c: 92 10 00 1c mov %i4, %o1 200ca30: 40 00 00 0f call 200ca6c <_Watchdog_Report> 200ca34: 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 ) 200ca38: 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 ) ; 200ca3c: 80 a7 00 19 cmp %i4, %i1 200ca40: 12 bf ff fc bne 200ca30 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200ca44: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200ca48: 11 00 80 79 sethi %hi(0x201e400), %o0 200ca4c: 92 10 00 18 mov %i0, %o1 200ca50: 7f ff e1 68 call 2004ff0 200ca54: 90 12 23 88 or %o0, 0x388, %o0 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200ca58: 7f ff d9 50 call 2002f98 200ca5c: 91 e8 00 1d restore %g0, %i5, %o0 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200ca60: 7f ff e1 64 call 2004ff0 200ca64: 90 12 23 98 or %o0, 0x398, %o0 200ca68: 30 bf ff fc b,a 200ca58 <_Watchdog_Report_chain+0x64> =============================================================================== 0202923c <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 202923c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2029240: c0 27 bf fc clr [ %fp + -4 ] uint32_t count, void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2029244: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2029248: 80 a6 e0 00 cmp %i3, 0 202924c: 12 80 00 12 bne 2029294 <_fat_block_read+0x58> <== ALWAYS TAKEN 2029250: b0 10 20 00 clr %i0 2029254: 30 80 00 1a b,a 20292bc <_fat_block_read+0x80> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2029258: e0 17 40 00 lduh [ %i5 ], %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 202925c: c2 07 bf fc ld [ %fp + -4 ], %g1 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2029260: a0 24 00 1a sub %l0, %i2, %l0 2029264: 80 a4 00 1b cmp %l0, %i3 2029268: 08 80 00 03 bleu 2029274 <_fat_block_read+0x38> 202926c: b2 06 60 01 inc %i1 2029270: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2029274: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2029278: 94 10 00 10 mov %l0, %o2 202927c: 40 00 89 25 call 204b710 2029280: 92 02 40 1a add %o1, %i2, %o1 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2029284: b6 a6 c0 10 subcc %i3, %l0, %i3 2029288: 02 80 00 0d be 20292bc <_fat_block_read+0x80> 202928c: b0 04 00 18 add %l0, %i0, %i0 memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; 2029290: b4 10 20 00 clr %i2 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2029294: 92 10 00 19 mov %i1, %o1 2029298: 94 10 20 01 mov 1, %o2 202929c: 96 07 bf fc add %fp, -4, %o3 20292a0: 7f ff ff 06 call 2028eb8 20292a4: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20292a8: 80 a2 20 00 cmp %o0, 0 20292ac: 02 bf ff eb be 2029258 <_fat_block_read+0x1c> <== ALWAYS TAKEN 20292b0: 90 07 00 18 add %i4, %i0, %o0 cmpltd += c; blk++; ofs = 0; } return cmpltd; } 20292b4: 81 c7 e0 08 ret <== NOT EXECUTED 20292b8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 20292bc: 81 c7 e0 08 ret 20292c0: 81 e8 00 00 restore =============================================================================== 02029380 <_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); 2029380: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 2029384: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029388: 7f ff ff 52 call 20290d0 <== NOT EXECUTED 202938c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020292c4 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 20292c4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 20292c8: c0 27 bf fc clr [ %fp + -4 ] uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20292cc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 20292d0: a2 10 20 01 mov 1, %l1 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 20292d4: 80 a6 e0 00 cmp %i3, 0 20292d8: 12 80 00 14 bne 2029328 <_fat_block_write+0x64> <== ALWAYS TAKEN 20292dc: b0 10 20 00 clr %i0 20292e0: 30 80 00 26 b,a 2029378 <_fat_block_write+0xb4> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 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); 20292e4: 96 07 bf fc add %fp, -4, %o3 20292e8: 7f ff fe f4 call 2028eb8 20292ec: 90 10 00 10 mov %l0, %o0 if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 20292f0: 92 07 00 18 add %i4, %i0, %o1 if (c == fs_info->vol.bps) 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); if (rc != RC_OK) 20292f4: 80 a2 20 00 cmp %o0, 0 20292f8: 12 80 00 1e bne 2029370 <_fat_block_write+0xac> <== NEVER TAKEN 20292fc: 94 10 00 1d mov %i5, %o2 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2029300: c2 07 bf fc ld [ %fp + -4 ], %g1 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2029304: b0 07 40 18 add %i5, %i0, %i0 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2029308: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 202930c: b2 06 60 01 inc %i1 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2029310: 40 00 89 00 call 204b710 2029314: 90 02 00 1a add %o0, %i2, %o0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2029318: b6 a6 c0 1d subcc %i3, %i5, %i3 202931c: 02 80 00 17 be 2029378 <_fat_block_write+0xb4> 2029320: e2 2c 20 7c stb %l1, [ %l0 + 0x7c ] fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 2029324: b4 10 20 00 clr %i2 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 2029328: c2 14 00 00 lduh [ %l0 ], %g1 202932c: ba 20 40 1a sub %g1, %i2, %i5 2029330: 80 a7 40 1b cmp %i5, %i3 2029334: 08 80 00 03 bleu 2029340 <_fat_block_write+0x7c> 2029338: 92 10 00 19 mov %i1, %o1 202933c: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bps) 2029340: 80 a0 40 1d cmp %g1, %i5 2029344: 32 bf ff e8 bne,a 20292e4 <_fat_block_write+0x20> 2029348: 94 10 20 01 mov 1, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 202934c: 92 10 00 19 mov %i1, %o1 2029350: 94 10 20 02 mov 2, %o2 2029354: 90 10 00 10 mov %l0, %o0 2029358: 7f ff fe d8 call 2028eb8 202935c: 96 07 bf fc add %fp, -4, %o3 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2029360: 92 07 00 18 add %i4, %i0, %o1 if (c == fs_info->vol.bps) 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); if (rc != RC_OK) 2029364: 80 a2 20 00 cmp %o0, 0 2029368: 02 bf ff e6 be 2029300 <_fat_block_write+0x3c> <== ALWAYS TAKEN 202936c: 94 10 00 1d mov %i5, %o2 cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2029370: 81 c7 e0 08 ret <== NOT EXECUTED 2029374: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 2029378: 81 c7 e0 08 ret 202937c: 81 e8 00 00 restore =============================================================================== 0202beb8 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 202beb8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202bebc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202bec0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202bec4: 7f ff ff e9 call 202be68 <== NOT EXECUTED 202bec8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004900 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2004900: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2004904: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2004908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200490c: 7f ff ff e9 call 20048b0 <== NOT EXECUTED 2004910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02007b38 : int adjtime( const struct timeval *delta, struct timeval *olddelta ) { 2007b38: 9d e3 bf 98 save %sp, -104, %sp long adjustment; /* * Simple validations */ if ( !delta ) 2007b3c: ba 96 20 00 orcc %i0, 0, %i5 2007b40: 02 80 00 89 be 2007d64 2007b44: 03 00 03 d0 sethi %hi(0xf4000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 2007b48: c4 07 60 04 ld [ %i5 + 4 ], %g2 2007b4c: 82 10 62 3f or %g1, 0x23f, %g1 2007b50: 80 a0 80 01 cmp %g2, %g1 2007b54: 18 80 00 84 bgu 2007d64 2007b58: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 2007b5c: 22 80 00 06 be,a 2007b74 2007b60: c2 07 40 00 ld [ %i5 ], %g1 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 2007b64: c0 26 60 04 clr [ %i1 + 4 ] 2007b68: c4 07 60 04 ld [ %i5 + 4 ], %g2 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 2007b6c: c0 26 40 00 clr [ %i1 ] olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2007b70: c2 07 40 00 ld [ %i5 ], %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2007b74: 07 00 80 82 sethi %hi(0x2020800), %g3 2007b78: c8 00 e0 5c ld [ %g3 + 0x5c ], %g4 ! 202085c olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2007b7c: b5 28 60 08 sll %g1, 8, %i2 2007b80: 87 28 60 03 sll %g1, 3, %g3 2007b84: 86 26 80 03 sub %i2, %g3, %g3 2007b88: b5 28 e0 06 sll %g3, 6, %i2 2007b8c: 86 26 80 03 sub %i2, %g3, %g3 2007b90: 82 00 c0 01 add %g3, %g1, %g1 2007b94: 83 28 60 06 sll %g1, 6, %g1 adjustment += delta->tv_usec; 2007b98: 84 00 40 02 add %g1, %g2, %g2 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2007b9c: 80 a0 80 04 cmp %g2, %g4 2007ba0: 0a 80 00 6f bcs 2007d5c 2007ba4: b0 10 20 00 clr %i0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2007ba8: 03 00 80 85 sethi %hi(0x2021400), %g1 2007bac: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2021770 <_Thread_Dispatch_disable_level> 2007bb0: 84 00 a0 01 inc %g2 2007bb4: c4 20 63 70 st %g2, [ %g1 + 0x370 ] return _Thread_Dispatch_disable_level; 2007bb8: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007bbc: 40 00 07 08 call 20097dc <_TOD_Get_as_timestamp> 2007bc0: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007bc4: f4 1f bf f8 ldd [ %fp + -8 ], %i2 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007bc8: 94 10 20 00 clr %o2 2007bcc: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007bd0: 90 10 00 1a mov %i2, %o0 2007bd4: 96 12 e2 00 or %o3, 0x200, %o3 2007bd8: 40 00 52 0a call 201c400 <__divdi3> 2007bdc: 92 10 00 1b mov %i3, %o1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 2007be0: e0 07 40 00 ld [ %i5 ], %l0 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007be4: 94 10 20 00 clr %o2 2007be8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007bec: a0 04 00 09 add %l0, %o1, %l0 2007bf0: 96 12 e2 00 or %o3, 0x200, %o3 2007bf4: 90 10 00 1a mov %i2, %o0 2007bf8: 40 00 52 e8 call 201c798 <__moddi3> 2007bfc: 92 10 00 1b mov %i3, %o1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2007c00: c2 07 60 04 ld [ %i5 + 4 ], %g1 2007c04: 87 28 60 07 sll %g1, 7, %g3 2007c08: 85 28 60 02 sll %g1, 2, %g2 2007c0c: 84 20 c0 02 sub %g3, %g2, %g2 2007c10: 82 00 80 01 add %g2, %g1, %g1 2007c14: 83 28 60 03 sll %g1, 3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2007c18: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2007c1c: 92 02 40 01 add %o1, %g1, %o1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2007c20: 84 10 a1 ff or %g2, 0x1ff, %g2 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 2007c24: 07 31 19 4d sethi %hi(0xc4653400), %g3 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2007c28: 82 10 00 09 mov %o1, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2007c2c: 80 a2 40 02 cmp %o1, %g2 2007c30: 08 80 00 07 bleu 2007c4c 2007c34: 86 10 e2 00 or %g3, 0x200, %g3 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 2007c38: 92 02 40 03 add %o1, %g3, %o1 ts.tv_sec++; 2007c3c: a0 04 20 01 inc %l0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2007c40: 80 a2 40 02 cmp %o1, %g2 2007c44: 18 bf ff fd bgu 2007c38 <== NEVER TAKEN 2007c48: 82 10 00 09 mov %o1, %g1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 2007c4c: 07 31 19 4d sethi %hi(0xc4653400), %g3 2007c50: 86 10 e2 00 or %g3, 0x200, %g3 ! c4653600 2007c54: 80 a2 40 03 cmp %o1, %g3 2007c58: 18 80 00 08 bgu 2007c78 <== NEVER TAKEN 2007c5c: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 2007c60: 84 10 a2 00 or %g2, 0x200, %g2 ! 3b9aca00 2007c64: 92 02 40 02 add %o1, %g2, %o1 ts.tv_sec--; 2007c68: a0 04 3f ff add %l0, -1, %l0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 2007c6c: 80 a2 40 03 cmp %o1, %g3 2007c70: 08 bf ff fd bleu 2007c64 2007c74: 82 10 00 09 mov %o1, %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 2007c78: 99 3c 20 1f sra %l0, 0x1f, %o4 2007c7c: ae 10 00 01 mov %g1, %l7 2007c80: ad 38 60 1f sra %g1, 0x1f, %l6 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 2007c84: 83 2b 20 03 sll %o4, 3, %g1 2007c88: b7 2c 20 03 sll %l0, 3, %i3 2007c8c: 89 34 20 1d srl %l0, 0x1d, %g4 2007c90: b4 11 00 01 or %g4, %g1, %i2 2007c94: 83 36 e0 1b srl %i3, 0x1b, %g1 2007c98: 85 2e a0 05 sll %i2, 5, %g2 2007c9c: 87 2e e0 05 sll %i3, 5, %g3 2007ca0: 84 10 40 02 or %g1, %g2, %g2 2007ca4: 86 a0 c0 1b subcc %g3, %i3, %g3 2007ca8: 83 30 e0 1a srl %g3, 0x1a, %g1 2007cac: 84 60 80 1a subx %g2, %i2, %g2 2007cb0: 97 28 e0 06 sll %g3, 6, %o3 2007cb4: 95 28 a0 06 sll %g2, 6, %o2 2007cb8: 86 a2 c0 03 subcc %o3, %g3, %g3 2007cbc: 94 10 40 0a or %g1, %o2, %o2 2007cc0: 84 62 80 02 subx %o2, %g2, %g2 2007cc4: 86 80 c0 10 addcc %g3, %l0, %g3 2007cc8: 83 30 e0 1e srl %g3, 0x1e, %g1 2007ccc: 84 40 80 0c addx %g2, %o4, %g2 2007cd0: a3 28 e0 02 sll %g3, 2, %l1 2007cd4: a1 28 a0 02 sll %g2, 2, %l0 2007cd8: 86 80 c0 11 addcc %g3, %l1, %g3 2007cdc: a0 10 40 10 or %g1, %l0, %l0 2007ce0: 83 30 e0 1e srl %g3, 0x1e, %g1 2007ce4: 84 40 80 10 addx %g2, %l0, %g2 2007ce8: a7 28 e0 02 sll %g3, 2, %l3 2007cec: a5 28 a0 02 sll %g2, 2, %l2 2007cf0: 86 80 c0 13 addcc %g3, %l3, %g3 2007cf4: a4 10 40 12 or %g1, %l2, %l2 2007cf8: ab 28 e0 02 sll %g3, 2, %l5 2007cfc: 84 40 80 12 addx %g2, %l2, %g2 2007d00: 83 30 e0 1e srl %g3, 0x1e, %g1 2007d04: a9 28 a0 02 sll %g2, 2, %l4 2007d08: 86 80 c0 15 addcc %g3, %l5, %g3 2007d0c: a8 10 40 14 or %g1, %l4, %l4 2007d10: 84 40 80 14 addx %g2, %l4, %g2 2007d14: 83 28 e0 09 sll %g3, 9, %g1 2007d18: 89 28 a0 09 sll %g2, 9, %g4 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 2007d1c: 90 07 bf f8 add %fp, -8, %o0 2007d20: b5 30 e0 17 srl %g3, 0x17, %i2 2007d24: 86 85 c0 01 addcc %l7, %g1, %g3 2007d28: 84 16 80 04 or %i2, %g4, %g2 2007d2c: 84 45 80 02 addx %l6, %g2, %g2 2007d30: 40 00 06 c8 call 2009850 <_TOD_Set_with_timestamp> 2007d34: c4 3f bf f8 std %g2, [ %fp + -8 ] ts.tv_sec--; } _TOD_Set( &ts ); _Thread_Enable_dispatch(); 2007d38: 40 00 0d 8b call 200b364 <_Thread_Enable_dispatch> 2007d3c: b0 10 20 00 clr %i0 /* set the user's output */ if ( olddelta ) 2007d40: 80 a6 60 00 cmp %i1, 0 2007d44: 02 80 00 0c be 2007d74 2007d48: 01 00 00 00 nop *olddelta = *delta; 2007d4c: c2 07 40 00 ld [ %i5 ], %g1 2007d50: c2 26 40 00 st %g1, [ %i1 ] 2007d54: c2 07 60 04 ld [ %i5 + 4 ], %g1 2007d58: c2 26 60 04 st %g1, [ %i1 + 4 ] return 0; } 2007d5c: 81 c7 e0 08 ret 2007d60: 81 e8 00 00 restore */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 2007d64: 40 00 25 50 call 20112a4 <__errno> 2007d68: b0 10 3f ff mov -1, %i0 2007d6c: 82 10 20 16 mov 0x16, %g1 2007d70: c2 22 00 00 st %g1, [ %o0 ] 2007d74: 81 c7 e0 08 ret 2007d78: 81 e8 00 00 restore =============================================================================== 02007dcc : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 2007dcc: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 2007dd0: 3b 00 80 83 sethi %hi(0x2020c00), %i5 2007dd4: 40 00 04 92 call 200901c 2007dd8: 90 17 63 94 or %i5, 0x394, %o0 ! 2020f94 if (fcntl (fildes, F_GETFD) < 0) { 2007ddc: 90 10 00 18 mov %i0, %o0 2007de0: 40 00 1c 4f call 200ef1c 2007de4: 92 10 20 01 mov 1, %o1 2007de8: 80 a2 20 00 cmp %o0, 0 2007dec: 06 80 00 6c bl 2007f9c 2007df0: 80 a6 60 00 cmp %i1, 0 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 2007df4: 02 80 00 3b be 2007ee0 2007df8: 92 10 00 18 mov %i0, %o1 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 2007dfc: f8 06 40 00 ld [ %i1 ], %i4 2007e00: 80 a7 00 18 cmp %i4, %i0 2007e04: 12 80 00 2f bne 2007ec0 2007e08: 90 17 63 94 or %i5, 0x394, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2007e0c: 92 10 00 1c mov %i4, %o1 2007e10: 11 00 80 83 sethi %hi(0x2020c00), %o0 2007e14: 94 10 20 00 clr %o2 2007e18: 40 00 01 92 call 2008460 2007e1c: 90 12 23 dc or %o0, 0x3dc, %o0 if (r_chain == NULL) { 2007e20: b0 92 20 00 orcc %o0, 0, %i0 2007e24: 22 80 00 0f be,a 2007e60 2007e28: ba 17 63 94 or %i5, 0x394, %i5 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007e2c: b8 06 20 1c add %i0, 0x1c, %i4 2007e30: 40 00 04 7b call 200901c 2007e34: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007e38: 92 10 00 19 mov %i1, %o1 2007e3c: 40 00 01 d6 call 2008594 2007e40: 90 06 20 08 add %i0, 8, %o0 2007e44: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 2007e48: 40 00 04 95 call 200909c 2007e4c: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007e50: 40 00 04 93 call 200909c 2007e54: 90 17 63 94 or %i5, 0x394, %o0 return result; } return AIO_ALLDONE; } 2007e58: 81 c7 e0 08 ret 2007e5c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2007e60: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 2007e64: 82 07 60 58 add %i5, 0x58, %g1 2007e68: 80 a0 80 01 cmp %g2, %g1 2007e6c: 02 80 00 0f be 2007ea8 <== NEVER TAKEN 2007e70: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 2007e74: 92 10 00 1c mov %i4, %o1 2007e78: 40 00 01 7a call 2008460 2007e7c: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007e80: 80 a2 20 00 cmp %o0, 0 2007e84: 02 80 00 0e be 2007ebc 2007e88: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007e8c: 40 00 01 c2 call 2008594 2007e90: 90 02 20 08 add %o0, 8, %o0 2007e94: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007e98: 40 00 04 81 call 200909c 2007e9c: 90 10 00 1d mov %i5, %o0 return result; 2007ea0: 81 c7 e0 08 ret 2007ea4: 81 e8 00 00 restore } else { pthread_mutex_unlock (&aio_request_queue.mutex); 2007ea8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2007eac: 40 00 04 7c call 200909c 2007eb0: b0 10 20 02 mov 2, %i0 return AIO_ALLDONE; 2007eb4: 81 c7 e0 08 ret 2007eb8: 81 e8 00 00 restore r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 2007ebc: 90 10 00 1d mov %i5, %o0 2007ec0: 40 00 04 77 call 200909c 2007ec4: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one (EINVAL); 2007ec8: 40 00 2a f7 call 2012aa4 <__errno> 2007ecc: 01 00 00 00 nop 2007ed0: 82 10 20 16 mov 0x16, %g1 ! 16 2007ed4: c2 22 00 00 st %g1, [ %o0 ] 2007ed8: 81 c7 e0 08 ret 2007edc: 81 e8 00 00 restore /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2007ee0: 11 00 80 83 sethi %hi(0x2020c00), %o0 2007ee4: 94 10 20 00 clr %o2 2007ee8: 40 00 01 5e call 2008460 2007eec: 90 12 23 dc or %o0, 0x3dc, %o0 if (r_chain == NULL) { 2007ef0: b8 92 20 00 orcc %o0, 0, %i4 2007ef4: 02 80 00 0f be 2007f30 2007ef8: b2 07 20 1c add %i4, 0x1c, %i1 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007efc: 40 00 04 48 call 200901c 2007f00: 90 10 00 19 mov %i1, %o0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2007f04: 40 00 0b 20 call 200ab84 <_Chain_Extract> 2007f08: 90 10 00 1c mov %i4, %o0 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007f0c: 40 00 01 8e call 2008544 2007f10: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 2007f14: 40 00 04 62 call 200909c 2007f18: 90 10 00 19 mov %i1, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007f1c: 90 17 63 94 or %i5, 0x394, %o0 2007f20: 40 00 04 5f call 200909c 2007f24: b0 10 20 00 clr %i0 return AIO_CANCELED; 2007f28: 81 c7 e0 08 ret 2007f2c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2007f30: ba 17 63 94 or %i5, 0x394, %i5 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2007f34: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 2007f38: 82 07 60 58 add %i5, 0x58, %g1 2007f3c: 80 a0 80 01 cmp %g2, %g1 2007f40: 02 bf ff da be 2007ea8 <== NEVER TAKEN 2007f44: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 2007f48: 92 10 00 18 mov %i0, %o1 2007f4c: 40 00 01 45 call 2008460 2007f50: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007f54: b8 92 20 00 orcc %o0, 0, %i4 2007f58: 22 bf ff d5 be,a 2007eac 2007f5c: 90 10 00 1d mov %i5, %o0 2007f60: 40 00 0b 09 call 200ab84 <_Chain_Extract> 2007f64: b2 07 20 1c add %i4, 0x1c, %i1 } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007f68: 40 00 01 77 call 2008544 2007f6c: 90 10 00 1c mov %i4, %o0 pthread_mutex_destroy (&r_chain->mutex); 2007f70: 40 00 03 80 call 2008d70 2007f74: 90 10 00 19 mov %i1, %o0 pthread_cond_destroy (&r_chain->mutex); 2007f78: 40 00 02 9f call 20089f4 2007f7c: 90 10 00 19 mov %i1, %o0 free (r_chain); 2007f80: 7f ff ef 7e call 2003d78 2007f84: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 2007f88: b0 10 20 00 clr %i0 rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); pthread_cond_destroy (&r_chain->mutex); free (r_chain); pthread_mutex_unlock (&aio_request_queue.mutex); 2007f8c: 40 00 04 44 call 200909c 2007f90: 90 10 00 1d mov %i5, %o0 return AIO_CANCELED; 2007f94: 81 c7 e0 08 ret 2007f98: 81 e8 00 00 restore int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 2007f9c: 40 00 04 40 call 200909c 2007fa0: 90 17 63 94 or %i5, 0x394, %o0 rtems_set_errno_and_return_minus_one (EBADF); 2007fa4: 40 00 2a c0 call 2012aa4 <__errno> 2007fa8: b0 10 3f ff mov -1, %i0 2007fac: 82 10 20 09 mov 9, %g1 2007fb0: c2 22 00 00 st %g1, [ %o0 ] 2007fb4: 81 c7 e0 08 ret 2007fb8: 81 e8 00 00 restore =============================================================================== 02007fc4 : int aio_fsync( int op, struct aiocb *aiocbp ) { 2007fc4: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 2007fc8: 03 00 00 08 sethi %hi(0x2000), %g1 2007fcc: 80 a6 00 01 cmp %i0, %g1 2007fd0: 12 80 00 14 bne 2008020 2007fd4: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2007fd8: d0 06 40 00 ld [ %i1 ], %o0 2007fdc: 40 00 1b d0 call 200ef1c 2007fe0: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2007fe4: 90 0a 20 03 and %o0, 3, %o0 2007fe8: 90 02 3f ff add %o0, -1, %o0 2007fec: 80 a2 20 01 cmp %o0, 1 2007ff0: 18 80 00 0c bgu 2008020 2007ff4: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2007ff8: 7f ff f0 c0 call 20042f8 2007ffc: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2008000: 80 a2 20 00 cmp %o0, 0 2008004: 02 80 00 06 be 200801c <== NEVER TAKEN 2008008: 82 10 20 03 mov 3, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 200800c: f2 22 20 14 st %i1, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_SYNC; 2008010: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 2008014: 40 00 01 7c call 2008604 2008018: 91 e8 00 08 restore %g0, %o0, %o0 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 200801c: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 2008020: 82 10 3f ff mov -1, %g1 2008024: fa 26 60 34 st %i5, [ %i1 + 0x34 ] 2008028: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 200802c: 40 00 2a 9e call 2012aa4 <__errno> 2008030: b0 10 3f ff mov -1, %i0 2008034: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 2008038: 81 c7 e0 08 ret 200803c: 81 e8 00 00 restore =============================================================================== 020087e8 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 20087e8: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 20087ec: d0 06 00 00 ld [ %i0 ], %o0 20087f0: 40 00 19 cb call 200ef1c 20087f4: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 20087f8: 90 0a 20 03 and %o0, 3, %o0 20087fc: 80 a2 20 02 cmp %o0, 2 2008800: 12 80 00 1b bne 200886c 2008804: 80 a2 20 00 cmp %o0, 0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 2008808: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200880c: 80 a0 60 00 cmp %g1, 0 2008810: 12 80 00 0f bne 200884c 2008814: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 2008818: c2 06 20 08 ld [ %i0 + 8 ], %g1 200881c: 80 a0 60 00 cmp %g1, 0 2008820: 06 80 00 0c bl 2008850 2008824: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2008828: 7f ff ee b4 call 20042f8 200882c: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2008830: 80 a2 20 00 cmp %o0, 0 2008834: 02 80 00 12 be 200887c <== NEVER TAKEN 2008838: 82 10 20 01 mov 1, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 200883c: f0 22 20 14 st %i0, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_READ; 2008840: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 2008844: 7f ff ff 70 call 2008604 2008848: 91 e8 00 08 restore %g0, %o0, %o0 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 200884c: 82 10 3f ff mov -1, %g1 2008850: fa 26 20 34 st %i5, [ %i0 + 0x34 ] 2008854: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 2008858: 40 00 28 93 call 2012aa4 <__errno> 200885c: b0 10 3f ff mov -1, %i0 2008860: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 2008864: 81 c7 e0 08 ret 2008868: 81 e8 00 00 restore { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 200886c: 02 bf ff e7 be 2008808 <== NEVER TAKEN 2008870: ba 10 20 09 mov 9, %i5 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2008874: 10 bf ff f7 b 2008850 2008878: 82 10 3f ff mov -1, %g1 200887c: 10 bf ff f4 b 200884c <== NOT EXECUTED 2008880: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED =============================================================================== 0200888c : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 200888c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2008890: d0 06 00 00 ld [ %i0 ], %o0 2008894: 40 00 19 a2 call 200ef1c 2008898: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 200889c: 90 0a 20 03 and %o0, 3, %o0 20088a0: 90 02 3f ff add %o0, -1, %o0 20088a4: 80 a2 20 01 cmp %o0, 1 20088a8: 18 80 00 14 bgu 20088f8 20088ac: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 20088b0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20088b4: 80 a0 60 00 cmp %g1, 0 20088b8: 12 80 00 10 bne 20088f8 20088bc: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 20088c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 20088c4: 80 a0 60 00 cmp %g1, 0 20088c8: 06 80 00 0d bl 20088fc 20088cc: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 20088d0: 7f ff ee 8a call 20042f8 20088d4: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 20088d8: 80 a2 20 00 cmp %o0, 0 20088dc: 02 80 00 06 be 20088f4 <== NEVER TAKEN 20088e0: 82 10 20 02 mov 2, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 20088e4: f0 22 20 14 st %i0, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_WRITE; 20088e8: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 20088ec: 7f ff ff 46 call 2008604 20088f0: 91 e8 00 08 restore %g0, %o0, %o0 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 20088f4: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 20088f8: 82 10 3f ff mov -1, %g1 20088fc: fa 26 20 34 st %i5, [ %i0 + 0x34 ] 2008900: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 2008904: 40 00 28 68 call 2012aa4 <__errno> 2008908: b0 10 3f ff mov -1, %i0 200890c: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 2008910: 81 c7 e0 08 ret 2008914: 81 e8 00 00 restore =============================================================================== 0202ac3c : #include #include int chroot( const char *path ) { 202ac3c: 9d e3 bf 40 save %sp, -192, %sp /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 202ac40: 94 10 20 19 mov 0x19, %o2 202ac44: 92 10 00 18 mov %i0, %o1 202ac48: 90 07 bf a4 add %fp, -92, %o0 202ac4c: 17 00 81 c5 sethi %hi(0x2071400), %o3 202ac50: 96 12 e1 4c or %o3, 0x14c, %o3 ! 207154c 202ac54: 7f ff 7f 3e call 200a94c 202ac58: 98 02 ff fc add %o3, -4, %o4 202ac5c: 92 07 bf bc add %fp, -68, %o1 202ac60: 7f ff 80 0d call 200ac94 202ac64: 90 07 bf e0 add %fp, -32, %o0 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 202ac68: 7f ff 80 93 call 200aeb4 202ac6c: 90 07 bf e0 add %fp, -32, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 202ac70: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 202ac74: 3b 00 81 96 sethi %hi(0x2065800), %i5 202ac78: ba 17 63 04 or %i5, 0x304, %i5 ! 2065b04 202ac7c: 80 a0 40 1d cmp %g1, %i5 202ac80: 02 80 00 15 be 202acd4 202ac84: d0 27 bf fc st %o0, [ %fp + -4 ] rtems_filesystem_global_location_t *new_root_loc = 202ac88: 7f ff 80 58 call 200ade8 202ac8c: 90 07 bf fc add %fp, -4, %o0 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); 202ac90: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = 202ac94: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 202ac98: 9f c0 40 00 call %g1 202ac9c: b8 10 00 08 mov %o0, %i4 (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 202aca0: 80 a2 20 00 cmp %o0, 0 202aca4: 02 80 00 13 be 202acf0 202aca8: 01 00 00 00 nop static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 202acac: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 202acb0: 80 a0 40 1d cmp %g1, %i5 202acb4: 02 80 00 06 be 202accc <== NEVER TAKEN 202acb8: 01 00 00 00 nop errno = eno; 202acbc: 40 00 75 54 call 204820c <__errno> 202acc0: 01 00 00 00 nop 202acc4: 82 10 20 14 mov 0x14, %g1 ! 14 202acc8: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 202accc: 7f ff 80 27 call 200ad68 202acd0: 90 10 00 1c mov %i4, %o0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 202acd4: 7f ff 7f 41 call 200a9d8 202acd8: 90 07 bf a4 add %fp, -92, %o0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 202acdc: d0 07 bf fc ld [ %fp + -4 ], %o0 202ace0: 7f ff 80 22 call 200ad68 202ace4: b0 10 3f ff mov -1, %i0 } return rv; } 202ace8: 81 c7 e0 08 ret 202acec: 81 e8 00 00 restore rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); 202acf0: 40 00 05 97 call 202c34c 202acf4: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 202acf8: 80 a2 20 00 cmp %o0, 0 202acfc: 02 80 00 09 be 202ad20 202ad00: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 202ad04: 02 bf ff f2 be 202accc <== NEVER TAKEN 202ad08: 01 00 00 00 nop errno = ENOMEM; 202ad0c: 40 00 75 40 call 204820c <__errno> 202ad10: 01 00 00 00 nop 202ad14: 82 10 20 0c mov 0xc, %g1 ! c 202ad18: 10 bf ff ed b 202accc 202ad1c: c2 22 00 00 st %g1, [ %o0 ] (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); if (sc == RTEMS_SUCCESSFUL) { rtems_filesystem_global_location_assign( 202ad20: 3b 00 81 c5 sethi %hi(0x2071400), %i5 202ad24: d0 07 61 44 ld [ %i5 + 0x144 ], %o0 ! 2071544 202ad28: 92 10 00 1c mov %i4, %o1 202ad2c: 7f ff 80 25 call 200adc0 202ad30: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 202ad34: d2 07 bf fc ld [ %fp + -4 ], %o1 202ad38: d0 07 61 44 ld [ %i5 + 0x144 ], %o0 202ad3c: 7f ff 80 21 call 200adc0 202ad40: b0 10 20 00 clr %i0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 202ad44: 7f ff 7f 25 call 200a9d8 202ad48: 90 07 bf a4 add %fp, -92, %o0 202ad4c: 81 c7 e0 08 ret 202ad50: 81 e8 00 00 restore =============================================================================== 020079a0 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 20079a0: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 20079a4: 80 a6 60 00 cmp %i1, 0 20079a8: 02 80 00 2f be 2007a64 20079ac: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 20079b0: 02 80 00 19 be 2007a14 20079b4: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 20079b8: 02 80 00 12 be 2007a00 <== NEVER TAKEN 20079bc: 80 a6 20 02 cmp %i0, 2 return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 20079c0: 02 80 00 10 be 2007a00 20079c4: 80 a6 20 03 cmp %i0, 3 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 20079c8: 02 80 00 08 be 20079e8 20079cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 20079d0: 40 00 27 97 call 201182c <__errno> 20079d4: b0 10 3f ff mov -1, %i0 ! ffffffff 20079d8: 82 10 20 16 mov 0x16, %g1 20079dc: c2 22 00 00 st %g1, [ %o0 ] return 0; } 20079e0: 81 c7 e0 08 ret 20079e4: 81 e8 00 00 restore } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 20079e8: 40 00 27 91 call 201182c <__errno> 20079ec: b0 10 3f ff mov -1, %i0 20079f0: 82 10 20 58 mov 0x58, %g1 20079f4: c2 22 00 00 st %g1, [ %o0 ] 20079f8: 81 c7 e0 08 ret 20079fc: 81 e8 00 00 restore } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); 2007a00: 90 10 00 19 mov %i1, %o0 2007a04: 40 00 08 91 call 2009c48 <_TOD_Get_uptime_as_timespec> 2007a08: b0 10 20 00 clr %i0 return 0; 2007a0c: 81 c7 e0 08 ret 2007a10: 81 e8 00 00 restore struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007a14: 40 00 08 7b call 2009c00 <_TOD_Get_as_timestamp> 2007a18: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007a1c: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007a20: 94 10 20 00 clr %o2 2007a24: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007a28: 90 10 00 1c mov %i4, %o0 2007a2c: 96 12 e2 00 or %o3, 0x200, %o3 2007a30: 40 00 56 0f call 201d26c <__divdi3> 2007a34: 92 10 00 1d mov %i5, %o1 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007a38: 94 10 20 00 clr %o2 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007a3c: d2 26 40 00 st %o1, [ %i1 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007a40: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007a44: 90 10 00 1c mov %i4, %o0 2007a48: 96 12 e2 00 or %o3, 0x200, %o3 2007a4c: 92 10 00 1d mov %i5, %o1 2007a50: 40 00 56 ed call 201d604 <__moddi3> 2007a54: b0 10 20 00 clr %i0 2007a58: d2 26 60 04 st %o1, [ %i1 + 4 ] if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 2007a5c: 81 c7 e0 08 ret 2007a60: 81 e8 00 00 restore clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 2007a64: 40 00 27 72 call 201182c <__errno> 2007a68: b0 10 3f ff mov -1, %i0 2007a6c: 82 10 20 16 mov 0x16, %g1 2007a70: c2 22 00 00 st %g1, [ %o0 ] 2007a74: 81 c7 e0 08 ret 2007a78: 81 e8 00 00 restore =============================================================================== 0202cd24 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 202cd24: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 202cd28: 80 a6 60 00 cmp %i1, 0 202cd2c: 02 80 00 54 be 202ce7c <== NEVER TAKEN 202cd30: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 202cd34: 02 80 00 0c be 202cd64 202cd38: 80 a6 20 02 cmp %i0, 2 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 202cd3c: 02 80 00 4a be 202ce64 202cd40: 80 a6 20 03 cmp %i0, 3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 202cd44: 02 80 00 48 be 202ce64 202cd48: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 202cd4c: 40 00 6d 30 call 204820c <__errno> 202cd50: b0 10 3f ff mov -1, %i0 ! ffffffff 202cd54: 82 10 20 16 mov 0x16, %g1 202cd58: c2 22 00 00 st %g1, [ %o0 ] return 0; } 202cd5c: 81 c7 e0 08 ret 202cd60: 81 e8 00 00 restore { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 202cd64: c4 06 40 00 ld [ %i1 ], %g2 202cd68: 03 08 76 b9 sethi %hi(0x21dae400), %g1 202cd6c: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 202cd70: 80 a0 80 01 cmp %g2, %g1 202cd74: 08 80 00 42 bleu 202ce7c 202cd78: 03 00 81 d5 sethi %hi(0x2075400), %g1 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 202cd7c: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 2075730 <_Thread_Dispatch_disable_level> 202cd80: 84 00 a0 01 inc %g2 202cd84: c4 20 63 30 st %g2, [ %g1 + 0x330 ] return _Thread_Dispatch_disable_level; 202cd88: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 202cd8c: d6 06 40 00 ld [ %i1 ], %o3 202cd90: e6 06 60 04 ld [ %i1 + 4 ], %l3 202cd94: 95 3a e0 1f sra %o3, 0x1f, %o2 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 202cd98: 83 2a a0 03 sll %o2, 3, %g1 202cd9c: 9b 2a e0 03 sll %o3, 3, %o5 202cda0: 89 32 e0 1d srl %o3, 0x1d, %g4 202cda4: 98 11 00 01 or %g4, %g1, %o4 202cda8: 83 33 60 1b srl %o5, 0x1b, %g1 202cdac: 85 2b 20 05 sll %o4, 5, %g2 202cdb0: 87 2b 60 05 sll %o5, 5, %g3 202cdb4: 84 10 40 02 or %g1, %g2, %g2 202cdb8: 86 a0 c0 0d subcc %g3, %o5, %g3 202cdbc: 83 30 e0 1a srl %g3, 0x1a, %g1 202cdc0: 84 60 80 0c subx %g2, %o4, %g2 202cdc4: bb 28 e0 06 sll %g3, 6, %i5 202cdc8: b9 28 a0 06 sll %g2, 6, %i4 202cdcc: 86 a7 40 03 subcc %i5, %g3, %g3 202cdd0: b8 10 40 1c or %g1, %i4, %i4 202cdd4: 84 67 00 02 subx %i4, %g2, %g2 202cdd8: 86 80 c0 0b addcc %g3, %o3, %g3 202cddc: 83 30 e0 1e srl %g3, 0x1e, %g1 202cde0: 84 40 80 0a addx %g2, %o2, %g2 202cde4: b7 28 e0 02 sll %g3, 2, %i3 202cde8: b5 28 a0 02 sll %g2, 2, %i2 202cdec: 86 80 c0 1b addcc %g3, %i3, %g3 202cdf0: b4 10 40 1a or %g1, %i2, %i2 202cdf4: 83 30 e0 1e srl %g3, 0x1e, %g1 202cdf8: 84 40 80 1a addx %g2, %i2, %g2 202cdfc: b3 28 e0 02 sll %g3, 2, %i1 202ce00: b1 28 a0 02 sll %g2, 2, %i0 202ce04: 86 80 c0 19 addcc %g3, %i1, %g3 202ce08: b0 10 40 18 or %g1, %i0, %i0 202ce0c: a3 28 e0 02 sll %g3, 2, %l1 202ce10: 84 40 80 18 addx %g2, %i0, %g2 202ce14: 83 30 e0 1e srl %g3, 0x1e, %g1 202ce18: a1 28 a0 02 sll %g2, 2, %l0 202ce1c: 86 80 c0 11 addcc %g3, %l1, %g3 202ce20: a0 10 40 10 or %g1, %l0, %l0 202ce24: 84 40 80 10 addx %g2, %l0, %g2 202ce28: 83 28 e0 09 sll %g3, 9, %g1 202ce2c: 89 28 a0 09 sll %g2, 9, %g4 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 202ce30: 90 07 bf f8 add %fp, -8, %o0 202ce34: b9 30 e0 17 srl %g3, 0x17, %i4 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 202ce38: a5 3c e0 1f sra %l3, 0x1f, %l2 202ce3c: 86 84 c0 01 addcc %l3, %g1, %g3 202ce40: 84 17 00 04 or %i4, %g4, %g2 202ce44: 84 44 80 02 addx %l2, %g2, %g2 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 202ce48: b0 10 20 00 clr %i0 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 202ce4c: 40 00 06 93 call 202e898 <_TOD_Set_with_timestamp> 202ce50: c4 3f bf f8 std %g2, [ %fp + -8 ] if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 202ce54: 7f ff 8f 39 call 2010b38 <_Thread_Enable_dispatch> 202ce58: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 202ce5c: 81 c7 e0 08 ret 202ce60: 81 e8 00 00 restore else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 202ce64: 40 00 6c ea call 204820c <__errno> 202ce68: b0 10 3f ff mov -1, %i0 202ce6c: 82 10 20 58 mov 0x58, %g1 202ce70: c2 22 00 00 st %g1, [ %o0 ] 202ce74: 81 c7 e0 08 ret 202ce78: 81 e8 00 00 restore if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); 202ce7c: 40 00 6c e4 call 204820c <__errno> 202ce80: b0 10 3f ff mov -1, %i0 202ce84: 82 10 20 16 mov 0x16, %g1 202ce88: c2 22 00 00 st %g1, [ %o0 ] 202ce8c: 81 c7 e0 08 ret 202ce90: 81 e8 00 00 restore =============================================================================== 02003720 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2003720: 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) { 2003724: 39 00 80 89 sethi %hi(0x2022400), %i4 2003728: e0 07 20 58 ld [ %i4 + 0x58 ], %l0 ! 2022458 200372c: 03 00 80 89 sethi %hi(0x2022400), %g1 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2003730: ba 10 00 18 mov %i0, %i5 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 2003734: 80 a6 00 10 cmp %i0, %l0 2003738: 0a 80 00 16 bcs 2003790 200373c: e2 00 60 5c ld [ %g1 + 0x5c ], %l1 rtems_disk_device_table *table = disktab; 2003740: 27 00 80 89 sethi %hi(0x2022400), %l3 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2003744: a5 2c 20 01 sll %l0, 1, %l2 if (major >= new_size) { 2003748: 80 a6 00 12 cmp %i0, %l2 200374c: 0a 80 00 03 bcs 2003758 <== NEVER TAKEN 2003750: d0 04 e0 5c ld [ %l3 + 0x5c ], %o0 new_size = major + 1; 2003754: a4 06 20 01 add %i0, 1, %l2 } table = realloc(table, new_size * sizeof(*table)); 2003758: 93 2c a0 03 sll %l2, 3, %o1 200375c: 40 00 09 11 call 2005ba0 2003760: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2003764: 80 a2 20 00 cmp %o0, 0 2003768: 02 80 00 1b be 20037d4 <== ALWAYS TAKEN 200376c: a2 10 00 08 mov %o0, %l1 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003770: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED 2003774: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED 2003778: 92 10 20 00 clr %o1 <== NOT EXECUTED 200377c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED 2003780: 40 00 46 0d call 2014fb4 <== NOT EXECUTED 2003784: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 2003788: e2 24 e0 5c st %l1, [ %l3 + 0x5c ] <== NOT EXECUTED disktab_size = new_size; 200378c: e4 27 20 58 st %l2, [ %i4 + 0x58 ] <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2003790: 83 2f 60 03 sll %i5, 3, %g1 2003794: e0 04 40 01 ld [ %l1 + %g1 ], %l0 2003798: a2 04 40 01 add %l1, %g1, %l1 200379c: 80 a4 20 00 cmp %l0, 0 20037a0: 02 80 00 0f be 20037dc 20037a4: e4 04 60 04 ld [ %l1 + 4 ], %l2 20037a8: 80 a6 40 12 cmp %i1, %l2 20037ac: 1a 80 00 0d bcc 20037e0 20037b0: 80 a4 a0 00 cmp %l2, 0 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 20037b4: 83 2e 60 02 sll %i1, 2, %g1 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 20037b8: b8 84 00 01 addcc %l0, %g1, %i4 20037bc: 02 80 00 06 be 20037d4 <== NEVER TAKEN 20037c0: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 20037c4: c2 04 00 01 ld [ %l0 + %g1 ], %g1 20037c8: 80 a0 60 00 cmp %g1, 0 20037cc: 02 80 00 20 be 200384c 20037d0: b0 10 20 0c mov 0xc, %i0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 20037d4: 81 c7 e0 08 ret 20037d8: 81 e8 00 00 restore if (disktab [major].minor == NULL || minor >= disktab[major].size) { 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) { 20037dc: 80 a4 a0 00 cmp %l2, 0 20037e0: 12 80 00 15 bne 2003834 20037e4: b8 10 20 08 mov 8, %i4 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 20037e8: 80 a6 40 1c cmp %i1, %i4 20037ec: 3a 80 00 02 bcc,a 20037f4 20037f0: b8 06 60 01 add %i1, 1, %i4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 20037f4: 90 10 00 10 mov %l0, %o0 20037f8: 93 2f 20 02 sll %i4, 2, %o1 20037fc: 40 00 08 e9 call 2005ba0 2003800: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2003804: 80 a2 20 00 cmp %o0, 0 2003808: 02 bf ff f3 be 20037d4 200380c: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003810: 94 27 00 12 sub %i4, %l2, %o2 2003814: 91 2c a0 02 sll %l2, 2, %o0 2003818: 92 10 20 00 clr %o1 200381c: 90 04 00 08 add %l0, %o0, %o0 2003820: 40 00 45 e5 call 2014fb4 2003824: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2003828: e0 24 40 00 st %l0, [ %l1 ] disktab [major].size = new_size; 200382c: 10 bf ff e2 b 20037b4 2003830: f8 24 60 04 st %i4, [ %l1 + 4 ] rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 2003834: b9 2c a0 01 sll %l2, 1, %i4 } if (minor >= new_size) { 2003838: 80 a6 40 1c cmp %i1, %i4 200383c: 0a bf ff ef bcs 20037f8 <== ALWAYS TAKEN 2003840: 90 10 00 10 mov %l0, %o0 2003844: 10 bf ff ed b 20037f8 <== NOT EXECUTED 2003848: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 200384c: 90 10 20 38 mov 0x38, %o0 2003850: 40 00 06 01 call 2005054 2003854: b0 10 20 1a mov 0x1a, %i0 if (dd == NULL) { 2003858: 80 a2 20 00 cmp %o0, 0 200385c: 02 bf ff de be 20037d4 <== NEVER TAKEN 2003860: a0 10 00 08 mov %o0, %l0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2003864: 80 a6 a0 00 cmp %i2, 0 2003868: 02 80 00 0f be 20038a4 200386c: a2 10 20 00 clr %l1 alloc_name = strdup(name); 2003870: 40 00 47 31 call 2015534 2003874: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2003878: a2 92 20 00 orcc %o0, 0, %l1 200387c: 02 80 00 15 be 20038d0 <== NEVER TAKEN 2003880: b4 10 00 08 mov %o0, %i2 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2003884: 94 10 00 1d mov %i5, %o2 2003888: 13 00 00 18 sethi %hi(0x6000), %o1 200388c: 96 10 00 19 mov %i1, %o3 2003890: 40 00 06 6b call 200523c 2003894: 92 12 61 ff or %o1, 0x1ff, %o1 2003898: 80 a2 20 00 cmp %o0, 0 200389c: 06 80 00 0b bl 20038c8 <== NEVER TAKEN 20038a0: 90 10 00 1a mov %i2, %o0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 20038a4: fa 24 00 00 st %i5, [ %l0 ] 20038a8: f2 24 20 04 st %i1, [ %l0 + 4 ] dd->name = alloc_name; 20038ac: e2 24 20 10 st %l1, [ %l0 + 0x10 ] dd->uses = 0; 20038b0: c0 24 20 14 clr [ %l0 + 0x14 ] dd->deleted = false; 20038b4: c0 2c 20 30 clrb [ %l0 + 0x30 ] *dd_entry = dd; 20038b8: e0 27 00 00 st %l0, [ %i4 ] *dd_ptr = dd; 20038bc: e0 26 c0 00 st %l0, [ %i3 ] return RTEMS_SUCCESSFUL; } 20038c0: 81 c7 e0 08 ret 20038c4: 91 e8 20 00 restore %g0, 0, %o0 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 20038c8: 40 00 04 62 call 2004a50 <== NOT EXECUTED 20038cc: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED free(dd); 20038d0: 40 00 04 60 call 2004a50 <== NOT EXECUTED 20038d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 20038d8: 81 c7 e0 08 ret <== NOT EXECUTED 20038dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02004dcc : * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 2004dcc: 9d e3 bf 98 save %sp, -104, %sp return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004dd0: 90 10 20 01 mov 1, %o0 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 2004dd4: c0 26 40 00 clr [ %i1 ] if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004dd8: 40 00 03 55 call 2005b2c 2004ddc: 92 10 20 28 mov 0x28, %o1 * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 2004de0: 82 10 00 18 mov %i0, %g1 return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004de4: ba 10 00 08 mov %o0, %i5 2004de8: 80 a2 20 00 cmp %o0, 0 2004dec: 02 80 00 45 be 2004f00 <== NEVER TAKEN 2004df0: b0 10 20 1a mov 0x1a, %i0 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 2004df4: f0 08 60 0a ldub [ %g1 + 0xa ], %i0 2004df8: c6 08 60 0b ldub [ %g1 + 0xb ], %g3 2004dfc: d6 08 60 08 ldub [ %g1 + 8 ], %o3 2004e00: d8 08 60 09 ldub [ %g1 + 9 ], %o4 part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004e04: da 08 60 0c ldub [ %g1 + 0xc ], %o5 2004e08: de 08 60 0d ldub [ %g1 + 0xd ], %o7 2004e0c: f8 08 60 0e ldub [ %g1 + 0xe ], %i4 2004e10: c8 08 60 0f ldub [ %g1 + 0xf ], %g4 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 2004e14: f0 2f bf fe stb %i0, [ %fp + -2 ] 2004e18: c6 2f bf ff stb %g3, [ %fp + -1 ] 2004e1c: d6 2f bf fc stb %o3, [ %fp + -4 ] 2004e20: d8 2f bf fd stb %o4, [ %fp + -3 ] part_desc->start = LE_TO_CPU_U32(temp); 2004e24: c4 07 bf fc ld [ %fp + -4 ], %g2 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004e28: c6 08 60 04 ldub [ %g1 + 4 ], %g3 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004e2c: f0 08 40 00 ldub [ %g1 ], %i0 /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004e30: da 2f bf fc stb %o5, [ %fp + -4 ] 2004e34: de 2f bf fd stb %o7, [ %fp + -3 ] 2004e38: f8 2f bf fe stb %i4, [ %fp + -2 ] 2004e3c: c8 2f bf ff stb %g4, [ %fp + -1 ] part_desc->size = LE_TO_CPU_U32(temp); 2004e40: c2 07 bf fc ld [ %fp + -4 ], %g1 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2004e44: 9f 30 a0 08 srl %g2, 8, %o7 2004e48: 9e 0b e0 ff and %o7, 0xff, %o7 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e4c: 9f 2b e0 10 sll %o7, 0x10, %o7 2004e50: 9b 28 a0 18 sll %g2, 0x18, %o5 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004e54: 88 18 e0 85 xor %g3, 0x85, %g4 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2004e58: b9 30 a0 18 srl %g2, 0x18, %i4 2004e5c: 80 a0 00 04 cmp %g0, %g4 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e60: b8 13 40 1c or %o5, %i4, %i4 2004e64: b8 17 00 0f or %i4, %o7, %i4 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2004e68: 9f 30 60 08 srl %g1, 8, %o7 2004e6c: 9e 0b e0 ff and %o7, 0xff, %o7 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e70: 9f 2b e0 10 sll %o7, 0x10, %o7 2004e74: 88 60 3f ff subx %g0, -1, %g4 2004e78: 9b 28 60 18 sll %g1, 0x18, %o5 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004e7c: 85 30 a0 10 srl %g2, 0x10, %g2 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004e80: f0 2a 00 00 stb %i0, [ %o0 ] 2004e84: 84 08 a0 ff and %g2, 0xff, %g2 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004e88: c6 2a 20 01 stb %g3, [ %o0 + 1 ] byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e8c: 85 28 a0 08 sll %g2, 8, %g2 2004e90: 84 17 00 02 or %i4, %g2, %g2 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2004e94: b9 30 60 18 srl %g1, 0x18, %i4 /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); 2004e98: c4 22 20 04 st %g2, [ %o0 + 4 ] byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e9c: b8 13 40 1c or %o5, %i4, %i4 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004ea0: 83 30 60 10 srl %g1, 0x10, %g1 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004ea4: b8 17 00 0f or %i4, %o7, %i4 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004ea8: 82 08 60 ff and %g1, 0xff, %g1 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004eac: 9e 18 e0 05 xor %g3, 5, %o7 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004eb0: 83 28 60 08 sll %g1, 8, %g1 2004eb4: 80 a0 00 0f cmp %g0, %o7 2004eb8: b8 17 00 01 or %i4, %g1, %i4 /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); 2004ebc: f8 22 20 08 st %i4, [ %o0 + 8 ] * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004ec0: 82 60 3f ff subx %g0, -1, %g1 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004ec4: 80 91 00 01 orcc %g4, %g1, %g0 2004ec8: 12 80 00 10 bne 2004f08 2004ecc: 92 10 00 03 mov %g3, %o1 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 2004ed0: 11 00 80 95 sethi %hi(0x2025400), %o0 2004ed4: 94 10 20 06 mov 6, %o2 2004ed8: 40 00 45 c9 call 20165fc 2004edc: 90 12 21 e8 or %o0, 0x1e8, %o0 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004ee0: 80 a2 20 00 cmp %o0, 0 2004ee4: 02 80 00 04 be 2004ef4 2004ee8: 80 a7 20 00 cmp %i4, 0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 2004eec: 32 80 00 08 bne,a 2004f0c <== ALWAYS TAKEN 2004ef0: fa 26 40 00 st %i5, [ %i1 ] *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); 2004ef4: 90 10 00 1d mov %i5, %o0 2004ef8: 40 00 03 de call 2005e70 2004efc: b0 10 20 00 clr %i0 } return RTEMS_SUCCESSFUL; } 2004f00: 81 c7 e0 08 ret 2004f04: 81 e8 00 00 restore * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; 2004f08: fa 26 40 00 st %i5, [ %i1 ] } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; 2004f0c: 81 c7 e0 08 ret 2004f10: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002ccc : #endif #include "devfs.h" void devFS_Show(void) { 2002ccc: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002cd0: 03 00 80 6d sethi %hi(0x201b400), %g1 2002cd4: c2 00 61 00 ld [ %g1 + 0x100 ], %g1 ! 201b500 if (rootloc->ops == &devFS_ops) { 2002cd8: 05 00 80 66 sethi %hi(0x2019800), %g2 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002cdc: c2 00 60 04 ld [ %g1 + 4 ], %g1 if (rootloc->ops == &devFS_ops) { 2002ce0: 84 10 a1 14 or %g2, 0x114, %g2 2002ce4: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 2002ce8: 80 a0 c0 02 cmp %g3, %g2 2002cec: 22 80 00 04 be,a 2002cfc <== ALWAYS TAKEN 2002cf0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2002cf4: 81 c7 e0 08 ret <== NOT EXECUTED 2002cf8: 81 e8 00 00 restore <== NOT EXECUTED static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->immutable_fs_info; 2002cfc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 2002d00: f4 00 60 04 ld [ %g1 + 4 ], %i2 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002d04: 80 a6 a0 00 cmp %i2, 0 2002d08: 02 bf ff fb be 2002cf4 <== NEVER TAKEN 2002d0c: fa 00 40 00 ld [ %g1 ], %i5 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002d10: 31 00 80 66 sethi %hi(0x2019800), %i0 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( 2002d14: 33 00 80 66 sethi %hi(0x2019800), %i1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002d18: 39 00 80 66 sethi %hi(0x2019800), %i4 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002d1c: b6 10 20 00 clr %i3 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002d20: b0 16 21 68 or %i0, 0x168, %i0 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( 2002d24: b2 16 61 78 or %i1, 0x178, %i1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002d28: b8 17 21 70 or %i4, 0x170, %i4 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { 2002d2c: c2 07 40 00 ld [ %i5 ], %g1 2002d30: 80 a0 60 00 cmp %g1, 0 2002d34: 22 80 00 16 be,a 2002d8c 2002d38: b6 06 e0 01 inc %i3 size_t j = 0; size_t m = current->namelen; 2002d3c: e2 07 60 04 ld [ %i5 + 4 ], %l1 printk("/"); 2002d40: 40 00 04 f0 call 2004100 2002d44: 90 10 00 18 mov %i0, %o0 for (j = 0; j < m; ++j) { 2002d48: 80 a4 60 00 cmp %l1, 0 2002d4c: 22 80 00 0c be,a 2002d7c <== NEVER TAKEN 2002d50: d2 07 60 08 ld [ %i5 + 8 ], %o1 <== NOT EXECUTED 2002d54: a0 10 20 00 clr %l0 printk("%c", current->name [j]); 2002d58: c2 07 40 00 ld [ %i5 ], %g1 2002d5c: 90 10 00 1c mov %i4, %o0 2002d60: d2 48 40 10 ldsb [ %g1 + %l0 ], %o1 2002d64: 40 00 04 e7 call 2004100 2002d68: a0 04 20 01 inc %l0 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 2002d6c: 80 a4 00 11 cmp %l0, %l1 2002d70: 32 bf ff fb bne,a 2002d5c 2002d74: c2 07 40 00 ld [ %i5 ], %g1 printk("%c", current->name [j]); } printk( 2002d78: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002d7c: d4 07 60 0c ld [ %i5 + 0xc ], %o2 2002d80: 40 00 04 e0 call 2004100 2002d84: 90 10 00 19 mov %i1, %o0 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002d88: b6 06 e0 01 inc %i3 2002d8c: 80 a6 c0 1a cmp %i3, %i2 2002d90: 12 bf ff e7 bne 2002d2c 2002d94: ba 07 60 14 add %i5, 0x14, %i5 2002d98: 81 c7 e0 08 ret 2002d9c: 81 e8 00 00 restore =============================================================================== 0200c2ac : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200c2ac: 9d e3 bf a0 save %sp, -96, %sp static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->immutable_fs_info; 200c2b0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 static inline const char *rtems_filesystem_eval_path_get_path( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->path; 200c2b4: e2 06 00 00 ld [ %i0 ], %l1 200c2b8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 static inline size_t rtems_filesystem_eval_path_get_pathlen( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->pathlen; 200c2bc: f2 06 20 04 ld [ %i0 + 4 ], %i1 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 200c2c0: e0 00 60 04 ld [ %g1 + 4 ], %l0 devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200c2c4: 80 a4 20 00 cmp %l0, 0 200c2c8: 02 80 00 2f be 200c384 200c2cc: fa 00 40 00 ld [ %g1 ], %i5 ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200c2d0: b4 10 20 00 clr %i2 devFS_node *free_node = NULL; 200c2d4: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200c2d8: 10 80 00 0a b 200c300 200c2dc: b8 10 20 00 clr %i4 200c2e0: 80 a6 a0 00 cmp %i2, 0 200c2e4: 12 80 00 1a bne 200c34c 200c2e8: 80 a6 e0 00 cmp %i3, 0 200c2ec: b8 07 20 01 inc %i4 200c2f0: 80 a7 00 10 cmp %i4, %l0 200c2f4: 02 80 00 18 be 200c354 200c2f8: ba 07 60 14 add %i5, 0x14, %i5 200c2fc: 82 10 00 1b mov %i3, %g1 devFS_node *current = nodes + i; if (current->name != NULL) { 200c300: d0 07 40 00 ld [ %i5 ], %o0 200c304: 80 a2 20 00 cmp %o0, 0 200c308: 02 bf ff f6 be 200c2e0 200c30c: b6 10 00 1d mov %i5, %i3 if ( 200c310: c4 07 60 04 ld [ %i5 + 4 ], %g2 200c314: 80 a6 40 02 cmp %i1, %g2 200c318: 12 bf ff f2 bne 200c2e0 200c31c: b6 10 00 01 mov %g1, %i3 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200c320: 92 10 00 11 mov %l1, %o1 200c324: 40 00 0d 83 call 200f930 200c328: 94 10 00 19 mov %i1, %o2 200c32c: 80 a2 20 00 cmp %o0, 0 200c330: 12 bf ff ed bne 200c2e4 200c334: 80 a6 a0 00 cmp %i2, 0 200c338: b4 10 00 1d mov %i5, %i2 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200c33c: 80 a6 a0 00 cmp %i2, 0 200c340: 22 bf ff ec be,a 200c2f0 <== NEVER TAKEN 200c344: b8 07 20 01 inc %i4 <== NOT EXECUTED 200c348: 80 a6 e0 00 cmp %i3, 0 200c34c: 22 bf ff e9 be,a 200c2f0 200c350: b8 07 20 01 inc %i4 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 200c354: 80 a6 a0 00 cmp %i2, 0 200c358: 02 80 00 0d be 200c38c 200c35c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200c360: 80 88 60 40 btst 0x40, %g1 200c364: 12 80 00 06 bne 200c37c 200c368: 01 00 00 00 nop currentloc->node_access = node; 200c36c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 200c370: c0 26 20 04 clr [ %i0 + 4 ] 200c374: 81 c7 e0 08 ret 200c378: 81 e8 00 00 restore rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 200c37c: 7f ff e3 01 call 2004f80 200c380: 93 e8 20 11 restore %g0, 0x11, %o1 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 200c384: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; 200c388: b6 10 20 00 clr %i3 rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 200c38c: 80 88 60 20 btst 0x20, %g1 200c390: 02 80 00 0b be 200c3bc <== NEVER TAKEN 200c394: 80 a6 e0 00 cmp %i3, 0 if (free_node != NULL) { 200c398: 02 80 00 0b be 200c3c4 200c39c: 82 10 21 ff mov 0x1ff, %g1 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200c3a0: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] currentloc->node_access = free_node; 200c3a4: f6 26 20 20 st %i3, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200c3a8: e2 26 20 08 st %l1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200c3ac: f2 26 20 0c st %i1, [ %i0 + 0xc ] static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 200c3b0: c0 26 20 04 clr [ %i0 + 4 ] 200c3b4: 81 c7 e0 08 ret 200c3b8: 81 e8 00 00 restore rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200c3bc: 7f ff e2 f1 call 2004f80 <== NOT EXECUTED 200c3c0: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED rtems_filesystem_eval_path_get_path(ctx), rtems_filesystem_eval_path_get_pathlen(ctx) ); rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); 200c3c4: 7f ff e2 ef call 2004f80 200c3c8: 93 e8 20 1c restore %g0, 0x1c, %o1 =============================================================================== 02003834 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003834: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 2003838: 80 a6 a0 03 cmp %i2, 3 200383c: 22 80 00 18 be,a 200389c 2003840: c2 4e 40 00 ldsb [ %i1 ], %g1 if (S_ISBLK(mode) || S_ISCHR(mode)) { 2003844: 03 00 00 3c sethi %hi(0xf000), %g1 2003848: 05 00 00 08 sethi %hi(0x2000), %g2 200384c: 82 0e c0 01 and %i3, %g1, %g1 2003850: 80 a0 40 02 cmp %g1, %g2 2003854: 12 80 00 28 bne 20038f4 2003858: 05 00 00 18 sethi %hi(0x6000), %g2 char *dupname = malloc(namelen); 200385c: 40 00 02 48 call 200417c 2003860: 90 10 00 1a mov %i2, %o0 if (dupname != NULL) { 2003864: 84 92 20 00 orcc %o0, 0, %g2 2003868: 02 80 00 2c be 2003918 200386c: 92 10 00 19 mov %i1, %o1 devFS_node *node = parentloc->node_access; 2003870: c2 06 20 08 ld [ %i0 + 8 ], %g1 node->name = dupname; 2003874: c4 20 40 00 st %g2, [ %g1 ] node->namelen = namelen; 2003878: f4 20 60 04 st %i2, [ %g1 + 4 ] node->major = rtems_filesystem_dev_major_t(dev); 200387c: f8 20 60 08 st %i4, [ %g1 + 8 ] node->minor = rtems_filesystem_dev_minor_t(dev); 2003880: fa 20 60 0c st %i5, [ %g1 + 0xc ] node->mode = mode; 2003884: f6 20 60 10 st %i3, [ %g1 + 0x10 ] memcpy(dupname, name, namelen); 2003888: 94 10 00 1a mov %i2, %o2 200388c: 40 00 30 57 call 200f9e8 2003890: b0 10 20 00 clr %i0 2003894: 81 c7 e0 08 ret 2003898: 81 e8 00 00 restore dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 200389c: 80 a0 60 64 cmp %g1, 0x64 20038a0: 12 bf ff ea bne 2003848 <== NEVER TAKEN 20038a4: 03 00 00 3c sethi %hi(0xf000), %g1 20038a8: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1 20038ac: 80 a0 60 65 cmp %g1, 0x65 20038b0: 12 bf ff e6 bne 2003848 <== NEVER TAKEN 20038b4: 03 00 00 3c sethi %hi(0xf000), %g1 20038b8: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1 20038bc: 80 a0 60 76 cmp %g1, 0x76 20038c0: 12 bf ff e2 bne 2003848 <== NEVER TAKEN 20038c4: 03 00 00 3c sethi %hi(0xf000), %g1 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 20038c8: b6 0e c0 01 and %i3, %g1, %i3 20038cc: 03 00 00 10 sethi %hi(0x4000), %g1 20038d0: 80 a6 c0 01 cmp %i3, %g1 20038d4: 02 bf ff f0 be 2003894 <== ALWAYS TAKEN 20038d8: b0 10 20 00 clr %i0 errno = ENOTSUP; 20038dc: 40 00 2d 9a call 200ef44 <__errno> <== NOT EXECUTED 20038e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20038e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20038e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } } return rv; } 20038ec: 81 c7 e0 08 ret <== NOT EXECUTED 20038f0: 81 e8 00 00 restore <== NOT EXECUTED ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { if (S_ISBLK(mode) || S_ISCHR(mode)) { 20038f4: 80 a0 40 02 cmp %g1, %g2 20038f8: 02 bf ff d9 be 200385c 20038fc: 01 00 00 00 nop } else { errno = ENOMEM; rv = -1; } } else { errno = ENOTSUP; 2003900: 40 00 2d 91 call 200ef44 <__errno> 2003904: b0 10 3f ff mov -1, %i0 ! ffffffff 2003908: 82 10 20 86 mov 0x86, %g1 200390c: c2 22 00 00 st %g1, [ %o0 ] 2003910: 81 c7 e0 08 ret 2003914: 81 e8 00 00 restore node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; 2003918: 40 00 2d 8b call 200ef44 <__errno> 200391c: b0 10 3f ff mov -1, %i0 2003920: 82 10 20 0c mov 0xc, %g1 2003924: c2 22 00 00 st %g1, [ %o0 ] 2003928: 81 c7 e0 08 ret 200392c: 81 e8 00 00 restore =============================================================================== 020036a8 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 20036a8: 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); 20036ac: 03 00 80 89 sethi %hi(0x2022400), %g1 20036b0: d0 00 60 54 ld [ %g1 + 0x54 ], %o0 ! 2022454 20036b4: 92 10 20 00 clr %o1 20036b8: 94 10 20 00 clr %o2 20036bc: 40 00 16 a7 call 2009158 20036c0: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 20036c4: 80 a2 20 00 cmp %o0, 0 20036c8: 12 80 00 05 bne 20036dc <== NEVER TAKEN 20036cc: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 20036d0: 03 00 80 89 sethi %hi(0x2022400), %g1 return RTEMS_SUCCESSFUL; 20036d4: 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; 20036d8: c4 28 60 50 stb %g2, [ %g1 + 0x50 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 20036dc: 81 c7 e0 08 ret 20036e0: 81 e8 00 00 restore =============================================================================== 020036e4 : static void disk_unlock(void) { 20036e4: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 20036e8: 03 00 80 89 sethi %hi(0x2022400), %g1 20036ec: d0 00 60 54 ld [ %g1 + 0x54 ], %o0 ! 2022454 static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 20036f0: 03 00 80 89 sethi %hi(0x2022400), %g1 20036f4: c0 28 60 50 clrb [ %g1 + 0x50 ] ! 2022450 sc = rtems_semaphore_release(diskdevs_mutex); 20036f8: 40 00 16 e2 call 2009280 20036fc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 2003700: 80 a2 20 00 cmp %o0, 0 2003704: 12 80 00 04 bne 2003714 <== NEVER TAKEN 2003708: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 200370c: 81 c7 e0 08 ret 2003710: 81 e8 00 00 restore /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2003714: 40 00 18 3d call 2009808 <== NOT EXECUTED 2003718: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02005548 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 2005548: 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); 200554c: 7f ff f4 5b call 20026b8 2005550: ba 10 00 18 mov %i0, %i5 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2005554: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 2005558: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 200555c: 80 a0 80 01 cmp %g2, %g1 2005560: 02 80 00 14 be 20055b0 <== ALWAYS TAKEN 2005564: 01 00 00 00 nop tty->rawOutBufState = rob_wait; 2005568: b8 10 20 02 mov 2, %i4 ! 2 <== NOT EXECUTED 200556c: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 2005570: 7f ff f4 56 call 20026c8 <== NOT EXECUTED 2005574: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 2005578: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED 200557c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2005580: 40 00 09 eb call 2007d2c <== NOT EXECUTED 2005584: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2005588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200558c: 12 80 00 0b bne 20055b8 <== NOT EXECUTED 2005590: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2005594: 7f ff f4 49 call 20026b8 <== NOT EXECUTED 2005598: 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) { 200559c: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED 20055a0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED 20055a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20055a8: 32 bf ff f2 bne,a 2005570 <== NOT EXECUTED 20055ac: 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); 20055b0: 7f ff f4 46 call 20026c8 20055b4: 91 e8 00 08 restore %g0, %o0, %o0 tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 20055b8: 40 00 0b a1 call 200843c <== NOT EXECUTED =============================================================================== 02003d4c : int dup2( int fildes, int fildes2 ) { 2003d4c: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003d50: 90 10 00 18 mov %i0, %o0 int dup2( int fildes, int fildes2 ) { 2003d54: ba 10 00 18 mov %i0, %i5 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003d58: 92 07 bf b8 add %fp, -72, %o1 2003d5c: 40 00 01 e8 call 20044fc 2003d60: b0 10 3f ff mov -1, %i0 if ( status == -1 ) 2003d64: 80 a2 3f ff cmp %o0, -1 2003d68: 02 80 00 0b be 2003d94 2003d6c: 90 10 00 19 mov %i1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003d70: 40 00 01 e3 call 20044fc 2003d74: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003d78: 80 a2 3f ff cmp %o0, -1 2003d7c: 02 80 00 06 be 2003d94 <== NEVER TAKEN 2003d80: 90 10 00 1d mov %i5, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2003d84: 92 10 20 00 clr %o1 2003d88: 40 00 00 ae call 2004040 2003d8c: 94 10 00 19 mov %i1, %o2 2003d90: b0 10 00 08 mov %o0, %i0 } 2003d94: 81 c7 e0 08 ret 2003d98: 81 e8 00 00 restore =============================================================================== 020062e8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 20062e8: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 20062ec: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20062f0: 80 88 62 00 btst 0x200, %g1 20062f4: 02 80 00 08 be 2006314 <== NEVER TAKEN 20062f8: 03 00 80 77 sethi %hi(0x201dc00), %g1 iscntrl(c) && (c != '\t') && (c != '\n')) { 20062fc: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 ! 201dfe0 <__ctype_ptr__> 2006300: 82 00 40 18 add %g1, %i0, %g1 2006304: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2006308: 80 88 60 20 btst 0x20, %g1 200630c: 12 80 00 07 bne 2006328 2006310: 80 a6 20 09 cmp %i0, 9 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2006314: 90 10 00 18 mov %i0, %o0 2006318: 7f ff ff 8d call 200614c 200631c: 92 10 00 19 mov %i1, %o1 2006320: 81 c7 e0 08 ret 2006324: 81 e8 00 00 restore */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2006328: 02 bf ff fc be 2006318 200632c: 90 10 00 18 mov %i0, %o0 2006330: 80 a6 20 0a cmp %i0, 0xa 2006334: 02 bf ff f9 be 2006318 2006338: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 200633c: b0 1e 20 40 xor %i0, 0x40, %i0 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2006340: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 2006344: f0 2f bf f9 stb %i0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2006348: 90 07 bf f8 add %fp, -8, %o0 200634c: 92 10 20 02 mov 2, %o1 2006350: 7f ff ff 2f call 200600c 2006354: 94 10 00 19 mov %i1, %o2 tty->column += 2; 2006358: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 200635c: 82 00 60 02 add %g1, 2, %g1 2006360: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 2006364: 81 c7 e0 08 ret 2006368: 81 e8 00 00 restore =============================================================================== 0202bbb0 : void endgrent(void) { if (group_fp != NULL) 202bbb0: 03 00 81 d4 sethi %hi(0x2075000), %g1 202bbb4: d0 00 61 90 ld [ %g1 + 0x190 ], %o0 ! 2075190 202bbb8: 80 a2 20 00 cmp %o0, 0 202bbbc: 02 80 00 05 be 202bbd0 <== NEVER TAKEN 202bbc0: 01 00 00 00 nop fclose(group_fp); 202bbc4: 82 13 c0 00 mov %o7, %g1 202bbc8: 40 00 71 e3 call 2048354 202bbcc: 9e 10 40 00 mov %g1, %o7 202bbd0: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0202ba24 : void endpwent(void) { if (passwd_fp != NULL) 202ba24: 03 00 81 d4 sethi %hi(0x2075000), %g1 202ba28: d0 00 60 b0 ld [ %g1 + 0xb0 ], %o0 ! 20750b0 202ba2c: 80 a2 20 00 cmp %o0, 0 202ba30: 02 80 00 05 be 202ba44 <== NEVER TAKEN 202ba34: 01 00 00 00 nop fclose(passwd_fp); 202ba38: 82 13 c0 00 mov %o7, %g1 202ba3c: 40 00 72 46 call 2048354 202ba40: 9e 10 40 00 mov %g1, %o7 202ba44: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0200636c : * 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) { 200636c: 9d e3 bf a0 save %sp, -96, %sp if (tty->ccount == 0) 2006370: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2006374: 80 a0 60 00 cmp %g1, 0 2006378: 02 80 00 37 be 2006454 200637c: ba 10 00 18 mov %i0, %i5 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2006380: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { 2006384: 80 a6 60 00 cmp %i1, 0 2006388: 12 80 00 35 bne 200645c 200638c: 84 08 e0 08 and %g3, 8, %g2 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2006390: 31 00 80 71 sethi %hi(0x201c400), %i0 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2006394: 37 00 80 71 sethi %hi(0x201c400), %i3 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006398: 35 00 80 77 sethi %hi(0x201dc00), %i2 rtems_termios_puts ("\b \b", 3, tty); 200639c: b0 16 22 e0 or %i0, 0x2e0, %i0 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20063a0: 10 80 00 0d b 20063d4 20063a4: b6 16 e2 d8 or %i3, 0x2d8, %i3 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 20063a8: 12 80 00 6b bne 2006554 <== NOT EXECUTED 20063ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 20063b0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20063b4: 02 80 00 66 be 200654c <== NEVER TAKEN 20063b8: 01 00 00 00 nop echo ('\n', tty); return; } } while (tty->ccount) { 20063bc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 20063c0: 80 a0 60 00 cmp %g1, 0 20063c4: 02 80 00 62 be 200654c 20063c8: 01 00 00 00 nop } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 20063cc: c6 07 60 3c ld [ %i5 + 0x3c ], %g3 20063d0: 84 08 e0 08 and %g3, 8, %g2 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 20063d4: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 20063d8: 82 00 7f ff add %g1, -1, %g1 20063dc: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 20063e0: 80 a0 a0 00 cmp %g2, 0 20063e4: 02 bf ff f3 be 20063b0 <== NEVER TAKEN 20063e8: f8 09 00 01 ldub [ %g4 + %g1 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 20063ec: 80 a6 60 00 cmp %i1, 0 20063f0: 12 80 00 05 bne 2006404 20063f4: b8 0f 20 ff and %i4, 0xff, %i4 20063f8: 80 88 e0 10 btst 0x10, %g3 20063fc: 22 80 00 52 be,a 2006544 <== NEVER TAKEN 2006400: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2006404: 80 a7 20 09 cmp %i4, 9 2006408: 02 80 00 25 be 200649c 200640c: b8 07 20 01 inc %i4 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006410: c2 06 a3 e0 ld [ %i2 + 0x3e0 ], %g1 2006414: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 2006418: 80 88 60 20 btst 0x20, %g1 200641c: 12 bf ff e3 bne 20063a8 <== NEVER TAKEN 2006420: 80 88 e2 00 btst 0x200, %g3 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); 2006424: 11 00 80 71 sethi %hi(0x201c400), %o0 2006428: 92 10 20 03 mov 3, %o1 200642c: 90 12 22 e0 or %o0, 0x2e0, %o0 2006430: 7f ff fe f7 call 200600c 2006434: 94 10 00 1d mov %i5, %o2 if (tty->column) 2006438: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200643c: 80 a0 60 00 cmp %g1, 0 2006440: 02 bf ff dd be 20063b4 <== NEVER TAKEN 2006444: 80 a6 60 00 cmp %i1, 0 tty->column--; 2006448: 82 00 7f ff add %g1, -1, %g1 } } } if (!lineFlag) 200644c: 12 bf ff dc bne 20063bc 2006450: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 2006454: 81 c7 e0 08 ret 2006458: 81 e8 00 00 restore erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 200645c: 84 88 e0 08 andcc %g3, 8, %g2 2006460: 22 bf ff fd be,a 2006454 <== NEVER TAKEN 2006464: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2006468: 80 88 e0 10 btst 0x10, %g3 200646c: 32 bf ff ca bne,a 2006394 <== ALWAYS TAKEN 2006470: 31 00 80 71 sethi %hi(0x201c400), %i0 tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 2006474: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 ! 201c444 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 2006478: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 200647c: 7f ff ff 9b call 20062e8 <== NOT EXECUTED 2006480: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2006484: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2006488: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200648c: 02 bf ff f2 be 2006454 <== NOT EXECUTED 2006490: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED echo ('\n', tty); 2006494: 7f ff ff 95 call 20062e8 <== NOT EXECUTED 2006498: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 200649c: 80 a0 60 00 cmp %g1, 0 20064a0: 02 80 00 17 be 20064fc 20064a4: f8 07 60 2c ld [ %i5 + 0x2c ], %i4 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 20064a8: da 06 a3 e0 ld [ %i2 + 0x3e0 ], %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; 20064ac: 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) 20064b0: 10 80 00 07 b 20064cc 20064b4: 98 08 e2 00 and %g3, 0x200, %o4 20064b8: 32 80 00 02 bne,a 20064c0 <== NOT EXECUTED 20064bc: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20064c0: 80 a0 40 02 cmp %g1, %g2 20064c4: 22 80 00 0f be,a 2006500 <== NEVER TAKEN 20064c8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 20064cc: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 20064d0: 84 00 a0 01 inc %g2 if (c == '\t') { 20064d4: 80 a0 e0 09 cmp %g3, 9 20064d8: 02 80 00 18 be 2006538 20064dc: 9e 03 40 03 add %o5, %g3, %o7 col = (col | 7) + 1; } else if (iscntrl (c)) { 20064e0: de 0b e0 01 ldub [ %o7 + 1 ], %o7 20064e4: 80 8b e0 20 btst 0x20, %o7 20064e8: 12 bf ff f4 bne 20064b8 <== NEVER TAKEN 20064ec: 80 a3 20 00 cmp %o4, 0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20064f0: 80 a0 40 02 cmp %g1, %g2 20064f4: 12 bf ff f6 bne 20064cc 20064f8: b8 07 20 01 inc %i4 } /* * Back up over the tab */ while (tty->column > col) { 20064fc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006500: 80 a7 00 01 cmp %i4, %g1 2006504: 16 bf ff ac bge 20063b4 <== NEVER TAKEN 2006508: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); 200650c: 90 10 00 1b mov %i3, %o0 2006510: 92 10 20 01 mov 1, %o1 2006514: 7f ff fe be call 200600c 2006518: 94 10 00 1d mov %i5, %o2 tty->column--; 200651c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006520: 82 00 7f ff add %g1, -1, %g1 } /* * Back up over the tab */ while (tty->column > col) { 2006524: 80 a0 40 1c cmp %g1, %i4 2006528: 14 bf ff f9 bg 200650c 200652c: c2 27 60 28 st %g1, [ %i5 + 0x28 ] if (tty->column) tty->column--; } } } if (!lineFlag) 2006530: 10 bf ff a1 b 20063b4 2006534: 80 a6 60 00 cmp %i1, 0 * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 2006538: b8 17 20 07 or %i4, 7, %i4 200653c: 10 bf ff e1 b 20064c0 2006540: b8 07 20 01 inc %i4 while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 2006544: 7f ff ff 69 call 20062e8 <== NOT EXECUTED 2006548: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED 200654c: 81 c7 e0 08 ret 2006550: 81 e8 00 00 restore tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2006554: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2006558: 7f ff fe ad call 200600c <== NOT EXECUTED 200655c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 2006560: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 2006564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006568: 22 80 00 05 be,a 200657c <== NOT EXECUTED 200656c: c2 06 a3 e0 ld [ %i2 + 0x3e0 ], %g1 <== NOT EXECUTED tty->column--; 2006570: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006574: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2006578: c2 06 a3 e0 ld [ %i2 + 0x3e0 ], %g1 <== NOT EXECUTED 200657c: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 <== NOT EXECUTED 2006580: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2006584: 02 bf ff a9 be 2006428 <== NOT EXECUTED 2006588: 11 00 80 71 sethi %hi(0x201c400), %o0 <== NOT EXECUTED 200658c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 2006590: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2006594: 12 bf ff a6 bne 200642c <== NOT EXECUTED 2006598: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 200659c: 10 bf ff 86 b 20063b4 <== NOT EXECUTED 20065a0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED =============================================================================== 02028eb8 : #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) { 2028eb8: 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) 2028ebc: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 2028ec0: 80 a0 60 00 cmp %g1, 0 2028ec4: 22 80 00 5b be,a 2029030 2028ec8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028ecc: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2028ed0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2028ed4: 80 a0 80 01 cmp %g2, %g1 2028ed8: 08 80 00 67 bleu 2029074 <== ALWAYS TAKEN 2028edc: ba 10 20 00 clr %i5 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2028ee0: 80 a6 40 01 cmp %i1, %g1 2028ee4: 22 80 00 50 be,a 2029024 2028ee8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (fs_info->c.modified) 2028eec: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2028ef0: 80 a0 60 00 cmp %g1, 0 2028ef4: 02 80 00 3a be 2028fdc 2028ef8: ba 8f 60 ff andcc %i5, 0xff, %i5 { if (sec_of_fat && !fs_info->vol.mirror) 2028efc: 02 80 00 06 be 2028f14 <== ALWAYS TAKEN 2028f00: 01 00 00 00 nop 2028f04: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2028f08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028f0c: 22 80 00 62 be,a 2029094 <== NOT EXECUTED 2028f10: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2028f14: 7f ff 76 d4 call 2006a64 2028f18: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2028f1c: c0 2e 20 7d clrb [ %i0 + 0x7d ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2028f20: 80 a2 20 00 cmp %o0, 0 2028f24: 12 80 00 65 bne 20290b8 <== NEVER TAKEN 2028f28: c0 2e 20 7c clrb [ %i0 + 0x7c ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2028f2c: 80 a7 60 00 cmp %i5, 0 2028f30: 22 80 00 31 be,a 2028ff4 <== ALWAYS TAKEN 2028f34: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028f38: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2028f3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028f40: 32 80 00 2d bne,a 2028ff4 <== NOT EXECUTED 2028f44: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028f48: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2028f4c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028f50: 08 80 00 28 bleu 2028ff0 <== NOT EXECUTED 2028f54: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED 2028f58: 10 80 00 10 b 2028f98 <== NOT EXECUTED 2028f5c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2028f60: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 2028f64: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 2028f68: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 2028f6c: 40 00 89 e9 call 204b710 <== NOT EXECUTED 2028f70: ba 07 60 01 inc %i5 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2028f74: 7f ff 76 bc call 2006a64 <== NOT EXECUTED 2028f78: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2028f7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028f80: 12 80 00 11 bne 2028fc4 <== NOT EXECUTED 2028f84: 90 0f 60 ff and %i5, 0xff, %o0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028f88: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2028f8c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2028f90: 28 80 00 19 bleu,a 2028ff4 <== NOT EXECUTED 2028f94: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2028f98: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED 2028f9c: 7f ff 67 d1 call 2002ee0 <.umul> <== NOT EXECUTED 2028fa0: f8 06 20 58 ld [ %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.dd, 2028fa4: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 <== NOT EXECUTED 2028fa8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 2028fac: 92 02 00 09 add %o0, %o1, %o1 <== NOT EXECUTED 2028fb0: 7f ff 75 a5 call 2006644 <== NOT EXECUTED 2028fb4: 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) 2028fb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028fbc: 02 bf ff e9 be 2028f60 <== NOT EXECUTED 2028fc0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 2028fc4: 40 00 7c 92 call 204820c <__errno> <== NOT EXECUTED 2028fc8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028fcc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2028fd0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028fd4: 81 c7 e0 08 ret <== NOT EXECUTED 2028fd8: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2028fdc: 7f ff 76 6a call 2006984 2028fe0: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2028fe4: 80 a2 20 00 cmp %o0, 0 2028fe8: 12 80 00 34 bne 20290b8 <== NEVER TAKEN 2028fec: c0 2e 20 7d clrb [ %i0 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2028ff0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028ff4: 92 10 00 19 mov %i1, %o1 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) 2028ff8: 80 a6 a0 01 cmp %i2, 1 2028ffc: 02 80 00 2b be 20290a8 2029000: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 2029004: 7f ff 75 90 call 2006644 2029008: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 202900c: 80 a2 20 00 cmp %o0, 0 2029010: 12 80 00 2a bne 20290b8 <== NEVER TAKEN 2029014: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2029018: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.state = FAT_CACHE_ACTUAL; 202901c: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } *buf = fs_info->c.buf; 2029020: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2029024: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2029028: 81 c7 e0 08 ret 202902c: 91 e8 20 00 restore %g0, 0, %o0 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2029030: 92 10 00 19 mov %i1, %o1 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 2029034: 80 a6 a0 01 cmp %i2, 1 2029038: 02 80 00 13 be 2029084 202903c: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 2029040: 7f ff 75 81 call 2006644 2029044: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2029048: 80 a2 20 00 cmp %o0, 0 202904c: 12 80 00 1b bne 20290b8 <== NEVER TAKEN 2029050: 82 10 20 01 mov 1, %g1 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2029054: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2029058: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 202905c: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 2029060: c0 2e 20 7c clrb [ %i0 + 0x7c ] fs_info->c.state = FAT_CACHE_ACTUAL; 2029064: 82 10 00 19 mov %i1, %g1 } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2029068: 80 a0 80 01 cmp %g2, %g1 202906c: 18 bf ff 9d bgu 2028ee0 <== NEVER TAKEN 2029070: ba 10 20 00 clr %i5 2029074: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2029078: 80 a0 40 02 cmp %g1, %g2 202907c: 10 bf ff 99 b 2028ee0 2029080: ba 40 20 00 addx %g0, 0, %i5 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2029084: 7f ff 75 9b call 20066f0 2029088: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 202908c: 10 bf ff f0 b 202904c 2029090: 80 a2 20 00 cmp %o0, 0 if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2029094: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 2029098: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 202909c: 40 00 89 9d call 204b710 <== NOT EXECUTED 20290a0: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 20290a4: 30 bf ff 9c b,a 2028f14 <== 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.dd, blk, &fs_info->c.buf); 20290a8: 7f ff 75 92 call 20066f0 20290ac: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 20290b0: 10 bf ff d8 b 2029010 20290b4: 80 a2 20 00 cmp %o0, 0 rtems_set_errno_and_return_minus_one(EIO); 20290b8: 40 00 7c 55 call 204820c <__errno> <== NOT EXECUTED 20290bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20290c0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20290c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20290c8: 81 c7 e0 08 ret <== NOT EXECUTED 20290cc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020290d0 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 20290d0: 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) 20290d4: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 20290d8: ba 10 00 18 mov %i0, %i5 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 20290dc: 80 a0 60 00 cmp %g1, 0 20290e0: 02 80 00 42 be 20291e8 20290e4: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 20290e8: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 20290ec: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 20290f0: 80 a0 40 02 cmp %g1, %g2 20290f4: 0a 80 00 05 bcs 2029108 <== NEVER TAKEN 20290f8: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 20290fc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 2029100: 80 a0 40 02 cmp %g1, %g2 2029104: 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) 2029108: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1 202910c: 80 a0 60 00 cmp %g1, 0 2029110: 02 80 00 38 be 20291f0 2029114: b8 8f 20 ff andcc %i4, 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2029118: 02 80 00 06 be 2029130 202911c: 01 00 00 00 nop 2029120: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2029124: 80 a0 60 00 cmp %g1, 0 2029128: 22 80 00 3a be,a 2029210 <== ALWAYS TAKEN 202912c: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2029130: 7f ff 76 4d call 2006a64 2029134: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2029138: 80 a2 20 00 cmp %o0, 0 202913c: 12 80 00 3a bne 2029224 <== NEVER TAKEN 2029140: 80 a7 20 00 cmp %i4, 0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2029144: 02 80 00 30 be 2029204 2029148: c0 2f 60 7c clrb [ %i5 + 0x7c ] 202914c: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2029150: 80 a0 60 00 cmp %g1, 0 2029154: 32 80 00 2d bne,a 2029208 <== NEVER TAKEN 2029158: c0 2f 60 7d clrb [ %i5 + 0x7d ] <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 202915c: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 2029160: 80 a0 60 01 cmp %g1, 1 2029164: 08 80 00 28 bleu 2029204 <== NEVER TAKEN 2029168: b8 10 20 01 mov 1, %i4 202916c: 10 80 00 10 b 20291ac 2029170: 90 10 20 01 mov 1, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2029174: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 2029178: d4 17 40 00 lduh [ %i5 ], %o2 202917c: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2029180: 40 00 89 64 call 204b710 2029184: b8 07 20 01 inc %i4 sc = rtems_bdbuf_release_modified(b); 2029188: 7f ff 76 37 call 2006a64 202918c: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2029190: 80 a2 20 00 cmp %o0, 0 2029194: 12 80 00 11 bne 20291d8 <== NEVER TAKEN 2029198: 90 0f 20 ff and %i4, 0xff, %o0 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 202919c: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 20291a0: 80 a2 00 01 cmp %o0, %g1 20291a4: 3a 80 00 19 bcc,a 2029208 <== ALWAYS TAKEN 20291a8: c0 2f 60 7d clrb [ %i5 + 0x7d ] { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 20291ac: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20291b0: 7f ff 67 4c call 2002ee0 <.umul> 20291b4: f6 07 60 58 ld [ %i5 + 0x58 ], %i3 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 20291b8: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 20291bc: 94 07 bf fc add %fp, -4, %o2 20291c0: 92 02 00 09 add %o0, %o1, %o1 20291c4: 7f ff 75 20 call 2006644 20291c8: 90 10 00 1b mov %i3, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 20291cc: 80 a2 20 00 cmp %o0, 0 20291d0: 02 bf ff e9 be 2029174 <== ALWAYS TAKEN 20291d4: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 20291d8: 40 00 7c 0d call 204820c <__errno> <== NOT EXECUTED 20291dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20291e0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20291e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20291e8: 81 c7 e0 08 ret 20291ec: 81 e8 00 00 restore } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 20291f0: 7f ff 75 e5 call 2006984 20291f4: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 20291f8: 80 a2 20 00 cmp %o0, 0 20291fc: 12 80 00 0a bne 2029224 <== NEVER TAKEN 2029200: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2029204: c0 2f 60 7d clrb [ %i5 + 0x7d ] return RC_OK; } 2029208: 81 c7 e0 08 ret 202920c: 91 e8 20 00 restore %g0, 0, %o0 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2029210: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 2029214: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2029218: 40 00 89 3e call 204b710 202921c: d4 17 40 00 lduh [ %i5 ], %o2 2029220: 30 bf ff c4 b,a 2029130 } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 2029224: 40 00 7b fa call 204820c <__errno> <== NOT EXECUTED 2029228: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202922c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2029230: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029234: 81 c7 e0 08 ret <== NOT EXECUTED 2029238: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029390 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2029390: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED 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)) ) 2029394: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029398: 12 80 00 06 bne 20293b0 <== NOT EXECUTED 202939c: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED 20293a0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 20293a4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 20293a8: 32 80 00 0e bne,a 20293e0 <== NOT EXECUTED 20293ac: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 20293b0: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 20293b4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 20293b8: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED 20293bc: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED 20293c0: 92 02 7f fe add %o1, -2, %o1 <== 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, 20293c4: 94 10 20 00 clr %o2 <== NOT EXECUTED 20293c8: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 20293cc: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 20293d0: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 20293d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20293d8: 7f ff ff 99 call 202923c <_fat_block_read> <== NOT EXECUTED 20293dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 20293e0: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 20293e4: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== 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, 20293e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 20293ec: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 20293f0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20293f4: 7f ff ff 92 call 202923c <_fat_block_read> <== NOT EXECUTED 20293f8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020293fc : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 20293fc: 98 10 00 0a mov %o2, %o4 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)) ) 2029400: 80 a2 60 00 cmp %o1, 0 2029404: 12 80 00 06 bne 202941c <== ALWAYS TAKEN 2029408: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 202940c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2029410: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2029414: 32 80 00 0e bne,a 202944c <== NOT EXECUTED 2029418: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 202941c: c6 08 60 05 ldub [ %g1 + 5 ], %g3 2029420: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2029424: d6 08 60 04 ldub [ %g1 + 4 ], %o3 2029428: c2 08 60 02 ldub [ %g1 + 2 ], %g1 202942c: 92 02 7f fe add %o1, -2, %o1 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_write(mt_entry, fsec, 0, 2029430: 94 10 20 00 clr %o2 2029434: 93 2a 40 03 sll %o1, %g3, %o1 2029438: 97 2a c0 01 sll %o3, %g1, %o3 202943c: 92 02 40 02 add %o1, %g2, %o1 2029440: 82 13 c0 00 mov %o7, %g1 2029444: 7f ff ff a0 call 20292c4 <_fat_block_write> 2029448: 9e 10 40 00 mov %g1, %o7 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 202944c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2029450: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== 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_write(mt_entry, fsec, 0, 2029454: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029458: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 202945c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029460: 7f ff ff 99 call 20292c4 <_fat_block_write> <== NOT EXECUTED 2029464: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02029678 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2029678: 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; 202967c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2029680: 87 2e 60 18 sll %i1, 0x18, %g3 <== 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, 2029684: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2029688: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 202968c: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2029690: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2029694: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2029698: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED 202969c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20296a0: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20296a4: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20296a8: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 20296ac: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20296b0: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED 20296b4: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED 20296b8: 84 10 80 19 or %g2, %i1, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 20296bc: 89 36 a0 08 srl %i2, 8, %g4 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20296c0: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; 20296c4: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20296c8: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20296cc: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 20296d0: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 20296d4: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 20296d8: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED 20296dc: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 20296e0: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20296e4: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; 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); 20296e8: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 20296ec: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 20296f0: 7f ff fe f5 call 20292c4 <_fat_block_write> <== NOT EXECUTED 20296f4: 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, 20296f8: 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, 20296fc: 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, 2029700: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2029704: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2029708: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 202970c: 7f ff fe ee call 20292c4 <_fat_block_write> <== NOT EXECUTED 2029710: 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) ) 2029714: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029718: 06 80 00 06 bl 2029730 <== NOT EXECUTED 202971c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2029720: 06 80 00 04 bl 2029730 <== NOT EXECUTED 2029724: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; return RC_OK; } 2029728: 81 c7 e0 08 ret <== NOT EXECUTED 202972c: 81 e8 00 00 restore <== NOT EXECUTED 2029730: 81 c7 e0 08 ret <== NOT EXECUTED 2029734: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02028634 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028634: 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) 2028638: c2 06 60 08 ld [ %i1 + 8 ], %g1 202863c: 80 a0 60 01 cmp %g1, 1 2028640: 08 80 00 07 bleu 202865c 2028644: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 { fat_fd->links_num--; 2028648: 82 00 7f ff add %g1, -1, %g1 return rc; 202864c: 90 10 20 00 clr %o0 * 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) { fat_fd->links_num--; 2028650: c2 26 60 08 st %g1, [ %i1 + 8 ] * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 2028654: 81 c7 e0 08 ret 2028658: 91 e8 00 08 restore %g0, %o0, %o0 return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 202865c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2028660: 80 88 60 01 btst 1, %g1 2028664: 22 80 00 16 be,a 20286bc 2028668: d2 06 60 0c ld [ %i1 + 0xc ], %o1 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 202866c: 90 10 00 18 mov %i0, %o0 2028670: 92 10 00 19 mov %i1, %o1 2028674: 7f ff ff ac call 2028524 2028678: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 202867c: 80 a2 20 00 cmp %o0, 0 2028680: 12 bf ff f5 bne 2028654 <== NEVER TAKEN 2028684: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2028688: 7f ff 98 bd call 200e97c <_Chain_Extract> 202868c: 90 10 00 19 mov %i1, %o0 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 2028690: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2028694: 40 00 03 f4 call 2029664 2028698: 90 10 00 18 mov %i0, %o0 202869c: 80 8a 20 ff btst 0xff, %o0 20286a0: 32 80 00 13 bne,a 20286ec <== NEVER TAKEN 20286a4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20286a8: 90 10 00 19 mov %i1, %o0 20286ac: 7f ff 81 ce call 2008de4 20286b0: b0 10 00 1d mov %i5, %i0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20286b4: 40 00 02 87 call 20290d0 20286b8: 81 e8 00 00 restore free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20286bc: 40 00 03 ea call 2029664 20286c0: 90 10 00 18 mov %i0, %o0 20286c4: 80 8a 20 ff btst 0xff, %o0 20286c8: 02 80 00 05 be 20286dc <== ALWAYS TAKEN 20286cc: 01 00 00 00 nop { fat_fd->links_num = 0; 20286d0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20286d4: 40 00 02 7f call 20290d0 <== NOT EXECUTED 20286d8: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED 20286dc: 7f ff 98 a8 call 200e97c <_Chain_Extract> 20286e0: 90 10 00 19 mov %i1, %o0 fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20286e4: 10 bf ff f2 b 20286ac 20286e8: 90 10 00 19 mov %i1, %o0 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 20286ec: 40 00 03 d0 call 202962c <== NOT EXECUTED 20286f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20286f4: 10 bf ff ee b 20286ac <== NOT EXECUTED 20286f8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED =============================================================================== 02028cd0 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028cd0: 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; 2028cd4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2028cd8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== 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; 2028cdc: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2028ce0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) return RC_OK; 2028ce4: b4 10 20 00 clr %i2 <== 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) 2028ce8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028cec: 12 80 00 04 bne 2028cfc <== NOT EXECUTED 2028cf0: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 2028cf4: 81 c7 e0 08 ret <== NOT EXECUTED 2028cf8: 91 e8 00 1a restore %g0, %i2, %o0 <== 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); 2028cfc: 40 00 00 f5 call 20290d0 <== NOT EXECUTED 2028d00: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2028d04: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2028d08: 12 bf ff fb bne 2028cf4 <== NOT EXECUTED 2028d0c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028d10: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 2028d14: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 2028d18: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2028d1c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2028d20: 1a bf ff f5 bcc 2028cf4 <== NOT EXECUTED 2028d24: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 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)) ) 2028d28: 02 80 00 23 be 2028db4 <== NOT EXECUTED 2028d2c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028d30: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED 2028d34: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2028d38: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED 2028d3c: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED 2028d40: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED { 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++ ) 2028d44: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2028d48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028d4c: 02 80 00 20 be 2028dcc <== NOT EXECUTED 2028d50: ba 10 20 00 clr %i5 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2028d54: 10 80 00 0c b 2028d84 <== NOT EXECUTED 2028d58: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2028d5c: 7f ff 77 64 call 2006aec <== NOT EXECUTED 2028d60: ba 07 60 01 inc %i5 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2028d64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028d68: 12 80 00 0d bne 2028d9c <== NOT EXECUTED 2028d6c: 01 00 00 00 nop <== 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++ ) 2028d70: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2028d74: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 2028d78: 08 80 00 15 bleu 2028dcc <== NOT EXECUTED 2028d7c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2028d80: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED 2028d84: 92 07 40 1b add %i5, %i3, %o1 <== NOT EXECUTED 2028d88: 7f ff 76 5a call 20066f0 <== NOT EXECUTED 2028d8c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2028d90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028d94: 02 bf ff f2 be 2028d5c <== NOT EXECUTED 2028d98: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 2028d9c: 40 00 7d 1c call 204820c <__errno> <== NOT EXECUTED 2028da0: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED 2028da4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028da8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 2028dac: 81 c7 e0 08 ret <== NOT EXECUTED 2028db0: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED 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)) ) 2028db4: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2028db8: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028dbc: 22 bf ff de be,a 2028d34 <== NOT EXECUTED 2028dc0: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028dc4: 10 bf ff e0 b 2028d44 <== NOT EXECUTED 2028dc8: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== 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); 2028dcc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2028dd0: 40 00 69 84 call 20433e0 <== NOT EXECUTED 2028dd4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2028dd8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028ddc: 02 bf ff cd be 2028d10 <== NOT EXECUTED 2028de0: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== 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); 2028de4: 10 bf ff c4 b 2028cf4 <== NOT EXECUTED 2028de8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED =============================================================================== 020287d8 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20287d8: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20287dc: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 20287e0: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20287e4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 20287e8: 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; 20287ec: 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 ) { 20287f0: 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) 20287f4: 80 a6 80 01 cmp %i2, %g1 20287f8: 08 80 00 3d bleu 20288ec 20287fc: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028800: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2028804: 80 a0 a0 01 cmp %g2, 1 2028808: 22 80 00 3b be,a 20288f4 <== NEVER TAKEN 202880c: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== 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))) & 2028810: c6 17 20 06 lduh [ %i4 + 6 ], %g3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2028814: a4 26 80 01 sub %i2, %g1, %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 - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 2028818: 84 00 ff ff add %g3, -1, %g2 202881c: a0 08 80 01 and %g2, %g1, %l0 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 - 2028820: a0 20 c0 10 sub %g3, %l0, %l0 2028824: a0 0c 00 02 and %l0, %g2, %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) 2028828: 80 a4 00 12 cmp %l0, %l2 202882c: 1a 80 00 30 bcc 20288ec 2028830: 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) 2028834: a4 a4 80 10 subcc %l2, %l0, %l2 2028838: 02 80 00 2d be 20288ec <== NEVER TAKEN 202883c: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2028840: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2028844: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2028848: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 202884c: 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; 2028850: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2028854: 96 07 bf fc add %fp, -4, %o3 2028858: 94 10 00 11 mov %l1, %o2 202885c: 40 00 6c 64 call 20439ec 2028860: 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) 2028864: b0 92 20 00 orcc %o0, 0, %i0 2028868: 12 80 00 21 bne 20288ec <== NEVER TAKEN 202886c: 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)) 2028870: 80 94 00 01 orcc %l0, %g1, %g0 2028874: 02 80 00 27 be 2028910 <== NEVER TAKEN 2028878: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 202887c: 02 80 00 0b be 20288a8 <== ALWAYS TAKEN 2028880: 88 38 00 01 xnor %g0, %g1, %g4 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 2028884: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 2028888: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED 202888c: 86 00 ff ff add %g3, -1, %g3 <== 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) - 2028890: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 2028894: a4 0c 80 03 and %l2, %g3, %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) - 2028898: a3 2c 40 02 sll %l1, %g2, %l1 <== 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 - 202889c: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20288a0: 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 - 20288a4: 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 ) 20288a8: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20288ac: 80 a2 e0 00 cmp %o3, 0 20288b0: 32 80 00 1e bne,a 2028928 20288b4: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20288b8: c4 07 bf f0 ld [ %fp + -16 ], %g2 fat_fd->map.file_cln = 0; 20288bc: 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; 20288c0: c4 26 60 1c st %g2, [ %i1 + 0x1c ] 20288c4: c4 26 60 38 st %g2, [ %i1 + 0x38 ] } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 20288c8: 80 a0 60 00 cmp %g1, 0 20288cc: 22 80 00 08 be,a 20288ec <== NEVER TAKEN 20288d0: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 20288d4: c4 07 bf f8 ld [ %fp + -8 ], %g2 if (fat_fd->fat_file_type == FAT_DIRECTORY) 20288d8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 20288dc: 80 a0 60 00 cmp %g1, 0 20288e0: 02 80 00 20 be 2028960 20288e4: c4 26 60 3c st %g2, [ %i1 + 0x3c ] return rc; } } } fat_fd->fat_file_size = new_length; 20288e8: f4 26 60 18 st %i2, [ %i1 + 0x18 ] return RC_OK; } 20288ec: 81 c7 e0 08 ret 20288f0: 81 e8 00 00 restore *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20288f4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20288f8: 32 bf ff c7 bne,a 2028814 <== NOT EXECUTED 20288fc: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028900: c4 0f 20 0a ldub [ %i4 + 0xa ], %g2 <== 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)) && 2028904: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028908: 22 bf ff c3 be,a 2028814 <== NOT EXECUTED 202890c: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 2028910: 40 00 7e 3f call 204820c <__errno> <== NOT EXECUTED 2028914: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028918: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 202891c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028920: 81 c7 e0 08 ret <== NOT EXECUTED 2028924: 81 e8 00 00 restore <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2028928: 80 a2 7f ff cmp %o1, -1 202892c: 22 80 00 19 be,a 2028990 <== NEVER TAKEN 2028930: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 2028934: d2 27 bf f4 st %o1, [ %fp + -12 ] fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 2028938: d4 07 bf f0 ld [ %fp + -16 ], %o2 202893c: 40 00 6b 31 call 2043600 2028940: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2028944: 82 92 20 00 orcc %o0, 0, %g1 2028948: 12 80 00 0d bne 202897c <== NEVER TAKEN 202894c: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 2028950: 40 00 01 e0 call 20290d0 2028954: 90 10 00 1c mov %i4, %o0 2028958: 10 bf ff dc b 20288c8 202895c: c2 07 bf fc ld [ %fp + -4 ], %g1 if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 2028960: d2 07 bf f0 ld [ %fp + -16 ], %o1 2028964: 40 00 02 c1 call 2029468 2028968: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 202896c: 82 92 20 00 orcc %o0, 0, %g1 2028970: 22 bf ff df be,a 20288ec <== ALWAYS TAKEN 2028974: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 2028978: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 202897c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2028980: 40 00 6b e2 call 2043908 <== NOT EXECUTED 2028984: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 2028988: 81 c7 e0 08 ret <== NOT EXECUTED 202898c: 81 e8 00 00 restore <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 2028990: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2028994: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2028998: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 202899c: 7f ff ff 58 call 20286fc <== NOT EXECUTED 20289a0: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 20289a4: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 20289a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20289ac: 02 bf ff e3 be 2028938 <== NOT EXECUTED 20289b0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); 20289b4: 10 bf ff f2 b 202897c <== NOT EXECUTED 20289b8: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED =============================================================================== 020286fc : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20286fc: 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); 2028700: 82 07 a0 50 add %fp, 0x50, %g1 2028704: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2028708: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 202870c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2028710: 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); 2028714: c2 27 bf fc st %g1, [ %fp + -4 ] switch (cmd) 2028718: 80 a6 a0 01 cmp %i2, 1 202871c: 02 80 00 08 be 202873c <== ALWAYS TAKEN 2028720: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 *ret = cur_cln; break; default: errno = EINVAL; 2028724: 40 00 7e ba call 204820c <__errno> <== NOT EXECUTED 2028728: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202872c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2028730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 2028734: 81 c7 e0 08 ret <== NOT EXECUTED 2028738: 81 e8 00 00 restore <== NOT EXECUTED case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 202873c: c8 06 60 18 ld [ %i1 + 0x18 ], %g4 switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2028740: ba 07 a0 58 add %fp, 0x58, %i5 2028744: fa 27 bf fc st %i5, [ %fp + -4 ] va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2028748: 84 10 00 1b mov %i3, %g2 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 202874c: 80 a6 c0 04 cmp %i3, %g4 2028750: 1a 80 00 1c bcc 20287c0 <== NEVER TAKEN 2028754: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028758: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 202875c: 80 a0 60 01 cmp %g1, 1 2028760: 22 80 00 0e be,a 2028798 2028764: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 2028768: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 202876c: 90 10 00 18 mov %i0, %o0 2028770: 92 10 00 19 mov %i1, %o1 2028774: 95 30 80 0a srl %g2, %o2, %o2 2028778: 7f ff fe 0b call 2027fa4 202877c: 96 07 bf f8 add %fp, -8, %o3 if ( rc != RC_OK ) 2028780: b0 92 60 00 orcc %o1, 0, %i0 2028784: 12 bf ff ec bne 2028734 <== NEVER TAKEN 2028788: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; 202878c: c2 27 40 00 st %g1, [ %i5 ] break; 2028790: 81 c7 e0 08 ret 2028794: 81 e8 00 00 restore 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)) && 2028798: 80 a0 60 00 cmp %g1, 0 202879c: 32 bf ff f4 bne,a 202876c <== NEVER TAKEN 20287a0: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20287a4: c2 08 e0 0a ldub [ %g3 + 0xa ], %g1 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)) && 20287a8: 80 88 60 03 btst 3, %g1 20287ac: 22 bf ff f0 be,a 202876c <== NEVER TAKEN 20287b0: 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; 20287b4: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 20287b8: 81 c7 e0 08 ret 20287bc: 91 e8 20 00 restore %g0, 0, %o0 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 20287c0: 40 00 7e 93 call 204820c <__errno> <== NOT EXECUTED 20287c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20287c8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20287cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20287d0: 81 c7 e0 08 ret <== NOT EXECUTED 20287d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02027fa4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2027fa4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2027fa8: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2027fac: 80 a7 00 1a cmp %i4, %i2 2027fb0: 22 80 00 21 be,a 2028034 <== ALWAYS TAKEN 2027fb4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2027fb8: 2a 80 00 16 bcs,a 2028010 <== NOT EXECUTED 2027fbc: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2027fc0: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED 2027fc4: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2027fc8: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2027fcc: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2027fd0: 02 80 00 13 be 202801c <== NOT EXECUTED 2027fd4: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2027fd8: 10 80 00 06 b 2027ff0 <== NOT EXECUTED 2027fdc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2027fe0: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2027fe4: 02 80 00 0e be 202801c <== NOT EXECUTED 2027fe8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2027fec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2027ff0: 40 00 6c fc call 20433e0 <== NOT EXECUTED 2027ff4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2027ff8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027ffc: 22 bf ff f9 be,a 2027fe0 <== NOT EXECUTED 2028000: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2028004: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2028008: 81 c7 e0 08 ret <== NOT EXECUTED 202800c: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 2028010: 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; 2028014: 10 bf ff ee b 2027fcc <== NOT EXECUTED 2028018: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 202801c: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2028020: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2028024: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2028028: b0 10 20 00 clr %i0 <== NOT EXECUTED } 202802c: 81 c7 e0 08 ret <== NOT EXECUTED 2028030: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2028034: 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; 2028038: 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; 202803c: 81 c7 e0 08 ret 2028040: 93 e8 20 00 restore %g0, 0, %o1 =============================================================================== 02028c24 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028c24: 9d e3 bf a0 save %sp, -96, %sp 2028c28: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 fat_fs_info_t *fs_info = mt_entry->fs_info; 2028c2c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2028c30: 80 a0 60 01 cmp %g1, 1 2028c34: 02 80 00 0c be 2028c64 <== NEVER TAKEN 2028c38: 86 10 20 01 mov 1, %g3 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)) ) 2028c3c: 80 a0 60 00 cmp %g1, 0 2028c40: 32 80 00 1f bne,a 2028cbc <== NEVER TAKEN 2028c44: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED 2028c48: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 2028c4c: 80 88 a0 03 btst 3, %g2 2028c50: 22 80 00 1b be,a 2028cbc <== NEVER TAKEN 2028c54: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028c58: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2028c5c: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 2028c60: 87 28 c0 02 sll %g3, %g2, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028c64: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2028c68: 90 10 00 19 mov %i1, %o0 2028c6c: b9 30 a0 09 srl %g2, 9, %i4 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028c70: 85 30 a0 05 srl %g2, 5, %g2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2028c74: 86 00 c0 1c add %g3, %i4, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028c78: 84 08 a0 0f and %g2, 0xf, %g2 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028c7c: b9 28 e0 04 sll %g3, 4, %i4 2028c80: 7f ff 97 3f call 200e97c <_Chain_Extract> 2028c84: b8 07 00 02 add %i4, %g2, %i4 */ 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); 2028c88: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 2028c8c: b8 0f 20 01 and %i4, 1, %i4 2028c90: 83 2f 20 02 sll %i4, 2, %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2028c94: 92 10 00 19 mov %i1, %o1 2028c98: b9 2f 20 04 sll %i4, 4, %i4 2028c9c: b8 27 00 01 sub %i4, %g1, %i4 2028ca0: 7f ff 97 2c call 200e950 <_Chain_Append> 2028ca4: 90 02 00 1c add %o0, %i4, %o0 _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; 2028ca8: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2028cac: 82 10 60 01 or %g1, 1, %g1 2028cb0: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] } 2028cb4: 81 c7 e0 08 ret 2028cb8: 81 e8 00 00 restore register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028cbc: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED 2028cc0: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 2028cc4: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED 2028cc8: 10 bf ff e5 b 2028c5c <== NOT EXECUTED 2028ccc: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED =============================================================================== 02028044 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2028044: 9d e3 bf a0 save %sp, -96, %sp static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2028048: c2 06 40 00 ld [ %i1 ], %g1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 202804c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2028050: 80 a0 60 01 cmp %g1, 1 2028054: 02 80 00 0c be 2028084 2028058: 84 10 20 01 mov 1, %g2 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)) ) 202805c: 80 a0 60 00 cmp %g1, 0 2028060: 32 80 00 7d bne,a 2028254 2028064: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 2028068: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 202806c: 80 88 a0 03 btst 3, %g2 2028070: 22 80 00 79 be,a 2028254 <== NEVER TAKEN 2028074: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028078: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 202807c: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2028080: 85 28 80 03 sll %g2, %g3, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028084: c2 06 60 04 ld [ %i1 + 4 ], %g1 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2028088: de 07 60 60 ld [ %i5 + 0x60 ], %o7 202808c: b9 30 60 09 srl %g1, 9, %i4 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028090: 83 30 60 05 srl %g1, 5, %g1 2028094: 82 08 60 0f and %g1, 0xf, %g1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2028098: 84 00 80 1c add %g2, %i4, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 202809c: b9 28 a0 04 sll %g2, 4, %i4 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 20280a0: b8 07 00 01 add %i4, %g1, %i4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 20280a4: 82 0f 20 01 and %i4, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 20280a8: 85 28 60 02 sll %g1, 2, %g2 20280ac: a1 28 60 04 sll %g1, 4, %l0 20280b0: a0 24 00 02 sub %l0, %g2, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20280b4: c2 03 c0 10 ld [ %o7 + %l0 ], %g1 20280b8: 9e 03 c0 10 add %o7, %l0, %o7 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 20280bc: 9e 03 e0 04 add %o7, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 20280c0: 80 a0 40 0f cmp %g1, %o7 20280c4: 22 80 00 1f be,a 2028140 20280c8: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 20280cc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 20280d0: 80 a0 a0 01 cmp %g2, 1 20280d4: 02 80 00 0c be 2028104 20280d8: 88 10 20 01 mov 1, %g4 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)) ) 20280dc: 80 a0 a0 00 cmp %g2, 0 20280e0: 32 80 00 62 bne,a 2028268 20280e4: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 20280e8: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 20280ec: 80 88 e0 03 btst 3, %g3 20280f0: 22 80 00 5e be,a 2028268 <== NEVER TAKEN 20280f4: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20280f8: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 20280fc: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2028100: 89 29 00 03 sll %g4, %g3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028104: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 2028108: b7 30 e0 09 srl %g3, 9, %i3 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 202810c: 85 30 e0 05 srl %g3, 5, %g2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2028110: 88 01 00 1b add %g4, %i3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028114: 84 08 a0 0f and %g2, 0xf, %g2 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028118: 87 29 20 04 sll %g4, 4, %g3 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 202811c: 86 00 c0 02 add %g3, %g2, %g3 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 2028120: 80 a7 00 03 cmp %i4, %g3 2028124: 22 80 00 56 be,a 202827c 2028128: c4 00 60 08 ld [ %g1 + 8 ], %g2 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 202812c: c2 00 40 00 ld [ %g1 ], %g1 ) { 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) ; ) 2028130: 80 a0 40 0f cmp %g1, %o7 2028134: 32 bf ff e7 bne,a 20280d0 2028138: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 202813c: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2028140: c2 00 80 10 ld [ %g2 + %l0 ], %g1 2028144: 84 00 80 10 add %g2, %l0, %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 2028148: 9e 00 a0 04 add %g2, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 202814c: 80 a0 40 0f cmp %g1, %o7 2028150: 02 80 00 1f be 20281cc <== ALWAYS TAKEN 2028154: a2 10 3f ff mov -1, %l1 2028158: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 202815c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2028160: 02 80 00 0c be 2028190 <== NOT EXECUTED 2028164: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 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)) ) 2028168: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202816c: 32 80 00 49 bne,a 2028290 <== NOT EXECUTED 2028170: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED 2028174: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED 2028178: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 202817c: 22 80 00 45 be,a 2028290 <== NOT EXECUTED 2028180: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028184: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2028188: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED 202818c: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028190: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED 2028194: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028198: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 202819c: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 20281a0: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 20281a4: 87 29 20 04 sll %g4, 4, %g3 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 20281a8: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 20281ac: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 20281b0: 02 80 00 3d be 20282a4 <== NOT EXECUTED 20281b4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 20281b8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED ) { 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) ; ) 20281bc: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED 20281c0: 32 bf ff e7 bne,a 202815c <== NOT EXECUTED 20281c4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 20281c8: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 20281cc: 7f ff 84 8f call 2009408 20281d0: 90 10 20 44 mov 0x44, %o0 20281d4: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 20281d8: 80 a2 20 00 cmp %o0, 0 20281dc: 02 80 00 40 be 20282dc <== NEVER TAKEN 20281e0: b6 10 00 08 mov %o0, %i3 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 20281e4: 92 10 20 00 clr %o1 20281e8: 40 00 8d d6 call 204b940 20281ec: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 20281f0: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 20281f4: c8 06 40 00 ld [ %i1 ], %g4 20281f8: c6 06 60 04 ld [ %i1 + 4 ], %g3 20281fc: c4 06 60 08 ld [ %i1 + 8 ], %g2 2028200: c2 06 60 0c ld [ %i1 + 0xc ], %g1 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; 2028204: b2 0b ff fe and %o7, -2, %i1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2028208: c8 26 e0 20 st %g4, [ %i3 + 0x20 ] if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 202820c: 9e 10 20 01 mov 1, %o7 lfat_fd->flags &= ~FAT_FILE_REMOVED; 2028210: f2 2e e0 30 stb %i1, [ %i3 + 0x30 ] if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 2028214: de 26 e0 08 st %o7, [ %i3 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2028218: b2 10 3f ff mov -1, %i1 lfat_fd->dir_pos = *dir_pos; 202821c: c6 26 e0 24 st %g3, [ %i3 + 0x24 ] 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; 2028220: f2 26 e0 3c st %i1, [ %i3 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2028224: c4 26 e0 28 st %g2, [ %i3 + 0x28 ] if ( rc != RC_OK ) 2028228: 80 a4 60 00 cmp %l1, 0 202822c: 02 80 00 25 be 20282c0 <== NEVER TAKEN 2028230: c2 26 e0 2c st %g1, [ %i3 + 0x2c ] lfat_fd->ino = key; 2028234: f8 26 e0 0c st %i4, [ %i3 + 0xc ] */ 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); 2028238: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 202823c: 92 10 00 1b mov %i3, %o1 2028240: 90 02 00 10 add %o0, %l0, %o0 2028244: 7f ff 99 c3 call 200e950 <_Chain_Append> 2028248: b0 10 20 00 clr %i0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 202824c: 81 c7 e0 08 ret 2028250: 81 e8 00 00 restore register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028254: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 2028258: 82 00 7f fe add %g1, -2, %g1 202825c: 85 28 40 02 sll %g1, %g2, %g2 2028260: 10 bf ff 87 b 202807c 2028264: 84 00 80 03 add %g2, %g3, %g2 2028268: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 202826c: 84 00 bf fe add %g2, -2, %g2 2028270: 89 28 80 04 sll %g2, %g4, %g4 2028274: 10 bf ff a2 b 20280fc 2028278: 88 01 00 03 add %g4, %g3, %g4 /* 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; 202827c: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2028280: 84 00 a0 01 inc %g2 2028284: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2028288: 81 c7 e0 08 ret 202828c: 91 e8 20 00 restore %g0, 0, %o0 2028290: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED 2028294: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 2028298: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED 202829c: 10 bf ff bb b 2028188 <== NOT EXECUTED 20282a0: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 20282a4: 02 bf ff ca be 20281cc <== NOT EXECUTED 20282a8: a2 10 20 00 clr %l1 <== NOT EXECUTED 20282ac: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 20282b0: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED 20282b4: 32 bf ff c2 bne,a 20281bc <== NOT EXECUTED 20282b8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20282bc: 30 bf ff c4 b,a 20281cc <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 20282c0: 40 00 04 9b call 202952c <== NOT EXECUTED 20282c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 20282c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20282cc: 12 bf ff db bne 2028238 <== NOT EXECUTED 20282d0: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 20282d4: 7f ff 82 c4 call 2008de4 <== NOT EXECUTED 20282d8: 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 ); 20282dc: 40 00 7f cc call 204820c <__errno> <== NOT EXECUTED 20282e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20282e4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20282e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20282ec: 81 c7 e0 08 ret <== NOT EXECUTED 20282f0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202830c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 202830c: 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; 2028310: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2028314: 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; 2028318: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 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) 202831c: 80 a6 e0 00 cmp %i3, 0 2028320: 02 80 00 7f be 202851c <== NEVER TAKEN 2028324: 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 ) 2028328: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 202832c: 80 a0 40 1a cmp %g1, %i2 2028330: 08 80 00 7b bleu 202851c <== NEVER TAKEN 2028334: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2028338: 08 80 00 4c bleu 2028468 <== ALWAYS TAKEN 202833c: 84 20 40 1b sub %g1, %i3, %g2 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2028340: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028344: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2028348: 80 a0 60 01 cmp %g1, 1 202834c: 22 80 00 4c be,a 202847c 2028350: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028354: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028358: e0 14 60 06 lduh [ %l1 + 6 ], %l0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 202835c: a7 36 80 13 srl %i2, %l3, %l3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2028360: 90 10 00 1d mov %i5, %o0 2028364: 92 10 00 19 mov %i1, %o1 2028368: 94 10 00 13 mov %l3, %o2 202836c: 7f ff ff 0e call 2027fa4 2028370: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2028374: b0 92 60 00 orcc %o1, 0, %i0 2028378: 12 80 00 69 bne 202851c <== NEVER TAKEN 202837c: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; while (count > 0) 2028380: a8 10 20 00 clr %l4 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028384: a1 34 20 10 srl %l0, 0x10, %l0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028388: a4 10 20 00 clr %l2 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 202838c: a0 04 3f ff add %l0, -1, %l0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028390: 80 a6 e0 00 cmp %i3, 0 2028394: 02 80 00 5b be 2028500 <== NEVER TAKEN 2028398: b4 0e 80 10 and %i2, %l0, %i2 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 202839c: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 20283a0: d4 14 40 00 lduh [ %l1 ], %o2 return rc; while (count > 0) 20283a4: 10 80 00 20 b 2028424 20283a8: 82 10 00 1a mov %i2, %g1 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)) ) 20283ac: f0 08 e0 0a ldub [ %g3 + 0xa ], %i0 <== NOT EXECUTED 20283b0: 80 8e 20 03 btst 3, %i0 <== NOT EXECUTED 20283b4: 22 80 00 26 be,a 202844c <== NOT EXECUTED 20283b8: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20283bc: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED { 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); 20283c0: 85 30 40 02 srl %g1, %g2, %g2 byte = ofs & (fs_info->vol.bps - 1); 20283c4: 95 2a a0 10 sll %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 20283c8: 98 07 00 12 add %i4, %l2, %o4 { 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); byte = ofs & (fs_info->vol.bps - 1); 20283cc: 95 32 a0 10 srl %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 20283d0: 92 02 40 02 add %o1, %g2, %o1 { 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); byte = ofs & (fs_info->vol.bps - 1); 20283d4: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 20283d8: 96 10 00 10 mov %l0, %o3 20283dc: 94 0a 80 01 and %o2, %g1, %o2 20283e0: 40 00 03 97 call 202923c <_fat_block_read> 20283e4: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20283e8: 94 07 bf fc add %fp, -4, %o2 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 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 ) 20283ec: 80 a2 20 00 cmp %o0, 0 20283f0: 06 80 00 3c bl 20284e0 <== NEVER TAKEN 20283f4: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 20283f8: e8 07 bf fc ld [ %fp + -4 ], %l4 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 20283fc: a4 04 80 10 add %l2, %l0, %l2 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028400: 40 00 6b f8 call 20433e0 2028404: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 2028408: 80 a2 20 00 cmp %o0, 0 202840c: 12 80 00 15 bne 2028460 <== NEVER TAKEN 2028410: b6 a6 c0 10 subcc %i3, %l0, %i3 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028414: 02 80 00 3a be 20284fc <== ALWAYS TAKEN 2028418: 82 10 20 00 clr %g1 202841c: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED 2028420: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028424: e0 14 60 06 lduh [ %l1 + 6 ], %l0 2028428: a0 24 00 01 sub %l0, %g1, %l0 202842c: 80 a4 00 1b cmp %l0, %i3 2028430: 08 80 00 03 bleu 202843c 2028434: c8 07 bf fc ld [ %fp + -4 ], %g4 2028438: a0 10 00 1b mov %i3, %l0 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)) ) 202843c: 80 a1 20 00 cmp %g4, 0 2028440: 02 bf ff db be 20283ac <== NEVER TAKEN 2028444: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028448: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 202844c: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 2028450: 92 01 3f fe add %g4, -2, %o1 2028454: 93 2a 40 18 sll %o1, %i0, %o1 2028458: 10 bf ff da b 20283c0 202845c: 92 02 40 03 add %o1, %g3, %o1 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; } 2028460: 81 c7 e0 08 ret <== NOT EXECUTED 2028464: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2028468: 80 a6 80 02 cmp %i2, %g2 202846c: 28 bf ff b7 bleu,a 2028348 <== ALWAYS TAKEN 2028470: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2028474: 10 bf ff b4 b 2028344 <== NOT EXECUTED 2028478: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202847c: 80 a0 60 00 cmp %g1, 0 2028480: 32 bf ff b6 bne,a 2028358 <== NEVER TAKEN 2028484: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028488: c2 0c 60 0a ldub [ %l1 + 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)) && 202848c: 80 88 60 03 btst 3, %g1 2028490: 22 bf ff b2 be,a 2028358 <== NEVER TAKEN 2028494: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2028498: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 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)) ) 202849c: 80 a0 60 00 cmp %g1, 0 20284a0: 32 80 00 12 bne,a 20284e8 <== NEVER TAKEN 20284a4: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20284a8: d2 04 60 1c ld [ %l1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 20284ac: c2 0c 60 02 ldub [ %l1 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 20284b0: d4 14 40 00 lduh [ %l1 ], %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); 20284b4: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 20284b8: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 20284bc: 90 10 00 1d mov %i5, %o0 20284c0: 92 02 40 01 add %o1, %g1, %o1 20284c4: 94 0e 80 0a and %i2, %o2, %o2 20284c8: 96 10 00 1b mov %i3, %o3 20284cc: 40 00 03 5c call 202923c <_fat_block_read> 20284d0: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20284d4: b0 92 20 00 orcc %o0, 0, %i0 20284d8: 16 80 00 11 bge 202851c <== ALWAYS TAKEN 20284dc: 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; 20284e0: 81 c7 e0 08 ret <== NOT EXECUTED 20284e4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 20284e8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 20284ec: 92 00 7f fe add %g1, -2, %o1 <== NOT EXECUTED 20284f0: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 20284f4: 10 bf ff ee b 20284ac <== NOT EXECUTED 20284f8: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 20284fc: b0 10 00 12 mov %l2, %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); 2028500: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 2028504: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2028508: 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); 202850c: a4 06 80 12 add %i2, %l2, %l2 2028510: a5 34 80 01 srl %l2, %g1, %l2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028514: a6 04 80 13 add %l2, %l3, %l3 2028518: e6 26 60 34 st %l3, [ %i1 + 0x34 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 202851c: 81 c7 e0 08 ret 2028520: 81 e8 00 00 restore =============================================================================== 02028dec : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028dec: 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; 2028df0: fa 06 60 1c ld [ %i1 + 0x1c ], %i5 uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028df4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2028df8: fa 27 bf fc st %i5, [ %fp + -4 ] int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028dfc: b6 10 00 18 mov %i0, %i3 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)) && 2028e00: 80 a0 60 01 cmp %g1, 1 2028e04: 02 80 00 21 be 2028e88 <== NEVER TAKEN 2028e08: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028e0c: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2028e10: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2028e14: 84 0f 40 02 and %i5, %g2, %g2 2028e18: 80 a0 80 01 cmp %g2, %g1 2028e1c: 0a 80 00 0e bcs 2028e54 <== ALWAYS TAKEN 2028e20: c0 26 60 18 clr [ %i1 + 0x18 ] ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 2028e24: 10 80 00 15 b 2028e78 <== NOT EXECUTED 2028e28: ba 10 20 00 clr %i5 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2028e2c: de 06 60 18 ld [ %i1 + 0x18 ], %o7 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028e30: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2028e34: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2028e38: c2 07 bf fc ld [ %fp + -4 ], %g1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2028e3c: 88 03 c0 04 add %o7, %g4, %g4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028e40: 86 08 40 03 and %g1, %g3, %g3 2028e44: 80 a0 c0 02 cmp %g3, %g2 2028e48: 1a 80 00 0c bcc 2028e78 <== ALWAYS TAKEN 2028e4c: c8 26 60 18 st %g4, [ %i1 + 0x18 ] 2028e50: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028e54: 92 10 00 1d mov %i5, %o1 2028e58: 90 10 00 1b mov %i3, %o0 2028e5c: 40 00 69 61 call 20433e0 2028e60: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2028e64: 80 a2 20 00 cmp %o0, 0 2028e68: 22 bf ff f1 be,a 2028e2c <== ALWAYS TAKEN 2028e6c: c8 17 20 06 lduh [ %i4 + 6 ], %g4 fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 2028e70: 81 c7 e0 08 ret <== NOT EXECUTED 2028e74: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; 2028e78: 90 10 20 00 clr %o0 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 2028e7c: fa 26 60 3c st %i5, [ %i1 + 0x3c ] return rc; } 2028e80: 81 c7 e0 08 ret 2028e84: 91 e8 00 08 restore %g0, %o0, %o0 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)) && 2028e88: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2028e8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028e90: 32 bf ff e0 bne,a 2028e10 <== NOT EXECUTED 2028e94: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028e98: 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)) && 2028e9c: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2028ea0: 22 bf ff dc be,a 2028e10 <== NOT EXECUTED 2028ea4: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2028ea8: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED return rc; 2028eac: 90 10 20 00 clr %o0 <== NOT EXECUTED 2028eb0: 10 bf ff f0 b 2028e70 <== NOT EXECUTED 2028eb4: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED =============================================================================== 02028524 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2028524: 9d e3 bf 98 save %sp, -104, %sp 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 ) 2028528: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 { 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; 202852c: 84 10 3f ff mov -1, %g2 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2028530: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 2028534: c4 27 bf fc st %g2, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2028538: 80 a0 40 1a cmp %g1, %i2 202853c: 08 80 00 21 bleu 20285c0 2028540: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 return rc; assert(fat_fd->fat_file_size); 2028544: 80 a0 60 00 cmp %g1, 0 2028548: 02 80 00 33 be 2028614 <== NEVER TAKEN 202854c: 11 00 81 a8 sethi %hi(0x206a000), %o0 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2028550: c6 08 a0 08 ldub [ %g2 + 8 ], %g3 2028554: c4 10 a0 06 lduh [ %g2 + 6 ], %g2 2028558: 84 00 bf ff add %g2, -1, %g2 202855c: b4 00 80 1a add %g2, %i2, %i2 2028560: b5 36 80 03 srl %i2, %g3, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2028564: 87 2e 80 03 sll %i2, %g3, %g3 2028568: 80 a0 40 03 cmp %g1, %g3 202856c: 08 80 00 13 bleu 20285b8 <== NEVER TAKEN 2028570: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 2028574: 80 a6 a0 00 cmp %i2, 0 2028578: 02 80 00 09 be 202859c <== ALWAYS TAKEN 202857c: 90 10 00 18 mov %i0, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 2028580: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028584: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 2028588: 7f ff fe 87 call 2027fa4 <== NOT EXECUTED 202858c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 2028590: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2028594: 12 80 00 09 bne 20285b8 <== NOT EXECUTED 2028598: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 202859c: 92 10 00 19 mov %i1, %o1 20285a0: 94 10 00 1a mov %i2, %o2 20285a4: 7f ff fe 80 call 2027fa4 20285a8: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20285ac: 80 a2 60 00 cmp %o1, 0 20285b0: 22 80 00 07 be,a 20285cc <== ALWAYS TAKEN 20285b4: d2 07 bf f8 ld [ %fp + -8 ], %o1 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; } 20285b8: 81 c7 e0 08 ret 20285bc: 91 e8 00 09 restore %g0, %o1, %o0 uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 20285c0: 92 10 20 00 clr %o1 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; } 20285c4: 81 c7 e0 08 ret 20285c8: 91 e8 00 09 restore %g0, %o1, %o0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20285cc: 40 00 6c cf call 2043908 20285d0: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 20285d4: 92 92 20 00 orcc %o0, 0, %o1 20285d8: 12 bf ff f8 bne 20285b8 <== NEVER TAKEN 20285dc: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20285e0: 02 bf ff f6 be 20285b8 <== ALWAYS TAKEN 20285e4: 90 10 00 18 mov %i0, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20285e8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 20285ec: 40 00 6c 05 call 2043600 <== NOT EXECUTED 20285f0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20285f4: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 20285f8: 12 bf ff f0 bne 20285b8 <== NOT EXECUTED 20285fc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2028600: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2028604: 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; 2028608: 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; 202860c: 10 bf ff eb b 20285b8 <== NOT EXECUTED 2028610: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 2028614: 15 00 81 a8 sethi %hi(0x206a000), %o2 <== NOT EXECUTED 2028618: 17 00 81 a8 sethi %hi(0x206a000), %o3 <== NOT EXECUTED 202861c: 90 12 20 f8 or %o0, 0xf8, %o0 <== NOT EXECUTED 2028620: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2028624: 94 12 a1 58 or %o2, 0x158, %o2 <== NOT EXECUTED 2028628: 40 00 08 ba call 202a910 <__assert_func> <== NOT EXECUTED 202862c: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED =============================================================================== 020289bc : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20289bc: 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; 20289c0: 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; 20289c4: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20289c8: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20289cc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 20289d0: 80 a6 e0 00 cmp %i3, 0 20289d4: 02 80 00 82 be 2028bdc <== NEVER TAKEN 20289d8: b0 10 20 00 clr %i0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20289dc: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20289e0: 80 a0 40 1a cmp %g1, %i2 20289e4: 0a 80 00 7a bcs 2028bcc <== NEVER TAKEN 20289e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 20289ec: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 20289f0: 80 a6 c0 01 cmp %i3, %g1 20289f4: 18 80 00 76 bgu 2028bcc <== NEVER TAKEN 20289f8: 82 20 40 1b sub %g1, %i3, %g1 20289fc: 80 a6 80 01 cmp %i2, %g1 2028a00: 18 80 00 73 bgu 2028bcc <== NEVER TAKEN 2028a04: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2028a08: 90 10 00 1d mov %i5, %o0 2028a0c: 92 10 00 19 mov %i1, %o1 2028a10: 94 10 00 11 mov %l1, %o2 2028a14: 7f ff ff 71 call 20287d8 2028a18: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2028a1c: b0 92 20 00 orcc %o0, 0, %i0 2028a20: 12 80 00 6f bne 2028bdc <== NEVER TAKEN 2028a24: 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)) 2028a28: 80 a4 40 01 cmp %l1, %g1 2028a2c: 32 80 00 02 bne,a 2028a34 <== NEVER TAKEN 2028a30: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028a34: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2028a38: 80 a0 60 01 cmp %g1, 1 2028a3c: 22 80 00 45 be,a 2028b50 2028a40: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028a44: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028a48: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028a4c: 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); 2028a50: 90 10 00 1d mov %i5, %o0 2028a54: 92 10 00 19 mov %i1, %o1 2028a58: 94 10 00 12 mov %l2, %o2 2028a5c: 7f ff fd 52 call 2027fa4 2028a60: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 2028a64: b0 92 60 00 orcc %o1, 0, %i0 2028a68: 12 80 00 5d bne 2028bdc <== NEVER TAKEN 2028a6c: 83 2c 60 10 sll %l1, 0x10, %g1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028a70: 83 30 60 10 srl %g1, 0x10, %g1 2028a74: 82 00 7f ff add %g1, -1, %g1 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028a78: a2 10 20 00 clr %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028a7c: b4 0e 80 01 and %i2, %g1, %i2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028a80: a8 10 20 00 clr %l4 2028a84: 80 a6 e0 00 cmp %i3, 0 2028a88: 12 80 00 20 bne 2028b08 <== ALWAYS TAKEN 2028a8c: 82 10 00 1a mov %i2, %g1 } /* 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); 2028a90: 10 80 00 5d b 2028c04 <== NOT EXECUTED 2028a94: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== NOT EXECUTED 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)) ) 2028a98: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED 2028a9c: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED 2028aa0: 22 80 00 25 be,a 2028b34 <== NOT EXECUTED 2028aa4: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028aa8: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED 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); 2028aac: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 byte = ofs & (fs_info->vol.bps - 1); 2028ab0: 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); 2028ab4: 85 30 40 02 srl %g1, %g2, %g2 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 2028ab8: 98 07 00 11 add %i4, %l1, %o4 { 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); byte = ofs & (fs_info->vol.bps - 1); 2028abc: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 2028ac0: 92 02 40 02 add %o1, %g2, %o1 2028ac4: 94 08 40 0a and %g1, %o2, %o2 2028ac8: 40 00 01 ff call 20292c4 <_fat_block_write> 2028acc: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028ad0: 94 07 bf f8 add %fp, -8, %o2 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 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 ) 2028ad4: 80 a2 20 00 cmp %o0, 0 2028ad8: 06 80 00 1c bl 2028b48 <== NEVER TAKEN 2028adc: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2028ae0: 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; 2028ae4: e6 07 bf fc ld [ %fp + -4 ], %l3 cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028ae8: 40 00 6a 3e call 20433e0 2028aec: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 2028af0: b0 92 20 00 orcc %o0, 0, %i0 2028af4: 12 80 00 3a bne 2028bdc <== NEVER TAKEN 2028af8: b6 a6 c0 13 subcc %i3, %l3, %i3 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028afc: 02 80 00 40 be 2028bfc 2028b00: a2 04 40 13 add %l1, %l3, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 2028b04: 82 10 20 00 clr %g1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028b08: d6 14 20 06 lduh [ %l0 + 6 ], %o3 2028b0c: 96 22 c0 01 sub %o3, %g1, %o3 2028b10: 80 a2 c0 1b cmp %o3, %i3 2028b14: 08 80 00 03 bleu 2028b20 2028b18: c6 07 bf f8 ld [ %fp + -8 ], %g3 2028b1c: 96 10 00 1b mov %i3, %o3 2028b20: d6 27 bf fc st %o3, [ %fp + -4 ] 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)) ) 2028b24: 80 a0 e0 00 cmp %g3, 0 2028b28: 02 bf ff dc be 2028a98 <== NEVER TAKEN 2028b2c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028b30: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 2028b34: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2 2028b38: 92 00 ff fe add %g3, -2, %o1 2028b3c: 93 2a 40 04 sll %o1, %g4, %o1 2028b40: 10 bf ff db b 2028aac 2028b44: 92 02 40 02 add %o1, %g2, %o1 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; } 2028b48: 81 c7 e0 08 ret <== NOT EXECUTED 2028b4c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028b50: 80 a0 60 00 cmp %g1, 0 2028b54: 32 bf ff bd bne,a 2028a48 <== NEVER TAKEN 2028b58: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028b5c: 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)) && 2028b60: 80 88 60 03 btst 3, %g1 2028b64: 22 bf ff b9 be,a 2028a48 <== NEVER TAKEN 2028b68: 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); 2028b6c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 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)) ) 2028b70: 80 a0 a0 00 cmp %g2, 0 2028b74: 12 80 00 1c bne 2028be4 <== NEVER TAKEN 2028b78: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 2028b7c: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 2028b80: 80 88 e0 03 btst 3, %g3 2028b84: 22 80 00 19 be,a 2028be8 <== NEVER TAKEN 2028b88: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028b8c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 2028b90: c2 0c 20 02 ldub [ %l0 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 2028b94: 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); 2028b98: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 2028b9c: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 2028ba0: 90 10 00 1d mov %i5, %o0 2028ba4: 92 02 40 01 add %o1, %g1, %o1 2028ba8: 94 0e 80 0a and %i2, %o2, %o2 2028bac: 96 10 00 1b mov %i3, %o3 2028bb0: 40 00 01 c5 call 20292c4 <_fat_block_write> 2028bb4: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2028bb8: b0 92 20 00 orcc %o0, 0, %i0 2028bbc: 16 80 00 18 bge 2028c1c <== ALWAYS TAKEN 2028bc0: 01 00 00 00 nop return -1; 2028bc4: 81 c7 e0 08 ret <== NOT EXECUTED 2028bc8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2028bcc: 40 00 7d 90 call 204820c <__errno> <== NOT EXECUTED 2028bd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028bd4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028bd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028bdc: 81 c7 e0 08 ret <== NOT EXECUTED 2028be0: 81 e8 00 00 restore <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028be4: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 2028be8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2028bec: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED 2028bf0: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2028bf4: 10 bf ff e7 b 2028b90 <== NOT EXECUTED 2028bf8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028bfc: b0 10 00 11 mov %l1, %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); 2028c00: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2028c04: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2028c08: 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); 2028c0c: a2 06 80 11 add %i2, %l1, %l1 2028c10: a3 34 40 01 srl %l1, %g1, %l1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028c14: a4 04 40 12 add %l1, %l2, %l2 2028c18: 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; 2028c1c: 81 c7 e0 08 ret 2028c20: 81 e8 00 00 restore =============================================================================== 02043908 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2043908: 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; 204390c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = chain; uint32_t next_cln = 0; 2043910: c0 27 bf fc clr [ %fp + -4 ] uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2043914: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2043918: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 204391c: 84 0e 40 02 and %i1, %g2, %g2 2043920: 80 a0 80 01 cmp %g2, %g1 2043924: 1a 80 00 25 bcc 20439b8 <== NEVER TAKEN 2043928: b8 10 00 18 mov %i0, %i4 204392c: b6 10 00 19 mov %i1, %i3 2043930: b4 10 20 00 clr %i2 2043934: 10 80 00 0e b 204396c 2043938: a0 10 20 00 clr %l0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 204393c: 7f ff ff 31 call 2043600 2043940: 01 00 00 00 nop if ( rc != RC_OK ) 2043944: 80 a2 20 00 cmp %o0, 0 2043948: 02 80 00 03 be 2043954 <== ALWAYS TAKEN 204394c: f6 07 bf fc ld [ %fp + -4 ], %i3 2043950: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 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) 2043954: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2043958: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 204395c: 84 0e c0 02 and %i3, %g2, %g2 2043960: 80 a0 80 01 cmp %g2, %g1 2043964: 1a 80 00 17 bcc 20439c0 <== ALWAYS TAKEN 2043968: b4 06 a0 01 inc %i2 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 204396c: 92 10 00 1b mov %i3, %o1 2043970: 94 07 bf fc add %fp, -4, %o2 2043974: 7f ff fe 9b call 20433e0 2043978: 90 10 00 1c mov %i4, %o0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 204397c: 92 10 00 1b mov %i3, %o1 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2043980: b0 10 00 08 mov %o0, %i0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2043984: 94 10 20 00 clr %o2 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 2043988: 80 a6 20 00 cmp %i0, 0 204398c: 02 bf ff ec be 204393c <== ALWAYS TAKEN 2043990: 90 10 00 1c mov %i4, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2043994: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED 2043998: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 204399c: 02 80 00 03 be 20439a8 <== NOT EXECUTED 20439a0: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 20439a4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 20439a8: 7f ff 95 ca call 20290d0 <== NOT EXECUTED 20439ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; 20439b0: 81 c7 e0 08 ret <== NOT EXECUTED 20439b4: 81 e8 00 00 restore <== NOT EXECUTED { 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; 20439b8: b4 10 20 00 clr %i2 <== NOT EXECUTED fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 20439bc: a0 10 20 00 clr %l0 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20439c0: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 20439c4: 80 a0 7f ff cmp %g1, -1 20439c8: 02 80 00 04 be 20439d8 <== ALWAYS TAKEN 20439cc: f2 27 60 44 st %i1, [ %i5 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 20439d0: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED 20439d4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 20439d8: b0 10 00 10 mov %l0, %i0 20439dc: 7f ff 95 bd call 20290d0 20439e0: 90 10 00 1d mov %i5, %o0 if (rc1 != RC_OK) return rc1; return RC_OK; } 20439e4: 81 c7 e0 08 ret 20439e8: 81 e8 00 00 restore =============================================================================== 0202962c : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 202962c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2029630: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2029634: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED 2029638: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 <== NOT EXECUTED 202963c: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 <== NOT EXECUTED 2029640: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED 2029644: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2029648: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 202964c: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2029650: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED 2029654: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED 2029658: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED } 202965c: 81 c7 e0 08 ret <== NOT EXECUTED 2029660: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020433e0 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 20433e0: 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; 20433e4: 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)) ) 20433e8: 80 a6 60 01 cmp %i1, 1 20433ec: 08 80 00 26 bleu 2043484 <== NEVER TAKEN 20433f0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 20433f4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 20433f8: 82 00 60 01 inc %g1 20433fc: 80 a6 40 01 cmp %i1, %g1 2043400: 18 80 00 21 bgu 2043484 <== NEVER TAKEN 2043404: 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) + 2043408: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 204340c: 80 88 60 01 btst 1, %g1 2043410: 12 80 00 23 bne 204349c <== ALWAYS TAKEN 2043414: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 2043418: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 204341c: 02 80 00 30 be 20434dc <== NOT EXECUTED 2043420: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 2043424: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2043428: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 204342c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2043430: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2043434: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043438: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 204343c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2043440: 7f ff 96 9e call 2028eb8 <== NOT EXECUTED 2043444: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 2043448: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 204344c: 12 80 00 5a bne 20435b4 <== NOT EXECUTED 2043450: 01 00 00 00 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 2043454: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 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); 2043458: a1 2c 20 10 sll %l0, 0x10, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 204345c: 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); 2043460: a1 34 20 10 srl %l0, 0x10, %l0 2043464: 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 ) 2043468: 02 80 00 21 be 20434ec <== NEVER TAKEN 204346c: b8 0f 00 10 and %i4, %l0, %i4 2043470: 80 a0 60 04 cmp %g1, 4 2043474: 02 80 00 3e be 204356c <== NEVER TAKEN 2043478: 80 a0 60 01 cmp %g1, 1 204347c: 02 80 00 29 be 2043520 <== ALWAYS TAKEN 2043480: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 2043484: 40 00 13 62 call 204820c <__errno> <== NOT EXECUTED 2043488: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 204348c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2043490: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2043494: 81 c7 e0 08 ret <== NOT EXECUTED 2043498: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 204349c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 20434a0: b9 36 60 01 srl %i1, 1, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 20434a4: e0 17 40 00 lduh [ %i5 ], %l0 /* 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) + 20434a8: b8 07 00 19 add %i4, %i1, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 20434ac: 90 10 00 1d mov %i5, %o0 /* 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) + 20434b0: b7 37 00 1b srl %i4, %i3, %i3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 20434b4: 94 10 20 01 mov 1, %o2 /* 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) + 20434b8: b6 06 c0 01 add %i3, %g1, %i3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 20434bc: 96 07 bf fc add %fp, -4, %o3 20434c0: 7f ff 96 7e call 2028eb8 20434c4: 92 10 00 1b mov %i3, %o1 if (rc != RC_OK) 20434c8: b0 92 20 00 orcc %o0, 0, %i0 20434cc: 22 bf ff e3 be,a 2043458 <== ALWAYS TAKEN 20434d0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 20434d4: 81 c7 e0 08 ret <== NOT EXECUTED 20434d8: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 20434dc: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 20434e0: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 20434e4: 10 bf ff d3 b 2043430 <== NOT EXECUTED 20434e8: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 20434ec: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 20434f0: 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)); 20434f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 20434f8: 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)); 20434fc: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2043500: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2043504: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2043508: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 204350c: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2043510: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2043514: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 2043518: 81 c7 e0 08 ret <== NOT EXECUTED 204351c: 81 e8 00 00 restore <== NOT EXECUTED /* * 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) ) 2043520: 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))); 2043524: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2043528: 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))); 204352c: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 2043530: 80 a0 c0 1c cmp %g3, %i4 2043534: 02 80 00 22 be 20435bc <== NEVER TAKEN 2043538: c2 26 80 00 st %g1, [ %i2 ] *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 204353c: b8 00 80 1c add %g2, %i4, %i4 2043540: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 2043544: 85 28 a0 08 sll %g2, 8, %g2 2043548: 82 10 80 01 or %g2, %g1, %g1 204354c: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2043550: 80 8e 60 01 btst 1, %i1 2043554: 22 80 00 17 be,a 20435b0 2043558: 82 08 6f ff and %g1, 0xfff, %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 204355c: 83 30 60 04 srl %g1, 4, %g1 2043560: c2 26 80 00 st %g1, [ %i2 ] 2043564: 81 c7 e0 08 ret 2043568: 81 e8 00 00 restore *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 204356c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2043570: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2043574: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED 2043578: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 204357c: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2043580: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2043584: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2043588: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 204358c: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2043590: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2043594: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2043598: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 204359c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 20435a0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 20435a4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 20435a8: 81 c7 e0 08 ret <== NOT EXECUTED 20435ac: 81 e8 00 00 restore <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 20435b0: c2 26 80 00 st %g1, [ %i2 ] 20435b4: 81 c7 e0 08 ret 20435b8: 81 e8 00 00 restore * align problems for some architectures */ *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, 20435bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20435c0: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 20435c4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20435c8: 7f ff 96 3c call 2028eb8 <== NOT EXECUTED 20435cc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 20435d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20435d4: 12 80 00 09 bne 20435f8 <== NOT EXECUTED 20435d8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 20435dc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20435e0: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2 <== NOT EXECUTED 20435e4: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED 20435e8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20435ec: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20435f0: 10 bf ff d8 b 2043550 <== NOT EXECUTED 20435f4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 20435f8: 81 c7 e0 08 ret <== NOT EXECUTED 20435fc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0202952c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 202952c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 2029530: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== 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)) 2029534: 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; 2029538: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== 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)) 202953c: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2029540: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029544: 22 80 00 20 be,a 20295c4 <== NOT EXECUTED 2029548: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 202954c: c6 07 60 68 ld [ %i5 + 0x68 ], %g3 <== NOT EXECUTED 2029550: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED 2029554: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2029558: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED 202955c: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 2029560: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 2029564: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED 2029568: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED 202956c: 02 80 00 1d be 20295e0 <== NOT EXECUTED 2029570: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2029574: 10 80 00 0a b 202959c <== NOT EXECUTED 2029578: 88 10 20 00 clr %g4 <== NOT EXECUTED 202957c: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2029580: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2029584: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 2029588: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 202958c: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED 2029590: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED 2029594: 02 80 00 13 be 20295e0 <== NOT EXECUTED 2029598: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 202959c: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 20295a0: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 20295a4: 0a 80 00 03 bcs 20295b0 <== NOT EXECUTED 20295a8: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED fs_info->index = 0; 20295ac: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 20295b0: 88 01 20 01 inc %g4 <== NOT EXECUTED 20295b4: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED 20295b8: 32 bf ff f1 bne,a 202957c <== NOT EXECUTED 20295bc: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== 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)) 20295c0: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 20295c4: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 20295c8: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 20295cc: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 20295d0: 0a 80 00 0c bcs 2029600 <== NOT EXECUTED 20295d4: b0 10 20 00 clr %i0 <== NOT EXECUTED 20295d8: 81 c7 e0 08 ret <== NOT EXECUTED 20295dc: 81 e8 00 00 restore <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 20295e0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20295e4: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED 20295e8: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED 20295ec: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 20295f0: f0 07 60 6c ld [ %i5 + 0x6c ], %i0 <== NOT EXECUTED 20295f4: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 20295f8: 81 c7 e0 08 ret <== NOT EXECUTED 20295fc: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 2029600: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 2029604: 7f ff 82 ce call 200a13c <== NOT EXECUTED 2029608: d2 27 60 70 st %o1, [ %i5 + 0x70 ] <== NOT EXECUTED if (fs_info->uino != NULL) 202960c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029610: 12 80 00 04 bne 2029620 <== NOT EXECUTED 2029614: d0 27 60 68 st %o0, [ %i5 + 0x68 ] <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 2029618: 81 c7 e0 08 ret <== NOT EXECUTED 202961c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); if (fs_info->uino != NULL) fs_info->index = fs_info->uino_pool_size; 2029620: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== NOT EXECUTED 2029624: 10 bf ff c7 b 2029540 <== NOT EXECUTED 2029628: d2 27 60 6c st %o1, [ %i5 + 0x6c ] <== NOT EXECUTED =============================================================================== 02029468 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2029468: 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; 202946c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = start_cln; 2029470: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2029474: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2029478: 92 10 20 01 mov 1, %o1 202947c: 7f ff 7d 7b call 2008a68 2029480: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2029484: b6 92 20 00 orcc %o0, 0, %i3 2029488: 32 80 00 04 bne,a 2029498 <== ALWAYS TAKEN 202948c: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2029490: 30 80 00 21 b,a 2029514 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2029494: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2029498: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 202949c: 84 0e 40 02 and %i1, %g2, %g2 20294a0: 80 a0 80 01 cmp %g2, %g1 20294a4: 1a 80 00 12 bcc 20294ec 20294a8: 94 10 00 1b mov %i3, %o2 { ret = fat_cluster_write(mt_entry, cur_cln, buf); 20294ac: 92 10 00 19 mov %i1, %o1 20294b0: 7f ff ff d3 call 20293fc 20294b4: 90 10 00 1c mov %i4, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20294b8: 94 07 bf fc add %fp, -4, %o2 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) 20294bc: 80 a2 3f ff cmp %o0, -1 20294c0: 02 80 00 10 be 2029500 <== NEVER TAKEN 20294c4: 90 10 00 1c mov %i4, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20294c8: 40 00 67 c6 call 20433e0 20294cc: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) 20294d0: b0 92 20 00 orcc %o0, 0, %i0 20294d4: 22 bf ff f0 be,a 2029494 <== ALWAYS TAKEN 20294d8: f2 07 bf fc ld [ %fp + -4 ], %i1 { free(buf); 20294dc: 7f ff 7e 42 call 2008de4 <== NOT EXECUTED 20294e0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 20294e4: 81 c7 e0 08 ret <== NOT EXECUTED 20294e8: 81 e8 00 00 restore <== NOT EXECUTED } } free(buf); return rc; 20294ec: b0 10 20 00 clr %i0 free(buf); return rc; } } free(buf); 20294f0: 7f ff 7e 3d call 2008de4 20294f4: 90 10 00 1b mov %i3, %o0 return rc; } 20294f8: 81 c7 e0 08 ret 20294fc: 81 e8 00 00 restore while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 2029500: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 2029504: 7f ff 7e 38 call 2008de4 <== NOT EXECUTED 2029508: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 202950c: 81 c7 e0 08 ret <== NOT EXECUTED 2029510: 81 e8 00 00 restore <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 2029514: 40 00 7b 3e call 204820c <__errno> <== NOT EXECUTED 2029518: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202951c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2029520: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029524: 81 c7 e0 08 ret <== NOT EXECUTED 2029528: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029858 : * 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) { 2029858: 9d e3 bf 10 save %sp, -240, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 202985c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(mt_entry->dev, O_RDWR); 2029860: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 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; 2029864: c0 27 bf fc clr [ %fp + -4 ] vol->fd = open(mt_entry->dev, O_RDWR); 2029868: 7f ff 81 58 call 2009dc8 202986c: 92 10 20 02 mov 2, %o1 2029870: d0 27 60 54 st %o0, [ %i5 + 0x54 ] if (vol->fd < 0) 2029874: 80 a2 20 00 cmp %o0, 0 2029878: 06 80 01 dc bl 2029fe8 <== NEVER TAKEN 202987c: b8 10 00 18 mov %i0, %i4 { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 2029880: 40 00 05 b6 call 202af58 2029884: 92 07 bf a8 add %fp, -88, %o1 if (rc != 0) 2029888: 80 a2 20 00 cmp %o0, 0 202988c: 12 80 01 a0 bne 2029f0c <== NEVER TAKEN 2029890: c4 07 bf b4 ld [ %fp + -76 ], %g2 close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2029894: 03 00 00 3c sethi %hi(0xf000), %g1 2029898: 84 08 80 01 and %g2, %g1, %g2 202989c: 03 00 00 18 sethi %hi(0x6000), %g1 20298a0: 80 a0 80 01 cmp %g2, %g1 20298a4: 12 80 01 9b bne 2029f10 <== NEVER TAKEN 20298a8: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 static inline int rtems_disk_fd_get_disk_device( int fd, const rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 20298ac: 94 07 60 58 add %i5, 0x58, %o2 20298b0: 13 10 01 10 sethi %hi(0x40044000), %o1 20298b4: 7f ff 7d a4 call 2008f44 20298b8: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { 20298bc: b0 92 20 00 orcc %o0, 0, %i0 20298c0: 12 80 01 93 bne 2029f0c <== NEVER TAKEN 20298c4: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 20298c8: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 20298cc: 7f ff 73 89 call 20066f0 20298d0: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) 20298d4: 80 a2 20 00 cmp %o0, 0 20298d8: 12 80 01 b0 bne 2029f98 <== NEVER TAKEN 20298dc: d0 07 bf fc ld [ %fp + -4 ], %o0 { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 20298e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20298e4: c4 08 60 0b ldub [ %g1 + 0xb ], %g2 20298e8: c6 08 60 0c ldub [ %g1 + 0xc ], %g3 20298ec: c4 2f bf a3 stb %g2, [ %fp + -93 ] 20298f0: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2 20298f4: c6 2f bf a4 stb %g3, [ %fp + -92 ] 20298f8: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3 20298fc: c4 2f bf a1 stb %g2, [ %fp + -95 ] 2029900: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2 2029904: c6 2f bf a0 stb %g3, [ %fp + -96 ] 2029908: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3 202990c: c4 2f bf 8f stb %g2, [ %fp + -113 ] 2029910: c4 08 60 27 ldub [ %g1 + 0x27 ], %g2 2029914: f2 08 60 0e ldub [ %g1 + 0xe ], %i1 2029918: c6 2f bf 9f stb %g3, [ %fp + -97 ] 202991c: c6 08 60 28 ldub [ %g1 + 0x28 ], %g3 2029920: c4 2f bf 97 stb %g2, [ %fp + -105 ] 2029924: c4 08 60 2c ldub [ %g1 + 0x2c ], %g2 2029928: f2 2f bf a2 stb %i1, [ %fp + -94 ] 202992c: c6 2f bf 87 stb %g3, [ %fp + -121 ] 2029930: c8 08 60 0f ldub [ %g1 + 0xf ], %g4 2029934: f6 08 60 0d ldub [ %g1 + 0xd ], %i3 2029938: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2 202993c: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1 2029940: e0 08 60 14 ldub [ %g1 + 0x14 ], %l0 2029944: e2 08 60 16 ldub [ %g1 + 0x16 ], %l1 2029948: e4 08 60 17 ldub [ %g1 + 0x17 ], %l2 202994c: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5 2029950: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6 2029954: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7 2029958: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3 202995c: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4 2029960: c4 2f bf 9c stb %g2, [ %fp + -100 ] 2029964: c6 08 60 2d ldub [ %g1 + 0x2d ], %g3 2029968: c4 08 60 2e ldub [ %g1 + 0x2e ], %g2 202996c: c6 2f bf 9b stb %g3, [ %fp + -101 ] 2029970: c4 2f bf 9a stb %g2, [ %fp + -102 ] 2029974: c6 08 60 2f ldub [ %g1 + 0x2f ], %g3 2029978: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2 202997c: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1 2029980: c6 2f bf 7f stb %g3, [ %fp + -129 ] sc = rtems_bdbuf_release( block); 2029984: c8 27 bf 70 st %g4, [ %fp + -144 ] { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2029988: c4 2f bf 9e stb %g2, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 202998c: 7f ff 73 fe call 2006984 2029990: c2 2f bf 9d stb %g1, [ %fp + -99 ] if (sc != RTEMS_SUCCESSFUL) 2029994: 80 a2 20 00 cmp %o0, 0 2029998: 12 80 01 80 bne 2029f98 <== NEVER TAKEN 202999c: c8 07 bf 70 ld [ %fp + -144 ], %g4 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20299a0: c2 0f bf a4 ldub [ %fp + -92 ], %g1 20299a4: c4 0f bf a3 ldub [ %fp + -93 ], %g2 20299a8: 83 28 60 08 sll %g1, 8, %g1 20299ac: 92 10 40 02 or %g1, %g2, %o1 20299b0: d2 37 40 00 sth %o1, [ %i5 ] if ( (vol->bps != 512) && 20299b4: 93 2a 60 10 sll %o1, 0x10, %o1 20299b8: 83 32 60 10 srl %o1, 0x10, %g1 20299bc: 80 a0 64 00 cmp %g1, 0x400 20299c0: 12 80 00 c1 bne 2029cc4 <== ALWAYS TAKEN 20299c4: 80 a0 62 00 cmp %g1, 0x200 { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 20299c8: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 20299cc: 80 88 60 01 btst 1, %g1 20299d0: 12 80 00 0a bne 20299f8 <== ALWAYS TAKEN 20299d4: c0 2f 60 03 clrb [ %i5 + 3 ] * 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) { 20299d8: 10 80 00 03 b 20299e4 <== NOT EXECUTED 20299dc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 20299e0: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 20299e4: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 20299e8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 20299ec: 02 bf ff fd be 20299e0 <== NOT EXECUTED 20299f0: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 20299f4: c4 2f 60 03 stb %g2, [ %i5 + 3 ] <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 20299f8: c0 2f 60 02 clrb [ %i5 + 2 ] 20299fc: 93 32 60 10 srl %o1, 0x10, %o1 2029a00: 84 10 20 01 mov 1, %g2 2029a04: 80 8a 60 01 btst 1, %o1 2029a08: 02 80 00 05 be 2029a1c <== ALWAYS TAKEN 2029a0c: 82 10 00 09 mov %o1, %g1 i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 2029a10: 10 80 00 09 b 2029a34 <== NOT EXECUTED 2029a14: f6 2f 60 04 stb %i3, [ %i5 + 4 ] <== NOT EXECUTED 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; 2029a18: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->sec_log2++); 2029a1c: 83 38 60 01 sra %g1, 1, %g1 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; 2029a20: 80 88 60 01 btst 1, %g1 2029a24: 02 bf ff fd be 2029a18 2029a28: 86 00 a0 01 add %g2, 1, %g3 2029a2c: c4 2f 60 02 stb %g2, [ %i5 + 2 ] i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 2029a30: f6 2f 60 04 stb %i3, [ %i5 + 4 ] /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 2029a34: b6 8e e0 ff andcc %i3, 0xff, %i3 2029a38: 02 80 01 40 be 2029f38 <== NEVER TAKEN 2029a3c: 82 10 00 1b mov %i3, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2029a40: c0 2f 60 05 clrb [ %i5 + 5 ] 2029a44: 80 8e e0 01 btst 1, %i3 2029a48: 12 80 00 0b bne 2029a74 <== NEVER TAKEN 2029a4c: 84 10 20 00 clr %g2 2029a50: 10 80 00 03 b 2029a5c 2029a54: 84 10 20 01 mov 1, %g2 2029a58: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 2029a5c: 83 38 60 01 sra %g1, 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2029a60: 80 88 60 01 btst 1, %g1 2029a64: 02 bf ff fd be 2029a58 <== NEVER TAKEN 2029a68: 86 00 a0 01 add %g2, 1, %g3 2029a6c: c4 2f 60 05 stb %g2, [ %i5 + 5 ] 2029a70: 84 08 a0 ff and %g2, 0xff, %g2 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) 2029a74: 85 2a 40 02 sll %o1, %g2, %g2 2029a78: c4 37 60 06 sth %g2, [ %i5 + 6 ] 2029a7c: 83 28 a0 10 sll %g2, 0x10, %g1 2029a80: 05 00 00 20 sethi %hi(0x8000), %g2 2029a84: 83 30 60 10 srl %g1, 0x10, %g1 2029a88: 80 a0 40 02 cmp %g1, %g2 2029a8c: 18 80 01 2b bgu 2029f38 <== NEVER TAKEN 2029a90: 80 88 60 01 btst 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2029a94: c0 2f 60 08 clrb [ %i5 + 8 ] 2029a98: 02 80 00 05 be 2029aac <== ALWAYS TAKEN 2029a9c: 84 10 20 01 mov 1, %g2 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); 2029aa0: 10 80 00 09 b 2029ac4 <== NOT EXECUTED 2029aa4: c6 0f bf a2 ldub [ %fp + -94 ], %g3 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2029aa8: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->bpc_log2++); 2029aac: 83 38 60 01 sra %g1, 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2029ab0: 80 88 60 01 btst 1, %g1 2029ab4: 02 bf ff fd be 2029aa8 2029ab8: 86 00 a0 01 add %g2, 1, %g3 2029abc: c4 2f 60 08 stb %g2, [ %i5 + 8 ] 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); 2029ac0: c6 0f bf a2 ldub [ %fp + -94 ], %g3 2029ac4: 88 09 20 ff and %g4, 0xff, %g4 2029ac8: 89 29 20 08 sll %g4, 8, %g4 2029acc: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2029ad0: c4 0f bf a0 ldub [ %fp + -96 ], %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); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2029ad4: c6 27 bf a4 st %g3, [ %fp + -92 ] 2029ad8: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2029adc: c6 0f bf a1 ldub [ %fp + -95 ], %g3 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029ae0: 82 02 7f ff add %o1, -1, %g1 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); 2029ae4: 85 28 a0 08 sll %g2, 8, %g2 2029ae8: 84 10 80 03 or %g2, %g3, %g2 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029aec: 87 28 a0 10 sll %g2, 0x10, %g3 2029af0: 87 30 e0 0b srl %g3, 0xb, %g3 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); 2029af4: c4 37 60 20 sth %g2, [ %i5 + 0x20 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029af8: 90 00 c0 01 add %g3, %g1, %o0 2029afc: 40 00 df b2 call 20619c4 <.div> 2029b00: f4 2f 60 09 stb %i2, [ %i5 + 9 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029b04: 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)) / 2029b08: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029b0c: 85 2a 00 02 sll %o0, %g2, %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)) / 2029b10: 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) 2029b14: a4 0c a0 ff and %l2, 0xff, %l2 2029b18: a2 0c 60 ff and %l1, 0xff, %l1 2029b1c: a5 2c a0 08 sll %l2, 8, %l2 2029b20: a2 14 80 11 or %l2, %l1, %l1 2029b24: 91 2c 60 10 sll %l1, 0x10, %o0 2029b28: 80 a2 20 00 cmp %o0, 0 2029b2c: 02 80 00 71 be 2029cf0 <== NEVER TAKEN 2029b30: c4 27 60 28 st %g2, [ %i5 + 0x28 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2029b34: 91 32 20 10 srl %o0, 0x10, %o0 2029b38: d0 27 60 18 st %o0, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2029b3c: c2 27 bf 74 st %g1, [ %fp + -140 ] 2029b40: 7f ff 64 e8 call 2002ee0 <.umul> 2029b44: 92 0e a0 ff and %i2, 0xff, %o1 2029b48: c2 07 bf 74 ld [ %fp + -140 ], %g1 2029b4c: c6 07 bf a4 ld [ %fp + -92 ], %g3 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2029b50: b2 0e 60 ff and %i1, 0xff, %i1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2029b54: 85 28 e0 10 sll %g3, 0x10, %g2 2029b58: 85 30 a0 10 srl %g2, 0x10, %g2 2029b5c: 84 02 00 02 add %o0, %g2, %g2 2029b60: 82 00 80 01 add %g2, %g1, %g1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 2029b64: c4 27 60 1c st %g2, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2029b68: 90 0c 20 ff and %l0, 0xff, %o0 2029b6c: 91 2a 20 08 sll %o0, 8, %o0 2029b70: 90 12 00 19 or %o0, %i1, %o0 2029b74: 91 2a 20 10 sll %o0, 0x10, %o0 2029b78: 80 a2 20 00 cmp %o0, 0 2029b7c: 02 80 00 d2 be 2029ec4 <== NEVER TAKEN 2029b80: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2029b84: 91 32 20 10 srl %o0, 0x10, %o0 2029b88: d0 27 60 2c st %o0, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 2029b8c: 90 22 00 01 sub %o0, %g1, %o0 2029b90: 40 00 df 8b call 20619bc <.udiv> 2029b94: 92 10 00 1b mov %i3, %o1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2029b98: 80 a2 2f f4 cmp %o0, 0xff4 2029b9c: 18 80 00 61 bgu 2029d20 <== NEVER TAKEN 2029ba0: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2029ba4: 82 10 20 01 mov 1, %g1 2029ba8: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2029bac: 82 10 2f ff mov 0xfff, %g1 2029bb0: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2029bb4: 82 10 2f f8 mov 0xff8, %g1 2029bb8: c2 27 60 10 st %g1, [ %i5 + 0x10 ] else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2029bbc: 82 10 3f ff mov -1, %g1 } } } else { vol->rdir_cl = 0; 2029bc0: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2029bc4: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2029bc8: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2029bcc: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2029bd0: 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); 2029bd4: 7f ff fd 3f call 20290d0 2029bd8: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2029bdc: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2029be0: 7f ff 64 c0 call 2002ee0 <.umul> 2029be4: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2029be8: 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)); 2029bec: 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; 2029bf0: 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)); 2029bf4: 90 10 20 02 mov 2, %o0 2029bf8: 7f ff 7b 9c call 2008a68 2029bfc: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2029c00: 80 a2 20 00 cmp %o0, 0 2029c04: 02 80 01 13 be 202a050 <== NEVER TAKEN 2029c08: d0 27 60 60 st %o0, [ %i5 + 0x60 ] 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 ); 2029c0c: 86 02 20 04 add %o0, 4, %g3 2029c10: 82 02 20 0c add %o0, 0xc, %g1 2029c14: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2029c18: c6 22 00 00 st %g3, [ %o0 ] head->previous = NULL; 2029c1c: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2029c20: 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; 2029c24: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 2029c28: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2029c2c: 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)); 2029c30: 92 10 20 0c mov 0xc, %o1 2029c34: 7f ff 7b 8d call 2008a68 2029c38: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2029c3c: 80 a2 20 00 cmp %o0, 0 2029c40: 02 80 01 0d be 202a074 <== NEVER TAKEN 2029c44: d0 27 60 64 st %o0, [ %i5 + 0x64 ] 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 ); 2029c48: 82 02 20 0c add %o0, 0xc, %g1 2029c4c: 84 02 20 04 add %o0, 4, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2029c50: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 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 ); 2029c54: 82 02 20 10 add %o0, 0x10, %g1 head->next = tail; 2029c58: c4 22 00 00 st %g2, [ %o0 ] head->previous = NULL; 2029c5c: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2029c60: 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; 2029c64: c0 22 20 10 clr [ %o0 + 0x10 ] } 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; 2029c68: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2029c6c: c2 22 20 0c st %g1, [ %o0 + 0xc ] 2029c70: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2029c74: c0 27 60 6c clr [ %i5 + 0x6c ] } 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; 2029c78: 83 28 80 01 sll %g2, %g1, %g1 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; 2029c7c: 84 10 21 00 mov 0x100, %g2 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2029c80: 83 28 60 04 sll %g1, 4, %g1 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; 2029c84: c4 27 60 70 st %g2, [ %i5 + 0x70 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2029c88: c2 27 60 74 st %g1, [ %i5 + 0x74 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2029c8c: 90 10 21 00 mov 0x100, %o0 2029c90: 7f ff 7b 76 call 2008a68 2029c94: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2029c98: 80 a2 20 00 cmp %o0, 0 2029c9c: 02 80 00 d9 be 202a000 <== NEVER TAKEN 2029ca0: d0 27 60 68 st %o0, [ %i5 + 0x68 ] close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2029ca4: d0 17 40 00 lduh [ %i5 ], %o0 2029ca8: 7f ff 7b 70 call 2008a68 2029cac: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 2029cb0: 80 a2 20 00 cmp %o0, 0 2029cb4: 02 80 00 aa be 2029f5c <== NEVER TAKEN 2029cb8: d0 27 60 84 st %o0, [ %i5 + 0x84 ] free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 2029cbc: 81 c7 e0 08 ret 2029cc0: 81 e8 00 00 restore } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 2029cc4: 22 bf ff 42 be,a 20299cc <== ALWAYS TAKEN 2029cc8: 83 32 60 19 srl %o1, 0x19, %g1 (vol->bps != 1024) && 2029ccc: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED 2029cd0: 22 bf ff 42 be,a 20299d8 <== NOT EXECUTED 2029cd4: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED (vol->bps != 2048) && 2029cd8: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 2029cdc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2029ce0: 12 80 00 96 bne 2029f38 <== NOT EXECUTED 2029ce4: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 2029ce8: 10 bf ff 3f b 20299e4 <== NOT EXECUTED 2029cec: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2029cf0: c4 0f bf 9f ldub [ %fp + -97 ], %g2 <== NOT EXECUTED 2029cf4: c6 0f bf 97 ldub [ %fp + -105 ], %g3 <== NOT EXECUTED 2029cf8: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2029cfc: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED 2029d00: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED 2029d04: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029d08: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029d0c: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 2029d10: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED 2029d14: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029d18: 10 bf ff 89 b 2029b3c <== NOT EXECUTED 2029d1c: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2029d20: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2029d24: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2029d28: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2029d2c: 08 80 00 72 bleu 2029ef4 <== NOT EXECUTED 2029d30: 84 10 63 ff or %g1, 0x3ff, %g2 <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2029d34: c6 0f bf 87 ldub [ %fp + -121 ], %g3 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d38: f6 0f bf 9b ldub [ %fp + -101 ], %i3 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2029d3c: 82 08 ff 80 and %g3, -128, %g1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d40: f4 0f bf 9c ldub [ %fp + -100 ], %i2 <== NOT EXECUTED 2029d44: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 2029d48: f2 0f bf 7f ldub [ %fp + -129 ], %i1 <== NOT EXECUTED 2029d4c: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2029d50: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d54: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2029d58: 88 10 a3 ff or %g2, 0x3ff, %g4 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d5c: 86 16 c0 03 or %i3, %g3, %g3 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 2029d60: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d64: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED 2029d68: b7 2e 60 18 sll %i1, 0x18, %i3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2029d6c: b4 10 20 04 mov 4, %i2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d70: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2029d74: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2029d78: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2029d7c: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029d80: c6 27 60 38 st %g3, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 2029d84: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2029d88: 02 80 00 6a be 2029f30 <== NOT EXECUTED 2029d8c: 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; 2029d90: c4 0f bf 87 ldub [ %fp + -121 ], %g2 <== NOT EXECUTED 2029d94: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED 2029d98: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 2029d9c: d2 0f bf 9d ldub [ %fp + -99 ], %o1 <== NOT EXECUTED 2029da0: c2 0f bf 9e ldub [ %fp + -98 ], %g1 <== NOT EXECUTED 2029da4: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 2029da8: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 2029dac: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 2029db0: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 2029db4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2029db8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029dbc: 02 80 00 5f be 2029f38 <== NOT EXECUTED 2029dc0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 2029dc4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029dc8: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2029dcc: 7f ff fd 1c call 202923c <_fat_block_read> <== NOT EXECUTED 2029dd0: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2029dd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029dd8: 06 80 00 b2 bl 202a0a0 <== NOT EXECUTED 2029ddc: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2029de0: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2029de4: c8 0f bf f2 ldub [ %fp + -14 ], %g4 <== NOT EXECUTED 2029de8: c6 0f bf f0 ldub [ %fp + -16 ], %g3 <== NOT EXECUTED 2029dec: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2029df0: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2029df4: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 2029df8: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED 2029dfc: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2029e00: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2029e04: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2029e08: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2029e0c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2029e10: 12 80 00 6b bne 2029fbc <== NOT EXECUTED 2029e14: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2029e18: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED 2029e1c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2029e20: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2029e24: 7f ff fd 06 call 202923c <_fat_block_read> <== NOT EXECUTED 2029e28: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2029e2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029e30: 06 80 00 81 bl 202a034 <== NOT EXECUTED 2029e34: c6 0f bf f5 ldub [ %fp + -11 ], %g3 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e38: de 0f bf f6 ldub [ %fp + -10 ], %o7 <== NOT EXECUTED 2029e3c: f2 0f bf f4 ldub [ %fp + -12 ], %i1 <== NOT EXECUTED 2029e40: f4 0f bf f7 ldub [ %fp + -9 ], %i2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e44: f6 0f bf f9 ldub [ %fp + -7 ], %i3 <== NOT EXECUTED 2029e48: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 2029e4c: c8 0f bf f8 ldub [ %fp + -8 ], %g4 <== NOT EXECUTED 2029e50: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e54: 9f 2b e0 10 sll %o7, 0x10, %o7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e58: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e5c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2029e60: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED 2029e64: 86 10 c0 0f or %g3, %o7, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e68: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e6c: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e70: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e74: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e78: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED 2029e7c: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 2029e80: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029e84: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029e88: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2029e8c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2029e90: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 2029e94: 7f ff fd f9 call 2029678 <== NOT EXECUTED 2029e98: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2029e9c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 2029ea0: 02 bf ff 4d be 2029bd4 <== NOT EXECUTED 2029ea4: 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); 2029ea8: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 2029eac: 7f ff fc 89 call 20290d0 <== NOT EXECUTED 2029eb0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); close(vol->fd); 2029eb4: 7f ff 7b 10 call 2008af4 <== NOT EXECUTED 2029eb8: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return rc; 2029ebc: 81 c7 e0 08 ret <== NOT EXECUTED 2029ec0: 81 e8 00 00 restore <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2029ec4: f2 0f bf 8f ldub [ %fp + -113 ], %i1 <== NOT EXECUTED 2029ec8: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED 2029ecc: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED 2029ed0: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029ed4: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED 2029ed8: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2029edc: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED 2029ee0: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED 2029ee4: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 2029ee8: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029eec: 10 bf ff 28 b 2029b8c <== NOT EXECUTED 2029ef0: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 2029ef4: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 2029ef8: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 2029efc: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 2029f00: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 2029f04: 10 bf ff 2e b 2029bbc <== NOT EXECUTED 2029f08: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { close(vol->fd); 2029f0c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029f10: 7f ff 7a f9 call 2008af4 <== NOT EXECUTED 2029f14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 2029f18: 40 00 78 bd call 204820c <__errno> <== NOT EXECUTED 2029f1c: 01 00 00 00 nop <== NOT EXECUTED 2029f20: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED 2029f24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029f28: 81 c7 e0 08 ret <== NOT EXECUTED 2029f2c: 81 e8 00 00 restore <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 2029f30: 10 bf ff 9b b 2029d9c <== NOT EXECUTED 2029f34: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 2029f38: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029f3c: 7f ff 7a ee call 2008af4 <== NOT EXECUTED 2029f40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2029f44: 40 00 78 b2 call 204820c <__errno> <== NOT EXECUTED 2029f48: 01 00 00 00 nop <== NOT EXECUTED 2029f4c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2029f50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029f54: 81 c7 e0 08 ret <== NOT EXECUTED 2029f58: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { close(vol->fd); 2029f5c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029f60: 7f ff 7a e5 call 2008af4 <== NOT EXECUTED 2029f64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2029f68: 7f ff 7b 9f call 2008de4 <== NOT EXECUTED 2029f6c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2029f70: 7f ff 7b 9d call 2008de4 <== NOT EXECUTED 2029f74: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED free(fs_info->uino); 2029f78: 7f ff 7b 9b call 2008de4 <== NOT EXECUTED 2029f7c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2029f80: 40 00 78 a3 call 204820c <__errno> <== NOT EXECUTED 2029f84: 01 00 00 00 nop <== NOT EXECUTED 2029f88: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2029f8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 2029f90: 81 c7 e0 08 ret <== NOT EXECUTED 2029f94: 81 e8 00 00 restore <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 2029f98: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029f9c: 7f ff 7a d6 call 2008af4 <== NOT EXECUTED 2029fa0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2029fa4: 40 00 78 9a call 204820c <__errno> <== NOT EXECUTED 2029fa8: 01 00 00 00 nop <== NOT EXECUTED 2029fac: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2029fb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029fb4: 81 c7 e0 08 ret <== NOT EXECUTED 2029fb8: 81 e8 00 00 restore <== 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); 2029fbc: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 2029fc0: 7f ff fc 44 call 20290d0 <== NOT EXECUTED 2029fc4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); close(vol->fd); 2029fc8: 7f ff 7a cb call 2008af4 <== NOT EXECUTED 2029fcc: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2029fd0: 40 00 78 8f call 204820c <__errno> <== NOT EXECUTED 2029fd4: 01 00 00 00 nop <== NOT EXECUTED 2029fd8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2029fdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029fe0: 81 c7 e0 08 ret <== NOT EXECUTED 2029fe4: 81 e8 00 00 restore <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; vol->fd = open(mt_entry->dev, O_RDWR); if (vol->fd < 0) { rtems_set_errno_and_return_minus_one(ENXIO); 2029fe8: 40 00 78 89 call 204820c <__errno> <== NOT EXECUTED 2029fec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029ff0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 2029ff4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029ff8: 81 c7 e0 08 ret <== NOT EXECUTED 2029ffc: 81 e8 00 00 restore <== 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 ) { close(vol->fd); 202a000: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 202a004: 7f ff 7a bc call 2008af4 <== NOT EXECUTED 202a008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 202a00c: 7f ff 7b 76 call 2008de4 <== NOT EXECUTED 202a010: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 202a014: 7f ff 7b 74 call 2008de4 <== NOT EXECUTED 202a018: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a01c: 40 00 78 7c call 204820c <__errno> <== NOT EXECUTED 202a020: 01 00 00 00 nop <== NOT EXECUTED 202a024: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a028: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a02c: 81 c7 e0 08 ret <== NOT EXECUTED 202a030: 81 e8 00 00 restore <== 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); 202a034: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 202a038: 7f ff fc 26 call 20290d0 <== NOT EXECUTED 202a03c: b0 10 3f ff mov -1, %i0 <== 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); close(vol->fd); 202a040: 7f ff 7a ad call 2008af4 <== NOT EXECUTED 202a044: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return -1; 202a048: 81 c7 e0 08 ret <== NOT EXECUTED 202a04c: 81 e8 00 00 restore <== 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 ) { close(vol->fd); 202a050: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 202a054: 7f ff 7a a8 call 2008af4 <== NOT EXECUTED 202a058: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a05c: 40 00 78 6c call 204820c <__errno> <== NOT EXECUTED 202a060: 01 00 00 00 nop <== NOT EXECUTED 202a064: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a068: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a06c: 81 c7 e0 08 ret <== NOT EXECUTED 202a070: 81 e8 00 00 restore <== 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 ) { close(vol->fd); 202a074: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 202a078: 7f ff 7a 9f call 2008af4 <== NOT EXECUTED 202a07c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 202a080: 7f ff 7b 59 call 2008de4 <== NOT EXECUTED 202a084: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a088: 40 00 78 61 call 204820c <__errno> <== NOT EXECUTED 202a08c: 01 00 00 00 nop <== NOT EXECUTED 202a090: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a094: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a098: 81 c7 e0 08 ret <== NOT EXECUTED 202a09c: 81 e8 00 00 restore <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { close(vol->fd); 202a0a0: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 202a0a4: 7f ff 7a 94 call 2008af4 <== NOT EXECUTED 202a0a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 202a0ac: 81 c7 e0 08 ret <== NOT EXECUTED 202a0b0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020439ec : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 20439ec: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20439f0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 uint32_t cl4find = 2; uint32_t next_cln = 0; 20439f4: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 20439f8: e6 04 20 34 ld [ %l0 + 0x34 ], %l3 uint32_t i = 2; *cls_added = 0; 20439fc: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2043a00: ba 10 00 18 mov %i0, %i5 uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 2043a04: 80 a6 a0 00 cmp %i2, 0 2043a08: 02 80 00 46 be 2043b20 <== NEVER TAKEN 2043a0c: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2043a10: e2 04 20 44 ld [ %l0 + 0x44 ], %l1 2043a14: 80 a4 7f ff cmp %l1, -1 2043a18: 22 80 00 02 be,a 2043a20 2043a1c: a2 10 20 02 mov 2, %l1 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; 2043a20: a6 04 e0 02 add %l3, 2, %l3 /* * 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) 2043a24: 80 a4 e0 02 cmp %l3, 2 2043a28: 08 80 00 40 bleu 2043b28 <== NEVER TAKEN 2043a2c: a4 10 20 02 mov 2, %l2 2043a30: 10 80 00 17 b 2043a8c 2043a34: a8 10 20 00 clr %l4 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2043a38: 90 10 00 1d mov %i5, %o0 2043a3c: 92 10 00 11 mov %l1, %o1 2043a40: 7f ff fe f0 call 2043600 2043a44: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2043a48: 80 a2 20 00 cmp %o0, 0 2043a4c: 32 80 00 35 bne,a 2043b20 <== NEVER TAKEN 2043a50: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 2043a54: c2 06 c0 00 ld [ %i3 ], %g1 2043a58: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 2043a5c: 80 a6 80 01 cmp %i2, %g1 2043a60: 02 80 00 49 be 2043b84 <== ALWAYS TAKEN 2043a64: c2 26 c0 00 st %g1, [ %i3 ] 2043a68: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 2043a6c: a2 04 60 01 inc %l1 <== NOT EXECUTED if (cl4find >= data_cls_val) 2043a70: 80 a4 c0 11 cmp %l3, %l1 2043a74: 18 80 00 03 bgu 2043a80 <== ALWAYS TAKEN 2043a78: a4 04 a0 01 inc %l2 cl4find = 2; 2043a7c: a2 10 20 02 mov 2, %l1 <== 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) 2043a80: 80 a4 c0 12 cmp %l3, %l2 2043a84: 28 80 00 2b bleu,a 2043b30 <== NEVER TAKEN 2043a88: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 2043a8c: 90 10 00 1d mov %i5, %o0 2043a90: 92 10 00 11 mov %l1, %o1 2043a94: 7f ff fe 53 call 20433e0 2043a98: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2043a9c: b0 92 20 00 orcc %o0, 0, %i0 2043aa0: 12 80 00 30 bne 2043b60 <== NEVER TAKEN 2043aa4: c2 07 bf fc ld [ %fp + -4 ], %g1 if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 2043aa8: 80 a0 60 00 cmp %g1, 0 2043aac: 32 bf ff f1 bne,a 2043a70 2043ab0: a2 04 60 01 inc %l1 /* * 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) 2043ab4: c2 06 c0 00 ld [ %i3 ], %g1 2043ab8: 80 a0 60 00 cmp %g1, 0 2043abc: 22 bf ff df be,a 2043a38 <== ALWAYS TAKEN 2043ac0: e2 26 40 00 st %l1, [ %i1 ] } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2043ac4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043ac8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2043acc: 7f ff fe cd call 2043600 <== NOT EXECUTED 2043ad0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2043ad4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 2043ad8: 12 80 00 37 bne 2043bb4 <== NOT EXECUTED 2043adc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 2043ae0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043ae4: 7f ff fe c7 call 2043600 <== NOT EXECUTED 2043ae8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2043aec: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED 2043af0: 22 bf ff da be,a 2043a58 <== NOT EXECUTED 2043af4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2043af8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2043afc: 7f ff ff 83 call 2043908 <== NOT EXECUTED 2043b00: 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); 2043b04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043b08: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2043b0c: 7f ff fe bd call 2043600 <== NOT EXECUTED 2043b10: 94 10 20 00 clr %o2 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 2043b14: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); 2043b18: 7f ff 95 6e call 20290d0 <== NOT EXECUTED 2043b1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 2043b20: 81 c7 e0 08 ret <== NOT EXECUTED 2043b24: 81 e8 00 00 restore <== 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) 2043b28: a8 10 20 00 clr %l4 <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2043b2c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED 2043b30: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2043b34: 02 80 00 05 be 2043b48 <== NOT EXECUTED 2043b38: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 2043b3c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2043b40: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2043b44: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2043b48: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 2043b4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2043b50: 7f ff 95 60 call 20290d0 <== NOT EXECUTED 2043b54: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 2043b58: 81 c7 e0 08 ret <== NOT EXECUTED 2043b5c: 81 e8 00 00 restore <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 2043b60: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2043b64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2043b68: 02 80 00 17 be 2043bc4 <== NOT EXECUTED 2043b6c: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 2043b70: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2043b74: 7f ff ff 65 call 2043908 <== NOT EXECUTED 2043b78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043b7c: 81 c7 e0 08 ret <== NOT EXECUTED 2043b80: 81 e8 00 00 restore <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2043b84: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2043b88: 80 a0 7f ff cmp %g1, -1 2043b8c: 02 80 00 05 be 2043ba0 <== ALWAYS TAKEN 2043b90: e2 24 20 44 st %l1, [ %l0 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 2043b94: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2043b98: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2043b9c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2043ba0: e2 27 00 00 st %l1, [ %i4 ] fat_buf_release(fs_info); 2043ba4: 7f ff 95 4b call 20290d0 2043ba8: 90 10 00 10 mov %l0, %o0 return rc; 2043bac: 81 c7 e0 08 ret 2043bb0: 81 e8 00 00 restore /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2043bb4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2043bb8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043bbc: 7f ff ff 53 call 2043908 <== NOT EXECUTED 2043bc0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 2043bc4: 81 c7 e0 08 ret <== NOT EXECUTED 2043bc8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02043600 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2043600: 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; 2043604: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2043608: 80 a6 60 01 cmp %i1, 1 204360c: 08 80 00 90 bleu 204384c <== NEVER TAKEN 2043610: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 2043614: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2043618: 82 00 60 01 inc %g1 204361c: 80 a6 40 01 cmp %i1, %g1 2043620: 18 80 00 8b bgu 204384c <== NEVER TAKEN 2043624: 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) + 2043628: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 204362c: 80 88 60 01 btst 1, %g1 2043630: 12 80 00 22 bne 20436b8 <== ALWAYS TAKEN 2043634: e0 0f 60 02 ldub [ %i5 + 2 ], %l0 2043638: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 204363c: 02 80 00 25 be 20436d0 <== NOT EXECUTED 2043640: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 2043644: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2043648: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 204364c: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2043650: e2 17 40 00 lduh [ %i5 ], %l1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2043654: 90 10 00 1d mov %i5, %o0 2043658: 92 10 00 10 mov %l0, %o1 204365c: 94 10 20 01 mov 1, %o2 2043660: 7f ff 96 16 call 2028eb8 2043664: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2043668: b0 92 20 00 orcc %o0, 0, %i0 204366c: 12 80 00 11 bne 20436b0 <== NEVER TAKEN 2043670: a3 2c 60 10 sll %l1, 0x10, %l1 return rc; switch ( fs_info->vol.type ) 2043674: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3 2043678: 80 a6 e0 02 cmp %i3, 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); 204367c: a3 34 60 10 srl %l1, 0x10, %l1 2043680: a2 04 7f ff add %l1, -1, %l1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2043684: 02 80 00 17 be 20436e0 <== NEVER TAKEN 2043688: b8 0f 00 11 and %i4, %l1, %i4 204368c: 80 a6 e0 04 cmp %i3, 4 2043690: 02 80 00 3d be 2043784 <== NEVER TAKEN 2043694: 80 a6 e0 01 cmp %i3, 1 2043698: 02 80 00 1d be 204370c <== ALWAYS TAKEN 204369c: 80 8e 60 01 btst 1, %i1 fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 20436a0: 40 00 12 db call 204820c <__errno> <== NOT EXECUTED 20436a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20436a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20436ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 20436b0: 81 c7 e0 08 ret <== NOT EXECUTED 20436b4: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 20436b8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 20436bc: b9 36 60 01 srl %i1, 1, %i4 20436c0: b8 07 00 19 add %i4, %i1, %i4 20436c4: a1 37 00 10 srl %i4, %l0, %l0 20436c8: 10 bf ff e2 b 2043650 20436cc: a0 04 00 01 add %l0, %g1, %l0 20436d0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 20436d4: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 20436d8: 10 bf ff de b 2043650 <== NOT EXECUTED 20436dc: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 20436e0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 20436e4: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 20436e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 20436ec: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 20436f0: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 20436f4: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 20436f8: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 20436fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2043700: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 2043704: 81 c7 e0 08 ret <== NOT EXECUTED 2043708: 81 e8 00 00 restore <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 204370c: 02 80 00 35 be 20437e0 2043710: 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)) = 2043714: 85 2e a0 04 sll %i2, 4, %g2 case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 2043718: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 204371c: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 2043720: 86 08 e0 0f and %g3, 0xf, %g3 2043724: c6 28 40 1c stb %g3, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2043728: c2 07 bf fc ld [ %fp + -4 ], %g1 204372c: c2 00 60 1c ld [ %g1 + 0x1c ], %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)) = 2043730: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 2043734: 84 10 c0 02 or %g3, %g2, %g2 2043738: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 204373c: c2 17 40 00 lduh [ %i5 ], %g1 2043740: 82 00 7f ff add %g1, -1, %g1 2043744: 80 a0 40 1c cmp %g1, %i4 2043748: 02 80 00 5c be 20438b8 <== NEVER TAKEN 204374c: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2043750: c2 07 bf fc ld [ %fp + -4 ], %g1 2043754: b8 07 20 01 inc %i4 2043758: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 204375c: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2043760: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2043764: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2043768: 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))) | 204376c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 2043770: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2043774: 84 10 80 1a or %g2, %i2, %g2 2043778: c4 28 40 1c stb %g2, [ %g1 + %i4 ] 204377c: 81 c7 e0 08 ret 2043780: 81 e8 00 00 restore case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2043784: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2043788: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== 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)); 204378c: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2043790: c6 00 80 1c ld [ %g2 + %i4 ], %g3 <== 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)); 2043794: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2043798: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 204379c: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20437a0: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 20437a4: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20437a8: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED 20437ac: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20437b0: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 20437b4: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED 20437b8: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20437bc: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED 20437c0: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 20437c4: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 20437c8: 82 10 40 03 or %g1, %g3, %g1 <== 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)) = 20437cc: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED 20437d0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20437d4: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 20437d8: 81 c7 e0 08 ret <== NOT EXECUTED 20437dc: 81 e8 00 00 restore <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 20437e0: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 20437e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20437e8: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 20437ec: c2 07 bf fc ld [ %fp + -4 ], %g1 20437f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 20437f4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 20437f8: 84 16 80 02 or %i2, %g2, %g2 20437fc: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2043800: c2 17 40 00 lduh [ %i5 ], %g1 2043804: 82 00 7f ff add %g1, -1, %g1 2043808: 80 a0 40 1c cmp %g1, %i4 204380c: 02 80 00 16 be 2043864 <== NEVER TAKEN 2043810: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 2043814: c2 07 bf fc ld [ %fp + -4 ], %g1 2043818: b8 07 20 01 inc %i4 204381c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2043820: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2043824: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2043828: 84 08 bf f0 and %g2, -16, %g2 204382c: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 2043830: c2 07 bf fc ld [ %fp + -4 ], %g1 2043834: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 2043838: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 204383c: b4 10 80 1a or %g2, %i2, %i2 2043840: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 2043844: 81 c7 e0 08 ret 2043848: 81 e8 00 00 restore uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 204384c: 40 00 12 70 call 204820c <__errno> <== NOT EXECUTED 2043850: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2043854: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2043858: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 204385c: 81 c7 e0 08 ret <== NOT EXECUTED 2043860: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2043864: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043868: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 204386c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2043870: 7f ff 95 92 call 2028eb8 <== NOT EXECUTED 2043874: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2043878: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 204387c: 12 bf ff 8d bne 20436b0 <== NOT EXECUTED 2043880: 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); 2043884: 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; 2043888: c2 00 60 1c ld [ %g1 + 0x1c ], %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)) = 204388c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2043890: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2043894: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2043898: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 204389c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 20438a0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20438a4: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED 20438a8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 20438ac: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED 20438b0: 81 c7 e0 08 ret <== NOT EXECUTED 20438b4: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 20438b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20438bc: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 20438c0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20438c4: 7f ff 95 7d call 2028eb8 <== NOT EXECUTED 20438c8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 20438cc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20438d0: 12 bf ff 78 bne 20436b0 <== NOT EXECUTED 20438d4: 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); 20438d8: 87 2e a0 14 sll %i2, 0x14, %g3 <== 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; 20438dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 20438e0: 87 30 e0 18 srl %g3, 0x18, %g3 <== 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; 20438e4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 20438e8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 20438ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 20438f0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20438f4: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 20438f8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 20438fc: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED 2043900: 81 c7 e0 08 ret <== NOT EXECUTED 2043904: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029738 : * 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) { 2029738: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 202973c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 int i = 0; if (fs_info->vol.type & FAT_FAT32) 2029740: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2029744: 80 88 60 04 btst 4, %g1 2029748: 12 80 00 3a bne 2029830 <== NEVER TAKEN 202974c: b4 10 20 00 clr %i2 fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 2029750: 7f ff fe 60 call 20290d0 2029754: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 2029758: 7f ff 75 3a call 2006c40 202975c: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 2029760: 80 a2 20 00 cmp %o0, 0 2029764: 32 80 00 3b bne,a 2029850 <== NEVER TAKEN 2029768: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED rc = -1; 202976c: b6 10 20 00 clr %i3 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 2029770: f8 07 60 60 ld [ %i5 + 0x60 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) 2029774: 10 80 00 04 b 2029784 2029778: b8 07 00 1b add %i4, %i3, %i4 free(node); 202977c: 7f ff 7d 9a call 2008de4 <== NOT EXECUTED 2029780: 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 ); 2029784: 7f ff 94 87 call 200e9a0 <_Chain_Get> 2029788: 90 10 00 1c mov %i4, %o0 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 ) 202978c: 80 a2 20 00 cmp %o0, 0 2029790: 12 bf ff fb bne 202977c <== NEVER TAKEN 2029794: 01 00 00 00 nop 2029798: b6 06 e0 0c add %i3, 0xc, %i3 fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 202979c: 80 a6 e0 18 cmp %i3, 0x18 20297a0: 32 bf ff f5 bne,a 2029774 20297a4: f8 07 60 60 ld [ %i5 + 0x60 ], %i4 20297a8: b6 10 20 00 clr %i3 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 20297ac: f8 07 60 64 ld [ %i5 + 0x64 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20297b0: 10 80 00 04 b 20297c0 20297b4: b8 07 00 1b add %i4, %i3, %i4 free(node); 20297b8: 7f ff 7d 8b call 2008de4 <== NOT EXECUTED 20297bc: 01 00 00 00 nop <== NOT EXECUTED 20297c0: 7f ff 94 78 call 200e9a0 <_Chain_Get> 20297c4: 90 10 00 1c mov %i4, %o0 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 ) 20297c8: 80 a2 20 00 cmp %o0, 0 20297cc: 12 bf ff fb bne 20297b8 <== NEVER TAKEN 20297d0: 01 00 00 00 nop 20297d4: b6 06 e0 0c add %i3, 0xc, %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 20297d8: 80 a6 e0 18 cmp %i3, 0x18 20297dc: 32 bf ff f5 bne,a 20297b0 20297e0: f8 07 60 64 ld [ %i5 + 0x64 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 20297e4: 7f ff 7d 80 call 2008de4 20297e8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 free(fs_info->rhash); 20297ec: 7f ff 7d 7e call 2008de4 20297f0: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 free(fs_info->uino); 20297f4: 7f ff 7d 7c call 2008de4 20297f8: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 free(fs_info->sec_buf); 20297fc: 7f ff 7d 7a call 2008de4 2029800: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 close(fs_info->vol.fd); 2029804: 7f ff 7c bc call 2008af4 2029808: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 if (rc) 202980c: 80 a6 a0 00 cmp %i2, 0 2029810: 02 80 00 06 be 2029828 <== ALWAYS TAKEN 2029814: 01 00 00 00 nop errno = EIO; 2029818: 40 00 7a 7d call 204820c <__errno> <== NOT EXECUTED 202981c: 01 00 00 00 nop <== NOT EXECUTED 2029820: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2029824: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2029828: 81 c7 e0 08 ret 202982c: 91 e8 00 1a restore %g0, %i2, %o0 fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2029830: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2029834: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED 2029838: 7f ff ff 90 call 2029678 <== NOT EXECUTED 202983c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2029840: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2029844: 32 bf ff c3 bne,a 2029750 <== NOT EXECUTED 2029848: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED 202984c: 30 bf ff c1 b,a 2029750 <== NOT EXECUTED } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; 2029850: 10 bf ff c8 b 2029770 <== NOT EXECUTED 2029854: b6 10 20 00 clr %i3 <== NOT EXECUTED =============================================================================== 02043db4 : #include #include int fchdir( int fd ) { 2043db4: 9d e3 bf 38 save %sp, -200, %sp st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); 2043db8: 03 00 81 c5 sethi %hi(0x2071400), %g1 2043dbc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 2071430 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 2043dc0: c0 27 bf a4 clr [ %fp + -92 ] st.st_uid = 0; 2043dc4: c0 37 bf aa clrh [ %fp + -86 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 2043dc8: 80 a6 00 01 cmp %i0, %g1 2043dcc: 1a 80 00 3a bcc 2043eb4 2043dd0: c0 37 bf ac clrh [ %fp + -84 ] iop = rtems_libio_iop( fd ); 2043dd4: 03 00 81 d5 sethi %hi(0x2075400), %g1 2043dd8: fa 00 61 b8 ld [ %g1 + 0x1b8 ], %i5 ! 20755b8 2043ddc: 83 2e 20 03 sll %i0, 3, %g1 2043de0: b1 2e 20 06 sll %i0, 6, %i0 2043de4: b0 00 40 18 add %g1, %i0, %i0 2043de8: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 2043dec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2043df0: 80 88 61 00 btst 0x100, %g1 2043df4: 02 80 00 30 be 2043eb4 2043df8: 01 00 00 00 nop static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 2043dfc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043e00: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2043e04: c2 00 40 00 ld [ %g1 ], %g1 2043e08: 9f c0 40 00 call %g1 2043e0c: b8 07 60 1c add %i5, 0x1c, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 2043e10: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 2043e14: 90 10 00 1c mov %i4, %o0 2043e18: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2043e1c: 9f c0 40 00 call %g1 2043e20: 92 07 bf 98 add %fp, -104, %o1 if ( rv == 0 ) { 2043e24: b0 92 20 00 orcc %o0, 0, %i0 2043e28: 02 80 00 08 be 2043e48 <== ALWAYS TAKEN 2043e2c: d2 07 bf a4 ld [ %fp + -92 ], %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 2043e30: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED 2043e34: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2043e38: 9f c0 40 00 call %g1 <== NOT EXECUTED 2043e3c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 2043e40: 81 c7 e0 08 ret <== NOT EXECUTED 2043e44: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); if ( rv == 0 ) { bool access_ok = rtems_filesystem_check_access( 2043e48: d4 17 bf aa lduh [ %fp + -86 ], %o2 2043e4c: d6 17 bf ac lduh [ %fp + -84 ], %o3 2043e50: 7f ff a2 13 call 202c69c 2043e54: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 2043e58: 80 8a 20 ff btst 0xff, %o0 2043e5c: 02 80 00 0c be 2043e8c 2043e60: 92 10 00 1c mov %i4, %o1 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 2043e64: 7f ff 9b bc call 202ad54 2043e68: 90 07 bf e4 add %fp, -28, %o0 2043e6c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043e70: c2 00 60 04 ld [ %g1 + 4 ], %g1 2043e74: 9f c0 40 00 call %g1 2043e78: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 2043e7c: 7f ff 9b 31 call 202ab40 2043e80: 90 07 bf e4 add %fp, -28, %o0 2043e84: 81 c7 e0 08 ret 2043e88: 91 e8 00 08 restore %g0, %o0, %o0 ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 2043e8c: 40 00 10 e0 call 204820c <__errno> 2043e90: b0 10 3f ff mov -1, %i0 2043e94: 82 10 20 0d mov 0xd, %g1 2043e98: c2 22 00 00 st %g1, [ %o0 ] 2043e9c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043ea0: c2 00 60 04 ld [ %g1 + 4 ], %g1 2043ea4: 9f c0 40 00 call %g1 2043ea8: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 2043eac: 81 c7 e0 08 ret 2043eb0: 81 e8 00 00 restore st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 2043eb4: 40 00 10 d6 call 204820c <__errno> 2043eb8: b0 10 3f ff mov -1, %i0 2043ebc: 82 10 20 09 mov 9, %g1 2043ec0: c2 22 00 00 st %g1, [ %o0 ] 2043ec4: 81 c7 e0 08 ret 2043ec8: 81 e8 00 00 restore =============================================================================== 0202ad98 : #include #include int fchmod( int fd, mode_t mode ) { 202ad98: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202ad9c: 03 00 81 c5 sethi %hi(0x2071400), %g1 202ada0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 2071430 202ada4: 80 a6 00 01 cmp %i0, %g1 202ada8: 1a 80 00 26 bcc 202ae40 202adac: 03 00 81 d5 sethi %hi(0x2075400), %g1 iop = rtems_libio_iop( fd ); 202adb0: fa 00 61 b8 ld [ %g1 + 0x1b8 ], %i5 ! 20755b8 202adb4: 83 2e 20 03 sll %i0, 3, %g1 202adb8: b1 2e 20 06 sll %i0, 6, %i0 202adbc: b0 00 40 18 add %g1, %i0, %i0 202adc0: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202adc4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 202adc8: 80 88 61 00 btst 0x100, %g1 202adcc: 02 80 00 1d be 202ae40 202add0: 01 00 00 00 nop if (iop->pathinfo.mt_entry->writeable) { 202add4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202add8: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 202addc: 80 a0 60 00 cmp %g1, 0 202ade0: 02 80 00 12 be 202ae28 <== NEVER TAKEN 202ade4: 01 00 00 00 nop static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 202ade8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202adec: c2 00 40 00 ld [ %g1 ], %g1 202adf0: 9f c0 40 00 call %g1 202adf4: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->fchmod_h)( &iop->pathinfo, mode ); 202adf8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202adfc: 90 07 60 1c add %i5, 0x1c, %o0 202ae00: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 202ae04: 9f c0 40 00 call %g1 202ae08: 92 10 00 19 mov %i1, %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 202ae0c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202ae10: b0 10 00 08 mov %o0, %i0 202ae14: c2 00 60 04 ld [ %g1 + 4 ], %g1 202ae18: 9f c0 40 00 call %g1 202ae1c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202ae20: 81 c7 e0 08 ret 202ae24: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 202ae28: 40 00 74 f9 call 204820c <__errno> <== NOT EXECUTED 202ae2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202ae30: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 202ae34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 202ae38: 81 c7 e0 08 ret <== NOT EXECUTED 202ae3c: 81 e8 00 00 restore <== NOT EXECUTED int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202ae40: 40 00 74 f3 call 204820c <__errno> 202ae44: b0 10 3f ff mov -1, %i0 202ae48: 82 10 20 09 mov 9, %g1 202ae4c: c2 22 00 00 st %g1, [ %o0 ] 202ae50: 81 c7 e0 08 ret 202ae54: 81 e8 00 00 restore =============================================================================== 0202ae58 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 202ae58: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202ae5c: 03 00 81 c5 sethi %hi(0x2071400), %g1 202ae60: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 2071430 202ae64: 80 a6 00 01 cmp %i0, %g1 202ae68: 1a 80 00 27 bcc 202af04 202ae6c: 03 00 81 d5 sethi %hi(0x2075400), %g1 iop = rtems_libio_iop( fd ); 202ae70: fa 00 61 b8 ld [ %g1 + 0x1b8 ], %i5 ! 20755b8 202ae74: 83 2e 20 03 sll %i0, 3, %g1 202ae78: b1 2e 20 06 sll %i0, 6, %i0 202ae7c: b0 00 40 18 add %g1, %i0, %i0 202ae80: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202ae84: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 202ae88: 80 88 61 00 btst 0x100, %g1 202ae8c: 02 80 00 1e be 202af04 202ae90: 01 00 00 00 nop if (iop->pathinfo.mt_entry->writeable) { 202ae94: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202ae98: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 202ae9c: 80 a0 60 00 cmp %g1, 0 202aea0: 02 80 00 13 be 202aeec <== NEVER TAKEN 202aea4: 01 00 00 00 nop static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 202aea8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202aeac: c2 00 40 00 ld [ %g1 ], %g1 202aeb0: 9f c0 40 00 call %g1 202aeb4: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 202aeb8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202aebc: 90 07 60 1c add %i5, 0x1c, %o0 202aec0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 202aec4: 92 10 00 19 mov %i1, %o1 202aec8: 9f c0 40 00 call %g1 202aecc: 94 10 00 1a mov %i2, %o2 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 202aed0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202aed4: b0 10 00 08 mov %o0, %i0 202aed8: c2 00 60 04 ld [ %g1 + 4 ], %g1 202aedc: 9f c0 40 00 call %g1 202aee0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202aee4: 81 c7 e0 08 ret 202aee8: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 202aeec: 40 00 74 c8 call 204820c <__errno> <== NOT EXECUTED 202aef0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202aef4: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 202aef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 202aefc: 81 c7 e0 08 ret <== NOT EXECUTED 202af00: 81 e8 00 00 restore <== NOT EXECUTED int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202af04: 40 00 74 c2 call 204820c <__errno> 202af08: b0 10 3f ff mov -1, %i0 202af0c: 82 10 20 09 mov 9, %g1 202af10: c2 22 00 00 st %g1, [ %o0 ] 202af14: 81 c7 e0 08 ret 202af18: 81 e8 00 00 restore =============================================================================== 02043ef4 : int fcntl( int fd, int cmd, ... ) { 2043ef4: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2043ef8: 03 00 81 c5 sethi %hi(0x2071400), %g1 2043efc: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 ! 2071430 ... ) { int ret; va_list ap; va_start( ap, cmd ); 2043f00: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2043f04: 82 07 a0 4c add %fp, 0x4c, %g1 2043f08: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2043f0c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2043f10: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2043f14: 80 a6 00 02 cmp %i0, %g2 2043f18: 1a 80 00 7c bcc 2044108 2043f1c: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 2043f20: 39 00 81 d5 sethi %hi(0x2075400), %i4 2043f24: fa 07 21 b8 ld [ %i4 + 0x1b8 ], %i5 ! 20755b8 2043f28: 85 2e 20 03 sll %i0, 3, %g2 2043f2c: b1 2e 20 06 sll %i0, 6, %i0 2043f30: b0 00 80 18 add %g2, %i0, %i0 2043f34: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2043f38: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 2043f3c: 80 8a 21 00 btst 0x100, %o0 2043f40: 02 80 00 72 be 2044108 2043f44: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2043f48: 08 80 00 08 bleu 2043f68 2043f4c: 85 2e 60 02 sll %i1, 2, %g2 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2043f50: 40 00 10 af call 204820c <__errno> 2043f54: b0 10 3f ff mov -1, %i0 2043f58: 82 10 20 16 mov 0x16, %g1 2043f5c: c2 22 00 00 st %g1, [ %o0 ] 2043f60: 81 c7 e0 08 ret 2043f64: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2043f68: 07 00 81 0f sethi %hi(0x2043c00), %g3 2043f6c: 86 10 e2 cc or %g3, 0x2cc, %g3 ! 2043ecc 2043f70: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 2043f74: 81 c0 80 00 jmp %g2 2043f78: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2043f7c: 40 00 10 a4 call 204820c <__errno> 2043f80: b0 10 3f ff mov -1, %i0 ! ffffffff 2043f84: 82 10 20 86 mov 0x86, %g1 2043f88: c2 22 00 00 st %g1, [ %o0 ] 2043f8c: 81 c7 e0 08 ret 2043f90: 81 e8 00 00 restore case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2043f94: d0 00 40 00 ld [ %g1 ], %o0 2043f98: 7f ff 14 42 call 20090a0 2043f9c: b0 10 20 00 clr %i0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2043fa0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2043fa4: 90 0a 22 01 and %o0, 0x201, %o0 2043fa8: 82 08 7d fe and %g1, -514, %g1 2043fac: 82 12 00 01 or %o0, %g1, %g1 2043fb0: c2 27 60 18 st %g1, [ %i5 + 0x18 ] * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 2043fb4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 2043fb8: 90 10 00 1d mov %i5, %o0 2043fbc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2043fc0: 9f c0 40 00 call %g1 2043fc4: 92 10 00 19 mov %i1, %o1 if (err) { 2043fc8: ba 92 20 00 orcc %o0, 0, %i5 2043fcc: 12 80 00 04 bne 2043fdc <== NEVER TAKEN 2043fd0: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2043fd4: 81 c7 e0 08 ret 2043fd8: 81 e8 00 00 restore */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 2043fdc: 40 00 10 8c call 204820c <__errno> <== NOT EXECUTED 2043fe0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2043fe4: 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; } 2043fe8: 81 c7 e0 08 ret <== NOT EXECUTED 2043fec: 81 e8 00 00 restore <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 2043ff0: 7f ff 14 39 call 20090d4 2043ff4: 01 00 00 00 nop 2043ff8: b0 10 00 08 mov %o0, %i0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2043ffc: 80 a6 20 00 cmp %i0, 0 2044000: 36 bf ff ee bge,a 2043fb8 <== ALWAYS TAKEN 2044004: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2044008: 81 c7 e0 08 ret <== NOT EXECUTED 204400c: 81 e8 00 00 restore <== NOT EXECUTED * 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 ) ) 2044010: c2 00 40 00 ld [ %g1 ], %g1 2044014: 80 a0 60 00 cmp %g1, 0 2044018: 22 80 00 39 be,a 20440fc 204401c: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2044020: 90 12 28 00 or %o0, 0x800, %o0 { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 2044024: b0 10 20 00 clr %i0 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2044028: 10 bf ff e3 b 2043fb4 204402c: d0 27 60 18 st %o0, [ %i5 + 0x18 ] fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2044030: 90 0a 28 00 and %o0, 0x800, %o0 2044034: 80 a0 00 08 cmp %g0, %o0 2044038: 10 bf ff df b 2043fb4 204403c: b0 40 20 00 addx %g0, 0, %i0 /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 2044040: 7f ff 14 3c call 2009130 2044044: b0 10 3f ff mov -1, %i0 if (diop != NULL) { 2044048: 80 a2 20 00 cmp %o0, 0 204404c: 02 bf ff d0 be 2043f8c 2044050: b6 10 00 08 mov %o0, %i3 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 2044054: 7f ff 14 20 call 20090d4 2044058: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 204405c: f4 06 e0 18 ld [ %i3 + 0x18 ], %i2 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 2044060: b0 0a 3d ff and %o0, -513, %i0 diop->flags |= rtems_libio_fcntl_flags( oflag ); 2044064: 7f ff 14 0f call 20090a0 2044068: 90 10 00 18 mov %i0, %o0 static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 204406c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2044070: b4 12 00 1a or %o0, %i2, %i2 2044074: c2 00 40 00 ld [ %g1 ], %g1 2044078: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 204407c: 9f c0 40 00 call %g1 2044080: f4 26 e0 18 st %i2, [ %i3 + 0x18 ] rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 2044084: 92 07 60 1c add %i5, 0x1c, %o1 2044088: 7f ff 9b 33 call 202ad54 204408c: 90 06 e0 1c add %i3, 0x1c, %o0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 2044090: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2044094: c2 00 60 04 ld [ %g1 + 4 ], %g1 2044098: 9f c0 40 00 call %g1 204409c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 20440a0: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1 20440a4: 94 10 00 18 mov %i0, %o2 20440a8: c2 00 40 00 ld [ %g1 ], %g1 20440ac: 90 10 00 1b mov %i3, %o0 20440b0: 92 10 20 00 clr %o1 20440b4: 9f c0 40 00 call %g1 20440b8: 96 10 20 00 clr %o3 if ( rv == 0 ) { 20440bc: b0 92 20 00 orcc %o0, 0, %i0 20440c0: 12 80 00 18 bne 2044120 <== NEVER TAKEN 20440c4: c2 07 21 b8 ld [ %i4 + 0x1b8 ], %g1 rv = diop - rtems_libio_iops; 20440c8: b6 26 c0 01 sub %i3, %g1, %i3 20440cc: b7 3e e0 03 sra %i3, 3, %i3 20440d0: 85 2e e0 06 sll %i3, 6, %g2 20440d4: 83 2e e0 03 sll %i3, 3, %g1 20440d8: 82 20 80 01 sub %g2, %g1, %g1 20440dc: 85 28 60 06 sll %g1, 6, %g2 20440e0: 82 00 40 02 add %g1, %g2, %g1 20440e4: 82 00 40 1b add %g1, %i3, %g1 20440e8: b1 28 60 0f sll %g1, 0xf, %i0 20440ec: b0 26 00 01 sub %i0, %g1, %i0 20440f0: b1 2e 20 03 sll %i0, 3, %i0 20440f4: 10 bf ff c2 b 2043ffc 20440f8: b0 06 00 1b add %i0, %i3, %i0 { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 20440fc: b0 10 20 00 clr %i0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2044100: 10 bf ff ad b 2043fb4 2044104: d0 27 60 18 st %o0, [ %i5 + 0x18 ] int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2044108: 40 00 10 41 call 204820c <__errno> 204410c: b0 10 3f ff mov -1, %i0 2044110: 82 10 20 09 mov 9, %g1 2044114: c2 22 00 00 st %g1, [ %o0 ] 2044118: 81 c7 e0 08 ret 204411c: 81 e8 00 00 restore */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); if ( rv == 0 ) { rv = diop - rtems_libio_iops; } else { rtems_libio_free( diop ); 2044120: 7f ff 14 36 call 20091f8 <== NOT EXECUTED 2044124: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2044128: 10 bf ff b6 b 2044000 <== NOT EXECUTED 204412c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED =============================================================================== 0200e8ac : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200e8ac: 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) { 200e8b0: 3b 00 80 91 sethi %hi(0x2024400), %i5 200e8b4: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 ! 2024718 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200e8b8: b8 10 00 18 mov %i0, %i4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200e8bc: 80 a2 20 00 cmp %o0, 0 200e8c0: 02 80 00 54 be 200ea10 200e8c4: b4 17 63 18 or %i5, 0x318, %i2 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200e8c8: 92 10 20 00 clr %o1 200e8cc: 94 10 20 00 clr %o2 200e8d0: 7f ff eb 97 call 200972c 200e8d4: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200e8d8: 80 a2 20 00 cmp %o0, 0 200e8dc: 12 80 01 18 bne 200ed3c <== NEVER TAKEN 200e8e0: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200e8e4: f6 07 00 00 ld [ %i4 ], %i3 if (pipe == NULL) { 200e8e8: 80 a6 e0 00 cmp %i3, 0 200e8ec: 02 80 00 91 be 200eb30 200e8f0: 01 00 00 00 nop err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e8f4: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 200e8f8: 92 10 20 00 clr %o1 200e8fc: 7f ff eb 8c call 200972c 200e900: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200e904: c2 07 00 00 ld [ %i4 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e908: 80 a0 00 08 cmp %g0, %o0 200e90c: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200e910: 80 a0 60 00 cmp %g1, 0 200e914: 02 80 00 d9 be 200ec78 200e918: b0 0e 3f fc and %i0, -4, %i0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200e91c: 7f ff eb ce call 2009854 200e920: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200e924: 80 a6 20 00 cmp %i0, 0 200e928: 12 80 01 05 bne 200ed3c <== NEVER TAKEN 200e92c: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200e930: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e934: 82 08 60 06 and %g1, 6, %g1 200e938: 80 a0 60 04 cmp %g1, 4 200e93c: 02 80 00 42 be 200ea44 200e940: fa 07 00 00 ld [ %i4 ], %i5 200e944: 80 a0 60 06 cmp %g1, 6 200e948: 02 80 00 65 be 200eadc 200e94c: 80 a0 60 02 cmp %g1, 2 200e950: 22 80 00 07 be,a 200e96c <== ALWAYS TAKEN 200e954: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 200e958: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED 200e95c: 7f ff eb be call 2009854 200e960: b0 10 20 00 clr %i0 return 0; 200e964: 81 c7 e0 08 ret 200e968: 81 e8 00 00 restore return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200e96c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200e970: 86 00 60 01 add %g1, 1, %g3 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200e974: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200e978: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200e97c: 80 a0 60 00 cmp %g1, 0 200e980: 02 80 00 d4 be 200ecd0 <== ALWAYS TAKEN 200e984: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 200e988: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED 200e98c: 80 a0 60 00 cmp %g1, 0 200e990: 32 bf ff f3 bne,a 200e95c 200e994: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 /* Not an error */ if (LIBIO_NODELAY(iop)) 200e998: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e99c: 80 88 60 01 btst 1, %g1 200e9a0: 32 bf ff ef bne,a 200e95c 200e9a4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 break; prevCounter = pipe->writerCounter; 200e9a8: 10 80 00 0c b 200e9d8 200e9ac: f6 07 60 24 ld [ %i5 + 0x24 ], %i3 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200e9b0: 92 10 20 00 clr %o1 200e9b4: 7f ff eb 5e call 200972c 200e9b8: 94 10 20 00 clr %o2 200e9bc: 80 a2 20 00 cmp %o0, 0 200e9c0: 12 80 00 0f bne 200e9fc <== NEVER TAKEN 200e9c4: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->writerCounter); 200e9c8: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200e9cc: 80 a0 40 1b cmp %g1, %i3 200e9d0: 32 bf ff e3 bne,a 200e95c <== ALWAYS TAKEN 200e9d4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200e9d8: 7f ff eb 9f call 2009854 200e9dc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200e9e0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e9e4: 40 00 06 b8 call 20104c4 200e9e8: 92 10 20 00 clr %o1 200e9ec: 80 a2 20 00 cmp %o0, 0 200e9f0: 22 bf ff f0 be,a 200e9b0 <== ALWAYS TAKEN 200e9f4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200e9f8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200e9fc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200ea00: 7f ff ff 68 call 200e7a0 200ea04: 92 10 00 19 mov %i1, %o1 return err; } 200ea08: 81 c7 e0 08 ret 200ea0c: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200ea10: 37 00 80 92 sethi %hi(0x2024800), %i3 200ea14: d0 06 e1 84 ld [ %i3 + 0x184 ], %o0 ! 2024984 200ea18: 92 10 20 00 clr %o1 200ea1c: 7f ff eb 44 call 200972c 200ea20: 94 10 20 00 clr %o2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200ea24: c2 07 63 18 ld [ %i5 + 0x318 ], %g1 200ea28: 80 a0 60 00 cmp %g1, 0 200ea2c: 02 80 00 9a be 200ec94 <== ALWAYS TAKEN 200ea30: 98 10 00 1a mov %i2, %o4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200ea34: 7f ff eb 88 call 2009854 <== NOT EXECUTED 200ea38: d0 06 e1 84 ld [ %i3 + 0x184 ], %o0 <== NOT EXECUTED 200ea3c: 10 bf ff a3 b 200e8c8 <== NOT EXECUTED 200ea40: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200ea44: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200ea48: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200ea4c: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200ea50: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200ea54: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200ea58: 80 a0 60 00 cmp %g1, 0 200ea5c: 02 80 00 a7 be 200ecf8 <== ALWAYS TAKEN 200ea60: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200ea64: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED 200ea68: 80 a0 60 00 cmp %g1, 0 200ea6c: 32 bf ff bc bne,a 200e95c 200ea70: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200ea74: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ea78: 80 88 60 01 btst 1, %g1 200ea7c: 32 80 00 b2 bne,a 200ed44 200ea80: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 200ea84: 10 80 00 0c b 200eab4 200ea88: f6 07 60 20 ld [ %i5 + 0x20 ], %i3 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200ea8c: 92 10 20 00 clr %o1 200ea90: 7f ff eb 27 call 200972c 200ea94: 94 10 20 00 clr %o2 200ea98: 80 a2 20 00 cmp %o0, 0 200ea9c: 12 bf ff d8 bne 200e9fc <== NEVER TAKEN 200eaa0: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->readerCounter); 200eaa4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200eaa8: 80 a0 40 1b cmp %g1, %i3 200eaac: 32 bf ff ac bne,a 200e95c <== ALWAYS TAKEN 200eab0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200eab4: 7f ff eb 68 call 2009854 200eab8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200eabc: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200eac0: 40 00 06 81 call 20104c4 200eac4: 92 10 20 00 clr %o1 200eac8: 80 a2 20 00 cmp %o0, 0 200eacc: 22 bf ff f0 be,a 200ea8c <== ALWAYS TAKEN 200ead0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200ead4: 10 bf ff ca b 200e9fc <== NOT EXECUTED 200ead8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200eadc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200eae0: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200eae4: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200eae8: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200eaec: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200eaf0: 80 a0 60 00 cmp %g1, 0 200eaf4: 02 80 00 7c be 200ece4 <== ALWAYS TAKEN 200eaf8: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200eafc: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200eb00: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200eb04: 86 00 60 01 add %g1, 1, %g3 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200eb08: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200eb0c: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200eb10: 80 a0 60 00 cmp %g1, 0 200eb14: 12 bf ff 91 bne 200e958 <== NEVER TAKEN 200eb18: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); 200eb1c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200eb20: 40 00 06 52 call 2010468 200eb24: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200eb28: 10 bf ff 8d b 200e95c 200eb2c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200eb30: 7f ff d9 5a call 2005098 200eb34: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200eb38: b6 92 20 00 orcc %o0, 0, %i3 200eb3c: 02 80 00 8e be 200ed74 200eb40: 82 10 22 00 mov 0x200, %g1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200eb44: c0 26 c0 00 clr [ %i3 ] 200eb48: c0 26 e0 08 clr [ %i3 + 8 ] 200eb4c: c0 26 e0 0c clr [ %i3 + 0xc ] 200eb50: c0 26 e0 10 clr [ %i3 + 0x10 ] 200eb54: c0 26 e0 14 clr [ %i3 + 0x14 ] 200eb58: c0 26 e0 18 clr [ %i3 + 0x18 ] 200eb5c: c0 26 e0 1c clr [ %i3 + 0x1c ] 200eb60: c0 26 e0 20 clr [ %i3 + 0x20 ] 200eb64: c0 26 e0 24 clr [ %i3 + 0x24 ] 200eb68: c0 26 e0 28 clr [ %i3 + 0x28 ] 200eb6c: c0 26 e0 2c clr [ %i3 + 0x2c ] 200eb70: c0 26 e0 30 clr [ %i3 + 0x30 ] pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 200eb74: 90 10 22 00 mov 0x200, %o0 200eb78: 7f ff d9 48 call 2005098 200eb7c: c2 26 e0 04 st %g1, [ %i3 + 4 ] if (! pipe->Buffer) 200eb80: 80 a2 20 00 cmp %o0, 0 200eb84: 02 80 00 7a be 200ed6c <== NEVER TAKEN 200eb88: d0 26 c0 00 st %o0, [ %i3 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200eb8c: 35 00 80 8f sethi %hi(0x2023c00), %i2 200eb90: d0 4e a3 c4 ldsb [ %i2 + 0x3c4 ], %o0 ! 2023fc4 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200eb94: 31 14 12 5c sethi %hi(0x50497000), %i0 200eb98: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 200eb9c: 92 10 20 00 clr %o1 200eba0: 94 10 20 00 clr %o2 200eba4: 90 12 00 01 or %o0, %g1, %o0 200eba8: 40 00 05 d6 call 2010300 200ebac: 96 06 e0 2c add %i3, 0x2c, %o3 200ebb0: 80 a2 20 00 cmp %o0, 0 200ebb4: 12 80 00 6c bne 200ed64 200ebb8: d0 4e a3 c4 ldsb [ %i2 + 0x3c4 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200ebbc: 03 14 12 5d sethi %hi(0x50497400), %g1 200ebc0: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200ebc4: 92 10 20 00 clr %o1 200ebc8: 94 10 20 00 clr %o2 200ebcc: 90 12 00 01 or %o0, %g1, %o0 200ebd0: 40 00 05 cc call 2010300 200ebd4: 96 06 e0 30 add %i3, 0x30, %o3 200ebd8: 80 a2 20 00 cmp %o0, 0 200ebdc: 12 80 00 60 bne 200ed5c 200ebe0: d0 4e a3 c4 ldsb [ %i2 + 0x3c4 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200ebe4: b0 16 23 00 or %i0, 0x300, %i0 200ebe8: 92 10 20 01 mov 1, %o1 200ebec: 90 12 00 18 or %o0, %i0, %o0 200ebf0: 94 10 20 10 mov 0x10, %o2 200ebf4: 96 10 20 00 clr %o3 200ebf8: 7f ff ea 26 call 2009490 200ebfc: 98 06 e0 28 add %i3, 0x28, %o4 200ec00: 80 a2 20 00 cmp %o0, 0 200ec04: 12 80 00 54 bne 200ed54 200ec08: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200ec0c: d2 06 e0 2c ld [ %i3 + 0x2c ], %o1 200ec10: 21 00 80 95 sethi %hi(0x2025400), %l0 200ec14: 7f ff f1 9b call 200b280 <_Objects_Get> 200ec18: 90 14 20 40 or %l0, 0x40, %o0 ! 2025440 <_Barrier_Information> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200ec1c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200ec20: 31 04 00 00 sethi %hi(0x10000000), %i0 200ec24: 82 10 40 18 or %g1, %i0, %g1 _Thread_Enable_dispatch(); 200ec28: 7f ff f5 79 call 200c20c <_Thread_Enable_dispatch> 200ec2c: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200ec30: d2 06 e0 30 ld [ %i3 + 0x30 ], %o1 200ec34: 94 07 bf fc add %fp, -4, %o2 200ec38: 7f ff f1 92 call 200b280 <_Objects_Get> 200ec3c: 90 14 20 40 or %l0, 0x40, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200ec40: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200ec44: b0 10 40 18 or %g1, %i0, %i0 _Thread_Enable_dispatch(); 200ec48: 7f ff f5 71 call 200c20c <_Thread_Enable_dispatch> 200ec4c: f0 22 20 4c st %i0, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200ec50: c2 0e a3 c4 ldub [ %i2 + 0x3c4 ], %g1 200ec54: 84 00 60 01 add %g1, 1, %g2 200ec58: 83 28 60 18 sll %g1, 0x18, %g1 200ec5c: 83 38 60 18 sra %g1, 0x18, %g1 200ec60: 80 a0 60 7a cmp %g1, 0x7a 200ec64: 12 bf ff 24 bne 200e8f4 200ec68: c4 2e a3 c4 stb %g2, [ %i2 + 0x3c4 ] c = 'a'; 200ec6c: 82 10 20 61 mov 0x61, %g1 200ec70: 10 bf ff 21 b 200e8f4 200ec74: c2 2e a3 c4 stb %g1, [ %i2 + 0x3c4 ] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 200ec78: 80 a6 20 00 cmp %i0, 0 200ec7c: 12 80 00 24 bne 200ed0c <== NEVER TAKEN 200ec80: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200ec84: 7f ff ea f4 call 2009854 200ec88: f6 27 00 00 st %i3, [ %i4 ] err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200ec8c: 10 bf ff 2a b 200e934 200ec90: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 200ec94: 92 10 20 01 mov 1, %o1 200ec98: 94 10 20 54 mov 0x54, %o2 200ec9c: 96 10 20 00 clr %o3 200eca0: 11 14 12 54 sethi %hi(0x50495000), %o0 200eca4: 7f ff e9 fb call 2009490 200eca8: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 200ecac: b4 10 00 08 mov %o0, %i2 200ecb0: d0 06 e1 84 ld [ %i3 + 0x184 ], %o0 200ecb4: 7f ff ea e8 call 2009854 200ecb8: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ecbc: 80 a6 a0 00 cmp %i2, 0 200ecc0: 12 bf ff 29 bne 200e964 200ecc4: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200ecc8: 10 bf ff 01 b 200e8cc 200eccc: 92 10 20 00 clr %o1 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200ecd0: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200ecd4: 40 00 05 e5 call 2010468 200ecd8: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200ecdc: 10 bf ff 2c b 200e98c 200ece0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200ece4: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200ece8: 40 00 05 e0 call 2010468 200ecec: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200ecf0: 10 bf ff 84 b 200eb00 200ecf4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 200ecf8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200ecfc: 40 00 05 db call 2010468 200ed00: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200ed04: 10 bf ff 59 b 200ea68 200ed08: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 200ed0c: 40 00 05 ae call 20103c4 <== NOT EXECUTED 200ed10: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 200ed14: 40 00 05 ac call 20103c4 <== NOT EXECUTED 200ed18: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 200ed1c: 7f ff ea 4d call 2009650 <== NOT EXECUTED 200ed20: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 200ed24: 7f ff d7 ab call 2004bd0 <== NOT EXECUTED 200ed28: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED free(pipe); 200ed2c: 7f ff d7 a9 call 2004bd0 <== NOT EXECUTED 200ed30: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200ed34: 7f ff ea c8 call 2009854 200ed38: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 200ed3c: 81 c7 e0 08 ret 200ed40: 81 e8 00 00 restore if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 200ed44: 7f ff ea c4 call 2009854 200ed48: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200ed4c: 10 bf ff 2d b 200ea00 200ed50: 90 10 00 1c mov %i4, %o0 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200ed54: 40 00 05 9c call 20103c4 200ed58: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200ed5c: 40 00 05 9a call 20103c4 200ed60: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200ed64: 7f ff d7 9b call 2004bd0 200ed68: d0 06 c0 00 ld [ %i3 ], %o0 err_buf: free(pipe); 200ed6c: 7f ff d7 99 call 2004bd0 200ed70: 90 10 00 1b mov %i3, %o0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ed74: 10 bf ff f0 b 200ed34 200ed78: b0 10 3f f4 mov -12, %i0 =============================================================================== 02009e64 : long fpathconf( int fd, int name ) { 2009e64: 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); 2009e68: 03 00 80 4c sethi %hi(0x2013000), %g1 2009e6c: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 ! 2013240 2009e70: 80 a6 00 01 cmp %i0, %g1 2009e74: 1a 80 00 3d bcc 2009f68 <== ALWAYS TAKEN 2009e78: 03 00 80 4e sethi %hi(0x2013800), %g1 iop = rtems_libio_iop(fd); 2009e7c: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 2013b4c <== NOT EXECUTED 2009e80: 85 2e 20 03 sll %i0, 3, %g2 <== NOT EXECUTED 2009e84: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED 2009e88: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED 2009e8c: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2009e90: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 2009e94: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2009e98: 02 80 00 34 be 2009f68 <== NOT EXECUTED 2009e9c: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009ea0: 08 80 00 08 bleu 2009ec0 <== NOT EXECUTED 2009ea4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2009ea8: 40 00 0a 0c call 200c6d8 <__errno> <== NOT EXECUTED 2009eac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009eb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2009eb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return return_value; } 2009eb8: 81 c7 e0 08 ret <== NOT EXECUTED 2009ebc: 81 e8 00 00 restore <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009ec0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 2009ec4: 05 00 80 27 sethi %hi(0x2009c00), %g2 <== NOT EXECUTED 2009ec8: 84 10 a2 34 or %g2, 0x234, %g2 ! 2009e34 <_close_r+0x10> <== NOT EXECUTED 2009ecc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED 2009ed0: 81 c0 80 00 jmp %g2 <== NOT EXECUTED 2009ed4: 01 00 00 00 nop <== NOT EXECUTED break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2009ed8: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 <== NOT EXECUTED break; 2009edc: 81 c7 e0 08 ret <== NOT EXECUTED 2009ee0: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2009ee4: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 <== NOT EXECUTED break; 2009ee8: 81 c7 e0 08 ret <== NOT EXECUTED 2009eec: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009ef0: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 <== NOT EXECUTED break; 2009ef4: 81 c7 e0 08 ret <== NOT EXECUTED 2009ef8: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2009efc: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 <== NOT EXECUTED break; 2009f00: 81 c7 e0 08 ret <== NOT EXECUTED 2009f04: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2009f08: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 <== NOT EXECUTED break; 2009f0c: 81 c7 e0 08 ret <== NOT EXECUTED 2009f10: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2009f14: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 <== NOT EXECUTED break; 2009f18: 81 c7 e0 08 ret <== NOT EXECUTED 2009f1c: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 2009f20: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 <== NOT EXECUTED break; 2009f24: 81 c7 e0 08 ret <== NOT EXECUTED 2009f28: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 2009f2c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 <== NOT EXECUTED break; 2009f30: 81 c7 e0 08 ret <== NOT EXECUTED 2009f34: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 2009f38: f0 00 60 30 ld [ %g1 + 0x30 ], %i0 <== NOT EXECUTED break; 2009f3c: 81 c7 e0 08 ret <== NOT EXECUTED 2009f40: 81 e8 00 00 restore <== NOT EXECUTED switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 2009f44: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED break; 2009f48: 81 c7 e0 08 ret <== NOT EXECUTED 2009f4c: 81 e8 00 00 restore <== NOT EXECUTED the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 2009f50: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED break; 2009f54: 81 c7 e0 08 ret <== NOT EXECUTED 2009f58: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2009f5c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 <== NOT EXECUTED break; 2009f60: 81 c7 e0 08 ret <== NOT EXECUTED 2009f64: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 2009f68: 40 00 09 dc call 200c6d8 <__errno> 2009f6c: b0 10 3f ff mov -1, %i0 2009f70: 82 10 20 09 mov 9, %g1 2009f74: c2 22 00 00 st %g1, [ %o0 ] 2009f78: 81 c7 e0 08 ret 2009f7c: 81 e8 00 00 restore =============================================================================== 0200383c : #include void free( void *ptr ) { 200383c: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 2003840: 03 00 80 7a sethi %hi(0x201e800), %g1 2003844: 82 10 60 d0 or %g1, 0xd0, %g1 ! 201e8d0 2003848: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 200384c: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 2003850: 84 00 a0 01 inc %g2 if ( !ptr ) 2003854: 80 a6 20 00 cmp %i0, 0 2003858: 02 80 00 15 be 20038ac 200385c: 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()) && 2003860: 03 00 80 7a sethi %hi(0x201e800), %g1 2003864: c2 00 63 88 ld [ %g1 + 0x388 ], %g1 ! 201eb88 <_System_state_Current> 2003868: 80 a0 60 03 cmp %g1, 3 200386c: 02 80 00 17 be 20038c8 <== ALWAYS TAKEN 2003870: 03 00 80 79 sethi %hi(0x201e400), %g1 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003874: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201e514 2003878: 80 a0 60 00 cmp %g1, 0 200387c: 02 80 00 06 be 2003894 2003880: 3b 00 80 77 sethi %hi(0x201dc00), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003884: c2 00 60 08 ld [ %g1 + 8 ], %g1 2003888: 9f c0 40 00 call %g1 200388c: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2003890: 3b 00 80 77 sethi %hi(0x201dc00), %i5 2003894: d0 07 61 38 ld [ %i5 + 0x138 ], %o0 ! 201dd38 2003898: 40 00 18 b4 call 2009b68 <_Protected_heap_Free> 200389c: 92 10 00 19 mov %i1, %o1 20038a0: 80 8a 20 ff btst 0xff, %o0 20038a4: 22 80 00 04 be,a 20038b4 20038a8: c2 07 61 38 ld [ %i5 + 0x138 ], %g1 20038ac: 81 c7 e0 08 ret 20038b0: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 20038b4: 31 00 80 71 sethi %hi(0x201c400), %i0 20038b8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 20038bc: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 20038c0: 40 00 03 98 call 2004720 20038c4: 91 ee 22 30 restore %i0, 0x230, %o0 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { 20038c8: 40 00 00 6b call 2003a74 20038cc: 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()) && 20038d0: 80 8a 20 ff btst 0xff, %o0 20038d4: 12 bf ff e8 bne 2003874 20038d8: 03 00 80 79 sethi %hi(0x201e400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 20038dc: 40 00 00 85 call 2003af0 20038e0: 81 e8 00 00 restore =============================================================================== 0201ad58 : int fstat( int fd, struct stat *sbuf ) { 201ad58: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 201ad5c: 80 a6 60 00 cmp %i1, 0 201ad60: 02 80 00 1f be 201addc <== NEVER TAKEN 201ad64: 03 00 80 77 sethi %hi(0x201dc00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 201ad68: c2 00 61 7c ld [ %g1 + 0x17c ], %g1 ! 201dd7c 201ad6c: 80 a6 00 01 cmp %i0, %g1 201ad70: 1a 80 00 15 bcc 201adc4 201ad74: 03 00 80 7a sethi %hi(0x201e800), %g1 201ad78: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 201e8b8 201ad7c: 85 2e 20 03 sll %i0, 3, %g2 201ad80: b1 2e 20 06 sll %i0, 6, %i0 201ad84: b0 00 80 18 add %g2, %i0, %i0 201ad88: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201ad8c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 201ad90: 80 88 61 00 btst 0x100, %g1 201ad94: 02 80 00 0c be 201adc4 201ad98: 94 10 20 48 mov 0x48, %o2 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 201ad9c: 92 10 20 00 clr %o1 201ada0: 7f ff d8 ba call 2011088 201ada4: 90 10 00 19 mov %i1, %o0 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 201ada8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 201adac: 90 06 20 1c add %i0, 0x1c, %o0 201adb0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201adb4: 9f c0 40 00 call %g1 201adb8: 92 10 00 19 mov %i1, %o1 } 201adbc: 81 c7 e0 08 ret 201adc0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201adc4: 7f ff d6 19 call 2010628 <__errno> 201adc8: b0 10 3f ff mov -1, %i0 201adcc: 82 10 20 09 mov 9, %g1 201add0: c2 22 00 00 st %g1, [ %o0 ] 201add4: 81 c7 e0 08 ret 201add8: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 201addc: 7f ff d6 13 call 2010628 <__errno> <== NOT EXECUTED 201ade0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201ade4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 201ade8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201adec: 81 c7 e0 08 ret <== NOT EXECUTED 201adf0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020035bc : 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) { 20035bc: 03 00 80 89 sethi %hi(0x2022400), %g1 20035c0: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 2022458 20035c4: 80 a0 40 08 cmp %g1, %o0 20035c8: 08 80 00 1e bleu 2003640 <== NEVER TAKEN 20035cc: 84 10 20 00 clr %g2 20035d0: 03 00 80 89 sethi %hi(0x2022400), %g1 20035d4: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 ! 202245c 20035d8: 80 a0 60 00 cmp %g1, 0 20035dc: 02 80 00 19 be 2003640 <== NEVER TAKEN 20035e0: 01 00 00 00 nop rtems_disk_device_table *dtab = disktab + major; 20035e4: 91 2a 20 03 sll %o0, 3, %o0 20035e8: 86 00 40 08 add %g1, %o0, %g3 if (minor < dtab->size && dtab->minor != NULL) { 20035ec: c6 00 e0 04 ld [ %g3 + 4 ], %g3 20035f0: 80 a0 c0 09 cmp %g3, %o1 20035f4: 08 80 00 13 bleu 2003640 <== NEVER TAKEN 20035f8: 01 00 00 00 nop 20035fc: c2 00 40 08 ld [ %g1 + %o0 ], %g1 2003600: 80 a0 60 00 cmp %g1, 0 2003604: 02 80 00 0f be 2003640 <== NEVER TAKEN 2003608: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; 200360c: c4 00 40 09 ld [ %g1 + %o1 ], %g2 if (dd != NULL && !lookup_only) { 2003610: 80 a0 a0 00 cmp %g2, 0 2003614: 02 80 00 0b be 2003640 2003618: 80 a2 a0 00 cmp %o2, 0 200361c: 12 80 00 09 bne 2003640 2003620: 01 00 00 00 nop if (!dd->deleted) { 2003624: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1 2003628: 80 a0 60 00 cmp %g1, 0 200362c: 32 80 00 07 bne,a 2003648 2003630: 84 10 20 00 clr %g2 ++dd->uses; 2003634: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2003638: 82 00 60 01 inc %g1 200363c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return dd; } } return NULL; } 2003640: 81 c3 e0 08 retl 2003644: 90 10 00 02 mov %g2, %o0 2003648: 81 c3 e0 08 retl 200364c: 90 10 00 02 mov %g2, %o0 =============================================================================== 02004d30 : */ static rtems_status_code get_sector(int fd, uint32_t sector_num, rtems_sector_data_t **sector) { 2004d30: 9d e3 bf a0 save %sp, -96, %sp 2004d34: ba 10 00 18 mov %i0, %i5 rtems_sector_data_t *s; ssize_t n; off_t off; off_t new_off; if (sector == NULL) 2004d38: 80 a6 a0 00 cmp %i2, 0 2004d3c: 02 80 00 1e be 2004db4 <== NEVER TAKEN 2004d40: b0 10 20 19 mov 0x19, %i0 { return RTEMS_INTERNAL_ERROR; } off = sector_num * RTEMS_IDE_SECTOR_SIZE; 2004d44: b9 2e 60 09 sll %i1, 9, %i4 new_off = lseek(fd, off, SEEK_SET); 2004d48: 90 10 00 1d mov %i5, %o0 2004d4c: 92 10 20 00 clr %o1 2004d50: 94 10 00 1c mov %i4, %o2 2004d54: 40 00 05 90 call 2006394 2004d58: 96 10 20 00 clr %o3 if (new_off != off) { 2004d5c: 80 a2 20 00 cmp %o0, 0 2004d60: 02 80 00 04 be 2004d70 <== ALWAYS TAKEN 2004d64: 80 a2 40 1c cmp %o1, %i4 s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 2004d68: 81 c7 e0 08 ret <== NOT EXECUTED 2004d6c: 91 e8 20 1b restore %g0, 0x1b, %o0 <== NOT EXECUTED return RTEMS_INTERNAL_ERROR; } off = sector_num * RTEMS_IDE_SECTOR_SIZE; new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { 2004d70: 12 80 00 11 bne 2004db4 <== NEVER TAKEN 2004d74: b0 10 20 1b mov 0x1b, %i0 return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 2004d78: 90 10 22 04 mov 0x204, %o0 2004d7c: 40 00 06 67 call 2006718 2004d80: b0 10 20 1a mov 0x1a, %i0 if (s == NULL) 2004d84: 80 a2 20 00 cmp %o0, 0 2004d88: 02 80 00 0b be 2004db4 <== NEVER TAKEN 2004d8c: b8 10 00 08 mov %o0, %i4 { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 2004d90: 90 10 00 1d mov %i5, %o0 2004d94: 92 07 20 04 add %i4, 4, %o1 2004d98: 40 00 09 33 call 2007264 2004d9c: 94 10 22 00 mov 0x200, %o2 if (n != RTEMS_IDE_SECTOR_SIZE) 2004da0: 80 a2 22 00 cmp %o0, 0x200 2004da4: 02 80 00 06 be 2004dbc <== ALWAYS TAKEN 2004da8: 90 10 00 1c mov %i4, %o0 { free(s); 2004dac: 40 00 04 31 call 2005e70 <== NOT EXECUTED 2004db0: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED 2004db4: 81 c7 e0 08 ret <== NOT EXECUTED 2004db8: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_IO_ERROR; } s->sector_num = sector_num; 2004dbc: f2 27 00 00 st %i1, [ %i4 ] *sector = s; 2004dc0: f8 26 80 00 st %i4, [ %i2 ] return RTEMS_SUCCESSFUL; 2004dc4: 81 c7 e0 08 ret 2004dc8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02063258 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2063258: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 206325c: 03 00 81 c5 sethi %hi(0x2071400), %g1 2063260: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 2071430 2063264: 80 a6 00 01 cmp %i0, %g1 2063268: 1a 80 00 08 bcc 2063288 <== NEVER TAKEN 206326c: ba 10 20 00 clr %i5 2063270: 03 00 81 d5 sethi %hi(0x2075400), %g1 2063274: fa 00 61 b8 ld [ %g1 + 0x1b8 ], %i5 ! 20755b8 2063278: 83 2e 20 03 sll %i0, 3, %g1 206327c: b1 2e 20 06 sll %i0, 6, %i0 2063280: b0 00 40 18 add %g1, %i0, %i0 2063284: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 2063288: 7f ff 26 1b call 202caf4 206328c: 90 07 60 1c add %i5, 0x1c, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 2063290: 80 a2 20 00 cmp %o0, 0 2063294: 12 80 00 09 bne 20632b8 2063298: 90 10 00 1d mov %i5, %o0 /* * 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 ); 206329c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 20632a0: c2 00 60 08 ld [ %g1 + 8 ], %g1 20632a4: 92 10 00 19 mov %i1, %o1 20632a8: 9f c0 40 00 call %g1 20632ac: 94 10 00 1a mov %i2, %o2 } 20632b0: 81 c7 e0 08 ret 20632b4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 20632b8: 7f ff 93 d5 call 204820c <__errno> 20632bc: b0 10 3f ff mov -1, %i0 20632c0: 82 10 20 14 mov 0x14, %g1 20632c4: c2 22 00 00 st %g1, [ %o0 ] 20632c8: 81 c7 e0 08 ret 20632cc: 81 e8 00 00 restore =============================================================================== 0200f8a0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200f8a0: 9d e3 be 88 save %sp, -376, %sp static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 200f8a4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200f8a8: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 200f8ac: c2 00 40 00 ld [ %g1 ], %g1 200f8b0: 9f c0 40 00 call %g1 200f8b4: ba 10 00 18 mov %i0, %i5 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); 200f8b8: 90 10 00 1a mov %i2, %o0 int last_entry; struct dirent tmp_dirent; rtems_filesystem_instance_lock( &iop->pathinfo ); the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 200f8bc: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 the_chain = &the_jnode->info.directory.Entries; /* Move to the first of the desired directory entries */ bytes_transferred = 0; first_entry = iop->offset; 200f8c0: f8 06 20 14 ld [ %i0 + 0x14 ], %i4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); 200f8c4: 40 00 27 41 call 20195c8 <.udiv> 200f8c8: 92 10 21 18 mov 0x118, %o1 200f8cc: a1 2a 20 03 sll %o0, 3, %l0 200f8d0: 91 2a 20 05 sll %o0, 5, %o0 200f8d4: 90 04 00 08 add %l0, %o0, %o0 200f8d8: a1 2a 20 03 sll %o0, 3, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200f8dc: f4 04 60 50 ld [ %l1 + 0x50 ], %i2 200f8e0: 90 24 00 08 sub %l0, %o0, %o0 200f8e4: a0 02 00 1c add %o0, %i4, %l0 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200f8e8: 80 a4 20 00 cmp %l0, 0 200f8ec: 04 80 00 2c ble 200f99c <== NEVER TAKEN 200f8f0: b0 10 20 00 clr %i0 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 200f8f4: a2 04 60 54 add %l1, 0x54, %l1 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); 200f8f8: 80 a6 80 11 cmp %i2, %l1 200f8fc: 22 80 00 29 be,a 200f9a0 200f900: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200f904: b6 10 20 00 clr %i3 the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 200f908: 10 80 00 08 b 200f928 200f90c: a4 10 21 18 mov 0x118, %l2 /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200f910: 80 a4 00 1b cmp %l0, %i3 200f914: 04 80 00 22 ble 200f99c <== NEVER TAKEN 200f918: f4 06 80 00 ld [ %i2 ], %i2 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); 200f91c: 80 a6 80 11 cmp %i2, %l1 200f920: 22 80 00 20 be,a 200f9a0 200f924: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { 200f928: 80 a7 00 1b cmp %i4, %i3 200f92c: 34 bf ff f9 bg,a 200f910 200f930: b6 06 e1 18 add %i3, 0x118, %i3 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 200f934: c2 06 a0 38 ld [ %i2 + 0x38 ], %g1 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200f938: 85 3e e0 1f sra %i3, 0x1f, %g2 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200f93c: a6 06 a0 0c add %i2, 0xc, %l3 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200f940: c4 27 be f0 st %g2, [ %fp + -272 ] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 200f944: c2 27 be e8 st %g1, [ %fp + -280 ] current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200f948: f6 27 be f4 st %i3, [ %fp + -268 ] tmp_dirent.d_reclen = sizeof( struct dirent ); 200f94c: e4 37 be f8 sth %l2, [ %fp + -264 ] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200f950: 40 00 08 ce call 2011c88 200f954: 90 10 00 13 mov %l3, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 200f958: 92 10 00 13 mov %l3, %o1 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200f95c: d0 37 be fa sth %o0, [ %fp + -262 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 200f960: 40 00 07 06 call 2011578 200f964: 90 07 be fc add %fp, -260, %o0 memcpy( 200f968: 90 06 40 18 add %i1, %i0, %o0 200f96c: 92 07 be e8 add %fp, -280, %o1 200f970: 40 00 05 8a call 2010f98 200f974: 94 10 21 18 mov 0x118, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); 200f978: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 200f97c: b6 06 e1 18 add %i3, 0x118, %i3 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); 200f980: 86 80 e1 18 addcc %g3, 0x118, %g3 200f984: 84 40 a0 00 addx %g2, 0, %g2 200f988: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] bytes_transferred += sizeof( struct dirent ); 200f98c: b0 06 21 18 add %i0, 0x118, %i0 /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200f990: 80 a4 00 1b cmp %l0, %i3 200f994: 14 bf ff e2 bg 200f91c <== NEVER TAKEN 200f998: f4 06 80 00 ld [ %i2 ], %i2 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 200f99c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200f9a0: c2 00 60 04 ld [ %g1 + 4 ], %g1 200f9a4: 9f c0 40 00 call %g1 200f9a8: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } 200f9ac: 81 c7 e0 08 ret 200f9b0: 81 e8 00 00 restore =============================================================================== 0202b614 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 202b614: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 202b618: 03 00 81 d3 sethi %hi(0x2074c00), %g1 202b61c: c4 48 63 c8 ldsb [ %g1 + 0x3c8 ], %g2 ! 2074fc8 202b620: 80 a0 a0 00 cmp %g2, 0 202b624: 22 80 00 04 be,a 202b634 202b628: 84 10 20 01 mov 1, %g2 202b62c: 81 c7 e0 08 ret 202b630: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 202b634: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 202b638: c4 28 63 c8 stb %g2, [ %g1 + 0x3c8 ] mkdir("/etc", 0777); 202b63c: 11 00 81 91 sethi %hi(0x2064400), %o0 202b640: 7f ff 77 f3 call 200960c 202b644: 90 12 20 28 or %o0, 0x28, %o0 ! 2064428 <_rodata_start+0x9e8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 202b648: 39 00 81 91 sethi %hi(0x2064400), %i4 202b64c: 3b 00 81 c2 sethi %hi(0x2070800), %i5 202b650: 90 17 20 b0 or %i4, 0xb0, %o0 202b654: 40 00 75 a5 call 2048ce8 202b658: 92 17 62 08 or %i5, 0x208, %o1 202b65c: 80 a2 20 00 cmp %o0, 0 202b660: 22 80 00 0d be,a 202b694 202b664: 90 17 20 b0 or %i4, 0xb0, %o0 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202b668: 40 00 73 3b call 2048354 202b66c: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 202b670: 39 00 81 91 sethi %hi(0x2064400), %i4 202b674: 92 17 62 08 or %i5, 0x208, %o1 202b678: 40 00 75 9c call 2048ce8 202b67c: 90 17 21 68 or %i4, 0x168, %o0 202b680: 80 a2 20 00 cmp %o0, 0 202b684: 22 80 00 11 be,a 202b6c8 202b688: 90 17 21 68 or %i4, 0x168, %o0 fclose(fp); 202b68c: 40 00 73 32 call 2048354 202b690: 91 e8 00 08 restore %g0, %o0, %o0 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 202b694: 13 00 81 a0 sethi %hi(0x2068000), %o1 202b698: 40 00 75 94 call 2048ce8 202b69c: 92 12 63 88 or %o1, 0x388, %o1 ! 2068388 202b6a0: b0 92 20 00 orcc %o0, 0, %i0 202b6a4: 02 bf ff f3 be 202b670 <== NEVER TAKEN 202b6a8: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 202b6ac: 94 10 20 66 mov 0x66, %o2 202b6b0: 96 10 00 18 mov %i0, %o3 202b6b4: 11 00 81 a8 sethi %hi(0x206a000), %o0 202b6b8: 40 00 7a 61 call 204a03c 202b6bc: 90 12 23 20 or %o0, 0x320, %o0 ! 206a320 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202b6c0: 10 bf ff ea b 202b668 202b6c4: 90 10 00 18 mov %i0, %o0 * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 202b6c8: 13 00 81 a0 sethi %hi(0x2068000), %o1 202b6cc: 40 00 75 87 call 2048ce8 202b6d0: 92 12 63 88 or %o1, 0x388, %o1 ! 2068388 202b6d4: b0 92 20 00 orcc %o0, 0, %i0 202b6d8: 02 bf ff d5 be 202b62c <== NEVER TAKEN 202b6dc: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 202b6e0: 92 10 20 01 mov 1, %o1 ! 1 202b6e4: 11 00 81 a8 sethi %hi(0x206a000), %o0 202b6e8: 94 10 20 2a mov 0x2a, %o2 202b6ec: 96 10 00 18 mov %i0, %o3 202b6f0: 40 00 7a 53 call 204a03c 202b6f4: 90 12 23 88 or %o0, 0x388, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 202b6f8: 40 00 73 17 call 2048354 202b6fc: 81 e8 00 00 restore =============================================================================== 020065a4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 20065a4: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 20065a8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 20065ac: 80 88 60 20 btst 0x20, %g1 20065b0: 02 80 00 03 be 20065bc <== ALWAYS TAKEN 20065b4: ba 10 00 18 mov %i0, %i5 c &= 0x7f; 20065b8: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 20065bc: 80 88 62 00 btst 0x200, %g1 20065c0: 02 80 00 0d be 20065f4 20065c4: 80 a7 60 0d cmp %i5, 0xd c = tolower (c); 20065c8: 05 00 80 77 sethi %hi(0x201dc00), %g2 20065cc: c6 00 a3 e0 ld [ %g2 + 0x3e0 ], %g3 ! 201dfe0 <__ctype_ptr__> 20065d0: 84 10 00 1d mov %i5, %g2 20065d4: ba 00 c0 1d add %g3, %i5, %i5 20065d8: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 20065dc: 86 08 e0 03 and %g3, 3, %g3 20065e0: 80 a0 e0 01 cmp %g3, 1 20065e4: 22 80 00 02 be,a 20065ec 20065e8: 84 00 a0 20 add %g2, 0x20, %g2 20065ec: ba 08 a0 ff and %g2, 0xff, %i5 if (c == '\r') { 20065f0: 80 a7 60 0d cmp %i5, 0xd 20065f4: 02 80 00 17 be 2006650 20065f8: 80 a7 60 0a cmp %i5, 0xa 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)) { 20065fc: 02 80 00 40 be 20066fc 2006600: 80 a7 60 00 cmp %i5, 0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006604: 32 80 00 1a bne,a 200666c <== ALWAYS TAKEN 2006608: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 200660c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2006610: 05 00 80 77 sethi %hi(0x201dc00), %g2 2006614: c4 00 a2 5c ld [ %g2 + 0x25c ], %g2 ! 201de5c 2006618: 84 00 bf ff add %g2, -1, %g2 200661c: 80 a0 40 02 cmp %g1, %g2 2006620: 1a 80 00 46 bcc 2006738 <== NEVER TAKEN 2006624: b0 10 20 00 clr %i0 if (tty->termios.c_lflag & ECHO) 2006628: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 200662c: 80 88 a0 08 btst 8, %g2 2006630: 12 80 00 38 bne 2006710 <== ALWAYS TAKEN 2006634: 90 10 00 1d mov %i5, %o0 echo (c, tty); tty->cbuf[tty->ccount++] = c; 2006638: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200663c: 84 00 60 01 add %g1, 1, %g2 2006640: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] 2006644: c4 26 60 20 st %g2, [ %i1 + 0x20 ] } return 0; } 2006648: 81 c7 e0 08 ret 200664c: 91 e8 20 00 restore %g0, 0, %o0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 2006650: 80 88 60 80 btst 0x80, %g1 2006654: 12 80 00 39 bne 2006738 <== NEVER TAKEN 2006658: b0 10 20 00 clr %i0 return 0; if (tty->termios.c_iflag & ICRNL) 200665c: 80 88 61 00 btst 0x100, %g1 2006660: 32 80 00 02 bne,a 2006668 <== ALWAYS TAKEN 2006664: ba 10 20 0a mov 0xa, %i5 c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006668: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 200666c: 80 88 60 02 btst 2, %g1 2006670: 22 bf ff e8 be,a 2006610 2006674: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if (c == tty->termios.c_cc[VERASE]) { 2006678: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 200667c: 80 a0 80 1d cmp %g2, %i5 2006680: 02 80 00 3d be 2006774 2006684: 90 10 00 19 mov %i1, %o0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2006688: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 200668c: 80 a0 80 1d cmp %g2, %i5 2006690: 02 80 00 28 be 2006730 2006694: 92 10 20 01 mov 1, %o1 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2006698: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 200669c: 80 a0 80 1d cmp %g2, %i5 20066a0: 02 80 00 26 be 2006738 <== NEVER TAKEN 20066a4: b0 10 20 01 mov 1, %i0 return 1; } else if (c == '\n') { 20066a8: 80 a7 60 0a cmp %i5, 0xa 20066ac: 02 80 00 25 be 2006740 20066b0: 80 88 60 48 btst 0x48, %g1 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 20066b4: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 20066b8: 80 a0 80 1d cmp %g2, %i5 20066bc: 02 80 00 07 be 20066d8 <== NEVER TAKEN 20066c0: 80 88 60 08 btst 8, %g1 20066c4: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 20066c8: 80 a0 80 1d cmp %g2, %i5 20066cc: 32 bf ff d1 bne,a 2006610 <== ALWAYS TAKEN 20066d0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 20066d4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 20066d8: 32 80 00 12 bne,a 2006720 <== NOT EXECUTED 20066dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 20066e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 20066e4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 20066e8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 20066ec: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED 20066f0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 20066f4: 81 c7 e0 08 ret <== NOT EXECUTED 20066f8: 91 e8 20 01 restore %g0, 1, %o0 <== 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)) { 20066fc: 80 88 60 40 btst 0x40, %g1 2006700: 32 bf ff da bne,a 2006668 <== NEVER TAKEN 2006704: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006708: 10 bf ff d9 b 200666c 200670c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2006710: 7f ff fe f6 call 20062e8 2006714: 92 10 00 19 mov %i1, %o1 2006718: 10 bf ff c8 b 2006638 200671c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2006720: 7f ff fe f2 call 20062e8 <== NOT EXECUTED 2006724: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2006728: 10 bf ff ef b 20066e4 <== NOT EXECUTED 200672c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 2006730: 7f ff ff 0f call 200636c 2006734: b0 10 20 00 clr %i0 return 0; 2006738: 81 c7 e0 08 ret 200673c: 81 e8 00 00 restore } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 2006740: 22 80 00 06 be,a 2006758 <== NEVER TAKEN 2006744: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2006748: 90 10 20 0a mov 0xa, %o0 200674c: 7f ff fe e7 call 20062e8 2006750: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2006754: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2006758: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 200675c: 86 10 20 0a mov 0xa, %g3 2006760: c6 28 80 01 stb %g3, [ %g2 + %g1 ] 2006764: 82 00 60 01 inc %g1 2006768: c2 26 60 20 st %g1, [ %i1 + 0x20 ] return 1; 200676c: 81 c7 e0 08 ret 2006770: 91 e8 20 01 restore %g0, 1, %o0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 2006774: 92 10 20 00 clr %o1 2006778: 7f ff fe fd call 200636c 200677c: b0 10 20 00 clr %i0 return 0; 2006780: 81 c7 e0 08 ret 2006784: 81 e8 00 00 restore =============================================================================== 0201b24c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201b24c: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 201b250: 7f ff fe ee call 201ae08 201b254: 01 00 00 00 nop 201b258: 80 a2 00 18 cmp %o0, %i0 201b25c: 12 80 00 af bne 201b518 201b260: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 201b264: 02 80 00 b3 be 201b530 201b268: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 201b26c: 80 a0 60 1f cmp %g1, 0x1f 201b270: 18 80 00 b0 bgu 201b530 201b274: b7 2e 60 02 sll %i1, 2, %i3 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 201b278: 39 00 80 7b sethi %hi(0x201ec00), %i4 201b27c: a1 2e 60 04 sll %i1, 4, %l0 201b280: b8 17 23 d0 or %i4, 0x3d0, %i4 201b284: 84 24 00 1b sub %l0, %i3, %g2 201b288: 84 07 00 02 add %i4, %g2, %g2 201b28c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 201b290: 80 a0 a0 01 cmp %g2, 1 201b294: 02 80 00 3f be 201b390 201b298: b0 10 20 00 clr %i0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 201b29c: 80 a6 60 04 cmp %i1, 4 201b2a0: 02 80 00 3e be 201b398 201b2a4: 80 a6 60 08 cmp %i1, 8 201b2a8: 02 80 00 3c be 201b398 201b2ac: 80 a6 60 0b cmp %i1, 0xb 201b2b0: 02 80 00 3a be 201b398 201b2b4: ba 10 20 01 mov 1, %i5 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201b2b8: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 201b2bc: fa 27 bf f8 st %i5, [ %fp + -8 ] if ( !value ) { 201b2c0: 80 a6 a0 00 cmp %i2, 0 201b2c4: 02 80 00 3b be 201b3b0 201b2c8: bb 2f 40 01 sll %i5, %g1, %i5 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 201b2cc: c2 06 80 00 ld [ %i2 ], %g1 201b2d0: c2 27 bf fc st %g1, [ %fp + -4 ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 201b2d4: 03 00 80 7a sethi %hi(0x201e800), %g1 201b2d8: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201ea30 <_Thread_Dispatch_disable_level> 201b2dc: 84 00 a0 01 inc %g2 201b2e0: c4 20 62 30 st %g2, [ %g1 + 0x230 ] return _Thread_Dispatch_disable_level; 201b2e4: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 201b2e8: 03 00 80 7b sethi %hi(0x201ec00), %g1 201b2ec: d0 00 63 7c ld [ %g1 + 0x37c ], %o0 ! 201ef7c <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201b2f0: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 201b2f4: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 201b2f8: 80 af 40 01 andncc %i5, %g1, %g0 201b2fc: 12 80 00 16 bne 201b354 201b300: 07 00 80 7c sethi %hi(0x201f000), %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 201b304: d0 00 e1 5c ld [ %g3 + 0x15c ], %o0 ! 201f15c <_POSIX_signals_Wait_queue> 201b308: 86 10 e1 5c or %g3, 0x15c, %g3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201b30c: 86 00 e0 04 add %g3, 4, %g3 201b310: 80 a2 00 03 cmp %o0, %g3 201b314: 32 80 00 0d bne,a 201b348 201b318: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201b31c: 10 80 00 27 b 201b3b8 201b320: 03 00 80 77 sethi %hi(0x201dc00), %g1 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 201b324: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 201b328: 80 af 40 01 andncc %i5, %g1, %g0 201b32c: 12 80 00 0b bne 201b358 201b330: 92 10 00 19 mov %i1, %o1 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 201b334: d0 02 00 00 ld [ %o0 ], %o0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201b338: 80 a2 00 03 cmp %o0, %g3 201b33c: 02 80 00 1f be 201b3b8 <== ALWAYS TAKEN 201b340: 03 00 80 77 sethi %hi(0x201dc00), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 201b344: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 <== NOT EXECUTED 201b348: 80 8f 40 01 btst %i5, %g1 201b34c: 02 bf ff f6 be 201b324 201b350: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 201b354: 92 10 00 19 mov %i1, %o1 201b358: 40 00 00 8d call 201b58c <_POSIX_signals_Unblock_thread> 201b35c: 94 07 bf f4 add %fp, -12, %o2 201b360: 80 8a 20 ff btst 0xff, %o0 201b364: 12 80 00 5a bne 201b4cc 201b368: 01 00 00 00 nop /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 201b36c: 40 00 00 7f call 201b568 <_POSIX_signals_Set_process_signals> 201b370: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 201b374: b6 24 00 1b sub %l0, %i3, %i3 201b378: c2 07 00 1b ld [ %i4 + %i3 ], %g1 201b37c: 80 a0 60 02 cmp %g1, 2 201b380: 02 80 00 57 be 201b4dc 201b384: 11 00 80 7c sethi %hi(0x201f000), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 201b388: 7f ff bd 2f call 200a844 <_Thread_Enable_dispatch> 201b38c: b0 10 20 00 clr %i0 return 0; } 201b390: 81 c7 e0 08 ret 201b394: 81 e8 00 00 restore * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 201b398: 40 00 01 0f call 201b7d4 201b39c: 01 00 00 00 nop 201b3a0: 40 00 00 d2 call 201b6e8 201b3a4: 92 10 00 19 mov %i1, %o1 201b3a8: 81 c7 e0 08 ret 201b3ac: 91 e8 00 08 restore %g0, %o0, %o0 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 201b3b0: 10 bf ff c9 b 201b2d4 201b3b4: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201b3b8: c8 08 60 94 ldub [ %g1 + 0x94 ], %g4 201b3bc: 1b 00 80 7a sethi %hi(0x201e800), %o5 201b3c0: 88 01 20 01 inc %g4 201b3c4: 9a 13 61 a0 or %o5, 0x1a0, %o5 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 201b3c8: 90 10 20 00 clr %o0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201b3cc: 98 03 60 08 add %o5, 8, %o4 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 201b3d0: 15 04 00 00 sethi %hi(0x10000000), %o2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 201b3d4: c2 03 40 00 ld [ %o5 ], %g1 201b3d8: 80 a0 60 00 cmp %g1, 0 201b3dc: 22 80 00 31 be,a 201b4a0 <== NEVER TAKEN 201b3e0: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 201b3e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 201b3e8: f4 10 60 10 lduh [ %g1 + 0x10 ], %i2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201b3ec: 80 a6 a0 00 cmp %i2, 0 201b3f0: 02 80 00 2b be 201b49c 201b3f4: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 201b3f8: 82 10 20 01 mov 1, %g1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201b3fc: 85 28 60 02 sll %g1, 2, %g2 maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 201b400: c4 06 00 02 ld [ %i0 + %g2 ], %g2 if ( !the_thread ) 201b404: 80 a0 a0 00 cmp %g2, 0 201b408: 22 80 00 22 be,a 201b490 201b40c: 82 00 60 01 inc %g1 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 201b410: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 201b414: 80 a0 c0 04 cmp %g3, %g4 201b418: 38 80 00 1e bgu,a 201b490 201b41c: 82 00 60 01 inc %g1 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 201b420: de 00 a1 5c ld [ %g2 + 0x15c ], %o7 201b424: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7 201b428: 80 af 40 0f andncc %i5, %o7, %g0 201b42c: 22 80 00 19 be,a 201b490 201b430: 82 00 60 01 inc %g1 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 201b434: 80 a0 c0 04 cmp %g3, %g4 201b438: 2a 80 00 14 bcs,a 201b488 201b43c: 88 10 00 03 mov %g3, %g4 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 201b440: 80 a2 20 00 cmp %o0, 0 201b444: 22 80 00 13 be,a 201b490 <== NEVER TAKEN 201b448: 82 00 60 01 inc %g1 <== NOT EXECUTED 201b44c: de 02 20 10 ld [ %o0 + 0x10 ], %o7 201b450: 80 a3 e0 00 cmp %o7, 0 201b454: 22 80 00 0f be,a 201b490 <== NEVER TAKEN 201b458: 82 00 60 01 inc %g1 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201b45c: d6 00 a0 10 ld [ %g2 + 0x10 ], %o3 201b460: 80 a2 e0 00 cmp %o3, 0 201b464: 22 80 00 09 be,a 201b488 201b468: 88 10 00 03 mov %g3, %g4 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 201b46c: 80 8b c0 0a btst %o7, %o2 201b470: 32 80 00 08 bne,a 201b490 201b474: 82 00 60 01 inc %g1 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 201b478: 80 8a c0 0a btst %o3, %o2 201b47c: 22 80 00 05 be,a 201b490 201b480: 82 00 60 01 inc %g1 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201b484: 88 10 00 03 mov %g3, %g4 201b488: 90 10 00 02 mov %g2, %o0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201b48c: 82 00 60 01 inc %g1 201b490: 80 a6 80 01 cmp %i2, %g1 201b494: 1a bf ff db bcc 201b400 201b498: 85 28 60 02 sll %g1, 2, %g2 201b49c: 9a 03 60 04 add %o5, 4, %o5 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201b4a0: 80 a3 40 0c cmp %o5, %o4 201b4a4: 32 bf ff cd bne,a 201b3d8 201b4a8: c2 03 40 00 ld [ %o5 ], %g1 } } } } if ( interested ) { 201b4ac: 80 a2 20 00 cmp %o0, 0 201b4b0: 02 bf ff af be 201b36c 201b4b4: 92 10 00 19 mov %i1, %o1 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 201b4b8: 40 00 00 35 call 201b58c <_POSIX_signals_Unblock_thread> 201b4bc: 94 07 bf f4 add %fp, -12, %o2 201b4c0: 80 8a 20 ff btst 0xff, %o0 201b4c4: 02 bf ff aa be 201b36c <== ALWAYS TAKEN 201b4c8: 01 00 00 00 nop _Thread_Enable_dispatch(); 201b4cc: 7f ff bc de call 200a844 <_Thread_Enable_dispatch> 201b4d0: b0 10 20 00 clr %i0 ! 0 return 0; 201b4d4: 81 c7 e0 08 ret 201b4d8: 81 e8 00 00 restore */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 201b4dc: 7f ff b4 ce call 2008814 <_Chain_Get> 201b4e0: 90 12 21 50 or %o0, 0x150, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 201b4e4: 92 92 20 00 orcc %o0, 0, %o1 201b4e8: 02 80 00 18 be 201b548 201b4ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201b4f0: 11 00 80 7c sethi %hi(0x201f000), %o0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 201b4f4: c2 22 60 08 st %g1, [ %o1 + 8 ] 201b4f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201b4fc: 90 12 21 c8 or %o0, 0x1c8, %o0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 201b500: c2 22 60 0c st %g1, [ %o1 + 0xc ] 201b504: c2 07 bf fc ld [ %fp + -4 ], %g1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201b508: 90 02 00 1b add %o0, %i3, %o0 201b50c: 7f ff b4 b7 call 20087e8 <_Chain_Append> 201b510: c2 22 60 10 st %g1, [ %o1 + 0x10 ] 201b514: 30 bf ff 9d b,a 201b388 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 201b518: 7f ff d4 44 call 2010628 <__errno> 201b51c: b0 10 3f ff mov -1, %i0 201b520: 82 10 20 03 mov 3, %g1 201b524: c2 22 00 00 st %g1, [ %o0 ] 201b528: 81 c7 e0 08 ret 201b52c: 81 e8 00 00 restore */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 201b530: 7f ff d4 3e call 2010628 <__errno> 201b534: b0 10 3f ff mov -1, %i0 201b538: 82 10 20 16 mov 0x16, %g1 201b53c: c2 22 00 00 st %g1, [ %o0 ] 201b540: 81 c7 e0 08 ret 201b544: 81 e8 00 00 restore if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 201b548: 7f ff bc bf call 200a844 <_Thread_Enable_dispatch> 201b54c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 201b550: 7f ff d4 36 call 2010628 <__errno> 201b554: 01 00 00 00 nop 201b558: 82 10 20 0b mov 0xb, %g1 ! b 201b55c: c2 22 00 00 st %g1, [ %o0 ] 201b560: 81 c7 e0 08 ret 201b564: 81 e8 00 00 restore =============================================================================== 0200416c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 200416c: 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())) 2004170: 03 00 80 7a sethi %hi(0x201e800), %g1 2004174: c2 00 63 88 ld [ %g1 + 0x388 ], %g1 ! 201eb88 <_System_state_Current> 2004178: 80 a0 60 03 cmp %g1, 3 200417c: 02 80 00 04 be 200418c <== ALWAYS TAKEN 2004180: 3b 00 80 77 sethi %hi(0x201dc00), %i5 2004184: 81 c7 e0 08 ret <== NOT EXECUTED 2004188: 81 e8 00 00 restore <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 200418c: 05 00 80 74 sethi %hi(0x201d000), %g2 2004190: c2 07 63 e8 ld [ %i5 + 0x3e8 ], %g1 2004194: f8 00 a1 d0 ld [ %g2 + 0x1d0 ], %i4 2004198: 80 a0 40 1c cmp %g1, %i4 200419c: 02 80 00 05 be 20041b0 20041a0: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 20041a4: 40 00 34 5d call 2011318 <_wrapup_reent> 20041a8: 90 10 00 1c mov %i4, %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; 20041ac: f8 27 63 e8 st %i4, [ %i5 + 0x3e8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20041b0: 40 00 31 70 call 2010770 20041b4: d0 07 20 04 ld [ %i4 + 4 ], %o0 fclose (stdout); 20041b8: c2 07 63 e8 ld [ %i5 + 0x3e8 ], %g1 20041bc: 40 00 31 6d call 2010770 20041c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20041c4: c2 07 63 e8 ld [ %i5 + 0x3e8 ], %g1 20041c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20041cc: 40 00 31 69 call 2010770 20041d0: 81 e8 00 00 restore =============================================================================== 0201ae28 : #include #include off_t lseek( int fd, off_t offset, int whence ) { 201ae28: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t reference_offset; off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); 201ae2c: 03 00 80 77 sethi %hi(0x201dc00), %g1 201ae30: c2 00 61 7c ld [ %g1 + 0x17c ], %g1 ! 201dd7c #include #include off_t lseek( int fd, off_t offset, int whence ) { 201ae34: b8 10 00 19 mov %i1, %i4 201ae38: ba 10 00 1a mov %i2, %i5 rtems_libio_t *iop; off_t reference_offset; off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); 201ae3c: 80 a6 00 01 cmp %i0, %g1 201ae40: 1a 80 00 5c bcc 201afb0 201ae44: a4 10 00 1b mov %i3, %l2 iop = rtems_libio_iop( fd ); 201ae48: 03 00 80 7a sethi %hi(0x201e800), %g1 201ae4c: f2 00 60 b8 ld [ %g1 + 0xb8 ], %i1 ! 201e8b8 201ae50: 83 2e 20 03 sll %i0, 3, %g1 201ae54: b1 2e 20 06 sll %i0, 6, %i0 201ae58: b0 00 40 18 add %g1, %i0, %i0 201ae5c: b2 06 40 18 add %i1, %i0, %i1 rtems_libio_check_is_open(iop); 201ae60: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 201ae64: 80 88 61 00 btst 0x100, %g1 201ae68: 02 80 00 52 be 201afb0 201ae6c: 80 a6 e0 01 cmp %i3, 1 old_offset = iop->offset; switch ( whence ) { 201ae70: 02 80 00 4a be 201af98 201ae74: e0 1e 60 10 ldd [ %i1 + 0x10 ], %l0 201ae78: 80 a6 e0 02 cmp %i3, 2 201ae7c: 02 80 00 0f be 201aeb8 201ae80: b4 10 00 1c mov %i4, %i2 201ae84: 80 a4 a0 00 cmp %l2, 0 201ae88: 02 80 00 2b be 201af34 201ae8c: b6 10 00 1d mov %i5, %i3 ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { errno = EINVAL; 201ae90: 7f ff d5 e6 call 2010628 <__errno> 201ae94: 01 00 00 00 nop 201ae98: 05 3f ff ff sethi %hi(0xfffffc00), %g2 201ae9c: 82 10 20 16 mov 0x16, %g1 201aea0: 84 10 a3 ff or %g2, 0x3ff, %g2 201aea4: c2 22 00 00 st %g1, [ %o0 ] 201aea8: 86 10 00 02 mov %g2, %g3 rv = (off_t) -1; } } return rv; } 201aeac: b0 10 00 02 mov %g2, %i0 201aeb0: 81 c7 e0 08 ret 201aeb4: 93 e8 00 03 restore %g0, %g3, %o1 break; case SEEK_CUR: reference_offset = old_offset; break; case SEEK_END: reference_offset = iop->size; 201aeb8: c4 1e 60 08 ldd [ %i1 + 8 ], %g2 default: errno = EINVAL; rv = (off_t) -1; break; } new_offset = reference_offset + offset; 201aebc: b6 80 c0 1d addcc %g3, %i5, %i3 201aec0: b4 40 80 1c addx %g2, %i4, %i2 if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 201aec4: 80 a7 00 1a cmp %i4, %i2 201aec8: 04 80 00 46 ble 201afe0 201aecc: 82 10 20 01 mov 1, %g1 201aed0: 82 10 20 00 clr %g1 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201aed4: 80 88 60 ff btst 0xff, %g1 201aed8: 12 80 00 15 bne 201af2c 201aedc: 80 a0 a0 00 cmp %g2, 0 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 201aee0: 80 a6 80 1c cmp %i2, %i4 201aee4: 14 80 00 3d bg 201afd8 <== NEVER TAKEN 201aee8: 82 10 20 01 mov 1, %g1 201aeec: 80 a6 80 1c cmp %i2, %i4 201aef0: 02 80 00 38 be 201afd0 <== NEVER TAKEN 201aef4: 80 a6 c0 1d cmp %i3, %i5 201aef8: 80 88 60 ff btst 0xff, %g1 201aefc: 02 80 00 04 be 201af0c <== NEVER TAKEN 201af00: 80 a0 a0 00 cmp %g2, 0 201af04: 06 80 00 0c bl 201af34 <== NEVER TAKEN 201af08: 01 00 00 00 nop if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201af0c: 7f ff d5 c7 call 2010628 <__errno> 201af10: 01 00 00 00 nop rv = (off_t) -1; 201af14: 05 3f ff ff sethi %hi(0xfffffc00), %g2 if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201af18: 82 10 20 8b mov 0x8b, %g1 rv = (off_t) -1; 201af1c: 84 10 a3 ff or %g2, 0x3ff, %g2 if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201af20: c2 22 00 00 st %g1, [ %o0 ] rv = (off_t) -1; 201af24: 10 bf ff e2 b 201aeac 201af28: 86 10 00 02 mov %g2, %g3 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201af2c: 06 bf ff ee bl 201aee4 <== NEVER TAKEN 201af30: 80 a6 80 1c cmp %i2, %i4 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { 201af34: 40 00 00 79 call 201b118 201af38: 90 06 60 1c add %i1, 0x1c, %o0 201af3c: 80 a2 20 00 cmp %o0, 0 201af40: 02 80 00 19 be 201afa4 201af44: 80 a6 a0 00 cmp %i2, 0 201af48: 80 a2 20 04 cmp %o0, 4 201af4c: 02 80 00 16 be 201afa4 201af50: 80 a6 a0 00 cmp %i2, 0 break; } if ( rv == 0 ) { iop->offset = new_offset; rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201af54: c2 06 60 2c ld [ %i1 + 0x2c ], %g1 default: break; } if ( rv == 0 ) { iop->offset = new_offset; 201af58: f4 3e 60 10 std %i2, [ %i1 + 0x10 ] rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201af5c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 201af60: 90 10 00 19 mov %i1, %o0 201af64: 92 10 00 1c mov %i4, %o1 201af68: 94 10 00 1d mov %i5, %o2 201af6c: 9f c0 40 00 call %g1 201af70: 96 10 00 12 mov %l2, %o3 201af74: 84 10 00 08 mov %o0, %g2 if ( rv == (off_t) -1 ) { 201af78: 80 a0 bf ff cmp %g2, -1 201af7c: 12 bf ff cc bne 201aeac 201af80: 86 10 00 09 mov %o1, %g3 201af84: 80 a2 7f ff cmp %o1, -1 201af88: 22 bf ff c9 be,a 201aeac <== ALWAYS TAKEN 201af8c: e0 3e 60 10 std %l0, [ %i1 + 0x10 ] rv = (off_t) -1; } } return rv; } 201af90: 10 bf ff c8 b 201aeb0 <== NOT EXECUTED 201af94: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED switch ( whence ) { case SEEK_SET: reference_offset = 0; break; case SEEK_CUR: reference_offset = old_offset; 201af98: 84 10 00 10 mov %l0, %g2 201af9c: 10 bf ff c8 b 201aebc 201afa0: 86 10 00 11 mov %l1, %g3 || (reference_offset < 0 && new_offset <= offset) ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { 201afa4: 36 bf ff ed bge,a 201af58 201afa8: c2 06 60 2c ld [ %i1 + 0x2c ], %g1 201afac: 30 bf ff b9 b,a 201ae90 off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201afb0: 7f ff d5 9e call 2010628 <__errno> 201afb4: 01 00 00 00 nop 201afb8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 201afbc: 82 10 20 09 mov 9, %g1 201afc0: 84 10 a3 ff or %g2, 0x3ff, %g2 201afc4: c2 22 00 00 st %g1, [ %o0 ] 201afc8: 10 bf ff b9 b 201aeac 201afcc: 86 10 00 02 mov %g2, %g3 new_offset = reference_offset + offset; if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 201afd0: 08 bf ff cb bleu 201aefc <== NOT EXECUTED 201afd4: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 201afd8: 10 bf ff c8 b 201aef8 <== NOT EXECUTED 201afdc: 82 10 20 00 clr %g1 <== NOT EXECUTED } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 201afe0: 12 bf ff be bne 201aed8 201afe4: 80 88 60 ff btst 0xff, %g1 201afe8: 80 a7 40 1b cmp %i5, %i3 201afec: 08 bf ff bb bleu 201aed8 <== ALWAYS TAKEN 201aff0: 80 88 60 ff btst 0xff, %g1 201aff4: 10 bf ff b8 b 201aed4 <== NOT EXECUTED 201aff8: 82 10 20 00 clr %g1 <== NOT EXECUTED =============================================================================== 02003c04 : #include "malloc_p.h" void *malloc( size_t size ) { 2003c04: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 2003c08: 03 00 80 7a sethi %hi(0x201e800), %g1 2003c0c: 82 10 60 d0 or %g1, 0xd0, %g1 ! 201e8d0 2003c10: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 2003c14: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 2003c18: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003c1c: 7f ff ff a8 call 2003abc 2003c20: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 2003c24: 80 a7 60 00 cmp %i5, 0 2003c28: 02 80 00 1e be 2003ca0 2003c2c: 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()) && 2003c30: 03 00 80 7a sethi %hi(0x201e800), %g1 2003c34: c2 00 63 88 ld [ %g1 + 0x388 ], %g1 ! 201eb88 <_System_state_Current> 2003c38: 80 a0 60 03 cmp %g1, 3 2003c3c: 02 80 00 1b be 2003ca8 2003c40: 03 00 80 77 sethi %hi(0x201dc00), %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 ); 2003c44: d0 00 61 38 ld [ %g1 + 0x138 ], %o0 ! 201dd38 2003c48: 92 10 00 1d mov %i5, %o1 2003c4c: 94 10 20 00 clr %o2 2003c50: 40 00 17 b8 call 2009b30 <_Protected_heap_Allocate_aligned_with_boundary> 2003c54: 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 ) { 2003c58: b0 92 20 00 orcc %o0, 0, %i0 2003c5c: 02 80 00 21 be 2003ce0 <== NEVER TAKEN 2003c60: 03 00 80 79 sethi %hi(0x201e400), %g1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003c64: 03 00 80 79 sethi %hi(0x201e400), %g1 2003c68: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 201e50c 2003c6c: 80 a0 60 00 cmp %g1, 0 2003c70: 02 80 00 04 be 2003c80 2003c74: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003c78: 9f c0 40 00 call %g1 2003c7c: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003c80: 03 00 80 79 sethi %hi(0x201e400), %g1 2003c84: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201e514 2003c88: 80 a0 60 00 cmp %g1, 0 2003c8c: 02 80 00 25 be 2003d20 2003c90: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003c94: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003c98: 9f c0 40 00 call %g1 2003c9c: 90 10 00 18 mov %i0, %o0 return return_this; } 2003ca0: 81 c7 e0 08 ret 2003ca4: 81 e8 00 00 restore /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 2003ca8: 7f ff ff 73 call 2003a74 2003cac: 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()) && 2003cb0: 80 8a 20 ff btst 0xff, %o0 2003cb4: 02 bf ff fb be 2003ca0 <== NEVER TAKEN 2003cb8: 03 00 80 77 sethi %hi(0x201dc00), %g1 2003cbc: d0 00 61 38 ld [ %g1 + 0x138 ], %o0 ! 201dd38 2003cc0: 92 10 00 1d mov %i5, %o1 2003cc4: 94 10 20 00 clr %o2 2003cc8: 40 00 17 9a call 2009b30 <_Protected_heap_Allocate_aligned_with_boundary> 2003ccc: 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 ) { 2003cd0: b0 92 20 00 orcc %o0, 0, %i0 2003cd4: 12 bf ff e5 bne 2003c68 2003cd8: 03 00 80 79 sethi %hi(0x201e400), %g1 if (rtems_malloc_sbrk_helpers) 2003cdc: 03 00 80 79 sethi %hi(0x201e400), %g1 2003ce0: c2 00 61 10 ld [ %g1 + 0x110 ], %g1 ! 201e510 2003ce4: 80 a0 60 00 cmp %g1, 0 2003ce8: 02 80 00 0a be 2003d10 2003cec: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2003cf0: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003cf4: 9f c0 40 00 call %g1 2003cf8: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 2003cfc: 80 a2 20 00 cmp %o0, 0 2003d00: 02 80 00 04 be 2003d10 2003d04: 01 00 00 00 nop 2003d08: 10 bf ff d7 b 2003c64 2003d0c: b0 10 00 08 mov %o0, %i0 errno = ENOMEM; 2003d10: 40 00 32 46 call 2010628 <__errno> 2003d14: 01 00 00 00 nop 2003d18: 82 10 20 0c mov 0xc, %g1 ! c 2003d1c: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2003d20: 81 c7 e0 08 ret 2003d24: 81 e8 00 00 restore =============================================================================== 02003cf0 : } static void *malloc_sbrk_extend_and_allocate( size_t size ) { 2003cf0: 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; 2003cf4: 03 00 80 7b sethi %hi(0x201ec00), %g1 2003cf8: fa 00 60 e8 ld [ %g1 + 0xe8 ], %i5 ! 201ece8 if ( sbrk_amount == 0 ) 2003cfc: 80 a7 60 00 cmp %i5, 0 2003d00: 02 80 00 20 be 2003d80 <== NEVER TAKEN 2003d04: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 2003d08: 92 10 00 1d mov %i5, %o1 2003d0c: 40 00 56 f6 call 20198e4 <.udiv> 2003d10: 90 06 00 1d add %i0, %i5, %o0 2003d14: 40 00 56 ba call 20197fc <.umul> 2003d18: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 2003d1c: 7f ff f5 c2 call 2001424 2003d20: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 2003d24: 80 a2 3f ff cmp %o0, -1 2003d28: 02 80 00 16 be 2003d80 2003d2c: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 2003d30: 39 00 80 77 sethi %hi(0x201dc00), %i4 2003d34: d0 07 23 b8 ld [ %i4 + 0x3b8 ], %o0 ! 201dfb8 2003d38: 40 00 17 78 call 2009b18 <_Protected_heap_Extend> 2003d3c: 94 10 00 1d mov %i5, %o2 2003d40: 80 8a 20 ff btst 0xff, %o0 2003d44: 02 80 00 09 be 2003d68 2003d48: 03 00 80 7b sethi %hi(0x201ec00), %g1 2003d4c: f0 07 23 b8 ld [ %i4 + 0x3b8 ], %i0 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 2003d50: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 2003d54: b4 10 20 00 clr %i2 2003d58: ba 07 40 02 add %i5, %g2, %i5 2003d5c: fa 20 60 b8 st %i5, [ %g1 + 0xb8 ] 2003d60: 40 00 17 60 call 2009ae0 <_Protected_heap_Allocate_aligned_with_boundary> 2003d64: 97 e8 20 00 restore %g0, 0, %o3 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 2003d68: 7f ff f5 af call 2001424 2003d6c: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 2003d70: 40 00 32 f5 call 2010944 <__errno> 2003d74: 01 00 00 00 nop 2003d78: 82 10 20 0c mov 0xc, %g1 ! c 2003d7c: c2 22 00 00 st %g1, [ %o0 ] MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 2003d80: 81 c7 e0 08 ret 2003d84: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02003d88 : static void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2003d88: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2003d8c: 03 00 80 7b sethi %hi(0x201ec00), %g1 * 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) { 2003d90: 80 a6 20 00 cmp %i0, 0 2003d94: 02 80 00 04 be 2003da4 2003d98: f2 20 60 e8 st %i1, [ %g1 + 0xe8 ] } starting_address = (void *)uaddress; } return starting_address; } 2003d9c: 81 c7 e0 08 ret 2003da0: 81 e8 00 00 restore * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 2003da4: 7f ff f5 a0 call 2001424 2003da8: 90 10 00 19 mov %i1, %o0 if (uaddress == (uintptr_t) -1) { 2003dac: 80 a2 3f ff cmp %o0, -1 2003db0: 02 80 00 08 be 2003dd0 <== ALWAYS TAKEN 2003db4: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003db8: 02 80 00 04 be 2003dc8 <== NOT EXECUTED 2003dbc: 01 00 00 00 nop <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 2003dc0: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003dc4: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 2003dc8: 81 c7 e0 08 ret <== NOT EXECUTED 2003dcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003dd0: 40 00 11 b3 call 200849c 2003dd4: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 0200efa8 : */ static void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 200efa8: 9d e3 bf a0 save %sp, -96, %sp /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN 200efb4: d0 06 00 00 ld [ %i0 ], %o0 200efb8: ba 10 00 08 mov %o0, %i5 200efbc: b8 10 20 00 clr %i4 if ( b[i] ) { 200efc0: d0 07 40 00 ld [ %i5 ], %o0 200efc4: 80 a2 20 00 cmp %o0, 0 200efc8: 02 80 00 05 be 200efdc 200efcc: b8 07 20 01 inc %i4 memfile_free_block( b[i] ); 200efd0: 7f ff ff ed call 200ef84 200efd4: 01 00 00 00 nop b[i] = 0; 200efd8: c0 27 40 00 clr [ %i5 ] /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 200efe4: ba 07 60 04 add %i5, 4, %i5 200efe8: d0 06 00 00 ld [ %i0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 200efec: 7f ff ff e6 call 200ef84 200eff0: 01 00 00 00 nop *block_table = 0; 200eff4: c0 26 00 00 clr [ %i0 ] } 200eff8: 81 c7 e0 08 ret 200effc: 81 e8 00 00 restore =============================================================================== 0200f5dc : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200f5dc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200f5e0: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 * 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 ) 200f5e4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200f5e8: 80 a0 40 19 cmp %g1, %i1 200f5ec: 06 80 00 13 bl 200f638 <== NEVER TAKEN 200f5f0: 90 10 00 1d mov %i5, %o0 200f5f4: 22 80 00 0d be,a 200f628 <== ALWAYS TAKEN 200f5f8: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 /* * 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; 200f5fc: f2 27 60 50 st %i1, [ %i5 + 0x50 ] <== NOT EXECUTED 200f600: f4 27 60 54 st %i2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200f604: f2 26 20 08 st %i1, [ %i0 + 8 ] 200f608: f4 26 20 0c st %i2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200f60c: 90 07 bf f8 add %fp, -8, %o0 200f610: 7f ff d0 b5 call 20038e4 200f614: 92 10 20 00 clr %o1 200f618: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f61c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200f620: 81 c7 e0 08 ret 200f624: 91 e8 20 00 restore %g0, 0, %o0 * 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 ) 200f628: 80 a0 40 1a cmp %g1, %i2 200f62c: 3a bf ff f5 bcc,a 200f600 200f630: f2 27 60 50 st %i1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200f634: 90 10 00 1d mov %i5, %o0 200f638: 92 10 00 19 mov %i1, %o1 200f63c: 7f ff fe db call 200f1a8 200f640: 94 10 00 1a mov %i2, %o2 200f644: 81 c7 e0 08 ret 200f648: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200f64c : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 200f64c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200f650: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200f654: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { 200f658: c2 00 40 00 ld [ %g1 ], %g1 200f65c: 80 a0 60 05 cmp %g1, 5 200f660: 02 80 00 0f be 200f69c 200f664: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 200f668: 90 10 00 1d mov %i5, %o0 200f66c: 92 10 00 02 mov %g2, %o1 200f670: 7f ff fe ce call 200f1a8 200f674: 94 10 00 03 mov %g3, %o2 200f678: 80 a2 20 00 cmp %o0, 0 200f67c: 12 80 00 19 bne 200f6e0 200f680: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 200f684: d8 1f 60 50 ldd [ %i5 + 0x50 ], %o4 200f688: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 200f68c: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 200f690: b0 10 00 02 mov %g2, %i0 200f694: 81 c7 e0 08 ret 200f698: 93 e8 00 03 restore %g0, %g3, %o1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 200f69c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200f6a0: 80 a0 80 01 cmp %g2, %g1 200f6a4: 14 80 00 08 bg 200f6c4 <== NEVER TAKEN 200f6a8: c8 07 60 54 ld [ %i5 + 0x54 ], %g4 200f6ac: 80 a0 80 01 cmp %g2, %g1 200f6b0: 32 bf ff f9 bne,a 200f694 <== NEVER TAKEN 200f6b4: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 200f6b8: 80 a0 c0 04 cmp %g3, %g4 200f6bc: 28 bf ff f6 bleu,a 200f694 <== ALWAYS TAKEN 200f6c0: b0 10 00 02 mov %g2, %i0 iop->offset = the_jnode->info.linearfile.size; 200f6c4: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200f6c8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 200f6cc: c8 26 20 14 st %g4, [ %i0 + 0x14 ] <== NOT EXECUTED 200f6d0: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 200f6d4: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 200f6d8: 81 c7 e0 08 ret <== NOT EXECUTED 200f6dc: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 200f6e0: 40 00 03 d2 call 2010628 <__errno> 200f6e4: 01 00 00 00 nop 200f6e8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 200f6ec: 82 10 20 1c mov 0x1c, %g1 200f6f0: 84 10 a3 ff or %g2, 0x3ff, %g2 200f6f4: c2 22 00 00 st %g1, [ %o0 ] 200f6f8: 10 bf ff e6 b 200f690 200f6fc: 86 10 00 02 mov %g2, %g3 =============================================================================== 0200f524 : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200f524: 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)) 200f528: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200f52c: ba 10 00 18 mov %i0, %i5 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200f530: 80 88 62 04 btst 0x204, %g1 200f534: 02 80 00 07 be 200f550 200f538: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 200f53c: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 200f540: c4 00 80 00 ld [ %g2 ], %g2 200f544: 80 a0 a0 05 cmp %g2, 5 200f548: 22 80 00 0c be,a 200f578 <== NEVER TAKEN 200f54c: d8 07 20 54 ld [ %i4 + 0x54 ], %o4 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200f550: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200f554: 80 88 62 00 btst 0x200, %g1 200f558: 22 80 00 05 be,a 200f56c 200f55c: c4 3f 60 08 std %g2, [ %i5 + 8 ] iop->offset = the_jnode->info.file.size; 200f560: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] 200f564: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 200f568: c4 3f 60 08 std %g2, [ %i5 + 8 ] return 0; 200f56c: b0 10 20 00 clr %i0 } 200f570: 81 c7 e0 08 ret 200f574: 81 e8 00 00 restore * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 200f578: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 200f57c: 03 00 80 72 sethi %hi(0x201c800), %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200f580: c0 27 20 50 clr [ %i4 + 0x50 ] <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 200f584: 82 10 62 5c or %g1, 0x25c, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200f588: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200f58c: c0 27 20 58 clr [ %i4 + 0x58 ] <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 200f590: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 200f594: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200f598: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200f59c: 12 80 00 06 bne 200f5b4 <== NOT EXECUTED 200f5a0: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED 200f5a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 200f5a8: 84 10 20 00 clr %g2 <== NOT EXECUTED 200f5ac: 10 bf ff ea b 200f554 <== NOT EXECUTED 200f5b0: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200f5b4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200f5b8: 92 10 20 00 clr %o1 <== NOT EXECUTED 200f5bc: 94 10 20 00 clr %o2 <== NOT EXECUTED 200f5c0: 7f ff ff 55 call 200f314 <== NOT EXECUTED 200f5c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f5c8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200f5cc: 02 bf ff e9 be 200f570 <== NOT EXECUTED 200f5d0: 01 00 00 00 nop <== NOT EXECUTED 200f5d4: 10 bf ff df b 200f550 <== NOT EXECUTED 200f5d8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED =============================================================================== 02003e48 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003e48: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; if ( 2003e4c: 80 a6 e0 01 cmp %i3, 1 2003e50: 18 80 00 92 bgu 2004098 2003e54: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 2003e58: 40 00 23 73 call 200cc24 2003e5c: 90 10 00 1a mov %i2, %o0 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 2003e60: a0 92 20 00 orcc %o0, 0, %l0 2003e64: 02 80 00 bc be 2004154 2003e68: 80 a6 60 00 cmp %i1, 0 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2003e6c: 02 80 00 87 be 2004088 2003e70: 90 10 00 19 mov %i1, %o0 } return rv; } int mount( 2003e74: 40 00 37 85 call 2011c88 2003e78: aa 10 00 19 mov %i1, %l5 2003e7c: a6 02 20 01 add %o0, 1, %l3 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; 2003e80: 40 00 37 82 call 2011c88 2003e84: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003e88: a2 10 20 00 clr %l1 2003e8c: 80 a6 20 00 cmp %i0, 0 2003e90: 02 80 00 05 be 2003ea4 2003e94: a8 10 00 08 mov %o0, %l4 2003e98: 40 00 37 7c call 2011c88 2003e9c: 90 10 00 18 mov %i0, %o0 2003ea0: a2 02 20 01 add %o0, 1, %l1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003ea4: 92 04 c0 14 add %l3, %l4, %o1 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003ea8: 90 10 20 01 mov 1, %o0 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; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003eac: 92 02 60 8d add %o1, 0x8d, %o1 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003eb0: 7f ff fd b4 call 2003580 2003eb4: 92 02 40 11 add %o1, %l1, %o1 if ( mt_entry != NULL ) { 2003eb8: ba 92 20 00 orcc %o0, 0, %i5 2003ebc: 02 80 00 6d be 2004070 <== NEVER TAKEN 2003ec0: a4 07 60 8c add %i5, 0x8c, %l2 rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 2003ec4: 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; 2003ec8: a8 05 20 01 inc %l4 rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 2003ecc: 90 10 00 12 mov %l2, %o0 2003ed0: 40 00 34 32 call 2010f98 2003ed4: 94 10 00 14 mov %l4, %o2 mt_entry->type = str; str += filesystemtype_size; 2003ed8: b4 04 80 14 add %l2, %l4, %i2 memcpy( str, source_or_null, source_size ); 2003edc: 92 10 00 18 mov %i0, %o1 2003ee0: 94 10 00 11 mov %l1, %o2 2003ee4: 90 10 00 1a mov %i2, %o0 2003ee8: 40 00 34 2c call 2010f98 2003eec: e4 27 60 5c st %l2, [ %i5 + 0x5c ] mt_entry->dev = str; str += source_size; 2003ef0: a2 06 80 11 add %i2, %l1, %l1 memcpy( str, target, target_size ); 2003ef4: 92 10 00 15 mov %l5, %o1 2003ef8: 94 10 00 13 mov %l3, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003efc: f4 27 60 60 st %i2, [ %i5 + 0x60 ] str += source_size; memcpy( str, target, target_size ); 2003f00: 40 00 34 26 call 2010f98 2003f04: 90 10 00 11 mov %l1, %o0 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003f08: 82 10 20 01 mov 1, %g1 + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = 2003f0c: b4 07 60 64 add %i5, 0x64, %i2 mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003f10: 94 10 20 30 mov 0x30, %o2 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003f14: c2 2f 60 1c stb %g1, [ %i5 + 0x1c ] memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2003f18: e2 27 60 58 st %l1, [ %i5 + 0x58 ] str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 2003f1c: f4 27 60 18 st %i2, [ %i5 + 0x18 ] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003f20: 90 07 60 28 add %i5, 0x28, %o0 2003f24: 13 00 80 71 sethi %hi(0x201c400), %o1 2003f28: 40 00 34 1c call 2010f98 2003f2c: 92 12 62 6c or %o1, 0x26c, %o1 ! 201c66c mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003f30: 82 10 20 01 mov 1, %g1 void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 2003f34: 90 07 60 08 add %i5, 8, %o0 2003f38: 92 10 00 1a mov %i2, %o1 2003f3c: 94 10 20 01 mov 1, %o2 2003f40: 96 10 20 28 mov 0x28, %o3 2003f44: c2 27 60 80 st %g1, [ %i5 + 0x80 ] 2003f48: 40 00 12 42 call 2008850 <_Chain_Initialize> 2003f4c: fa 27 60 7c st %i5, [ %i5 + 0x7c ] ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 2003f50: 90 10 00 1d mov %i5, %o0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003f54: f6 2f 60 1d stb %i3, [ %i5 + 0x1d ] rv = (*fsmount_me_h)( mt_entry, data ); 2003f58: 9f c4 00 00 call %l0 2003f5c: 92 10 00 1c mov %i4, %o1 if ( rv == 0 ) { 2003f60: b0 92 20 00 orcc %o0, 0, %i0 2003f64: 12 80 00 30 bne 2004024 2003f68: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 2003f6c: 02 80 00 51 be 20040b0 2003f70: 92 10 00 19 mov %i1, %o1 { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 2003f74: 94 10 20 1f mov 0x1f, %o2 2003f78: 40 00 03 6c call 2004d28 2003f7c: 90 07 bf a8 add %fp, -88, %o0 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { return (*loc->ops->are_nodes_equal_h)( 2003f80: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 loc, &loc->mt_entry->mt_fs_root->location 2003f84: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { return (*loc->ops->are_nodes_equal_h)( 2003f88: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2003f8c: 9f c0 40 00 call %g1 2003f90: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_root( currentloc ) ) { 2003f94: 80 8a 20 ff btst 0xff, %o0 2003f98: 12 80 00 6a bne 2004140 2003f9c: 92 07 bf c0 add %fp, -64, %o1 static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( 2003fa0: 40 00 04 17 call 2004ffc 2003fa4: 90 07 bf e4 add %fp, -28, %o0 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 2003fa8: 40 00 04 9d call 200521c 2003fac: 90 07 bf e4 add %fp, -28, %o0 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003fb0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( !rtems_filesystem_location_is_root( currentloc ) ) { rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 2003fb4: b8 10 00 08 mov %o0, %i4 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003fb8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); mt_entry->mt_point_node = mt_point_node; 2003fbc: d0 27 60 14 st %o0, [ %i5 + 0x14 ] rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003fc0: 9f c0 40 00 call %g1 2003fc4: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 2003fc8: b0 92 20 00 orcc %o0, 0, %i0 2003fcc: 22 80 00 1a be,a 2004034 2003fd0: 39 00 80 7a sethi %hi(0x201e800), %i4 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 2003fd4: 40 00 04 3f call 20050d0 2003fd8: 90 10 00 1c mov %i4, %o0 } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2003fdc: 40 00 03 59 call 2004d40 2003fe0: 90 07 bf a8 add %fp, -88, %o0 rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 2003fe4: 80 a6 20 00 cmp %i0, 0 2003fe8: 32 80 00 0b bne,a 2004014 2003fec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 errno = EINVAL; rv = -1; } return rv; } 2003ff0: 81 c7 e0 08 ret 2003ff4: 81 e8 00 00 restore rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 2003ff8: 40 00 31 8c call 2010628 <__errno> <== NOT EXECUTED 2003ffc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004000: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2004004: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2004008: 40 00 0f 93 call 2007e54 <== NOT EXECUTED 200400c: d0 07 20 c0 ld [ %i4 + 0xc0 ], %o0 <== NOT EXECUTED } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->mt_fs_root->location.ops->fsunmount_me_h)( mt_entry ); 2004010: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED 2004014: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2004018: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 200401c: 9f c0 40 00 call %g1 2004020: 90 10 00 1d mov %i5, %o0 } } if ( rv != 0 ) { free( mt_entry ); 2004024: 7f ff fe 06 call 200383c 2004028: 90 10 00 1d mov %i5, %o0 200402c: 81 c7 e0 08 ret 2004030: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2004034: d0 07 20 c0 ld [ %i4 + 0xc0 ], %o0 2004038: 92 10 20 00 clr %o1 200403c: 40 00 0f 3c call 2007d2c 2004040: 94 10 20 00 clr %o2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2004044: d0 07 20 c0 ld [ %i4 + 0xc0 ], %o0 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2004048: 03 00 80 77 sethi %hi(0x201dc00), %g1 200404c: 82 10 62 44 or %g1, 0x244, %g1 ! 201de44 2004050: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2004054: 86 00 60 04 add %g1, 4, %g3 2004058: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 200405c: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2004060: fa 20 80 00 st %i5, [ %g2 ] 2004064: 40 00 0f 7c call 2007e54 2004068: c4 27 60 04 st %g2, [ %i5 + 4 ] 200406c: 30 bf ff dc b,a 2003fdc } } else { errno = ENOMEM; 2004070: 40 00 31 6e call 2010628 <__errno> <== NOT EXECUTED 2004074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004078: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200407c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004080: 81 c7 e0 08 ret <== NOT EXECUTED 2004084: 81 e8 00 00 restore <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2004088: 2b 00 80 71 sethi %hi(0x201c400), %l5 200408c: a6 10 20 02 mov 2, %l3 2004090: 10 bf ff 7c b 2003e80 2004094: aa 15 62 68 or %l5, 0x268, %l5 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 2004098: 40 00 31 64 call 2010628 <__errno> 200409c: b0 10 3f ff mov -1, %i0 20040a0: 82 10 20 16 mov 0x16, %g1 20040a4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 20040a8: 81 c7 e0 08 ret 20040ac: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 20040b0: 39 00 80 7a sethi %hi(0x201e800), %i4 20040b4: d0 07 20 c0 ld [ %i4 + 0xc0 ], %o0 ! 201e8c0 20040b8: 92 10 20 00 clr %o1 20040bc: 40 00 0f 1c call 2007d2c 20040c0: 94 10 20 00 clr %o2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20040c4: 03 00 80 77 sethi %hi(0x201dc00), %g1 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 20040c8: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 201de44 20040cc: 82 10 62 44 or %g1, 0x244, %g1 20040d0: 86 00 60 04 add %g1, 4, %g3 20040d4: 80 a0 80 03 cmp %g2, %g3 20040d8: 12 bf ff c8 bne 2003ff8 <== NEVER TAKEN 20040dc: 01 00 00 00 nop Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 20040e0: c6 00 60 08 ld [ %g1 + 8 ], %g3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 20040e4: d0 07 20 c0 ld [ %i4 + 0xc0 ], %o0 the_node->next = tail; 20040e8: c4 27 40 00 st %g2, [ %i5 ] tail->previous = the_node; 20040ec: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 20040f0: fa 20 c0 00 st %i5, [ %g3 ] 20040f4: 40 00 0f 58 call 2007e54 20040f8: c6 27 60 04 st %g3, [ %i5 + 4 ] } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 20040fc: ba 07 60 18 add %i5, 0x18, %i5 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 2004100: 40 00 04 14 call 2005150 2004104: 90 10 00 1d mov %i5, %o0 2004108: b6 10 00 08 mov %o0, %i3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 200410c: 40 00 04 11 call 2005150 2004110: 90 10 00 1d mov %i5, %o0 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2004114: 39 00 80 77 sethi %hi(0x201dc00), %i4 rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 2004118: ba 10 00 08 mov %o0, %i5 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 200411c: d0 07 22 64 ld [ %i4 + 0x264 ], %o0 2004120: 92 10 00 1b mov %i3, %o1 2004124: 40 00 04 01 call 2005128 2004128: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 200412c: d0 07 22 64 ld [ %i4 + 0x264 ], %o0 2004130: 40 00 03 fe call 2005128 2004134: 92 10 00 1d mov %i5, %o1 2004138: 81 c7 e0 08 ret 200413c: 81 e8 00 00 restore rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 2004140: 90 07 bf a8 add %fp, -88, %o0 2004144: 92 10 20 10 mov 0x10, %o1 2004148: 40 00 02 30 call 2004a08 200414c: b0 10 3f ff mov -1, %i0 2004150: 30 bf ff a3 b,a 2003fdc } else { errno = ENOMEM; rv = -1; } } else { errno = EINVAL; 2004154: 40 00 31 35 call 2010628 <__errno> 2004158: b0 10 3f ff mov -1, %i0 200415c: 82 10 20 16 mov 0x16, %g1 2004160: c2 22 00 00 st %g1, [ %o0 ] 2004164: 81 c7 e0 08 ret 2004168: 81 e8 00 00 restore =============================================================================== 02009438 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2009438: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 200943c: 90 96 60 00 orcc %i1, 0, %o0 2009440: 02 80 00 0b be 200946c 2009444: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2009448: 40 00 02 fd call 200a03c 200944c: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 2009450: 82 92 20 00 orcc %o0, 0, %g1 2009454: 02 80 00 04 be 2009464 <== ALWAYS TAKEN 2009458: 01 00 00 00 nop } else { errno = EINVAL; } return rv; } 200945c: 81 c7 e0 08 ret 2009460: 91 e8 00 01 restore %g0, %g1, %o0 int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 2009464: 40 00 00 08 call 2009484 2009468: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 200946c: 40 00 66 e9 call 2023010 <__errno> 2009470: 01 00 00 00 nop 2009474: 84 10 20 16 mov 0x16, %g2 ! 16 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2009478: 82 10 3f ff mov -1, %g1 options, data ); } } else { errno = EINVAL; 200947c: 10 bf ff f8 b 200945c 2009480: c4 22 00 00 st %g2, [ %o0 ] =============================================================================== 02007f20 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 2007f20: 9d e3 bf 88 save %sp, -120, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2007f24: 03 00 80 8d sethi %hi(0x2023400), %g1 2007f28: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2023540 <_Thread_Dispatch_disable_level> size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 2007f2c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2007f30: 84 00 a0 01 inc %g2 2007f34: c4 20 61 40 st %g2, [ %g1 + 0x140 ] return _Thread_Dispatch_disable_level; 2007f38: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 2007f3c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2007f40: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2007f44: fa 27 a0 58 st %i5, [ %fp + 0x58 ] Objects_Locations location; size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 2007f48: a0 8e 62 00 andcc %i1, 0x200, %l0 2007f4c: 12 80 00 36 bne 2008024 2007f50: b4 10 20 00 clr %i2 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 2007f54: 39 00 80 8e sethi %hi(0x2023800), %i4 2007f58: 40 00 0c 0a call 200af80 <_Objects_Allocate> 2007f5c: 90 17 22 4c or %i4, 0x24c, %o0 ! 2023a4c <_POSIX_Message_queue_Information_fds> attr = va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 2007f60: ba 92 20 00 orcc %o0, 0, %i5 2007f64: 02 80 00 39 be 2008048 <== NEVER TAKEN 2007f68: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 2007f6c: f2 27 60 14 st %i1, [ %i5 + 0x14 ] const char *name, Objects_Id *id, size_t *len ) { return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len ); 2007f70: 37 00 80 8e sethi %hi(0x2023800), %i3 2007f74: 92 10 00 18 mov %i0, %o1 2007f78: 90 16 e0 c0 or %i3, 0xc0, %o0 2007f7c: 94 07 bf f0 add %fp, -16, %o2 2007f80: 40 00 01 45 call 2008494 <_POSIX_Name_to_id> 2007f84: 96 07 bf fc add %fp, -4, %o3 * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 2007f88: a2 92 20 00 orcc %o0, 0, %l1 2007f8c: 22 80 00 0f be,a 2007fc8 2007f90: b2 0e 6a 00 and %i1, 0xa00, %i1 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 2007f94: 80 a4 60 02 cmp %l1, 2 2007f98: 02 80 00 3f be 2008094 2007f9c: 80 a4 20 00 cmp %l0, 0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 2007fa0: 90 17 22 4c or %i4, 0x24c, %o0 2007fa4: 40 00 0c e1 call 200b328 <_Objects_Free> 2007fa8: 92 10 00 1d mov %i5, %o1 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 2007fac: 40 00 11 5a call 200c514 <_Thread_Enable_dispatch> 2007fb0: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 2007fb4: 40 00 29 75 call 2012588 <__errno> 2007fb8: 01 00 00 00 nop 2007fbc: e2 22 00 00 st %l1, [ %o0 ] 2007fc0: 81 c7 e0 08 ret 2007fc4: 81 e8 00 00 restore } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 2007fc8: 80 a6 6a 00 cmp %i1, 0xa00 2007fcc: 02 80 00 27 be 2008068 2007fd0: d2 07 bf f0 ld [ %fp + -16 ], %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 2007fd4: 94 07 bf f8 add %fp, -8, %o2 2007fd8: 40 00 0d 35 call 200b4ac <_Objects_Get> 2007fdc: 90 16 e0 c0 or %i3, 0xc0, %o0 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 2007fe0: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 2007fe4: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2007fe8: 84 00 a0 01 inc %g2 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007fec: b8 17 22 4c or %i4, 0x24c, %i4 2007ff0: c4 22 20 18 st %g2, [ %o0 + 0x18 ] 2007ff4: c4 07 20 1c ld [ %i4 + 0x1c ], %g2 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 2007ff8: d0 27 bf f4 st %o0, [ %fp + -12 ] the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 2007ffc: d0 27 60 10 st %o0, [ %i5 + 0x10 ] 2008000: 83 28 60 02 sll %g1, 2, %g1 2008004: fa 20 80 01 st %i5, [ %g2 + %g1 ] _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 2008008: 40 00 11 43 call 200c514 <_Thread_Enable_dispatch> 200800c: c0 27 60 0c clr [ %i5 + 0xc ] _Thread_Enable_dispatch(); 2008010: 40 00 11 41 call 200c514 <_Thread_Enable_dispatch> 2008014: 01 00 00 00 nop return (mqd_t)the_mq_fd->Object.id; 2008018: f0 07 60 08 ld [ %i5 + 8 ], %i0 200801c: 81 c7 e0 08 ret 2008020: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = va_arg( arg, mode_t ); attr = va_arg( arg, struct mq_attr * ); 2008024: 82 07 a0 54 add %fp, 0x54, %g1 2008028: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 200802c: c2 27 bf ec st %g1, [ %fp + -20 ] */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 2008030: 39 00 80 8e sethi %hi(0x2023800), %i4 2008034: 40 00 0b d3 call 200af80 <_Objects_Allocate> 2008038: 90 17 22 4c or %i4, 0x24c, %o0 ! 2023a4c <_POSIX_Message_queue_Information_fds> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200803c: ba 92 20 00 orcc %o0, 0, %i5 2008040: 32 bf ff cc bne,a 2007f70 2008044: f2 27 60 14 st %i1, [ %i5 + 0x14 ] _Thread_Enable_dispatch(); 2008048: 40 00 11 33 call 200c514 <_Thread_Enable_dispatch> 200804c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENFILE ); 2008050: 40 00 29 4e call 2012588 <__errno> 2008054: 01 00 00 00 nop 2008058: 82 10 20 17 mov 0x17, %g1 ! 17 200805c: c2 22 00 00 st %g1, [ %o0 ] 2008060: 81 c7 e0 08 ret 2008064: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 2008068: 90 17 22 4c or %i4, 0x24c, %o0 200806c: 40 00 0c af call 200b328 <_Objects_Free> 2008070: 92 10 00 1d mov %i5, %o1 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 2008074: 40 00 11 28 call 200c514 <_Thread_Enable_dispatch> 2008078: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 200807c: 40 00 29 43 call 2012588 <__errno> 2008080: 01 00 00 00 nop 2008084: 82 10 20 11 mov 0x11, %g1 ! 11 2008088: c2 22 00 00 st %g1, [ %o0 ] 200808c: 81 c7 e0 08 ret 2008090: 81 e8 00 00 restore if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 2008094: 02 bf ff c4 be 2007fa4 2008098: 90 17 22 4c or %i4, 0x24c, %o0 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 200809c: d2 07 bf fc ld [ %fp + -4 ], %o1 20080a0: 90 10 00 18 mov %i0, %o0 20080a4: 94 10 20 01 mov 1, %o2 20080a8: 96 10 00 1a mov %i2, %o3 20080ac: 40 00 1c 28 call 200f14c <_POSIX_Message_queue_Create_support> 20080b0: 98 07 bf f4 add %fp, -12, %o4 ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 20080b4: 80 a2 3f ff cmp %o0, -1 20080b8: 02 80 00 0d be 20080ec 20080bc: c6 07 bf f4 ld [ %fp + -12 ], %g3 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 20080c0: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20080c4: b8 17 22 4c or %i4, 0x24c, %i4 20080c8: c4 07 20 1c ld [ %i4 + 0x1c ], %g2 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 20080cc: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 20080d0: 83 28 60 02 sll %g1, 2, %g1 20080d4: fa 20 80 01 st %i5, [ %g2 + %g1 ] &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 20080d8: 40 00 11 0f call 200c514 <_Thread_Enable_dispatch> 20080dc: c0 27 60 0c clr [ %i5 + 0xc ] return (mqd_t) the_mq_fd->Object.id; 20080e0: f0 07 60 08 ld [ %i5 + 8 ], %i0 } 20080e4: 81 c7 e0 08 ret 20080e8: 81 e8 00 00 restore 20080ec: 90 17 22 4c or %i4, 0x24c, %o0 20080f0: 92 10 00 1d mov %i5, %o1 20080f4: 40 00 0c 8d call 200b328 <_Objects_Free> 20080f8: b0 10 3f ff mov -1, %i0 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 20080fc: 40 00 11 06 call 200c514 <_Thread_Enable_dispatch> 2008100: 01 00 00 00 nop return (mqd_t) -1; 2008104: 81 c7 e0 08 ret 2008108: 81 e8 00 00 restore =============================================================================== 02038ae0 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2038ae0: 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; 2038ae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 2038ae8: c0 27 bf f8 clr [ %fp + -8 ] 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; 2038aec: e0 00 60 20 ld [ %g1 + 0x20 ], %l0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 2038af0: c0 37 bf fc clrh [ %fp + -4 ] fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 2038af4: 82 10 3f ff mov -1, %g1 uint16_t date = 0; 2038af8: 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; 2038afc: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 2038b00: c0 27 bf ec clr [ %fp + -20 ] dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 2038b04: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2038b08: c2 27 bf f4 st %g1, [ %fp + -12 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 2038b0c: c0 27 bf a8 clr [ %fp + -88 ] 2038b10: c0 27 bf ac clr [ %fp + -84 ] 2038b14: c0 27 bf b0 clr [ %fp + -80 ] 2038b18: c0 27 bf b4 clr [ %fp + -76 ] 2038b1c: c0 27 bf b8 clr [ %fp + -72 ] 2038b20: c0 27 bf bc clr [ %fp + -68 ] 2038b24: c0 27 bf c0 clr [ %fp + -64 ] 2038b28: c0 27 bf c4 clr [ %fp + -60 ] memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2038b2c: c0 27 bf 68 clr [ %fp + -152 ] 2038b30: c0 27 bf 6c clr [ %fp + -148 ] 2038b34: c0 27 bf 70 clr [ %fp + -144 ] 2038b38: c0 27 bf 74 clr [ %fp + -140 ] 2038b3c: c0 27 bf 78 clr [ %fp + -136 ] 2038b40: c0 27 bf 7c clr [ %fp + -132 ] 2038b44: c0 27 bf 80 clr [ %fp + -128 ] 2038b48: c0 27 bf 84 clr [ %fp + -124 ] 2038b4c: c0 27 bf 88 clr [ %fp + -120 ] 2038b50: c0 27 bf 8c clr [ %fp + -116 ] 2038b54: c0 27 bf 90 clr [ %fp + -112 ] 2038b58: c0 27 bf 94 clr [ %fp + -108 ] 2038b5c: c0 27 bf 98 clr [ %fp + -104 ] 2038b60: c0 27 bf 9c clr [ %fp + -100 ] 2038b64: c0 27 bf a0 clr [ %fp + -96 ] 2038b68: c0 27 bf a4 clr [ %fp + -92 ] msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2038b6c: 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); if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 2038b70: 80 a6 e1 04 cmp %i3, 0x104 2038b74: 14 80 00 cc bg 2038ea4 <== NEVER TAKEN 2038b78: e2 06 20 08 ld [ %i0 + 8 ], %l1 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 2038b7c: 90 10 00 1a mov %i2, %o0 2038b80: 92 10 00 1b mov %i3, %o1 2038b84: 94 07 bf a8 add %fp, -88, %o2 2038b88: 40 00 01 2a call 2039030 2038b8c: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 2038b90: a4 92 20 00 orcc %o0, 0, %l2 2038b94: 02 80 00 ca be 2038ebc <== NEVER TAKEN 2038b98: 90 10 20 00 clr %o0 rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 2038b9c: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2038ba0: 40 00 70 86 call 2054db8