=============================================================================== 0200b8f8 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200b8f8: c2 02 00 00 ld [ %o0 ], %g1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200b8fc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 switch( node->type ) { 200b900: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200b904: 80 a0 60 07 cmp %g1, 7 200b908: 18 80 00 0a bgu 200b930 <== NEVER TAKEN 200b90c: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b910: 83 28 60 02 sll %g1, 2, %g1 200b914: 07 00 80 2e sethi %hi(0x200b800), %g3 200b918: 86 10 e0 18 or %g3, 0x18, %g3 ! 200b818 200b91c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 200b920: 81 c0 40 00 jmp %g1 200b924: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200b928: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200b92c: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 200b930: 81 c3 e0 08 retl 200b934: 90 10 20 00 clr %o0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200b938: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200b93c: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 200b940: 81 c3 e0 08 retl 200b944: 90 10 20 00 clr %o0 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200b948: 03 00 80 75 sethi %hi(0x201d400), %g1 200b94c: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 200b950: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 200b954: 81 c3 e0 08 retl 200b958: 90 10 20 00 clr %o0 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200b95c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 200b960: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED break; } return 0; } 200b964: 81 c3 e0 08 retl <== NOT EXECUTED 200b968: 90 10 20 00 clr %o0 <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200b96c: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200b970: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <== NOT EXECUTED 200b974: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED loc->handlers = fs_info->fifo_handlers; break; } return 0; } 200b978: 81 c3 e0 08 retl <== NOT EXECUTED 200b97c: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 0200b71c : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 200b71c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200b720: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200b724: 7f ff dd d0 call 2002e64 <== NOT EXECUTED 200b728: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED if ( !node ) 200b72c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED 200b730: 02 80 00 14 be 200b780 <== NOT EXECUTED 200b734: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200b738: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 200b73c: c2 37 60 34 sth %g1, [ %i5 + 0x34 ] <== NOT EXECUTED node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200b740: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 200b744: f0 27 60 4c st %i0, [ %i5 + 0x4c ] <== NOT EXECUTED strncpy( node->name, name, IMFS_NAME_MAX ); 200b748: 40 00 1d 6b call 2012cf4 <== NOT EXECUTED 200b74c: 90 07 60 0c add %i5, 0xc, %o0 <== NOT EXECUTED /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200b750: 40 00 06 0f call 200cf8c <== NOT EXECUTED 200b754: f4 27 60 30 st %i2, [ %i5 + 0x30 ] <== NOT EXECUTED node->st_gid = getegid(); 200b758: 40 00 06 09 call 200cf7c <== NOT EXECUTED 200b75c: d0 37 60 3c sth %o0, [ %i5 + 0x3c ] <== NOT EXECUTED #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b760: 92 10 20 00 clr %o1 <== NOT EXECUTED * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 200b764: d0 37 60 3e sth %o0, [ %i5 + 0x3e ] <== NOT EXECUTED #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b768: 7f ff df 0c call 2003398 <== NOT EXECUTED 200b76c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED node->stat_atime = (time_t) tv.tv_sec; 200b770: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200b774: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED node->stat_mtime = (time_t) tv.tv_sec; 200b778: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED node->stat_ctime = (time_t) tv.tv_sec; 200b77c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] <== NOT EXECUTED return node; } 200b780: 81 c7 e0 08 ret <== NOT EXECUTED 200b784: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED =============================================================================== 0200ca90 : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 200ca90: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 200ca94: 40 00 01 c7 call 200d1b0 200ca98: 90 10 00 18 mov %i0, %o0 200ca9c: 80 a2 20 00 cmp %o0, 0 200caa0: 12 80 00 14 bne 200caf0 200caa4: 01 00 00 00 nop 200caa8: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 200caac: 80 a0 60 00 cmp %g1, 0 200cab0: 12 80 00 10 bne 200caf0 200cab4: 01 00 00 00 nop if ( rtems_filesystem_current.node_access == jnode ) 200cab8: 03 00 80 7a sethi %hi(0x201e800), %g1 200cabc: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 200cac0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200cac4: 80 a0 80 18 cmp %g2, %i0 200cac8: 22 80 00 02 be,a 200cad0 200cacc: c0 20 60 04 clr [ %g1 + 4 ] rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 200cad0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200cad4: 80 a0 60 04 cmp %g1, 4 200cad8: 02 80 00 0c be 200cb08 <== NEVER TAKEN 200cadc: 80 a0 60 05 cmp %g1, 5 200cae0: 02 80 00 06 be 200caf8 <== NEVER TAKEN 200cae4: 01 00 00 00 nop break; default: break; } free( jnode ); 200cae8: 7f ff da 02 call 20032f0 200caec: 81 e8 00 00 restore 200caf0: 81 c7 e0 08 ret 200caf4: 81 e8 00 00 restore if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 200caf8: 40 00 0b 94 call 200f948 <== NOT EXECUTED 200cafc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED break; default: break; } free( jnode ); 200cb00: 7f ff d9 fc call 20032f0 <== NOT EXECUTED 200cb04: 81 e8 00 00 restore <== NOT EXECUTED switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 200cb08: 7f ff d9 fa call 20032f0 <== NOT EXECUTED 200cb0c: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 <== NOT EXECUTED break; default: break; } free( jnode ); 200cb10: 7f ff d9 f8 call 20032f0 <== NOT EXECUTED 200cb14: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b5a4 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200b5a4: 9d e3 bf 98 save %sp, -104, %sp IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 200b5a8: 80 a6 20 00 cmp %i0, 0 200b5ac: 02 80 00 3e be 200b6a4 <== NEVER TAKEN 200b5b0: ba 10 20 00 clr %i5 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 200b5b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 200b5b8: e0 06 00 00 ld [ %i0 ], %l0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200b5bc: 80 a6 60 07 cmp %i1, 7 200b5c0: 02 80 00 3b be 200b6ac 200b5c4: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200b5c8: 03 00 80 7a sethi %hi(0x201e800), %g1 200b5cc: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200b5d0: 90 10 20 01 mov 1, %o0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200b5d4: e2 00 60 2c ld [ %g1 + 0x2c ], %l1 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200b5d8: 7f ff de 23 call 2002e64 200b5dc: 92 10 20 68 mov 0x68, %o1 if ( !node ) 200b5e0: ba 92 20 00 orcc %o0, 0, %i5 200b5e4: 02 80 00 30 be 200b6a4 200b5e8: 82 10 20 01 mov 1, %g1 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200b5ec: 92 10 00 1a mov %i2, %o1 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 200b5f0: c2 37 60 34 sth %g1, [ %i5 + 0x34 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200b5f4: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 200b5f8: f2 27 60 4c st %i1, [ %i5 + 0x4c ] strncpy( node->name, name, IMFS_NAME_MAX ); 200b5fc: 40 00 1d be call 2012cf4 200b600: 90 07 60 0c add %i5, 0xc, %o0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200b604: b6 2e c0 11 andn %i3, %l1, %i3 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200b608: 40 00 06 61 call 200cf8c 200b60c: f6 27 60 30 st %i3, [ %i5 + 0x30 ] node->st_gid = getegid(); 200b610: 40 00 06 5b call 200cf7c 200b614: d0 37 60 3c sth %o0, [ %i5 + 0x3c ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b618: 92 10 20 00 clr %o1 * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 200b61c: d0 37 60 3e sth %o0, [ %i5 + 0x3e ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b620: 7f ff df 5e call 2003398 200b624: 90 07 bf f8 add %fp, -8, %o0 node->stat_atime = (time_t) tv.tv_sec; 200b628: c2 07 bf f8 ld [ %fp + -8 ], %g1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200b62c: 80 a6 60 01 cmp %i1, 1 /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 200b630: c2 27 60 40 st %g1, [ %i5 + 0x40 ] node->stat_mtime = (time_t) tv.tv_sec; 200b634: c2 27 60 44 st %g1, [ %i5 + 0x44 ] return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200b638: 02 80 00 24 be 200b6c8 200b63c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200b640: 80 a6 60 03 cmp %i1, 3 200b644: 02 80 00 0e be 200b67c 200b648: 80 a6 60 04 cmp %i1, 4 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200b64c: 02 80 00 0c be 200b67c 200b650: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 200b654: 02 80 00 27 be 200b6f0 200b658: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 200b65c: 02 80 00 21 be 200b6e0 200b660: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 200b664: 02 80 00 28 be 200b704 200b668: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { 200b66c: 22 80 00 06 be,a 200b684 <== ALWAYS TAKEN 200b670: c0 27 60 50 clr [ %i5 + 0x50 ] /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 200b674: 10 80 00 05 b 200b688 <== NOT EXECUTED 200b678: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; 200b67c: c2 07 00 00 ld [ %i4 ], %g1 200b680: c2 27 60 50 st %g1, [ %i5 + 0x50 ] /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 200b684: c2 06 20 04 ld [ %i0 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200b688: e0 27 60 08 st %l0, [ %i5 + 8 ] node->st_ino = ++fs_info->ino_count; 200b68c: 82 00 60 01 inc %g1 200b690: c2 26 20 04 st %g1, [ %i0 + 4 ] 200b694: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 200b698: 90 04 20 50 add %l0, 0x50, %o0 200b69c: 7f ff f1 b8 call 2007d7c <_Chain_Append> 200b6a0: 92 10 00 1d mov %i5, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200b6a4: 81 c7 e0 08 ret 200b6a8: 91 e8 00 1d restore %g0, %i5, %o0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200b6ac: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b6b0: 03 00 80 75 sethi %hi(0x201d400), %g1 200b6b4: 82 10 61 40 or %g1, 0x140, %g1 ! 201d540 200b6b8: 80 a0 80 01 cmp %g2, %g1 200b6bc: 12 bf ff c4 bne 200b5cc 200b6c0: 03 00 80 7a sethi %hi(0x201e800), %g1 200b6c4: 30 bf ff f8 b,a 200b6a4 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 ); 200b6c8: 82 07 60 50 add %i5, 0x50, %g1 200b6cc: 84 07 60 54 add %i5, 0x54, %g2 head->next = tail; head->previous = NULL; 200b6d0: c0 27 60 54 clr [ %i5 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200b6d4: c4 27 60 50 st %g2, [ %i5 + 0x50 ] head->previous = NULL; tail->previous = head; 200b6d8: 10 bf ff eb b 200b684 200b6dc: c2 27 60 58 st %g1, [ %i5 + 0x58 ] node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 200b6e0: c0 27 60 50 clr [ %i5 + 0x50 ] 200b6e4: c0 27 60 54 clr [ %i5 + 0x54 ] node->info.linearfile.direct = 0; 200b6e8: 10 bf ff e7 b 200b684 200b6ec: c0 27 60 58 clr [ %i5 + 0x58 ] } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 200b6f0: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 200b6f4: c2 07 20 04 ld [ %i4 + 4 ], %g1 } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 200b6f8: c4 27 60 50 st %g2, [ %i5 + 0x50 ] node->info.device.minor = info->device.minor; 200b6fc: 10 bf ff e2 b 200b684 200b700: c2 27 60 54 st %g1, [ %i5 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 200b704: c0 27 60 50 clr [ %i5 + 0x50 ] 200b708: c0 27 60 54 clr [ %i5 + 0x54 ] node->info.file.indirect = 0; 200b70c: c0 27 60 58 clr [ %i5 + 0x58 ] node->info.file.doubly_indirect = 0; 200b710: c0 27 60 5c clr [ %i5 + 0x5c ] node->info.file.triply_indirect = 0; 200b714: 10 bf ff dc b 200b684 200b718: c0 27 60 60 clr [ %i5 + 0x60 ] =============================================================================== 0200561c : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 200561c: 9d e3 bf 58 save %sp, -168, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2005620: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005624: f2 27 a0 48 st %i1, [ %fp + 0x48 ] RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 2005628: b0 06 20 54 add %i0, 0x54, %i0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200562c: c2 27 bf ec st %g1, [ %fp + -20 ] IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005630: 80 a0 40 18 cmp %g1, %i0 2005634: 02 80 00 2f be 20056f0 <== NEVER TAKEN 2005638: f0 27 bf cc st %i0, [ %fp + -52 ] for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 200563c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 2005640: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 2005644: 82 00 60 01 inc %g1 2005648: c2 27 bf dc st %g1, [ %fp + -36 ] 200564c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2005650: 3b 00 80 93 sethi %hi(0x2024c00), %i5 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2005654: 84 00 a0 02 add %g2, 2, %g2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2005658: ba 17 62 80 or %i5, 0x280, %i5 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 200565c: c4 27 bf e4 st %g2, [ %fp + -28 ] 2005660: ac 00 60 03 add %g1, 3, %l6 2005664: a6 00 60 04 add %g1, 4, %l3 2005668: a2 00 60 05 add %g1, 5, %l1 200566c: b0 00 60 06 add %g1, 6, %i0 2005670: b2 00 60 07 add %g1, 7, %i1 !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++ ) 2005674: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 2005678: 80 a0 a0 00 cmp %g2, 0 200567c: 06 80 00 10 bl 20056bc <== NEVER TAKEN 2005680: 01 00 00 00 nop 2005684: f4 07 a0 48 ld [ %fp + 0x48 ], %i2 2005688: 37 00 80 9b sethi %hi(0x2026c00), %i3 200568c: b8 10 20 00 clr %i4 2005690: b6 16 e1 e8 or %i3, 0x1e8, %i3 fprintf(stdout, "...." ); 2005694: c2 06 c0 00 ld [ %i3 ], %g1 2005698: 90 10 00 1d mov %i5, %o0 200569c: d6 00 60 08 ld [ %g1 + 8 ], %o3 20056a0: 92 10 20 01 mov 1, %o1 20056a4: 40 00 47 84 call 20174b4 20056a8: 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++ ) 20056ac: b8 07 20 01 inc %i4 20056b0: 80 a6 80 1c cmp %i2, %i4 20056b4: 36 bf ff f9 bge,a 2005698 <== NEVER TAKEN 20056b8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 20056bc: 7f ff ff 92 call 2005504 20056c0: d0 07 bf ec ld [ %fp + -20 ], %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 20056c4: c4 07 bf ec ld [ %fp + -20 ], %g2 20056c8: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 20056cc: 80 a0 60 01 cmp %g1, 1 20056d0: 22 80 00 0a be,a 20056f8 20056d4: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 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 ) { 20056d8: c2 07 bf ec ld [ %fp + -20 ], %g1 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20056dc: c4 07 bf cc ld [ %fp + -52 ], %g2 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 20056e0: c2 00 40 00 ld [ %g1 ], %g1 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20056e4: 80 a0 40 02 cmp %g1, %g2 20056e8: 12 bf ff e3 bne 2005674 20056ec: c2 27 bf ec st %g1, [ %fp + -20 ] 20056f0: 81 c7 e0 08 ret 20056f4: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 20056f8: 84 00 a0 54 add %g2, 0x54, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20056fc: c2 27 bf f4 st %g1, [ %fp + -12 ] for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2005700: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 2005704: c4 27 bf d0 st %g2, [ %fp + -48 ] 2005708: b6 00 60 08 add %g1, 8, %i3 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200570c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005710: 80 a0 40 02 cmp %g1, %g2 2005714: 02 bf ff f2 be 20056dc <== NEVER TAKEN 2005718: c2 07 bf ec ld [ %fp + -20 ], %g1 !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++ ) 200571c: c4 07 bf dc ld [ %fp + -36 ], %g2 2005720: 80 a0 a0 00 cmp %g2, 0 2005724: 06 80 00 10 bl 2005764 <== NEVER TAKEN 2005728: 01 00 00 00 nop 200572c: e0 07 bf dc ld [ %fp + -36 ], %l0 2005730: 35 00 80 9b sethi %hi(0x2026c00), %i2 2005734: b8 10 20 00 clr %i4 2005738: b4 16 a1 e8 or %i2, 0x1e8, %i2 fprintf(stdout, "...." ); 200573c: c2 06 80 00 ld [ %i2 ], %g1 2005740: 90 10 00 1d mov %i5, %o0 2005744: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005748: 92 10 20 01 mov 1, %o1 200574c: 40 00 47 5a call 20174b4 2005750: 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++ ) 2005754: b8 07 20 01 inc %i4 2005758: 80 a4 00 1c cmp %l0, %i4 200575c: 36 bf ff f9 bge,a 2005740 2005760: c2 06 80 00 ld [ %i2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2005764: 7f ff ff 68 call 2005504 2005768: d0 07 bf f4 ld [ %fp + -12 ], %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 200576c: c4 07 bf f4 ld [ %fp + -12 ], %g2 2005770: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 2005774: 80 a0 60 01 cmp %g1, 1 2005778: 22 80 00 0a be,a 20057a0 200577c: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 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 ) { 2005780: c4 07 bf f4 ld [ %fp + -12 ], %g2 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005784: c2 07 bf d0 ld [ %fp + -48 ], %g1 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005788: c4 00 80 00 ld [ %g2 ], %g2 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200578c: 80 a0 80 01 cmp %g2, %g1 2005790: 12 bf ff e3 bne 200571c 2005794: c4 27 bf f4 st %g2, [ %fp + -12 ] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005798: 10 bf ff d1 b 20056dc 200579c: c2 07 bf ec ld [ %fp + -20 ], %g1 20057a0: 84 00 a0 54 add %g2, 0x54, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20057a4: c2 27 bf f8 st %g1, [ %fp + -8 ] for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 20057a8: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 20057ac: c4 27 bf d8 st %g2, [ %fp + -40 ] 20057b0: 82 00 60 09 add %g1, 9, %g1 20057b4: c2 27 bf d4 st %g1, [ %fp + -44 ] IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20057b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 20057bc: 80 a0 40 02 cmp %g1, %g2 20057c0: 02 bf ff f1 be 2005784 20057c4: c4 07 bf f4 ld [ %fp + -12 ], %g2 !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++ ) 20057c8: c2 07 bf e4 ld [ %fp + -28 ], %g1 20057cc: 80 a0 60 00 cmp %g1, 0 20057d0: 06 80 00 10 bl 2005810 <== NEVER TAKEN 20057d4: 01 00 00 00 nop 20057d8: e0 07 bf e4 ld [ %fp + -28 ], %l0 20057dc: 35 00 80 9b sethi %hi(0x2026c00), %i2 20057e0: b8 10 20 00 clr %i4 20057e4: b4 16 a1 e8 or %i2, 0x1e8, %i2 fprintf(stdout, "...." ); 20057e8: c2 06 80 00 ld [ %i2 ], %g1 20057ec: 90 10 00 1d mov %i5, %o0 20057f0: d6 00 60 08 ld [ %g1 + 8 ], %o3 20057f4: 92 10 20 01 mov 1, %o1 20057f8: 40 00 47 2f call 20174b4 20057fc: 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++ ) 2005800: b8 07 20 01 inc %i4 2005804: 80 a4 00 1c cmp %l0, %i4 2005808: 36 bf ff f9 bge,a 20057ec 200580c: c2 06 80 00 ld [ %i2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2005810: 7f ff ff 3d call 2005504 2005814: d0 07 bf f8 ld [ %fp + -8 ], %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 2005818: c4 07 bf f8 ld [ %fp + -8 ], %g2 200581c: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 2005820: 80 a0 60 01 cmp %g1, 1 2005824: 22 80 00 0a be,a 200584c <== NEVER TAKEN 2005828: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED 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 ) { 200582c: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005830: c4 07 bf d8 ld [ %fp + -40 ], %g2 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005834: c2 00 40 00 ld [ %g1 ], %g1 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005838: 80 a0 40 02 cmp %g1, %g2 200583c: 12 bf ff e3 bne 20057c8 <== NEVER TAKEN 2005840: c2 27 bf f8 st %g1, [ %fp + -8 ] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005844: 10 bf ff d0 b 2005784 2005848: c4 07 bf f4 ld [ %fp + -12 ], %g2 200584c: 84 00 a0 54 add %g2, 0x54, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2005850: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 2005854: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005858: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200585c: 02 bf ff f4 be 200582c <== NOT EXECUTED 2005860: 29 00 80 9b sethi %hi(0x2026c00), %l4 <== NOT EXECUTED !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++ ) 2005864: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 2005868: 06 80 00 0e bl 20058a0 <== NOT EXECUTED 200586c: 01 00 00 00 nop <== NOT EXECUTED 2005870: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005874: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 2005878: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 200587c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005880: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005884: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2005888: 40 00 47 0b call 20174b4 <== NOT EXECUTED 200588c: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 2005890: b8 07 20 01 inc %i4 <== NOT EXECUTED 2005894: 80 a5 80 1c cmp %l6, %i4 <== NOT EXECUTED 2005898: 36 bf ff f9 bge,a 200587c <== NOT EXECUTED 200589c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 20058a0: 7f ff ff 19 call 2005504 <== NOT EXECUTED 20058a4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 20058a8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 20058ac: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 <== NOT EXECUTED 20058b0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20058b4: 22 80 00 0a be,a 20058dc <== NOT EXECUTED 20058b8: ee 00 a0 50 ld [ %g2 + 0x50 ], %l7 <== NOT EXECUTED 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 ) { 20058bc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20058c0: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 20058c4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20058c8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20058cc: 12 bf ff e6 bne 2005864 <== NOT EXECUTED 20058d0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 20058d4: 10 bf ff d7 b 2005830 <== NOT EXECUTED 20058d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 20058dc: 82 00 a0 54 add %g2, 0x54, %g1 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20058e0: 80 a5 c0 01 cmp %l7, %g1 <== NOT EXECUTED 20058e4: 02 bf ff f6 be 20058bc <== NOT EXECUTED 20058e8: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED 20058ec: ec 27 bf bc st %l6, [ %fp + -68 ] <== NOT EXECUTED !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++ ) 20058f0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 20058f4: 06 80 00 0e bl 200592c <== NOT EXECUTED 20058f8: 01 00 00 00 nop <== NOT EXECUTED 20058fc: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005900: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 2005904: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005908: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200590c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005910: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2005914: 40 00 46 e8 call 20174b4 <== NOT EXECUTED 2005918: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 200591c: b8 07 20 01 inc %i4 <== NOT EXECUTED 2005920: 80 a4 c0 1c cmp %l3, %i4 <== NOT EXECUTED 2005924: 36 bf ff f9 bge,a 2005908 <== NOT EXECUTED 2005928: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 200592c: 7f ff fe f6 call 2005504 <== NOT EXECUTED 2005930: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 2005934: c2 05 e0 4c ld [ %l7 + 0x4c ], %g1 <== NOT EXECUTED 2005938: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 200593c: 22 80 00 09 be,a 2005960 <== NOT EXECUTED 2005940: ec 05 e0 50 ld [ %l7 + 0x50 ], %l6 <== NOT EXECUTED 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 ) { 2005944: ee 05 c0 00 ld [ %l7 ], %l7 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005948: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 200594c: 80 a5 c0 02 cmp %l7, %g2 <== NOT EXECUTED 2005950: 12 bf ff e9 bne 20058f4 <== NOT EXECUTED 2005954: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 2005958: 10 bf ff d9 b 20058bc <== NOT EXECUTED 200595c: ec 07 bf bc ld [ %fp + -68 ], %l6 <== NOT EXECUTED 2005960: 84 05 e0 54 add %l7, 0x54, %g2 <== NOT EXECUTED 2005964: 80 a5 80 02 cmp %l6, %g2 <== NOT EXECUTED 2005968: 02 bf ff f7 be 2005944 <== NOT EXECUTED 200596c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED 2005970: ee 27 bf c4 st %l7, [ %fp + -60 ] <== NOT EXECUTED 2005974: e6 27 bf c0 st %l3, [ %fp + -64 ] <== NOT EXECUTED !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++ ) 2005978: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 200597c: 06 80 00 0e bl 20059b4 <== NOT EXECUTED 2005980: 01 00 00 00 nop <== NOT EXECUTED 2005984: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005988: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 200598c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005990: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005994: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005998: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 200599c: 40 00 46 c6 call 20174b4 <== NOT EXECUTED 20059a0: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 20059a4: b8 07 20 01 inc %i4 <== NOT EXECUTED 20059a8: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED 20059ac: 36 bf ff f9 bge,a 2005990 <== NOT EXECUTED 20059b0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 20059b4: 7f ff fe d4 call 2005504 <== NOT EXECUTED 20059b8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 20059bc: c2 05 a0 4c ld [ %l6 + 0x4c ], %g1 <== NOT EXECUTED 20059c0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20059c4: 22 80 00 0a be,a 20059ec <== NOT EXECUTED 20059c8: e6 05 a0 50 ld [ %l6 + 0x50 ], %l3 <== NOT EXECUTED 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 ) { 20059cc: ec 05 80 00 ld [ %l6 ], %l6 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20059d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 20059d4: 80 a5 80 01 cmp %l6, %g1 <== NOT EXECUTED 20059d8: 12 bf ff e9 bne 200597c <== NOT EXECUTED 20059dc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 20059e0: ee 07 bf c4 ld [ %fp + -60 ], %l7 <== NOT EXECUTED 20059e4: 10 bf ff d8 b 2005944 <== NOT EXECUTED 20059e8: e6 07 bf c0 ld [ %fp + -64 ], %l3 <== NOT EXECUTED 20059ec: 82 05 a0 54 add %l6, 0x54, %g1 <== NOT EXECUTED 20059f0: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED 20059f4: 22 bf ff f7 be,a 20059d0 <== NOT EXECUTED 20059f8: ec 05 80 00 ld [ %l6 ], %l6 <== NOT EXECUTED 20059fc: e2 27 bf c8 st %l1, [ %fp + -56 ] <== NOT EXECUTED 2005a00: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED !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++ ) 2005a04: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2005a08: 06 80 00 0e bl 2005a40 <== NOT EXECUTED 2005a0c: 01 00 00 00 nop <== NOT EXECUTED 2005a10: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005a14: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 2005a18: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005a1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005a20: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005a24: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2005a28: 40 00 46 a3 call 20174b4 <== NOT EXECUTED 2005a2c: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 2005a30: b8 07 20 01 inc %i4 <== NOT EXECUTED 2005a34: 80 a6 00 1c cmp %i0, %i4 <== NOT EXECUTED 2005a38: 36 bf ff f9 bge,a 2005a1c <== NOT EXECUTED 2005a3c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2005a40: 7f ff fe b1 call 2005504 <== NOT EXECUTED 2005a44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 2005a48: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 2005a4c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2005a50: 22 80 00 08 be,a 2005a70 <== NOT EXECUTED 2005a54: e4 04 e0 50 ld [ %l3 + 0x50 ], %l2 <== NOT EXECUTED 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 ) { 2005a58: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005a5c: 80 a4 c0 11 cmp %l3, %l1 <== NOT EXECUTED 2005a60: 12 bf ff ea bne 2005a08 <== NOT EXECUTED 2005a64: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2005a68: 10 bf ff d9 b 20059cc <== NOT EXECUTED 2005a6c: e2 07 bf c8 ld [ %fp + -56 ], %l1 <== NOT EXECUTED 2005a70: ae 04 e0 54 add %l3, 0x54, %l7 <== NOT EXECUTED 2005a74: 80 a4 80 17 cmp %l2, %l7 <== NOT EXECUTED 2005a78: 22 bf ff f9 be,a 2005a5c <== NOT EXECUTED 2005a7c: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED !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++ ) 2005a80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005a84: 06 80 00 0e bl 2005abc <== NOT EXECUTED 2005a88: 01 00 00 00 nop <== NOT EXECUTED 2005a8c: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005a90: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 2005a94: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005a98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005a9c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005aa0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2005aa4: 40 00 46 84 call 20174b4 <== NOT EXECUTED 2005aa8: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 2005aac: b8 07 20 01 inc %i4 <== NOT EXECUTED 2005ab0: 80 a6 40 1c cmp %i1, %i4 <== NOT EXECUTED 2005ab4: 36 bf ff f9 bge,a 2005a98 <== NOT EXECUTED 2005ab8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2005abc: 7f ff fe 92 call 2005504 <== NOT EXECUTED 2005ac0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 2005ac4: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED 2005ac8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2005acc: 22 80 00 08 be,a 2005aec <== NOT EXECUTED 2005ad0: e0 04 a0 50 ld [ %l2 + 0x50 ], %l0 <== NOT EXECUTED 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 ) { 2005ad4: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005ad8: 80 a4 80 17 cmp %l2, %l7 <== NOT EXECUTED 2005adc: 12 bf ff ea bne 2005a84 <== NOT EXECUTED 2005ae0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005ae4: 10 bf ff de b 2005a5c <== NOT EXECUTED 2005ae8: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED 2005aec: aa 04 a0 54 add %l2, 0x54, %l5 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005af0: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED 2005af4: 22 bf ff f9 be,a 2005ad8 <== NOT EXECUTED 2005af8: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED !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++ ) 2005afc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2005b00: 06 80 00 0e bl 2005b38 <== NOT EXECUTED 2005b04: 01 00 00 00 nop <== NOT EXECUTED 2005b08: b8 10 20 00 clr %i4 ! 0 <== NOT EXECUTED 2005b0c: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED fprintf(stdout, "...." ); 2005b10: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005b14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005b18: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2005b1c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2005b20: 40 00 46 65 call 20174b4 <== NOT EXECUTED 2005b24: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED !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++ ) 2005b28: b8 07 20 01 inc %i4 <== NOT EXECUTED 2005b2c: 80 a6 c0 1c cmp %i3, %i4 <== NOT EXECUTED 2005b30: 36 bf ff f9 bge,a 2005b14 <== NOT EXECUTED 2005b34: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2005b38: 7f ff fe 73 call 2005504 <== NOT EXECUTED 2005b3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( the_jnode->type == IMFS_DIRECTORY ) 2005b40: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 2005b44: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2005b48: 02 80 00 08 be 2005b68 <== NOT EXECUTED 2005b4c: d2 07 bf d4 ld [ %fp + -44 ], %o1 <== NOT EXECUTED 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 ) { 2005b50: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005b54: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED 2005b58: 12 bf ff ea bne 2005b00 <== NOT EXECUTED 2005b5c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2005b60: 10 bf ff de b 2005ad8 <== NOT EXECUTED 2005b64: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2005b68: 7f ff fe ad call 200561c <== NOT EXECUTED 2005b6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 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 ) { 2005b70: 10 bf ff f9 b 2005b54 <== NOT EXECUTED 2005b74: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED =============================================================================== 0200bb54 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200bb54: 9d e3 bf 78 save %sp, -136, %sp IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 200bb58: 80 8e bf f8 btst -8, %i2 200bb5c: 12 80 00 ff bne 200bf58 <== NEVER TAKEN 200bb60: ba 10 00 18 mov %i0, %i5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200bb64: f0 06 c0 00 ld [ %i3 ], %i0 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 200bb68: b8 10 20 00 clr %i4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200bb6c: 21 00 80 7a sethi %hi(0x201e800), %l0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200bb70: 90 07 40 1c add %i5, %i4, %o0 200bb74: 92 10 00 19 mov %i1, %o1 200bb78: 94 07 bf d8 add %fp, -40, %o2 200bb7c: 40 00 03 7a call 200c964 200bb80: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 200bb84: e2 06 c0 00 ld [ %i3 ], %l1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200bb88: a4 10 00 08 mov %o0, %l2 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 200bb8c: 90 94 60 00 orcc %l1, 0, %o0 200bb90: 02 80 00 ca be 200beb8 <== NEVER TAKEN 200bb94: c2 07 bf fc ld [ %fp + -4 ], %g1 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 200bb98: b2 26 40 01 sub %i1, %g1, %i1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200bb9c: 80 a4 a0 00 cmp %l2, 0 200bba0: 12 80 00 0f bne 200bbdc 200bba4: b8 07 00 01 add %i4, %g1, %i4 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 200bba8: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 200bbac: 80 a0 60 01 cmp %g1, 1 200bbb0: 02 80 00 ca be 200bed8 200bbb4: 80 a0 60 07 cmp %g1, 7 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200bbb8: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 switch( node->type ) { 200bbbc: 18 80 00 a9 bgu 200be60 <== NEVER TAKEN 200bbc0: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200bbc4: 83 28 60 02 sll %g1, 2, %g1 200bbc8: 07 00 80 2e sethi %hi(0x200b800), %g3 200bbcc: 86 10 e0 78 or %g3, 0x78, %g3 ! 200b878 200bbd0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 200bbd4: 81 c0 40 00 jmp %g1 200bbd8: 01 00 00 00 nop /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 200bbdc: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200bbe0: 80 a0 60 01 cmp %g1, 1 200bbe4: 02 80 00 5f be 200bd60 200bbe8: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200bbec: 80 a4 a0 03 cmp %l2, 3 200bbf0: 02 80 00 0a be 200bc18 200bbf4: 80 a4 a0 04 cmp %l2, 4 200bbf8: 02 80 00 2f be 200bcb4 200bbfc: 80 a4 a0 02 cmp %l2, 2 200bc00: 02 80 00 1a be 200bc68 200bc04: 80 a4 a0 04 cmp %l2, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 200bc08: 22 bf ff e9 be,a 200bbac <== NEVER TAKEN 200bc0c: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED 200bc10: 10 bf ff d8 b 200bb70 200bc14: b0 10 00 11 mov %l1, %i0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200bc18: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 200bc1c: 80 a0 60 03 cmp %g1, 3 200bc20: 02 80 00 6d be 200bdd4 200bc24: 80 a0 60 04 cmp %g1, 4 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 200bc28: 22 80 00 84 be,a 200be38 200bc2c: 90 10 00 1b mov %i3, %o0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200bc30: 80 a0 60 01 cmp %g1, 1 200bc34: 12 80 00 cf bne 200bf70 200bc38: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200bc3c: 40 00 03 27 call 200c8d8 200bc40: 92 07 bf d8 add %fp, -40, %o1 if ( !node ) 200bc44: b0 92 20 00 orcc %o0, 0, %i0 200bc48: 02 80 00 9c be 200beb8 200bc4c: 01 00 00 00 nop * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200bc50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200bc54: 80 a0 60 01 cmp %g1, 1 200bc58: 22 80 00 1d be,a 200bccc 200bc5c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200bc60: 10 bf ff c4 b 200bb70 200bc64: f0 26 c0 00 st %i0, [ %i3 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200bc68: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 200bc6c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200bc70: 80 a0 40 11 cmp %g1, %l1 200bc74: 02 bf ff bf be 200bb70 200bc78: b0 10 00 11 mov %l1, %i0 static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; 200bc7c: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200bc80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200bc84: 80 a0 40 11 cmp %g1, %l1 200bc88: 22 80 00 59 be,a 200bdec 200bc8c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200bc90: f0 04 60 08 ld [ %l1 + 8 ], %i0 200bc94: 80 a6 20 00 cmp %i0, 0 200bc98: 32 bf ff b6 bne,a 200bb70 200bc9c: f0 26 c0 00 st %i0, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200bca0: 40 00 16 4c call 20115d0 <__errno> 200bca4: b0 10 3f ff mov -1, %i0 200bca8: e4 22 00 00 st %l2, [ %o0 ] 200bcac: 81 c7 e0 08 ret 200bcb0: 81 e8 00 00 restore case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200bcb4: 40 00 16 47 call 20115d0 <__errno> 200bcb8: b0 10 3f ff mov -1, %i0 200bcbc: 82 10 20 5b mov 0x5b, %g1 200bcc0: c2 22 00 00 st %g1, [ %o0 ] 200bcc4: 81 c7 e0 08 ret 200bcc8: 81 e8 00 00 restore * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200bccc: 80 a0 60 00 cmp %g1, 0 200bcd0: 22 bf ff a8 be,a 200bb70 200bcd4: f0 26 c0 00 st %i0, [ %i3 ] const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200bcd8: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0 200bcdc: 7f ff e2 47 call 20045f8 200bce0: a2 07 40 1c add %i5, %i4, %l1 200bce4: 80 a2 20 00 cmp %o0, 0 200bce8: 22 80 00 11 be,a 200bd2c <== NEVER TAKEN 200bcec: c2 0c 40 00 ldub [ %l1 ], %g1 <== NOT EXECUTED 200bcf0: c2 0f 40 1c ldub [ %i5 + %i4 ], %g1 200bcf4: 83 28 60 18 sll %g1, 0x18, %g1 200bcf8: 80 a0 60 00 cmp %g1, 0 200bcfc: 02 80 00 b3 be 200bfc8 200bd00: 80 a6 60 00 cmp %i1, 0 200bd04: 02 80 00 0c be 200bd34 <== NEVER TAKEN 200bd08: 83 38 60 18 sra %g1, 0x18, %g1 ++(*index); 200bd0c: b8 07 20 01 inc %i4 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200bd10: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0 200bd14: 7f ff e2 39 call 20045f8 200bd18: b2 06 7f ff add %i1, -1, %i1 200bd1c: 80 a2 20 00 cmp %o0, 0 200bd20: 12 bf ff f4 bne 200bcf0 200bd24: a2 07 40 1c add %i5, %i4, %l1 200bd28: c2 0c 40 00 ldub [ %l1 ], %g1 200bd2c: 83 28 60 18 sll %g1, 0x18, %g1 * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200bd30: 83 38 60 18 sra %g1, 0x18, %g1 200bd34: 80 a0 60 2e cmp %g1, 0x2e 200bd38: 32 80 00 a5 bne,a 200bfcc 200bd3c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 200bd40: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 200bd44: 80 a0 60 2e cmp %g1, 0x2e 200bd48: 12 80 00 a0 bne 200bfc8 200bd4c: b8 07 20 02 add %i4, 2, %i4 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200bd50: f0 06 20 08 ld [ %i0 + 8 ], %i0 return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; 200bd54: b2 06 7f fe add %i1, -2, %i1 } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 200bd58: 10 bf ff 86 b 200bb70 200bd5c: f0 26 c0 00 st %i0, [ %i3 ] rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200bd60: 40 00 04 8b call 200cf8c 200bd64: 01 00 00 00 nop st_gid = getegid(); 200bd68: 40 00 04 85 call 200cf7c 200bd6c: b0 10 00 08 mov %o0, %i0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200bd70: c4 14 60 3c lduh [ %l1 + 0x3c ], %g2 200bd74: b1 2e 20 10 sll %i0, 0x10, %i0 200bd78: b1 36 20 10 srl %i0, 0x10, %i0 200bd7c: 80 a6 00 02 cmp %i0, %g2 200bd80: 02 80 00 0a be 200bda8 200bd84: 82 10 20 40 mov 0x40, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200bd88: c4 14 60 3e lduh [ %l1 + 0x3e ], %g2 200bd8c: 83 2a 20 10 sll %o0, 0x10, %g1 200bd90: 83 30 60 10 srl %g1, 0x10, %g1 200bd94: 82 18 40 02 xor %g1, %g2, %g1 200bd98: 80 a0 00 01 cmp %g0, %g1 200bd9c: 82 40 3f ff addx %g0, -1, %g1 200bda0: 82 08 60 07 and %g1, 7, %g1 200bda4: 82 00 60 01 inc %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200bda8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 200bdac: 84 08 40 02 and %g1, %g2, %g2 200bdb0: 80 a0 80 01 cmp %g2, %g1 200bdb4: 22 80 00 47 be,a 200bed0 200bdb8: e2 06 c0 00 ld [ %i3 ], %l1 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200bdbc: 40 00 16 05 call 20115d0 <__errno> 200bdc0: b0 10 3f ff mov -1, %i0 200bdc4: 82 10 20 0d mov 0xd, %g1 200bdc8: c2 22 00 00 st %g1, [ %o0 ] 200bdcc: 81 c7 e0 08 ret 200bdd0: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 200bdd4: 90 10 00 1b mov %i3, %o0 200bdd8: 7f ff ff 15 call 200ba2c 200bddc: 92 10 20 00 clr %o1 node = pathloc->node_access; 200bde0: d0 06 c0 00 ld [ %i3 ], %o0 200bde4: 10 bf ff 93 b 200bc30 200bde8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200bdec: d2 07 bf fc ld [ %fp + -4 ], %o1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200bdf0: c2 26 c0 00 st %g1, [ %i3 ] 200bdf4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200bdf8: b8 27 00 09 sub %i4, %o1, %i4 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200bdfc: c2 26 e0 04 st %g1, [ %i3 + 4 ] 200be00: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200be04: 90 07 40 1c add %i5, %i4, %o0 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200be08: c2 26 e0 08 st %g1, [ %i3 + 8 ] 200be0c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200be10: 92 06 40 09 add %i1, %o1, %o1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200be14: c2 26 e0 0c st %g1, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200be18: c2 00 40 00 ld [ %g1 ], %g1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200be1c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200be20: 94 10 00 1a mov %i2, %o2 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200be24: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200be28: 9f c0 40 00 call %g1 200be2c: 96 10 00 1b mov %i3, %o3 200be30: 81 c7 e0 08 ret 200be34: 91 e8 00 08 restore %g0, %o0, %o0 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 200be38: 40 00 00 77 call 200c014 200be3c: 92 10 20 00 clr %o1 200be40: b0 10 00 08 mov %o0, %i0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 200be44: 80 a6 3f ff cmp %i0, -1 200be48: 02 bf ff 99 be 200bcac <== NEVER TAKEN 200be4c: d0 06 c0 00 ld [ %i3 ], %o0 200be50: 10 bf ff 78 b 200bc30 200be54: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200be58: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200be5c: c2 26 e0 08 st %g1, [ %i3 + 8 ] rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200be60: 40 00 04 4b call 200cf8c 200be64: 01 00 00 00 nop st_gid = getegid(); 200be68: 40 00 04 45 call 200cf7c 200be6c: ba 10 00 08 mov %o0, %i5 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200be70: c2 14 60 3c lduh [ %l1 + 0x3c ], %g1 200be74: 85 2f 60 10 sll %i5, 0x10, %g2 200be78: 85 30 a0 10 srl %g2, 0x10, %g2 200be7c: 80 a0 80 01 cmp %g2, %g1 200be80: 02 80 00 42 be 200bf88 200be84: 85 2a 20 10 sll %o0, 0x10, %g2 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200be88: c2 14 60 3e lduh [ %l1 + 0x3e ], %g1 200be8c: 85 30 a0 10 srl %g2, 0x10, %g2 200be90: 80 a0 80 01 cmp %g2, %g1 200be94: 22 80 00 02 be,a 200be9c 200be98: b5 2e a0 03 sll %i2, 3, %i2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200be9c: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 200bea0: 82 0e 80 01 and %i2, %g1, %g1 200bea4: 80 a6 80 01 cmp %i2, %g1 200bea8: 12 bf ff c5 bne 200bdbc 200beac: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200beb0: 81 c7 e0 08 ret 200beb4: 91 e8 20 00 restore %g0, 0, %o0 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 200beb8: 40 00 15 c6 call 20115d0 <__errno> 200bebc: b0 10 3f ff mov -1, %i0 200bec0: 82 10 20 02 mov 2, %g1 200bec4: c2 22 00 00 st %g1, [ %o0 ] 200bec8: 81 c7 e0 08 ret 200becc: 81 e8 00 00 restore /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200bed0: 10 bf ff 47 b 200bbec 200bed4: 90 10 00 11 mov %l1, %o0 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 200bed8: c4 04 60 5c ld [ %l1 + 0x5c ], %g2 200bedc: 80 a0 a0 00 cmp %g2, 0 200bee0: 02 80 00 2c be 200bf90 <== ALWAYS TAKEN 200bee4: d2 07 bf fc ld [ %fp + -4 ], %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bee8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200beec: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 200bef0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bef4: b8 27 00 09 sub %i4, %o1, %i4 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bef8: c2 26 e0 04 st %g1, [ %i3 + 4 ] <== NOT EXECUTED 200befc: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bf00: 90 07 40 1c add %i5, %i4, %o0 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bf04: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 200bf08: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bf0c: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bf10: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bf14: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bf18: 10 bf ff c2 b 200be20 <== NOT EXECUTED 200bf1c: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200bf20: 03 00 80 75 sethi %hi(0x201d400), %g1 200bf24: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 200bf28: 10 bf ff ce b 200be60 200bf2c: c2 26 e0 08 st %g1, [ %i3 + 8 ] switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200bf30: 03 00 80 75 sethi %hi(0x201d400), %g1 200bf34: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 200bf38: 10 bf ff ca b 200be60 200bf3c: c2 26 e0 08 st %g1, [ %i3 + 8 ] break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200bf40: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200bf44: 10 bf ff c7 b 200be60 200bf48: c2 26 e0 08 st %g1, [ %i3 + 8 ] IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200bf4c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 200bf50: 10 bf ff c4 b 200be60 <== NOT EXECUTED 200bf54: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 200bf58: 40 00 15 9e call 20115d0 <__errno> <== NOT EXECUTED 200bf5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200bf60: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 200bf64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200bf68: 81 c7 e0 08 ret <== NOT EXECUTED 200bf6c: 81 e8 00 00 restore <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 200bf70: 40 00 15 98 call 20115d0 <__errno> 200bf74: b0 10 3f ff mov -1, %i0 200bf78: 82 10 20 14 mov 0x14, %g1 200bf7c: c2 22 00 00 st %g1, [ %o0 ] 200bf80: 81 c7 e0 08 ret 200bf84: 81 e8 00 00 restore */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200bf88: 10 bf ff c5 b 200be9c 200bf8c: b5 2e a0 06 sll %i2, 6, %i2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200bf90: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1 switch( node->type ) { 200bf94: 05 00 80 2e sethi %hi(0x200b800), %g2 200bf98: c4 00 a0 5c ld [ %g2 + 0x5c ], %g2 ! 200b85c 200bf9c: 81 c0 80 00 jmp %g2 200bfa0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200bfa4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 200bfa8: 10 bf ff ae b 200be60 <== NOT EXECUTED 200bfac: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200bfb0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200bfb4: 10 bf ff ab b 200be60 200bfb8: c2 26 e0 08 st %g1, [ %i3 + 8 ] break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200bfbc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200bfc0: 10 bf ff a8 b 200be60 <== NOT EXECUTED 200bfc4: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bfc8: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bfcc: 90 10 00 11 mov %l1, %o0 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bfd0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bfd4: 92 10 00 19 mov %i1, %o1 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bfd8: c2 26 c0 00 st %g1, [ %i3 ] 200bfdc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bfe0: 94 10 00 1a mov %i2, %o2 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bfe4: c2 26 e0 04 st %g1, [ %i3 + 4 ] 200bfe8: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bfec: 96 10 00 1b mov %i3, %o3 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bff0: c2 26 e0 08 st %g1, [ %i3 + 8 ] 200bff4: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 200bff8: c2 26 e0 0c st %g1, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i], 200bffc: c2 00 40 00 ld [ %g1 ], %g1 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c000: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200c004: 9f c0 40 00 call %g1 200c008: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] 200c00c: 81 c7 e0 08 ret 200c010: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200c338 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200c338: 9d e3 bf 78 save %sp, -136, %sp node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200c33c: 90 10 00 18 mov %i0, %o0 200c340: 40 00 1a 3c call 2012c30 200c344: ba 10 00 18 mov %i0, %i5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200c348: f0 06 40 00 ld [ %i1 ], %i0 /* * Get the path length. */ pathlen = strlen( path ); 200c34c: b6 10 00 08 mov %o0, %i3 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 200c350: b8 10 20 00 clr %i4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200c354: 21 00 80 7a sethi %hi(0x201e800), %l0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200c358: 90 07 40 1c add %i5, %i4, %o0 200c35c: 92 10 00 1b mov %i3, %o1 200c360: 94 07 bf d8 add %fp, -40, %o2 200c364: 40 00 01 80 call 200c964 200c368: 96 07 bf fc add %fp, -4, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 200c36c: e2 06 40 00 ld [ %i1 ], %l1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200c370: a4 10 00 08 mov %o0, %l2 pathlen -= len; i += len; if ( !pathloc->node_access ) 200c374: 80 a4 60 00 cmp %l1, 0 200c378: 02 80 00 d0 be 200c6b8 <== NEVER TAKEN 200c37c: e6 07 bf fc ld [ %fp + -4 ], %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200c380: 80 a2 20 00 cmp %o0, 0 200c384: 32 80 00 08 bne,a 200c3a4 200c388: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200c38c: 40 00 14 91 call 20115d0 <__errno> 200c390: b0 10 3f ff mov -1, %i0 200c394: 82 10 20 11 mov 0x11, %g1 200c398: c2 22 00 00 st %g1, [ %o0 ] 200c39c: 81 c7 e0 08 ret 200c3a0: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 200c3a4: 80 a0 60 01 cmp %g1, 1 200c3a8: 02 80 00 66 be 200c540 200c3ac: 01 00 00 00 nop */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 200c3b0: b6 26 c0 13 sub %i3, %l3, %i3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200c3b4: 80 a4 a0 02 cmp %l2, 2 200c3b8: 02 80 00 1a be 200c420 200c3bc: b8 07 00 13 add %i4, %l3, %i4 200c3c0: 80 a4 a0 02 cmp %l2, 2 200c3c4: 08 80 00 09 bleu 200c3e8 200c3c8: 80 a4 a0 00 cmp %l2, 0 200c3cc: 80 a4 a0 03 cmp %l2, 3 200c3d0: 02 80 00 24 be 200c460 200c3d4: 80 a4 a0 04 cmp %l2, 4 200c3d8: 02 80 00 0c be 200c408 <== ALWAYS TAKEN 200c3dc: 01 00 00 00 nop 200c3e0: 10 bf ff de b 200c358 <== NOT EXECUTED 200c3e4: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 200c3e8: 32 bf ff dc bne,a 200c358 <== ALWAYS TAKEN 200c3ec: b0 10 00 11 mov %l1, %i0 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200c3f0: 40 00 14 78 call 20115d0 <__errno> <== NOT EXECUTED 200c3f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200c3f8: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 200c3fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200c400: 81 c7 e0 08 ret <== NOT EXECUTED 200c404: 81 e8 00 00 restore <== NOT EXECUTED break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200c408: 40 00 14 72 call 20115d0 <__errno> 200c40c: b0 10 3f ff mov -1, %i0 200c410: 82 10 20 5b mov 0x5b, %g1 200c414: c2 22 00 00 st %g1, [ %o0 ] 200c418: 81 c7 e0 08 ret 200c41c: 81 e8 00 00 restore case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200c420: c2 04 21 70 ld [ %l0 + 0x170 ], %g1 200c424: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200c428: 80 a4 40 01 cmp %l1, %g1 200c42c: 02 bf ff cb be 200c358 200c430: b0 10 00 11 mov %l1, %i0 200c434: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200c438: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200c43c: 80 a4 40 01 cmp %l1, %g1 200c440: 22 80 00 a4 be,a 200c6d0 200c444: c2 00 a0 08 ld [ %g2 + 8 ], %g1 *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 200c448: f0 04 60 08 ld [ %l1 + 8 ], %i0 200c44c: 80 a6 20 00 cmp %i0, 0 200c450: 02 80 00 b2 be 200c718 200c454: 01 00 00 00 nop } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 200c458: 10 bf ff c0 b 200c358 200c45c: f0 26 40 00 st %i0, [ %i1 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200c460: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 200c464: 80 a0 60 03 cmp %g1, 3 200c468: 02 80 00 53 be 200c5b4 200c46c: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200c470: 02 80 00 52 be 200c5b8 200c474: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 200c478: 80 a4 60 00 cmp %l1, 0 200c47c: 02 80 00 ae be 200c734 <== NEVER TAKEN 200c480: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200c484: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 200c488: 80 a0 60 01 cmp %g1, 1 200c48c: 12 80 00 aa bne 200c734 200c490: 90 10 00 11 mov %l1, %o0 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200c494: 40 00 01 11 call 200c8d8 200c498: 92 07 bf d8 add %fp, -40, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 200c49c: b0 92 20 00 orcc %o0, 0, %i0 200c4a0: 02 80 00 72 be 200c668 200c4a4: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200c4a8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200c4ac: 80 a0 60 01 cmp %g1, 1 200c4b0: 32 bf ff aa bne,a 200c358 200c4b4: f0 26 40 00 st %i0, [ %i1 ] 200c4b8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200c4bc: 80 a0 60 00 cmp %g1, 0 200c4c0: 32 80 00 0d bne,a 200c4f4 200c4c4: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0 200c4c8: 10 bf ff a4 b 200c358 200c4cc: f0 26 40 00 st %i0, [ %i1 ] const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200c4d0: 83 28 60 18 sll %g1, 0x18, %g1 200c4d4: 80 a0 60 00 cmp %g1, 0 200c4d8: 02 80 00 b1 be 200c79c <== NEVER TAKEN 200c4dc: 80 a6 e0 00 cmp %i3, 0 200c4e0: 02 80 00 0d be 200c514 <== NEVER TAKEN 200c4e4: 83 38 60 18 sra %g1, 0x18, %g1 ++(*index); 200c4e8: b8 07 20 01 inc %i4 --(*len); 200c4ec: b6 06 ff ff add %i3, -1, %i3 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200c4f0: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0 200c4f4: 7f ff e0 41 call 20045f8 200c4f8: a2 07 40 1c add %i5, %i4, %l1 200c4fc: 80 a2 20 00 cmp %o0, 0 200c500: 32 bf ff f4 bne,a 200c4d0 200c504: c2 0f 40 1c ldub [ %i5 + %i4 ], %g1 200c508: c2 0c 40 00 ldub [ %l1 ], %g1 200c50c: 83 28 60 18 sll %g1, 0x18, %g1 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { 200c510: 83 38 60 18 sra %g1, 0x18, %g1 200c514: 80 a0 60 2e cmp %g1, 0x2e 200c518: 32 80 00 a2 bne,a 200c7a0 200c51c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 200c520: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 200c524: 80 a0 60 2e cmp %g1, 0x2e 200c528: 12 80 00 9d bne 200c79c <== NEVER TAKEN 200c52c: b8 07 20 02 add %i4, 2, %i4 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200c530: f0 06 20 08 ld [ %i0 + 8 ], %i0 return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; 200c534: b6 06 ff fe add %i3, -2, %i3 node = node->Parent; } pathloc->node_access = node; 200c538: 10 bf ff 88 b 200c358 200c53c: f0 26 40 00 st %i0, [ %i1 ] rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200c540: 40 00 02 93 call 200cf8c 200c544: 01 00 00 00 nop st_gid = getegid(); 200c548: 40 00 02 8d call 200cf7c 200c54c: b0 10 00 08 mov %o0, %i0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200c550: c4 14 60 3c lduh [ %l1 + 0x3c ], %g2 200c554: b1 2e 20 10 sll %i0, 0x10, %i0 200c558: b1 36 20 10 srl %i0, 0x10, %i0 200c55c: 80 a6 00 02 cmp %i0, %g2 200c560: 02 80 00 0a be 200c588 200c564: 82 10 20 40 mov 0x40, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200c568: c4 14 60 3e lduh [ %l1 + 0x3e ], %g2 200c56c: 83 2a 20 10 sll %o0, 0x10, %g1 200c570: 83 30 60 10 srl %g1, 0x10, %g1 200c574: 82 18 40 02 xor %g1, %g2, %g1 200c578: 80 a0 00 01 cmp %g0, %g1 200c57c: 82 40 3f ff addx %g0, -1, %g1 200c580: 82 08 60 07 and %g1, 7, %g1 200c584: 82 00 60 01 inc %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200c588: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 200c58c: 84 08 40 02 and %g1, %g2, %g2 200c590: 80 a0 80 01 cmp %g2, %g1 200c594: 22 bf ff 87 be,a 200c3b0 200c598: e2 06 40 00 ld [ %i1 ], %l1 */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200c59c: 40 00 14 0d call 20115d0 <__errno> 200c5a0: b0 10 3f ff mov -1, %i0 200c5a4: 82 10 20 0d mov 0xd, %g1 200c5a8: c2 22 00 00 st %g1, [ %o0 ] 200c5ac: 81 c7 e0 08 ret 200c5b0: 81 e8 00 00 restore if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 200c5b4: 90 10 00 19 mov %i1, %o0 200c5b8: 7f ff fe ec call 200c168 200c5bc: 92 10 20 00 clr %o1 if ( result == -1 ) 200c5c0: 80 a2 3f ff cmp %o0, -1 200c5c4: 02 bf ff 76 be 200c39c <== NEVER TAKEN 200c5c8: b0 10 00 08 mov %o0, %i0 200c5cc: 10 bf ff ab b 200c478 200c5d0: e2 06 40 00 ld [ %i1 ], %l1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200c5d4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 switch( node->type ) { 200c5d8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200c5dc: 80 a0 60 07 cmp %g1, 7 200c5e0: 08 80 00 5b bleu 200c74c <== ALWAYS TAKEN 200c5e4: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200c5e8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 200c5ec: 12 80 00 52 bne 200c734 <== NOT EXECUTED 200c5f0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200c5f4: 40 00 02 66 call 200cf8c 200c5f8: 01 00 00 00 nop st_gid = getegid(); 200c5fc: 40 00 02 60 call 200cf7c 200c600: b8 10 00 08 mov %o0, %i4 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200c604: c4 17 60 3c lduh [ %i5 + 0x3c ], %g2 200c608: 87 2f 20 10 sll %i4, 0x10, %g3 200c60c: 87 30 e0 10 srl %g3, 0x10, %g3 200c610: 80 a0 c0 02 cmp %g3, %g2 200c614: 02 80 00 0a be 200c63c 200c618: 82 10 20 c0 mov 0xc0, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200c61c: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 200c620: 85 2a 20 10 sll %o0, 0x10, %g2 200c624: 85 30 a0 10 srl %g2, 0x10, %g2 200c628: 82 18 80 01 xor %g2, %g1, %g1 200c62c: 80 a0 00 01 cmp %g0, %g1 200c630: 82 40 3f ff addx %g0, -1, %g1 200c634: 82 08 60 15 and %g1, 0x15, %g1 200c638: 82 00 60 03 add %g1, 3, %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200c63c: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 200c640: 84 08 40 02 and %g1, %g2, %g2 200c644: 80 a0 80 01 cmp %g2, %g1 200c648: 02 bf ff 55 be 200c39c 200c64c: b0 10 20 00 clr %i0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200c650: 40 00 13 e0 call 20115d0 <__errno> 200c654: b0 10 3f ff mov -1, %i0 200c658: 82 10 20 0d mov 0xd, %g1 200c65c: c2 22 00 00 st %g1, [ %o0 ] return result; } 200c660: 81 c7 e0 08 ret 200c664: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200c668: 82 27 00 01 sub %i4, %g1, %g1 200c66c: 82 07 40 01 add %i5, %g1, %g1 200c670: c2 26 80 00 st %g1, [ %i2 ] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 200c674: d0 0f 40 1c ldub [ %i5 + %i4 ], %o0 200c678: 91 2a 20 18 sll %o0, 0x18, %o0 200c67c: 80 a2 20 00 cmp %o0, 0 200c680: 12 80 00 09 bne 200c6a4 200c684: 01 00 00 00 nop int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = loc->node_access; 200c688: 10 bf ff d3 b 200c5d4 200c68c: fa 06 40 00 ld [ %i1 ], %i5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 200c690: d0 0f 40 1c ldub [ %i5 + %i4 ], %o0 200c694: 91 2a 20 18 sll %o0, 0x18, %o0 200c698: 80 a2 20 00 cmp %o0, 0 200c69c: 22 bf ff ce be,a 200c5d4 200c6a0: fa 06 40 00 ld [ %i1 ], %i5 if ( !IMFS_is_separator( path[ i ] ) ) 200c6a4: 7f ff df d5 call 20045f8 200c6a8: 91 3a 20 18 sra %o0, 0x18, %o0 200c6ac: 80 a2 20 00 cmp %o0, 0 200c6b0: 32 bf ff f8 bne,a 200c690 200c6b4: b8 07 20 01 inc %i4 rtems_set_errno_and_return_minus_one( ENOENT ); 200c6b8: 40 00 13 c6 call 20115d0 <__errno> 200c6bc: b0 10 3f ff mov -1, %i0 200c6c0: 82 10 20 02 mov 2, %g1 200c6c4: c2 22 00 00 st %g1, [ %o0 ] 200c6c8: 81 c7 e0 08 ret 200c6cc: 81 e8 00 00 restore if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c6d0: c6 07 bf fc ld [ %fp + -4 ], %g3 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c6d4: c2 26 40 00 st %g1, [ %i1 ] 200c6d8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c6dc: b8 27 00 03 sub %i4, %g3, %i4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c6e0: c2 26 60 04 st %g1, [ %i1 + 4 ] 200c6e4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c6e8: 90 07 40 1c add %i5, %i4, %o0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c6ec: c2 26 60 08 st %g1, [ %i1 + 8 ] 200c6f0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c6f4: 92 10 00 19 mov %i1, %o1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c6f8: c2 26 60 0c st %g1, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c6fc: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c700: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c704: 94 10 00 1a mov %i2, %o2 200c708: 9f c0 40 00 call %g1 200c70c: c4 26 60 10 st %g2, [ %i1 + 0x10 ] 200c710: 81 c7 e0 08 ret 200c714: 91 e8 00 08 restore %g0, %o0, %o0 } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); 200c718: 40 00 13 ae call 20115d0 <__errno> 200c71c: b0 10 3f ff mov -1, %i0 200c720: e4 22 00 00 st %l2, [ %o0 ] 200c724: 81 c7 e0 08 ret 200c728: 81 e8 00 00 restore break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200c72c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 200c730: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 200c734: 40 00 13 a7 call 20115d0 <__errno> 200c738: b0 10 3f ff mov -1, %i0 200c73c: 82 10 20 14 mov 0x14, %g1 200c740: c2 22 00 00 st %g1, [ %o0 ] 200c744: 81 c7 e0 08 ret 200c748: 81 e8 00 00 restore { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c74c: 87 28 60 02 sll %g1, 2, %g3 200c750: 09 00 80 2e sethi %hi(0x200b800), %g4 200c754: 88 11 20 d8 or %g4, 0xd8, %g4 ! 200b8d8 200c758: c6 01 00 03 ld [ %g4 + %g3 ], %g3 200c75c: 81 c0 c0 00 jmp %g3 200c760: 01 00 00 00 nop case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200c764: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200c768: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <== NOT EXECUTED 200c76c: 10 bf ff f2 b 200c734 <== NOT EXECUTED 200c770: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200c774: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200c778: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <== NOT EXECUTED 200c77c: 10 bf ff ee b 200c734 <== NOT EXECUTED 200c780: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200c784: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200c788: 10 bf ff 9b b 200c5f4 200c78c: c2 26 60 08 st %g1, [ %i1 + 8 ] break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200c790: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 200c794: 10 bf ff e8 b 200c734 <== NOT EXECUTED 200c798: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c79c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 <== NOT EXECUTED return (*pathloc->ops->evalformake_h)( &path[i], 200c7a0: 90 10 00 11 mov %l1, %o0 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c7a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 return (*pathloc->ops->evalformake_h)( &path[i], 200c7a8: 92 10 00 19 mov %i1, %o1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c7ac: c2 26 40 00 st %g1, [ %i1 ] 200c7b0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 return (*pathloc->ops->evalformake_h)( &path[i], 200c7b4: 94 10 00 1a mov %i2, %o2 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c7b8: c2 26 60 04 st %g1, [ %i1 + 4 ] 200c7bc: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200c7c0: c2 26 60 08 st %g1, [ %i1 + 8 ] 200c7c4: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 200c7c8: c2 26 60 0c st %g1, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i], 200c7cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 200c7d0: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 return (*pathloc->ops->evalformake_h)( &path[i], 200c7d4: 9f c0 40 00 call %g1 200c7d8: c4 26 60 10 st %g2, [ %i1 + 0x10 ] 200c7dc: 81 c7 e0 08 ret 200c7e0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200ba2c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200ba2c: 9d e3 bf a0 save %sp, -96, %sp IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 200ba30: c4 06 00 00 ld [ %i0 ], %g2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200ba34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 200ba38: fa 00 a0 50 ld [ %g2 + 0x50 ], %i5 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200ba3c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 switch( node->type ) { 200ba40: c4 07 60 4c ld [ %i5 + 0x4c ], %g2 200ba44: 80 a0 a0 07 cmp %g2, 7 200ba48: 18 80 00 0a bgu 200ba70 <== NEVER TAKEN 200ba4c: fa 26 00 00 st %i5, [ %i0 ] 200ba50: 85 28 a0 02 sll %g2, 2, %g2 200ba54: 07 00 80 2e sethi %hi(0x200b800), %g3 200ba58: 86 10 e0 38 or %g3, 0x38, %g3 ! 200b838 200ba5c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200ba60: 81 c0 80 00 jmp %g2 200ba64: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200ba68: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200ba6c: c2 26 20 08 st %g1, [ %i0 + 8 ] uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200ba70: 80 8e 7f f8 btst -8, %i1 200ba74: 12 80 00 32 bne 200bb3c <== NEVER TAKEN 200ba78: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200ba7c: 40 00 05 44 call 200cf8c 200ba80: 01 00 00 00 nop st_gid = getegid(); 200ba84: 40 00 05 3e call 200cf7c 200ba88: b8 10 00 08 mov %o0, %i4 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200ba8c: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 200ba90: b9 2f 20 10 sll %i4, 0x10, %i4 200ba94: b9 37 20 10 srl %i4, 0x10, %i4 200ba98: 80 a7 00 01 cmp %i4, %g1 200ba9c: 02 80 00 15 be 200baf0 <== ALWAYS TAKEN 200baa0: 91 2a 20 10 sll %o0, 0x10, %o0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200baa4: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 <== NOT EXECUTED 200baa8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 200baac: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 200bab0: 22 80 00 02 be,a 200bab8 <== NOT EXECUTED 200bab4: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200bab8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED 200babc: 82 0e 40 01 and %i1, %g1, %g1 <== NOT EXECUTED 200bac0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200bac4: 02 80 00 11 be 200bb08 <== NOT EXECUTED 200bac8: 01 00 00 00 nop <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200bacc: 40 00 16 c1 call 20115d0 <__errno> <== NOT EXECUTED 200bad0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200bad4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 200bad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200badc: 81 c7 e0 08 ret <== NOT EXECUTED 200bae0: 81 e8 00 00 restore <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200bae4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 200bae8: 10 bf ff e2 b 200ba70 <== NOT EXECUTED 200baec: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200baf0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200baf4: b3 2e 60 06 sll %i1, 6, %i1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200baf8: 82 0e 40 01 and %i1, %g1, %g1 200bafc: 80 a6 40 01 cmp %i1, %g1 200bb00: 12 bf ff f3 bne 200bacc <== NEVER TAKEN 200bb04: 01 00 00 00 nop if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200bb08: 81 c7 e0 08 ret 200bb0c: 91 e8 20 00 restore %g0, 0, %o0 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200bb10: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200bb14: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <== NOT EXECUTED 200bb18: 10 bf ff d6 b 200ba70 <== NOT EXECUTED 200bb1c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200bb20: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200bb24: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <== NOT EXECUTED 200bb28: 10 bf ff d2 b 200ba70 <== NOT EXECUTED 200bb2c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200bb30: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200bb34: 10 bf ff cf b 200ba70 <== NOT EXECUTED 200bb38: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 200bb3c: 40 00 16 a5 call 20115d0 <__errno> <== NOT EXECUTED 200bb40: b0 10 20 00 clr %i0 <== NOT EXECUTED 200bb44: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200bb48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200bb4c: 81 c7 e0 08 ret <== NOT EXECUTED 200bb50: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c168 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200c168: 9d e3 bf a0 save %sp, -96, %sp */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 200c16c: 3b 00 80 7a sethi %hi(0x201e800), %i5 { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c170: 25 00 80 2e sethi %hi(0x200b800), %l2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200c174: 29 00 80 75 sethi %hi(0x201d400), %l4 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200c178: 27 00 80 75 sethi %hi(0x201d400), %l3 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 200c17c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200c180: b6 10 00 18 mov %i0, %i3 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200c184: a1 2e 60 06 sll %i1, 6, %l0 else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 200c188: a3 2e 60 03 sll %i1, 3, %l1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200c18c: b4 0e 7f f8 and %i1, -8, %i2 rtems_set_errno_and_return_minus_one( EPERM ); 200c190: aa 10 20 01 mov 1, %l5 { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c194: a4 14 a0 b8 or %l2, 0xb8, %l2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200c198: a8 15 22 34 or %l4, 0x234, %l4 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200c19c: 10 80 00 07 b 200c1b8 200c1a0: a6 14 e1 c4 or %l3, 0x1c4, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 200c1a4: 02 80 00 46 be 200c2bc 200c1a8: 84 00 bf fd add %g2, -3, %g2 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 200c1ac: 80 a0 a0 01 cmp %g2, 1 200c1b0: 38 80 00 41 bgu,a 200c2b4 <== ALWAYS TAKEN 200c1b4: c0 30 60 30 clrh [ %g1 + 0x30 ] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 200c1b8: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 200c1bc: f8 06 c0 00 ld [ %i3 ], %i4 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 200c1c0: 84 00 a0 01 inc %g2 200c1c4: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 200c1c8: 85 28 a0 10 sll %g2, 0x10, %g2 200c1cc: 85 30 a0 10 srl %g2, 0x10, %g2 200c1d0: 80 a0 a0 05 cmp %g2, 5 200c1d4: 18 80 00 53 bgu 200c320 200c1d8: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 200c1dc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 200c1e0: 80 a0 a0 03 cmp %g2, 3 200c1e4: 12 bf ff f0 bne 200c1a4 200c1e8: 80 a0 a0 04 cmp %g2, 4 IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 200c1ec: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200c1f0: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3 switch( node->type ) { 200c1f4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 200c1f8: c2 26 c0 00 st %g1, [ %i3 ] { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c1fc: 80 a0 a0 07 cmp %g2, 7 200c200: 08 80 00 37 bleu 200c2dc <== ALWAYS TAKEN 200c204: c2 00 e0 34 ld [ %g3 + 0x34 ], %g1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200c208: 80 a6 a0 00 cmp %i2, 0 200c20c: 12 80 00 20 bne 200c28c <== NEVER TAKEN 200c210: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200c214: 40 00 03 5e call 200cf8c 200c218: f0 06 c0 00 ld [ %i3 ], %i0 st_gid = getegid(); 200c21c: 40 00 03 58 call 200cf7c 200c220: ac 10 00 08 mov %o0, %l6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200c224: c4 16 20 3c lduh [ %i0 + 0x3c ], %g2 200c228: ad 2d a0 10 sll %l6, 0x10, %l6 200c22c: ad 35 a0 10 srl %l6, 0x10, %l6 200c230: 80 a5 80 02 cmp %l6, %g2 200c234: 02 80 00 09 be 200c258 200c238: 82 10 00 10 mov %l0, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200c23c: c4 16 20 3e lduh [ %i0 + 0x3e ], %g2 200c240: 91 2a 20 10 sll %o0, 0x10, %o0 200c244: 91 32 20 10 srl %o0, 0x10, %o0 200c248: 80 a2 00 02 cmp %o0, %g2 200c24c: 02 80 00 03 be 200c258 200c250: 82 10 00 11 mov %l1, %g1 200c254: 82 10 00 19 mov %i1, %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200c258: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 200c25c: 84 08 40 02 and %g1, %g2, %g2 200c260: 80 a0 40 02 cmp %g1, %g2 200c264: 22 80 00 0e be,a 200c29c 200c268: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200c26c: 40 00 14 d9 call 20115d0 <__errno> 200c270: b0 10 3f ff mov -1, %i0 200c274: 82 10 20 0d mov 0xd, %g1 200c278: c2 22 00 00 st %g1, [ %o0 ] else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 200c27c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 200c280: c0 30 60 30 clrh [ %g1 + 0x30 ] return result; } 200c284: 81 c7 e0 08 ret 200c288: 81 e8 00 00 restore gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 200c28c: 40 00 14 d1 call 20115d0 <__errno> <== NOT EXECUTED 200c290: 01 00 00 00 nop <== NOT EXECUTED 200c294: ea 22 00 00 st %l5, [ %o0 ] <== NOT EXECUTED else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 200c298: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 <== NOT EXECUTED 200c29c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 200c2a0: 84 00 bf fd add %g2, -3, %g2 200c2a4: 80 a0 a0 01 cmp %g2, 1 200c2a8: 28 bf ff c5 bleu,a 200c1bc <== ALWAYS TAKEN 200c2ac: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 200c2b0: c0 30 60 30 clrh [ %g1 + 0x30 ] <== NOT EXECUTED return result; } 200c2b4: 81 c7 e0 08 ret 200c2b8: 91 e8 20 00 restore %g0, 0, %o0 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 200c2bc: 90 10 00 1b mov %i3, %o0 200c2c0: 7f ff ff 55 call 200c014 200c2c4: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 200c2c8: b0 92 20 00 orcc %o0, 0, %i0 200c2cc: 12 bf ff ec bne 200c27c 200c2d0: c2 07 61 70 ld [ %i5 + 0x170 ], %g1 200c2d4: 10 bf ff f3 b 200c2a0 200c2d8: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c2dc: 85 28 a0 02 sll %g2, 2, %g2 200c2e0: c4 04 80 02 ld [ %l2 + %g2 ], %g2 200c2e4: 81 c0 80 00 jmp %g2 200c2e8: 01 00 00 00 nop break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200c2ec: c2 00 60 08 ld [ %g1 + 8 ], %g1 200c2f0: 10 bf ff c6 b 200c208 200c2f4: c2 26 e0 08 st %g1, [ %i3 + 8 ] break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200c2f8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200c2fc: 10 bf ff c3 b 200c208 <== NOT EXECUTED 200c300: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200c304: 10 bf ff c1 b 200c208 <== NOT EXECUTED 200c308: e8 26 e0 08 st %l4, [ %i3 + 8 ] <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200c30c: 10 bf ff bf b 200c208 <== NOT EXECUTED 200c310: e6 26 e0 08 st %l3, [ %i3 + 8 ] <== NOT EXECUTED IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200c314: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200c318: 10 bf ff bc b 200c208 200c31c: c2 26 e0 08 st %g1, [ %i3 + 8 ] */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 200c320: 40 00 14 ac call 20115d0 <__errno> 200c324: c0 30 60 30 clrh [ %g1 + 0x30 ] 200c328: 82 10 20 5c mov 0x5c, %g1 200c32c: c2 22 00 00 st %g1, [ %o0 ] 200c330: 81 c7 e0 08 ret 200c334: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200b980 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200b980: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200b984: 80 8e 7f f8 btst -8, %i1 <== NOT EXECUTED 200b988: 12 80 00 23 bne 200ba14 <== NOT EXECUTED 200b98c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200b990: 40 00 05 7f call 200cf8c <== NOT EXECUTED 200b994: fa 06 00 00 ld [ %i0 ], %i5 <== NOT EXECUTED st_gid = getegid(); 200b998: 40 00 05 79 call 200cf7c <== NOT EXECUTED 200b99c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200b9a0: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 200b9a4: b9 2f 20 10 sll %i4, 0x10, %i4 <== NOT EXECUTED 200b9a8: b9 37 20 10 srl %i4, 0x10, %i4 <== NOT EXECUTED 200b9ac: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 200b9b0: 02 80 00 0c be 200b9e0 <== NOT EXECUTED 200b9b4: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200b9b8: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 <== NOT EXECUTED 200b9bc: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 200b9c0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 200b9c4: 02 80 00 0e be 200b9fc <== NOT EXECUTED 200b9c8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; 200b9cc: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED 200b9d0: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED 200b9d4: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED return 0; } 200b9d8: 81 c7 e0 08 ret <== NOT EXECUTED 200b9dc: 81 e8 00 00 restore <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200b9e0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200b9e4: b3 2e 60 06 sll %i1, 6, %i1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; 200b9e8: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED 200b9ec: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED 200b9f0: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED return 0; } 200b9f4: 81 c7 e0 08 ret <== NOT EXECUTED 200b9f8: 81 e8 00 00 restore <== NOT EXECUTED flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 200b9fc: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; 200ba00: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED 200ba04: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED 200ba08: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED return 0; } 200ba0c: 81 c7 e0 08 ret <== NOT EXECUTED 200ba10: 81 e8 00 00 restore <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 200ba14: 40 00 16 ef call 20115d0 <__errno> <== NOT EXECUTED 200ba18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200ba1c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200ba20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200ba24: 81 c7 e0 08 ret <== NOT EXECUTED 200ba28: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c014 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200c014: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 200c018: f8 06 00 00 ld [ %i0 ], %i4 * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 200c01c: 94 10 00 18 mov %i0, %o2 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 200c020: c2 07 20 08 ld [ %i4 + 8 ], %g1 rtems_filesystem_get_sym_start_loc( 200c024: 92 07 bf fc add %fp, -4, %o1 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 200c028: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 200c02c: d0 07 20 50 ld [ %i4 + 0x50 ], %o0 200c030: 40 00 05 9f call 200d6ac 200c034: ba 10 00 18 mov %i0, %i5 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 200c038: c2 07 bf fc ld [ %fp + -4 ], %g1 200c03c: f8 07 20 50 ld [ %i4 + 0x50 ], %i4 200c040: b8 07 00 01 add %i4, %g1, %i4 200c044: 40 00 1a fb call 2012c30 200c048: 90 10 00 1c mov %i4, %o0 200c04c: 96 10 00 18 mov %i0, %o3 200c050: 92 10 00 08 mov %o0, %o1 200c054: 94 10 00 19 mov %i1, %o2 200c058: 7f ff fe bf call 200bb54 200c05c: 90 10 00 1c mov %i4, %o0 { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c060: f8 07 40 00 ld [ %i5 ], %i4 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200c064: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 switch( node->type ) { 200c068: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 200c06c: b0 10 00 08 mov %o0, %i0 { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200c070: 80 a0 60 07 cmp %g1, 7 200c074: 18 80 00 0a bgu 200c09c <== NEVER TAKEN 200c078: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200c07c: 83 28 60 02 sll %g1, 2, %g1 200c080: 07 00 80 2e sethi %hi(0x200b800), %g3 200c084: 86 10 e0 98 or %g3, 0x98, %g3 ! 200b898 200c088: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 200c08c: 81 c0 40 00 jmp %g1 200c090: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200c094: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200c098: c2 27 60 08 st %g1, [ %i5 + 8 ] uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200c09c: 80 8e 7f f8 btst -8, %i1 200c0a0: 12 80 00 2c bne 200c150 <== NEVER TAKEN 200c0a4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200c0a8: 40 00 03 b9 call 200cf8c 200c0ac: 01 00 00 00 nop st_gid = getegid(); 200c0b0: 40 00 03 b3 call 200cf7c 200c0b4: ba 10 00 08 mov %o0, %i5 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200c0b8: c2 17 20 3c lduh [ %i4 + 0x3c ], %g1 200c0bc: bb 2f 60 10 sll %i5, 0x10, %i5 200c0c0: bb 37 60 10 srl %i5, 0x10, %i5 200c0c4: 80 a7 40 01 cmp %i5, %g1 200c0c8: 02 80 00 15 be 200c11c 200c0cc: 91 2a 20 10 sll %o0, 0x10, %o0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200c0d0: c2 17 20 3e lduh [ %i4 + 0x3e ], %g1 200c0d4: 91 32 20 10 srl %o0, 0x10, %o0 200c0d8: 80 a2 00 01 cmp %o0, %g1 200c0dc: 22 80 00 02 be,a 200c0e4 <== ALWAYS TAKEN 200c0e0: b3 2e 60 03 sll %i1, 3, %i1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200c0e4: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 200c0e8: 82 0e 40 01 and %i1, %g1, %g1 200c0ec: 80 a6 40 01 cmp %i1, %g1 200c0f0: 02 80 00 1c be 200c160 200c0f4: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200c0f8: 40 00 15 36 call 20115d0 <__errno> 200c0fc: b0 10 3f ff mov -1, %i0 ! ffffffff 200c100: 82 10 20 0d mov 0xd, %g1 200c104: c2 22 00 00 st %g1, [ %o0 ] 200c108: 81 c7 e0 08 ret 200c10c: 81 e8 00 00 restore break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200c110: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200c114: 10 bf ff e2 b 200c09c 200c118: c2 27 60 08 st %g1, [ %i5 + 8 ] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 200c11c: 10 bf ff f2 b 200c0e4 200c120: b3 2e 60 06 sll %i1, 6, %i1 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200c124: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200c128: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <== NOT EXECUTED 200c12c: 10 bf ff dc b 200c09c <== NOT EXECUTED 200c130: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200c134: 03 00 80 75 sethi %hi(0x201d400), %g1 200c138: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 200c13c: 10 bf ff d8 b 200c09c 200c140: c2 27 60 08 st %g1, [ %i5 + 8 ] break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200c144: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 200c148: 10 bf ff d5 b 200c09c <== NOT EXECUTED 200c14c: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 200c150: 40 00 15 20 call 20115d0 <__errno> <== NOT EXECUTED 200c154: 01 00 00 00 nop <== NOT EXECUTED 200c158: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 200c15c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200c160: 81 c7 e0 08 ret 200c164: 81 e8 00 00 restore =============================================================================== 02004574 : off_t IMFS_fifo_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2004574: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 2004578: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200457c: 92 10 00 19 mov %i1, %o1 2004580: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2004584: 98 10 00 18 mov %i0, %o4 2004588: 94 10 00 1a mov %i2, %o2 200458c: 40 00 2f 43 call 2010298 2004590: 96 10 00 1b mov %i3, %o3 2004594: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 2004598: 80 a6 20 00 cmp %i0, 0 200459c: 06 80 00 04 bl 20045ac <== ALWAYS TAKEN 20045a0: b2 10 00 08 mov %o0, %i1 } 20045a4: 81 c7 e0 08 ret <== NOT EXECUTED 20045a8: 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); 20045ac: 40 00 3d ed call 2013d60 <__errno> 20045b0: 31 3f ff ff sethi %hi(0xfffffc00), %i0 20045b4: 82 20 00 19 neg %i1, %g1 20045b8: c2 22 00 00 st %g1, [ %o0 ] 20045bc: b0 16 23 ff or %i0, 0x3ff, %i0 } 20045c0: 81 c7 e0 08 ret 20045c4: 93 e8 00 18 restore %g0, %i0, %o1 =============================================================================== 020045c8 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20045c8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 20045cc: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20045d0: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 20045d4: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 20045d8: 92 10 00 19 mov %i1, %o1 20045dc: 40 00 2e 91 call 2010020 20045e0: 94 10 00 1a mov %i2, %o2 if (err > 0) { 20045e4: b0 92 20 00 orcc %o0, 0, %i0 20045e8: 04 80 00 09 ble 200460c 20045ec: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 20045f0: 40 00 05 64 call 2005b80 20045f4: 92 10 20 00 clr %o1 20045f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 20045fc: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2004600: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2004604: 81 c7 e0 08 ret 2004608: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 200460c: 80 a6 20 00 cmp %i0, 0 2004610: 12 80 00 04 bne 2004620 <== ALWAYS TAKEN 2004614: 01 00 00 00 nop } 2004618: 81 c7 e0 08 ret <== NOT EXECUTED 200461c: 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); 2004620: 40 00 3d d0 call 2013d60 <__errno> 2004624: 01 00 00 00 nop 2004628: 82 20 00 18 neg %i0, %g1 200462c: c2 22 00 00 st %g1, [ %o0 ] } 2004630: 81 c7 e0 08 ret 2004634: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200c8d8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200c8d8: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200c8dc: 13 00 80 75 sethi %hi(0x201d400), %o1 200c8e0: 90 10 00 19 mov %i1, %o0 200c8e4: 40 00 16 e2 call 201246c 200c8e8: 92 12 61 a8 or %o1, 0x1a8, %o1 200c8ec: 80 a2 20 00 cmp %o0, 0 200c8f0: 02 80 00 19 be 200c954 <== NEVER TAKEN 200c8f4: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200c8f8: 13 00 80 75 sethi %hi(0x201d400), %o1 200c8fc: 40 00 16 dc call 201246c 200c900: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 201d5b0 200c904: 80 a2 20 00 cmp %o0, 0 200c908: 02 80 00 12 be 200c950 <== NEVER TAKEN 200c90c: b8 06 20 54 add %i0, 0x54, %i4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200c910: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200c914: 80 a7 40 1c cmp %i5, %i4 200c918: 12 80 00 06 bne 200c930 200c91c: b0 10 20 00 clr %i0 200c920: 30 80 00 0d b,a 200c954 200c924: 80 a7 40 1c cmp %i5, %i4 200c928: 02 80 00 0d be 200c95c 200c92c: 01 00 00 00 nop !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 200c930: 92 07 60 0c add %i5, 0xc, %o1 200c934: 40 00 16 ce call 201246c 200c938: 90 10 00 19 mov %i1, %o0 200c93c: 80 a2 20 00 cmp %o0, 0 200c940: 32 bf ff f9 bne,a 200c924 200c944: fa 07 40 00 ld [ %i5 ], %i5 return the_jnode; } return 0; } 200c948: 81 c7 e0 08 ret 200c94c: 91 e8 00 1d restore %g0, %i5, %o0 if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; 200c950: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200c954: 81 c7 e0 08 ret 200c958: 81 e8 00 00 restore if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 200c95c: 81 c7 e0 08 ret 200c960: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200c7e4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200c7e4: 9d e3 bf 88 save %sp, -120, %sp /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 200c7e8: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 loc = temp_mt_entry->mt_fs_root; 200c7ec: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 200c7f0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c7f4: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 200c7f8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 200c7fc: f8 27 bf ec st %i4, [ %fp + -20 ] 200c800: c8 27 bf f0 st %g4, [ %fp + -16 ] 200c804: c6 27 bf f4 st %g3, [ %fp + -12 ] 200c808: c4 27 bf f8 st %g2, [ %fp + -8 ] 200c80c: c2 27 bf fc st %g1, [ %fp + -4 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 200c810: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; 200c814: fa 07 20 08 ld [ %i4 + 8 ], %i5 loc.node_access = (void *)jnode; 200c818: f8 27 bf ec st %i4, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200c81c: 7f ff fc 37 call 200b8f8 200c820: 90 07 bf ec add %fp, -20, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200c824: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200c828: 80 a0 60 01 cmp %g1, 1 200c82c: 32 80 00 1d bne,a 200c8a0 <== NEVER TAKEN 200c830: 90 10 20 00 clr %o0 <== NOT EXECUTED result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 200c834: c4 07 20 50 ld [ %i4 + 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 ); 200c838: 82 07 20 54 add %i4, 0x54, %g1 200c83c: 80 a0 80 01 cmp %g2, %g1 200c840: 02 80 00 17 be 200c89c 200c844: 80 a7 20 00 cmp %i4, 0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 200c848: 02 80 00 1e be 200c8c0 <== NEVER TAKEN 200c84c: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200c850: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200c854: 80 a0 60 01 cmp %g1, 1 200c858: 32 bf ff f0 bne,a 200c818 <== NEVER TAKEN 200c85c: fa 07 20 08 ld [ %i4 + 8 ], %i5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c860: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c864: 84 07 20 54 add %i4, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200c868: 80 a0 40 02 cmp %g1, %g2 200c86c: 02 bf ff ea be 200c814 200c870: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200c874: 02 80 00 17 be 200c8d0 <== NEVER TAKEN 200c878: b8 10 00 01 mov %g1, %i4 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 200c87c: 90 07 bf ec add %fp, -20, %o0 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200c880: fa 07 20 08 ld [ %i4 + 8 ], %i5 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 200c884: 7f ff fc 1d call 200b8f8 200c888: f8 27 bf ec st %i4, [ %fp + -20 ] if ( jnode->type != IMFS_DIRECTORY ) { 200c88c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200c890: 80 a0 60 01 cmp %g1, 1 200c894: 22 bf ff e9 be,a 200c838 200c898: c4 07 20 50 ld [ %i4 + 0x50 ], %g2 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 200c89c: 90 10 20 00 clr %o0 200c8a0: 7f ff d8 92 call 2002ae8 200c8a4: 92 07 bf ec add %fp, -20, %o1 if (result != 0) 200c8a8: 80 a2 20 00 cmp %o0, 0 200c8ac: 12 80 00 07 bne 200c8c8 <== NEVER TAKEN 200c8b0: b8 10 00 1d mov %i5, %i4 return -1; jnode = next; } if ( jnode != NULL ) { 200c8b4: 80 a7 20 00 cmp %i4, 0 200c8b8: 32 bf ff e7 bne,a 200c854 200c8bc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 } } } while (jnode != NULL); return 0; } 200c8c0: 81 c7 e0 08 ret 200c8c4: 91 e8 20 00 restore %g0, 0, %o0 return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 200c8c8: 81 c7 e0 08 ret <== NOT EXECUTED 200c8cc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 200c8d0: 81 c7 e0 08 ret <== NOT EXECUTED 200c8d4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 0200c964 : const char *path, int pathlen, char *token, int *token_len ) { 200c964: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200c968: ba 10 20 00 clr %i5 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200c96c: 10 80 00 08 b 200c98c 200c970: f8 0e 00 00 ldub [ %i0 ], %i4 200c974: 16 80 00 0c bge 200c9a4 <== NEVER TAKEN 200c978: 80 a7 60 20 cmp %i5, 0x20 token[i] = c; 200c97c: f8 2e 80 1d stb %i4, [ %i2 + %i5 ] if ( i == IMFS_NAME_MAX ) 200c980: 02 80 00 25 be 200ca14 200c984: ba 07 60 01 inc %i5 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 200c988: f8 0e 00 1d ldub [ %i0 + %i5 ], %i4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200c98c: a1 2f 20 18 sll %i4, 0x18, %l0 200c990: 7f ff df 1a call 20045f8 200c994: 91 3c 20 18 sra %l0, 0x18, %o0 200c998: 80 a2 20 00 cmp %o0, 0 200c99c: 02 bf ff f6 be 200c974 200c9a0: 80 a7 40 19 cmp %i5, %i1 /* * Copy a seperator into token. */ if ( i == 0 ) { 200c9a4: 80 a7 60 00 cmp %i5, 0 200c9a8: 12 80 00 0c bne 200c9d8 200c9ac: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200c9b0: 80 a4 20 00 cmp %l0, 0 200c9b4: 02 80 00 1a be 200ca1c 200c9b8: f8 2e 80 00 stb %i4, [ %i2 ] 200c9bc: 80 a6 60 00 cmp %i1, 0 200c9c0: 22 80 00 18 be,a 200ca20 200c9c4: fa 26 c0 00 st %i5, [ %i3 ] i++; 200c9c8: ba 10 20 01 mov 1, %i5 /* * Set token_len to the number of characters copied. */ *token_len = i; 200c9cc: fa 26 c0 00 st %i5, [ %i3 ] if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 200c9d0: 81 c7 e0 08 ret 200c9d4: 91 e8 20 01 restore %g0, 1, %o0 } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 200c9d8: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200c9dc: 80 a0 60 00 cmp %g1, 0 200c9e0: 32 80 00 02 bne,a 200c9e8 <== ALWAYS TAKEN 200c9e4: c0 2e 80 1d clrb [ %i2 + %i5 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 200c9e8: fa 26 c0 00 st %i5, [ %i3 ] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 200c9ec: 90 10 00 1a mov %i2, %o0 200c9f0: 13 00 80 75 sethi %hi(0x201d400), %o1 type = IMFS_UP_DIR; 200c9f4: b0 10 20 02 mov 2, %i0 * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 200c9f8: 40 00 16 9d call 201246c 200c9fc: 92 12 61 c0 or %o1, 0x1c0, %o1 200ca00: 80 a2 20 00 cmp %o0, 0 200ca04: 12 80 00 09 bne 200ca28 200ca08: 90 10 00 1a mov %i2, %o0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200ca0c: 81 c7 e0 08 ret 200ca10: 81 e8 00 00 restore 200ca14: 81 c7 e0 08 ret 200ca18: 91 e8 20 04 restore %g0, 4, %o0 /* * Set token_len to the number of characters copied. */ *token_len = i; 200ca1c: fa 26 c0 00 st %i5, [ %i3 ] if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200ca20: 81 c7 e0 08 ret 200ca24: 91 e8 20 00 restore %g0, 0, %o0 */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200ca28: 13 00 80 75 sethi %hi(0x201d400), %o1 200ca2c: 40 00 16 90 call 201246c 200ca30: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 201d5b8 200ca34: 80 a0 00 08 cmp %g0, %o0 200ca38: b0 40 3f ff addx %g0, -1, %i0 200ca3c: b0 0e 3f fe and %i0, -2, %i0 200ca40: 81 c7 e0 08 ret 200ca44: 91 ee 20 03 restore %i0, 3, %o0 =============================================================================== 020026c4 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 20026c4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 20026c8: 03 00 80 7a sethi %hi(0x201e800), %g1 20026cc: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 201e888 /* * 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) { 20026d0: 80 a0 60 10 cmp %g1, 0x10 20026d4: 02 80 00 0d be 2002708 20026d8: 86 10 20 05 mov 5, %g3 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 20026dc: 80 a0 60 0f cmp %g1, 0xf 20026e0: 04 80 00 09 ble 2002704 20026e4: 84 10 20 20 mov 0x20, %g2 /* * 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) { 20026e8: 80 a0 40 02 cmp %g1, %g2 20026ec: 22 80 00 08 be,a 200270c 20026f0: 05 00 80 7c sethi %hi(0x201f000), %g2 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 20026f4: 06 80 00 04 bl 2002704 <== NEVER TAKEN 20026f8: 86 80 ff ff addcc %g3, -1, %g3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 20026fc: 12 bf ff fb bne 20026e8 <== ALWAYS TAKEN 2002700: 85 28 a0 01 sll %g2, 1, %g2 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 2002704: 82 10 20 80 mov 0x80, %g1 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002708: 05 00 80 7c sethi %hi(0x201f000), %g2 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 200270c: 40 00 24 1f call 200b788 2002710: c2 20 a0 84 st %g1, [ %g2 + 0x84 ] ! 201f084 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002714: 94 10 20 30 mov 0x30, %o2 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 2002718: d0 26 20 1c st %o0, [ %i0 + 0x1c ] 200271c: ba 10 00 08 mov %o0, %i5 temp_mt_entry->mt_fs_root.handlers = directory_handlers; 2002720: f6 26 20 24 st %i3, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = op_table; 2002724: f2 26 20 28 st %i1, [ %i0 + 0x28 ] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002728: 90 06 20 38 add %i0, 0x38, %o0 200272c: 13 00 80 75 sethi %hi(0x201d400), %o1 2002730: 40 00 3e 04 call 2011f40 2002734: 92 12 61 78 or %o1, 0x178, %o1 ! 201d578 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 2002738: 90 10 20 01 mov 1, %o0 200273c: 40 00 01 ca call 2002e64 2002740: 92 10 20 14 mov 0x14, %o1 if ( !fs_info ) { 2002744: 80 a2 20 00 cmp %o0, 0 2002748: 02 80 00 0f be 2002784 200274c: 03 00 80 7c sethi %hi(0x201f000), %g1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 2002750: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 ! 201f088 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 2002754: d0 26 20 34 st %o0, [ %i0 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 2002758: 84 10 20 01 mov 1, %g2 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200275c: c6 22 00 00 st %g3, [ %o0 ] fs_info->ino_count = 1; 2002760: c4 22 20 04 st %g2, [ %o0 + 4 ] fs_info->memfile_handlers = memfile_handlers; 2002764: f4 22 20 08 st %i2, [ %o0 + 8 ] fs_info->directory_handlers = directory_handlers; 2002768: f6 22 20 0c st %i3, [ %o0 + 0xc ] fs_info->fifo_handlers = fifo_handlers; 200276c: f8 22 20 10 st %i4, [ %o0 + 0x10 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 2002770: 86 00 e0 01 inc %g3 fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 2002774: c4 27 60 38 st %g2, [ %i5 + 0x38 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 2002778: c6 20 60 88 st %g3, [ %g1 + 0x88 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 200277c: 81 c7 e0 08 ret 2002780: 91 e8 20 00 restore %g0, 0, %o0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 2002784: 40 00 02 db call 20032f0 2002788: 90 10 00 1d mov %i5, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 200278c: 40 00 3b 91 call 20115d0 <__errno> 2002790: b0 10 3f ff mov -1, %i0 2002794: 82 10 20 0c mov 0xc, %g1 2002798: c2 22 00 00 st %g1, [ %o0 ] 200279c: 81 c7 e0 08 ret 20027a0: 81 e8 00 00 restore =============================================================================== 0200f770 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 200f770: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f774: 3b 00 80 7c sethi %hi(0x201f000), %i5 <== NOT EXECUTED 200f778: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 ! 201f084 <== NOT EXECUTED 200f77c: 83 32 60 02 srl %o1, 2, %g1 <== NOT EXECUTED 200f780: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200f784: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200f788: 18 80 00 0e bgu 200f7c0 <== NOT EXECUTED 200f78c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED p = info->indirect; 200f790: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( malloc_it ) { if ( !p ) { 200f794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200f798: 22 80 00 1f be,a 200f814 <== NOT EXECUTED 200f79c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f7a0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 200f7a4: b8 02 00 19 add %o0, %i1, %i4 <== NOT EXECUTED /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 200f7a8: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 200f7ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200f7b0: 02 80 00 0c be 200f7e0 <== NOT EXECUTED 200f7b4: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 200f7b8: 81 c7 e0 08 ret <== NOT EXECUTED 200f7bc: 81 e8 00 00 restore <== NOT EXECUTED p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f7c0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f7c4: 7f ff fd ff call 200efc0 <== NOT EXECUTED 200f7c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 200f7cc: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 200f7d0: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 200f7d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200f7d8: 12 bf ff f8 bne 200f7b8 <== NOT EXECUTED 200f7dc: b0 10 20 00 clr %i0 <== NOT EXECUTED void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f7e0: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 <== NOT EXECUTED 200f7e4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200f7e8: 7f ff cd 9f call 2002e64 <== NOT EXECUTED 200f7ec: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( memory ) 200f7f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200f7f4: 02 bf ff f1 be 200f7b8 <== NOT EXECUTED 200f7f8: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED memfile_blocks_allocated++; 200f7fc: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED 200f800: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200f804: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED */ memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 200f808: d0 27 00 00 st %o0, [ %i4 ] <== NOT EXECUTED return 0; } 200f80c: 81 c7 e0 08 ret <== NOT EXECUTED 200f810: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f814: 7f ff cd 94 call 2002e64 <== NOT EXECUTED 200f818: b8 10 20 00 clr %i4 <== NOT EXECUTED if ( memory ) 200f81c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200f820: 02 bf ff ec be 200f7d0 <== NOT EXECUTED 200f824: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED memfile_blocks_allocated++; 200f828: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f82c: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f830: 84 00 a0 01 inc %g2 <== NOT EXECUTED if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; 200f834: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f838: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f83c: 10 bf ff db b 200f7a8 <== NOT EXECUTED 200f840: b8 02 00 19 add %o0, %i1, %i4 <== NOT EXECUTED =============================================================================== 0200f6c8 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200f6c8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f6cc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200f6d0: fa 00 60 84 ld [ %g1 + 0x84 ], %i5 ! 201f084 <== NOT EXECUTED 200f6d4: b9 37 60 02 srl %i5, 2, %i4 <== NOT EXECUTED 200f6d8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200f6dc: 40 00 2b 16 call 201a334 <.umul> <== NOT EXECUTED 200f6e0: 90 07 20 01 add %i4, 1, %o0 <== NOT EXECUTED 200f6e4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200f6e8: 40 00 2b 13 call 201a334 <.umul> <== NOT EXECUTED 200f6ec: 90 02 20 01 inc %o0 <== NOT EXECUTED 200f6f0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 200f6f4: 40 00 2b 10 call 201a334 <.umul> <== NOT EXECUTED 200f6f8: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 200f6fc: 82 10 20 00 clr %g1 <== NOT EXECUTED 200f700: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 200f704: 04 80 00 10 ble 200f744 <== NOT EXECUTED 200f708: 01 00 00 00 nop <== NOT EXECUTED 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 ) 200f70c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED 200f710: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 200f714: 16 80 00 04 bge 200f724 <== NOT EXECUTED 200f718: 01 00 00 00 nop <== NOT EXECUTED 200f71c: 7f ff fe cb call 200f248 <== NOT EXECUTED 200f720: 81 e8 00 00 restore <== NOT EXECUTED 200f724: 12 80 00 06 bne 200f73c <== NOT EXECUTED 200f728: 01 00 00 00 nop <== NOT EXECUTED 200f72c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 200f730: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 200f734: 0a bf ff fa bcs 200f71c <== NOT EXECUTED 200f738: 01 00 00 00 nop <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 200f73c: 81 c7 e0 08 ret <== NOT EXECUTED 200f740: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f744: 12 80 00 05 bne 200f758 <== NOT EXECUTED 200f748: 01 00 00 00 nop <== NOT EXECUTED 200f74c: 80 a2 00 1a cmp %o0, %i2 <== NOT EXECUTED 200f750: 38 bf ff f0 bgu,a 200f710 <== NOT EXECUTED 200f754: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 200f758: 40 00 07 9e call 20115d0 <__errno> <== NOT EXECUTED 200f75c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f760: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200f764: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f768: 81 c7 e0 08 ret <== NOT EXECUTED 200f76c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f248 : * * This routine insures that the in-memory file is of the length * specified. If necessary, it will allocate memory blocks to * extend the file. */ MEMFILE_STATIC int IMFS_memfile_extend( 200f248: 9d e3 bf 98 save %sp, -104, %sp return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f24c: 21 00 80 7c sethi %hi(0x201f000), %l0 200f250: f6 04 20 84 ld [ %l0 + 0x84 ], %i3 ! 201f084 * * This routine insures that the in-memory file is of the length * specified. If necessary, it will allocate memory blocks to * extend the file. */ MEMFILE_STATIC int IMFS_memfile_extend( 200f254: b8 10 00 19 mov %i1, %i4 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f258: 96 10 00 1b mov %i3, %o3 200f25c: b3 3e e0 1f sra %i3, 0x1f, %i1 200f260: 92 10 00 1a mov %i2, %o1 200f264: 94 10 00 19 mov %i1, %o2 200f268: 40 00 2d c5 call 201a97c <__divdi3> 200f26c: 90 10 00 1c mov %i4, %o0 * * This routine insures that the in-memory file is of the length * specified. If necessary, it will allocate memory blocks to * extend the file. */ MEMFILE_STATIC int IMFS_memfile_extend( 200f270: ba 10 00 1a mov %i2, %i5 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f274: b4 10 00 09 mov %o1, %i2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f278: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0 200f27c: 94 10 00 19 mov %i1, %o2 200f280: 40 00 2d bf call 201a97c <__divdi3> 200f284: 96 10 00 1b mov %i3, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f288: 80 a6 80 09 cmp %i2, %o1 200f28c: 0a 80 00 33 bcs 200f358 <== NEVER TAKEN 200f290: a4 10 00 09 mov %o1, %l2 200f294: b2 10 00 09 mov %o1, %i1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f298: 83 36 e0 02 srl %i3, 2, %g1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f29c: a3 2a 60 02 sll %o1, 2, %l1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f2a0: 82 00 7f ff add %g1, -1, %g1 200f2a4: 80 a0 40 19 cmp %g1, %i1 200f2a8: 0a 80 00 15 bcs 200f2fc 200f2ac: 29 00 80 7c sethi %hi(0x201f000), %l4 p = info->indirect; 200f2b0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( malloc_it ) { if ( !p ) { 200f2b4: 80 a2 20 00 cmp %o0, 0 200f2b8: 02 80 00 36 be 200f390 200f2bc: 92 10 00 1b mov %i3, %o1 p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f2c0: b6 02 00 11 add %o0, %l1, %i3 /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 200f2c4: c2 06 c0 00 ld [ %i3 ], %g1 200f2c8: 80 a0 60 00 cmp %g1, 0 200f2cc: 02 80 00 16 be 200f324 200f2d0: d2 04 20 84 ld [ %l0 + 0x84 ], %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f2d4: b2 06 60 01 inc %i1 200f2d8: 80 a6 80 19 cmp %i2, %i1 200f2dc: 0a 80 00 1f bcs 200f358 200f2e0: a2 04 60 04 add %l1, 4, %l1 200f2e4: f6 04 20 84 ld [ %l0 + 0x84 ], %i3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f2e8: 83 36 e0 02 srl %i3, 2, %g1 200f2ec: 82 00 7f ff add %g1, -1, %g1 200f2f0: 80 a0 40 19 cmp %g1, %i1 200f2f4: 3a bf ff f0 bcc,a 200f2b4 200f2f8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 200f2fc: 90 10 00 18 mov %i0, %o0 200f300: 92 10 00 19 mov %i1, %o1 200f304: 7f ff ff 2f call 200efc0 200f308: 94 10 20 01 mov 1, %o2 200f30c: b6 10 00 08 mov %o0, %i3 /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 200f310: c2 06 c0 00 ld [ %i3 ], %g1 200f314: 80 a0 60 00 cmp %g1, 0 200f318: 32 bf ff f0 bne,a 200f2d8 200f31c: b2 06 60 01 inc %i1 void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f320: d2 04 20 84 ld [ %l0 + 0x84 ], %o1 200f324: 90 10 20 01 mov 1, %o0 200f328: 7f ff ce cf call 2002e64 200f32c: a6 14 20 84 or %l0, 0x84, %l3 if ( memory ) 200f330: 80 a2 20 00 cmp %o0, 0 200f334: 02 80 00 21 be 200f3b8 200f338: c2 05 21 94 ld [ %l4 + 0x194 ], %g1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f33c: b2 06 60 01 inc %i1 { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f340: 82 00 60 01 inc %g1 200f344: c2 25 21 94 st %g1, [ %l4 + 0x194 ] */ memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 200f348: d0 26 c0 00 st %o0, [ %i3 ] old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f34c: 80 a6 80 19 cmp %i2, %i1 200f350: 1a bf ff e5 bcc 200f2e4 200f354: a2 04 60 04 add %l1, 4, %l1 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200f358: f8 3e 20 50 std %i4, [ %i0 + 0x50 ] IMFS_update_ctime(the_jnode); 200f35c: 92 10 20 00 clr %o1 200f360: 7f ff d0 0e call 2003398 200f364: 90 07 bf f8 add %fp, -8, %o0 200f368: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200f36c: 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); 200f370: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200f374: 7f ff d0 09 call 2003398 200f378: 92 10 20 00 clr %o1 200f37c: c4 07 bf f8 ld [ %fp + -8 ], %g2 return 0; 200f380: 82 10 20 00 clr %g1 * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); 200f384: c4 26 20 44 st %g2, [ %i0 + 0x44 ] return 0; } 200f388: 81 c7 e0 08 ret 200f38c: 91 e8 00 01 restore %g0, %g1, %o0 void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f390: 90 10 20 01 mov 1, %o0 200f394: 7f ff ce b4 call 2002e64 200f398: b6 10 20 00 clr %i3 if ( memory ) 200f39c: 80 a2 20 00 cmp %o0, 0 200f3a0: 02 bf ff c9 be 200f2c4 <== NEVER TAKEN 200f3a4: c2 05 21 94 ld [ %l4 + 0x194 ], %g1 if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; 200f3a8: d0 26 20 58 st %o0, [ %i0 + 0x58 ] { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f3ac: 82 00 60 01 inc %g1 200f3b0: 10 bf ff c4 b 200f2c0 200f3b4: c2 25 21 94 st %g1, [ %l4 + 0x194 ] /* * 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-- ) { 200f3b8: 80 a4 80 19 cmp %l2, %i1 200f3bc: 18 80 00 29 bgu 200f460 <== NEVER TAKEN 200f3c0: 01 00 00 00 nop 200f3c4: 37 00 80 7c sethi %hi(0x201f000), %i3 200f3c8: b9 2e 60 02 sll %i1, 2, %i4 200f3cc: 10 80 00 10 b 200f40c 200f3d0: b6 16 e1 94 or %i3, 0x194, %i3 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 200f3d4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200f3d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200f3dc: 32 80 00 02 bne,a 200f3e4 <== NOT EXECUTED 200f3e0: 82 00 80 1c add %g2, %i4, %g1 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; 200f3e4: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED */ void memfile_free_block( void *memory ) { free(memory); 200f3e8: 7f ff cf c2 call 20032f0 <== NOT EXECUTED 200f3ec: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED memfile_blocks_allocated--; 200f3f0: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED /* * 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-- ) { 200f3f4: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED void memfile_free_block( void *memory ) { free(memory); memfile_blocks_allocated--; 200f3f8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200f3fc: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED /* * 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-- ) { 200f400: 80 a4 80 19 cmp %l2, %i1 <== NOT EXECUTED 200f404: 18 80 00 17 bgu 200f460 <== NOT EXECUTED 200f408: b8 07 3f fc add %i4, -4, %i4 <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f40c: c4 04 c0 00 ld [ %l3 ], %g2 200f410: 85 30 a0 02 srl %g2, 2, %g2 200f414: 84 00 bf ff add %g2, -1, %g2 200f418: 80 a0 80 19 cmp %g2, %i1 200f41c: 1a bf ff ee bcc 200f3d4 <== NEVER TAKEN 200f420: 82 10 20 00 clr %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 200f424: 92 10 00 19 mov %i1, %o1 200f428: 94 10 20 00 clr %o2 200f42c: 7f ff fe e5 call 200efc0 200f430: 90 10 00 18 mov %i0, %o0 200f434: 82 10 00 08 mov %o0, %g1 block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; 200f438: d0 00 40 00 ld [ %g1 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200f43c: 7f ff cf ad call 20032f0 200f440: c0 20 40 00 clr [ %g1 ] memfile_blocks_allocated--; 200f444: c2 06 c0 00 ld [ %i3 ], %g1 /* * 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-- ) { 200f448: b2 06 7f ff add %i1, -1, %i1 void memfile_free_block( void *memory ) { free(memory); memfile_blocks_allocated--; 200f44c: 82 00 7f ff add %g1, -1, %g1 200f450: c2 26 c0 00 st %g1, [ %i3 ] /* * 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-- ) { 200f454: 80 a4 80 19 cmp %l2, %i1 200f458: 08 bf ff ed bleu 200f40c 200f45c: b8 07 3f fc add %i4, -4, %i4 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200f460: 40 00 08 5c call 20115d0 <__errno> 200f464: 01 00 00 00 nop 200f468: 82 10 3f ff mov -1, %g1 ! ffffffff 200f46c: 84 10 20 1c mov 0x1c, %g2 200f470: c4 22 00 00 st %g2, [ %o0 ] the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 200f474: 81 c7 e0 08 ret 200f478: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 02010368 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 2010368: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 201036c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2010370: d2 00 60 84 ld [ %g1 + 0x84 ], %o1 ! 201f084 <== NOT EXECUTED #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 2010374: ba 10 00 19 mov %i1, %i5 <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 2010378: 83 32 60 02 srl %o1, 2, %g1 <== NOT EXECUTED 201037c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2010380: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2010384: 18 80 00 0b bgu 20103b0 <== NOT EXECUTED 2010388: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { 201038c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2010390: 12 80 00 0a bne 20103b8 <== NOT EXECUTED 2010394: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 2010398: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201039c: 02 80 00 16 be 20103f4 <== NOT EXECUTED 20103a0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; return &info->indirect[ my_block ]; 20103a4: bb 2f 60 02 sll %i5, 2, %i5 <== NOT EXECUTED 20103a8: 81 c7 e0 08 ret <== NOT EXECUTED 20103ac: 91 ea 00 1d restore %o0, %i5, %o0 <== NOT EXECUTED 20103b0: 7f ff fb 04 call 200efc0 <== NOT EXECUTED 20103b4: 81 e8 00 00 restore <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { 20103b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20103bc: 32 bf ff fb bne,a 20103a8 <== NOT EXECUTED 20103c0: bb 2f 60 02 sll %i5, 2, %i5 <== NOT EXECUTED void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 20103c4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 20103c8: 7f ff ca a7 call 2002e64 <== NOT EXECUTED 20103cc: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( memory ) 20103d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20103d4: 02 80 00 08 be 20103f4 <== NOT EXECUTED 20103d8: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated++; 20103dc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 20103e0: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; 20103e4: d0 27 20 58 st %o0, [ %i4 + 0x58 ] <== NOT EXECUTED { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 20103e8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 20103ec: 10 bf ff ee b 20103a4 <== NOT EXECUTED 20103f0: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 20103f4: 81 c7 e0 08 ret <== NOT EXECUTED 20103f8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200efc0 : return p; } block_p *IMFS_memfile_get_block_pointer_DEBUG( #else block_p *IMFS_memfile_get_block_pointer( 200efc0: 9d e3 bf a0 save %sp, -96, %sp /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200efc4: 3b 00 80 7c sethi %hi(0x201f000), %i5 200efc8: f8 07 60 84 ld [ %i5 + 0x84 ], %i4 ! 201f084 return p; } block_p *IMFS_memfile_get_block_pointer_DEBUG( #else block_p *IMFS_memfile_get_block_pointer( 200efcc: a2 10 00 18 mov %i0, %l1 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200efd0: b7 37 20 02 srl %i4, 2, %i3 200efd4: 90 06 e0 01 add %i3, 1, %o0 200efd8: 40 00 2c d7 call 201a334 <.umul> 200efdc: 92 10 00 1b mov %i3, %o1 200efe0: 82 02 3f ff add %o0, -1, %g1 200efe4: 80 a0 40 19 cmp %g1, %i1 200efe8: 0a 80 00 19 bcs 200f04c 200efec: a0 10 00 08 mov %o0, %l0 my_block -= FIRST_DOUBLY_INDIRECT; 200eff0: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200eff4: 92 10 00 1b mov %i3, %o1 200eff8: 40 00 2d b5 call 201a6cc <.urem> 200effc: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200f000: 92 10 00 1b mov %i3, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200f004: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200f008: 40 00 2d 05 call 201a41c <.udiv> 200f00c: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; 200f010: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 if ( malloc_it ) { 200f014: 80 a6 a0 00 cmp %i2, 0 200f018: 02 80 00 46 be 200f130 200f01c: b6 10 00 08 mov %o0, %i3 if ( !p ) { 200f020: 80 a0 60 00 cmp %g1, 0 200f024: 02 80 00 66 be 200f1bc 200f028: 90 10 20 01 mov 1, %o0 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 200f02c: b7 2e e0 02 sll %i3, 2, %i3 200f030: d0 00 40 1b ld [ %g1 + %i3 ], %o0 if ( !p1 ) { 200f034: 80 a2 20 00 cmp %o0, 0 200f038: 02 80 00 49 be 200f15c 200f03c: b6 00 40 1b add %g1, %i3, %i3 if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 200f040: b1 2c 20 02 sll %l0, 2, %i0 200f044: 81 c7 e0 08 ret 200f048: 91 ea 00 18 restore %o0, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200f04c: 90 02 20 01 inc %o0 200f050: 40 00 2c b9 call 201a334 <.umul> 200f054: 92 10 00 1b mov %i3, %o1 200f058: 90 02 3f ff add %o0, -1, %o0 200f05c: 80 a6 40 08 cmp %i1, %o0 200f060: 18 80 00 32 bgu 200f128 <== NEVER TAKEN 200f064: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200f068: b2 26 40 10 sub %i1, %l0, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200f06c: 92 10 00 1b mov %i3, %o1 200f070: 40 00 2d 97 call 201a6cc <.urem> 200f074: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200f078: 92 10 00 1b mov %i3, %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; 200f07c: a4 10 00 08 mov %o0, %l2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200f080: 40 00 2c e7 call 201a41c <.udiv> 200f084: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200f088: 92 10 00 1b mov %i3, %o1 200f08c: 40 00 2c e4 call 201a41c <.udiv> 200f090: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200f094: 92 10 00 1b mov %i3, %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; 200f098: a0 10 00 08 mov %o0, %l0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200f09c: 40 00 2d 8c call 201a6cc <.urem> 200f0a0: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; 200f0a4: c2 04 60 60 ld [ %l1 + 0x60 ], %g1 if ( malloc_it ) { 200f0a8: 80 a6 a0 00 cmp %i2, 0 200f0ac: 02 80 00 12 be 200f0f4 200f0b0: b6 10 00 08 mov %o0, %i3 if ( !p ) { 200f0b4: 80 a0 60 00 cmp %g1, 0 200f0b8: 02 80 00 4d be 200f1ec 200f0bc: 90 10 20 01 mov 1, %o0 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 200f0c0: a1 2c 20 02 sll %l0, 2, %l0 200f0c4: c4 00 40 10 ld [ %g1 + %l0 ], %g2 if ( !p1 ) { 200f0c8: 80 a0 a0 00 cmp %g2, 0 200f0cc: 02 80 00 52 be 200f214 200f0d0: a0 00 40 10 add %g1, %l0, %l0 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 200f0d4: b7 2e e0 02 sll %i3, 2, %i3 200f0d8: d0 00 80 1b ld [ %g2 + %i3 ], %o0 if ( !p2 ) { 200f0dc: 80 a2 20 00 cmp %o0, 0 200f0e0: 02 80 00 2b be 200f18c 200f0e4: b6 00 80 1b add %g2, %i3, %i3 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 200f0e8: b1 2c a0 02 sll %l2, 2, %i0 200f0ec: 81 c7 e0 08 ret 200f0f0: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200f0f4: 80 a0 60 00 cmp %g1, 0 200f0f8: 02 80 00 0c be 200f128 <== NEVER TAKEN 200f0fc: a1 2c 20 02 sll %l0, 2, %l0 return 0; p1 = (block_p *) p[ triply ]; 200f100: c2 00 40 10 ld [ %g1 + %l0 ], %g1 if ( !p1 ) 200f104: 80 a0 60 00 cmp %g1, 0 200f108: 02 80 00 08 be 200f128 <== NEVER TAKEN 200f10c: b7 2a 20 02 sll %o0, 2, %i3 return 0; p2 = (block_p *)p1[ doubly ]; 200f110: c2 00 40 1b ld [ %g1 + %i3 ], %g1 if ( !p2 ) 200f114: 80 a0 60 00 cmp %g1, 0 200f118: 02 80 00 04 be 200f128 <== NEVER TAKEN 200f11c: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200f120: b1 2c a0 02 sll %l2, 2, %i0 200f124: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200f128: 81 c7 e0 08 ret 200f12c: 81 e8 00 00 restore } return (block_p *)&p1[ singly ]; } if ( !p ) 200f130: 80 a0 60 00 cmp %g1, 0 200f134: 02 bf ff fd be 200f128 <== NEVER TAKEN 200f138: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200f13c: b7 2a 20 02 sll %o0, 2, %i3 200f140: c2 00 40 1b ld [ %g1 + %i3 ], %g1 if ( !p ) 200f144: 80 a0 60 00 cmp %g1, 0 200f148: 02 bf ff f8 be 200f128 <== NEVER TAKEN 200f14c: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200f150: b1 2c 20 02 sll %l0, 2, %i0 200f154: 81 c7 e0 08 ret 200f158: 91 e8 40 18 restore %g1, %i0, %o0 void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f15c: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 200f160: 90 10 20 01 mov 1, %o0 200f164: 7f ff cf 40 call 2002e64 200f168: b0 10 20 00 clr %i0 if ( memory ) 200f16c: 80 a2 20 00 cmp %o0, 0 200f170: 02 bf ff ee be 200f128 <== NEVER TAKEN 200f174: 03 00 80 7c sethi %hi(0x201f000), %g1 memfile_blocks_allocated++; 200f178: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 200f17c: 84 00 a0 01 inc %g2 200f180: c4 20 61 94 st %g2, [ %g1 + 0x194 ] p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; 200f184: 10 bf ff af b 200f040 200f188: d0 26 c0 00 st %o0, [ %i3 ] void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f18c: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 200f190: 90 10 20 01 mov 1, %o0 200f194: 7f ff cf 34 call 2002e64 200f198: b0 10 20 00 clr %i0 if ( memory ) 200f19c: 80 a2 20 00 cmp %o0, 0 200f1a0: 02 bf ff e2 be 200f128 <== NEVER TAKEN 200f1a4: 03 00 80 7c sethi %hi(0x201f000), %g1 memfile_blocks_allocated++; 200f1a8: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 200f1ac: 84 00 a0 01 inc %g2 200f1b0: c4 20 61 94 st %g2, [ %g1 + 0x194 ] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; 200f1b4: 10 bf ff cd b 200f0e8 200f1b8: d0 26 c0 00 st %o0, [ %i3 ] void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f1bc: 92 10 00 1c mov %i4, %o1 200f1c0: 7f ff cf 29 call 2002e64 200f1c4: b0 10 20 00 clr %i0 if ( memory ) 200f1c8: 80 a2 20 00 cmp %o0, 0 200f1cc: 02 bf ff d7 be 200f128 <== NEVER TAKEN 200f1d0: 82 10 00 08 mov %o0, %g1 memfile_blocks_allocated++; 200f1d4: 05 00 80 7c sethi %hi(0x201f000), %g2 200f1d8: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 ! 201f194 if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; info->doubly_indirect = p; 200f1dc: d0 24 60 5c st %o0, [ %l1 + 0x5c ] { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f1e0: 86 00 e0 01 inc %g3 200f1e4: 10 bf ff 92 b 200f02c 200f1e8: c6 20 a1 94 st %g3, [ %g2 + 0x194 ] void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f1ec: 7f ff cf 1e call 2002e64 200f1f0: 92 10 00 1c mov %i4, %o1 if ( memory ) 200f1f4: 82 92 20 00 orcc %o0, 0, %g1 200f1f8: 02 bf ff cc be 200f128 <== NEVER TAKEN 200f1fc: 05 00 80 7c sethi %hi(0x201f000), %g2 memfile_blocks_allocated++; 200f200: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 ! 201f194 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; info->triply_indirect = p; 200f204: c2 24 60 60 st %g1, [ %l1 + 0x60 ] { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); if ( memory ) memfile_blocks_allocated++; 200f208: 86 00 e0 01 inc %g3 200f20c: 10 bf ff ad b 200f0c0 200f210: c6 20 a1 94 st %g3, [ %g2 + 0x194 ] void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200f214: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 200f218: 90 10 20 01 mov 1, %o0 200f21c: 7f ff cf 12 call 2002e64 200f220: b0 10 20 00 clr %i0 if ( memory ) 200f224: 80 a2 20 00 cmp %o0, 0 200f228: 02 bf ff c0 be 200f128 <== NEVER TAKEN 200f22c: 84 10 00 08 mov %o0, %g2 memfile_blocks_allocated++; 200f230: 03 00 80 7c sethi %hi(0x201f000), %g1 200f234: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 201f194 200f238: 86 00 e0 01 inc %g3 200f23c: c6 20 61 94 st %g3, [ %g1 + 0x194 ] p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; p[ triply ] = (block_p) p1; 200f240: 10 bf ff a5 b 200f0d4 200f244: d0 24 00 00 st %o0, [ %l0 ] =============================================================================== 0200fcdc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200fcdc: 9d e3 bf 98 save %sp, -104, %sp * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 200fce0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200fce4: ba 10 00 18 mov %i0, %i5 200fce8: a0 10 00 19 mov %i1, %l0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 200fcec: 80 a0 60 06 cmp %g1, 6 200fcf0: 02 80 00 7f be 200feec 200fcf4: 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 ) 200fcf8: 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; 200fcfc: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200fd00: 86 10 20 00 clr %g3 200fd04: c8 06 20 54 ld [ %i0 + 0x54 ], %g4 200fd08: 80 a0 c0 02 cmp %g3, %g2 200fd0c: 04 80 00 55 ble 200fe60 <== ALWAYS TAKEN 200fd10: b4 07 00 1a add %i4, %i2, %i2 my_length = the_jnode->info.file.size - start; 200fd14: 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; 200fd18: 33 00 80 7c sethi %hi(0x201f000), %i1 <== NOT EXECUTED 200fd1c: f4 06 60 84 ld [ %i1 + 0x84 ], %i2 ! 201f084 200fd20: 90 10 00 10 mov %l0, %o0 200fd24: b1 3e a0 1f sra %i2, 0x1f, %i0 200fd28: 92 10 00 11 mov %l1, %o1 200fd2c: 94 10 00 18 mov %i0, %o2 200fd30: 40 00 2b f9 call 201ad14 <__moddi3> 200fd34: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200fd38: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200fd3c: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200fd40: 94 10 00 18 mov %i0, %o2 200fd44: 92 10 00 11 mov %l1, %o1 200fd48: 40 00 2b 0d call 201a97c <__divdi3> 200fd4c: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200fd50: 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; 200fd54: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200fd58: 80 a4 a0 00 cmp %l2, 0 200fd5c: 02 80 00 1b be 200fdc8 200fd60: b0 10 20 00 clr %i0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200fd64: 83 36 a0 02 srl %i2, 2, %g1 200fd68: 82 00 7f ff add %g1, -1, %g1 200fd6c: 80 a2 40 01 cmp %o1, %g1 200fd70: 28 80 00 72 bleu,a 200ff38 200fd74: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 200fd78: 90 10 00 1d mov %i5, %o0 200fd7c: 7f ff fc 91 call 200efc0 200fd80: 94 10 20 00 clr %o2 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 ); if ( !block_ptr ) 200fd84: 80 a2 20 00 cmp %o0, 0 200fd88: 02 80 00 34 be 200fe58 <== NEVER TAKEN 200fd8c: 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200fd90: b4 26 80 12 sub %i2, %l2, %i2 200fd94: 80 a7 00 1a cmp %i4, %i2 200fd98: 08 80 00 03 bleu 200fda4 200fd9c: b0 10 00 1c mov %i4, %i0 200fda0: b0 10 00 1a mov %i2, %i0 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200fda4: d2 02 00 00 ld [ %o0 ], %o1 200fda8: 94 10 00 18 mov %i0, %o2 200fdac: 90 10 00 1b mov %i3, %o0 200fdb0: 40 00 08 64 call 2011f40 200fdb4: 92 02 40 12 add %o1, %l2, %o1 dest += to_copy; block++; my_length -= to_copy; 200fdb8: f4 06 60 84 ld [ %i1 + 0x84 ], %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; 200fdbc: a2 06 c0 18 add %i3, %i0, %l1 block++; 200fdc0: a0 04 20 01 inc %l0 my_length -= to_copy; 200fdc4: 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 ) { 200fdc8: 80 a7 00 1a cmp %i4, %i2 200fdcc: 0a 80 00 2c bcs 200fe7c 200fdd0: b7 2c 20 02 sll %l0, 2, %i3 200fdd4: 10 80 00 13 b 200fe20 200fdd8: 82 10 00 1a mov %i2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200fddc: 80 a0 60 00 cmp %g1, 0 200fde0: 02 80 00 1e be 200fe58 <== NEVER TAKEN 200fde4: 82 00 40 1b add %g1, %i3, %g1 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 ); 200fde8: 90 10 00 11 mov %l1, %o0 * 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 ); if ( !block_ptr ) 200fdec: 80 a0 60 00 cmp %g1, 0 200fdf0: 02 80 00 1a be 200fe58 <== NEVER TAKEN 200fdf4: 94 10 00 1a mov %i2, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200fdf8: d2 00 40 00 ld [ %g1 ], %o1 200fdfc: 40 00 08 51 call 2011f40 200fe00: 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 ) { 200fe04: c2 06 60 84 ld [ %i1 + 0x84 ], %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; 200fe08: a2 04 40 1a add %l1, %i2, %l1 block++; 200fe0c: a0 04 20 01 inc %l0 my_length -= to_copy; copied += to_copy; 200fe10: b0 06 00 1a add %i0, %i2, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200fe14: 80 a0 40 1c cmp %g1, %i4 200fe18: 18 80 00 1a bgu 200fe80 200fe1c: b6 06 e0 04 add %i3, 4, %i3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200fe20: 83 30 60 02 srl %g1, 2, %g1 200fe24: 82 00 7f ff add %g1, -1, %g1 200fe28: 80 a4 00 01 cmp %l0, %g1 200fe2c: 28 bf ff ec bleu,a 200fddc <== ALWAYS TAKEN 200fe30: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 200fe34: 94 10 20 00 clr %o2 <== NOT EXECUTED 200fe38: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200fe3c: 7f ff fc 61 call 200efc0 <== NOT EXECUTED 200fe40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 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 ); 200fe44: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 200fe48: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED * 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 ); if ( !block_ptr ) 200fe4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200fe50: 12 bf ff ea bne 200fdf8 <== NOT EXECUTED 200fe54: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 200fe58: 81 c7 e0 08 ret <== NOT EXECUTED 200fe5c: 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 ) 200fe60: 12 bf ff af bne 200fd1c <== NEVER TAKEN 200fe64: 33 00 80 7c sethi %hi(0x201f000), %i1 200fe68: 80 a6 80 04 cmp %i2, %g4 200fe6c: 08 bf ff ad bleu 200fd20 200fe70: f4 06 60 84 ld [ %i1 + 0x84 ], %i2 my_length = the_jnode->info.file.size - start; 200fe74: 10 bf ff aa b 200fd1c 200fe78: b8 21 00 01 sub %g4, %g1, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200fe7c: 82 10 00 1a mov %i2, %g1 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200fe80: 80 a7 20 00 cmp %i4, 0 200fe84: 02 80 00 14 be 200fed4 200fe88: 90 07 bf f8 add %fp, -8, %o0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200fe8c: 83 30 60 02 srl %g1, 2, %g1 200fe90: 82 00 7f ff add %g1, -1, %g1 200fe94: 80 a0 40 10 cmp %g1, %l0 200fe98: 2a 80 00 3e bcs,a 200ff90 200fe9c: 90 10 00 1d mov %i5, %o0 p = info->indirect; 200fea0: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 200fea4: 91 2c 20 02 sll %l0, 2, %o0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200fea8: 80 a0 60 00 cmp %g1, 0 200feac: 02 bf ff eb be 200fe58 <== NEVER TAKEN 200feb0: 90 00 40 08 add %g1, %o0, %o0 */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 200feb4: 80 a2 20 00 cmp %o0, 0 200feb8: 02 bf ff e8 be 200fe58 <== NEVER TAKEN 200febc: 94 10 00 1c mov %i4, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200fec0: d2 02 00 00 ld [ %o0 ], %o1 200fec4: 90 10 00 11 mov %l1, %o0 200fec8: 40 00 08 1e call 2011f40 200fecc: b0 06 00 1c add %i0, %i4, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200fed0: 90 07 bf f8 add %fp, -8, %o0 200fed4: 7f ff cd 31 call 2003398 200fed8: 92 10 20 00 clr %o1 200fedc: c2 07 bf f8 ld [ %fp + -8 ], %g1 200fee0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200fee4: 81 c7 e0 08 ret 200fee8: 81 e8 00 00 restore if (the_jnode->type == 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)) 200feec: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200fef0: 82 10 20 00 clr %g1 200fef4: 86 a3 40 1a subcc %o5, %i2, %g3 200fef8: 84 63 00 19 subx %o4, %i1, %g2 200fefc: 80 a0 40 02 cmp %g1, %g2 200ff00: 04 80 00 14 ble 200ff50 <== ALWAYS TAKEN 200ff04: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 my_length = the_jnode->info.linearfile.size - start; 200ff08: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 200ff0c: 92 02 40 11 add %o1, %l1, %o1 200ff10: 94 10 00 18 mov %i0, %o2 200ff14: 40 00 08 0b call 2011f40 200ff18: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200ff1c: 90 07 bf f8 add %fp, -8, %o0 200ff20: 7f ff cd 1e call 2003398 200ff24: 92 10 20 00 clr %o1 200ff28: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ff2c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200ff30: 81 c7 e0 08 ret 200ff34: 81 e8 00 00 restore } if ( !p ) return 0; return &info->indirect[ my_block ]; 200ff38: 91 2a 60 02 sll %o1, 2, %o0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200ff3c: 80 a0 60 00 cmp %g1, 0 200ff40: 12 bf ff 91 bne 200fd84 <== ALWAYS TAKEN 200ff44: 90 00 40 08 add %g1, %o0, %o0 } IMFS_update_atime( the_jnode ); return copied; } 200ff48: 81 c7 e0 08 ret <== NOT EXECUTED 200ff4c: 81 e8 00 00 restore <== NOT EXECUTED if (the_jnode->type == 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)) 200ff50: 12 80 00 04 bne 200ff60 <== NEVER TAKEN 200ff54: 80 a7 00 03 cmp %i4, %g3 200ff58: 38 bf ff ed bgu,a 200ff0c <== ALWAYS TAKEN 200ff5c: b0 23 40 11 sub %o5, %l1, %i0 my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200ff60: 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; 200ff64: 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); 200ff68: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200ff6c: 40 00 07 f5 call 2011f40 <== NOT EXECUTED 200ff70: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 200ff74: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 200ff78: 7f ff cd 08 call 2003398 <== NOT EXECUTED 200ff7c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200ff80: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200ff84: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED return my_length; 200ff88: 81 c7 e0 08 ret <== NOT EXECUTED 200ff8c: 81 e8 00 00 restore <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 200ff90: 92 10 00 10 mov %l0, %o1 200ff94: 7f ff fc 0b call 200efc0 200ff98: 94 10 20 00 clr %o2 */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 200ff9c: 10 bf ff c7 b 200feb8 200ffa0: 80 a2 20 00 cmp %o0, 0 =============================================================================== 0200f948 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200f948: 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; 200f94c: 29 00 80 7c sethi %hi(0x201f000), %l4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200f950: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 /* * 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; 200f954: f4 05 20 84 ld [ %l4 + 0x84 ], %i2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200f958: 80 a2 20 00 cmp %o0, 0 200f95c: 02 80 00 1b be 200f9c8 200f960: b5 36 a0 02 srl %i2, 2, %i2 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200f96c: 27 00 80 7c sethi %hi(0x201f000), %l3 200f970: ba 10 00 08 mov %o0, %i5 200f974: b8 10 20 00 clr %i4 if ( b[i] ) { 200f978: c2 07 40 00 ld [ %i5 ], %g1 200f97c: 90 90 60 00 orcc %g1, 0, %o0 200f980: 02 80 00 08 be 200f9a0 200f984: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200f988: 7f ff ce 5a call 20032f0 200f98c: 01 00 00 00 nop memfile_blocks_allocated--; 200f990: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 200f994: 82 00 7f ff add %g1, -1, %g1 200f998: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] b = *block_table; for ( i=0 ; i 200f9a8: ba 07 60 04 add %i5, 4, %i5 200f9ac: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200f9b0: 7f ff ce 50 call 20032f0 200f9b4: 01 00 00 00 nop memfile_blocks_allocated--; 200f9b8: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200f9bc: c0 26 20 58 clr [ %i0 + 0x58 ] void memfile_free_block( void *memory ) { free(memory); memfile_blocks_allocated--; 200f9c0: 82 00 7f ff add %g1, -1, %g1 200f9c4: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 200f9c8: fa 06 20 5c ld [ %i0 + 0x5c ], %i5 200f9cc: 80 a7 60 00 cmp %i5, 0 200f9d0: 02 80 00 48 be 200faf0 200f9d4: c2 05 20 84 ld [ %l4 + 0x84 ], %g1 for ( i=0 ; i <== NEVER TAKEN 200f9e4: 27 00 80 7c sethi %hi(0x201f000), %l3 200f9e8: 25 00 80 7c sethi %hi(0x201f000), %l2 200f9ec: a0 10 20 00 clr %l0 200f9f0: b2 10 20 00 clr %i1 200f9f4: a4 14 a0 84 or %l2, 0x84, %l2 200f9f8: a2 10 00 13 mov %l3, %l1 if ( info->doubly_indirect[i] ) { 200f9fc: a1 2c 20 02 sll %l0, 2, %l0 200fa00: d0 07 40 10 ld [ %i5 + %l0 ], %o0 200fa04: 80 a2 20 00 cmp %o0, 0 200fa08: 02 80 00 1c be 200fa78 <== NEVER TAKEN 200fa0c: a0 07 40 10 add %i5, %l0, %l0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200fa18: b6 14 61 94 or %l1, 0x194, %i3 200fa1c: ba 10 00 08 mov %o0, %i5 200fa20: b8 10 20 00 clr %i4 if ( b[i] ) { 200fa24: c2 07 40 00 ld [ %i5 ], %g1 200fa28: 90 90 60 00 orcc %g1, 0, %o0 200fa2c: 02 80 00 08 be 200fa4c <== NEVER TAKEN 200fa30: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200fa34: 7f ff ce 2f call 20032f0 200fa38: 01 00 00 00 nop memfile_blocks_allocated--; 200fa3c: c2 06 c0 00 ld [ %i3 ], %g1 200fa40: 82 00 7f ff add %g1, -1, %g1 200fa44: c2 26 c0 00 st %g1, [ %i3 ] b = *block_table; for ( i=0 ; i 200fa54: ba 07 60 04 add %i5, 4, %i5 200fa58: d0 04 00 00 ld [ %l0 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200fa5c: 7f ff ce 25 call 20032f0 200fa60: 01 00 00 00 nop memfile_blocks_allocated--; 200fa64: c2 04 61 94 ld [ %l1 + 0x194 ], %g1 200fa68: 82 00 7f ff add %g1, -1, %g1 200fa6c: c2 24 61 94 st %g1, [ %l1 + 0x194 ] /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200fa70: c0 24 00 00 clr [ %l0 ] 200fa74: fa 06 20 5c ld [ %i0 + 0x5c ], %i5 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 200fa8c: a0 10 00 19 mov %i1, %l0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200fa98: 01 00 00 00 nop 200fa9c: b8 10 20 00 clr %i4 ! 0 if ( b[i] ) { 200faa0: c2 07 40 00 ld [ %i5 ], %g1 200faa4: 90 90 60 00 orcc %g1, 0, %o0 200faa8: 02 80 00 08 be 200fac8 <== ALWAYS TAKEN 200faac: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200fab0: 7f ff ce 10 call 20032f0 <== NOT EXECUTED 200fab4: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated--; 200fab8: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 <== NOT EXECUTED 200fabc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200fac0: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] <== NOT EXECUTED b = *block_table; for ( i=0 ; i 200fad0: ba 07 60 04 add %i5, 4, %i5 200fad4: fa 06 20 5c ld [ %i0 + 0x5c ], %i5 */ void memfile_free_block( void *memory ) { free(memory); 200fad8: 7f ff ce 06 call 20032f0 200fadc: 90 10 00 1d mov %i5, %o0 memfile_blocks_allocated--; 200fae0: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200fae4: c0 26 20 5c clr [ %i0 + 0x5c ] void memfile_free_block( void *memory ) { free(memory); memfile_blocks_allocated--; 200fae8: 82 00 7f ff add %g1, -1, %g1 200faec: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200faf0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200faf4: 82 92 20 00 orcc %o0, 0, %g1 200faf8: 02 80 00 75 be 200fccc 200fafc: c4 05 20 84 ld [ %l4 + 0x84 ], %g2 for ( i=0 ; i <== NEVER TAKEN 200fb0c: 27 00 80 7c sethi %hi(0x201f000), %l3 p = (block_p *) info->triply_indirect[i]; 200fb10: e2 00 40 00 ld [ %g1 ], %l1 if ( !p ) /* ensure we have a valid pointer */ 200fb14: 80 a4 60 00 cmp %l1, 0 200fb18: 02 80 00 55 be 200fc6c <== NEVER TAKEN 200fb1c: 80 a6 a0 00 cmp %i2, 0 200fb20: 25 00 80 7c sethi %hi(0x201f000), %l2 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200fb24: aa 10 20 00 clr %l5 if ( !p ) /* ensure we have a valid pointer */ 200fb28: a8 10 20 00 clr %l4 200fb2c: b6 14 e1 94 or %l3, 0x194, %i3 200fb30: a4 14 a0 84 or %l2, 0x84, %l2 break; for ( j=0 ; j <== NEVER TAKEN 200fb3c: b2 10 20 00 clr %i1 200fb40: a0 10 20 00 clr %l0 if ( p[j] ) { 200fb44: a1 2c 20 02 sll %l0, 2, %l0 200fb48: d0 04 40 10 ld [ %l1 + %l0 ], %o0 200fb4c: 80 a2 20 00 cmp %o0, 0 200fb50: 02 80 00 1b be 200fbbc <== NEVER TAKEN 200fb54: a0 04 40 10 add %l1, %l0, %l0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200fb60: 01 00 00 00 nop 200fb64: ba 10 00 08 mov %o0, %i5 200fb68: b8 10 20 00 clr %i4 if ( b[i] ) { 200fb6c: c2 07 40 00 ld [ %i5 ], %g1 200fb70: 90 90 60 00 orcc %g1, 0, %o0 200fb74: 02 80 00 08 be 200fb94 200fb78: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200fb7c: 7f ff cd dd call 20032f0 200fb80: 01 00 00 00 nop memfile_blocks_allocated--; 200fb84: c2 06 c0 00 ld [ %i3 ], %g1 200fb88: 82 00 7f ff add %g1, -1, %g1 200fb8c: c2 26 c0 00 st %g1, [ %i3 ] b = *block_table; for ( i=0 ; i 200fb9c: ba 07 60 04 add %i5, 4, %i5 200fba0: d0 04 00 00 ld [ %l0 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200fba4: 7f ff cd d3 call 20032f0 200fba8: 01 00 00 00 nop memfile_blocks_allocated--; 200fbac: c2 06 c0 00 ld [ %i3 ], %g1 200fbb0: 82 00 7f ff add %g1, -1, %g1 200fbb4: c2 26 c0 00 st %g1, [ %i3 ] /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200fbb8: c0 24 00 00 clr [ %l0 ] if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j 200fbd0: a0 10 00 19 mov %i1, %l0 200fbd4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200fbd8: b2 00 40 15 add %g1, %l5, %i1 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200fbe4: d0 00 40 15 ld [ %g1 + %l5 ], %o0 200fbe8: ba 10 00 08 mov %o0, %i5 200fbec: b8 10 20 00 clr %i4 if ( b[i] ) { 200fbf0: c2 07 40 00 ld [ %i5 ], %g1 200fbf4: 90 90 60 00 orcc %g1, 0, %o0 200fbf8: 02 80 00 08 be 200fc18 <== ALWAYS TAKEN 200fbfc: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200fc00: 7f ff cd bc call 20032f0 <== NOT EXECUTED 200fc04: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated--; 200fc08: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 200fc0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200fc10: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED b = *block_table; for ( i=0 ; i 200fc20: ba 07 60 04 add %i5, 4, %i5 200fc24: d0 06 40 00 ld [ %i1 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200fc28: 7f ff cd b2 call 20032f0 200fc2c: a8 05 20 01 inc %l4 memfile_blocks_allocated--; 200fc30: c2 06 c0 00 ld [ %i3 ], %g1 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200fc4c: c0 26 40 00 clr [ %i1 ] p = (block_p *) info->triply_indirect[i]; 200fc50: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 200fc54: ab 2d 20 02 sll %l4, 2, %l5 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200fc58: e2 00 40 15 ld [ %g1 + %l5 ], %l1 if ( !p ) /* ensure we have a valid pointer */ 200fc5c: 80 a4 60 00 cmp %l1, 0 200fc60: 12 bf ff b5 bne 200fb34 <== ALWAYS TAKEN 200fc64: 90 10 00 01 mov %g1, %o0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== NEVER TAKEN 200fc70: 01 00 00 00 nop 200fc74: ba 10 00 08 mov %o0, %i5 200fc78: b8 10 20 00 clr %i4 if ( b[i] ) { 200fc7c: c2 07 40 00 ld [ %i5 ], %g1 200fc80: 90 90 60 00 orcc %g1, 0, %o0 200fc84: 02 80 00 08 be 200fca4 <== ALWAYS TAKEN 200fc88: b8 07 20 01 inc %i4 */ void memfile_free_block( void *memory ) { free(memory); 200fc8c: 7f ff cd 99 call 20032f0 <== NOT EXECUTED 200fc90: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated--; 200fc94: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 <== NOT EXECUTED 200fc98: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200fc9c: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] <== NOT EXECUTED b = *block_table; for ( i=0 ; i 200fcac: ba 07 60 04 add %i5, 4, %i5 200fcb0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 */ void memfile_free_block( void *memory ) { free(memory); 200fcb4: 7f ff cd 8f call 20032f0 200fcb8: 01 00 00 00 nop memfile_blocks_allocated--; 200fcbc: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200fcc0: c0 26 20 60 clr [ %i0 + 0x60 ] void memfile_free_block( void *memory ) { free(memory); memfile_blocks_allocated--; 200fcc4: 82 00 7f ff add %g1, -1, %g1 200fcc8: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200fccc: 81 c7 e0 08 ret 200fcd0: 91 e8 20 00 restore %g0, 0, %o0 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200fcd8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 =============================================================================== 0200f844 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 200f844: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200f848: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200f84c: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 201f084 <== NOT EXECUTED 200f850: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED 200f854: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200f858: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200f85c: 18 80 00 11 bgu 200f8a0 <== NOT EXECUTED 200f860: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED p = info->indirect; 200f864: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200f868: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200f86c: 02 80 00 04 be 200f87c <== NOT EXECUTED 200f870: 82 10 20 00 clr %g1 <== NOT EXECUTED return 0; return &info->indirect[ my_block ]; 200f874: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 200f878: 82 00 80 19 add %g2, %i1, %g1 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; 200f87c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED */ void memfile_free_block( void *memory ) { free(memory); 200f880: 7f ff ce 9c call 20032f0 <== NOT EXECUTED 200f884: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED memfile_blocks_allocated--; 200f888: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200f88c: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED 200f890: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 200f894: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED ptr = *block_ptr; *block_ptr = 0; memfile_free_block( ptr ); return 1; } 200f898: 81 c7 e0 08 ret <== NOT EXECUTED 200f89c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 200f8a0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200f8a4: 7f ff fd c7 call 200efc0 <== NOT EXECUTED 200f8a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200f8ac: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; 200f8b0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED */ void memfile_free_block( void *memory ) { free(memory); 200f8b4: 7f ff ce 8f call 20032f0 <== NOT EXECUTED 200f8b8: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED memfile_blocks_allocated--; 200f8bc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200f8c0: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED 200f8c4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 200f8c8: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED ptr = *block_ptr; *block_ptr = 0; memfile_free_block( ptr ); return 1; } 200f8cc: 81 c7 e0 08 ret <== NOT EXECUTED 200f8d0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED =============================================================================== 0200ffc8 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ffc8: 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 ) { 200ffcc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200ffd0: 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 ) { 200ffd4: 80 a0 60 00 cmp %g1, 0 200ffd8: 06 80 00 76 bl 20101b0 <== NEVER TAKEN 200ffdc: b0 07 00 1a add %i4, %i2, %i0 200ffe0: 80 a0 60 00 cmp %g1, 0 200ffe4: 02 80 00 6f be 20101a0 <== ALWAYS TAKEN 200ffe8: 23 00 80 7c sethi %hi(0x201f000), %l1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200ffec: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 ! 201f084 <== NOT EXECUTED 200fff0: 92 10 00 1a mov %i2, %o1 200fff4: b1 3c 20 1f sra %l0, 0x1f, %i0 200fff8: 96 10 00 10 mov %l0, %o3 200fffc: 94 10 00 18 mov %i0, %o2 2010000: 40 00 2b 45 call 201ad14 <__moddi3> 2010004: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2010008: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 201000c: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2010010: 90 10 00 19 mov %i1, %o0 2010014: 92 10 00 1a mov %i2, %o1 2010018: 40 00 2a 59 call 201a97c <__divdi3> 201001c: 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; 2010020: 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 ) { 2010024: 80 a4 a0 00 cmp %l2, 0 2010028: 12 80 00 27 bne 20100c4 201002c: 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 ) { 2010030: 80 a7 00 10 cmp %i4, %l0 2010034: 0a 80 00 3f bcs 2010130 2010038: b3 2e a0 02 sll %i2, 2, %i1 201003c: 10 80 00 13 b 2010088 2010040: 82 10 00 10 mov %l0, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 2010044: 80 a2 20 00 cmp %o0, 0 2010048: 02 80 00 1d be 20100bc <== NEVER TAKEN 201004c: 90 02 00 19 add %o0, %i1, %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 ); 2010050: 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 ) 2010054: 80 a2 20 00 cmp %o0, 0 2010058: 02 80 00 19 be 20100bc <== NEVER TAKEN 201005c: 94 10 00 10 mov %l0, %o2 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 ); 2010060: d0 02 00 00 ld [ %o0 ], %o0 2010064: 40 00 07 b7 call 2011f40 2010068: 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 ) { 201006c: c2 04 60 84 ld [ %l1 + 0x84 ], %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; 2010070: b6 06 c0 10 add %i3, %l0, %i3 block++; 2010074: b4 06 a0 01 inc %i2 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 2010078: b0 06 00 10 add %i0, %l0, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 201007c: 80 a0 40 1c cmp %g1, %i4 2010080: 18 80 00 2d bgu 2010134 2010084: b2 06 60 04 add %i1, 4, %i1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 2010088: 83 30 60 02 srl %g1, 2, %g1 201008c: 82 00 7f ff add %g1, -1, %g1 2010090: 80 a6 80 01 cmp %i2, %g1 2010094: 28 bf ff ec bleu,a 2010044 2010098: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 201009c: 92 10 00 1a mov %i2, %o1 20100a0: 94 10 20 00 clr %o2 20100a4: 7f ff fb c7 call 200efc0 20100a8: 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 ); 20100ac: 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 ) 20100b0: 80 a2 20 00 cmp %o0, 0 20100b4: 12 bf ff eb bne 2010060 <== ALWAYS TAKEN 20100b8: 94 10 00 10 mov %l0, %o2 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 20100bc: 81 c7 e0 08 ret <== NOT EXECUTED 20100c0: 81 e8 00 00 restore <== NOT EXECUTED my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 20100c4: 83 34 20 02 srl %l0, 2, %g1 20100c8: 82 00 7f ff add %g1, -1, %g1 20100cc: 80 a2 40 01 cmp %o1, %g1 20100d0: 18 80 00 4e bgu 2010208 <== NEVER TAKEN 20100d4: 90 10 00 1d mov %i5, %o0 p = info->indirect; 20100d8: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 20100dc: 91 2a 60 02 sll %o1, 2, %o0 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 ); if ( !block_ptr ) return copied; 20100e0: b0 10 20 00 clr %i0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 20100e4: 80 a0 60 00 cmp %g1, 0 20100e8: 02 bf ff f5 be 20100bc <== NEVER TAKEN 20100ec: 90 00 40 08 add %g1, %o0, %o0 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 ); if ( !block_ptr ) 20100f0: 80 a2 20 00 cmp %o0, 0 20100f4: 02 bf ff f2 be 20100bc <== NEVER TAKEN 20100f8: 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 20100fc: b0 24 00 12 sub %l0, %l2, %i0 2010100: 80 a6 00 1c cmp %i0, %i4 2010104: 18 80 00 45 bgu 2010218 2010108: d0 02 00 00 ld [ %o0 ], %o0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 201010c: 92 10 00 1b mov %i3, %o1 2010110: 90 02 00 12 add %o0, %l2, %o0 2010114: 94 10 00 18 mov %i0, %o2 2010118: 40 00 07 8a call 2011f40 201011c: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 2010120: b4 06 a0 01 inc %i2 my_length -= to_copy; 2010124: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 2010128: 10 bf ff c2 b 2010030 201012c: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2010130: 82 10 00 10 mov %l0, %g1 * 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 ) { 2010134: 80 a7 20 00 cmp %i4, 0 2010138: 02 80 00 13 be 2010184 201013c: 90 07 bf f8 add %fp, -8, %o0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 2010140: 83 30 60 02 srl %g1, 2, %g1 2010144: 82 00 7f ff add %g1, -1, %g1 2010148: 80 a6 80 01 cmp %i2, %g1 201014c: 28 80 00 3d bleu,a 2010240 <== ALWAYS TAKEN 2010150: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 } if ( !p ) return 0; return &info->indirect[ my_block ]; 2010154: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2010158: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 201015c: 7f ff fb 99 call 200efc0 <== NOT EXECUTED 2010160: 94 10 20 00 clr %o2 <== NOT EXECUTED IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 2010164: 80 a2 20 00 cmp %o0, 0 2010168: 02 bf ff d5 be 20100bc <== NEVER TAKEN 201016c: 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 ); 2010170: d0 02 00 00 ld [ %o0 ], %o0 2010174: 94 10 00 1c mov %i4, %o2 2010178: 40 00 07 72 call 2011f40 201017c: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 2010180: 90 07 bf f8 add %fp, -8, %o0 2010184: 7f ff cc 85 call 2003398 2010188: 92 10 20 00 clr %o1 201018c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2010190: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2010194: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 2010198: 81 c7 e0 08 ret 201019c: 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 ) { 20101a0: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 20101a4: 80 a0 40 18 cmp %g1, %i0 20101a8: 1a bf ff 92 bcc 200fff0 20101ac: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 20101b0: 23 00 80 7c sethi %hi(0x201f000), %l1 20101b4: e4 04 60 84 ld [ %l1 + 0x84 ], %l2 ! 201f084 20101b8: a1 34 a0 02 srl %l2, 2, %l0 20101bc: 92 10 00 10 mov %l0, %o1 20101c0: 40 00 28 5d call 201a334 <.umul> 20101c4: 90 04 20 01 add %l0, 1, %o0 20101c8: 92 10 00 10 mov %l0, %o1 20101cc: 40 00 28 5a call 201a334 <.umul> 20101d0: 90 02 20 01 inc %o0 20101d4: 92 10 00 12 mov %l2, %o1 20101d8: 40 00 28 57 call 201a334 <.umul> 20101dc: 90 02 3f ff add %o0, -1, %o0 20101e0: 80 a2 00 18 cmp %o0, %i0 20101e4: 08 80 00 1d bleu 2010258 20101e8: 90 10 00 1d mov %i5, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 20101ec: 92 10 20 00 clr %o1 20101f0: 7f ff fc 16 call 200f248 20101f4: 94 10 00 18 mov %i0, %o2 */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) 20101f8: 80 a2 20 00 cmp %o0, 0 20101fc: 02 bf ff 7d be 200fff0 <== ALWAYS TAKEN 2010200: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 2010204: 30 80 00 19 b,a 2010268 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 2010208: 7f ff fb 6e call 200efc0 <== NOT EXECUTED 201020c: 94 10 20 00 clr %o2 <== NOT EXECUTED 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 ); if ( !block_ptr ) 2010210: 10 bf ff b9 b 20100f4 <== NOT EXECUTED 2010214: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED * 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; 2010218: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 201021c: 92 10 00 1b mov %i3, %o1 2010220: 90 02 00 12 add %o0, %l2, %o0 2010224: 94 10 00 18 mov %i0, %o2 2010228: 40 00 07 46 call 2011f40 201022c: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 2010230: b4 06 a0 01 inc %i2 my_length -= to_copy; 2010234: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 2010238: 10 bf ff 7e b 2010030 201023c: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 2010240: b5 2e a0 02 sll %i2, 2, %i2 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 2010244: 80 a0 60 00 cmp %g1, 0 2010248: 12 bf ff c7 bne 2010164 <== ALWAYS TAKEN 201024c: 90 00 40 1a add %g1, %i2, %o0 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 2010250: 81 c7 e0 08 ret <== NOT EXECUTED 2010254: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 2010258: 40 00 04 de call 20115d0 <__errno> 201025c: 01 00 00 00 nop 2010260: 82 10 20 16 mov 0x16, %g1 ! 16 2010264: c2 22 00 00 st %g1, [ %o0 ] last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 2010268: 40 00 04 da call 20115d0 <__errno> 201026c: b0 10 3f ff mov -1, %i0 2010270: 82 10 20 1c mov 0x1c, %g1 2010274: c2 22 00 00 st %g1, [ %o0 ] 2010278: 81 c7 e0 08 ret 201027c: 81 e8 00 00 restore =============================================================================== 0200294c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 200294c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2002950: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2002954: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2002958: 80 a0 a0 01 cmp %g2, 1 200295c: 12 80 00 05 bne 2002970 <== NEVER TAKEN 2002960: 01 00 00 00 nop /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 2002964: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 2002968: 81 c7 e0 08 ret 200296c: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 2002970: 40 00 3b 18 call 20115d0 <__errno> <== NOT EXECUTED 2002974: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002978: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 200297c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002980: 81 c7 e0 08 ret <== NOT EXECUTED 2002984: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02005504 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2005504: 9d e3 bf a0 save %sp, -96, %sp IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 2005508: 3b 00 80 9b sethi %hi(0x2026c00), %i5 200550c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 ! 2026de8 <_impure_ptr> 2005510: 90 06 20 0c add %i0, 0xc, %o0 2005514: 40 00 44 c6 call 201682c 2005518: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 200551c: f4 06 20 4c ld [ %i0 + 0x4c ], %i2 2005520: 80 a6 a0 07 cmp %i2, 7 2005524: 08 80 00 07 bleu 2005540 <== ALWAYS TAKEN 2005528: 83 2e a0 02 sll %i2, 2, %g1 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 200552c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 <== NOT EXECUTED 2005530: 33 00 80 93 sethi %hi(0x2024c00), %i1 <== NOT EXECUTED 2005534: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED 2005538: 40 00 44 6c call 20166e8 <== NOT EXECUTED 200553c: 93 ee 62 70 restore %i1, 0x270, %o1 <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 2005540: 05 00 80 15 sethi %hi(0x2005400), %g2 2005544: 84 10 a0 e4 or %g2, 0xe4, %g2 ! 20054e4 2005548: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200554c: 81 c0 40 00 jmp %g1 2005550: 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" ); 2005554: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 2005558: 31 00 80 93 sethi %hi(0x2024c00), %i0 200555c: f6 00 60 08 ld [ %g1 + 8 ], %i3 2005560: b0 16 22 40 or %i0, 0x240, %i0 2005564: b2 10 20 01 mov 1, %i1 2005568: 40 00 47 d3 call 20174b4 200556c: 95 e8 20 13 restore %g0, 0x13, %o2 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005570: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 2005574: 31 00 80 93 sethi %hi(0x2024c00), %i0 2005578: f6 00 60 08 ld [ %g1 + 8 ], %i3 200557c: b0 16 22 58 or %i0, 0x258, %i0 2005580: b2 10 20 01 mov 1, %i1 2005584: 40 00 47 cc call 20174b4 2005588: 95 e8 20 12 restore %g0, 0x12, %o2 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 200558c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 2005590: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 2005594: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005598: 13 00 80 93 sethi %hi(0x2024c00), %o1 200559c: 40 00 44 53 call 20166e8 20055a0: 92 12 62 30 or %o1, 0x230, %o1 ! 2024e30 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 20055a4: 31 00 80 93 sethi %hi(0x2024c00), %i0 20055a8: 40 00 4b c5 call 20184bc 20055ac: 91 ee 21 b8 restore %i0, 0x1b8, %o0 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)", 20055b0: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 20055b4: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 20055b8: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 20055bc: d0 00 60 08 ld [ %g1 + 8 ], %o0 20055c0: 13 00 80 93 sethi %hi(0x2024c00), %o1 20055c4: 40 00 44 49 call 20166e8 20055c8: 92 12 62 20 or %o1, 0x220, %o1 ! 2024e20 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 20055cc: 31 00 80 93 sethi %hi(0x2024c00), %i0 20055d0: 40 00 4b bb call 20184bc 20055d4: 91 ee 21 b8 restore %i0, 0x1b8, %o0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 20055d8: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 20055dc: 90 10 20 2f mov 0x2f, %o0 20055e0: d2 00 60 08 ld [ %g1 + 8 ], %o1 20055e4: 40 00 44 5d call 2016758 20055e8: 31 00 80 93 sethi %hi(0x2024c00), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 20055ec: 40 00 4b b4 call 20184bc 20055f0: 91 ee 21 b8 restore %i0, 0x1b8, %o0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 20055f4: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 20055f8: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 20055fc: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 2005600: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005604: 13 00 80 93 sethi %hi(0x2024c00), %o1 2005608: 40 00 44 38 call 20166e8 200560c: 92 12 62 08 or %o1, 0x208, %o1 ! 2024e08 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 2005610: 31 00 80 93 sethi %hi(0x2024c00), %i0 2005614: 40 00 4b aa call 20184bc 2005618: 91 ee 21 b8 restore %i0, 0x1b8, %o0 =============================================================================== 02002994 : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 2002994: c8 02 00 00 ld [ %o0 ], %g4 IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2002998: 80 a2 a0 00 cmp %o2, 0 200299c: 02 80 00 13 be 20029e8 <== NEVER TAKEN 20029a0: 90 10 20 00 clr %o0 20029a4: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 20029a8: c4 48 40 00 ldsb [ %g1 ], %g2 20029ac: 80 a0 a0 00 cmp %g2, 0 20029b0: 02 80 00 0e be 20029e8 <== NEVER TAKEN 20029b4: c2 08 40 00 ldub [ %g1 ], %g1 20029b8: 10 80 00 07 b 20029d4 20029bc: 84 10 20 00 clr %g2 20029c0: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 20029c4: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3 20029c8: 80 a0 e0 00 cmp %g3, 0 20029cc: 02 80 00 07 be 20029e8 20029d0: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 buf[i] = node->info.sym_link.name[i]; 20029d4: 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++ ) 20029d8: 90 02 20 01 inc %o0 20029dc: 80 a2 00 0a cmp %o0, %o2 20029e0: 12 bf ff f8 bne 20029c0 20029e4: 84 10 00 08 mov %o0, %g2 buf[i] = node->info.sym_link.name[i]; return i; } 20029e8: 81 c3 e0 08 retl =============================================================================== 020029f0 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 20029f0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 20029f4: fa 06 40 00 ld [ %i1 ], %i5 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 20029f8: 92 10 00 1b mov %i3, %o1 20029fc: 90 07 60 0c add %i5, 0xc, %o0 2002a00: 40 00 40 bd call 2012cf4 2002a04: 94 10 20 20 mov 0x20, %o2 if ( the_jnode->Parent != NULL ) 2002a08: c2 07 60 08 ld [ %i5 + 8 ], %g1 2002a0c: 80 a0 60 00 cmp %g1, 0 2002a10: 22 80 00 05 be,a 2002a24 <== NEVER TAKEN 2002a14: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2002a18: 40 00 14 e4 call 2007da8 <_Chain_Extract> 2002a1c: 90 10 00 1d mov %i5, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 2002a20: c2 06 80 00 ld [ %i2 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2002a24: 92 10 00 1d mov %i5, %o1 2002a28: 90 00 60 50 add %g1, 0x50, %o0 2002a2c: 40 00 14 d4 call 2007d7c <_Chain_Append> 2002a30: c2 27 60 08 st %g1, [ %i5 + 8 ] rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 2002a34: 90 07 bf f8 add %fp, -8, %o0 2002a38: 40 00 02 58 call 2003398 2002a3c: 92 10 20 00 clr %o1 2002a40: c2 07 bf f8 ld [ %fp + -8 ], %g1 2002a44: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return 0; } 2002a48: 81 c7 e0 08 ret 2002a4c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200cb18 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200cb18: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = (IMFS_jnode_t *) pathloc->node_access; 200cb1c: fa 06 40 00 ld [ %i1 ], %i5 #include "imfs.h" void IMFS_create_orphan( IMFS_jnode_t *jnode ) { if ( jnode->Parent != NULL ) { 200cb20: c2 07 60 08 ld [ %i5 + 8 ], %g1 200cb24: 80 a0 60 00 cmp %g1, 0 200cb28: 22 80 00 06 be,a 200cb40 200cb2c: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1 200cb30: 7f ff ec 9e call 2007da8 <_Chain_Extract> 200cb34: 90 10 00 1d mov %i5, %o0 rtems_chain_extract( &jnode->Node ); jnode->Parent = NULL; 200cb38: c0 27 60 08 clr [ %i5 + 8 ] } --jnode->st_nlink; 200cb3c: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1 IMFS_update_ctime( jnode ); 200cb40: 92 10 20 00 clr %o1 if ( jnode->Parent != NULL ) { rtems_chain_extract( &jnode->Node ); jnode->Parent = NULL; } --jnode->st_nlink; 200cb44: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( jnode ); 200cb48: 90 07 bf f8 add %fp, -8, %o0 200cb4c: 7f ff da 13 call 2003398 200cb50: c2 37 60 34 sth %g1, [ %i5 + 0x34 ] 200cb54: c2 07 bf f8 ld [ %fp + -8 ], %g1 } void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 200cb58: 90 10 00 1d mov %i5, %o0 200cb5c: 40 00 01 95 call 200d1b0 200cb60: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 200cb64: 80 a2 20 00 cmp %o0, 0 200cb68: 12 80 00 13 bne 200cbb4 200cb6c: 01 00 00 00 nop 200cb70: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1 200cb74: 80 a0 60 00 cmp %g1, 0 200cb78: 12 80 00 0f bne 200cbb4 200cb7c: 03 00 80 7a sethi %hi(0x201e800), %g1 if ( rtems_filesystem_current.node_access == jnode ) 200cb80: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 200cb84: c4 00 60 04 ld [ %g1 + 4 ], %g2 200cb88: 80 a7 40 02 cmp %i5, %g2 200cb8c: 22 80 00 02 be,a 200cb94 <== NEVER TAKEN 200cb90: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 200cb94: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200cb98: 80 a0 60 04 cmp %g1, 4 200cb9c: 02 80 00 0d be 200cbd0 200cba0: 80 a0 60 05 cmp %g1, 5 200cba4: 02 80 00 06 be 200cbbc 200cba8: 01 00 00 00 nop break; default: break; } free( jnode ); 200cbac: 7f ff d9 d1 call 20032f0 200cbb0: 90 10 00 1d mov %i5, %o0 IMFS_create_orphan( jnode ); IMFS_check_node_remove( jnode ); return 0; } 200cbb4: 81 c7 e0 08 ret 200cbb8: 91 e8 20 00 restore %g0, 0, %o0 if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 200cbbc: 40 00 0b 63 call 200f948 200cbc0: 90 10 00 1d mov %i5, %o0 break; default: break; } free( jnode ); 200cbc4: 7f ff d9 cb call 20032f0 200cbc8: 90 10 00 1d mov %i5, %o0 200cbcc: 30 bf ff fa b,a 200cbb4 switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 200cbd0: 7f ff d9 c8 call 20032f0 200cbd4: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 break; default: break; } free( jnode ); 200cbd8: 7f ff d9 c6 call 20032f0 200cbdc: 90 10 00 1d mov %i5, %o0 200cbe0: 30 bf ff f5 b,a 200cbb4 =============================================================================== 0200cc04 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200cc04: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 200cc08: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200cc0c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200cc10: 80 a0 a0 07 cmp %g2, 7 200cc14: 08 80 00 08 bleu 200cc34 <== ALWAYS TAKEN 200cc18: 85 28 a0 02 sll %g2, 2, %g2 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200cc1c: 40 00 12 6d call 20115d0 <__errno> 200cc20: b0 10 3f ff mov -1, %i0 200cc24: 82 10 20 86 mov 0x86, %g1 200cc28: c2 22 00 00 st %g1, [ %o0 ] 200cc2c: 81 c7 e0 08 ret 200cc30: 81 e8 00 00 restore IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 200cc34: 07 00 80 32 sethi %hi(0x200c800), %g3 200cc38: 86 10 e3 e4 or %g3, 0x3e4, %g3 ! 200cbe4 200cc3c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200cc40: 81 c0 80 00 jmp %g2 200cc44: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200cc48: c0 26 60 20 clr [ %i1 + 0x20 ] 200cc4c: c0 26 60 24 clr [ %i1 + 0x24 ] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 200cc50: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 200cc54: d6 00 60 30 ld [ %g1 + 0x30 ], %o3 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200cc58: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 200cc5c: f0 10 60 3e lduh [ %g1 + 0x3e ], %i0 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 200cc60: d8 10 60 34 lduh [ %g1 + 0x34 ], %o4 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200cc64: d4 00 80 00 ld [ %g2 ], %o2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200cc68: da 00 60 38 ld [ %g1 + 0x38 ], %o5 buf->st_uid = the_jnode->st_uid; 200cc6c: de 10 60 3c lduh [ %g1 + 0x3c ], %o7 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 200cc70: c8 00 60 40 ld [ %g1 + 0x40 ], %g4 buf->st_mtime = the_jnode->stat_mtime; 200cc74: c6 00 60 44 ld [ %g1 + 0x44 ], %g3 buf->st_ctime = the_jnode->stat_ctime; 200cc78: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200cc7c: 03 00 80 7a sethi %hi(0x201e800), %g1 200cc80: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 201e888 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 200cc84: d6 26 60 0c st %o3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 200cc88: f0 36 60 14 sth %i0, [ %i1 + 0x14 ] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 200cc8c: d4 26 60 04 st %o2, [ %i1 + 4 ] 200cc90: 17 00 00 3f sethi %hi(0xfc00), %o3 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 200cc94: d8 36 60 10 sth %o4, [ %i1 + 0x10 ] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 200cc98: 96 12 e3 fe or %o3, 0x3fe, %o3 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200cc9c: da 26 60 08 st %o5, [ %i1 + 8 ] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 200cca0: d6 26 40 00 st %o3, [ %i1 ] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 200cca4: de 36 60 12 sth %o7, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 200cca8: c8 26 60 28 st %g4, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200ccac: c6 26 60 30 st %g3, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200ccb0: c4 26 60 38 st %g2, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200ccb4: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200ccb8: 81 c7 e0 08 ret 200ccbc: 91 e8 20 00 restore %g0, 0, %o0 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 200ccc0: c6 00 60 54 ld [ %g1 + 0x54 ], %g3 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200ccc4: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 break; 200ccc8: 10 bf ff e2 b 200cc50 200cccc: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200ccd0: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200ccd4: 10 bf ff df b 200cc50 200ccd8: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] =============================================================================== 02002ae8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2002ae8: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 2002aec: fa 06 40 00 ld [ %i1 ], %i5 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2002af0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2002af4: 80 a0 60 03 cmp %g1, 3 2002af8: 02 80 00 09 be 2002b1c 2002afc: b8 10 00 18 mov %i0, %i4 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2002b00: c2 06 60 08 ld [ %i1 + 8 ], %g1 2002b04: 90 10 00 1c mov %i4, %o0 2002b08: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2002b0c: 9f c0 40 00 call %g1 2002b10: 92 10 00 19 mov %i1, %o1 return result; } 2002b14: 81 c7 e0 08 ret 2002b18: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 2002b1c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 2002b20: 80 a0 60 00 cmp %g1, 0 2002b24: 02 80 00 2b be 2002bd0 <== NEVER TAKEN 2002b28: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2002b2c: c6 06 60 0c ld [ %i1 + 0xc ], %g3 2002b30: f0 06 60 04 ld [ %i1 + 4 ], %i0 2002b34: c8 06 60 08 ld [ %i1 + 8 ], %g4 2002b38: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2002b3c: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; 2002b40: c2 27 bf e4 st %g1, [ %fp + -28 ] if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2002b44: f0 27 bf e8 st %i0, [ %fp + -24 ] 2002b48: c8 27 bf ec st %g4, [ %fp + -20 ] 2002b4c: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2002b50: 40 00 23 6a call 200b8f8 2002b54: 90 07 bf e4 add %fp, -28, %o0 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 2002b58: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 2002b5c: c6 10 60 34 lduh [ %g1 + 0x34 ], %g3 2002b60: 80 a0 e0 01 cmp %g3, 1 2002b64: 02 80 00 10 be 2002ba4 2002b68: 84 00 ff ff add %g3, -1, %g2 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 2002b6c: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2002b70: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] IMFS_update_ctime( node->info.hard_link.link_node ); 2002b74: 40 00 02 09 call 2003398 2002b78: 92 10 20 00 clr %o1 2002b7c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 2002b80: c4 07 bf f8 ld [ %fp + -8 ], %g2 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2002b84: 90 10 00 1c mov %i4, %o0 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 2002b88: c4 20 60 48 st %g2, [ %g1 + 0x48 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2002b8c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2002b90: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2002b94: 9f c0 40 00 call %g1 2002b98: 92 10 00 19 mov %i1, %o1 return result; } 2002b9c: 81 c7 e0 08 ret 2002ba0: 91 e8 00 08 restore %g0, %o0, %o0 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 2002ba4: c2 07 bf ec ld [ %fp + -20 ], %g1 2002ba8: 90 10 00 1c mov %i4, %o0 2002bac: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2002bb0: 92 07 bf e4 add %fp, -28, %o1 2002bb4: 9f c0 40 00 call %g1 2002bb8: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2002bbc: 80 a2 20 00 cmp %o0, 0 2002bc0: 22 bf ff d1 be,a 2002b04 2002bc4: c2 06 60 08 ld [ %i1 + 8 ], %g1 2002bc8: 81 c7 e0 08 ret 2002bcc: 81 e8 00 00 restore */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 2002bd0: 40 00 3a 80 call 20115d0 <__errno> <== NOT EXECUTED 2002bd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002bd8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002bdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002be0: 81 c7 e0 08 ret <== NOT EXECUTED 2002be4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002be8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2002be8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2002bec: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2002bf0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2002bf4: 80 a0 a0 01 cmp %g2, 1 2002bf8: 12 80 00 09 bne 2002c1c <== NEVER TAKEN 2002bfc: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2002c00: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2002c04: 80 a0 a0 00 cmp %g2, 0 2002c08: 02 80 00 0b be 2002c34 <== NEVER TAKEN 2002c0c: 01 00 00 00 nop /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 2002c10: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 2002c14: 81 c7 e0 08 ret 2002c18: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 2002c1c: 40 00 3a 6d call 20115d0 <__errno> <== NOT EXECUTED 2002c20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002c24: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2002c28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002c2c: 81 c7 e0 08 ret <== NOT EXECUTED 2002c30: 81 e8 00 00 restore <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2002c34: 40 00 3a 67 call 20115d0 <__errno> <== NOT EXECUTED 2002c38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002c3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002c40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002c44: 81 c7 e0 08 ret <== NOT EXECUTED 2002c48: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020036c4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 20036c4: 9d e3 bf a0 save %sp, -96, %sp bool separate_areas = !rtems_configuration_get_unified_work_area(); 20036c8: 3b 00 80 79 sethi %hi(0x201e400), %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 20036cc: 03 00 80 7c sethi %hi(0x201f000), %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 20036d0: ba 17 63 5c or %i5, 0x35c, %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 20036d4: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 20036d8: f6 0f 60 2d ldub [ %i5 + 0x2d ], %i3 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 20036dc: 80 a0 60 00 cmp %g1, 0 20036e0: 02 80 00 05 be 20036f4 20036e4: b6 1e e0 01 xor %i3, 1, %i3 (*rtems_malloc_statistics_helpers->initialize)(); 20036e8: c2 00 40 00 ld [ %g1 ], %g1 20036ec: 9f c0 40 00 call %g1 20036f0: 01 00 00 00 nop } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 20036f4: 7f ff ff da call 200365c 20036f8: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 20036fc: 03 00 80 7c sethi %hi(0x201f000), %g1 2003700: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f060 2003704: 80 a0 60 00 cmp %g1, 0 2003708: 02 80 00 08 be 2003728 200370c: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2003710: c2 00 40 00 ld [ %g1 ], %g1 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2003714: 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)( 2003718: 9f c0 40 00 call %g1 200371c: 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; 2003720: 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; 2003724: 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() ) { 2003728: 80 8e e0 ff btst 0xff, %i3 200372c: 02 80 00 0d be 2003760 2003730: 39 00 80 7a sethi %hi(0x201e800), %i4 2003734: c2 0f 60 2c ldub [ %i5 + 0x2c ], %g1 2003738: 80 a0 60 00 cmp %g1, 0 200373c: 12 80 00 11 bne 2003780 2003740: d0 07 20 44 ld [ %i4 + 0x44 ], %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 2003744: 92 10 00 18 mov %i0, %o1 2003748: 94 10 00 19 mov %i1, %o2 200374c: 40 00 13 87 call 2008568 <_Heap_Initialize> 2003750: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003754: 80 a2 20 00 cmp %o0, 0 2003758: 02 80 00 17 be 20037b4 200375c: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 2003760: 3b 00 80 7c sethi %hi(0x201f000), %i5 2003764: d0 07 20 44 ld [ %i4 + 0x44 ], %o0 2003768: 40 00 16 93 call 20091b4 <_Protected_heap_Get_size> 200376c: f8 07 63 10 ld [ %i5 + 0x310 ], %i4 2003770: b8 02 00 1c add %o0, %i4, %i4 2003774: f8 27 63 10 st %i4, [ %i5 + 0x310 ] } 2003778: 81 c7 e0 08 ret 200377c: 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 ); 2003780: 92 10 20 00 clr %o1 2003784: 94 10 00 19 mov %i1, %o2 2003788: 40 00 3a 2a call 2012030 200378c: 90 10 00 18 mov %i0, %o0 2003790: 39 00 80 7a sethi %hi(0x201e800), %i4 2003794: d0 07 20 44 ld [ %i4 + 0x44 ], %o0 ! 201e844 2003798: 92 10 00 18 mov %i0, %o1 200379c: 94 10 00 19 mov %i1, %o2 20037a0: 40 00 13 72 call 2008568 <_Heap_Initialize> 20037a4: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 20037a8: 80 a2 20 00 cmp %o0, 0 20037ac: 12 bf ff ee bne 2003764 <== ALWAYS TAKEN 20037b0: 3b 00 80 7c sethi %hi(0x201f000), %i5 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 20037b4: 40 00 10 87 call 20079d0 20037b8: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 02002290 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2002290: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 2002294: 80 a6 3f ff cmp %i0, -1 2002298: 02 80 00 5d be 200240c 200229c: 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 ); 20022a0: e0 06 21 40 ld [ %i0 + 0x140 ], %l0 20022a4: f4 06 20 b8 ld [ %i0 + 0xb8 ], %i2 } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 20022a8: f8 06 c0 00 ld [ %i3 ], %i4 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 20022ac: 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); 20022b0: 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++) 20022b4: 86 0f 3f fc and %i4, -4, %g3 20022b8: 86 00 40 03 add %g1, %g3, %g3 20022bc: 80 a0 40 03 cmp %g1, %g3 20022c0: 1a 80 00 12 bcc 2002308 <== NEVER TAKEN 20022c4: ba 10 20 00 clr %i5 if (*base != U32_PATTERN) 20022c8: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4 20022cc: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 20022d0: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 20022d4: 80 a1 00 02 cmp %g4, %g2 20022d8: 22 80 00 08 be,a 20022f8 <== ALWAYS TAKEN 20022dc: 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 ) 20022e0: 10 80 00 36 b 20023b8 <== NOT EXECUTED 20022e4: 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) 20022e8: 80 a0 80 04 cmp %g2, %g4 20022ec: 12 80 00 32 bne 20023b4 20022f0: 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++) 20022f4: 82 00 60 04 add %g1, 4, %g1 20022f8: 80 a0 c0 01 cmp %g3, %g1 20022fc: 38 bf ff fb bgu,a 20022e8 <== ALWAYS TAKEN 2002300: 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; 2002304: ba 10 20 00 clr %i5 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2002308: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200230c: 02 80 00 32 be 20023d4 <== NOT EXECUTED 2002310: 33 00 80 7c sethi %hi(0x201f000), %i1 <== NOT EXECUTED #endif { (*print_handler)( 2002314: e2 06 20 08 ld [ %i0 + 8 ], %l1 2002318: 35 00 80 7c sethi %hi(0x201f000), %i2 200231c: 33 00 80 7c sethi %hi(0x201f000), %i1 2002320: e4 06 a1 3c ld [ %i2 + 0x13c ], %l2 2002324: f0 06 61 38 ld [ %i1 + 0x138 ], %i0 2002328: 94 07 bf f8 add %fp, -8, %o2 200232c: 92 10 20 05 mov 5, %o1 2002330: 40 00 13 8b call 200715c 2002334: 90 10 00 11 mov %l1, %o0 2002338: 13 00 80 73 sethi %hi(0x201cc00), %o1 200233c: 96 10 00 08 mov %o0, %o3 2002340: 94 10 00 11 mov %l1, %o2 2002344: 90 10 00 12 mov %l2, %o0 2002348: 9f c6 00 00 call %i0 200234c: 92 12 60 c8 or %o1, 0xc8, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2002350: d4 06 e0 04 ld [ %i3 + 4 ], %o2 2002354: d6 06 c0 00 ld [ %i3 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2002358: c2 06 61 38 ld [ %i1 + 0x138 ], %g1 200235c: d0 06 a1 3c ld [ %i2 + 0x13c ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2002360: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2002364: 13 00 80 73 sethi %hi(0x201cc00), %o1 2002368: 96 02 80 0b add %o2, %o3, %o3 200236c: 92 12 60 e8 or %o1, 0xe8, %o1 2002370: 98 10 00 10 mov %l0, %o4 2002374: 9f c0 40 00 call %g1 2002378: 9a 10 00 1c mov %i4, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 200237c: 03 00 80 7c sethi %hi(0x201f000), %g1 2002380: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 201f134 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2002384: 07 00 80 7c sethi %hi(0x201f000), %g3 2002388: 05 00 80 7c sethi %hi(0x201f000), %g2 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 200238c: 80 a0 60 00 cmp %g1, 0 (*print_handler)( print_context, "Unavailable\n" ); 2002390: d0 00 a1 3c ld [ %g2 + 0x13c ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2002394: 02 80 00 19 be 20023f8 <== NEVER TAKEN 2002398: c2 00 e1 38 ld [ %g3 + 0x138 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 200239c: 94 10 00 1d mov %i5, %o2 20023a0: 13 00 80 73 sethi %hi(0x201cc00), %o1 20023a4: 9f c0 40 00 call %g1 20023a8: 92 12 61 18 or %o1, 0x118, %o1 ! 201cd18 20023ac: 81 c7 e0 08 ret 20023b0: 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 ) 20023b4: 80 a0 60 00 cmp %g1, 0 20023b8: 02 bf ff d4 be 2002308 <== NEVER TAKEN 20023bc: 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); 20023c0: 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 ); 20023c4: ba 07 40 1c add %i5, %i4, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 20023c8: 12 bf ff d3 bne 2002314 20023cc: 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 ); 20023d0: 33 00 80 7c sethi %hi(0x201f000), %i1 20023d4: 35 00 80 7c sethi %hi(0x201f000), %i2 20023d8: c2 06 61 38 ld [ %i1 + 0x138 ], %g1 20023dc: d0 06 a1 3c ld [ %i2 + 0x13c ], %o0 20023e0: 94 10 3f ff mov -1, %o2 20023e4: 13 00 80 73 sethi %hi(0x201cc00), %o1 20023e8: 9f c0 40 00 call %g1 20023ec: 92 12 60 d8 or %o1, 0xd8, %o1 ! 201ccd8 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20023f0: 10 bf ff d9 b 2002354 20023f4: d4 06 e0 04 ld [ %i3 + 4 ], %o2 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 20023f8: 13 00 80 73 sethi %hi(0x201cc00), %o1 <== NOT EXECUTED 20023fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002400: 92 12 61 08 or %o1, 0x108, %o1 ! 201cd08 <== NOT EXECUTED 2002404: 81 c7 e0 08 ret <== NOT EXECUTED 2002408: 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) 200240c: 37 00 80 7c sethi %hi(0x201f000), %i3 2002410: b6 16 e3 bc or %i3, 0x3bc, %i3 ! 201f3bc 2002414: f4 06 e0 04 ld [ %i3 + 4 ], %i2 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 2002418: 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) 200241c: 80 a6 a0 00 cmp %i2, 0 2002420: 12 bf ff a2 bne 20022a8 <== ALWAYS TAKEN 2002424: b0 10 20 00 clr %i0 2002428: 81 c7 e0 08 ret <== NOT EXECUTED 200242c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002430 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 2002430: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) 2002434: 3b 00 80 7c sethi %hi(0x201f000), %i5 <== NOT EXECUTED 2002438: c2 07 61 34 ld [ %i5 + 0x134 ], %g1 ! 201f134 <== NOT EXECUTED 200243c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002440: 12 80 00 20 bne 20024c0 <== NOT EXECUTED 2002444: 07 00 80 7c sethi %hi(0x201f000), %g3 <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 2002448: 09 3f bb 7c sethi %hi(0xfeedf000), %g4 <== NOT EXECUTED 200244c: 82 10 e3 ac or %g3, 0x3ac, %g1 <== NOT EXECUTED 2002450: 88 11 20 0d or %g4, 0xd, %g4 <== NOT EXECUTED 2002454: c8 20 e3 ac st %g4, [ %g3 + 0x3ac ] <== NOT EXECUTED 2002458: 07 02 eb 43 sethi %hi(0xbad0c00), %g3 <== NOT EXECUTED 200245c: 86 10 e1 06 or %g3, 0x106, %g3 ! bad0d06 <== NOT EXECUTED /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 2002460: 05 00 80 7e sethi %hi(0x201f800), %g2 <== NOT EXECUTED 2002464: d0 00 a2 d0 ld [ %g2 + 0x2d0 ], %o0 ! 201fad0 <_Per_CPU_Information><== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 2002468: c6 20 60 04 st %g3, [ %g1 + 4 ] <== NOT EXECUTED 200246c: 07 37 ab 7c sethi %hi(0xdeadf000), %g3 <== NOT EXECUTED 2002470: 86 10 e0 0d or %g3, 0xd, %g3 ! deadf00d <== NOT EXECUTED 2002474: c6 20 60 08 st %g3, [ %g1 + 8 ] <== NOT EXECUTED 2002478: 07 18 03 43 sethi %hi(0x600d0c00), %g3 <== NOT EXECUTED 200247c: 86 10 e1 06 or %g3, 0x106, %g3 ! 600d0d06 <== NOT EXECUTED 2002480: c6 20 60 0c st %g3, [ %g1 + 0xc ] <== NOT EXECUTED /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 2002484: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002488: 02 80 00 0c be 20024b8 <== NOT EXECUTED 200248c: 84 10 a2 d0 or %g2, 0x2d0, %g2 <== NOT EXECUTED 2002490: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED 2002494: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 2002498: 02 80 00 08 be 20024b8 <== NOT EXECUTED 200249c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 20024a0: 84 10 63 bc or %g1, 0x3bc, %g2 ! 201f3bc <== NOT EXECUTED Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 20024a4: 94 22 80 08 sub %o2, %o0, %o2 <== NOT EXECUTED * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 20024a8: d0 20 a0 04 st %o0, [ %g2 + 4 ] <== NOT EXECUTED Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 20024ac: d4 20 63 bc st %o2, [ %g1 + 0x3bc ] <== NOT EXECUTED (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 20024b0: 40 00 3f 2a call 2012158 <== NOT EXECUTED 20024b4: 92 10 20 a5 mov 0xa5, %o1 <== NOT EXECUTED } #endif Stack_check_Initialized = 1; 20024b8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20024bc: c2 27 61 34 st %g1, [ %i5 + 0x134 ] <== NOT EXECUTED 20024c0: 81 c7 e0 08 ret <== NOT EXECUTED 20024c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020025bc : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 20025bc: 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"); 20025c0: 11 00 80 73 sethi %hi(0x201cc00), %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); 20025c4: fa 06 20 b8 ld [ %i0 + 0xb8 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 20025c8: 40 00 07 e7 call 2004564 20025cc: 90 12 21 20 or %o0, 0x120, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 20025d0: 92 10 00 18 mov %i0, %o1 20025d4: 11 00 80 73 sethi %hi(0x201cc00), %o0 20025d8: 40 00 07 e3 call 2004564 20025dc: 90 12 21 30 or %o0, 0x130, %o0 ! 201cd30 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 20025e0: d2 06 20 08 ld [ %i0 + 8 ], %o1 20025e4: 11 00 80 73 sethi %hi(0x201cc00), %o0 20025e8: 40 00 07 df call 2004564 20025ec: 90 12 21 50 or %o0, 0x150, %o0 ! 201cd50 printk( 20025f0: d2 06 20 0c ld [ %i0 + 0xc ], %o1 20025f4: 11 00 80 73 sethi %hi(0x201cc00), %o0 20025f8: 40 00 07 db call 2004564 20025fc: 90 12 21 68 or %o0, 0x168, %o0 ! 201cd68 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2002600: d0 06 20 08 ld [ %i0 + 8 ], %o0 2002604: 94 07 bf e0 add %fp, -32, %o2 2002608: 40 00 12 d5 call 200715c 200260c: 92 10 20 20 mov 0x20, %o1 2002610: 92 10 00 08 mov %o0, %o1 2002614: 11 00 80 73 sethi %hi(0x201cc00), %o0 2002618: 40 00 07 d3 call 2004564 200261c: 90 12 21 80 or %o0, 0x180, %o0 ! 201cd80 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2002620: d4 06 20 b8 ld [ %i0 + 0xb8 ], %o2 2002624: 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( 2002628: 11 00 80 73 sethi %hi(0x201cc00), %o0 200262c: 96 02 80 09 add %o2, %o1, %o3 2002630: 40 00 07 cd call 2004564 2002634: 90 12 21 98 or %o0, 0x198, %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) { 2002638: 80 a6 60 00 cmp %i1, 0 200263c: 02 80 00 04 be 200264c <== ALWAYS TAKEN 2002640: 92 10 20 10 mov 0x10, %o1 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 2002644: 40 00 15 1c call 2007ab4 2002648: 90 10 20 81 mov 0x81, %o0 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 200264c: 11 00 80 73 sethi %hi(0x201cc00), %o0 2002650: 94 07 60 08 add %i5, 8, %o2 2002654: 90 12 21 d0 or %o0, 0x1d0, %o0 2002658: 40 00 07 c3 call 2004564 200265c: 96 07 60 18 add %i5, 0x18, %o3 2002660: 30 bf ff f9 b,a 2002644 =============================================================================== 02007c0c <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2007c0c: 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; 2007c10: 39 00 80 7d sethi %hi(0x201f400), %i4 2007c14: fa 07 22 b4 ld [ %i4 + 0x2b4 ], %i5 ! 201f6b4 <_API_extensions_List> 2007c18: b8 17 22 b4 or %i4, 0x2b4, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2007c1c: b8 07 20 04 add %i4, 4, %i4 2007c20: 80 a7 40 1c cmp %i5, %i4 2007c24: 02 80 00 09 be 2007c48 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 2007c28: 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)(); 2007c2c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2007c30: 9f c0 40 00 call %g1 2007c34: 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 ) { 2007c38: 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 ); 2007c3c: 80 a7 40 1c cmp %i5, %i4 2007c40: 32 bf ff fc bne,a 2007c30 <_API_extensions_Run_postdriver+0x24> 2007c44: c2 07 60 08 ld [ %i5 + 8 ], %g1 2007c48: 81 c7 e0 08 ret 2007c4c: 81 e8 00 00 restore =============================================================================== 02007c50 <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 2007c50: 9d e3 bf a0 save %sp, -96, %sp 2007c54: 39 00 80 7d sethi %hi(0x201f400), %i4 2007c58: fa 07 22 b4 ld [ %i4 + 0x2b4 ], %i5 ! 201f6b4 <_API_extensions_List> 2007c5c: b8 17 22 b4 or %i4, 0x2b4, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2007c60: b8 07 20 04 add %i4, 4, %i4 2007c64: 80 a7 40 1c cmp %i5, %i4 2007c68: 02 80 00 0a be 2007c90 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 2007c6c: 37 00 80 7e sethi %hi(0x201f800), %i3 2007c70: b6 16 e2 00 or %i3, 0x200, %i3 ! 201fa00 <_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 ); 2007c74: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2007c78: 9f c0 40 00 call %g1 2007c7c: 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 ) { 2007c80: 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 ); 2007c84: 80 a7 40 1c cmp %i5, %i4 2007c88: 32 bf ff fc bne,a 2007c78 <_API_extensions_Run_postswitch+0x28> 2007c8c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2007c90: 81 c7 e0 08 ret 2007c94: 81 e8 00 00 restore =============================================================================== 0200a308 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200a308: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 200a30c: 03 00 80 8a sethi %hi(0x2022800), %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 ); 200a310: 7f ff e5 7c call 2003900 200a314: fa 00 62 1c ld [ %g1 + 0x21c ], %i5 ! 2022a1c <_Per_CPU_Information+0xc> 200a318: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 200a31c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200a320: 80 a0 60 00 cmp %g1, 0 200a324: 02 80 00 2b be 200a3d0 <_CORE_RWLock_Release+0xc8> 200a328: 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 ) { 200a32c: 22 80 00 22 be,a 200a3b4 <_CORE_RWLock_Release+0xac> 200a330: 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; 200a334: 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; 200a338: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 200a33c: 7f ff e5 75 call 2003910 200a340: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 200a344: 40 00 08 1d call 200c3b8 <_Thread_queue_Dequeue> 200a348: 90 10 00 18 mov %i0, %o0 if ( next ) { 200a34c: 80 a2 20 00 cmp %o0, 0 200a350: 22 80 00 24 be,a 200a3e0 <_CORE_RWLock_Release+0xd8> 200a354: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 200a358: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 200a35c: 80 a0 60 01 cmp %g1, 1 200a360: 02 80 00 22 be 200a3e8 <_CORE_RWLock_Release+0xe0> 200a364: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200a368: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a36c: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200a370: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200a374: 10 80 00 09 b 200a398 <_CORE_RWLock_Release+0x90> 200a378: 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 || 200a37c: 80 a0 60 01 cmp %g1, 1 200a380: 02 80 00 0b be 200a3ac <_CORE_RWLock_Release+0xa4> <== NEVER TAKEN 200a384: 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; 200a388: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a38c: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 200a390: 40 00 09 1a call 200c7f8 <_Thread_queue_Extract> 200a394: 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 ); 200a398: 40 00 09 69 call 200c93c <_Thread_queue_First> 200a39c: 90 10 00 18 mov %i0, %o0 if ( !next || 200a3a0: 92 92 20 00 orcc %o0, 0, %o1 200a3a4: 32 bf ff f6 bne,a 200a37c <_CORE_RWLock_Release+0x74> 200a3a8: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200a3ac: 81 c7 e0 08 ret 200a3b0: 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; 200a3b4: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 200a3b8: 80 a0 60 00 cmp %g1, 0 200a3bc: 02 bf ff de be 200a334 <_CORE_RWLock_Release+0x2c> 200a3c0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 200a3c4: 7f ff e5 53 call 2003910 200a3c8: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 200a3cc: 30 80 00 05 b,a 200a3e0 <_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 ); 200a3d0: 7f ff e5 50 call 2003910 200a3d4: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200a3d8: 82 10 20 02 mov 2, %g1 200a3dc: c2 27 60 34 st %g1, [ %i5 + 0x34 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200a3e0: 81 c7 e0 08 ret 200a3e4: 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; 200a3e8: 82 10 20 02 mov 2, %g1 200a3ec: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200a3f0: 81 c7 e0 08 ret 200a3f4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a3f8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 200a3f8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a3fc: 90 10 00 18 mov %i0, %o0 200a400: 40 00 07 17 call 200c05c <_Thread_Get> 200a404: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a408: c2 07 bf fc ld [ %fp + -4 ], %g1 200a40c: 80 a0 60 00 cmp %g1, 0 200a410: 12 80 00 09 bne 200a434 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 200a414: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200a418: 40 00 09 8b call 200ca44 <_Thread_queue_Process_timeout> 200a41c: 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--; 200a420: 03 00 80 89 sethi %hi(0x2022400), %g1 200a424: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20224d0 <_Thread_Dispatch_disable_level> 200a428: 84 00 bf ff add %g2, -1, %g2 200a42c: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ] return _Thread_Dispatch_disable_level; 200a430: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 200a434: 81 c7 e0 08 ret 200a438: 81 e8 00 00 restore =============================================================================== 02011fac <_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 ) { 2011fac: 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; 2011fb0: 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; 2011fb4: 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; 2011fb8: 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; 2011fbc: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2011fc0: 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)) { 2011fc4: 80 8e e0 03 btst 3, %i3 2011fc8: 02 80 00 0a be 2011ff0 <_CORE_message_queue_Initialize+0x44> 2011fcc: b8 10 00 1b mov %i3, %i4 allocated_message_size += sizeof(uint32_t); 2011fd0: b8 06 e0 04 add %i3, 4, %i4 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2011fd4: b8 0f 3f fc and %i4, -4, %i4 } if (allocated_message_size < maximum_message_size) 2011fd8: 80 a6 c0 1c cmp %i3, %i4 2011fdc: 08 80 00 05 bleu 2011ff0 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2011fe0: ba 10 20 00 clr %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2011fe4: b0 0f 60 01 and %i5, 1, %i0 2011fe8: 81 c7 e0 08 ret 2011fec: 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( 2011ff0: b8 07 20 14 add %i4, 0x14, %i4 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2011ff4: 90 10 20 00 clr %o0 2011ff8: 92 10 00 1a mov %i2, %o1 2011ffc: 94 10 20 00 clr %o2 2012000: 96 10 00 1c mov %i4, %o3 2012004: 40 00 4b a0 call 2024e84 <__muldi3> 2012008: ba 10 20 00 clr %i5 if ( x > SIZE_MAX ) 201200c: 80 a2 20 00 cmp %o0, 0 2012010: 34 bf ff f6 bg,a 2011fe8 <_CORE_message_queue_Initialize+0x3c> 2012014: 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 ); 2012018: 40 00 0d 1c call 2015488 <_Workspace_Allocate> 201201c: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2012020: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2012024: 80 a2 20 00 cmp %o0, 0 2012028: 02 bf ff ef be 2011fe4 <_CORE_message_queue_Initialize+0x38> 201202c: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2012030: 90 06 20 68 add %i0, 0x68, %o0 2012034: 94 10 00 1a mov %i2, %o2 2012038: 40 00 1a 26 call 20188d0 <_Chain_Initialize> 201203c: 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( 2012040: 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 ); 2012044: 82 06 20 50 add %i0, 0x50, %g1 2012048: 84 18 a0 01 xor %g2, 1, %g2 201204c: 80 a0 00 02 cmp %g0, %g2 2012050: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2012054: 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; 2012058: c4 26 20 50 st %g2, [ %i0 + 0x50 ] 201205c: 90 10 00 18 mov %i0, %o0 head->previous = NULL; 2012060: c0 26 20 54 clr [ %i0 + 0x54 ] 2012064: 92 60 3f ff subx %g0, -1, %o1 2012068: 94 10 20 80 mov 0x80, %o2 201206c: 96 10 20 06 mov 6, %o3 2012070: 40 00 0a 9a call 2014ad8 <_Thread_queue_Initialize> 2012074: ba 10 20 01 mov 1, %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2012078: b0 0f 60 01 and %i5, 1, %i0 201207c: 81 c7 e0 08 ret 2012080: 81 e8 00 00 restore =============================================================================== 0200800c <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 200800c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 2008010: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 2008014: 05 00 80 7e sethi %hi(0x201f800), %g2 <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 2008018: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200801c: 02 80 00 0c be 200804c <_CORE_mutex_Seize_interrupt_blocking+0x40><== NOT EXECUTED 2008020: fa 00 a2 0c ld [ %g2 + 0x20c ], %i5 <== NOT EXECUTED false ); } } the_mutex->blocked_count++; 2008024: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 2008028: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED false ); } } the_mutex->blocked_count++; 200802c: 82 00 60 01 inc %g1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 2008030: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2008034: 15 00 80 29 sethi %hi(0x200a400), %o2 <== NOT EXECUTED 2008038: 94 12 a3 30 or %o2, 0x330, %o2 ! 200a730 <_Thread_queue_Timeout><== NOT EXECUTED 200803c: 40 00 08 c5 call 200a350 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED 2008040: c2 26 20 58 st %g1, [ %i0 + 0x58 ] <== NOT EXECUTED _Thread_Enable_dispatch(); 2008044: 40 00 07 78 call 2009e24 <_Thread_Enable_dispatch> <== NOT EXECUTED 2008048: 81 e8 00 00 restore <== NOT EXECUTED { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( _Scheduler_Is_priority_higher_than( 200804c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 <== NOT EXECUTED 2008050: d0 07 60 14 ld [ %i5 + 0x14 ], %o0 <== NOT EXECUTED 2008054: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED 2008058: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201e878 <_Scheduler+0x30><== NOT EXECUTED 200805c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008060: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 <== NOT EXECUTED 2008064: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2008068: 24 bf ff f0 ble,a 2008028 <_CORE_mutex_Seize_interrupt_blocking+0x1c><== NOT EXECUTED 200806c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED executing->current_priority, the_mutex->holder->current_priority)) { _Thread_Change_priority( 2008070: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED 2008074: d2 07 60 14 ld [ %i5 + 0x14 ], %o1 <== NOT EXECUTED 2008078: 40 00 06 2e call 2009930 <_Thread_Change_priority> <== NOT EXECUTED 200807c: 94 10 20 00 clr %o2 <== NOT EXECUTED false ); } } the_mutex->blocked_count++; 2008080: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 2008084: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED false ); } } the_mutex->blocked_count++; 2008088: 82 00 60 01 inc %g1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 200808c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2008090: 15 00 80 29 sethi %hi(0x200a400), %o2 <== NOT EXECUTED 2008094: 94 12 a3 30 or %o2, 0x330, %o2 ! 200a730 <_Thread_queue_Timeout><== NOT EXECUTED 2008098: 40 00 08 ae call 200a350 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED 200809c: c2 26 20 58 st %g1, [ %i0 + 0x58 ] <== NOT EXECUTED _Thread_Enable_dispatch(); 20080a0: 40 00 07 61 call 2009e24 <_Thread_Enable_dispatch> <== NOT EXECUTED 20080a4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200821c <_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 ) { 200821c: 9d e3 bf a0 save %sp, -96, %sp 2008220: ba 10 00 18 mov %i0, %i5 Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008224: b0 10 20 00 clr %i0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2008228: 40 00 07 e3 call 200a1b4 <_Thread_queue_Dequeue> 200822c: 90 10 00 1d mov %i5, %o0 2008230: 80 a2 20 00 cmp %o0, 0 2008234: 02 80 00 04 be 2008244 <_CORE_semaphore_Surrender+0x28> 2008238: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 200823c: 81 c7 e0 08 ret 2008240: 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 ); 2008244: 7f ff e8 c6 call 200255c 2008248: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 200824c: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2008250: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2008254: 80 a0 40 02 cmp %g1, %g2 2008258: 1a 80 00 05 bcc 200826c <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 200825c: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2008260: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008264: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2008268: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 200826c: 7f ff e8 c0 call 200256c 2008270: 01 00 00 00 nop } return status; } 2008274: 81 c7 e0 08 ret 2008278: 81 e8 00 00 restore =============================================================================== 0200e430 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 200e430: 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; 200e434: 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 ); 200e438: ba 06 20 04 add %i0, 4, %i5 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200e43c: 80 a6 a0 00 cmp %i2, 0 200e440: 02 80 00 12 be 200e488 <_Chain_Initialize+0x58> <== NEVER TAKEN 200e444: 90 10 00 18 mov %i0, %o0 200e448: 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; 200e44c: 82 10 00 19 mov %i1, %g1 head->previous = NULL; while ( count-- ) { 200e450: 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; 200e454: 10 80 00 05 b 200e468 <_Chain_Initialize+0x38> 200e458: 84 10 00 18 mov %i0, %g2 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200e45c: 84 10 00 01 mov %g1, %g2 200e460: b4 06 bf ff add %i2, -1, %i2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 200e464: 82 10 00 03 mov %g3, %g1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 200e468: c2 20 80 00 st %g1, [ %g2 ] next->previous = current; 200e46c: c4 20 60 04 st %g2, [ %g1 + 4 ] Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200e470: 80 a6 a0 00 cmp %i2, 0 200e474: 12 bf ff fa bne 200e45c <_Chain_Initialize+0x2c> 200e478: 86 00 40 1b add %g1, %i3, %g3 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 200e47c: 40 00 2f ae call 201a334 <.umul> 200e480: 90 10 00 1b mov %i3, %o0 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200e484: 90 06 40 08 add %i1, %o0, %o0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 200e488: fa 22 00 00 st %i5, [ %o0 ] tail->previous = current; 200e48c: d0 26 20 08 st %o0, [ %i0 + 8 ] } 200e490: 81 c7 e0 08 ret 200e494: 81 e8 00 00 restore =============================================================================== 02006e20 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2006e20: 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 ]; 2006e24: fa 06 21 58 ld [ %i0 + 0x158 ], %i5 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2006e28: 7f ff ed cd call 200255c 2006e2c: f8 06 20 30 ld [ %i0 + 0x30 ], %i4 pending_events = api->pending_events; 2006e30: c4 07 40 00 ld [ %i5 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 2006e34: 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 ) ) { 2006e38: 86 88 40 02 andcc %g1, %g2, %g3 2006e3c: 02 80 00 39 be 2006f20 <_Event_Surrender+0x100> 2006e40: 09 00 80 7e sethi %hi(0x201f800), %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() && 2006e44: 88 11 22 00 or %g4, 0x200, %g4 ! 201fa00 <_Per_CPU_Information> 2006e48: f2 01 20 08 ld [ %g4 + 8 ], %i1 2006e4c: 80 a6 60 00 cmp %i1, 0 2006e50: 32 80 00 1c bne,a 2006ec0 <_Event_Surrender+0xa0> 2006e54: 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); 2006e58: 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 ) ) { 2006e5c: 80 89 21 00 btst 0x100, %g4 2006e60: 02 80 00 30 be 2006f20 <_Event_Surrender+0x100> 2006e64: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2006e68: 02 80 00 04 be 2006e78 <_Event_Surrender+0x58> 2006e6c: 80 8f 20 02 btst 2, %i4 2006e70: 02 80 00 2c be 2006f20 <_Event_Surrender+0x100> <== NEVER TAKEN 2006e74: 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; 2006e78: 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) ); 2006e7c: 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 ); 2006e80: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 2006e84: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2006e88: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2006e8c: 7f ff ed b8 call 200256c 2006e90: 01 00 00 00 nop 2006e94: 7f ff ed b2 call 200255c 2006e98: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2006e9c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2006ea0: 80 a0 60 02 cmp %g1, 2 2006ea4: 02 80 00 21 be 2006f28 <_Event_Surrender+0x108> 2006ea8: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2006eac: 7f ff ed b0 call 200256c 2006eb0: 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 ); 2006eb4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2006eb8: 40 00 0a e9 call 2009a5c <_Thread_Clear_state> 2006ebc: 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() && 2006ec0: 80 a6 00 04 cmp %i0, %g4 2006ec4: 32 bf ff e6 bne,a 2006e5c <_Event_Surrender+0x3c> 2006ec8: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2006ecc: 09 00 80 7f sethi %hi(0x201fc00), %g4 2006ed0: f2 01 22 00 ld [ %g4 + 0x200 ], %i1 ! 201fe00 <_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 ) && 2006ed4: 80 a6 60 02 cmp %i1, 2 2006ed8: 02 80 00 07 be 2006ef4 <_Event_Surrender+0xd4> <== NEVER TAKEN 2006edc: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2006ee0: f2 01 22 00 ld [ %g4 + 0x200 ], %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) || 2006ee4: 80 a6 60 01 cmp %i1, 1 2006ee8: 32 bf ff dd bne,a 2006e5c <_Event_Surrender+0x3c> 2006eec: 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) ) { 2006ef0: 80 a0 40 03 cmp %g1, %g3 2006ef4: 02 80 00 04 be 2006f04 <_Event_Surrender+0xe4> 2006ef8: 80 8f 20 02 btst 2, %i4 2006efc: 02 80 00 09 be 2006f20 <_Event_Surrender+0x100> <== NEVER TAKEN 2006f00: 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; 2006f04: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2006f08: 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 ); 2006f0c: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 2006f10: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2006f14: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2006f18: 82 10 20 03 mov 3, %g1 2006f1c: c2 21 22 00 st %g1, [ %g4 + 0x200 ] _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2006f20: 7f ff ed 93 call 200256c 2006f24: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2006f28: 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 ); 2006f2c: 7f ff ed 90 call 200256c 2006f30: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 2006f34: 40 00 0f b0 call 200adf4 <_Watchdog_Remove> 2006f38: 90 06 20 48 add %i0, 0x48, %o0 2006f3c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006f40: 40 00 0a c7 call 2009a5c <_Thread_Clear_state> 2006f44: 81 e8 00 00 restore =============================================================================== 02006f48 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2006f48: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2006f4c: 90 10 00 18 mov %i0, %o0 2006f50: 40 00 0b c2 call 2009e58 <_Thread_Get> 2006f54: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2006f58: c2 07 bf fc ld [ %fp + -4 ], %g1 2006f5c: 80 a0 60 00 cmp %g1, 0 2006f60: 12 80 00 16 bne 2006fb8 <_Event_Timeout+0x70> <== NEVER TAKEN 2006f64: 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 ); 2006f68: 7f ff ed 7d call 200255c 2006f6c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 2006f70: 03 00 80 7e sethi %hi(0x201f800), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2006f74: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 201fa0c <_Per_CPU_Information+0xc> 2006f78: 80 a7 40 01 cmp %i5, %g1 2006f7c: 02 80 00 11 be 2006fc0 <_Event_Timeout+0x78> 2006f80: 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; 2006f84: 82 10 20 06 mov 6, %g1 2006f88: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 2006f8c: 7f ff ed 78 call 200256c 2006f90: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2006f94: 90 10 00 1d mov %i5, %o0 2006f98: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006f9c: 40 00 0a b0 call 2009a5c <_Thread_Clear_state> 2006fa0: 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--; 2006fa4: 03 00 80 7d sethi %hi(0x201f400), %g1 2006fa8: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level> 2006fac: 84 00 bf ff add %g2, -1, %g2 2006fb0: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 2006fb4: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 2006fb8: 81 c7 e0 08 ret 2006fbc: 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 ) 2006fc0: 03 00 80 7f sethi %hi(0x201fc00), %g1 2006fc4: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 201fe00 <_Event_Sync_state> 2006fc8: 80 a0 a0 01 cmp %g2, 1 2006fcc: 32 bf ff ef bne,a 2006f88 <_Event_Timeout+0x40> 2006fd0: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2006fd4: 84 10 20 02 mov 2, %g2 2006fd8: c4 20 62 00 st %g2, [ %g1 + 0x200 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2006fdc: 10 bf ff eb b 2006f88 <_Event_Timeout+0x40> 2006fe0: 82 10 20 06 mov 6, %g1 =============================================================================== 0200e644 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200e644: 9d e3 bf 98 save %sp, -104, %sp 200e648: 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 200e64c: a0 06 60 04 add %i1, 4, %l0 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 200e650: 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 ) { 200e654: 80 a6 40 10 cmp %i1, %l0 200e658: 18 80 00 23 bgu 200e6e4 <_Heap_Allocate_aligned_with_boundary+0xa0> 200e65c: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200e660: 80 a6 e0 00 cmp %i3, 0 200e664: 12 80 00 7d bne 200e858 <_Heap_Allocate_aligned_with_boundary+0x214> 200e668: 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; 200e66c: 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 ) { 200e670: 80 a7 40 11 cmp %i5, %l1 200e674: 02 80 00 18 be 200e6d4 <_Heap_Allocate_aligned_with_boundary+0x90> 200e678: 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 200e67c: 82 05 a0 07 add %l6, 7, %g1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200e680: 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 200e684: c2 27 bf fc st %g1, [ %fp + -4 ] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200e688: 10 80 00 0b b 200e6b4 <_Heap_Allocate_aligned_with_boundary+0x70> 200e68c: 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 ) { 200e690: 12 80 00 17 bne 200e6ec <_Heap_Allocate_aligned_with_boundary+0xa8> 200e694: b0 04 60 08 add %l1, 8, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e698: 80 a6 20 00 cmp %i0, 0 200e69c: 12 80 00 5b bne 200e808 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200e6a0: b8 07 20 01 inc %i4 break; } block = block->next; 200e6a4: 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 ) { 200e6a8: 80 a7 40 11 cmp %i5, %l1 200e6ac: 22 80 00 0b be,a 200e6d8 <_Heap_Allocate_aligned_with_boundary+0x94> 200e6b0: 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 ) { 200e6b4: e4 04 60 04 ld [ %l1 + 4 ], %l2 200e6b8: 80 a4 00 12 cmp %l0, %l2 200e6bc: 0a bf ff f5 bcs 200e690 <_Heap_Allocate_aligned_with_boundary+0x4c> 200e6c0: 80 a6 a0 00 cmp %i2, 0 if ( alloc_begin != 0 ) { break; } block = block->next; 200e6c4: 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 ) { 200e6c8: 80 a7 40 11 cmp %i5, %l1 200e6cc: 12 bf ff fa bne 200e6b4 <_Heap_Allocate_aligned_with_boundary+0x70> 200e6d0: b8 07 20 01 inc %i4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200e6d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200e6d8: 80 a0 40 1c cmp %g1, %i4 200e6dc: 0a 80 00 5a bcs 200e844 <_Heap_Allocate_aligned_with_boundary+0x200> 200e6e0: b0 10 20 00 clr %i0 stats->max_search = search_count; } return (void *) alloc_begin; } 200e6e4: 81 c7 e0 08 ret 200e6e8: 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; 200e6ec: 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; 200e6f0: 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; 200e6f4: 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; 200e6f8: 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; 200e6fc: 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); 200e700: 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; 200e704: 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 200e708: a4 00 40 12 add %g1, %l2, %l2 200e70c: 40 00 2f f0 call 201a6cc <.urem> 200e710: 90 10 00 18 mov %i0, %o0 200e714: 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 ) { 200e718: 80 a4 80 18 cmp %l2, %i0 200e71c: 1a 80 00 06 bcc 200e734 <_Heap_Allocate_aligned_with_boundary+0xf0> 200e720: a8 04 60 08 add %l1, 8, %l4 200e724: 90 10 00 12 mov %l2, %o0 200e728: 40 00 2f e9 call 201a6cc <.urem> 200e72c: 92 10 00 1a mov %i2, %o1 200e730: b0 24 80 08 sub %l2, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200e734: 80 a6 e0 00 cmp %i3, 0 200e738: 02 80 00 24 be 200e7c8 <_Heap_Allocate_aligned_with_boundary+0x184> 200e73c: 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; 200e740: a4 06 00 19 add %i0, %i1, %l2 200e744: 92 10 00 1b mov %i3, %o1 200e748: 40 00 2f e1 call 201a6cc <.urem> 200e74c: 90 10 00 12 mov %l2, %o0 200e750: 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 ) { 200e754: 80 a6 00 08 cmp %i0, %o0 200e758: 1a 80 00 1b bcc 200e7c4 <_Heap_Allocate_aligned_with_boundary+0x180> 200e75c: 80 a2 00 12 cmp %o0, %l2 200e760: 1a 80 00 1a bcc 200e7c8 <_Heap_Allocate_aligned_with_boundary+0x184> 200e764: 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; 200e768: 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 ) { 200e76c: 80 a4 c0 08 cmp %l3, %o0 200e770: 08 80 00 08 bleu 200e790 <_Heap_Allocate_aligned_with_boundary+0x14c> 200e774: b0 10 20 00 clr %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e778: 10 bf ff c9 b 200e69c <_Heap_Allocate_aligned_with_boundary+0x58> 200e77c: 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 ) { 200e780: 1a 80 00 11 bcc 200e7c4 <_Heap_Allocate_aligned_with_boundary+0x180> 200e784: 80 a4 c0 08 cmp %l3, %o0 if ( boundary_line < boundary_floor ) { 200e788: 18 bf ff c4 bgu 200e698 <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN 200e78c: b0 10 20 00 clr %i0 return 0; } alloc_begin = boundary_line - alloc_size; 200e790: b0 22 00 19 sub %o0, %i1, %i0 200e794: 92 10 00 1a mov %i2, %o1 200e798: 40 00 2f cd call 201a6cc <.urem> 200e79c: 90 10 00 18 mov %i0, %o0 200e7a0: 92 10 00 1b mov %i3, %o1 200e7a4: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200e7a8: a4 06 00 19 add %i0, %i1, %l2 200e7ac: 40 00 2f c8 call 201a6cc <.urem> 200e7b0: 90 10 00 12 mov %l2, %o0 200e7b4: 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 ) { 200e7b8: 80 a2 00 12 cmp %o0, %l2 200e7bc: 0a bf ff f1 bcs 200e780 <_Heap_Allocate_aligned_with_boundary+0x13c> 200e7c0: 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 ) { 200e7c4: 80 a5 00 18 cmp %l4, %i0 200e7c8: 18 80 00 22 bgu 200e850 <_Heap_Allocate_aligned_with_boundary+0x20c> 200e7cc: 82 10 3f f8 mov -8, %g1 200e7d0: 90 10 00 18 mov %i0, %o0 200e7d4: a4 20 40 11 sub %g1, %l1, %l2 200e7d8: 92 10 00 16 mov %l6, %o1 200e7dc: 40 00 2f bc call 201a6cc <.urem> 200e7e0: 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 ) { 200e7e4: 90 a4 80 08 subcc %l2, %o0, %o0 200e7e8: 02 bf ff ad be 200e69c <_Heap_Allocate_aligned_with_boundary+0x58> 200e7ec: 80 a6 20 00 cmp %i0, 0 200e7f0: 80 a2 00 15 cmp %o0, %l5 return alloc_begin; } } return 0; 200e7f4: 82 40 3f ff addx %g0, -1, %g1 200e7f8: b0 0e 00 01 and %i0, %g1, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200e7fc: 80 a6 20 00 cmp %i0, 0 200e800: 02 bf ff a9 be 200e6a4 <_Heap_Allocate_aligned_with_boundary+0x60> 200e804: 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; 200e808: c4 07 60 48 ld [ %i5 + 0x48 ], %g2 stats->searches += search_count; 200e80c: 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; 200e810: 84 00 a0 01 inc %g2 stats->searches += search_count; 200e814: 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; 200e818: c4 27 60 48 st %g2, [ %i5 + 0x48 ] stats->searches += search_count; 200e81c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200e820: 90 10 00 1d mov %i5, %o0 200e824: 92 10 00 11 mov %l1, %o1 200e828: 94 10 00 18 mov %i0, %o2 200e82c: 7f ff e7 ad call 20086e0 <_Heap_Block_allocate> 200e830: 96 10 00 19 mov %i1, %o3 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200e834: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200e838: 80 a0 40 1c cmp %g1, %i4 200e83c: 1a 80 00 03 bcc 200e848 <_Heap_Allocate_aligned_with_boundary+0x204> 200e840: 01 00 00 00 nop stats->max_search = search_count; 200e844: f8 27 60 44 st %i4, [ %i5 + 0x44 ] } return (void *) alloc_begin; } 200e848: 81 c7 e0 08 ret 200e84c: 81 e8 00 00 restore if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 200e850: 10 bf ff 92 b 200e698 <_Heap_Allocate_aligned_with_boundary+0x54> 200e854: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200e858: 18 bf ff a3 bgu 200e6e4 <_Heap_Allocate_aligned_with_boundary+0xa0> 200e85c: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 200e860: 22 bf ff 83 be,a 200e66c <_Heap_Allocate_aligned_with_boundary+0x28> 200e864: 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; 200e868: 10 bf ff 82 b 200e670 <_Heap_Allocate_aligned_with_boundary+0x2c> 200e86c: e2 07 60 08 ld [ %i5 + 8 ], %l1 =============================================================================== 0200e85c <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200e85c: 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; 200e860: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200e864: 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; 200e868: 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; 200e86c: 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; 200e870: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 200e874: 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; 200e878: 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 ) { 200e87c: 80 a6 40 1d cmp %i1, %i5 200e880: 08 80 00 05 bleu 200e894 <_Heap_Extend+0x38> 200e884: a2 10 20 00 clr %l1 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 200e888: b0 0c 60 01 and %l1, 1, %i0 200e88c: 81 c7 e0 08 ret 200e890: 81 e8 00 00 restore if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200e894: 90 10 00 19 mov %i1, %o0 200e898: 92 10 00 1a mov %i2, %o1 200e89c: 94 10 00 10 mov %l0, %o2 200e8a0: 98 07 bf f8 add %fp, -8, %o4 200e8a4: 7f ff e7 26 call 200853c <_Heap_Get_first_and_last_block> 200e8a8: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200e8ac: 80 8a 20 ff btst 0xff, %o0 200e8b0: 02 bf ff f6 be 200e888 <_Heap_Extend+0x2c> 200e8b4: aa 10 20 00 clr %l5 200e8b8: a2 10 00 1c mov %i4, %l1 200e8bc: ac 10 20 00 clr %l6 200e8c0: a6 10 20 00 clr %l3 200e8c4: 10 80 00 14 b 200e914 <_Heap_Extend+0xb8> 200e8c8: 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 ) { 200e8cc: 2a 80 00 02 bcs,a 200e8d4 <_Heap_Extend+0x78> 200e8d0: 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); 200e8d4: 90 10 00 1a mov %i2, %o0 200e8d8: 40 00 30 4d call 201aa0c <.urem> 200e8dc: 92 10 00 10 mov %l0, %o1 200e8e0: 82 06 bf f8 add %i2, -8, %g1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200e8e4: 80 a6 80 19 cmp %i2, %i1 200e8e8: 02 80 00 1c be 200e958 <_Heap_Extend+0xfc> 200e8ec: 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 ) { 200e8f0: 80 a6 40 1a cmp %i1, %i2 200e8f4: 38 80 00 02 bgu,a 200e8fc <_Heap_Extend+0xa0> 200e8f8: 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; 200e8fc: e2 00 60 04 ld [ %g1 + 4 ], %l1 200e900: 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); 200e904: 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 ); 200e908: 80 a7 00 11 cmp %i4, %l1 200e90c: 22 80 00 1b be,a 200e978 <_Heap_Extend+0x11c> 200e910: 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; 200e914: 80 a4 40 1c cmp %l1, %i4 200e918: 02 80 00 72 be 200eae0 <_Heap_Extend+0x284> 200e91c: 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 ( 200e920: 80 a0 40 1d cmp %g1, %i5 200e924: 0a 80 00 7c bcs 200eb14 <_Heap_Extend+0x2b8> 200e928: 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 ) { 200e92c: 80 a0 40 1d cmp %g1, %i5 200e930: 12 bf ff e7 bne 200e8cc <_Heap_Extend+0x70> 200e934: 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); 200e938: 90 10 00 1a mov %i2, %o0 200e93c: 40 00 30 34 call 201aa0c <.urem> 200e940: 92 10 00 10 mov %l0, %o1 200e944: 82 06 bf f8 add %i2, -8, %g1 200e948: 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 ) { 200e94c: 80 a6 80 19 cmp %i2, %i1 200e950: 12 bf ff e8 bne 200e8f0 <_Heap_Extend+0x94> <== ALWAYS TAKEN 200e954: 82 20 40 08 sub %g1, %o0, %g1 start_block->prev_size = extend_area_end; 200e958: 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; 200e95c: e2 00 60 04 ld [ %g1 + 4 ], %l1 200e960: 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); 200e964: 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 ); 200e968: 80 a7 00 11 cmp %i4, %l1 200e96c: 12 bf ff ea bne 200e914 <_Heap_Extend+0xb8> <== NEVER TAKEN 200e970: a6 10 00 01 mov %g1, %l3 if ( extend_area_begin < heap->area_begin ) { 200e974: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200e978: 80 a6 40 01 cmp %i1, %g1 200e97c: 3a 80 00 61 bcc,a 200eb00 <_Heap_Extend+0x2a4> 200e980: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200e984: 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; 200e988: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e98c: 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 ) { 200e990: 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 = 200e994: 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; 200e998: fa 20 40 00 st %i5, [ %g1 ] extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200e99c: 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 = 200e9a0: 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; 200e9a4: 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 ) { 200e9a8: 80 a1 00 01 cmp %g4, %g1 200e9ac: 08 80 00 4f bleu 200eae8 <_Heap_Extend+0x28c> 200e9b0: c0 20 a0 04 clr [ %g2 + 4 ] heap->first_block = extend_first_block; 200e9b4: 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 ) { 200e9b8: 80 a5 20 00 cmp %l4, 0 200e9bc: 02 80 00 76 be 200eb94 <_Heap_Extend+0x338> 200e9c0: 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; 200e9c4: 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; 200e9c8: 92 10 00 1c mov %i4, %o1 200e9cc: 40 00 30 10 call 201aa0c <.urem> 200e9d0: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200e9d4: 80 a2 20 00 cmp %o0, 0 200e9d8: 02 80 00 04 be 200e9e8 <_Heap_Extend+0x18c> 200e9dc: c8 05 00 00 ld [ %l4 ], %g4 return value - remainder + alignment; 200e9e0: b2 06 40 1c add %i1, %i4, %i1 200e9e4: b2 26 40 08 sub %i1, %o0, %i1 static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200e9e8: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 --stats->frees; 200e9ec: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 ) { uintptr_t const page_size = heap->page_size; 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 = 200e9f0: 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; 200e9f4: c8 26 7f f8 st %g4, [ %i1 + -8 ] static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200e9f8: 84 00 a0 01 inc %g2 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 = 200e9fc: 88 25 00 01 sub %l4, %g1, %g4 { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; --stats->frees; 200ea00: 82 00 ff ff add %g3, -1, %g1 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; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 200ea04: 88 11 20 01 or %g4, 1, %g4 200ea08: c8 26 7f fc st %g4, [ %i1 + -4 ] static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200ea0c: c4 26 20 40 st %g2, [ %i0 + 0x40 ] --stats->frees; 200ea10: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block )); 200ea14: 90 10 00 18 mov %i0, %o0 200ea18: 40 00 00 66 call 200ebb0 <_Heap_Free> 200ea1c: 92 10 00 19 mov %i1, %o1 link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200ea20: 80 a4 e0 00 cmp %l3, 0 200ea24: 02 80 00 41 be 200eb28 <_Heap_Extend+0x2cc> 200ea28: 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); 200ea2c: 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( 200ea30: ba 27 40 13 sub %i5, %l3, %i5 200ea34: 40 00 2f f6 call 201aa0c <.urem> 200ea38: 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) 200ea3c: c2 04 e0 04 ld [ %l3 + 4 ], %g1 200ea40: ba 27 40 08 sub %i5, %o0, %i5 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200ea44: 84 07 40 13 add %i5, %l3, %g2 (last_block->size_and_flag - last_block_new_size) 200ea48: 82 20 40 1d sub %g1, %i5, %g1 | HEAP_PREV_BLOCK_USED; 200ea4c: 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 = 200ea50: c2 20 a0 04 st %g1, [ %g2 + 4 ] static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200ea54: c4 06 20 40 ld [ %i0 + 0x40 ], %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; 200ea58: c6 04 e0 04 ld [ %l3 + 4 ], %g3 --stats->frees; 200ea5c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200ea60: 86 08 e0 01 and %g3, 1, %g3 static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200ea64: 84 00 a0 01 inc %g2 block->size_and_flag = size | flag; 200ea68: ba 17 40 03 or %i5, %g3, %i5 --stats->frees; 200ea6c: 82 00 7f ff add %g1, -1, %g1 200ea70: fa 24 e0 04 st %i5, [ %l3 + 4 ] static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200ea74: c4 26 20 40 st %g2, [ %i0 + 0x40 ] --stats->frees; 200ea78: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block )); 200ea7c: 90 10 00 18 mov %i0, %o0 200ea80: 40 00 00 4c call 200ebb0 <_Heap_Free> 200ea84: 92 04 e0 08 add %l3, 8, %o1 extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200ea88: 80 a4 e0 00 cmp %l3, 0 200ea8c: 02 80 00 34 be 200eb5c <_Heap_Extend+0x300> 200ea90: 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 200ea94: 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( 200ea98: 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; 200ea9c: 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; 200eaa0: 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; 200eaa4: 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( 200eaa8: 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; 200eaac: 88 09 20 01 and %g4, 1, %g4 block->size_and_flag = size | flag; 200eab0: 88 17 40 04 or %i5, %g4, %g4 200eab4: c8 20 60 04 st %g4, [ %g1 + 4 ] 200eab8: a4 20 c0 12 sub %g3, %l2, %l2 /* Statistics */ stats->size += extended_size; 200eabc: 82 00 80 12 add %g2, %l2, %g1 200eac0: c2 26 20 2c st %g1, [ %i0 + 0x2c ] if ( extended_size_ptr != NULL ) 200eac4: 80 a6 e0 00 cmp %i3, 0 200eac8: 02 bf ff 70 be 200e888 <_Heap_Extend+0x2c> <== NEVER TAKEN 200eacc: a2 10 20 01 mov 1, %l1 *extended_size_ptr = extended_size; 200ead0: e4 26 c0 00 st %l2, [ %i3 ] return true; } 200ead4: b0 0c 60 01 and %l1, 1, %i0 200ead8: 81 c7 e0 08 ret 200eadc: 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; 200eae0: 10 bf ff 90 b 200e920 <_Heap_Extend+0xc4> 200eae4: 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 ) { 200eae8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200eaec: 80 a0 40 02 cmp %g1, %g2 200eaf0: 2a bf ff b2 bcs,a 200e9b8 <_Heap_Extend+0x15c> 200eaf4: c4 26 20 24 st %g2, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200eaf8: 10 bf ff b1 b 200e9bc <_Heap_Extend+0x160> 200eafc: 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 ) { 200eb00: 80 a7 40 01 cmp %i5, %g1 200eb04: 38 bf ff a1 bgu,a 200e988 <_Heap_Extend+0x12c> 200eb08: 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; 200eb0c: 10 bf ff a0 b 200e98c <_Heap_Extend+0x130> 200eb10: 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 ( 200eb14: 80 a6 40 1a cmp %i1, %i2 200eb18: 1a bf ff 86 bcc 200e930 <_Heap_Extend+0xd4> 200eb1c: 80 a0 40 1d cmp %g1, %i5 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 200eb20: 10 bf ff 5a b 200e888 <_Heap_Extend+0x2c> 200eb24: 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 ) { 200eb28: 80 a5 60 00 cmp %l5, 0 200eb2c: 02 bf ff d7 be 200ea88 <_Heap_Extend+0x22c> 200eb30: 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; 200eb34: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200eb38: c2 07 bf fc ld [ %fp + -4 ], %g1 200eb3c: 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 ); 200eb40: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200eb44: 84 10 80 03 or %g2, %g3, %g2 200eb48: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200eb4c: c4 00 60 04 ld [ %g1 + 4 ], %g2 200eb50: 84 10 a0 01 or %g2, 1, %g2 200eb54: 10 bf ff cd b 200ea88 <_Heap_Extend+0x22c> 200eb58: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200eb5c: 32 bf ff cf bne,a 200ea98 <_Heap_Extend+0x23c> 200eb60: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200eb64: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 --stats->frees; 200eb68: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block )); 200eb6c: d2 07 bf f8 ld [ %fp + -8 ], %o1 static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200eb70: 84 00 a0 01 inc %g2 --stats->frees; 200eb74: 82 00 7f ff add %g1, -1, %g1 static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block ) { Heap_Statistics *const stats = &heap->stats; /* Statistics */ ++stats->used_blocks; 200eb78: c4 26 20 40 st %g2, [ %i0 + 0x40 ] --stats->frees; 200eb7c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block )); 200eb80: 90 10 00 18 mov %i0, %o0 200eb84: 40 00 00 0b call 200ebb0 <_Heap_Free> 200eb88: 92 02 60 08 add %o1, 8, %o1 */ 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 200eb8c: 10 bf ff c3 b 200ea98 <_Heap_Extend+0x23c> 200eb90: 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 ) { 200eb94: 80 a5 a0 00 cmp %l6, 0 200eb98: 02 bf ff a3 be 200ea24 <_Heap_Extend+0x1c8> 200eb9c: 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; 200eba0: ac 25 80 02 sub %l6, %g2, %l6 200eba4: 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 = 200eba8: 10 bf ff 9f b 200ea24 <_Heap_Extend+0x1c8> 200ebac: ec 20 a0 04 st %l6, [ %g2 + 4 ] =============================================================================== 0200e870 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200e870: 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 ) { 200e874: 80 a6 60 00 cmp %i1, 0 200e878: 02 80 00 57 be 200e9d4 <_Heap_Free+0x164> 200e87c: 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); 200e880: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e884: 40 00 2f 92 call 201a6cc <.urem> 200e888: 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 200e88c: 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); 200e890: 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); 200e894: 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; 200e898: 80 a7 40 01 cmp %i5, %g1 200e89c: 0a 80 00 4e bcs 200e9d4 <_Heap_Free+0x164> 200e8a0: 84 10 20 00 clr %g2 200e8a4: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200e8a8: 80 a7 40 04 cmp %i5, %g4 200e8ac: 38 80 00 4b bgu,a 200e9d8 <_Heap_Free+0x168> 200e8b0: 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; 200e8b4: de 07 60 04 ld [ %i5 + 4 ], %o7 200e8b8: 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); 200e8bc: 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; 200e8c0: 80 a0 40 03 cmp %g1, %g3 200e8c4: 38 80 00 45 bgu,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN 200e8c8: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 200e8cc: 80 a1 00 03 cmp %g4, %g3 200e8d0: 2a 80 00 42 bcs,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN 200e8d4: 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; 200e8d8: da 00 e0 04 ld [ %g3 + 4 ], %o5 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200e8dc: 80 8b 60 01 btst 1, %o5 200e8e0: 02 80 00 3d be 200e9d4 <_Heap_Free+0x164> 200e8e4: 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 )); 200e8e8: 80 a1 00 03 cmp %g4, %g3 200e8ec: 02 80 00 06 be 200e904 <_Heap_Free+0x94> 200e8f0: 9a 10 20 00 clr %o5 200e8f4: 84 00 c0 0c add %g3, %o4, %g2 200e8f8: da 00 a0 04 ld [ %g2 + 4 ], %o5 200e8fc: 9a 0b 60 01 and %o5, 1, %o5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200e900: 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 ) ) { 200e904: 80 8b e0 01 btst 1, %o7 200e908: 12 80 00 1d bne 200e97c <_Heap_Free+0x10c> 200e90c: 80 8b 60 ff btst 0xff, %o5 uintptr_t const prev_size = block->prev_size; 200e910: 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); 200e914: 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; 200e918: 80 a0 40 0f cmp %g1, %o7 200e91c: 18 80 00 2e bgu 200e9d4 <_Heap_Free+0x164> <== NEVER TAKEN 200e920: 84 10 20 00 clr %g2 200e924: 80 a1 00 0f cmp %g4, %o7 200e928: 2a 80 00 2c bcs,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN 200e92c: 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; 200e930: 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) ) { 200e934: 80 88 60 01 btst 1, %g1 200e938: 02 80 00 27 be 200e9d4 <_Heap_Free+0x164> <== NEVER TAKEN 200e93c: 80 8b 60 ff btst 0xff, %o5 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200e940: 22 80 00 3a be,a 200ea28 <_Heap_Free+0x1b8> 200e944: 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; 200e948: c2 00 e0 08 ld [ %g3 + 8 ], %g1 Heap_Block *prev = block->prev; 200e94c: 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; 200e950: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 prev->next = next; 200e954: c2 20 a0 08 st %g1, [ %g2 + 8 ] next->prev = prev; 200e958: c4 20 60 0c st %g2, [ %g1 + 0xc ] 200e95c: 82 00 ff ff add %g3, -1, %g1 200e960: 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; 200e964: 98 06 40 0c add %i1, %o4, %o4 200e968: 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; 200e96c: 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; 200e970: 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; 200e974: 10 80 00 0e b 200e9ac <_Heap_Free+0x13c> 200e978: 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 */ 200e97c: 22 80 00 19 be,a 200e9e0 <_Heap_Free+0x170> 200e980: 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; 200e984: c4 00 e0 08 ld [ %g3 + 8 ], %g2 Heap_Block *prev = old_block->prev; 200e988: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 new_block->next = next; 200e98c: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = prev; 200e990: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200e994: 98 03 00 19 add %o4, %i1, %o4 next->prev = new_block; 200e998: fa 20 a0 0c st %i5, [ %g2 + 0xc ] prev->next = new_block; 200e99c: fa 20 60 08 st %i5, [ %g1 + 8 ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200e9a0: 84 13 20 01 or %o4, 1, %g2 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200e9a4: 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; 200e9a8: c4 27 60 04 st %g2, [ %i5 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e9ac: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200e9b0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200e9b4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e9b8: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; 200e9bc: 82 00 60 01 inc %g1 stats->free_size += block_size; 200e9c0: b2 00 c0 19 add %g3, %i1, %i1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e9c4: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; 200e9c8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200e9cc: f2 26 20 30 st %i1, [ %i0 + 0x30 ] return( true ); 200e9d0: 84 10 20 01 mov 1, %g2 } 200e9d4: b0 08 a0 01 and %g2, 1, %i0 200e9d8: 81 c7 e0 08 ret 200e9dc: 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; 200e9e0: 82 16 60 01 or %i1, 1, %g1 200e9e4: c2 27 60 04 st %g1, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200e9e8: c8 00 e0 04 ld [ %g3 + 4 ], %g4 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200e9ec: f0 27 60 0c st %i0, [ %i5 + 0xc ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200e9f0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200e9f4: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200e9f8: 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; 200e9fc: 84 09 3f fe and %g4, -2, %g2 next_block->prev_size = block_size; 200ea00: 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; 200ea04: 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 ) { 200ea08: 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; 200ea0c: 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; 200ea10: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200ea14: 80 a0 40 02 cmp %g1, %g2 200ea18: 08 bf ff e5 bleu 200e9ac <_Heap_Free+0x13c> 200ea1c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200ea20: 10 bf ff e3 b 200e9ac <_Heap_Free+0x13c> 200ea24: 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; 200ea28: 82 12 e0 01 or %o3, 1, %g1 200ea2c: c2 23 e0 04 st %g1, [ %o7 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200ea30: c2 00 e0 04 ld [ %g3 + 4 ], %g1 next_block->prev_size = size; 200ea34: 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; 200ea38: 82 08 7f fe and %g1, -2, %g1 200ea3c: 10 bf ff dc b 200e9ac <_Heap_Free+0x13c> 200ea40: c2 20 e0 04 st %g1, [ %g3 + 4 ] =============================================================================== 020084dc <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 20084dc: 9d e3 bf a0 save %sp, -96, %sp uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 20084e0: a0 06 20 08 add %i0, 8, %l0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 20084e4: 92 10 00 1a mov %i2, %o1 20084e8: 40 00 48 79 call 201a6cc <.urem> 20084ec: 90 10 00 10 mov %l0, %o0 if ( remainder != 0 ) { 20084f0: 80 a2 20 00 cmp %o0, 0 20084f4: 02 80 00 04 be 2008504 <_Heap_Get_first_and_last_block+0x28> 20084f8: 84 06 40 18 add %i1, %i0, %g2 return value - remainder + alignment; 20084fc: a0 06 80 10 add %i2, %l0, %l0 2008500: a0 24 00 08 sub %l0, %o0, %l0 uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 2008504: 82 24 00 18 sub %l0, %i0, %g1 _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 2008508: 80 a0 40 19 cmp %g1, %i1 200850c: 1a 80 00 13 bcc 2008558 <_Heap_Get_first_and_last_block+0x7c> 2008510: a0 04 3f f8 add %l0, -8, %l0 2008514: 80 a0 80 18 cmp %g2, %i0 2008518: 0a 80 00 10 bcs 2008558 <_Heap_Get_first_and_last_block+0x7c><== NEVER TAKEN 200851c: b2 26 40 01 sub %i1, %g1, %i1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 2008520: 92 10 00 1a mov %i2, %o1 2008524: 40 00 48 6a call 201a6cc <.urem> 2008528: 90 10 00 19 mov %i1, %o0 200852c: b2 26 40 08 sub %i1, %o0, %i1 heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 2008530: 80 a6 c0 19 cmp %i3, %i1 2008534: 18 80 00 06 bgu 200854c <_Heap_Get_first_and_last_block+0x70><== NEVER TAKEN 2008538: b0 10 20 00 clr %i0 ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 200853c: e0 27 00 00 st %l0, [ %i4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2008540: b2 06 40 10 add %i1, %l0, %i1 *last_block_ptr = last_block; return true; 2008544: b0 10 20 01 mov 1, %i0 /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; *last_block_ptr = last_block; 2008548: f2 27 40 00 st %i1, [ %i5 ] return true; } 200854c: b0 0e 20 01 and %i0, 1, %i0 2008550: 81 c7 e0 08 ret 2008554: 81 e8 00 00 restore heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 2008558: b0 10 20 00 clr %i0 *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 200855c: b0 0e 20 01 and %i0, 1, %i0 2008560: 81 c7 e0 08 ret 2008564: 81 e8 00 00 restore =============================================================================== 0200f364 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 200f364: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *the_block = the_heap->first_block; 200f368: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 Heap_Block *const end = the_heap->last_block; 200f36c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 memset(the_info, 0, sizeof(*the_info)); 200f370: 92 10 20 00 clr %o1 200f374: 90 10 00 19 mov %i1, %o0 200f378: 40 00 0c e3 call 2012704 200f37c: 94 10 20 18 mov 0x18, %o2 while ( the_block != end ) { 200f380: 80 a7 40 1c cmp %i5, %i4 200f384: 02 80 00 17 be 200f3e0 <_Heap_Get_information+0x7c> <== NEVER TAKEN 200f388: 01 00 00 00 nop 200f38c: c6 07 60 04 ld [ %i5 + 4 ], %g3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 200f390: 84 08 ff fe and %g3, -2, %g2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200f394: ba 07 40 02 add %i5, %g2, %i5 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; 200f398: c6 07 60 04 ld [ %i5 + 4 ], %g3 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 200f39c: 80 88 e0 01 btst 1, %g3 200f3a0: 02 80 00 03 be 200f3ac <_Heap_Get_information+0x48> 200f3a4: 82 10 00 19 mov %i1, %g1 info = &the_info->Used; 200f3a8: 82 06 60 0c add %i1, 0xc, %g1 else info = &the_info->Free; info->number++; 200f3ac: de 00 40 00 ld [ %g1 ], %o7 info->total += the_size; 200f3b0: f0 00 60 08 ld [ %g1 + 8 ], %i0 if ( info->largest < the_size ) 200f3b4: c8 00 60 04 ld [ %g1 + 4 ], %g4 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 200f3b8: 9e 03 e0 01 inc %o7 info->total += the_size; 200f3bc: b0 06 00 02 add %i0, %g2, %i0 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 200f3c0: de 20 40 00 st %o7, [ %g1 ] info->total += the_size; if ( info->largest < the_size ) 200f3c4: 80 a1 00 02 cmp %g4, %g2 200f3c8: 1a 80 00 03 bcc 200f3d4 <_Heap_Get_information+0x70> 200f3cc: f0 20 60 08 st %i0, [ %g1 + 8 ] info->largest = the_size; 200f3d0: c4 20 60 04 st %g2, [ %g1 + 4 ] Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 200f3d4: 80 a7 00 1d cmp %i4, %i5 200f3d8: 12 bf ff ef bne 200f394 <_Heap_Get_information+0x30> 200f3dc: 84 08 ff fe and %g3, -2, %g2 200f3e0: 81 c7 e0 08 ret 200f3e4: 81 e8 00 00 restore =============================================================================== 0200eb64 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200eb64: 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); 200eb68: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200eb6c: 40 00 2e d8 call 201a6cc <.urem> 200eb70: 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 200eb74: 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); 200eb78: 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); 200eb7c: 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; 200eb80: 80 a0 80 01 cmp %g2, %g1 200eb84: 0a 80 00 16 bcs 200ebdc <_Heap_Size_of_alloc_area+0x78> 200eb88: 86 10 20 00 clr %g3 200eb8c: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200eb90: 80 a0 80 04 cmp %g2, %g4 200eb94: 18 80 00 13 bgu 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200eb98: 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; 200eb9c: f0 00 a0 04 ld [ %g2 + 4 ], %i0 200eba0: 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); 200eba4: 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; 200eba8: 80 a0 40 02 cmp %g1, %g2 200ebac: 18 80 00 0d bgu 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200ebb0: b0 08 e0 01 and %g3, 1, %i0 200ebb4: 80 a1 00 02 cmp %g4, %g2 200ebb8: 0a 80 00 0a bcs 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200ebbc: 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; 200ebc0: 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 ) 200ebc4: 80 88 60 01 btst 1, %g1 200ebc8: 02 80 00 06 be 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200ebcc: 84 20 80 19 sub %g2, %i1, %g2 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200ebd0: 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; 200ebd4: 84 00 a0 04 add %g2, 4, %g2 200ebd8: c4 26 80 00 st %g2, [ %i2 ] return true; } 200ebdc: b0 08 e0 01 and %g3, 1, %i0 200ebe0: 81 c7 e0 08 ret 200ebe4: 81 e8 00 00 restore =============================================================================== 020094bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 20094bc: 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; 20094c0: 3b 00 80 25 sethi %hi(0x2009400), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 20094c4: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 20094c8: f6 06 20 14 ld [ %i0 + 0x14 ], %i3 Heap_Block *const first_block = heap->first_block; 20094cc: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 Heap_Block *const last_block = heap->last_block; 20094d0: 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; 20094d4: 80 a6 a0 00 cmp %i2, 0 20094d8: 02 80 00 04 be 20094e8 <_Heap_Walk+0x2c> 20094dc: ba 17 60 50 or %i5, 0x50, %i5 20094e0: 3b 00 80 25 sethi %hi(0x2009400), %i5 20094e4: ba 17 60 58 or %i5, 0x58, %i5 ! 2009458 <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 20094e8: 03 00 80 86 sethi %hi(0x2021800), %g1 20094ec: c4 00 63 18 ld [ %g1 + 0x318 ], %g2 ! 2021b18 <_System_state_Current> 20094f0: 80 a0 a0 03 cmp %g2, 3 20094f4: 02 80 00 05 be 2009508 <_Heap_Walk+0x4c> 20094f8: 82 10 20 01 mov 1, %g1 block = next_block; } while ( block != first_block ); return true; } 20094fc: b0 08 60 01 and %g1, 1, %i0 2009500: 81 c7 e0 08 ret 2009504: 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)( 2009508: da 06 20 18 ld [ %i0 + 0x18 ], %o5 200950c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2009510: c4 06 20 08 ld [ %i0 + 8 ], %g2 2009514: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009518: 90 10 00 19 mov %i1, %o0 200951c: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009520: f8 23 a0 60 st %i4, [ %sp + 0x60 ] 2009524: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 2009528: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 200952c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2009530: 92 10 20 00 clr %o1 2009534: 96 10 00 10 mov %l0, %o3 2009538: 15 00 80 79 sethi %hi(0x201e400), %o2 200953c: 98 10 00 1b mov %i3, %o4 2009540: 9f c7 40 00 call %i5 2009544: 94 12 a1 98 or %o2, 0x198, %o2 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2009548: 80 a4 20 00 cmp %l0, 0 200954c: 02 80 00 28 be 20095ec <_Heap_Walk+0x130> 2009550: 80 8c 20 07 btst 7, %l0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009554: 12 80 00 2d bne 2009608 <_Heap_Walk+0x14c> 2009558: 90 10 00 1b mov %i3, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200955c: 7f ff e1 64 call 2001aec <.urem> 2009560: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2009564: 80 a2 20 00 cmp %o0, 0 2009568: 12 80 00 30 bne 2009628 <_Heap_Walk+0x16c> 200956c: 90 07 20 08 add %i4, 8, %o0 2009570: 7f ff e1 5f call 2001aec <.urem> 2009574: 92 10 00 10 mov %l0, %o1 ); return false; } if ( 2009578: 80 a2 20 00 cmp %o0, 0 200957c: 32 80 00 33 bne,a 2009648 <_Heap_Walk+0x18c> 2009580: 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; 2009584: e8 07 20 04 ld [ %i4 + 4 ], %l4 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2009588: 80 8d 20 01 btst 1, %l4 200958c: 22 80 00 36 be,a 2009664 <_Heap_Walk+0x1a8> 2009590: 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; 2009594: c2 04 60 04 ld [ %l1 + 4 ], %g1 2009598: 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); 200959c: 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; 20095a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20095a4: 80 88 a0 01 btst 1, %g2 20095a8: 02 80 00 0a be 20095d0 <_Heap_Walk+0x114> 20095ac: 80 a7 00 01 cmp %i4, %g1 ); return false; } if ( 20095b0: 02 80 00 33 be 200967c <_Heap_Walk+0x1c0> 20095b4: 90 10 00 19 mov %i1, %o0 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 20095b8: 92 10 20 01 mov 1, %o1 20095bc: 15 00 80 79 sethi %hi(0x201e400), %o2 20095c0: 9f c7 40 00 call %i5 20095c4: 94 12 a3 10 or %o2, 0x310, %o2 ! 201e710 <__log2table+0x2d8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 20095c8: 10 bf ff cd b 20094fc <_Heap_Walk+0x40> 20095cc: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 20095d0: 90 10 00 19 mov %i1, %o0 20095d4: 92 10 20 01 mov 1, %o1 20095d8: 15 00 80 79 sethi %hi(0x201e400), %o2 20095dc: 9f c7 40 00 call %i5 20095e0: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 201e6f8 <__log2table+0x2c0> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 20095e4: 10 bf ff c6 b 20094fc <_Heap_Walk+0x40> 20095e8: 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" ); 20095ec: 90 10 00 19 mov %i1, %o0 20095f0: 92 10 20 01 mov 1, %o1 20095f4: 15 00 80 79 sethi %hi(0x201e400), %o2 20095f8: 9f c7 40 00 call %i5 20095fc: 94 12 a2 30 or %o2, 0x230, %o2 ! 201e630 <__log2table+0x1f8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009600: 10 bf ff bf b 20094fc <_Heap_Walk+0x40> 2009604: 82 10 20 00 clr %g1 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2009608: 90 10 00 19 mov %i1, %o0 200960c: 92 10 20 01 mov 1, %o1 2009610: 96 10 00 10 mov %l0, %o3 2009614: 15 00 80 79 sethi %hi(0x201e400), %o2 2009618: 9f c7 40 00 call %i5 200961c: 94 12 a2 48 or %o2, 0x248, %o2 ! 201e648 <__log2table+0x210> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009620: 10 bf ff b7 b 20094fc <_Heap_Walk+0x40> 2009624: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 2009628: 90 10 00 19 mov %i1, %o0 200962c: 92 10 20 01 mov 1, %o1 2009630: 96 10 00 1b mov %i3, %o3 2009634: 15 00 80 79 sethi %hi(0x201e400), %o2 2009638: 9f c7 40 00 call %i5 200963c: 94 12 a2 68 or %o2, 0x268, %o2 ! 201e668 <__log2table+0x230> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009640: 10 bf ff af b 20094fc <_Heap_Walk+0x40> 2009644: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2009648: 92 10 20 01 mov 1, %o1 200964c: 96 10 00 1c mov %i4, %o3 2009650: 15 00 80 79 sethi %hi(0x201e400), %o2 2009654: 9f c7 40 00 call %i5 2009658: 94 12 a2 90 or %o2, 0x290, %o2 ! 201e690 <__log2table+0x258> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200965c: 10 bf ff a8 b 20094fc <_Heap_Walk+0x40> 2009660: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2009664: 92 10 20 01 mov 1, %o1 2009668: 15 00 80 79 sethi %hi(0x201e400), %o2 200966c: 9f c7 40 00 call %i5 2009670: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 201e6c8 <__log2table+0x290> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009674: 10 bf ff a2 b 20094fc <_Heap_Walk+0x40> 2009678: 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; 200967c: 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; 2009680: 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 ) { 2009684: 80 a6 00 1a cmp %i0, %i2 2009688: 02 80 00 0d be 20096bc <_Heap_Walk+0x200> 200968c: 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; 2009690: 80 a0 40 1a cmp %g1, %i2 2009694: 28 80 00 bc bleu,a 2009984 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN 2009698: e6 06 20 24 ld [ %i0 + 0x24 ], %l3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 200969c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20096a0: 92 10 20 01 mov 1, %o1 20096a4: 96 10 00 1a mov %i2, %o3 20096a8: 15 00 80 79 sethi %hi(0x201e400), %o2 20096ac: 9f c7 40 00 call %i5 20096b0: 94 12 a3 40 or %o2, 0x340, %o2 ! 201e740 <__log2table+0x308> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 20096b4: 10 bf ff 92 b 20094fc <_Heap_Walk+0x40> 20096b8: 82 10 20 00 clr %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20096bc: 2d 00 80 7a sethi %hi(0x201e800), %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)( 20096c0: 2f 00 80 7a sethi %hi(0x201e800), %l7 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20096c4: a4 10 00 1c mov %i4, %l2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20096c8: ac 15 a1 70 or %l6, 0x170, %l6 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 20096cc: ae 15 e1 58 or %l7, 0x158, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 20096d0: 2b 00 80 7a sethi %hi(0x201e800), %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; 20096d4: 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); 20096d8: 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; 20096dc: 80 a0 40 1a cmp %g1, %i2 20096e0: 28 80 00 0b bleu,a 200970c <_Heap_Walk+0x250> <== ALWAYS TAKEN 20096e4: 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)( 20096e8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20096ec: 92 10 20 01 mov 1, %o1 20096f0: 96 10 00 12 mov %l2, %o3 20096f4: 15 00 80 79 sethi %hi(0x201e400), %o2 20096f8: 98 10 00 1a mov %i2, %o4 20096fc: 9f c7 40 00 call %i5 2009700: 94 12 a3 e8 or %o2, 0x3e8, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 2009704: 10 bf ff 7e b 20094fc <_Heap_Walk+0x40> 2009708: 82 10 20 00 clr %g1 200970c: 80 a0 40 1a cmp %g1, %i2 2009710: 0a bf ff f7 bcs 20096ec <_Heap_Walk+0x230> 2009714: 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; 2009718: 82 1c 80 11 xor %l2, %l1, %g1 200971c: 80 a0 00 01 cmp %g0, %g1 2009720: 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; 2009724: 90 10 00 13 mov %l3, %o0 2009728: c2 27 bf fc st %g1, [ %fp + -4 ] 200972c: 7f ff e0 f0 call 2001aec <.urem> 2009730: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 2009734: 80 a2 20 00 cmp %o0, 0 2009738: 02 80 00 05 be 200974c <_Heap_Walk+0x290> 200973c: c2 07 bf fc ld [ %fp + -4 ], %g1 2009740: 80 88 60 ff btst 0xff, %g1 2009744: 12 80 00 76 bne 200991c <_Heap_Walk+0x460> 2009748: 90 10 00 19 mov %i1, %o0 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 200974c: 80 a6 c0 13 cmp %i3, %l3 2009750: 08 80 00 05 bleu 2009764 <_Heap_Walk+0x2a8> 2009754: 80 a4 80 1a cmp %l2, %i2 2009758: 80 88 60 ff btst 0xff, %g1 200975c: 12 80 00 78 bne 200993c <_Heap_Walk+0x480> <== ALWAYS TAKEN 2009760: 80 a4 80 1a cmp %l2, %i2 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2009764: 2a 80 00 06 bcs,a 200977c <_Heap_Walk+0x2c0> 2009768: c2 06 a0 04 ld [ %i2 + 4 ], %g1 200976c: 80 88 60 ff btst 0xff, %g1 2009770: 12 80 00 7d bne 2009964 <_Heap_Walk+0x4a8> 2009774: 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; 2009778: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200977c: 80 88 60 01 btst 1, %g1 2009780: 02 80 00 19 be 20097e4 <_Heap_Walk+0x328> 2009784: a8 0d 20 01 and %l4, 1, %l4 if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2009788: 80 a5 20 00 cmp %l4, 0 200978c: 22 80 00 0e be,a 20097c4 <_Heap_Walk+0x308> 2009790: da 04 80 00 ld [ %l2 ], %o5 (*printer)( 2009794: 90 10 00 19 mov %i1, %o0 2009798: 92 10 20 00 clr %o1 200979c: 94 10 00 17 mov %l7, %o2 20097a0: 96 10 00 12 mov %l2, %o3 20097a4: 9f c7 40 00 call %i5 20097a8: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 20097ac: 80 a7 00 1a cmp %i4, %i2 20097b0: 02 80 00 42 be 20098b8 <_Heap_Walk+0x3fc> 20097b4: a4 10 00 1a mov %i2, %l2 20097b8: e8 06 a0 04 ld [ %i2 + 4 ], %l4 20097bc: 10 bf ff c6 b 20096d4 <_Heap_Walk+0x218> 20097c0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20097c4: 96 10 00 12 mov %l2, %o3 20097c8: 90 10 00 19 mov %i1, %o0 20097cc: 92 10 20 00 clr %o1 20097d0: 94 10 00 16 mov %l6, %o2 20097d4: 9f c7 40 00 call %i5 20097d8: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 20097dc: 10 bf ff f5 b 20097b0 <_Heap_Walk+0x2f4> 20097e0: 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 ? 20097e4: 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)( 20097e8: c2 06 20 08 ld [ %i0 + 8 ], %g1 20097ec: 05 00 80 79 sethi %hi(0x201e400), %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; 20097f0: c8 06 20 0c ld [ %i0 + 0xc ], %g4 20097f4: 80 a0 40 0d cmp %g1, %o5 20097f8: 02 80 00 05 be 200980c <_Heap_Walk+0x350> 20097fc: 86 10 a1 58 or %g2, 0x158, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2009800: 80 a6 00 0d cmp %i0, %o5 2009804: 02 80 00 3c be 20098f4 <_Heap_Walk+0x438> 2009808: 86 15 61 20 or %l5, 0x120, %g3 block->next, block->next == last_free_block ? 200980c: 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)( 2009810: 1f 00 80 79 sethi %hi(0x201e400), %o7 2009814: 80 a1 00 01 cmp %g4, %g1 2009818: 02 80 00 05 be 200982c <_Heap_Walk+0x370> 200981c: 84 13 e1 78 or %o7, 0x178, %g2 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009820: 80 a6 00 01 cmp %i0, %g1 2009824: 02 80 00 31 be 20098e8 <_Heap_Walk+0x42c> 2009828: 84 15 61 20 or %l5, 0x120, %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)( 200982c: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009830: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 2009834: c4 23 a0 64 st %g2, [ %sp + 0x64 ] 2009838: 90 10 00 19 mov %i1, %o0 200983c: 92 10 20 00 clr %o1 2009840: 15 00 80 7a sethi %hi(0x201e800), %o2 2009844: 96 10 00 12 mov %l2, %o3 2009848: 94 12 a0 b0 or %o2, 0xb0, %o2 200984c: 9f c7 40 00 call %i5 2009850: 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 ) { 2009854: da 06 80 00 ld [ %i2 ], %o5 2009858: 80 a4 c0 0d cmp %l3, %o5 200985c: 12 80 00 19 bne 20098c0 <_Heap_Walk+0x404> 2009860: 80 a5 20 00 cmp %l4, 0 ); return false; } if ( !prev_used ) { 2009864: 02 80 00 27 be 2009900 <_Heap_Walk+0x444> 2009868: 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; 200986c: 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 ) { 2009870: 80 a6 00 01 cmp %i0, %g1 2009874: 02 80 00 0b be 20098a0 <_Heap_Walk+0x3e4> <== NEVER TAKEN 2009878: 92 10 20 01 mov 1, %o1 if ( free_block == block ) { 200987c: 80 a4 80 01 cmp %l2, %g1 2009880: 02 bf ff cc be 20097b0 <_Heap_Walk+0x2f4> 2009884: 80 a7 00 1a cmp %i4, %i2 return true; } free_block = free_block->next; 2009888: 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 ) { 200988c: 80 a6 00 01 cmp %i0, %g1 2009890: 12 bf ff fc bne 2009880 <_Heap_Walk+0x3c4> 2009894: 80 a4 80 01 cmp %l2, %g1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009898: 90 10 00 19 mov %i1, %o0 200989c: 92 10 20 01 mov 1, %o1 20098a0: 96 10 00 12 mov %l2, %o3 20098a4: 15 00 80 7a sethi %hi(0x201e800), %o2 20098a8: 9f c7 40 00 call %i5 20098ac: 94 12 a1 98 or %o2, 0x198, %o2 ! 201e998 <__log2table+0x560> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 20098b0: 10 bf ff 13 b 20094fc <_Heap_Walk+0x40> 20098b4: 82 10 20 00 clr %g1 } block = next_block; } while ( block != first_block ); return true; 20098b8: 10 bf ff 11 b 20094fc <_Heap_Walk+0x40> 20098bc: 82 10 20 01 mov 1, %g1 " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 20098c0: f4 23 a0 5c st %i2, [ %sp + 0x5c ] 20098c4: 90 10 00 19 mov %i1, %o0 20098c8: 92 10 20 01 mov 1, %o1 20098cc: 96 10 00 12 mov %l2, %o3 20098d0: 15 00 80 7a sethi %hi(0x201e800), %o2 20098d4: 98 10 00 13 mov %l3, %o4 20098d8: 9f c7 40 00 call %i5 20098dc: 94 12 a0 e8 or %o2, 0xe8, %o2 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 20098e0: 10 bf ff 07 b 20094fc <_Heap_Walk+0x40> 20098e4: 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)" : "") 20098e8: 05 00 80 79 sethi %hi(0x201e400), %g2 20098ec: 10 bf ff d0 b 200982c <_Heap_Walk+0x370> 20098f0: 84 10 a1 88 or %g2, 0x188, %g2 ! 201e588 <__log2table+0x150> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 20098f4: 07 00 80 79 sethi %hi(0x201e400), %g3 20098f8: 10 bf ff c5 b 200980c <_Heap_Walk+0x350> 20098fc: 86 10 e1 68 or %g3, 0x168, %g3 ! 201e568 <__log2table+0x130> return false; } if ( !prev_used ) { (*printer)( 2009900: 92 10 20 01 mov 1, %o1 2009904: 96 10 00 12 mov %l2, %o3 2009908: 15 00 80 7a sethi %hi(0x201e800), %o2 200990c: 9f c7 40 00 call %i5 2009910: 94 12 a1 28 or %o2, 0x128, %o2 ! 201e928 <__log2table+0x4f0> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 2009914: 10 bf fe fa b 20094fc <_Heap_Walk+0x40> 2009918: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 200991c: 92 10 20 01 mov 1, %o1 2009920: 96 10 00 12 mov %l2, %o3 2009924: 15 00 80 7a sethi %hi(0x201e800), %o2 2009928: 98 10 00 13 mov %l3, %o4 200992c: 9f c7 40 00 call %i5 2009930: 94 12 a0 18 or %o2, 0x18, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 2009934: 10 bf fe f2 b 20094fc <_Heap_Walk+0x40> 2009938: 82 10 20 00 clr %g1 } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 200993c: 90 10 00 19 mov %i1, %o0 2009940: 92 10 20 01 mov 1, %o1 2009944: 96 10 00 12 mov %l2, %o3 2009948: 15 00 80 7a sethi %hi(0x201e800), %o2 200994c: 98 10 00 13 mov %l3, %o4 2009950: 94 12 a0 48 or %o2, 0x48, %o2 2009954: 9f c7 40 00 call %i5 2009958: 9a 10 00 1b mov %i3, %o5 block, block_size, min_block_size ); return false; 200995c: 10 bf fe e8 b 20094fc <_Heap_Walk+0x40> 2009960: 82 10 20 00 clr %g1 } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 2009964: 92 10 20 01 mov 1, %o1 2009968: 96 10 00 12 mov %l2, %o3 200996c: 15 00 80 7a sethi %hi(0x201e800), %o2 2009970: 98 10 00 1a mov %i2, %o4 2009974: 9f c7 40 00 call %i5 2009978: 94 12 a0 78 or %o2, 0x78, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 200997c: 10 bf fe e0 b 20094fc <_Heap_Walk+0x40> 2009980: 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; 2009984: 80 a4 c0 1a cmp %l3, %i2 2009988: 0a bf ff 46 bcs 20096a0 <_Heap_Walk+0x1e4> <== NEVER TAKEN 200998c: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009990: c2 27 bf fc st %g1, [ %fp + -4 ] 2009994: 90 06 a0 08 add %i2, 8, %o0 2009998: 7f ff e0 55 call 2001aec <.urem> 200999c: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 20099a0: 80 a2 20 00 cmp %o0, 0 20099a4: 12 80 00 36 bne 2009a7c <_Heap_Walk+0x5c0> <== NEVER TAKEN 20099a8: 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; 20099ac: c4 06 a0 04 ld [ %i2 + 4 ], %g2 20099b0: 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; 20099b4: 84 06 80 02 add %i2, %g2, %g2 20099b8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20099bc: 80 88 a0 01 btst 1, %g2 20099c0: 12 80 00 27 bne 2009a5c <_Heap_Walk+0x5a0> <== NEVER TAKEN 20099c4: 84 10 00 18 mov %i0, %g2 20099c8: 10 80 00 19 b 2009a2c <_Heap_Walk+0x570> 20099cc: 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 ) { 20099d0: 80 a6 00 1a cmp %i0, %i2 20099d4: 02 bf ff 3a be 20096bc <_Heap_Walk+0x200> 20099d8: 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; 20099dc: 0a bf ff 31 bcs 20096a0 <_Heap_Walk+0x1e4> 20099e0: 90 10 00 19 mov %i1, %o0 20099e4: 80 a6 80 13 cmp %i2, %l3 20099e8: 18 bf ff 2f bgu 20096a4 <_Heap_Walk+0x1e8> <== NEVER TAKEN 20099ec: 92 10 20 01 mov 1, %o1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20099f0: c2 27 bf fc st %g1, [ %fp + -4 ] 20099f4: 90 06 a0 08 add %i2, 8, %o0 20099f8: 7f ff e0 3d call 2001aec <.urem> 20099fc: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 2009a00: 80 a2 20 00 cmp %o0, 0 2009a04: 12 80 00 1e bne 2009a7c <_Heap_Walk+0x5c0> 2009a08: 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; 2009a0c: c6 06 a0 04 ld [ %i2 + 4 ], %g3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2009a10: 84 10 00 12 mov %l2, %g2 2009a14: 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; 2009a18: 86 00 c0 1a add %g3, %i2, %g3 2009a1c: c6 00 e0 04 ld [ %g3 + 4 ], %g3 2009a20: 80 88 e0 01 btst 1, %g3 2009a24: 12 80 00 0e bne 2009a5c <_Heap_Walk+0x5a0> 2009a28: a4 10 00 1a mov %i2, %l2 ); return false; } if ( free_block->prev != prev_block ) { 2009a2c: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 2009a30: 80 a3 00 02 cmp %o4, %g2 2009a34: 22 bf ff e7 be,a 20099d0 <_Heap_Walk+0x514> 2009a38: f4 06 a0 08 ld [ %i2 + 8 ], %i2 (*printer)( 2009a3c: 90 10 00 19 mov %i1, %o0 2009a40: 92 10 20 01 mov 1, %o1 2009a44: 96 10 00 1a mov %i2, %o3 2009a48: 15 00 80 79 sethi %hi(0x201e400), %o2 2009a4c: 9f c7 40 00 call %i5 2009a50: 94 12 a3 b0 or %o2, 0x3b0, %o2 ! 201e7b0 <__log2table+0x378> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009a54: 10 bf fe aa b 20094fc <_Heap_Walk+0x40> 2009a58: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 2009a5c: 90 10 00 19 mov %i1, %o0 2009a60: 92 10 20 01 mov 1, %o1 2009a64: 96 10 00 1a mov %i2, %o3 2009a68: 15 00 80 79 sethi %hi(0x201e400), %o2 2009a6c: 9f c7 40 00 call %i5 2009a70: 94 12 a3 90 or %o2, 0x390, %o2 ! 201e790 <__log2table+0x358> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009a74: 10 bf fe a2 b 20094fc <_Heap_Walk+0x40> 2009a78: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2009a7c: 90 10 00 19 mov %i1, %o0 2009a80: 92 10 20 01 mov 1, %o1 2009a84: 96 10 00 1a mov %i2, %o3 2009a88: 15 00 80 79 sethi %hi(0x201e400), %o2 2009a8c: 9f c7 40 00 call %i5 2009a90: 94 12 a3 60 or %o2, 0x360, %o2 ! 201e760 <__log2table+0x328> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009a94: 10 bf fe 9a b 20094fc <_Heap_Walk+0x40> 2009a98: 82 10 20 00 clr %g1 =============================================================================== 02007ac0 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 2007ac0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2007ac4: 39 00 80 7f sethi %hi(0x201fc00), %i4 2007ac8: c2 07 22 44 ld [ %i4 + 0x244 ], %g1 ! 201fe44 <_IO_Number_of_drivers> 2007acc: 80 a0 60 00 cmp %g1, 0 2007ad0: 02 80 00 0c be 2007b00 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 2007ad4: ba 10 20 00 clr %i5 2007ad8: b8 17 22 44 or %i4, 0x244, %i4 (void) rtems_io_initialize( major, 0, NULL ); 2007adc: 90 10 00 1d mov %i5, %o0 2007ae0: 92 10 20 00 clr %o1 2007ae4: 40 00 1a 3b call 200e3d0 2007ae8: 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 ++ ) 2007aec: c2 07 00 00 ld [ %i4 ], %g1 2007af0: ba 07 60 01 inc %i5 2007af4: 80 a0 40 1d cmp %g1, %i5 2007af8: 18 bf ff fa bgu 2007ae0 <_IO_Initialize_all_drivers+0x20> 2007afc: 90 10 00 1d mov %i5, %o0 2007b00: 81 c7 e0 08 ret 2007b04: 81 e8 00 00 restore =============================================================================== 020079f4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 20079f4: 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; 20079f8: 03 00 80 79 sethi %hi(0x201e400), %g1 20079fc: 82 10 63 5c or %g1, 0x35c, %g1 ! 201e75c drivers_in_table = Configuration.number_of_device_drivers; 2007a00: f8 00 60 34 ld [ %g1 + 0x34 ], %i4 number_of_drivers = Configuration.maximum_drivers; 2007a04: f2 00 60 30 ld [ %g1 + 0x30 ], %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 ) 2007a08: 80 a7 00 19 cmp %i4, %i1 2007a0c: 0a 80 00 08 bcs 2007a2c <_IO_Manager_initialization+0x38> 2007a10: fa 00 60 38 ld [ %g1 + 0x38 ], %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; 2007a14: 03 00 80 7f sethi %hi(0x201fc00), %g1 2007a18: fa 20 62 48 st %i5, [ %g1 + 0x248 ] ! 201fe48 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 2007a1c: 03 00 80 7f sethi %hi(0x201fc00), %g1 2007a20: f8 20 62 44 st %i4, [ %g1 + 0x244 ] ! 201fe44 <_IO_Number_of_drivers> return; 2007a24: 81 c7 e0 08 ret 2007a28: 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 ) 2007a2c: 83 2e 60 03 sll %i1, 3, %g1 2007a30: b5 2e 60 05 sll %i1, 5, %i2 2007a34: 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( 2007a38: 40 00 0d 7f call 200b034 <_Workspace_Allocate_or_fatal_error> 2007a3c: 90 10 00 1a mov %i2, %o0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2007a40: 03 00 80 7f sethi %hi(0x201fc00), %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 *) 2007a44: 37 00 80 7f sethi %hi(0x201fc00), %i3 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2007a48: f2 20 62 44 st %i1, [ %g1 + 0x244 ] /* * 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 *) 2007a4c: d0 26 e2 48 st %o0, [ %i3 + 0x248 ] _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 2007a50: 92 10 20 00 clr %o1 2007a54: 40 00 29 77 call 2012030 2007a58: 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++ ) 2007a5c: 80 a7 20 00 cmp %i4, 0 2007a60: 02 bf ff f1 be 2007a24 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 2007a64: f6 06 e2 48 ld [ %i3 + 0x248 ], %i3 2007a68: 82 10 20 00 clr %g1 2007a6c: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 2007a70: c4 07 40 01 ld [ %i5 + %g1 ], %g2 2007a74: 86 07 40 01 add %i5, %g1, %g3 2007a78: c4 26 c0 01 st %g2, [ %i3 + %g1 ] 2007a7c: f4 00 e0 04 ld [ %g3 + 4 ], %i2 2007a80: 84 06 c0 01 add %i3, %g1, %g2 2007a84: f4 20 a0 04 st %i2, [ %g2 + 4 ] 2007a88: 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++ ) 2007a8c: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 2007a90: f4 20 a0 08 st %i2, [ %g2 + 8 ] 2007a94: 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++ ) 2007a98: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 2007a9c: f4 20 a0 0c st %i2, [ %g2 + 0xc ] 2007aa0: 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++ ) 2007aa4: 80 a1 00 1c cmp %g4, %i4 _IO_Driver_address_table[index] = driver_table[index]; 2007aa8: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] 2007aac: 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++ ) 2007ab0: 12 bf ff f0 bne 2007a70 <_IO_Manager_initialization+0x7c> 2007ab4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 2007ab8: 81 c7 e0 08 ret 2007abc: 81 e8 00 00 restore =============================================================================== 020088c0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20088c0: 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 ) 20088c4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 20088c8: 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 ) 20088cc: 80 a0 60 00 cmp %g1, 0 20088d0: 02 80 00 19 be 2008934 <_Objects_Allocate+0x74> <== NEVER TAKEN 20088d4: 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 ); 20088d8: b8 07 60 20 add %i5, 0x20, %i4 20088dc: 7f ff fd 3c call 2007dcc <_Chain_Get> 20088e0: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 20088e4: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 20088e8: 80 a0 60 00 cmp %g1, 0 20088ec: 02 80 00 12 be 2008934 <_Objects_Allocate+0x74> 20088f0: 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 ) { 20088f4: 80 a2 20 00 cmp %o0, 0 20088f8: 02 80 00 11 be 200893c <_Objects_Allocate+0x7c> 20088fc: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008900: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2008904: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008908: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 200890c: 40 00 46 c4 call 201a41c <.udiv> 2008910: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2008914: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2008918: 91 2a 20 02 sll %o0, 2, %o0 200891c: c6 00 40 08 ld [ %g1 + %o0 ], %g3 information->inactive--; 2008920: 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 ]--; 2008924: 86 00 ff ff add %g3, -1, %g3 2008928: c6 20 40 08 st %g3, [ %g1 + %o0 ] information->inactive--; 200892c: 82 00 bf ff add %g2, -1, %g1 2008930: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2008934: 81 c7 e0 08 ret 2008938: 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 ); 200893c: 40 00 00 10 call 200897c <_Objects_Extend_information> 2008940: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008944: 7f ff fd 22 call 2007dcc <_Chain_Get> 2008948: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 200894c: b0 92 20 00 orcc %o0, 0, %i0 2008950: 32 bf ff ed bne,a 2008904 <_Objects_Allocate+0x44> 2008954: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 ); } #endif return the_object; } 2008958: 81 c7 e0 08 ret 200895c: 81 e8 00 00 restore =============================================================================== 0200897c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 200897c: 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 ) 2008980: 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 ); 2008984: f8 16 20 0a lduh [ %i0 + 0xa ], %i4 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 2008988: 80 a4 20 00 cmp %l0, 0 200898c: 02 80 00 a6 be 2008c24 <_Objects_Extend_information+0x2a8> 2008990: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2008994: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2 2008998: b3 2e 60 10 sll %i1, 0x10, %i1 200899c: 92 10 00 1a mov %i2, %o1 20089a0: 40 00 46 9f call 201a41c <.udiv> 20089a4: 91 36 60 10 srl %i1, 0x10, %o0 20089a8: a7 2a 20 10 sll %o0, 0x10, %l3 20089ac: a7 34 e0 10 srl %l3, 0x10, %l3 for ( ; block < block_count; block++ ) { 20089b0: 80 a4 e0 00 cmp %l3, 0 20089b4: 02 80 00 a3 be 2008c40 <_Objects_Extend_information+0x2c4><== NEVER TAKEN 20089b8: 90 10 00 1a mov %i2, %o0 if ( information->object_blocks[ block ] == NULL ) { 20089bc: 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 ); 20089c0: 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 ) { 20089c4: 80 a0 60 00 cmp %g1, 0 20089c8: 12 80 00 08 bne 20089e8 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN 20089cc: b6 10 20 00 clr %i3 do_extend = false; 20089d0: 10 80 00 a0 b 2008c50 <_Objects_Extend_information+0x2d4> <== NOT EXECUTED 20089d4: 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 ) { 20089d8: c2 04 00 01 ld [ %l0 + %g1 ], %g1 20089dc: 80 a0 60 00 cmp %g1, 0 20089e0: 22 80 00 08 be,a 2008a00 <_Objects_Extend_information+0x84> 20089e4: 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++ ) { 20089e8: b6 06 e0 01 inc %i3 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 20089ec: 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++ ) { 20089f0: 80 a4 c0 1b cmp %l3, %i3 20089f4: 18 bf ff f9 bgu 20089d8 <_Objects_Extend_information+0x5c> 20089f8: 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; 20089fc: b4 10 20 01 mov 1, %i2 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2008a00: 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 ) { 2008a04: 03 00 00 3f sethi %hi(0xfc00), %g1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2008a08: 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 ) { 2008a0c: 82 10 63 ff or %g1, 0x3ff, %g1 2008a10: 80 a6 40 01 cmp %i1, %g1 2008a14: 18 80 00 93 bgu 2008c60 <_Objects_Extend_information+0x2e4> 2008a18: 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; 2008a1c: 40 00 46 46 call 201a334 <.umul> 2008a20: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2008a24: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2008a28: 80 a0 60 00 cmp %g1, 0 2008a2c: 02 80 00 6a be 2008bd4 <_Objects_Extend_information+0x258> 2008a30: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 2008a34: 40 00 09 72 call 200affc <_Workspace_Allocate> 2008a38: 01 00 00 00 nop if ( !new_object_block ) 2008a3c: a0 92 20 00 orcc %o0, 0, %l0 2008a40: 02 80 00 88 be 2008c60 <_Objects_Extend_information+0x2e4> 2008a44: 01 00 00 00 nop } /* * Do we need to grow the tables? */ if ( do_extend ) { 2008a48: 80 8e a0 ff btst 0xff, %i2 2008a4c: 22 80 00 3f be,a 2008b48 <_Objects_Extend_information+0x1cc> 2008a50: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 2008a54: 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 *)) + 2008a58: 91 2e a0 01 sll %i2, 1, %o0 2008a5c: 90 02 00 1a add %o0, %i2, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 2008a60: 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 *)) + 2008a64: 90 02 00 1c add %o0, %i4, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2008a68: 40 00 09 65 call 200affc <_Workspace_Allocate> 2008a6c: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2008a70: a2 92 20 00 orcc %o0, 0, %l1 2008a74: 02 80 00 79 be 2008c58 <_Objects_Extend_information+0x2dc> 2008a78: 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 ) { 2008a7c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2008a80: 80 a7 00 01 cmp %i4, %g1 2008a84: a4 04 40 1a add %l1, %i2, %l2 2008a88: 0a 80 00 57 bcs 2008be4 <_Objects_Extend_information+0x268> 2008a8c: 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++ ) { 2008a90: 80 a7 20 00 cmp %i4, 0 2008a94: 02 80 00 07 be 2008ab0 <_Objects_Extend_information+0x134><== NEVER TAKEN 2008a98: 82 10 20 00 clr %g1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 2008a9c: 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++ ) { 2008aa0: 82 00 60 01 inc %g1 2008aa4: 80 a7 00 01 cmp %i4, %g1 2008aa8: 18 bf ff fd bgu 2008a9c <_Objects_Extend_information+0x120><== NEVER TAKEN 2008aac: c0 20 80 1a clr [ %g2 + %i2 ] 2008ab0: 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 ); 2008ab4: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2008ab8: c0 24 40 13 clr [ %l1 + %l3 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2008abc: 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 ; 2008ac0: 80 a7 40 03 cmp %i5, %g3 2008ac4: 1a 80 00 0a bcc 2008aec <_Objects_Extend_information+0x170><== NEVER TAKEN 2008ac8: c0 24 80 13 clr [ %l2 + %l3 ] * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 2008acc: 83 2f 60 02 sll %i5, 2, %g1 2008ad0: 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 ; 2008ad4: 82 06 80 01 add %i2, %g1, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 2008ad8: 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++ ) { 2008adc: 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 ; 2008ae0: 80 a0 c0 02 cmp %g3, %g2 2008ae4: 18 bf ff fd bgu 2008ad8 <_Objects_Extend_information+0x15c> 2008ae8: 82 00 60 04 add %g1, 4, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2008aec: 7f ff e6 9c call 200255c 2008af0: 01 00 00 00 nop uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 2008af4: 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( 2008af8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2008afc: 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; 2008b00: f2 36 20 10 sth %i1, [ %i0 + 0x10 ] 2008b04: 87 28 e0 18 sll %g3, 0x18, %g3 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2008b08: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2008b0c: e2 26 20 34 st %l1, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; 2008b10: e4 26 20 30 st %l2, [ %i0 + 0x30 ] information->local_table = local_table; 2008b14: f4 26 20 1c st %i2, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2008b18: 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) | 2008b1c: 03 00 00 40 sethi %hi(0x10000), %g1 2008b20: b3 36 60 10 srl %i1, 0x10, %i1 2008b24: 82 10 c0 01 or %g3, %g1, %g1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2008b28: 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) | 2008b2c: 82 10 40 19 or %g1, %i1, %g1 2008b30: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2008b34: 7f ff e6 8e call 200256c 2008b38: 01 00 00 00 nop _Workspace_Free( old_tables ); 2008b3c: 40 00 09 38 call 200b01c <_Workspace_Free> 2008b40: 90 10 00 1c mov %i4, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2008b44: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2008b48: b7 2e e0 02 sll %i3, 2, %i3 2008b4c: e0 20 40 1b st %l0, [ %g1 + %i3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2008b50: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2008b54: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2008b58: d2 00 40 1b ld [ %g1 + %i3 ], %o1 2008b5c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2008b60: 90 07 bf f4 add %fp, -12, %o0 2008b64: 40 00 16 33 call 200e430 <_Chain_Initialize> 2008b68: 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 ) { 2008b6c: 10 80 00 0d b 2008ba0 <_Objects_Extend_information+0x224> 2008b70: b4 06 20 20 add %i0, 0x20, %i2 the_object->id = _Objects_Build_id( 2008b74: c6 16 20 04 lduh [ %i0 + 4 ], %g3 2008b78: 85 28 a0 18 sll %g2, 0x18, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2008b7c: 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) | 2008b80: 84 10 80 1c or %g2, %i4, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2008b84: 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) | 2008b88: 84 10 80 1d or %g2, %i5, %g2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2008b8c: 90 10 00 1a mov %i2, %o0 2008b90: 92 10 00 01 mov %g1, %o1 index++; 2008b94: ba 07 60 01 inc %i5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2008b98: 7f ff fc 79 call 2007d7c <_Chain_Append> 2008b9c: 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 ) { 2008ba0: 7f ff fc 8b call 2007dcc <_Chain_Get> 2008ba4: 90 07 bf f4 add %fp, -12, %o0 2008ba8: 82 92 20 00 orcc %o0, 0, %g1 2008bac: 32 bf ff f2 bne,a 2008b74 <_Objects_Extend_information+0x1f8> 2008bb0: c4 06 00 00 ld [ %i0 ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2008bb4: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 2008bb8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 2008bbc: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2008bc0: c8 20 c0 1b st %g4, [ %g3 + %i3 ] information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 2008bc4: 82 00 80 04 add %g2, %g4, %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 2008bc8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2008bcc: 81 c7 e0 08 ret 2008bd0: 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 ); 2008bd4: 40 00 09 18 call 200b034 <_Workspace_Allocate_or_fatal_error> 2008bd8: 01 00 00 00 nop 2008bdc: 10 bf ff 9b b 2008a48 <_Objects_Extend_information+0xcc> 2008be0: 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, 2008be4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2008be8: 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, 2008bec: 40 00 24 d5 call 2011f40 2008bf0: 94 10 00 13 mov %l3, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2008bf4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2008bf8: 94 10 00 13 mov %l3, %o2 2008bfc: 40 00 24 d1 call 2011f40 2008c00: 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 *) ); 2008c04: 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, 2008c08: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 2008c0c: 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, 2008c10: 90 10 00 1a mov %i2, %o0 2008c14: 40 00 24 cb call 2011f40 2008c18: 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 ); 2008c1c: 10 bf ff a7 b 2008ab8 <_Objects_Extend_information+0x13c> 2008c20: 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 ) 2008c24: 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 ); 2008c28: 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; 2008c2c: b4 10 20 01 mov 1, %i2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 2008c30: b6 10 20 00 clr %i3 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 2008c34: a6 10 20 00 clr %l3 2008c38: 10 bf ff 72 b 2008a00 <_Objects_Extend_information+0x84> 2008c3c: 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 ); 2008c40: 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; 2008c44: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 2008c48: 10 bf ff 6e b 2008a00 <_Objects_Extend_information+0x84> <== NOT EXECUTED 2008c4c: b6 10 20 00 clr %i3 <== NOT EXECUTED 2008c50: 10 bf ff 6c b 2008a00 <_Objects_Extend_information+0x84> <== NOT EXECUTED 2008c54: 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 ); 2008c58: 40 00 08 f1 call 200b01c <_Workspace_Free> 2008c5c: 90 10 00 10 mov %l0, %o0 return; 2008c60: 81 c7 e0 08 ret 2008c64: 81 e8 00 00 restore =============================================================================== 02008d0c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2008d0c: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2008d10: 80 a6 60 00 cmp %i1, 0 2008d14: 02 80 00 17 be 2008d70 <_Objects_Get_information+0x64> 2008d18: 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 ); 2008d1c: 40 00 17 b3 call 200ebe8 <_Objects_API_maximum_class> 2008d20: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2008d24: 80 a2 20 00 cmp %o0, 0 2008d28: 02 80 00 12 be 2008d70 <_Objects_Get_information+0x64> 2008d2c: 80 a2 00 19 cmp %o0, %i1 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2008d30: 0a 80 00 10 bcs 2008d70 <_Objects_Get_information+0x64> 2008d34: 03 00 80 7d sethi %hi(0x201f400), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2008d38: b1 2e 20 02 sll %i0, 2, %i0 2008d3c: 82 10 60 28 or %g1, 0x28, %g1 2008d40: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2008d44: 80 a0 60 00 cmp %g1, 0 2008d48: 02 80 00 0a be 2008d70 <_Objects_Get_information+0x64> <== NEVER TAKEN 2008d4c: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2008d50: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2008d54: 80 a7 60 00 cmp %i5, 0 2008d58: 02 80 00 06 be 2008d70 <_Objects_Get_information+0x64> <== NEVER TAKEN 2008d5c: 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 ) 2008d60: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2008d64: 80 a0 00 01 cmp %g0, %g1 2008d68: 82 60 20 00 subx %g0, 0, %g1 2008d6c: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 2008d70: 81 c7 e0 08 ret 2008d74: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 0200a658 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 200a658: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 200a65c: 80 a6 60 00 cmp %i1, 0 200a660: 02 80 00 41 be 200a764 <_Objects_Get_name_as_string+0x10c> 200a664: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( name == NULL ) 200a668: 02 80 00 3a be 200a750 <_Objects_Get_name_as_string+0xf8> 200a66c: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200a670: 02 80 00 3a be 200a758 <_Objects_Get_name_as_string+0x100> 200a674: 03 00 80 89 sethi %hi(0x2022400), %g1 information = _Objects_Get_information_id( tmpId ); 200a678: 7f ff ff ba call 200a560 <_Objects_Get_information_id> 200a67c: 90 10 00 18 mov %i0, %o0 if ( !information ) 200a680: ba 92 20 00 orcc %o0, 0, %i5 200a684: 02 80 00 38 be 200a764 <_Objects_Get_name_as_string+0x10c> 200a688: 92 10 00 18 mov %i0, %o1 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 200a68c: 40 00 00 3f call 200a788 <_Objects_Get> 200a690: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 200a694: c2 07 bf fc ld [ %fp + -4 ], %g1 200a698: 80 a0 60 00 cmp %g1, 0 200a69c: 32 80 00 33 bne,a 200a768 <_Objects_Get_name_as_string+0x110> 200a6a0: b4 10 20 00 clr %i2 return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 200a6a4: c2 0f 60 38 ldub [ %i5 + 0x38 ], %g1 200a6a8: 80 a0 60 00 cmp %g1, 0 200a6ac: 32 80 00 31 bne,a 200a770 <_Objects_Get_name_as_string+0x118> 200a6b0: 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; 200a6b4: 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'; 200a6b8: 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; 200a6bc: 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; 200a6c0: 89 30 60 18 srl %g1, 0x18, %g4 lname[ 1 ] = (u32_name >> 16) & 0xff; 200a6c4: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; 200a6c8: 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; 200a6cc: c8 2f bf f0 stb %g4, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; 200a6d0: c6 2f bf f1 stb %g3, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 200a6d4: c2 2f bf f3 stb %g1, [ %fp + -13 ] lname[ 4 ] = '\0'; s = lname; 200a6d8: 84 07 bf f0 add %fp, -16, %g2 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 200a6dc: b2 86 7f ff addcc %i1, -1, %i1 200a6e0: 02 80 00 1a be 200a748 <_Objects_Get_name_as_string+0xf0> <== NEVER TAKEN 200a6e4: 82 10 00 1a mov %i2, %g1 200a6e8: c8 48 80 00 ldsb [ %g2 ], %g4 200a6ec: 80 a1 20 00 cmp %g4, 0 200a6f0: 02 80 00 16 be 200a748 <_Objects_Get_name_as_string+0xf0> 200a6f4: c6 08 80 00 ldub [ %g2 ], %g3 200a6f8: 31 00 80 84 sethi %hi(0x2021000), %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( 200a6fc: b2 06 80 19 add %i2, %i1, %i1 200a700: 10 80 00 05 b 200a714 <_Objects_Get_name_as_string+0xbc> 200a704: b0 16 21 d4 or %i0, 0x1d4, %i0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 200a708: 80 a1 20 00 cmp %g4, 0 200a70c: 02 80 00 0f be 200a748 <_Objects_Get_name_as_string+0xf0> 200a710: c6 08 80 00 ldub [ %g2 ], %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; 200a714: fa 06 00 00 ld [ %i0 ], %i5 200a718: 88 08 e0 ff and %g3, 0xff, %g4 200a71c: 88 07 40 04 add %i5, %g4, %g4 200a720: c8 49 20 01 ldsb [ %g4 + 1 ], %g4 200a724: 80 89 20 97 btst 0x97, %g4 200a728: 12 80 00 03 bne 200a734 <_Objects_Get_name_as_string+0xdc> 200a72c: 84 00 a0 01 inc %g2 200a730: 86 10 20 2a mov 0x2a, %g3 200a734: c6 28 40 00 stb %g3, [ %g1 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 200a738: 82 00 60 01 inc %g1 200a73c: 80 a0 40 19 cmp %g1, %i1 200a740: 32 bf ff f2 bne,a 200a708 <_Objects_Get_name_as_string+0xb0> 200a744: c8 48 80 00 ldsb [ %g2 ], %g4 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 200a748: 40 00 03 f2 call 200b710 <_Thread_Enable_dispatch> 200a74c: c0 28 40 00 clrb [ %g1 ] return name; } return NULL; /* unreachable path */ } 200a750: 81 c7 e0 08 ret 200a754: 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; 200a758: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 200a75c: 10 bf ff c7 b 200a678 <_Objects_Get_name_as_string+0x20> 200a760: f0 00 60 08 ld [ %g1 + 8 ], %i0 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 200a764: b4 10 20 00 clr %i2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 200a768: 81 c7 e0 08 ret 200a76c: 91 e8 00 1a restore %g0, %i2, %o0 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 200a770: 80 a0 a0 00 cmp %g2, 0 200a774: 12 bf ff da bne 200a6dc <_Objects_Get_name_as_string+0x84> 200a778: 82 10 00 1a mov %i2, %g1 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 200a77c: 40 00 03 e5 call 200b710 <_Thread_Enable_dispatch> 200a780: c0 28 40 00 clrb [ %g1 ] 200a784: 30 bf ff f3 b,a 200a750 <_Objects_Get_name_as_string+0xf8> =============================================================================== 02008d38 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 2008d38: 9d e3 bf a0 save %sp, -96, %sp Objects_Control *object; Objects_Id next_id; if ( !information ) return NULL; 2008d3c: 90 10 20 00 clr %o0 ) { Objects_Control *object; Objects_Id next_id; if ( !information ) 2008d40: 80 a6 20 00 cmp %i0, 0 2008d44: 02 80 00 19 be 2008da8 <_Objects_Get_next+0x70> 2008d48: ba 10 00 18 mov %i0, %i5 return NULL; if ( !location_p ) 2008d4c: 80 a6 a0 00 cmp %i2, 0 2008d50: 02 80 00 16 be 2008da8 <_Objects_Get_next+0x70> 2008d54: 80 a6 e0 00 cmp %i3, 0 return NULL; if ( !next_id_p ) 2008d58: 02 80 00 14 be 2008da8 <_Objects_Get_next+0x70> 2008d5c: 83 2e 60 10 sll %i1, 0x10, %g1 return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 2008d60: 80 a0 60 00 cmp %g1, 0 2008d64: 22 80 00 13 be,a 2008db0 <_Objects_Get_next+0x78> 2008d68: 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) 2008d6c: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 2008d70: 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); 2008d74: 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) 2008d78: 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); 2008d7c: 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) 2008d80: 80 a0 80 01 cmp %g2, %g1 2008d84: 0a 80 00 13 bcs 2008dd0 <_Objects_Get_next+0x98> 2008d88: 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); 2008d8c: 40 00 00 18 call 2008dec <_Objects_Get> 2008d90: b2 06 60 01 inc %i1 next_id++; } while (*location_p != OBJECTS_LOCAL); 2008d94: c2 06 80 00 ld [ %i2 ], %g1 2008d98: 80 a0 60 00 cmp %g1, 0 2008d9c: 32 bf ff f5 bne,a 2008d70 <_Objects_Get_next+0x38> 2008da0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 *next_id_p = next_id; 2008da4: f2 26 c0 00 st %i1, [ %i3 ] return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2008da8: 81 c7 e0 08 ret 2008dac: 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) 2008db0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 2008db4: 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); 2008db8: 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) 2008dbc: 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); 2008dc0: 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) 2008dc4: 80 a0 80 01 cmp %g2, %g1 2008dc8: 1a bf ff f1 bcc 2008d8c <_Objects_Get_next+0x54> <== ALWAYS TAKEN 2008dcc: 94 10 00 1a mov %i2, %o2 { *location_p = OBJECTS_ERROR; 2008dd0: 82 10 20 01 mov 1, %g1 2008dd4: c2 26 80 00 st %g1, [ %i2 ] *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 2008dd8: 90 10 20 00 clr %o0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2008ddc: 82 10 3f ff mov -1, %g1 2008de0: c2 26 c0 00 st %g1, [ %i3 ] return 0; } 2008de4: 81 c7 e0 08 ret 2008de8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020098cc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20098cc: 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; 20098d0: 80 a6 20 00 cmp %i0, 0 20098d4: 12 80 00 06 bne 20098ec <_Objects_Id_to_name+0x20> 20098d8: 83 36 20 18 srl %i0, 0x18, %g1 20098dc: 03 00 80 83 sethi %hi(0x2020c00), %g1 20098e0: c2 00 62 9c ld [ %g1 + 0x29c ], %g1 ! 2020e9c <_Per_CPU_Information+0xc> 20098e4: f0 00 60 08 ld [ %g1 + 8 ], %i0 20098e8: 83 36 20 18 srl %i0, 0x18, %g1 20098ec: 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 ) 20098f0: 84 00 7f ff add %g1, -1, %g2 20098f4: 80 a0 a0 02 cmp %g2, 2 20098f8: 18 80 00 12 bgu 2009940 <_Objects_Id_to_name+0x74> 20098fc: 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 ] ) 2009900: 83 28 60 02 sll %g1, 2, %g1 2009904: 05 00 80 82 sethi %hi(0x2020800), %g2 2009908: 84 10 a0 b8 or %g2, 0xb8, %g2 ! 20208b8 <_Objects_Information_table> 200990c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2009910: 80 a0 60 00 cmp %g1, 0 2009914: 02 80 00 0b be 2009940 <_Objects_Id_to_name+0x74> 2009918: 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 ]; 200991c: 85 28 a0 02 sll %g2, 2, %g2 2009920: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 2009924: 80 a2 20 00 cmp %o0, 0 2009928: 02 80 00 06 be 2009940 <_Objects_Id_to_name+0x74> <== NEVER TAKEN 200992c: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 2009930: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2009934: 80 a0 60 00 cmp %g1, 0 2009938: 02 80 00 04 be 2009948 <_Objects_Id_to_name+0x7c> <== ALWAYS TAKEN 200993c: 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; } 2009940: 81 c7 e0 08 ret 2009944: 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 ); 2009948: 7f ff ff c3 call 2009854 <_Objects_Get> 200994c: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2009950: 80 a2 20 00 cmp %o0, 0 2009954: 02 bf ff fb be 2009940 <_Objects_Id_to_name+0x74> 2009958: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200995c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2009960: 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(); 2009964: 40 00 03 c7 call 200a880 <_Thread_Enable_dispatch> 2009968: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200996c: 30 bf ff f5 b,a 2009940 <_Objects_Id_to_name+0x74> =============================================================================== 02009018 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2009018: 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 ); 200901c: fa 16 20 0a lduh [ %i0 + 0xa ], %i5 block_count = (information->maximum - index_base) / 2009020: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4 2009024: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2009028: 92 10 00 1c mov %i4, %o1 200902c: 40 00 44 fc call 201a41c <.udiv> 2009030: 90 22 00 1d sub %o0, %i5, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2009034: 80 a2 20 00 cmp %o0, 0 2009038: 02 80 00 34 be 2009108 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN 200903c: 01 00 00 00 nop if ( information->inactive_per_block[ block ] == 2009040: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 2009044: c2 01 00 00 ld [ %g4 ], %g1 2009048: 80 a7 00 01 cmp %i4, %g1 200904c: 02 80 00 0f be 2009088 <_Objects_Shrink_information+0x70> <== NEVER TAKEN 2009050: 82 10 20 00 clr %g1 2009054: 10 80 00 07 b 2009070 <_Objects_Shrink_information+0x58> 2009058: b6 10 20 04 mov 4, %i3 * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 200905c: 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 ] == 2009060: 80 a7 00 02 cmp %i4, %g2 2009064: 02 80 00 0a be 200908c <_Objects_Shrink_information+0x74> 2009068: ba 07 40 1c add %i5, %i4, %i5 200906c: 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++ ) { 2009070: 82 00 60 01 inc %g1 2009074: 80 a0 40 08 cmp %g1, %o0 2009078: 32 bf ff f9 bne,a 200905c <_Objects_Shrink_information+0x44> 200907c: c4 01 00 1b ld [ %g4 + %i3 ], %g2 2009080: 81 c7 e0 08 ret 2009084: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == 2009088: 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; 200908c: 10 80 00 06 b 20090a4 <_Objects_Shrink_information+0x8c> 2009090: 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 ); 2009094: 80 a7 20 00 cmp %i4, 0 2009098: 22 80 00 12 be,a 20090e0 <_Objects_Shrink_information+0xc8> 200909c: 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; 20090a0: 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 ); 20090a4: 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) && 20090a8: 80 a0 40 1d cmp %g1, %i5 20090ac: 0a bf ff fa bcs 2009094 <_Objects_Shrink_information+0x7c> 20090b0: f8 02 00 00 ld [ %o0 ], %i4 (index < (index_base + information->allocation_size))) { 20090b4: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 20090b8: 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) && 20090bc: 80 a0 40 02 cmp %g1, %g2 20090c0: 1a bf ff f6 bcc 2009098 <_Objects_Shrink_information+0x80> 20090c4: 80 a7 20 00 cmp %i4, 0 (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 20090c8: 7f ff fb 38 call 2007da8 <_Chain_Extract> 20090cc: 01 00 00 00 nop } } while ( the_object ); 20090d0: 80 a7 20 00 cmp %i4, 0 20090d4: 12 bf ff f4 bne 20090a4 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN 20090d8: 90 10 00 1c mov %i4, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 20090dc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 20090e0: 40 00 07 cf call 200b01c <_Workspace_Free> 20090e4: d0 00 40 1b ld [ %g1 + %i3 ], %o0 information->object_blocks[ block ] = NULL; 20090e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20090ec: 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; 20090f0: c0 20 40 1b clr [ %g1 + %i3 ] information->inactive_per_block[ block ] = 0; 20090f4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive -= information->allocation_size; 20090f8: 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; 20090fc: c0 20 c0 1b clr [ %g3 + %i3 ] information->inactive -= information->allocation_size; 2009100: 82 20 80 01 sub %g2, %g1, %g1 2009104: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] return; 2009108: 81 c7 e0 08 ret 200910c: 81 e8 00 00 restore =============================================================================== 02010bb8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 2010bb8: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 2010bbc: f4 06 20 08 ld [ %i0 + 8 ], %i2 2010bc0: 3b 00 80 7e sethi %hi(0x201f800), %i5 2010bc4: b3 36 a0 18 srl %i2, 0x18, %i1 2010bc8: ba 17 60 d8 or %i5, 0xd8, %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 ]; 2010bcc: b5 2e a0 10 sll %i2, 0x10, %i2 2010bd0: b2 0e 60 07 and %i1, 7, %i1 2010bd4: b5 36 a0 0e srl %i2, 0xe, %i2 2010bd8: b2 06 60 04 add %i1, 4, %i1 2010bdc: 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 ) { 2010be0: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 2010be4: 80 a6 e0 00 cmp %i3, 0 2010be8: 02 80 00 20 be 2010c68 <_POSIX_Keys_Run_destructors+0xb0> 2010bec: b8 10 20 01 mov 1, %i4 2010bf0: 84 10 20 01 mov 1, %g2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 2010bf4: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 _POSIX_Keys_Information.local_table [ index ]; 2010bf8: 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 *) 2010bfc: 83 30 60 0e srl %g1, 0xe, %g1 2010c00: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 2010c04: 80 a0 60 00 cmp %g1, 0 2010c08: 02 80 00 10 be 2010c48 <_POSIX_Keys_Run_destructors+0x90> 2010c0c: 86 00 40 19 add %g1, %i1, %g3 2010c10: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 2010c14: 80 a1 20 00 cmp %g4, 0 2010c18: 22 80 00 0d be,a 2010c4c <_POSIX_Keys_Run_destructors+0x94> 2010c1c: b8 07 20 01 inc %i4 void *value = key->Values [ thread_api ][ thread_index ]; 2010c20: c6 00 e0 04 ld [ %g3 + 4 ], %g3 2010c24: d0 00 c0 1a ld [ %g3 + %i2 ], %o0 if ( value != NULL ) { 2010c28: 80 a2 20 00 cmp %o0, 0 2010c2c: 22 80 00 08 be,a 2010c4c <_POSIX_Keys_Run_destructors+0x94><== ALWAYS TAKEN 2010c30: b8 07 20 01 inc %i4 key->Values [ thread_api ][ thread_index ] = NULL; 2010c34: c0 20 c0 1a clr [ %g3 + %i2 ] <== NOT EXECUTED (*key->destructor)( value ); 2010c38: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 2010c3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2010c40: 01 00 00 00 nop <== NOT EXECUTED done = false; 2010c44: 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 ) { 2010c48: b8 07 20 01 inc %i4 2010c4c: 83 2f 20 10 sll %i4, 0x10, %g1 2010c50: 83 30 60 10 srl %g1, 0x10, %g1 2010c54: 80 a6 c0 01 cmp %i3, %g1 2010c58: 1a bf ff e7 bcc 2010bf4 <_POSIX_Keys_Run_destructors+0x3c> 2010c5c: 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 ) { 2010c60: 22 bf ff e1 be,a 2010be4 <_POSIX_Keys_Run_destructors+0x2c><== NEVER TAKEN 2010c64: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 <== NOT EXECUTED 2010c68: 81 c7 e0 08 ret 2010c6c: 81 e8 00 00 restore =============================================================================== 0200c754 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200c754: 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( 200c758: 11 00 80 b4 sethi %hi(0x202d000), %o0 200c75c: 92 10 00 18 mov %i0, %o1 200c760: 90 12 20 2c or %o0, 0x2c, %o0 200c764: 40 00 0d ba call 200fe4c <_Objects_Get> 200c768: 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 ) { 200c76c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200c770: 80 a0 60 00 cmp %g1, 0 200c774: 22 80 00 08 be,a 200c794 <_POSIX_Message_queue_Receive_support+0x40> 200c778: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200c77c: 40 00 32 1c call 2018fec <__errno> 200c780: b0 10 3f ff mov -1, %i0 200c784: 82 10 20 09 mov 9, %g1 200c788: c2 22 00 00 st %g1, [ %o0 ] } 200c78c: 81 c7 e0 08 ret 200c790: 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 ) { 200c794: 84 08 60 03 and %g1, 3, %g2 200c798: 80 a0 a0 01 cmp %g2, 1 200c79c: 02 80 00 3a be 200c884 <_POSIX_Message_queue_Receive_support+0x130> 200c7a0: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200c7a4: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200c7a8: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200c7ac: 80 a0 80 1a cmp %g2, %i2 200c7b0: 18 80 00 24 bgu 200c840 <_POSIX_Message_queue_Receive_support+0xec> 200c7b4: 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; 200c7b8: c4 27 bf fc st %g2, [ %fp + -4 ] /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200c7bc: 80 a7 20 00 cmp %i4, 0 200c7c0: 12 80 00 1b bne 200c82c <_POSIX_Message_queue_Receive_support+0xd8> 200c7c4: 98 10 20 00 clr %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200c7c8: 9a 10 00 1d mov %i5, %o5 200c7cc: 90 02 20 1c add %o0, 0x1c, %o0 200c7d0: 92 10 00 18 mov %i0, %o1 200c7d4: 94 10 00 19 mov %i1, %o2 200c7d8: 96 07 bf fc add %fp, -4, %o3 200c7dc: 40 00 09 0b call 200ec08 <_CORE_message_queue_Seize> 200c7e0: 98 0b 20 01 and %o4, 1, %o4 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200c7e4: 40 00 11 9b call 2010e50 <_Thread_Enable_dispatch> 200c7e8: 3b 00 80 b4 sethi %hi(0x202d000), %i5 if (msg_prio) { 200c7ec: 80 a6 e0 00 cmp %i3, 0 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200c7f0: ba 17 60 a0 or %i5, 0xa0, %i5 do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { 200c7f4: 02 80 00 07 be 200c810 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN 200c7f8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 200c7fc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 200c800: 85 38 e0 1f sra %g3, 0x1f, %g2 200c804: 86 18 80 03 xor %g2, %g3, %g3 200c808: 84 20 c0 02 sub %g3, %g2, %g2 *msg_prio = _POSIX_Message_queue_Priority_from_core( 200c80c: c4 26 c0 00 st %g2, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200c810: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200c814: 80 a0 60 00 cmp %g1, 0 200c818: 12 80 00 12 bne 200c860 <_POSIX_Message_queue_Receive_support+0x10c> 200c81c: 01 00 00 00 nop return length_out; 200c820: f0 07 bf fc ld [ %fp + -4 ], %i0 200c824: 81 c7 e0 08 ret 200c828: 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; 200c82c: 05 00 00 10 sethi %hi(0x4000), %g2 200c830: 82 08 40 02 and %g1, %g2, %g1 200c834: 80 a0 00 01 cmp %g0, %g1 200c838: 10 bf ff e4 b 200c7c8 <_POSIX_Message_queue_Receive_support+0x74> 200c83c: 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(); 200c840: 40 00 11 84 call 2010e50 <_Thread_Enable_dispatch> 200c844: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200c848: 40 00 31 e9 call 2018fec <__errno> 200c84c: 01 00 00 00 nop 200c850: 82 10 20 7a mov 0x7a, %g1 ! 7a 200c854: c2 22 00 00 st %g1, [ %o0 ] 200c858: 81 c7 e0 08 ret 200c85c: 81 e8 00 00 restore } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 200c860: 40 00 31 e3 call 2018fec <__errno> 200c864: b0 10 3f ff mov -1, %i0 200c868: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200c86c: b6 10 00 08 mov %o0, %i3 200c870: 40 00 00 a3 call 200cafc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200c874: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200c878: d0 26 c0 00 st %o0, [ %i3 ] 200c87c: 81 c7 e0 08 ret 200c880: 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(); 200c884: 40 00 11 73 call 2010e50 <_Thread_Enable_dispatch> 200c888: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200c88c: 40 00 31 d8 call 2018fec <__errno> 200c890: 01 00 00 00 nop 200c894: 82 10 20 09 mov 9, %g1 ! 9 200c898: c2 22 00 00 st %g1, [ %o0 ] 200c89c: 81 c7 e0 08 ret 200c8a0: 81 e8 00 00 restore =============================================================================== 0200d870 <_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 ]; 200d870: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200d874: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200d878: 80 a0 a0 00 cmp %g2, 0 200d87c: 12 80 00 06 bne 200d894 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN 200d880: 01 00 00 00 nop 200d884: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200d888: 80 a0 a0 01 cmp %g2, 1 200d88c: 22 80 00 05 be,a 200d8a0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30> 200d890: 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(); 200d894: 82 13 c0 00 mov %o7, %g1 200d898: 7f ff f1 af call 2009f54 <_Thread_Enable_dispatch> 200d89c: 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 && 200d8a0: 80 a0 60 00 cmp %g1, 0 200d8a4: 02 bf ff fc be 200d894 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24> 200d8a8: 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--; 200d8ac: 03 00 80 7e sethi %hi(0x201f800), %g1 200d8b0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 201f9e0 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200d8b4: 92 10 3f ff mov -1, %o1 200d8b8: 84 00 bf ff add %g2, -1, %g2 200d8bc: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] return _Thread_Dispatch_disable_level; 200d8c0: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 200d8c4: 82 13 c0 00 mov %o7, %g1 200d8c8: 40 00 01 da call 200e030 <_POSIX_Thread_Exit> 200d8cc: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200ed94 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200ed94: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200ed98: d0 06 40 00 ld [ %i1 ], %o0 200ed9c: 7f ff ff f1 call 200ed60 <_POSIX_Priority_Is_valid> 200eda0: ba 10 00 18 mov %i0, %i5 200eda4: 80 8a 20 ff btst 0xff, %o0 200eda8: 02 80 00 34 be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4><== NEVER TAKEN 200edac: b0 10 20 16 mov 0x16, %i0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200edb0: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; 200edb4: c0 26 c0 00 clr [ %i3 ] if ( policy == SCHED_OTHER ) { 200edb8: 80 a7 60 00 cmp %i5, 0 200edbc: 02 80 00 2d be 200ee70 <_POSIX_Thread_Translate_sched_param+0xdc> 200edc0: b0 10 20 00 clr %i0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 200edc4: 80 a7 60 01 cmp %i5, 1 200edc8: 02 80 00 2c be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4> 200edcc: 80 a7 60 02 cmp %i5, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200edd0: 02 80 00 2c be 200ee80 <_POSIX_Thread_Translate_sched_param+0xec> 200edd4: 80 a7 60 04 cmp %i5, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 200edd8: 12 80 00 28 bne 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4> 200eddc: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_repl_period.tv_sec == 0) && 200ede0: c2 06 60 08 ld [ %i1 + 8 ], %g1 200ede4: 80 a0 60 00 cmp %g1, 0 200ede8: 32 80 00 07 bne,a 200ee04 <_POSIX_Thread_Translate_sched_param+0x70> 200edec: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200edf0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200edf4: 80 a0 60 00 cmp %g1, 0 200edf8: 02 80 00 23 be 200ee84 <_POSIX_Thread_Translate_sched_param+0xf0> 200edfc: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200ee00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200ee04: 80 a0 60 00 cmp %g1, 0 200ee08: 12 80 00 06 bne 200ee20 <_POSIX_Thread_Translate_sched_param+0x8c> 200ee0c: 01 00 00 00 nop 200ee10: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200ee14: 80 a0 60 00 cmp %g1, 0 200ee18: 02 80 00 18 be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4> 200ee1c: 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 ) < 200ee20: 7f ff f2 d7 call 200b97c <_Timespec_To_ticks> 200ee24: 90 06 60 08 add %i1, 8, %o0 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 200ee28: 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 ) < 200ee2c: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200ee30: 7f ff f2 d3 call 200b97c <_Timespec_To_ticks> 200ee34: 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 ) < 200ee38: 80 a7 40 08 cmp %i5, %o0 200ee3c: 0a 80 00 12 bcs 200ee84 <_POSIX_Thread_Translate_sched_param+0xf0> 200ee40: 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 ) ) 200ee44: 7f ff ff c7 call 200ed60 <_POSIX_Priority_Is_valid> 200ee48: d0 06 60 04 ld [ %i1 + 4 ], %o0 200ee4c: 80 8a 20 ff btst 0xff, %o0 200ee50: 02 80 00 0a be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4> 200ee54: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200ee58: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200ee5c: 03 00 80 1e sethi %hi(0x2007800), %g1 200ee60: 82 10 60 dc or %g1, 0xdc, %g1 ! 20078dc <_POSIX_Threads_Sporadic_budget_callout> 200ee64: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200ee68: 81 c7 e0 08 ret 200ee6c: 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; 200ee70: 82 10 20 01 mov 1, %g1 200ee74: c2 26 80 00 st %g1, [ %i2 ] return 0; 200ee78: 81 c7 e0 08 ret 200ee7c: 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; 200ee80: fa 26 80 00 st %i5, [ %i2 ] return 0; 200ee84: 81 c7 e0 08 ret 200ee88: 81 e8 00 00 restore =============================================================================== 0200dbac <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200dbac: 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 ]; 200dbb0: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200dbb4: 40 00 0b e5 call 2010b48 <_POSIX_Threads_cancel_run> 200dbb8: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200dbbc: 90 10 00 19 mov %i1, %o0 200dbc0: 40 00 0b fe call 2010bb8 <_POSIX_Keys_Run_destructors> 200dbc4: 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 )) ) 200dbc8: 10 80 00 03 b 200dbd4 <_POSIX_Threads_Delete_extension+0x28> 200dbcc: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200dbd0: 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 )) ) 200dbd4: 7f ff f1 78 call 200a1b4 <_Thread_queue_Dequeue> 200dbd8: 90 10 00 1d mov %i5, %o0 200dbdc: 80 a2 20 00 cmp %o0, 0 200dbe0: 32 bf ff fc bne,a 200dbd0 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200dbe4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200dbe8: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200dbec: 80 a0 60 04 cmp %g1, 4 200dbf0: 02 80 00 05 be 200dc04 <_POSIX_Threads_Delete_extension+0x58> 200dbf4: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200dbf8: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200dbfc: 7f ff f5 08 call 200b01c <_Workspace_Free> 200dc00: 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 ); 200dc04: 7f ff f4 7c call 200adf4 <_Watchdog_Remove> 200dc08: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200dc0c: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200dc10: 7f ff f5 03 call 200b01c <_Workspace_Free> 200dc14: 81 e8 00 00 restore =============================================================================== 020075dc <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 20075dc: 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; 20075e0: 03 00 80 8d sethi %hi(0x2023400), %g1 20075e4: 82 10 61 48 or %g1, 0x148, %g1 ! 2023548 maximum = Configuration_POSIX_API.number_of_initialization_threads; 20075e8: f6 00 60 30 ld [ %g1 + 0x30 ], %i3 if ( !user_threads || maximum == 0 ) 20075ec: 80 a6 e0 00 cmp %i3, 0 20075f0: 02 80 00 18 be 2007650 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN 20075f4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 20075f8: 80 a7 60 00 cmp %i5, 0 20075fc: 02 80 00 15 be 2007650 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN 2007600: 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 ); 2007604: 40 00 1e 22 call 200ee8c 2007608: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 200760c: 92 10 20 02 mov 2, %o1 2007610: 40 00 1e 2b call 200eebc 2007614: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2007618: d2 07 60 04 ld [ %i5 + 4 ], %o1 200761c: 40 00 1e 38 call 200eefc 2007620: 90 07 bf bc add %fp, -68, %o0 status = pthread_create( 2007624: d4 07 40 00 ld [ %i5 ], %o2 2007628: 90 07 bf fc add %fp, -4, %o0 200762c: 92 07 bf bc add %fp, -68, %o1 2007630: 7f ff fe fd call 2007224 2007634: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2007638: 94 92 20 00 orcc %o0, 0, %o2 200763c: 12 80 00 07 bne 2007658 <_POSIX_Threads_Initialize_user_threads_body+0x7c> 2007640: 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++ ) { 2007644: 80 a6 c0 1c cmp %i3, %i4 2007648: 18 bf ff ef bgu 2007604 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN 200764c: ba 07 60 08 add %i5, 8, %i5 2007650: 81 c7 e0 08 ret 2007654: 81 e8 00 00 restore &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2007658: 90 10 20 02 mov 2, %o0 200765c: 40 00 08 89 call 2009880 <_Internal_error_Occurred> 2007660: 92 10 20 01 mov 1, %o1 =============================================================================== 0200dd4c <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200dd4c: 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 ]; 200dd50: 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 ); 200dd54: 40 00 04 6a call 200eefc <_Timespec_To_ticks> 200dd58: 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); 200dd5c: c4 07 60 88 ld [ %i5 + 0x88 ], %g2 200dd60: 03 00 80 79 sethi %hi(0x201e400), %g1 200dd64: d2 08 63 a0 ldub [ %g1 + 0x3a0 ], %o1 ! 201e7a0 */ #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 ) { 200dd68: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200dd6c: 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; 200dd70: 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 ) { 200dd74: 80 a0 60 00 cmp %g1, 0 200dd78: 12 80 00 06 bne 200dd90 <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN 200dd7c: 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 ) { 200dd80: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200dd84: 80 a0 40 09 cmp %g1, %o1 200dd88: 38 80 00 09 bgu,a 200ddac <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200dd8c: 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 ); 200dd90: 40 00 04 5b call 200eefc <_Timespec_To_ticks> 200dd94: 90 07 60 90 add %i5, 0x90, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200dd98: 31 00 80 7d sethi %hi(0x201f400), %i0 200dd9c: b2 07 60 a8 add %i5, 0xa8, %i1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200dda0: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200dda4: 7f ff f3 b2 call 200ac6c <_Watchdog_Insert> 200dda8: 91 ee 21 80 restore %i0, 0x180, %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 ); 200ddac: 7f ff ee e1 call 2009930 <_Thread_Change_priority> 200ddb0: 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 ); 200ddb4: 40 00 04 52 call 200eefc <_Timespec_To_ticks> 200ddb8: 90 07 60 90 add %i5, 0x90, %o0 200ddbc: 31 00 80 7d sethi %hi(0x201f400), %i0 200ddc0: b2 07 60 a8 add %i5, 0xa8, %i1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200ddc4: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200ddc8: 7f ff f3 a9 call 200ac6c <_Watchdog_Insert> 200ddcc: 91 ee 21 80 restore %i0, 0x180, %o0 =============================================================================== 0200ddd0 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200ddd0: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 200ddd4: c6 00 a0 8c ld [ %g2 + 0x8c ], %g3 200ddd8: 05 00 80 79 sethi %hi(0x201e400), %g2 200dddc: d2 08 a3 a0 ldub [ %g2 + 0x3a0 ], %o1 ! 201e7a0 */ #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 ) { 200dde0: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200dde4: 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 */ 200dde8: 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; 200ddec: 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 ) { 200ddf0: 80 a0 a0 00 cmp %g2, 0 200ddf4: 12 80 00 06 bne 200de0c <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN 200ddf8: 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 ) { 200ddfc: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200de00: 80 a0 40 09 cmp %g1, %o1 200de04: 0a 80 00 04 bcs 200de14 <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN 200de08: 94 10 20 01 mov 1, %o2 200de0c: 81 c3 e0 08 retl <== NOT EXECUTED 200de10: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 200de14: 82 13 c0 00 mov %o7, %g1 200de18: 7f ff ee c6 call 2009930 <_Thread_Change_priority> 200de1c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 02010b48 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 2010b48: 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 ]; 2010b4c: f8 06 21 5c ld [ %i0 + 0x15c ], %i4 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 2010b50: 84 10 20 01 mov 1, %g2 while ( !_Chain_Is_empty( handler_stack ) ) { 2010b54: 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 ); 2010b58: b6 07 20 e8 add %i4, 0xe8, %i3 2010b5c: 80 a0 40 1b cmp %g1, %i3 2010b60: 02 80 00 14 be 2010bb0 <_POSIX_Threads_cancel_run+0x68> 2010b64: c4 27 20 d8 st %g2, [ %i4 + 0xd8 ] _ISR_Disable( level ); 2010b68: 7f ff c6 7d call 200255c 2010b6c: 01 00 00 00 nop handler = (POSIX_Cancel_Handler_control *) 2010b70: fa 07 20 ec ld [ %i4 + 0xec ], %i5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2010b74: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 2010b78: c2 07 60 04 ld [ %i5 + 4 ], %g1 next->previous = previous; 2010b7c: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2010b80: c4 20 40 00 st %g2, [ %g1 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 2010b84: 7f ff c6 7a call 200256c 2010b88: 01 00 00 00 nop (*handler->routine)( handler->arg ); 2010b8c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2010b90: 9f c0 40 00 call %g1 2010b94: d0 07 60 0c ld [ %i5 + 0xc ], %o0 _Workspace_Free( handler ); 2010b98: 7f ff e9 21 call 200b01c <_Workspace_Free> 2010b9c: 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 ) ) { 2010ba0: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1 2010ba4: 80 a0 40 1b cmp %g1, %i3 2010ba8: 12 bf ff f0 bne 2010b68 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN 2010bac: 01 00 00 00 nop 2010bb0: 81 c7 e0 08 ret 2010bb4: 81 e8 00 00 restore =============================================================================== 0200708c <_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) { 200708c: 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; 2007090: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007094: 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; 2007098: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 200709c: 80 a0 60 00 cmp %g1, 0 20070a0: 12 80 00 0e bne 20070d8 <_POSIX_Timer_TSR+0x4c> 20070a4: c4 26 60 68 st %g2, [ %i1 + 0x68 ] 20070a8: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 20070ac: 80 a0 60 00 cmp %g1, 0 20070b0: 32 80 00 0b bne,a 20070dc <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN 20070b4: 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; 20070b8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 20070bc: 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 ) ) { 20070c0: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 20070c4: 40 00 1c 89 call 200e2e8 20070c8: 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; 20070cc: c0 26 60 68 clr [ %i1 + 0x68 ] 20070d0: 81 c7 e0 08 ret 20070d4: 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( 20070d8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 20070dc: d4 06 60 08 ld [ %i1 + 8 ], %o2 20070e0: 90 06 60 10 add %i1, 0x10, %o0 20070e4: 98 10 00 19 mov %i1, %o4 20070e8: 17 00 80 1c sethi %hi(0x2007000), %o3 20070ec: 40 00 1d a6 call 200e784 <_POSIX_Timer_Insert_helper> 20070f0: 96 12 e0 8c or %o3, 0x8c, %o3 ! 200708c <_POSIX_Timer_TSR> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 20070f4: 80 8a 20 ff btst 0xff, %o0 20070f8: 02 bf ff f6 be 20070d0 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN 20070fc: 01 00 00 00 nop struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007100: 40 00 06 16 call 2008958 <_TOD_Get_as_timestamp> 2007104: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007108: 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); 200710c: 94 10 20 00 clr %o2 2007110: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007114: 90 10 00 1c mov %i4, %o0 2007118: 96 12 e2 00 or %o3, 0x200, %o3 200711c: 40 00 51 51 call 201b660 <__divdi3> 2007120: 92 10 00 1d mov %i5, %o1 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007124: 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); 2007128: d2 26 60 6c st %o1, [ %i1 + 0x6c ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 200712c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007130: 90 10 00 1c mov %i4, %o0 2007134: 96 12 e2 00 or %o3, 0x200, %o3 2007138: 40 00 52 30 call 201b9f8 <__moddi3> 200713c: 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; 2007140: 82 10 20 03 mov 3, %g1 2007144: d2 26 60 70 st %o1, [ %i1 + 0x70 ] 2007148: 10 bf ff de b 20070c0 <_POSIX_Timer_TSR+0x34> 200714c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] =============================================================================== 02010c70 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 2010c70: 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, 2010c74: 98 10 20 01 mov 1, %o4 2010c78: 90 10 00 18 mov %i0, %o0 2010c7c: 92 10 00 19 mov %i1, %o1 2010c80: 94 07 bf f4 add %fp, -12, %o2 2010c84: 40 00 00 2e call 2010d3c <_POSIX_signals_Clear_signals> 2010c88: 96 10 00 1a mov %i2, %o3 2010c8c: 80 8a 20 ff btst 0xff, %o0 2010c90: 02 80 00 23 be 2010d1c <_POSIX_signals_Check_signal+0xac> 2010c94: 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 ) 2010c98: 85 2e 60 02 sll %i1, 2, %g2 2010c9c: 37 00 80 7e sethi %hi(0x201f800), %i3 2010ca0: b9 2e 60 04 sll %i1, 4, %i4 2010ca4: b6 16 e2 60 or %i3, 0x260, %i3 2010ca8: b8 27 00 02 sub %i4, %g2, %i4 2010cac: 84 06 c0 1c add %i3, %i4, %g2 2010cb0: fa 00 a0 08 ld [ %g2 + 8 ], %i5 2010cb4: 80 a7 60 01 cmp %i5, 1 2010cb8: 02 80 00 19 be 2010d1c <_POSIX_signals_Check_signal+0xac> <== NEVER TAKEN 2010cbc: 21 00 80 7e sethi %hi(0x201f800), %l0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 2010cc0: f4 06 20 d0 ld [ %i0 + 0xd0 ], %i2 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 2010cc4: 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, 2010cc8: a0 14 22 00 or %l0, 0x200, %l0 2010ccc: 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; 2010cd0: 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, 2010cd4: 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; 2010cd8: 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, 2010cdc: 92 02 60 20 add %o1, 0x20, %o1 2010ce0: 40 00 04 98 call 2011f40 2010ce4: 94 10 20 28 mov 0x28, %o2 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 2010ce8: c2 06 c0 1c ld [ %i3 + %i4 ], %g1 2010cec: 80 a0 60 02 cmp %g1, 2 2010cf0: 02 80 00 0e be 2010d28 <_POSIX_signals_Check_signal+0xb8> 2010cf4: 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 ); 2010cf8: 9f c7 40 00 call %i5 2010cfc: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 2010d00: d0 04 20 0c ld [ %l0 + 0xc ], %o0 2010d04: 92 07 bf cc add %fp, -52, %o1 2010d08: 90 02 20 20 add %o0, 0x20, %o0 2010d0c: 40 00 04 8d call 2011f40 2010d10: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 2010d14: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 2010d18: f4 26 20 d0 st %i2, [ %i0 + 0xd0 ] return true; } 2010d1c: b0 08 60 01 and %g1, 1, %i0 2010d20: 81 c7 e0 08 ret 2010d24: 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)( 2010d28: 92 07 bf f4 add %fp, -12, %o1 2010d2c: 9f c7 40 00 call %i5 2010d30: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 2010d34: 10 bf ff f4 b 2010d04 <_POSIX_signals_Check_signal+0x94> 2010d38: d0 04 20 0c ld [ %l0 + 0xc ], %o0 =============================================================================== 02011524 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 2011524: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 2011528: 7f ff c4 0d call 200255c 201152c: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 2011530: 85 2e 20 04 sll %i0, 4, %g2 2011534: 83 2e 20 02 sll %i0, 2, %g1 2011538: 82 20 80 01 sub %g2, %g1, %g1 201153c: 05 00 80 7e sethi %hi(0x201f800), %g2 2011540: 84 10 a2 60 or %g2, 0x260, %g2 ! 201fa60 <_POSIX_signals_Vectors> 2011544: c4 00 80 01 ld [ %g2 + %g1 ], %g2 2011548: 80 a0 a0 02 cmp %g2, 2 201154c: 02 80 00 0b be 2011578 <_POSIX_signals_Clear_process_signals+0x54> 2011550: 05 00 80 7f sethi %hi(0x201fc00), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 2011554: 03 00 80 7f sethi %hi(0x201fc00), %g1 2011558: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 ! 201fc54 <_POSIX_signals_Pending> 201155c: 86 10 20 01 mov 1, %g3 2011560: b0 06 3f ff add %i0, -1, %i0 2011564: b1 28 c0 18 sll %g3, %i0, %i0 2011568: b0 28 80 18 andn %g2, %i0, %i0 201156c: f0 20 60 54 st %i0, [ %g1 + 0x54 ] } _ISR_Enable( level ); 2011570: 7f ff c3 ff call 200256c 2011574: 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 ] ) ) 2011578: 84 10 a0 58 or %g2, 0x58, %g2 201157c: c6 00 40 02 ld [ %g1 + %g2 ], %g3 2011580: 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 ); 2011584: 82 00 60 04 add %g1, 4, %g1 2011588: 80 a0 c0 01 cmp %g3, %g1 201158c: 02 bf ff f3 be 2011558 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN 2011590: 03 00 80 7f sethi %hi(0x201fc00), %g1 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 2011594: 7f ff c3 f6 call 200256c <== NOT EXECUTED 2011598: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02007f00 <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2007f00: 82 10 20 1b mov 0x1b, %g1 <== NOT EXECUTED 2007f04: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED #include #include #include #include int _POSIX_signals_Get_lowest( 2007f08: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED 2007f0c: 85 28 c0 02 sll %g3, %g2, %g2 <== NOT EXECUTED ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2007f10: 80 88 80 08 btst %g2, %o0 <== NOT EXECUTED 2007f14: 12 80 00 11 bne 2007f58 <_POSIX_signals_Get_lowest+0x58> <== NOT EXECUTED 2007f18: 01 00 00 00 nop <== NOT EXECUTED sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2007f1c: 82 00 60 01 inc %g1 <== NOT EXECUTED 2007f20: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 2007f24: 12 bf ff fa bne 2007f0c <_POSIX_signals_Get_lowest+0xc> <== NOT EXECUTED 2007f28: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED 2007f2c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2007f30: 10 80 00 05 b 2007f44 <_POSIX_signals_Get_lowest+0x44> <== NOT EXECUTED 2007f34: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2007f38: 80 a0 60 1b cmp %g1, 0x1b <== NOT EXECUTED 2007f3c: 02 80 00 07 be 2007f58 <_POSIX_signals_Get_lowest+0x58> <== NOT EXECUTED 2007f40: 01 00 00 00 nop <== NOT EXECUTED #include #include #include #include int _POSIX_signals_Get_lowest( 2007f44: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED 2007f48: 85 28 c0 02 sll %g3, %g2, %g2 <== NOT EXECUTED #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2007f4c: 80 88 80 08 btst %g2, %o0 <== NOT EXECUTED 2007f50: 22 bf ff fa be,a 2007f38 <_POSIX_signals_Get_lowest+0x38><== NOT EXECUTED 2007f54: 82 00 60 01 inc %g1 <== NOT EXECUTED * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2007f58: 81 c3 e0 08 retl <== NOT EXECUTED 2007f5c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED =============================================================================== 0200d8fc <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200d8fc: 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; 200d900: 35 00 80 7e sethi %hi(0x201f800), %i2 POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d904: 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; 200d908: b4 16 a2 00 or %i2, 0x200, %i2 200d90c: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 200d910: 80 a7 20 00 cmp %i4, 0 200d914: 02 80 00 34 be 200d9e4 <_POSIX_signals_Post_switch_extension+0xe8> 200d918: 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 ); 200d91c: 7f ff d3 10 call 200255c 200d920: 37 00 80 7f sethi %hi(0x201fc00), %i3 200d924: b6 16 e0 54 or %i3, 0x54, %i3 ! 201fc54 <_POSIX_signals_Pending> if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d928: c6 06 c0 00 ld [ %i3 ], %g3 200d92c: 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 & 200d930: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d934: 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 & 200d938: 80 a8 40 02 andncc %g1, %g2, %g0 200d93c: 02 80 00 26 be 200d9d4 <_POSIX_signals_Post_switch_extension+0xd8> 200d940: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200d944: 7f ff d3 0a call 200256c 200d948: ba 10 20 1b mov 0x1b, %i5 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 200d94c: 92 10 00 1d mov %i5, %o1 200d950: 94 10 20 00 clr %o2 200d954: 40 00 0c c7 call 2010c70 <_POSIX_signals_Check_signal> 200d958: 90 10 00 1c mov %i4, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d95c: 92 10 00 1d mov %i5, %o1 200d960: 90 10 00 1c mov %i4, %o0 200d964: 40 00 0c c3 call 2010c70 <_POSIX_signals_Check_signal> 200d968: 94 10 20 01 mov 1, %o2 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200d96c: ba 07 60 01 inc %i5 200d970: 80 a7 60 20 cmp %i5, 0x20 200d974: 12 bf ff f7 bne 200d950 <_POSIX_signals_Post_switch_extension+0x54> 200d978: 92 10 00 1d mov %i5, %o1 200d97c: 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 ); 200d980: 92 10 00 1d mov %i5, %o1 200d984: 94 10 20 00 clr %o2 200d988: 40 00 0c ba call 2010c70 <_POSIX_signals_Check_signal> 200d98c: 90 10 00 1c mov %i4, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d990: 92 10 00 1d mov %i5, %o1 200d994: 90 10 00 1c mov %i4, %o0 200d998: 40 00 0c b6 call 2010c70 <_POSIX_signals_Check_signal> 200d99c: 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++ ) { 200d9a0: ba 07 60 01 inc %i5 200d9a4: 80 a7 60 1b cmp %i5, 0x1b 200d9a8: 12 bf ff f7 bne 200d984 <_POSIX_signals_Post_switch_extension+0x88> 200d9ac: 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 ); 200d9b0: 7f ff d2 eb call 200255c 200d9b4: 01 00 00 00 nop if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d9b8: c6 06 c0 00 ld [ %i3 ], %g3 200d9bc: 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 & 200d9c0: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d9c4: 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 & 200d9c8: 80 a8 40 02 andncc %g1, %g2, %g0 200d9cc: 12 bf ff de bne 200d944 <_POSIX_signals_Post_switch_extension+0x48><== NEVER TAKEN 200d9d0: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200d9d4: 7f ff d2 e6 call 200256c 200d9d8: 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; 200d9dc: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 200d9e0: f2 20 60 34 st %i1, [ %g1 + 0x34 ] 200d9e4: 81 c7 e0 08 ret 200d9e8: 81 e8 00 00 restore =============================================================================== 0201c2a0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 201c2a0: 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 ) ) { 201c2a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201c2a8: 05 04 00 20 sethi %hi(0x10008000), %g2 201c2ac: 86 10 20 01 mov 1, %g3 201c2b0: ba 06 7f ff add %i1, -1, %i5 201c2b4: 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 ]; 201c2b8: 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 ) ) { 201c2bc: 80 a1 00 02 cmp %g4, %g2 201c2c0: 02 80 00 1c be 201c330 <_POSIX_signals_Unblock_thread+0x90> 201c2c4: 9f 28 c0 1d sll %g3, %i5, %o7 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 201c2c8: c4 03 60 d0 ld [ %o5 + 0xd0 ], %g2 201c2cc: 80 ab c0 02 andncc %o7, %g2, %g0 201c2d0: 02 80 00 15 be 201c324 <_POSIX_signals_Unblock_thread+0x84> 201c2d4: ba 10 20 00 clr %i5 201c2d8: 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 ) ) { 201c2dc: 80 88 40 02 btst %g1, %g2 201c2e0: 02 80 00 29 be 201c384 <_POSIX_signals_Unblock_thread+0xe4> 201c2e4: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 201c2e8: 84 10 20 04 mov 4, %g2 201c2ec: 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); 201c2f0: 05 00 00 ef sethi %hi(0x3bc00), %g2 201c2f4: 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) ) 201c2f8: 80 88 40 02 btst %g1, %g2 201c2fc: 12 80 00 36 bne 201c3d4 <_POSIX_signals_Unblock_thread+0x134> 201c300: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 201c304: 22 80 00 09 be,a 201c328 <_POSIX_signals_Unblock_thread+0x88><== NEVER TAKEN 201c308: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 201c30c: 7f ff ba ba call 200adf4 <_Watchdog_Remove> 201c310: 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 ); 201c314: 13 04 00 ff sethi %hi(0x1003fc00), %o1 201c318: 90 10 00 18 mov %i0, %o0 201c31c: 7f ff b5 d0 call 2009a5c <_Thread_Clear_state> 201c320: 92 12 63 f8 or %o1, 0x3f8, %o1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 201c324: b0 0f 60 01 and %i5, 1, %i0 201c328: 81 c7 e0 08 ret 201c32c: 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) ) { 201c330: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201c334: 80 8b c0 01 btst %o7, %g1 201c338: 22 80 00 21 be,a 201c3bc <_POSIX_signals_Unblock_thread+0x11c> 201c33c: c2 03 60 d0 ld [ %o5 + 0xd0 ], %g1 the_thread->Wait.return_code = EINTR; 201c340: 82 10 20 04 mov 4, %g1 201c344: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 201c348: 80 a6 a0 00 cmp %i2, 0 201c34c: 02 80 00 27 be 201c3e8 <_POSIX_signals_Unblock_thread+0x148> 201c350: 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; 201c354: c4 06 80 00 ld [ %i2 ], %g2 201c358: c4 20 40 00 st %g2, [ %g1 ] 201c35c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 201c360: c4 20 60 04 st %g2, [ %g1 + 4 ] 201c364: c4 06 a0 08 ld [ %i2 + 8 ], %g2 201c368: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 201c36c: 90 10 00 18 mov %i0, %o0 201c370: 7f ff b8 a1 call 200a5f4 <_Thread_queue_Extract_with_proxy> 201c374: ba 10 20 01 mov 1, %i5 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 201c378: b0 0f 60 01 and %i5, 1, %i0 201c37c: 81 c7 e0 08 ret 201c380: 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 ) { 201c384: 12 bf ff e8 bne 201c324 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN 201c388: 03 00 80 7e sethi %hi(0x201f800), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201c38c: 82 10 62 00 or %g1, 0x200, %g1 ! 201fa00 <_Per_CPU_Information> 201c390: c4 00 60 08 ld [ %g1 + 8 ], %g2 201c394: 80 a0 a0 00 cmp %g2, 0 201c398: 22 bf ff e4 be,a 201c328 <_POSIX_signals_Unblock_thread+0x88> 201c39c: b0 0f 60 01 and %i5, 1, %i0 201c3a0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 201c3a4: 80 a6 00 02 cmp %i0, %g2 201c3a8: 22 bf ff df be,a 201c324 <_POSIX_signals_Unblock_thread+0x84><== ALWAYS TAKEN 201c3ac: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] 201c3b0: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED 201c3b4: 81 c7 e0 08 ret <== NOT EXECUTED 201c3b8: 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) ) { 201c3bc: 80 ab c0 01 andncc %o7, %g1, %g0 201c3c0: 12 bf ff e0 bne 201c340 <_POSIX_signals_Unblock_thread+0xa0> 201c3c4: ba 10 20 00 clr %i5 201c3c8: b0 0f 60 01 and %i5, 1, %i0 201c3cc: 81 c7 e0 08 ret 201c3d0: 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 ); 201c3d4: 7f ff b8 88 call 200a5f4 <_Thread_queue_Extract_with_proxy> 201c3d8: 90 10 00 18 mov %i0, %o0 201c3dc: b0 0f 60 01 and %i5, 1, %i0 201c3e0: 81 c7 e0 08 ret 201c3e4: 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; 201c3e8: 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; 201c3ec: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; 201c3f0: c4 20 60 04 st %g2, [ %g1 + 4 ] the_info->si_value.sival_int = 0; 201c3f4: 10 bf ff de b 201c36c <_POSIX_signals_Unblock_thread+0xcc> 201c3f8: c0 20 60 08 clr [ %g1 + 8 ] =============================================================================== 0200f8ec <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200f8ec: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200f8f0: 80 a6 60 00 cmp %i1, 0 200f8f4: 02 80 00 4c be 200fa24 <_RBTree_Extract_unprotected+0x138> 200f8f8: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200f8fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 200f900: 80 a0 40 19 cmp %g1, %i1 200f904: 22 80 00 59 be,a 200fa68 <_RBTree_Extract_unprotected+0x17c> 200f908: 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]) { 200f90c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200f910: 80 a0 40 19 cmp %g1, %i1 200f914: 22 80 00 46 be,a 200fa2c <_RBTree_Extract_unprotected+0x140> 200f918: 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]) { 200f91c: fa 06 60 04 ld [ %i1 + 4 ], %i5 200f920: 80 a7 60 00 cmp %i5, 0 200f924: 22 80 00 4a be,a 200fa4c <_RBTree_Extract_unprotected+0x160> 200f928: f8 06 60 08 ld [ %i1 + 8 ], %i4 200f92c: c2 06 60 08 ld [ %i1 + 8 ], %g1 200f930: 80 a0 60 00 cmp %g1, 0 200f934: 32 80 00 05 bne,a 200f948 <_RBTree_Extract_unprotected+0x5c> 200f938: c2 07 60 08 ld [ %i5 + 8 ], %g1 200f93c: 10 80 00 50 b 200fa7c <_RBTree_Extract_unprotected+0x190> 200f940: 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]; 200f944: c2 07 60 08 ld [ %i5 + 8 ], %g1 200f948: 80 a0 60 00 cmp %g1, 0 200f94c: 32 bf ff fe bne,a 200f944 <_RBTree_Extract_unprotected+0x58> 200f950: 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]; 200f954: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200f958: 80 a7 20 00 cmp %i4, 0 200f95c: 02 80 00 54 be 200faac <_RBTree_Extract_unprotected+0x1c0> 200f960: 01 00 00 00 nop leaf->parent = target->parent; 200f964: c2 07 40 00 ld [ %i5 ], %g1 200f968: 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]; 200f96c: 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]; 200f970: 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]; 200f974: 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; 200f978: c6 07 60 0c ld [ %i5 + 0xc ], %g3 dir = target != target->parent->child[0]; 200f97c: 88 19 00 1d xor %g4, %i5, %g4 200f980: 80 a0 00 04 cmp %g0, %g4 200f984: 88 40 20 00 addx %g0, 0, %g4 target->parent->child[dir] = leaf; 200f988: 89 29 20 02 sll %g4, 2, %g4 200f98c: 84 00 80 04 add %g2, %g4, %g2 200f990: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200f994: c4 00 60 04 ld [ %g1 + 4 ], %g2 200f998: 84 18 80 19 xor %g2, %i1, %g2 200f99c: 80 a0 00 02 cmp %g0, %g2 200f9a0: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = target; 200f9a4: 85 28 a0 02 sll %g2, 2, %g2 200f9a8: 82 00 40 02 add %g1, %g2, %g1 200f9ac: 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]; 200f9b0: c2 06 60 08 ld [ %i1 + 8 ], %g1 200f9b4: c2 27 60 08 st %g1, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200f9b8: c2 06 60 08 ld [ %i1 + 8 ], %g1 200f9bc: 80 a0 60 00 cmp %g1, 0 200f9c0: 32 80 00 02 bne,a 200f9c8 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN 200f9c4: fa 20 40 00 st %i5, [ %g1 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200f9c8: c2 06 60 04 ld [ %i1 + 4 ], %g1 200f9cc: c2 27 60 04 st %g1, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200f9d0: c2 06 60 04 ld [ %i1 + 4 ], %g1 200f9d4: 80 a0 60 00 cmp %g1, 0 200f9d8: 32 80 00 02 bne,a 200f9e0 <_RBTree_Extract_unprotected+0xf4> 200f9dc: 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; 200f9e0: c4 06 40 00 ld [ %i1 ], %g2 target->color = the_node->color; 200f9e4: 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; 200f9e8: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200f9ec: 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 */ 200f9f0: 80 a0 e0 00 cmp %g3, 0 200f9f4: 32 80 00 06 bne,a 200fa0c <_RBTree_Extract_unprotected+0x120> 200f9f8: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200f9fc: 80 a7 20 00 cmp %i4, 0 200fa00: 32 80 00 02 bne,a 200fa08 <_RBTree_Extract_unprotected+0x11c> 200fa04: 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; 200fa08: 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; 200fa0c: c0 26 60 08 clr [ %i1 + 8 ] 200fa10: c0 26 60 04 clr [ %i1 + 4 ] 200fa14: 80 a0 60 00 cmp %g1, 0 200fa18: 02 80 00 03 be 200fa24 <_RBTree_Extract_unprotected+0x138> 200fa1c: c0 26 40 00 clr [ %i1 ] 200fa20: c0 20 60 0c clr [ %g1 + 0xc ] 200fa24: 81 c7 e0 08 ret 200fa28: 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]) 200fa2c: 80 a0 60 00 cmp %g1, 0 200fa30: 22 80 00 28 be,a 200fad0 <_RBTree_Extract_unprotected+0x1e4> 200fa34: 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]) { 200fa38: fa 06 60 04 ld [ %i1 + 4 ], %i5 200fa3c: 80 a7 60 00 cmp %i5, 0 200fa40: 12 bf ff bb bne 200f92c <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN 200fa44: 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]; 200fa48: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED if( leaf ) { 200fa4c: 80 a7 20 00 cmp %i4, 0 200fa50: 32 80 00 0c bne,a 200fa80 <_RBTree_Extract_unprotected+0x194> 200fa54: 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); 200fa58: 7f ff fe e0 call 200f5d8 <_RBTree_Extract_validate_unprotected> 200fa5c: 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]; 200fa60: 10 80 00 0a b 200fa88 <_RBTree_Extract_unprotected+0x19c> 200fa64: 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]) 200fa68: 80 a0 60 00 cmp %g1, 0 200fa6c: 22 80 00 14 be,a 200fabc <_RBTree_Extract_unprotected+0x1d0> 200fa70: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200fa74: 10 bf ff a6 b 200f90c <_RBTree_Extract_unprotected+0x20> 200fa78: 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; 200fa7c: c2 06 40 00 ld [ %i1 ], %g1 200fa80: 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]; 200fa84: 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; 200fa88: c6 06 60 0c ld [ %i1 + 0xc ], %g3 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200fa8c: c4 00 60 04 ld [ %g1 + 4 ], %g2 200fa90: 84 18 80 19 xor %g2, %i1, %g2 200fa94: 80 a0 00 02 cmp %g0, %g2 200fa98: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = leaf; 200fa9c: 85 28 a0 02 sll %g2, 2, %g2 200faa0: 82 00 40 02 add %g1, %g2, %g1 200faa4: 10 bf ff d3 b 200f9f0 <_RBTree_Extract_unprotected+0x104> 200faa8: 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); 200faac: 7f ff fe cb call 200f5d8 <_RBTree_Extract_validate_unprotected> 200fab0: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200fab4: 10 bf ff af b 200f970 <_RBTree_Extract_unprotected+0x84> 200fab8: 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, 200fabc: 80 a6 00 01 cmp %i0, %g1 200fac0: 12 bf ff 93 bne 200f90c <_RBTree_Extract_unprotected+0x20> 200fac4: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200fac8: 10 bf ff 91 b 200f90c <_RBTree_Extract_unprotected+0x20> 200facc: 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, 200fad0: 80 a6 00 01 cmp %i0, %g1 200fad4: 12 bf ff 92 bne 200f91c <_RBTree_Extract_unprotected+0x30> 200fad8: c2 26 20 0c st %g1, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200fadc: 10 bf ff 90 b 200f91c <_RBTree_Extract_unprotected+0x30> 200fae0: c0 26 20 0c clr [ %i0 + 0xc ] =============================================================================== 0200f5d8 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200f5d8: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200f5dc: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; 200f5e0: c4 00 40 00 ld [ %g1 ], %g2 200f5e4: 80 a0 a0 00 cmp %g2, 0 200f5e8: 02 80 00 bf be 200f8e4 <_RBTree_Extract_validate_unprotected+0x30c> 200f5ec: 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]) 200f5f0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200f5f4: 80 a6 00 02 cmp %i0, %g2 200f5f8: 22 80 00 02 be,a 200f600 <_RBTree_Extract_validate_unprotected+0x28> 200f5fc: c4 00 60 08 ld [ %g1 + 8 ], %g2 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 200f600: 98 10 20 01 mov 1, %o4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200f604: c6 06 20 0c ld [ %i0 + 0xc ], %g3 200f608: 80 a0 e0 01 cmp %g3, 1 200f60c: 22 80 00 58 be,a 200f76c <_RBTree_Extract_validate_unprotected+0x194> 200f610: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 200f614: c6 00 40 00 ld [ %g1 ], %g3 200f618: 80 a0 e0 00 cmp %g3, 0 200f61c: 02 80 00 53 be 200f768 <_RBTree_Extract_validate_unprotected+0x190> 200f620: 80 a0 a0 00 cmp %g2, 0 200f624: 22 80 00 07 be,a 200f640 <_RBTree_Extract_validate_unprotected+0x68><== NEVER TAKEN 200f628: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED 200f62c: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 200f630: 80 a1 20 01 cmp %g4, 1 200f634: 22 80 00 28 be,a 200f6d4 <_RBTree_Extract_validate_unprotected+0xfc> 200f638: de 00 60 04 ld [ %g1 + 4 ], %o7 _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200f63c: c6 00 a0 08 ld [ %g2 + 8 ], %g3 200f640: 80 a0 e0 00 cmp %g3, 0 200f644: 22 80 00 07 be,a 200f660 <_RBTree_Extract_validate_unprotected+0x88> 200f648: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200f64c: c6 00 e0 0c ld [ %g3 + 0xc ], %g3 200f650: 80 a0 e0 01 cmp %g3, 1 200f654: 22 80 00 4c be,a 200f784 <_RBTree_Extract_validate_unprotected+0x1ac> 200f658: c6 00 60 04 ld [ %g1 + 4 ], %g3 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200f65c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200f660: 80 a0 e0 00 cmp %g3, 0 200f664: 22 80 00 07 be,a 200f680 <_RBTree_Extract_validate_unprotected+0xa8> 200f668: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 200f66c: c6 00 e0 0c ld [ %g3 + 0xc ], %g3 200f670: 80 a0 e0 01 cmp %g3, 1 200f674: 22 80 00 44 be,a 200f784 <_RBTree_Extract_validate_unprotected+0x1ac> 200f678: c6 00 60 04 ld [ %g1 + 4 ], %g3 sibling->color = RBT_RED; 200f67c: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 200f680: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200f684: 80 a0 a0 01 cmp %g2, 1 200f688: 22 80 00 38 be,a 200f768 <_RBTree_Extract_validate_unprotected+0x190> 200f68c: 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; 200f690: c6 00 40 00 ld [ %g1 ], %g3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200f694: 80 a0 e0 00 cmp %g3, 0 200f698: 02 80 00 0a be 200f6c0 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN 200f69c: 84 10 20 00 clr %g2 if(!(the_node->parent->parent)) return NULL; 200f6a0: c8 00 c0 00 ld [ %g3 ], %g4 200f6a4: 80 a1 20 00 cmp %g4, 0 200f6a8: 02 80 00 07 be 200f6c4 <_RBTree_Extract_validate_unprotected+0xec> 200f6ac: b0 10 00 01 mov %g1, %i0 if(the_node == the_node->parent->child[RBT_LEFT]) 200f6b0: c4 00 e0 04 ld [ %g3 + 4 ], %g2 200f6b4: 80 a0 40 02 cmp %g1, %g2 200f6b8: 22 80 00 05 be,a 200f6cc <_RBTree_Extract_validate_unprotected+0xf4> 200f6bc: 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; 200f6c0: b0 10 00 01 mov %g1, %i0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200f6c4: 10 bf ff d0 b 200f604 <_RBTree_Extract_validate_unprotected+0x2c> 200f6c8: 82 10 00 03 mov %g3, %g1 200f6cc: 10 bf ff ce b 200f604 <_RBTree_Extract_validate_unprotected+0x2c> 200f6d0: 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; 200f6d4: c8 20 60 0c st %g4, [ %g1 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200f6d8: 9e 1b c0 18 xor %o7, %i0, %o7 200f6dc: 80 a0 00 0f cmp %g0, %o7 200f6e0: 9a 40 20 00 addx %g0, 0, %o5 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 200f6e4: 88 21 00 0d sub %g4, %o5, %g4 200f6e8: 89 29 20 02 sll %g4, 2, %g4 200f6ec: 88 00 40 04 add %g1, %g4, %g4 200f6f0: de 01 20 04 ld [ %g4 + 4 ], %o7 200f6f4: 80 a3 e0 00 cmp %o7, 0 200f6f8: 02 80 00 16 be 200f750 <_RBTree_Extract_validate_unprotected+0x178><== NEVER TAKEN 200f6fc: c0 20 a0 0c clr [ %g2 + 0xc ] c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 200f700: 85 2b 60 02 sll %o5, 2, %g2 200f704: 96 03 c0 02 add %o7, %g2, %o3 200f708: d4 02 e0 04 ld [ %o3 + 4 ], %o2 200f70c: d4 21 20 04 st %o2, [ %g4 + 4 ] if (c->child[dir]) 200f710: c8 02 e0 04 ld [ %o3 + 4 ], %g4 200f714: 80 a1 20 00 cmp %g4, 0 200f718: 02 80 00 04 be 200f728 <_RBTree_Extract_validate_unprotected+0x150><== NEVER TAKEN 200f71c: 84 03 c0 02 add %o7, %g2, %g2 c->child[dir]->parent = the_node; 200f720: c2 21 00 00 st %g1, [ %g4 ] 200f724: c6 00 40 00 ld [ %g1 ], %g3 c->child[dir] = the_node; 200f728: c2 20 a0 04 st %g1, [ %g2 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200f72c: c4 00 e0 04 ld [ %g3 + 4 ], %g2 c->parent = the_node->parent; 200f730: 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; 200f734: 84 18 40 02 xor %g1, %g2, %g2 c->parent = the_node->parent; the_node->parent = c; 200f738: de 20 40 00 st %o7, [ %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; 200f73c: 80 a0 00 02 cmp %g0, %g2 200f740: 84 40 20 00 addx %g0, 0, %g2 200f744: 85 28 a0 02 sll %g2, 2, %g2 200f748: 86 00 c0 02 add %g3, %g2, %g3 200f74c: de 20 e0 04 st %o7, [ %g3 + 4 ] _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; 200f750: 80 a0 00 0d cmp %g0, %o5 200f754: 84 60 3f ff subx %g0, -1, %g2 200f758: 85 28 a0 02 sll %g2, 2, %g2 200f75c: 84 00 40 02 add %g1, %g2, %g2 200f760: 10 bf ff b7 b 200f63c <_RBTree_Extract_validate_unprotected+0x64> 200f764: c4 00 a0 04 ld [ %g2 + 4 ], %g2 sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200f768: c2 06 00 00 ld [ %i0 ], %g1 200f76c: c2 00 40 00 ld [ %g1 ], %g1 200f770: 80 a0 60 00 cmp %g1, 0 200f774: 22 80 00 02 be,a 200f77c <_RBTree_Extract_validate_unprotected+0x1a4> 200f778: c0 26 20 0c clr [ %i0 + 0xc ] 200f77c: 81 c7 e0 08 ret 200f780: 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]; 200f784: 86 18 c0 18 xor %g3, %i0, %g3 200f788: 80 a0 00 03 cmp %g0, %g3 200f78c: 86 40 20 00 addx %g0, 0, %g3 if (!_RBTree_Is_red(sibling->child[!dir])) { 200f790: 80 a0 00 03 cmp %g0, %g3 200f794: 9e 60 3f ff subx %g0, -1, %o7 200f798: 9f 2b e0 02 sll %o7, 2, %o7 200f79c: 88 00 80 0f add %g2, %o7, %g4 200f7a0: 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); 200f7a4: 80 a1 20 00 cmp %g4, 0 200f7a8: 22 80 00 07 be,a 200f7c4 <_RBTree_Extract_validate_unprotected+0x1ec> 200f7ac: 89 28 e0 02 sll %g3, 2, %g4 200f7b0: da 01 20 0c ld [ %g4 + 0xc ], %o5 200f7b4: 80 a3 60 01 cmp %o5, 1 200f7b8: 22 80 00 28 be,a 200f858 <_RBTree_Extract_validate_unprotected+0x280> 200f7bc: de 00 60 0c ld [ %g1 + 0xc ], %o7 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 200f7c0: 89 28 e0 02 sll %g3, 2, %g4 200f7c4: 88 00 80 04 add %g2, %g4, %g4 200f7c8: d6 01 20 04 ld [ %g4 + 4 ], %o3 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 200f7cc: 88 10 20 01 mov 1, %g4 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 200f7d0: 98 18 e0 01 xor %g3, 1, %o4 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 200f7d4: c8 20 a0 0c st %g4, [ %g2 + 0xc ] RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 200f7d8: 9a 21 00 0c sub %g4, %o4, %o5 200f7dc: 9b 2b 60 02 sll %o5, 2, %o5 200f7e0: 9a 00 80 0d add %g2, %o5, %o5 200f7e4: c8 03 60 04 ld [ %o5 + 4 ], %g4 200f7e8: 80 a1 20 00 cmp %g4, 0 200f7ec: 02 80 00 16 be 200f844 <_RBTree_Extract_validate_unprotected+0x26c><== NEVER TAKEN 200f7f0: c0 22 e0 0c clr [ %o3 + 0xc ] c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 200f7f4: 99 2b 20 02 sll %o4, 2, %o4 200f7f8: 96 01 00 0c add %g4, %o4, %o3 200f7fc: d4 02 e0 04 ld [ %o3 + 4 ], %o2 200f800: d4 23 60 04 st %o2, [ %o5 + 4 ] if (c->child[dir]) 200f804: da 02 e0 04 ld [ %o3 + 4 ], %o5 200f808: 80 a3 60 00 cmp %o5, 0 200f80c: 32 80 00 02 bne,a 200f814 <_RBTree_Extract_validate_unprotected+0x23c> 200f810: c4 23 40 00 st %g2, [ %o5 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200f814: da 00 80 00 ld [ %g2 ], %o5 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200f818: 98 01 00 0c add %g4, %o4, %o4 200f81c: c4 23 20 04 st %g2, [ %o4 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200f820: d8 03 60 04 ld [ %o5 + 4 ], %o4 c->parent = the_node->parent; 200f824: da 21 00 00 st %o5, [ %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; 200f828: 98 18 80 0c xor %g2, %o4, %o4 c->parent = the_node->parent; the_node->parent = c; 200f82c: c8 20 80 00 st %g4, [ %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; 200f830: 80 a0 00 0c cmp %g0, %o4 200f834: 84 40 20 00 addx %g0, 0, %g2 200f838: 85 28 a0 02 sll %g2, 2, %g2 200f83c: 9a 03 40 02 add %o5, %g2, %o5 200f840: c8 23 60 04 st %g4, [ %o5 + 4 ] sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; 200f844: 84 00 40 0f add %g1, %o7, %g2 200f848: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200f84c: 9e 00 80 0f add %g2, %o7, %o7 200f850: c8 03 e0 04 ld [ %o7 + 4 ], %g4 } sibling->color = parent->color; 200f854: de 00 60 0c ld [ %g1 + 0xc ], %o7 200f858: de 20 a0 0c st %o7, [ %g2 + 0xc ] parent->color = RBT_BLACK; 200f85c: c0 20 60 0c clr [ %g1 + 0xc ] RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 200f860: 9e 10 20 01 mov 1, %o7 200f864: 9e 23 c0 03 sub %o7, %g3, %o7 200f868: 9f 2b e0 02 sll %o7, 2, %o7 200f86c: 9e 00 40 0f add %g1, %o7, %o7 200f870: c4 03 e0 04 ld [ %o7 + 4 ], %g2 200f874: 80 a0 a0 00 cmp %g2, 0 200f878: 02 bf ff bc be 200f768 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN 200f87c: c0 21 20 0c clr [ %g4 + 0xc ] c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 200f880: 87 28 e0 02 sll %g3, 2, %g3 200f884: 88 00 80 03 add %g2, %g3, %g4 200f888: da 01 20 04 ld [ %g4 + 4 ], %o5 200f88c: da 23 e0 04 st %o5, [ %o7 + 4 ] if (c->child[dir]) 200f890: c8 01 20 04 ld [ %g4 + 4 ], %g4 200f894: 80 a1 20 00 cmp %g4, 0 200f898: 32 80 00 02 bne,a 200f8a0 <_RBTree_Extract_validate_unprotected+0x2c8> 200f89c: c2 21 00 00 st %g1, [ %g4 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200f8a0: c8 00 40 00 ld [ %g1 ], %g4 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200f8a4: 86 00 80 03 add %g2, %g3, %g3 200f8a8: c2 20 e0 04 st %g1, [ %g3 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200f8ac: c6 01 20 04 ld [ %g4 + 4 ], %g3 c->parent = the_node->parent; 200f8b0: c8 20 80 00 st %g4, [ %g2 ] the_node->parent = c; 200f8b4: 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; 200f8b8: 86 18 40 03 xor %g1, %g3, %g3 200f8bc: 80 a0 00 03 cmp %g0, %g3 200f8c0: 82 40 20 00 addx %g0, 0, %g1 200f8c4: 83 28 60 02 sll %g1, 2, %g1 200f8c8: 88 01 00 01 add %g4, %g1, %g4 sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200f8cc: c2 06 00 00 ld [ %i0 ], %g1 200f8d0: c4 21 20 04 st %g2, [ %g4 + 4 ] 200f8d4: c2 00 40 00 ld [ %g1 ], %g1 200f8d8: 80 a0 60 00 cmp %g1, 0 200f8dc: 22 bf ff a8 be,a 200f77c <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN 200f8e0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 200f8e4: 81 c7 e0 08 ret 200f8e8: 81 e8 00 00 restore =============================================================================== 0200acd0 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 200acd0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 200acd4: 7f ff e3 e7 call 2003c70 200acd8: b8 10 00 18 mov %i0, %i4 200acdc: 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; 200ace0: f6 06 20 04 ld [ %i0 + 4 ], %i3 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200ace4: 80 a6 e0 00 cmp %i3, 0 200ace8: 02 80 00 15 be 200ad3c <_RBTree_Find+0x6c> <== NEVER TAKEN 200acec: b0 10 20 00 clr %i0 compare_result = the_rbtree->compare_function(the_node, iter_node); 200acf0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200acf4: 92 10 00 1b mov %i3, %o1 200acf8: 9f c0 40 00 call %g1 200acfc: 90 10 00 19 mov %i1, %o0 if (compare_result == 0) { 200ad00: 80 a2 20 00 cmp %o0, 0 200ad04: 12 80 00 06 bne 200ad1c <_RBTree_Find+0x4c> 200ad08: 82 1a 20 01 xor %o0, 1, %g1 found = iter_node; if ( the_rbtree->is_unique ) 200ad0c: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2 200ad10: 80 a0 a0 00 cmp %g2, 0 200ad14: 12 80 00 0e bne 200ad4c <_RBTree_Find+0x7c> 200ad18: b0 10 00 1b mov %i3, %i0 break; } RBTree_Direction dir = (compare_result == 1); 200ad1c: 80 a0 00 01 cmp %g0, %g1 200ad20: 82 60 3f ff subx %g0, -1, %g1 iter_node = iter_node->child[dir]; 200ad24: 83 28 60 02 sll %g1, 2, %g1 200ad28: b6 06 c0 01 add %i3, %g1, %i3 200ad2c: f6 06 e0 04 ld [ %i3 + 4 ], %i3 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200ad30: 80 a6 e0 00 cmp %i3, 0 200ad34: 32 bf ff f0 bne,a 200acf4 <_RBTree_Find+0x24> 200ad38: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 200ad3c: 7f ff e3 d1 call 2003c80 200ad40: 90 10 00 1d mov %i5, %o0 return return_node; } 200ad44: 81 c7 e0 08 ret 200ad48: 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 ); 200ad4c: 7f ff e3 cd call 2003c80 200ad50: 90 10 00 1d mov %i5, %o0 return return_node; } 200ad54: 81 c7 e0 08 ret 200ad58: 81 e8 00 00 restore =============================================================================== 0200b048 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200b048: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200b04c: 80 a6 20 00 cmp %i0, 0 200b050: 02 80 00 0f be 200b08c <_RBTree_Initialize+0x44> <== NEVER TAKEN 200b054: 80 a6 e0 00 cmp %i3, 0 RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200b058: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200b05c: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200b060: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200b064: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200b068: 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-- ) { 200b06c: 02 80 00 08 be 200b08c <_RBTree_Initialize+0x44> <== NEVER TAKEN 200b070: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 200b074: 92 10 00 1a mov %i2, %o1 200b078: 7f ff ff ef call 200b034 <_RBTree_Insert> 200b07c: 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-- ) { 200b080: b6 86 ff ff addcc %i3, -1, %i3 200b084: 12 bf ff fc bne 200b074 <_RBTree_Initialize+0x2c> 200b088: b4 06 80 1c add %i2, %i4, %i2 200b08c: 81 c7 e0 08 ret 200b090: 81 e8 00 00 restore =============================================================================== 0200fb0c <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 200fb0c: 9d e3 bf a0 save %sp, -96, %sp /* 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; g->color = RBT_RED; 200fb10: c2 06 00 00 ld [ %i0 ], %g1 } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 200fb14: 96 10 20 01 mov 1, %o3 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200fb18: c4 00 40 00 ld [ %g1 ], %g2 200fb1c: 86 90 a0 00 orcc %g2, 0, %g3 200fb20: 22 80 00 06 be,a 200fb38 <_RBTree_Validate_insert_unprotected+0x2c> 200fb24: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200fb28: c8 00 60 0c ld [ %g1 + 0xc ], %g4 200fb2c: 80 a1 20 01 cmp %g4, 1 200fb30: 22 80 00 04 be,a 200fb40 <_RBTree_Validate_insert_unprotected+0x34> 200fb34: d8 00 80 00 ld [ %g2 ], %o4 200fb38: 81 c7 e0 08 ret 200fb3c: 81 e8 00 00 restore ) { 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; 200fb40: 80 a3 20 00 cmp %o4, 0 200fb44: 02 80 00 0c be 200fb74 <_RBTree_Validate_insert_unprotected+0x68><== NEVER TAKEN 200fb48: de 00 a0 04 ld [ %g2 + 4 ], %o7 { 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]) 200fb4c: 80 a3 c0 01 cmp %o7, %g1 200fb50: 02 80 00 5a be 200fcb8 <_RBTree_Validate_insert_unprotected+0x1ac> 200fb54: 88 10 00 0f mov %o7, %g4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200fb58: 80 a1 20 00 cmp %g4, 0 200fb5c: 22 80 00 07 be,a 200fb78 <_RBTree_Validate_insert_unprotected+0x6c> 200fb60: c8 00 60 04 ld [ %g1 + 4 ], %g4 200fb64: da 01 20 0c ld [ %g4 + 0xc ], %o5 200fb68: 80 a3 60 01 cmp %o5, 1 200fb6c: 22 80 00 4c be,a 200fc9c <_RBTree_Validate_insert_unprotected+0x190> 200fb70: c0 20 60 0c clr [ %g1 + 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]; 200fb74: c8 00 60 04 ld [ %g1 + 4 ], %g4 RBTree_Direction pdir = the_node->parent != g->child[0]; 200fb78: 9e 1b c0 01 xor %o7, %g1, %o7 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]; 200fb7c: 88 19 00 18 xor %g4, %i0, %g4 200fb80: 80 a0 00 04 cmp %g0, %g4 200fb84: 9a 40 20 00 addx %g0, 0, %o5 RBTree_Direction pdir = the_node->parent != g->child[0]; 200fb88: 80 a0 00 0f cmp %g0, %o7 200fb8c: 88 40 20 00 addx %g0, 0, %g4 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 200fb90: 80 a3 40 04 cmp %o5, %g4 200fb94: 02 80 00 47 be 200fcb0 <_RBTree_Validate_insert_unprotected+0x1a4> 200fb98: 98 22 c0 0d sub %o3, %o5, %o4 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 200fb9c: 98 22 c0 04 sub %o3, %g4, %o4 200fba0: 9b 2b 20 02 sll %o4, 2, %o5 200fba4: 9a 00 40 0d add %g1, %o5, %o5 200fba8: de 03 60 04 ld [ %o5 + 4 ], %o7 200fbac: 80 a3 e0 00 cmp %o7, 0 200fbb0: 02 80 00 16 be 200fc08 <_RBTree_Validate_insert_unprotected+0xfc><== NEVER TAKEN 200fbb4: 89 29 20 02 sll %g4, 2, %g4 c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 200fbb8: 94 03 c0 04 add %o7, %g4, %o2 200fbbc: d2 02 a0 04 ld [ %o2 + 4 ], %o1 200fbc0: d2 23 60 04 st %o1, [ %o5 + 4 ] if (c->child[dir]) 200fbc4: da 02 a0 04 ld [ %o2 + 4 ], %o5 200fbc8: 80 a3 60 00 cmp %o5, 0 200fbcc: 22 80 00 05 be,a 200fbe0 <_RBTree_Validate_insert_unprotected+0xd4> 200fbd0: 9a 03 c0 04 add %o7, %g4, %o5 c->child[dir]->parent = the_node; 200fbd4: c2 23 40 00 st %g1, [ %o5 ] 200fbd8: c4 00 40 00 ld [ %g1 ], %g2 c->child[dir] = the_node; 200fbdc: 9a 03 c0 04 add %o7, %g4, %o5 200fbe0: c2 23 60 04 st %g1, [ %o5 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200fbe4: da 00 a0 04 ld [ %g2 + 4 ], %o5 c->parent = the_node->parent; 200fbe8: c4 23 c0 00 st %g2, [ %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; 200fbec: 9a 1b 40 01 xor %o5, %g1, %o5 c->parent = the_node->parent; the_node->parent = c; 200fbf0: de 20 40 00 st %o7, [ %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; 200fbf4: 80 a0 00 0d cmp %g0, %o5 200fbf8: 82 40 20 00 addx %g0, 0, %g1 200fbfc: 83 28 60 02 sll %g1, 2, %g1 200fc00: 84 00 80 01 add %g2, %g1, %g2 200fc04: de 20 a0 04 st %o7, [ %g2 + 4 ] _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 200fc08: b0 06 00 04 add %i0, %g4, %i0 200fc0c: f0 06 20 04 ld [ %i0 + 4 ], %i0 200fc10: c2 06 00 00 ld [ %i0 ], %g1 } the_node->parent->color = RBT_BLACK; 200fc14: c0 20 60 0c clr [ %g1 + 0xc ] RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 200fc18: 88 00 c0 04 add %g3, %g4, %g4 200fc1c: c4 01 20 04 ld [ %g4 + 4 ], %g2 200fc20: 80 a0 a0 00 cmp %g2, 0 200fc24: 02 bf ff bd be 200fb18 <_RBTree_Validate_insert_unprotected+0xc><== NEVER TAKEN 200fc28: d6 20 e0 0c st %o3, [ %g3 + 0xc ] c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 200fc2c: 99 2b 20 02 sll %o4, 2, %o4 200fc30: 82 00 80 0c add %g2, %o4, %g1 200fc34: de 00 60 04 ld [ %g1 + 4 ], %o7 200fc38: de 21 20 04 st %o7, [ %g4 + 4 ] if (c->child[dir]) 200fc3c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200fc40: 80 a0 60 00 cmp %g1, 0 200fc44: 32 80 00 02 bne,a 200fc4c <_RBTree_Validate_insert_unprotected+0x140> 200fc48: c6 20 40 00 st %g3, [ %g1 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200fc4c: c8 00 c0 00 ld [ %g3 ], %g4 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200fc50: 98 00 80 0c add %g2, %o4, %o4 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; 200fc54: c8 20 80 00 st %g4, [ %g2 ] the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200fc58: c6 23 20 04 st %g3, [ %o4 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200fc5c: de 01 20 04 ld [ %g4 + 4 ], %o7 c->parent = the_node->parent; the_node->parent = c; 200fc60: c4 20 c0 00 st %g2, [ %g3 ] 200fc64: c2 06 00 00 ld [ %i0 ], %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; 200fc68: 86 1b c0 03 xor %o7, %g3, %g3 200fc6c: 80 a0 00 03 cmp %g0, %g3 200fc70: 86 40 20 00 addx %g0, 0, %g3 200fc74: 87 28 e0 02 sll %g3, 2, %g3 200fc78: 88 01 00 03 add %g4, %g3, %g4 200fc7c: c4 21 20 04 st %g2, [ %g4 + 4 ] */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200fc80: c4 00 40 00 ld [ %g1 ], %g2 200fc84: 86 90 a0 00 orcc %g2, 0, %g3 200fc88: 32 bf ff a9 bne,a 200fb2c <_RBTree_Validate_insert_unprotected+0x20><== ALWAYS TAKEN 200fc8c: c8 00 60 0c ld [ %g1 + 0xc ], %g4 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200fc90: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 200fc94: 81 c7 e0 08 ret <== NOT EXECUTED 200fc98: 81 e8 00 00 restore <== NOT EXECUTED 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; 200fc9c: c0 21 20 0c clr [ %g4 + 0xc ] g->color = RBT_RED; 200fca0: da 20 a0 0c st %o5, [ %g2 + 0xc ] 200fca4: 82 10 00 0c mov %o4, %g1 200fca8: 10 bf ff 9c b 200fb18 <_RBTree_Validate_insert_unprotected+0xc> 200fcac: b0 10 00 02 mov %g2, %i0 200fcb0: 10 bf ff d9 b 200fc14 <_RBTree_Validate_insert_unprotected+0x108> 200fcb4: 89 2b 60 02 sll %o5, 2, %g4 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]; 200fcb8: 10 bf ff a8 b 200fb58 <_RBTree_Validate_insert_unprotected+0x4c> 200fcbc: c8 00 a0 08 ld [ %g2 + 8 ], %g4 =============================================================================== 02007698 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 2007698: 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; 200769c: 03 00 80 79 sethi %hi(0x201e400), %g1 20076a0: 82 10 63 a8 or %g1, 0x3a8, %g1 ! 201e7a8 20076a4: 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 ) 20076a8: 80 a7 60 00 cmp %i5, 0 20076ac: 02 80 00 18 be 200770c <_RTEMS_tasks_Initialize_user_tasks_body+0x74> 20076b0: 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++ ) { 20076b4: 80 a6 e0 00 cmp %i3, 0 20076b8: 02 80 00 15 be 200770c <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN 20076bc: b8 10 20 00 clr %i4 return_value = rtems_task_create( 20076c0: d4 07 60 04 ld [ %i5 + 4 ], %o2 20076c4: d0 07 40 00 ld [ %i5 ], %o0 20076c8: d2 07 60 08 ld [ %i5 + 8 ], %o1 20076cc: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 20076d0: d8 07 60 0c ld [ %i5 + 0xc ], %o4 20076d4: 7f ff ff 70 call 2007494 20076d8: 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 ) ) 20076dc: 94 92 20 00 orcc %o0, 0, %o2 20076e0: 12 80 00 0d bne 2007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 20076e4: d0 07 bf fc ld [ %fp + -4 ], %o0 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 20076e8: d4 07 60 18 ld [ %i5 + 0x18 ], %o2 20076ec: 40 00 00 0e call 2007724 20076f0: 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 ) ) 20076f4: 94 92 20 00 orcc %o0, 0, %o2 20076f8: 12 80 00 07 bne 2007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 20076fc: b8 07 20 01 inc %i4 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2007700: 80 a7 00 1b cmp %i4, %i3 2007704: 12 bf ff ef bne 20076c0 <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN 2007708: ba 07 60 1c add %i5, 0x1c, %i5 200770c: 81 c7 e0 08 ret 2007710: 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 ); 2007714: 90 10 20 01 mov 1, %o0 2007718: 40 00 04 3d call 200880c <_Internal_error_Occurred> 200771c: 92 10 20 01 mov 1, %o1 =============================================================================== 0200e0f8 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200e0f8: c2 02 21 64 ld [ %o0 + 0x164 ], %g1 while (tvp) { 200e0fc: 80 a0 60 00 cmp %g1, 0 200e100: 22 80 00 0c be,a 200e130 <_RTEMS_tasks_Switch_extension+0x38> 200e104: c2 02 61 64 ld [ %o1 + 0x164 ], %g1 tvp->tval = *tvp->ptr; 200e108: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200e10c: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200e110: c8 00 80 00 ld [ %g2 ], %g4 200e114: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; 200e118: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200e11c: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200e120: 80 a0 60 00 cmp %g1, 0 200e124: 32 bf ff fa bne,a 200e10c <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN 200e128: 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; 200e12c: c2 02 61 64 ld [ %o1 + 0x164 ], %g1 while (tvp) { 200e130: 80 a0 60 00 cmp %g1, 0 200e134: 02 80 00 0b be 200e160 <_RTEMS_tasks_Switch_extension+0x68> 200e138: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200e13c: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200e140: 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; 200e144: c8 00 80 00 ld [ %g2 ], %g4 200e148: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; 200e14c: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200e150: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200e154: 80 a0 60 00 cmp %g1, 0 200e158: 32 bf ff fa bne,a 200e140 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN 200e15c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 200e160: 81 c3 e0 08 retl =============================================================================== 02007d6c <_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 ) { 2007d6c: 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; 2007d70: 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 ); 2007d74: 40 00 07 43 call 2009a80 <_TOD_Get_uptime> 2007d78: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2007d7c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 _Timestamp_Subtract( 2007d80: 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) { 2007d84: 03 00 80 86 sethi %hi(0x2021800), %g1 2007d88: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information> 2007d8c: c8 00 60 0c ld [ %g1 + 0xc ], %g4 2007d90: 9a a0 c0 0d subcc %g3, %o5, %o5 2007d94: 98 60 80 0c subx %g2, %o4, %o4 2007d98: d8 3e 40 00 std %o4, [ %i1 ] 2007d9c: 80 a1 00 1d cmp %g4, %i5 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 2007da0: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2007da4: 02 80 00 05 be 2007db8 <_Rate_monotonic_Get_status+0x4c> 2007da8: b2 10 20 01 mov 1, %i1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 2007dac: b0 0e 60 01 and %i1, 1, %i0 2007db0: 81 c7 e0 08 ret 2007db4: 81 e8 00 00 restore 2007db8: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007dbc: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0 2007dc0: 86 a0 c0 0b subcc %g3, %o3, %g3 2007dc4: 84 60 80 0a subx %g2, %o2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2007dc8: 86 83 40 03 addcc %o5, %g3, %g3 2007dcc: 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)) 2007dd0: 80 a6 00 02 cmp %i0, %g2 2007dd4: 34 bf ff f6 bg,a 2007dac <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN 2007dd8: b2 10 20 00 clr %i1 <== NOT EXECUTED 2007ddc: 02 80 00 09 be 2007e00 <_Rate_monotonic_Get_status+0x94> <== ALWAYS TAKEN 2007de0: 80 a6 40 03 cmp %i1, %g3 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2007de4: 86 a0 c0 19 subcc %g3, %i1, %g3 <== NOT EXECUTED if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 2007de8: b2 10 20 01 mov 1, %i1 2007dec: 84 60 80 18 subx %g2, %i0, %g2 } 2007df0: b0 0e 60 01 and %i1, 1, %i0 2007df4: c4 3e 80 00 std %g2, [ %i2 ] 2007df8: 81 c7 e0 08 ret 2007dfc: 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)) 2007e00: 28 bf ff fa bleu,a 2007de8 <_Rate_monotonic_Get_status+0x7c> 2007e04: 86 a0 c0 19 subcc %g3, %i1, %g3 return false; 2007e08: 10 bf ff e9 b 2007dac <_Rate_monotonic_Get_status+0x40> 2007e0c: b2 10 20 00 clr %i1 =============================================================================== 02008560 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2008560: 9d e3 bf 98 save %sp, -104, %sp 2008564: 11 00 80 84 sethi %hi(0x2021000), %o0 2008568: 92 10 00 18 mov %i0, %o1 200856c: 90 12 23 d4 or %o0, 0x3d4, %o0 2008570: 40 00 08 6c call 200a720 <_Objects_Get> 2008574: 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 ) { 2008578: c2 07 bf fc ld [ %fp + -4 ], %g1 200857c: 80 a0 60 00 cmp %g1, 0 2008580: 12 80 00 17 bne 20085dc <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN 2008584: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 2008588: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 200858c: 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); 2008590: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2008594: 80 88 80 01 btst %g2, %g1 2008598: 22 80 00 08 be,a 20085b8 <_Rate_monotonic_Timeout+0x58> 200859c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 20085a0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 20085a4: c2 07 60 08 ld [ %i5 + 8 ], %g1 20085a8: 80 a0 80 01 cmp %g2, %g1 20085ac: 02 80 00 1a be 2008614 <_Rate_monotonic_Timeout+0xb4> 20085b0: 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 ) { 20085b4: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 20085b8: 80 a0 60 01 cmp %g1, 1 20085bc: 02 80 00 0a be 20085e4 <_Rate_monotonic_Timeout+0x84> 20085c0: 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; 20085c4: 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--; 20085c8: 03 00 80 85 sethi %hi(0x2021400), %g1 20085cc: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2021540 <_Thread_Dispatch_disable_level> 20085d0: 84 00 bf ff add %g2, -1, %g2 20085d4: c4 20 61 40 st %g2, [ %g1 + 0x140 ] return _Thread_Dispatch_disable_level; 20085d8: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 20085dc: 81 c7 e0 08 ret 20085e0: 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; 20085e4: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 20085e8: 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; 20085ec: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 20085f0: 7f ff fe 08 call 2007e10 <_Rate_monotonic_Initiate_statistics> 20085f4: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20085f8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20085fc: 11 00 80 85 sethi %hi(0x2021400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2008600: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2008604: 90 12 22 00 or %o0, 0x200, %o0 2008608: 40 00 10 28 call 200c6a8 <_Watchdog_Insert> 200860c: 92 07 60 10 add %i5, 0x10, %o1 2008610: 30 bf ff ee b,a 20085c8 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2008614: 40 00 0b 5f call 200b390 <_Thread_Clear_state> 2008618: 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 ); 200861c: 10 bf ff f5 b 20085f0 <_Rate_monotonic_Timeout+0x90> 2008620: 90 10 00 1d mov %i5, %o0 =============================================================================== 02007e94 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 2007e94: 9d e3 bf 98 save %sp, -104, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2007e98: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2007e9c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2007ea0: 84 00 a0 01 inc %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2007ea4: 80 a0 60 04 cmp %g1, 4 2007ea8: 02 80 00 4b be 2007fd4 <_Rate_monotonic_Update_statistics+0x140> 2007eac: c4 26 20 58 st %g2, [ %i0 + 0x58 ] ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 2007eb0: f6 06 20 40 ld [ %i0 + 0x40 ], %i3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2007eb4: 40 00 06 f3 call 2009a80 <_TOD_Get_uptime> 2007eb8: 90 07 bf f8 add %fp, -8, %o0 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2007ebc: 03 00 80 86 sethi %hi(0x2021800), %g1 2007ec0: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information> 2007ec4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007ec8: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007ecc: d4 1f bf f8 ldd [ %fp + -8 ], %o2 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2007ed0: 80 a6 c0 02 cmp %i3, %g2 2007ed4: 02 80 00 4e be 200800c <_Rate_monotonic_Update_statistics+0x178><== ALWAYS TAKEN 2007ed8: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4 2007edc: c4 1e 20 70 ldd [ %i0 + 0x70 ], %g2 * 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 ) ) 2007ee0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2007ee4: 86 80 c0 1d addcc %g3, %i5, %g3 2007ee8: 84 40 80 1c addx %g2, %i4, %g2 2007eec: 80 a0 40 1c cmp %g1, %i4 2007ef0: 04 80 00 1d ble 2007f64 <_Rate_monotonic_Update_statistics+0xd0> 2007ef4: c4 3e 20 70 std %g2, [ %i0 + 0x70 ] stats->min_cpu_time = executed; 2007ef8: f8 3e 20 60 std %i4, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2007efc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 2007f00: 80 a0 40 1c cmp %g1, %i4 2007f04: 26 80 00 05 bl,a 2007f18 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN 2007f08: f8 3e 20 68 std %i4, [ %i0 + 0x68 ] <== NOT EXECUTED 2007f0c: 80 a0 40 1c cmp %g1, %i4 2007f10: 22 80 00 2c be,a 2007fc0 <_Rate_monotonic_Update_statistics+0x12c><== ALWAYS TAKEN 2007f14: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 2007f18: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4 * 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 ) ) 2007f1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2007f20: 86 a2 c0 09 subcc %o3, %o1, %g3 2007f24: 84 62 80 08 subx %o2, %o0, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2007f28: ba 87 40 03 addcc %i5, %g3, %i5 2007f2c: b8 47 00 02 addx %i4, %g2, %i4 2007f30: 80 a0 40 02 cmp %g1, %g2 2007f34: 14 80 00 1e bg 2007fac <_Rate_monotonic_Update_statistics+0x118> 2007f38: f8 3e 20 88 std %i4, [ %i0 + 0x88 ] 2007f3c: 80 a0 40 02 cmp %g1, %g2 2007f40: 22 80 00 18 be,a 2007fa0 <_Rate_monotonic_Update_statistics+0x10c><== ALWAYS TAKEN 2007f44: 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 ) ) 2007f48: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2007f4c: 80 a0 40 02 cmp %g1, %g2 2007f50: 16 80 00 0d bge 2007f84 <_Rate_monotonic_Update_statistics+0xf0><== ALWAYS TAKEN 2007f54: 01 00 00 00 nop stats->max_wall_time = since_last_period; 2007f58: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 2007f5c: 81 c7 e0 08 ret 2007f60: 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 ) ) 2007f64: 32 bf ff e7 bne,a 2007f00 <_Rate_monotonic_Update_statistics+0x6c><== NEVER TAKEN 2007f68: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 2007f6c: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 2007f70: 80 a0 40 1d cmp %g1, %i5 2007f74: 28 bf ff e3 bleu,a 2007f00 <_Rate_monotonic_Update_statistics+0x6c> 2007f78: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 2007f7c: 10 bf ff e0 b 2007efc <_Rate_monotonic_Update_statistics+0x68> 2007f80: f8 3e 20 60 std %i4, [ %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 ) ) 2007f84: 12 bf ff f6 bne 2007f5c <_Rate_monotonic_Update_statistics+0xc8><== NEVER TAKEN 2007f88: 01 00 00 00 nop 2007f8c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2007f90: 80 a0 40 03 cmp %g1, %g3 2007f94: 2a bf ff f2 bcs,a 2007f5c <_Rate_monotonic_Update_statistics+0xc8> 2007f98: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 2007f9c: 30 bf ff f0 b,a 2007f5c <_Rate_monotonic_Update_statistics+0xc8> * 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 ) ) 2007fa0: 80 a0 40 03 cmp %g1, %g3 2007fa4: 28 bf ff ea bleu,a 2007f4c <_Rate_monotonic_Update_statistics+0xb8> 2007fa8: 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 ) ) 2007fac: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2007fb0: 80 a0 40 02 cmp %g1, %g2 2007fb4: 06 bf ff e9 bl 2007f58 <_Rate_monotonic_Update_statistics+0xc4><== NEVER TAKEN 2007fb8: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] 2007fbc: 30 bf ff f2 b,a 2007f84 <_Rate_monotonic_Update_statistics+0xf0> _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 ) ) 2007fc0: 80 a0 40 1d cmp %g1, %i5 2007fc4: 3a bf ff d6 bcc,a 2007f1c <_Rate_monotonic_Update_statistics+0x88> 2007fc8: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4 stats->max_cpu_time = executed; 2007fcc: 10 bf ff d3 b 2007f18 <_Rate_monotonic_Update_statistics+0x84> 2007fd0: f8 3e 20 68 std %i4, [ %i0 + 0x68 ] */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 2007fd4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 2007fd8: f6 06 20 40 ld [ %i0 + 0x40 ], %i3 */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 2007fdc: 82 00 60 01 inc %g1 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2007fe0: 90 07 bf f8 add %fp, -8, %o0 2007fe4: 40 00 06 a7 call 2009a80 <_TOD_Get_uptime> 2007fe8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2007fec: 03 00 80 86 sethi %hi(0x2021800), %g1 2007ff0: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information> 2007ff4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007ff8: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007ffc: d4 1f bf f8 ldd [ %fp + -8 ], %o2 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2008000: 80 a6 c0 02 cmp %i3, %g2 2008004: 12 bf ff b6 bne 2007edc <_Rate_monotonic_Update_statistics+0x48><== NEVER TAKEN 2008008: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200800c: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2008010: f8 1e 20 48 ldd [ %i0 + 0x48 ], %i4 2008014: 86 a2 c0 03 subcc %o3, %g3, %g3 2008018: 84 62 80 02 subx %o2, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200801c: 86 83 40 03 addcc %o5, %g3, %g3 2008020: 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)) 2008024: 80 a7 00 02 cmp %i4, %g2 2008028: 14 bf ff cd bg 2007f5c <_Rate_monotonic_Update_statistics+0xc8><== NEVER TAKEN 200802c: 01 00 00 00 nop 2008030: 02 80 00 05 be 2008044 <_Rate_monotonic_Update_statistics+0x1b0> 2008034: 80 a7 40 03 cmp %i5, %g3 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2008038: ba a0 c0 1d subcc %g3, %i5, %i5 200803c: 10 bf ff a8 b 2007edc <_Rate_monotonic_Update_statistics+0x48> 2008040: b8 60 80 1c subx %g2, %i4, %i4 2008044: 18 bf ff c6 bgu 2007f5c <_Rate_monotonic_Update_statistics+0xc8> 2008048: ba a0 c0 1d subcc %g3, %i5, %i5 200804c: 10 bf ff a4 b 2007edc <_Rate_monotonic_Update_statistics+0x48> 2008050: b8 60 80 1c subx %g2, %i4, %i4 =============================================================================== 0200b1d8 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200b1d8: 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; 200b1dc: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200b1e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b1e4: 80 a0 40 09 cmp %g1, %o1 200b1e8: 32 80 00 02 bne,a 200b1f0 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200b1ec: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200b1f0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200b1f4: 80 a0 40 09 cmp %g1, %o1 200b1f8: 02 80 00 04 be 200b208 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200b1fc: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200b200: 40 00 01 a0 call 200b880 <_Thread_Change_priority> 200b204: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200b208: f0 06 20 88 ld [ %i0 + 0x88 ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200b20c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b210: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200b214: 80 a0 a0 00 cmp %g2, 0 200b218: 02 80 00 09 be 200b23c <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200b21c: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200b220: d0 00 40 00 ld [ %g1 ], %o0 200b224: 7f ff ff d1 call 200b168 <_Scheduler_CBS_Get_server_id> 200b228: 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 ); 200b22c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b230: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200b234: 9f c0 40 00 call %g1 200b238: d0 07 bf fc ld [ %fp + -4 ], %o0 200b23c: 81 c7 e0 08 ret 200b240: 81 e8 00 00 restore =============================================================================== 0200ad40 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { 200ad40: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200ad44: 39 00 80 88 sethi %hi(0x2022000), %i4 200ad48: c2 07 20 64 ld [ %i4 + 0x64 ], %g1 ! 2022064 <_Scheduler_CBS_Maximum_servers> 200ad4c: 80 a0 60 00 cmp %g1, 0 200ad50: 02 80 00 18 be 200adb0 <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN 200ad54: 03 00 80 8c sethi %hi(0x2023000), %g1 200ad58: 37 00 80 8c sethi %hi(0x2023000), %i3 200ad5c: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2 ! 20232b8 <_Scheduler_CBS_Server_list> 200ad60: ba 10 20 00 clr %i5 200ad64: b8 17 20 64 or %i4, 0x64, %i4 if ( _Scheduler_CBS_Server_list[ i ] ) 200ad68: 83 2f 60 02 sll %i5, 2, %g1 200ad6c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200ad70: 80 a0 60 00 cmp %g1, 0 200ad74: 02 80 00 05 be 200ad88 <_Scheduler_CBS_Cleanup+0x48> 200ad78: 90 10 00 1d mov %i5, %o0 _Scheduler_CBS_Destroy_server( i ); 200ad7c: 40 00 00 45 call 200ae90 <_Scheduler_CBS_Destroy_server> 200ad80: 01 00 00 00 nop 200ad84: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200ad88: c2 07 00 00 ld [ %i4 ], %g1 200ad8c: ba 07 60 01 inc %i5 200ad90: 80 a0 40 1d cmp %g1, %i5 200ad94: 18 bf ff f6 bgu 200ad6c <_Scheduler_CBS_Cleanup+0x2c> 200ad98: 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; } 200ad9c: 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 ); 200ada0: 40 00 08 73 call 200cf6c <_Workspace_Free> 200ada4: 90 10 00 02 mov %g2, %o0 return SCHEDULER_CBS_OK; } 200ada8: 81 c7 e0 08 ret 200adac: 81 e8 00 00 restore int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200adb0: 10 bf ff fb b 200ad9c <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED 200adb4: c4 00 62 b8 ld [ %g1 + 0x2b8 ], %g2 <== NOT EXECUTED =============================================================================== 0200adb8 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200adb8: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200adbc: 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 ) { 200adc0: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200adc4: 80 a0 60 00 cmp %g1, 0 200adc8: 04 80 00 30 ble 200ae88 <_Scheduler_CBS_Create_server+0xd0> 200adcc: b0 10 3f ee mov -18, %i0 200add0: c2 07 40 00 ld [ %i5 ], %g1 200add4: 80 a0 60 00 cmp %g1, 0 200add8: 04 80 00 2c ble 200ae88 <_Scheduler_CBS_Create_server+0xd0> 200addc: 03 00 80 88 sethi %hi(0x2022000), %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++ ) { 200ade0: c6 00 60 64 ld [ %g1 + 0x64 ], %g3 ! 2022064 <_Scheduler_CBS_Maximum_servers> 200ade4: 80 a0 e0 00 cmp %g3, 0 200ade8: 02 80 00 28 be 200ae88 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200adec: b0 10 3f e6 mov -26, %i0 if ( !_Scheduler_CBS_Server_list[i] ) 200adf0: 37 00 80 8c sethi %hi(0x2023000), %i3 200adf4: f8 06 e2 b8 ld [ %i3 + 0x2b8 ], %i4 ! 20232b8 <_Scheduler_CBS_Server_list> 200adf8: c2 07 00 00 ld [ %i4 ], %g1 200adfc: 80 a0 60 00 cmp %g1, 0 200ae00: 02 80 00 0e be 200ae38 <_Scheduler_CBS_Create_server+0x80> 200ae04: 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++ ) { 200ae08: 10 80 00 07 b 200ae24 <_Scheduler_CBS_Create_server+0x6c> 200ae0c: 82 00 60 01 inc %g1 if ( !_Scheduler_CBS_Server_list[i] ) 200ae10: c4 07 00 18 ld [ %i4 + %i0 ], %g2 200ae14: 80 a0 a0 00 cmp %g2, 0 200ae18: 22 80 00 0a be,a 200ae40 <_Scheduler_CBS_Create_server+0x88> 200ae1c: 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++ ) { 200ae20: 82 00 60 01 inc %g1 200ae24: 80 a0 40 03 cmp %g1, %g3 200ae28: 12 bf ff fa bne 200ae10 <_Scheduler_CBS_Create_server+0x58> 200ae2c: 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; 200ae30: 81 c7 e0 08 ret 200ae34: 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] ) 200ae38: b0 10 20 00 clr %i0 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200ae3c: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200ae40: 40 00 08 43 call 200cf4c <_Workspace_Allocate> 200ae44: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200ae48: 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 *) 200ae4c: d0 27 00 18 st %o0, [ %i4 + %i0 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200ae50: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2 200ae54: 83 28 60 02 sll %g1, 2, %g1 200ae58: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200ae5c: 80 a0 60 00 cmp %g1, 0 200ae60: 02 80 00 0a be 200ae88 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200ae64: b0 10 3f ef mov -17, %i0 return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200ae68: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200ae6c: 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; 200ae70: c4 20 60 04 st %g2, [ %g1 + 4 ] 200ae74: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200ae78: 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; 200ae7c: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200ae80: 84 10 3f ff mov -1, %g2 200ae84: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 200ae88: 81 c7 e0 08 ret 200ae8c: 81 e8 00 00 restore =============================================================================== 0200af00 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200af00: 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); 200af04: 92 07 bf fc add %fp, -4, %o1 200af08: 40 00 03 a8 call 200bda8 <_Thread_Get> 200af0c: 90 10 00 19 mov %i1, %o0 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200af10: ba 92 20 00 orcc %o0, 0, %i5 200af14: 22 80 00 05 be,a 200af28 <_Scheduler_CBS_Detach_thread+0x28> 200af18: 03 00 80 88 sethi %hi(0x2022000), %g1 _Thread_Enable_dispatch(); 200af1c: 40 00 03 96 call 200bd74 <_Thread_Enable_dispatch> 200af20: 01 00 00 00 nop } if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 200af24: 03 00 80 88 sethi %hi(0x2022000), %g1 200af28: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 2022064 <_Scheduler_CBS_Maximum_servers> 200af2c: 80 a0 80 18 cmp %g2, %i0 200af30: 08 80 00 1b bleu 200af9c <_Scheduler_CBS_Detach_thread+0x9c> 200af34: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200af38: 80 a7 60 00 cmp %i5, 0 200af3c: 02 80 00 18 be 200af9c <_Scheduler_CBS_Detach_thread+0x9c> 200af40: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200af44: 03 00 80 8c sethi %hi(0x2023000), %g1 200af48: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 20232b8 <_Scheduler_CBS_Server_list> 200af4c: b1 2e 20 02 sll %i0, 2, %i0 200af50: c4 00 40 18 ld [ %g1 + %i0 ], %g2 200af54: 80 a0 a0 00 cmp %g2, 0 200af58: 02 80 00 11 be 200af9c <_Scheduler_CBS_Detach_thread+0x9c> 200af5c: 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 ) 200af60: c6 00 80 00 ld [ %g2 ], %g3 200af64: 80 a0 c0 19 cmp %g3, %i1 200af68: 12 80 00 0d bne 200af9c <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200af6c: 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; 200af70: 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; 200af74: 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; 200af78: 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; 200af7c: 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; 200af80: 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; 200af84: 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; 200af88: 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; 200af8c: 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; 200af90: c6 27 60 78 st %g3, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200af94: c4 27 60 7c st %g2, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; 200af98: 82 10 20 00 clr %g1 } 200af9c: 81 c7 e0 08 ret 200afa0: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200b168 <_Scheduler_CBS_Get_server_id>: int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200b168: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b16c: 03 00 80 88 sethi %hi(0x2022000), %g1 200b170: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 2022064 <_Scheduler_CBS_Maximum_servers> int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200b174: 84 10 00 18 mov %i0, %g2 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b178: 80 a0 60 00 cmp %g1, 0 200b17c: 02 80 00 13 be 200b1c8 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN 200b180: b0 10 3f e7 mov -25, %i0 200b184: 07 00 80 8c sethi %hi(0x2023000), %g3 200b188: de 00 e2 b8 ld [ %g3 + 0x2b8 ], %o7 ! 20232b8 <_Scheduler_CBS_Server_list> 200b18c: 86 10 20 00 clr %g3 #include #include #include #include int _Scheduler_CBS_Get_server_id ( 200b190: 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] && 200b194: c8 03 c0 04 ld [ %o7 + %g4 ], %g4 200b198: 80 a1 20 00 cmp %g4, 0 200b19c: 22 80 00 07 be,a 200b1b8 <_Scheduler_CBS_Get_server_id+0x50> 200b1a0: 86 00 e0 01 inc %g3 200b1a4: c8 01 00 00 ld [ %g4 ], %g4 200b1a8: 80 a1 00 02 cmp %g4, %g2 200b1ac: 22 80 00 09 be,a 200b1d0 <_Scheduler_CBS_Get_server_id+0x68> 200b1b0: 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++ ) { 200b1b4: 86 00 e0 01 inc %g3 200b1b8: 80 a0 c0 01 cmp %g3, %g1 200b1bc: 12 bf ff f6 bne 200b194 <_Scheduler_CBS_Get_server_id+0x2c> 200b1c0: 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; 200b1c4: b0 10 3f e7 mov -25, %i0 } 200b1c8: 81 c7 e0 08 ret 200b1cc: 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; 200b1d0: 81 c7 e0 08 ret 200b1d4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200b244 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200b244: 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*) ); 200b248: 3b 00 80 88 sethi %hi(0x2022000), %i5 200b24c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 ! 2022064 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200b250: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200b254: 40 00 07 3e call 200cf4c <_Workspace_Allocate> 200b258: 91 2a 20 02 sll %o0, 2, %o0 200b25c: 09 00 80 8c sethi %hi(0x2023000), %g4 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200b260: 80 a2 20 00 cmp %o0, 0 200b264: 02 80 00 0f be 200b2a0 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200b268: d0 21 22 b8 st %o0, [ %g4 + 0x2b8 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b26c: c6 07 60 64 ld [ %i5 + 0x64 ], %g3 200b270: 80 a0 e0 00 cmp %g3, 0 200b274: 02 80 00 0b be 200b2a0 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200b278: b0 10 20 00 clr %i0 200b27c: 10 80 00 03 b 200b288 <_Scheduler_CBS_Initialize+0x44> 200b280: 82 10 20 00 clr %g1 200b284: d0 01 22 b8 ld [ %g4 + 0x2b8 ], %o0 _Scheduler_CBS_Server_list[i] = NULL; 200b288: 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++) { 200b28c: 82 00 60 01 inc %g1 200b290: 80 a0 40 03 cmp %g1, %g3 200b294: 12 bf ff fc bne 200b284 <_Scheduler_CBS_Initialize+0x40> 200b298: c0 22 00 02 clr [ %o0 + %g2 ] _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200b29c: b0 10 20 00 clr %i0 } 200b2a0: 81 c7 e0 08 ret 200b2a4: 81 e8 00 00 restore =============================================================================== 02009cc8 <_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; 2009cc8: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 2009ccc: 80 a2 60 00 cmp %o1, 0 2009cd0: 02 80 00 11 be 2009d14 <_Scheduler_CBS_Release_job+0x4c> 2009cd4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 2009cd8: 80 a0 60 00 cmp %g1, 0 2009cdc: 02 80 00 13 be 2009d28 <_Scheduler_CBS_Release_job+0x60> 2009ce0: 07 00 80 84 sethi %hi(0x2021000), %g3 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 2009ce4: c4 00 60 04 ld [ %g1 + 4 ], %g2 2009ce8: d2 00 e1 60 ld [ %g3 + 0x160 ], %o1 2009cec: 92 02 40 02 add %o1, %g2, %o1 2009cf0: 05 20 00 00 sethi %hi(0x80000000), %g2 2009cf4: 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; 2009cf8: c2 00 60 08 ld [ %g1 + 8 ], %g1 2009cfc: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 2009d00: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 2009d04: 94 10 20 01 mov 1, %o2 2009d08: 82 13 c0 00 mov %o7, %g1 2009d0c: 40 00 01 4c call 200a23c <_Thread_Change_priority> 2009d10: 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) 2009d14: 80 a0 60 00 cmp %g1, 0 2009d18: 12 bf ff f8 bne 2009cf8 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN 2009d1c: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 2009d20: 10 bf ff f9 b 2009d04 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED 2009d24: 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) 2009d28: 03 00 80 84 sethi %hi(0x2021000), %g1 2009d2c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 2021160 <_Watchdog_Ticks_since_boot> 2009d30: 92 02 40 01 add %o1, %g1, %o1 2009d34: 03 20 00 00 sethi %hi(0x80000000), %g1 2009d38: 10 bf ff f2 b 2009d00 <_Scheduler_CBS_Release_job+0x38> 2009d3c: 92 2a 40 01 andn %o1, %g1, %o1 =============================================================================== 02009d40 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 2009d40: 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); 2009d44: 40 00 00 5b call 2009eb0 <_Scheduler_EDF_Enqueue> 2009d48: 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; 2009d4c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2009d50: 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) { 2009d54: 80 a7 60 00 cmp %i5, 0 2009d58: 02 80 00 19 be 2009dbc <_Scheduler_CBS_Unblock+0x7c> 2009d5c: 03 00 80 84 sethi %hi(0x2021000), %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 ) { 2009d60: 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 - 2009d64: d0 00 61 60 ld [ %g1 + 0x160 ], %o0 2009d68: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 2009d6c: 40 00 47 c1 call 201bc70 <.umul> 2009d70: 90 27 00 08 sub %i4, %o0, %o0 2009d74: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 2009d78: b6 10 00 08 mov %o0, %i3 2009d7c: 40 00 47 bd call 201bc70 <.umul> 2009d80: d0 07 60 08 ld [ %i5 + 8 ], %o0 2009d84: 80 a6 c0 08 cmp %i3, %o0 2009d88: 24 80 00 0e ble,a 2009dc0 <_Scheduler_CBS_Unblock+0x80> 2009d8c: 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; 2009d90: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 2009d94: 80 a7 00 09 cmp %i4, %o1 2009d98: 32 80 00 02 bne,a 2009da0 <_Scheduler_CBS_Unblock+0x60> 2009d9c: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 2009da0: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 2009da4: 80 a2 00 09 cmp %o0, %o1 2009da8: 02 80 00 07 be 2009dc4 <_Scheduler_CBS_Unblock+0x84> 2009dac: 3b 00 80 85 sethi %hi(0x2021400), %i5 _Thread_Change_priority(the_thread, new_priority, true); 2009db0: 90 10 00 18 mov %i0, %o0 2009db4: 40 00 01 22 call 200a23c <_Thread_Change_priority> 2009db8: 94 10 20 01 mov 1, %o2 2009dbc: 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, 2009dc0: 3b 00 80 85 sethi %hi(0x2021400), %i5 2009dc4: ba 17 61 90 or %i5, 0x190, %i5 ! 2021590 <_Per_CPU_Information> 2009dc8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2009dcc: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 2009dd0: 03 00 80 80 sethi %hi(0x2020000), %g1 2009dd4: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 2020398 <_Scheduler+0x30> 2009dd8: 9f c0 40 00 call %g1 2009ddc: 01 00 00 00 nop 2009de0: 80 a2 20 00 cmp %o0, 0 2009de4: 04 80 00 0a ble 2009e0c <_Scheduler_CBS_Unblock+0xcc> 2009de8: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009dec: 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; 2009df0: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 2009df4: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 2009df8: 80 a0 60 00 cmp %g1, 0 2009dfc: 22 80 00 06 be,a 2009e14 <_Scheduler_CBS_Unblock+0xd4> 2009e00: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2009e04: 82 10 20 01 mov 1, %g1 2009e08: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 2009e0c: 81 c7 e0 08 ret 2009e10: 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 || 2009e14: 80 a0 60 00 cmp %g1, 0 2009e18: 12 bf ff fd bne 2009e0c <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN 2009e1c: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2009e20: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 2009e24: 30 bf ff fa b,a 2009e0c <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED =============================================================================== 02009e28 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 2009e28: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 2009e2c: 40 00 06 e6 call 200b9c4 <_Workspace_Allocate> 2009e30: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 2009e34: 80 a2 20 00 cmp %o0, 0 2009e38: 02 80 00 05 be 2009e4c <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 2009e3c: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 2009e40: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 2009e44: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 2009e48: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 2009e4c: 81 c7 e0 08 ret 2009e50: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009ecc <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 2009ecc: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 2009ed0: 7f ff ff a0 call 2009d50 <_Scheduler_EDF_Enqueue> 2009ed4: 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( 2009ed8: 3b 00 80 85 sethi %hi(0x2021400), %i5 2009edc: ba 17 60 f0 or %i5, 0xf0, %i5 ! 20214f0 <_Per_CPU_Information> 2009ee0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2009ee4: d0 00 60 14 ld [ %g1 + 0x14 ], %o0 2009ee8: 03 00 80 80 sethi %hi(0x2020000), %g1 2009eec: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 20202f8 <_Scheduler+0x30> 2009ef0: 9f c0 40 00 call %g1 2009ef4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2009ef8: 80 a2 20 00 cmp %o0, 0 2009efc: 26 80 00 04 bl,a 2009f0c <_Scheduler_EDF_Unblock+0x40> 2009f00: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2009f04: 81 c7 e0 08 ret 2009f08: 81 e8 00 00 restore _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 2009f0c: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 2009f10: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 2009f14: 80 a0 60 00 cmp %g1, 0 2009f18: 22 80 00 06 be,a 2009f30 <_Scheduler_EDF_Unblock+0x64> 2009f1c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2009f20: 82 10 20 01 mov 1, %g1 2009f24: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 2009f28: 81 c7 e0 08 ret 2009f2c: 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 || 2009f30: 80 a0 60 00 cmp %g1, 0 2009f34: 12 bf ff f4 bne 2009f04 <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN 2009f38: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 2009f3c: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 2009f40: 30 bf ff fa b,a 2009f28 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED =============================================================================== 02009658 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 2009658: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 200965c: 03 00 80 7e sethi %hi(0x201f800), %g1 2009660: d0 00 62 0c ld [ %g1 + 0x20c ], %o0 ! 201fa0c <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2009664: c2 0a 20 70 ldub [ %o0 + 0x70 ], %g1 2009668: 80 a0 60 00 cmp %g1, 0 200966c: 02 80 00 26 be 2009704 <_Scheduler_priority_Tick+0xac> 2009670: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2009674: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2009678: 80 a0 60 00 cmp %g1, 0 200967c: 12 80 00 22 bne 2009704 <_Scheduler_priority_Tick+0xac> 2009680: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2009684: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 2009688: 80 a0 60 01 cmp %g1, 1 200968c: 0a 80 00 07 bcs 20096a8 <_Scheduler_priority_Tick+0x50> 2009690: 80 a0 60 02 cmp %g1, 2 2009694: 28 80 00 10 bleu,a 20096d4 <_Scheduler_priority_Tick+0x7c> 2009698: c2 02 20 74 ld [ %o0 + 0x74 ], %g1 200969c: 80 a0 60 03 cmp %g1, 3 20096a0: 22 80 00 04 be,a 20096b0 <_Scheduler_priority_Tick+0x58> <== ALWAYS TAKEN 20096a4: c2 02 20 74 ld [ %o0 + 0x74 ], %g1 20096a8: 81 c7 e0 08 ret 20096ac: 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 ) 20096b0: 82 00 7f ff add %g1, -1, %g1 20096b4: 80 a0 60 00 cmp %g1, 0 20096b8: 12 bf ff fc bne 20096a8 <_Scheduler_priority_Tick+0x50> 20096bc: c2 22 20 74 st %g1, [ %o0 + 0x74 ] (*executing->budget_callout)( executing ); 20096c0: c2 02 20 7c ld [ %o0 + 0x7c ], %g1 20096c4: 9f c0 40 00 call %g1 20096c8: 01 00 00 00 nop 20096cc: 81 c7 e0 08 ret 20096d0: 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 ) { 20096d4: 82 00 7f ff add %g1, -1, %g1 20096d8: 80 a0 60 00 cmp %g1, 0 20096dc: 14 bf ff f3 bg 20096a8 <_Scheduler_priority_Tick+0x50> 20096e0: 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(); 20096e4: 03 00 80 7a sethi %hi(0x201e800), %g1 20096e8: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201e854 <_Scheduler+0xc> 20096ec: 9f c0 40 00 call %g1 20096f0: 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; 20096f4: 03 00 80 7d sethi %hi(0x201f400), %g1 20096f8: d0 07 bf fc ld [ %fp + -4 ], %o0 20096fc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2009700: c2 22 20 74 st %g1, [ %o0 + 0x74 ] 2009704: 81 c7 e0 08 ret 2009708: 81 e8 00 00 restore =============================================================================== 02009ec4 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; 2009ec4: 03 00 80 7e sethi %hi(0x201f800), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2009ec8: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 201f808 <_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 ) { 2009ecc: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 2009ed0: c2 00 40 00 ld [ %g1 ], %g1 2009ed4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 2009ed8: 80 a0 80 03 cmp %g2, %g3 2009edc: 3a 80 00 08 bcc,a 2009efc <_Scheduler_simple_Ready_queue_enqueue_first+0x38> 2009ee0: 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 ) { 2009ee4: 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 ) { 2009ee8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 2009eec: 80 a0 80 03 cmp %g2, %g3 2009ef0: 2a bf ff fe bcs,a 2009ee8 <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN 2009ef4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED current = (Thread_Control *)current->Object.Node.previous; 2009ef8: c2 00 60 04 ld [ %g1 + 4 ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2009efc: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2009f00: c2 22 20 04 st %g1, [ %o0 + 4 ] before_node = after_node->next; after_node->next = the_node; 2009f04: d0 20 40 00 st %o0, [ %g1 ] the_node->next = before_node; 2009f08: c4 22 00 00 st %g2, [ %o0 ] } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 2009f0c: 81 c3 e0 08 retl 2009f10: d0 20 a0 04 st %o0, [ %g2 + 4 ] =============================================================================== 020082f0 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 20082f0: 9d e3 bf a0 save %sp, -96, %sp static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 20082f4: 09 00 80 7d sethi %hi(0x201f400), %g4 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 20082f8: 05 00 80 79 sethi %hi(0x201e400), %g2 20082fc: d8 19 21 40 ldd [ %g4 + 0x140 ], %o4 2008300: c6 00 a3 6c ld [ %g2 + 0x36c ], %g3 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008304: 03 00 80 7d sethi %hi(0x201f400), %g1 2008308: f8 18 61 50 ldd [ %g1 + 0x150 ], %i4 ! 201f550 <_TOD_Now> 200830c: 9f 28 e0 07 sll %g3, 7, %o7 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008310: 37 00 80 7d sethi %hi(0x201f400), %i3 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008314: 85 28 e0 02 sll %g3, 2, %g2 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008318: f4 06 e1 d0 ld [ %i3 + 0x1d0 ], %i2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 200831c: 84 23 c0 02 sub %o7, %g2, %g2 2008320: 84 00 80 03 add %g2, %g3, %g2 2008324: 85 28 a0 03 sll %g2, 3, %g2 2008328: 86 10 00 02 mov %g2, %g3 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200832c: 9a 80 c0 0d addcc %g3, %o5, %o5 2008330: 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; 2008334: 92 10 00 1d mov %i5, %o1 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008338: 98 40 80 0c addx %g2, %o4, %o4 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 200833c: ba 80 c0 1d addcc %g3, %i5, %i5 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008340: 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; 2008344: 94 10 20 00 clr %o2 2008348: f4 26 e1 d0 st %i2, [ %i3 + 0x1d0 ] 200834c: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008350: d8 39 21 40 std %o4, [ %g4 + 0x140 ] Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008354: 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; 2008358: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 *_time += *_add; 200835c: f8 38 61 50 std %i4, [ %g1 + 0x150 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008360: 40 00 49 87 call 201a97c <__divdi3> 2008364: 96 12 e2 00 or %o3, 0x200, %o3 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008368: 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; 200836c: b6 10 00 08 mov %o0, %i3 2008370: b4 10 00 09 mov %o1, %i2 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008374: 90 10 00 1c mov %i4, %o0 2008378: 92 10 00 1d mov %i5, %o1 200837c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2008380: 40 00 49 7f call 201a97c <__divdi3> 2008384: 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 ) { 2008388: 80 a6 c0 08 cmp %i3, %o0 200838c: 02 80 00 05 be 20083a0 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN 2008390: 80 a6 80 09 cmp %i2, %o1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2008394: 31 00 80 7d sethi %hi(0x201f400), %i0 <== NOT EXECUTED 2008398: 40 00 0a cd call 200aecc <_Watchdog_Tickle> 200839c: 91 ee 21 74 restore %i0, 0x174, %o0 20083a0: 12 bf ff fe bne 2008398 <_TOD_Tickle_ticks+0xa8> 20083a4: 31 00 80 7d sethi %hi(0x201f400), %i0 20083a8: 81 c7 e0 08 ret 20083ac: 81 e8 00 00 restore =============================================================================== 02007f78 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007f78: 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(); 2007f7c: 03 00 80 83 sethi %hi(0x2020c00), %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; 2007f80: 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) || 2007f84: 80 a6 20 00 cmp %i0, 0 2007f88: 02 80 00 2c be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN 2007f8c: d2 00 62 0c ld [ %g1 + 0x20c ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 2007f90: 11 00 03 d0 sethi %hi(0xf4000), %o0 2007f94: 40 00 51 1d call 201c408 <.udiv> 2007f98: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2007f9c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2007fa0: 80 a2 00 01 cmp %o0, %g1 2007fa4: 28 80 00 26 bleu,a 200803c <_TOD_Validate+0xc4> 2007fa8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2007fac: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007fb0: 80 a0 60 3b cmp %g1, 0x3b 2007fb4: 38 80 00 22 bgu,a 200803c <_TOD_Validate+0xc4> 2007fb8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2007fbc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2007fc0: 80 a0 60 3b cmp %g1, 0x3b 2007fc4: 38 80 00 1e bgu,a 200803c <_TOD_Validate+0xc4> 2007fc8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2007fcc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2007fd0: 80 a0 60 17 cmp %g1, 0x17 2007fd4: 38 80 00 1a bgu,a 200803c <_TOD_Validate+0xc4> 2007fd8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 2007fdc: 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) || 2007fe0: 80 a0 60 00 cmp %g1, 0 2007fe4: 02 80 00 15 be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN 2007fe8: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 2007fec: 38 80 00 14 bgu,a 200803c <_TOD_Validate+0xc4> 2007ff0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2007ff4: 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) || 2007ff8: 80 a0 a7 c3 cmp %g2, 0x7c3 2007ffc: 28 80 00 10 bleu,a 200803c <_TOD_Validate+0xc4> 2008000: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 2008004: 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) || 2008008: 80 a0 e0 00 cmp %g3, 0 200800c: 02 80 00 0b be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008010: 80 88 a0 03 btst 3, %g2 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008014: 32 80 00 0c bne,a 2008044 <_TOD_Validate+0xcc> 2008018: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 200801c: 82 00 60 0d add %g1, 0xd, %g1 2008020: 05 00 80 7e sethi %hi(0x201f800), %g2 2008024: 83 28 60 02 sll %g1, 2, %g1 2008028: 84 10 a1 70 or %g2, 0x170, %g2 200802c: 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( 2008030: 80 a0 40 03 cmp %g1, %g3 2008034: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 2008038: b0 0f 60 01 and %i5, 1, %i0 200803c: 81 c7 e0 08 ret 2008040: 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 ]; 2008044: 05 00 80 7e sethi %hi(0x201f800), %g2 2008048: 84 10 a1 70 or %g2, 0x170, %g2 ! 201f970 <_TOD_Days_per_month> 200804c: 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( 2008050: 80 a0 40 03 cmp %g1, %g3 2008054: 10 bf ff f9 b 2008038 <_TOD_Validate+0xc0> 2008058: ba 60 3f ff subx %g0, -1, %i5 =============================================================================== 02009930 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2009930: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2009934: 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 ); 2009938: 40 00 03 a9 call 200a7dc <_Thread_Set_transient> 200993c: 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 ) 2009940: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2009944: 80 a0 40 19 cmp %g1, %i1 2009948: 02 80 00 05 be 200995c <_Thread_Change_priority+0x2c> 200994c: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 2009950: 90 10 00 18 mov %i0, %o0 2009954: 40 00 03 88 call 200a774 <_Thread_Set_priority> 2009958: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 200995c: 7f ff e3 00 call 200255c 2009960: 01 00 00 00 nop 2009964: 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; 2009968: f6 07 60 10 ld [ %i5 + 0x10 ], %i3 if ( state != STATES_TRANSIENT ) { 200996c: 80 a6 e0 04 cmp %i3, 4 2009970: 02 80 00 18 be 20099d0 <_Thread_Change_priority+0xa0> 2009974: 80 8f 20 04 btst 4, %i4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2009978: 02 80 00 0b be 20099a4 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 200997c: 82 0e ff fb and %i3, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 2009980: 7f ff e2 fb call 200256c <== NOT EXECUTED 2009984: 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); 2009988: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 200998c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2009990: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED 2009994: 32 80 00 0d bne,a 20099c8 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2009998: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED 200999c: 81 c7 e0 08 ret 20099a0: 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 ); 20099a4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 20099a8: 7f ff e2 f1 call 200256c 20099ac: 90 10 00 19 mov %i1, %o0 20099b0: 03 00 00 ef sethi %hi(0x3bc00), %g1 20099b4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20099b8: 80 8e c0 01 btst %i3, %g1 20099bc: 02 bf ff f8 be 200999c <_Thread_Change_priority+0x6c> 20099c0: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 20099c4: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 20099c8: 40 00 03 3a call 200a6b0 <_Thread_queue_Requeue> 20099cc: 93 e8 00 1d restore %g0, %i5, %o1 20099d0: 39 00 80 7a sethi %hi(0x201e800), %i4 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 20099d4: 12 80 00 08 bne 20099f4 <_Thread_Change_priority+0xc4> <== NEVER TAKEN 20099d8: b8 17 20 48 or %i4, 0x48, %i4 ! 201e848 <_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 ) 20099dc: 80 a6 a0 00 cmp %i2, 0 20099e0: 02 80 00 1b be 2009a4c <_Thread_Change_priority+0x11c> 20099e4: c0 27 60 10 clr [ %i5 + 0x10 ] */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 20099e8: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 20099ec: 9f c0 40 00 call %g1 20099f0: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 20099f4: 7f ff e2 de call 200256c 20099f8: 90 10 00 19 mov %i1, %o0 20099fc: 7f ff e2 d8 call 200255c 2009a00: 01 00 00 00 nop 2009a04: 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(); 2009a08: c2 07 20 08 ld [ %i4 + 8 ], %g1 2009a0c: 9f c0 40 00 call %g1 2009a10: 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 ); 2009a14: 03 00 80 7e sethi %hi(0x201f800), %g1 2009a18: 82 10 62 00 or %g1, 0x200, %g1 ! 201fa00 <_Per_CPU_Information> 2009a1c: 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() && 2009a20: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009a24: 80 a0 80 03 cmp %g2, %g3 2009a28: 02 80 00 07 be 2009a44 <_Thread_Change_priority+0x114> 2009a2c: 01 00 00 00 nop 2009a30: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 2009a34: 80 a0 a0 00 cmp %g2, 0 2009a38: 02 80 00 03 be 2009a44 <_Thread_Change_priority+0x114> 2009a3c: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2009a40: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2009a44: 7f ff e2 ca call 200256c 2009a48: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2009a4c: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 2009a50: 9f c0 40 00 call %g1 2009a54: 90 10 00 1d mov %i5, %o0 2009a58: 30 bf ff e7 b,a 20099f4 <_Thread_Change_priority+0xc4> =============================================================================== 02009c74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009c74: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009c78: 90 10 00 18 mov %i0, %o0 2009c7c: 40 00 00 77 call 2009e58 <_Thread_Get> 2009c80: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009c84: c2 07 bf fc ld [ %fp + -4 ], %g1 2009c88: 80 a0 60 00 cmp %g1, 0 2009c8c: 12 80 00 09 bne 2009cb0 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2009c90: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2009c94: 7f ff ff 72 call 2009a5c <_Thread_Clear_state> 2009c98: 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--; 2009c9c: 03 00 80 7d sethi %hi(0x201f400), %g1 2009ca0: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level> 2009ca4: 84 00 bf ff add %g2, -1, %g2 2009ca8: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 2009cac: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 2009cb0: 81 c7 e0 08 ret 2009cb4: 81 e8 00 00 restore =============================================================================== 02009cb8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2009cb8: 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++; 2009cbc: 31 00 80 7d sethi %hi(0x201f400), %i0 2009cc0: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 ! 201f4c0 <_Thread_Dispatch_disable_level> 2009cc4: 82 00 60 01 inc %g1 2009cc8: c2 26 20 c0 st %g1, [ %i0 + 0xc0 ] return _Thread_Dispatch_disable_level; 2009ccc: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2009cd0: 39 00 80 7e sethi %hi(0x201f800), %i4 2009cd4: b8 17 22 00 or %i4, 0x200, %i4 ! 201fa00 <_Per_CPU_Information> _ISR_Disable( level ); 2009cd8: 7f ff e2 21 call 200255c 2009cdc: fa 07 20 0c ld [ %i4 + 0xc ], %i5 while ( _Thread_Dispatch_necessary == true ) { 2009ce0: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 2009ce4: 80 a0 60 00 cmp %g1, 0 2009ce8: 02 80 00 45 be 2009dfc <_Thread_Dispatch+0x144> 2009cec: 01 00 00 00 nop heir = _Thread_Heir; 2009cf0: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 2009cf4: 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 ) 2009cf8: 80 a7 40 1b cmp %i5, %i3 2009cfc: 02 80 00 40 be 2009dfc <_Thread_Dispatch+0x144> 2009d00: f6 27 20 0c st %i3, [ %i4 + 0xc ] 2009d04: 33 00 80 7d sethi %hi(0x201f400), %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; 2009d08: 21 00 80 7d sethi %hi(0x201f400), %l0 2009d0c: b2 16 61 4c or %i1, 0x14c, %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 ); 2009d10: 10 80 00 35 b 2009de4 <_Thread_Dispatch+0x12c> 2009d14: 35 00 80 7d sethi %hi(0x201f400), %i2 _ISR_Enable( level ); 2009d18: 7f ff e2 15 call 200256c 2009d1c: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2009d20: 40 00 12 37 call 200e5fc <_TOD_Get_uptime> 2009d24: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2009d28: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2009d2c: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2 _Timestamp_Subtract( 2009d30: d8 1f bf f8 ldd [ %fp + -8 ], %o4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2009d34: c2 06 40 00 ld [ %i1 ], %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2009d38: 86 a3 40 03 subcc %o5, %g3, %g3 2009d3c: 84 63 00 02 subx %o4, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2009d40: 86 82 c0 03 addcc %o3, %g3, %g3 2009d44: 84 42 80 02 addx %o2, %g2, %g2 2009d48: c4 3f 60 80 std %g2, [ %i5 + 0x80 ] 2009d4c: 80 a0 60 00 cmp %g1, 0 2009d50: 02 80 00 06 be 2009d68 <_Thread_Dispatch+0xb0> <== NEVER TAKEN 2009d54: d8 3f 20 20 std %o4, [ %i4 + 0x20 ] executing->libc_reent = *_Thread_libc_reent; 2009d58: c4 00 40 00 ld [ %g1 ], %g2 2009d5c: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2009d60: c4 06 e1 54 ld [ %i3 + 0x154 ], %g2 2009d64: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2009d68: 90 10 00 1d mov %i5, %o0 2009d6c: 40 00 03 ae call 200ac24 <_User_extensions_Thread_switch> 2009d70: 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 ); 2009d74: 90 07 60 c8 add %i5, 0xc8, %o0 2009d78: 40 00 04 f8 call 200b158 <_CPU_Context_switch> 2009d7c: 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) && 2009d80: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2009d84: 80 a0 60 00 cmp %g1, 0 2009d88: 02 80 00 0c be 2009db8 <_Thread_Dispatch+0x100> 2009d8c: d0 06 a1 48 ld [ %i2 + 0x148 ], %o0 2009d90: 80 a7 40 08 cmp %i5, %o0 2009d94: 02 80 00 09 be 2009db8 <_Thread_Dispatch+0x100> 2009d98: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2009d9c: 02 80 00 04 be 2009dac <_Thread_Dispatch+0xf4> 2009da0: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2009da4: 40 00 04 b3 call 200b070 <_CPU_Context_save_fp> 2009da8: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2009dac: 40 00 04 ce call 200b0e4 <_CPU_Context_restore_fp> 2009db0: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2009db4: fa 26 a1 48 st %i5, [ %i2 + 0x148 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2009db8: 7f ff e1 e9 call 200255c 2009dbc: 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 ) { 2009dc0: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 2009dc4: 80 a0 60 00 cmp %g1, 0 2009dc8: 02 80 00 0d be 2009dfc <_Thread_Dispatch+0x144> 2009dcc: 01 00 00 00 nop heir = _Thread_Heir; 2009dd0: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 2009dd4: 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 ) 2009dd8: 80 a6 c0 1d cmp %i3, %i5 2009ddc: 02 80 00 08 be 2009dfc <_Thread_Dispatch+0x144> <== NEVER TAKEN 2009de0: 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 ) 2009de4: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1 2009de8: 80 a0 60 01 cmp %g1, 1 2009dec: 12 bf ff cb bne 2009d18 <_Thread_Dispatch+0x60> 2009df0: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009df4: 10 bf ff c9 b 2009d18 <_Thread_Dispatch+0x60> 2009df8: c2 26 e0 74 st %g1, [ %i3 + 0x74 ] _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 2009dfc: 7f ff e1 dc call 200256c 2009e00: 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--; 2009e04: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 2009e08: 82 00 7f ff add %g1, -1, %g1 2009e0c: c2 26 20 c0 st %g1, [ %i0 + 0xc0 ] return _Thread_Dispatch_disable_level; 2009e10: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 2009e14: 7f ff f7 8f call 2007c50 <_API_extensions_Run_postswitch> 2009e18: 01 00 00 00 nop } 2009e1c: 81 c7 e0 08 ret 2009e20: 81 e8 00 00 restore =============================================================================== 02011368 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 2011368: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 201136c: 03 00 80 7e sethi %hi(0x201f800), %g1 2011370: fa 00 62 0c ld [ %g1 + 0x20c ], %i5 ! 201fa0c <_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(); 2011374: 3f 00 80 44 sethi %hi(0x2011000), %i7 2011378: be 17 e3 68 or %i7, 0x368, %i7 ! 2011368 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 201137c: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 2011380: 7f ff c4 7b call 200256c 2011384: 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) && 2011388: 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; 201138c: 03 00 80 7c sethi %hi(0x201f000), %g1 doneConstructors = true; 2011390: 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; 2011394: f6 08 61 98 ldub [ %g1 + 0x198 ], %i3 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2011398: 80 a0 a0 00 cmp %g2, 0 201139c: 02 80 00 0c be 20113cc <_Thread_Handler+0x64> 20113a0: c6 28 61 98 stb %g3, [ %g1 + 0x198 ] #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 ); 20113a4: 39 00 80 7d sethi %hi(0x201f400), %i4 20113a8: d0 07 21 48 ld [ %i4 + 0x148 ], %o0 ! 201f548 <_Thread_Allocated_fp> 20113ac: 80 a7 40 08 cmp %i5, %o0 20113b0: 02 80 00 07 be 20113cc <_Thread_Handler+0x64> 20113b4: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 20113b8: 22 80 00 05 be,a 20113cc <_Thread_Handler+0x64> 20113bc: fa 27 21 48 st %i5, [ %i4 + 0x148 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 20113c0: 7f ff e7 2c call 200b070 <_CPU_Context_save_fp> 20113c4: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 20113c8: fa 27 21 48 st %i5, [ %i4 + 0x148 ] /* * 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 ); 20113cc: 7f ff e5 94 call 200aa1c <_User_extensions_Thread_begin> 20113d0: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 20113d4: 7f ff e2 94 call 2009e24 <_Thread_Enable_dispatch> 20113d8: 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) */ { 20113dc: 80 8e e0 ff btst 0xff, %i3 20113e0: 02 80 00 0e be 2011418 <_Thread_Handler+0xb0> 20113e4: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 20113e8: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 20113ec: 80 a0 60 00 cmp %g1, 0 20113f0: 02 80 00 0e be 2011428 <_Thread_Handler+0xc0> 20113f4: 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 ) { 20113f8: 22 80 00 11 be,a 201143c <_Thread_Handler+0xd4> <== ALWAYS TAKEN 20113fc: 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 ); 2011400: 7f ff e5 9b call 200aa6c <_User_extensions_Thread_exitted> 2011404: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 2011408: 90 10 20 00 clr %o0 201140c: 92 10 20 01 mov 1, %o1 2011410: 7f ff dc ff call 200880c <_Internal_error_Occurred> 2011414: 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 (); 2011418: 40 00 34 c0 call 201e718 <_init> 201141c: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 2011420: 10 bf ff f3 b 20113ec <_Thread_Handler+0x84> 2011424: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 2011428: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 201142c: 9f c0 40 00 call %g1 2011430: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 2011434: 10 bf ff f3 b 2011400 <_Thread_Handler+0x98> 2011438: 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)( 201143c: 9f c0 40 00 call %g1 2011440: 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 = 2011444: 10 bf ff ef b 2011400 <_Thread_Handler+0x98> 2011448: d0 27 60 28 st %o0, [ %i5 + 0x28 ] =============================================================================== 02009f08 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2009f08: 9d e3 bf a0 save %sp, -96, %sp 2009f0c: 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; 2009f10: c0 26 61 58 clr [ %i1 + 0x158 ] 2009f14: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2009f18: 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 ) { 2009f1c: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 2009f20: 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 ) { 2009f24: 80 a6 a0 00 cmp %i2, 0 2009f28: 02 80 00 6b be 200a0d4 <_Thread_Initialize+0x1cc> 2009f2c: 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; 2009f30: c0 2e 60 b0 clrb [ %i1 + 0xb0 ] 2009f34: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2009f38: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ] the_stack->size = size; 2009f3c: 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 ) { 2009f40: 80 a7 20 00 cmp %i4, 0 2009f44: 12 80 00 48 bne 200a064 <_Thread_Initialize+0x15c> 2009f48: b6 10 20 00 clr %i3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2009f4c: 39 00 80 7d sethi %hi(0x201f400), %i4 2009f50: c2 07 21 58 ld [ %i4 + 0x158 ], %g1 ! 201f558 <_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; 2009f54: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2009f58: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2009f5c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2009f60: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2009f64: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2009f68: 80 a0 60 00 cmp %g1, 0 2009f6c: 12 80 00 46 bne 200a084 <_Thread_Initialize+0x17c> 2009f70: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 2009f74: 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; 2009f78: 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; 2009f7c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2009f80: e2 2e 60 9c stb %l1, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 2009f84: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 2009f88: 80 a4 20 02 cmp %l0, 2 2009f8c: 12 80 00 05 bne 2009fa0 <_Thread_Initialize+0x98> 2009f90: 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; 2009f94: 03 00 80 7d sethi %hi(0x201f400), %g1 2009f98: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 201f424 <_Thread_Ticks_per_timeslice> 2009f9c: c2 26 60 74 st %g1, [ %i1 + 0x74 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2009fa0: c4 07 a0 68 ld [ %fp + 0x68 ], %g2 */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2009fa4: 03 00 80 7a sethi %hi(0x201e800), %g1 2009fa8: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201e860 <_Scheduler+0x18> 2009fac: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 2009fb0: 84 10 20 01 mov 1, %g2 the_thread->Wait.queue = NULL; 2009fb4: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2009fb8: c4 26 60 10 st %g2, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2009fbc: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 2009fc0: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2009fc4: fa 26 60 ac st %i5, [ %i1 + 0xac ] 2009fc8: 9f c0 40 00 call %g1 2009fcc: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2009fd0: b8 92 20 00 orcc %o0, 0, %i4 2009fd4: 22 80 00 13 be,a 200a020 <_Thread_Initialize+0x118> 2009fd8: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2009fdc: 90 10 00 19 mov %i1, %o0 2009fe0: 40 00 01 e5 call 200a774 <_Thread_Set_priority> 2009fe4: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2009fe8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2009fec: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 2009ff0: c0 26 60 80 clr [ %i1 + 0x80 ] 2009ff4: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2009ff8: 83 28 60 02 sll %g1, 2, %g1 2009ffc: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a000: 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 ); 200a004: 90 10 00 19 mov %i1, %o0 200a008: 40 00 02 c0 call 200ab08 <_User_extensions_Thread_create> 200a00c: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200a010: 80 8a 20 ff btst 0xff, %o0 200a014: 32 80 00 12 bne,a 200a05c <_Thread_Initialize+0x154> 200a018: b0 0e 20 01 and %i0, 1, %i0 return true; failed: _Workspace_Free( the_thread->libc_reent ); 200a01c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 200a020: 40 00 03 ff call 200b01c <_Workspace_Free> 200a024: b0 10 20 00 clr %i0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a028: 40 00 03 fd call 200b01c <_Workspace_Free> 200a02c: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 200a030: 40 00 03 fb call 200b01c <_Workspace_Free> 200a034: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 200a038: 40 00 03 f9 call 200b01c <_Workspace_Free> 200a03c: 90 10 00 1a mov %i2, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a040: 40 00 03 f7 call 200b01c <_Workspace_Free> 200a044: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a048: 40 00 03 f5 call 200b01c <_Workspace_Free> 200a04c: 90 10 00 1c mov %i4, %o0 _Thread_Stack_Free( the_thread ); 200a050: 40 00 02 0d call 200a884 <_Thread_Stack_Free> 200a054: 90 10 00 19 mov %i1, %o0 return false; } 200a058: b0 0e 20 01 and %i0, 1, %i0 200a05c: 81 c7 e0 08 ret 200a060: 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 ); 200a064: 40 00 03 e6 call 200affc <_Workspace_Allocate> 200a068: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a06c: b6 92 20 00 orcc %o0, 0, %i3 200a070: 32 bf ff b8 bne,a 2009f50 <_Thread_Initialize+0x48> 200a074: 39 00 80 7d sethi %hi(0x201f400), %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; 200a078: 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; 200a07c: 10 bf ff e8 b 200a01c <_Thread_Initialize+0x114> 200a080: b8 10 20 00 clr %i4 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 200a084: 82 00 60 01 inc %g1 200a088: 40 00 03 dd call 200affc <_Workspace_Allocate> 200a08c: 91 28 60 02 sll %g1, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200a090: b4 92 20 00 orcc %o0, 0, %i2 200a094: 02 80 00 1d be 200a108 <_Thread_Initialize+0x200> 200a098: 86 10 00 1a mov %i2, %g3 goto failed; } the_thread->extensions = (void **) extensions_area; 200a09c: f4 26 61 60 st %i2, [ %i1 + 0x160 ] 200a0a0: c8 07 21 58 ld [ %i4 + 0x158 ], %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++ ) 200a0a4: 84 10 20 00 clr %g2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200a0a8: 10 80 00 03 b 200a0b4 <_Thread_Initialize+0x1ac> 200a0ac: 82 10 20 00 clr %g1 200a0b0: 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; 200a0b4: 85 28 a0 02 sll %g2, 2, %g2 200a0b8: 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++ ) 200a0bc: 82 00 60 01 inc %g1 200a0c0: 80 a0 40 04 cmp %g1, %g4 200a0c4: 08 bf ff fb bleu 200a0b0 <_Thread_Initialize+0x1a8> 200a0c8: 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; 200a0cc: 10 bf ff ad b 2009f80 <_Thread_Initialize+0x78> 200a0d0: 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 ); 200a0d4: 90 10 00 19 mov %i1, %o0 200a0d8: 40 00 01 d0 call 200a818 <_Thread_Stack_Allocate> 200a0dc: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a0e0: 80 a2 00 1b cmp %o0, %i3 200a0e4: 0a 80 00 07 bcs 200a100 <_Thread_Initialize+0x1f8> 200a0e8: 80 a2 20 00 cmp %o0, 0 200a0ec: 02 80 00 05 be 200a100 <_Thread_Initialize+0x1f8> <== NEVER TAKEN 200a0f0: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 200a0f4: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2 the_thread->Start.core_allocated_stack = true; 200a0f8: 10 bf ff 90 b 2009f38 <_Thread_Initialize+0x30> 200a0fc: 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 */ 200a100: 10 bf ff d6 b 200a058 <_Thread_Initialize+0x150> 200a104: 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; 200a108: 10 bf ff c5 b 200a01c <_Thread_Initialize+0x114> 200a10c: b8 10 20 00 clr %i4 =============================================================================== 0200a884 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200a884: 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 ) 200a888: c2 0e 20 b0 ldub [ %i0 + 0xb0 ], %g1 200a88c: 80 a0 60 00 cmp %g1, 0 200a890: 02 80 00 0b be 200a8bc <_Thread_Stack_Free+0x38> <== NEVER TAKEN 200a894: 01 00 00 00 nop * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 200a898: 03 00 80 79 sethi %hi(0x201e400), %g1 200a89c: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201e784 200a8a0: 80 a0 60 00 cmp %g1, 0 200a8a4: 22 80 00 08 be,a 200a8c4 <_Thread_Stack_Free+0x40> 200a8a8: f0 06 20 b8 ld [ %i0 + 0xb8 ], %i0 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 200a8ac: 9f c0 40 00 call %g1 200a8b0: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0 200a8b4: 81 c7 e0 08 ret 200a8b8: 81 e8 00 00 restore 200a8bc: 81 c7 e0 08 ret <== NOT EXECUTED 200a8c0: 81 e8 00 00 restore <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 200a8c4: 40 00 01 d6 call 200b01c <_Workspace_Free> 200a8c8: 81 e8 00 00 restore =============================================================================== 0200a6b0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200a6b0: 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 ) 200a6b4: 80 a6 20 00 cmp %i0, 0 200a6b8: 02 80 00 13 be 200a704 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 200a6bc: 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 ) { 200a6c0: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200a6c4: 80 a7 20 01 cmp %i4, 1 200a6c8: 02 80 00 04 be 200a6d8 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 200a6cc: 01 00 00 00 nop 200a6d0: 81 c7 e0 08 ret <== NOT EXECUTED 200a6d4: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200a6d8: 7f ff df a1 call 200255c 200a6dc: 01 00 00 00 nop 200a6e0: ba 10 00 08 mov %o0, %i5 200a6e4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200a6e8: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a6ec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200a6f0: 80 88 80 01 btst %g2, %g1 200a6f4: 12 80 00 06 bne 200a70c <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 200a6f8: 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 ); 200a6fc: 7f ff df 9c call 200256c 200a700: 90 10 00 1d mov %i5, %o0 200a704: 81 c7 e0 08 ret 200a708: 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 ); 200a70c: 92 10 00 19 mov %i1, %o1 200a710: 94 10 20 01 mov 1, %o2 200a714: 40 00 11 9e call 200ed8c <_Thread_queue_Extract_priority_helper> 200a718: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200a71c: 90 10 00 18 mov %i0, %o0 200a720: 92 10 00 19 mov %i1, %o1 200a724: 7f ff ff 35 call 200a3f8 <_Thread_queue_Enqueue_priority> 200a728: 94 07 bf fc add %fp, -4, %o2 200a72c: 30 bf ff f4 b,a 200a6fc <_Thread_queue_Requeue+0x4c> =============================================================================== 0200a730 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a730: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a734: 90 10 00 18 mov %i0, %o0 200a738: 7f ff fd c8 call 2009e58 <_Thread_Get> 200a73c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a740: c2 07 bf fc ld [ %fp + -4 ], %g1 200a744: 80 a0 60 00 cmp %g1, 0 200a748: 12 80 00 09 bne 200a76c <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200a74c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200a750: 40 00 11 c8 call 200ee70 <_Thread_queue_Process_timeout> 200a754: 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--; 200a758: 03 00 80 7d sethi %hi(0x201f400), %g1 200a75c: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level> 200a760: 84 00 bf ff add %g2, -1, %g2 200a764: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 200a768: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 200a76c: 81 c7 e0 08 ret 200a770: 81 e8 00 00 restore =============================================================================== 020173cc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20173cc: 9d e3 bf 78 save %sp, -136, %sp 20173d0: 21 00 80 f5 sethi %hi(0x203d400), %l0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20173d4: a4 07 bf e8 add %fp, -24, %l2 20173d8: b4 07 bf ec add %fp, -20, %i2 20173dc: b8 07 bf f4 add %fp, -12, %i4 20173e0: a2 07 bf f8 add %fp, -8, %l1 20173e4: 33 00 80 f5 sethi %hi(0x203d400), %i1 20173e8: 2b 00 80 f5 sethi %hi(0x203d400), %l5 20173ec: 82 06 20 34 add %i0, 0x34, %g1 20173f0: f4 27 bf e8 st %i2, [ %fp + -24 ] head->previous = NULL; 20173f4: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 20173f8: 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; 20173fc: e2 27 bf f4 st %l1, [ %fp + -12 ] head->previous = NULL; 2017400: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2017404: f8 27 bf fc st %i4, [ %fp + -4 ] 2017408: a0 14 23 40 or %l0, 0x340, %l0 201740c: ba 06 20 30 add %i0, 0x30, %i5 2017410: b2 16 62 c0 or %i1, 0x2c0, %i1 2017414: b6 06 20 68 add %i0, 0x68, %i3 2017418: aa 15 62 30 or %l5, 0x230, %l5 201741c: a8 06 20 08 add %i0, 8, %l4 2017420: c2 27 bf e4 st %g1, [ %fp + -28 ] 2017424: a6 06 20 40 add %i0, 0x40, %l3 2017428: ae 06 20 6c add %i0, 0x6c, %l7 _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; 201742c: ac 10 20 01 mov 1, %l6 { /* * 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; 2017430: 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; 2017434: c2 04 00 00 ld [ %l0 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2017438: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201743c: 90 10 00 1d mov %i5, %o0 2017440: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017444: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017448: 40 00 13 15 call 201c09c <_Watchdog_Adjust_to_chain> 201744c: 94 10 00 1c mov %i4, %o2 2017450: d0 1e 40 00 ldd [ %i1 ], %o0 2017454: 94 10 20 00 clr %o2 2017458: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 201745c: 40 00 58 0a call 202d484 <__divdi3> 2017460: 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; 2017464: 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 ) { 2017468: 80 a2 40 0a cmp %o1, %o2 201746c: 18 80 00 2d bgu 2017520 <_Timer_server_Body+0x154> 2017470: 82 10 00 09 mov %o1, %g1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 2017474: 80 a2 40 0a cmp %o1, %o2 2017478: 0a 80 00 20 bcs 20174f8 <_Timer_server_Body+0x12c> 201747c: 94 22 80 01 sub %o2, %g1, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2017480: c2 26 20 74 st %g1, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017484: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017488: 40 00 02 fa call 2018070 <_Chain_Get> 201748c: 01 00 00 00 nop if ( timer == NULL ) { 2017490: 92 92 20 00 orcc %o0, 0, %o1 2017494: 02 80 00 10 be 20174d4 <_Timer_server_Body+0x108> 2017498: 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 ) { 201749c: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 20174a0: 80 a0 60 01 cmp %g1, 1 20174a4: 02 80 00 1b be 2017510 <_Timer_server_Body+0x144> 20174a8: 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 ) { 20174ac: 12 bf ff f6 bne 2017484 <_Timer_server_Body+0xb8> <== NEVER TAKEN 20174b0: 92 02 60 10 add %o1, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20174b4: 40 00 13 2b call 201c160 <_Watchdog_Insert> 20174b8: 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 ); 20174bc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 20174c0: 40 00 02 ec call 2018070 <_Chain_Get> 20174c4: 01 00 00 00 nop if ( timer == NULL ) { 20174c8: 92 92 20 00 orcc %o0, 0, %o1 20174cc: 32 bf ff f5 bne,a 20174a0 <_Timer_server_Body+0xd4> <== NEVER TAKEN 20174d0: 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 ); 20174d4: 7f ff df 62 call 200f25c 20174d8: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20174dc: c2 07 bf e8 ld [ %fp + -24 ], %g1 20174e0: 80 a0 40 1a cmp %g1, %i2 20174e4: 02 80 00 16 be 201753c <_Timer_server_Body+0x170> <== ALWAYS TAKEN 20174e8: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20174ec: 7f ff df 60 call 200f26c <== NOT EXECUTED 20174f0: 01 00 00 00 nop <== NOT EXECUTED 20174f4: 30 bf ff d0 b,a 2017434 <_Timer_server_Body+0x68> <== 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 ); 20174f8: c2 27 bf e0 st %g1, [ %fp + -32 ] 20174fc: 90 10 00 1b mov %i3, %o0 2017500: 40 00 12 b8 call 201bfe0 <_Watchdog_Adjust> 2017504: 92 10 20 01 mov 1, %o1 2017508: 10 bf ff de b 2017480 <_Timer_server_Body+0xb4> 201750c: c2 07 bf e0 ld [ %fp + -32 ], %g1 Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017510: 90 10 00 1d mov %i5, %o0 2017514: 40 00 13 13 call 201c160 <_Watchdog_Insert> 2017518: 92 02 60 10 add %o1, 0x10, %o1 201751c: 30 bf ff da b,a 2017484 <_Timer_server_Body+0xb8> /* * 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 ); 2017520: 92 22 40 0a sub %o1, %o2, %o1 2017524: c2 27 bf e0 st %g1, [ %fp + -32 ] 2017528: 90 10 00 1b mov %i3, %o0 201752c: 40 00 12 dc call 201c09c <_Watchdog_Adjust_to_chain> 2017530: 94 10 00 1c mov %i4, %o2 2017534: 10 bf ff d3 b 2017480 <_Timer_server_Body+0xb4> 2017538: c2 07 bf e0 ld [ %fp + -32 ], %g1 */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 201753c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2017540: 7f ff df 4b call 200f26c 2017544: 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 ) ) { 2017548: c2 07 bf f4 ld [ %fp + -12 ], %g1 201754c: 80 a0 40 11 cmp %g1, %l1 2017550: 12 80 00 0d bne 2017584 <_Timer_server_Body+0x1b8> 2017554: 01 00 00 00 nop 2017558: 30 80 00 14 b,a 20175a8 <_Timer_server_Body+0x1dc> 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; 201755c: f8 20 60 04 st %i4, [ %g1 + 4 ] * 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; 2017560: c0 20 a0 08 clr [ %g2 + 8 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 2017564: c2 27 bf f4 st %g1, [ %fp + -12 ] _ISR_Enable( level ); 2017568: 7f ff df 41 call 200f26c 201756c: c4 27 bf dc st %g2, [ %fp + -36 ] /* * 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 ); 2017570: c4 07 bf dc ld [ %fp + -36 ], %g2 2017574: d0 00 a0 20 ld [ %g2 + 0x20 ], %o0 2017578: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 201757c: 9f c0 40 00 call %g1 2017580: d2 00 a0 24 ld [ %g2 + 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 ); 2017584: 7f ff df 36 call 200f25c 2017588: 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; 201758c: c4 07 bf f4 ld [ %fp + -12 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2017590: 80 a0 80 11 cmp %g2, %l1 2017594: 32 bf ff f2 bne,a 201755c <_Timer_server_Body+0x190> 2017598: c2 00 80 00 ld [ %g2 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 201759c: 7f ff df 34 call 200f26c 20175a0: 01 00 00 00 nop 20175a4: 30 bf ff a3 b,a 2017430 <_Timer_server_Body+0x64> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20175a8: 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++; 20175ac: c2 05 40 00 ld [ %l5 ], %g1 20175b0: 82 00 60 01 inc %g1 20175b4: c2 25 40 00 st %g1, [ %l5 ] return _Thread_Dispatch_disable_level; 20175b8: c2 05 40 00 ld [ %l5 ], %g1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 20175bc: d0 06 00 00 ld [ %i0 ], %o0 20175c0: 40 00 11 3d call 201bab4 <_Thread_Set_state> 20175c4: 92 10 20 08 mov 8, %o1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20175c8: 40 00 13 48 call 201c2e8 <_Watchdog_Remove> 20175cc: 90 10 00 14 mov %l4, %o0 { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 20175d0: 7f ff df 23 call 200f25c 20175d4: 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; 20175d8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 20175dc: c4 07 bf e4 ld [ %fp + -28 ], %g2 20175e0: 80 a0 40 02 cmp %g1, %g2 20175e4: 02 80 00 25 be 2017678 <_Timer_server_Body+0x2ac> 20175e8: 01 00 00 00 nop Watchdog_Interval delta_interval = 20175ec: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 20175f0: 7f ff df 1f call 200f26c 20175f4: c2 27 bf e0 st %g1, [ %fp + -32 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20175f8: c2 07 bf e0 ld [ %fp + -32 ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20175fc: 92 10 00 14 mov %l4, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2017600: c2 26 20 14 st %g1, [ %i0 + 0x14 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2017604: 11 00 80 f5 sethi %hi(0x203d400), %o0 2017608: 40 00 12 d6 call 201c160 <_Watchdog_Insert> 201760c: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 203d6f0 <_Watchdog_Ticks_chain> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017610: 40 00 13 36 call 201c2e8 <_Watchdog_Remove> 2017614: 90 10 00 13 mov %l3, %o0 { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 2017618: 7f ff df 11 call 200f25c 201761c: 01 00 00 00 nop 2017620: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017624: 80 a0 40 17 cmp %g1, %l7 2017628: 02 80 00 1e be 20176a0 <_Timer_server_Body+0x2d4> 201762c: 01 00 00 00 nop Watchdog_Interval delta_interval = 2017630: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 2017634: 7f ff df 0e call 200f26c 2017638: c2 27 bf e0 st %g1, [ %fp + -32 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 201763c: c2 07 bf e0 ld [ %fp + -32 ], %g1 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2017640: 11 00 80 f5 sethi %hi(0x203d400), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2017644: c2 26 20 4c st %g1, [ %i0 + 0x4c ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2017648: 90 12 22 e4 or %o0, 0x2e4, %o0 201764c: 40 00 12 c5 call 201c160 <_Watchdog_Insert> 2017650: 92 10 00 13 mov %l3, %o1 */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); 2017654: 40 00 0e 98 call 201b0b4 <_Thread_Enable_dispatch> 2017658: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201765c: 90 10 00 14 mov %l4, %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; 2017660: ec 2e 20 7c stb %l6, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017664: 40 00 13 21 call 201c2e8 <_Watchdog_Remove> 2017668: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 201766c: 40 00 13 1f call 201c2e8 <_Watchdog_Remove> 2017670: 90 10 00 13 mov %l3, %o0 2017674: 30 bf ff 6f b,a 2017430 <_Timer_server_Body+0x64> _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 2017678: 7f ff de fd call 200f26c 201767c: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017680: 40 00 13 1a call 201c2e8 <_Watchdog_Remove> 2017684: 90 10 00 13 mov %l3, %o0 { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 2017688: 7f ff de f5 call 200f25c 201768c: 01 00 00 00 nop 2017690: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017694: 80 a0 40 17 cmp %g1, %l7 2017698: 32 bf ff e7 bne,a 2017634 <_Timer_server_Body+0x268> 201769c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 20176a0: 7f ff de f3 call 200f26c 20176a4: 01 00 00 00 nop 20176a8: 30 bf ff eb b,a 2017654 <_Timer_server_Body+0x288> =============================================================================== 020171e4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 20171e4: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 20171e8: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 20171ec: 80 a0 60 00 cmp %g1, 0 20171f0: 02 80 00 05 be 2017204 <_Timer_server_Schedule_operation_method+0x20> 20171f4: 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 ); 20171f8: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 20171fc: 40 00 03 89 call 2018020 <_Chain_Append> 2017200: 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++; 2017204: 03 00 80 f5 sethi %hi(0x203d400), %g1 2017208: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 203d630 <_Thread_Dispatch_disable_level> 201720c: 84 00 a0 01 inc %g2 2017210: c4 20 62 30 st %g2, [ %g1 + 0x230 ] return _Thread_Dispatch_disable_level; 2017214: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2017218: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 201721c: 80 a0 60 01 cmp %g1, 1 2017220: 02 80 00 3b be 201730c <_Timer_server_Schedule_operation_method+0x128> 2017224: 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 ) { 2017228: 02 80 00 04 be 2017238 <_Timer_server_Schedule_operation_method+0x54> 201722c: 01 00 00 00 nop if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017230: 40 00 0f a1 call 201b0b4 <_Thread_Enable_dispatch> 2017234: 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 ); 2017238: 7f ff e0 09 call 200f25c 201723c: 01 00 00 00 nop 2017240: b8 10 00 08 mov %o0, %i4 2017244: 03 00 80 f5 sethi %hi(0x203d400), %g1 2017248: d0 18 62 c0 ldd [ %g1 + 0x2c0 ], %o0 ! 203d6c0 <_TOD_Now> 201724c: 94 10 20 00 clr %o2 2017250: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2017254: 40 00 58 8c call 202d484 <__divdi3> 2017258: 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; 201725c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2017260: 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 ); 2017264: b6 06 20 6c add %i0, 0x6c, %i3 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017268: 80 a0 40 1b cmp %g1, %i3 201726c: 02 80 00 0c be 201729c <_Timer_server_Schedule_operation_method+0xb8> 2017270: 80 a2 40 02 cmp %o1, %g2 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2017274: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2017278: 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 ) { 201727c: 08 80 00 07 bleu 2017298 <_Timer_server_Schedule_operation_method+0xb4> 2017280: 86 20 c0 09 sub %g3, %o1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017284: 84 22 40 02 sub %o1, %g2, %g2 if (delta_interval > delta) { 2017288: 80 a1 00 02 cmp %g4, %g2 201728c: 08 80 00 03 bleu 2017298 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN 2017290: 86 10 20 00 clr %g3 delta_interval -= delta; 2017294: 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; 2017298: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 201729c: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 20172a0: 7f ff df f3 call 200f26c 20172a4: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20172a8: 90 06 20 68 add %i0, 0x68, %o0 20172ac: 40 00 13 ad call 201c160 <_Watchdog_Insert> 20172b0: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 20172b4: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 20172b8: 80 a0 60 00 cmp %g1, 0 20172bc: 12 bf ff dd bne 2017230 <_Timer_server_Schedule_operation_method+0x4c> 20172c0: b8 06 20 40 add %i0, 0x40, %i4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 20172c4: 40 00 14 09 call 201c2e8 <_Watchdog_Remove> 20172c8: 90 10 00 1c mov %i4, %o0 { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 20172cc: 7f ff df e4 call 200f25c 20172d0: 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; 20172d4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 20172d8: 80 a6 c0 01 cmp %i3, %g1 20172dc: 02 80 00 38 be 20173bc <_Timer_server_Schedule_operation_method+0x1d8><== NEVER TAKEN 20172e0: 01 00 00 00 nop Watchdog_Interval delta_interval = 20172e4: fa 00 60 10 ld [ %g1 + 0x10 ], %i5 _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 20172e8: 7f ff df e1 call 200f26c 20172ec: 01 00 00 00 nop ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20172f0: 92 10 00 1c mov %i4, %o1 20172f4: 11 00 80 f5 sethi %hi(0x203d400), %o0 20172f8: 90 12 22 e4 or %o0, 0x2e4, %o0 ! 203d6e4 <_Watchdog_Seconds_chain> 20172fc: 40 00 13 99 call 201c160 <_Watchdog_Insert> 2017300: fa 26 20 4c st %i5, [ %i0 + 0x4c ] if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017304: 40 00 0f 6c call 201b0b4 <_Thread_Enable_dispatch> 2017308: 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 ); 201730c: 7f ff df d4 call 200f25c 2017310: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2017314: 05 00 80 f5 sethi %hi(0x203d400), %g2 2017318: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201731c: c4 00 a3 40 ld [ %g2 + 0x340 ], %g2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2017320: 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 ); 2017324: b8 06 20 34 add %i0, 0x34, %i4 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017328: 80 a0 40 1c cmp %g1, %i4 201732c: 02 80 00 08 be 201734c <_Timer_server_Schedule_operation_method+0x168> 2017330: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2017334: f6 00 60 10 ld [ %g1 + 0x10 ], %i3 if (delta_interval > delta) { 2017338: 80 a1 00 1b cmp %g4, %i3 201733c: 1a 80 00 03 bcc 2017348 <_Timer_server_Schedule_operation_method+0x164> 2017340: 86 10 20 00 clr %g3 delta_interval -= delta; 2017344: 86 26 c0 04 sub %i3, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2017348: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 201734c: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2017350: 7f ff df c7 call 200f26c 2017354: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017358: 90 06 20 30 add %i0, 0x30, %o0 201735c: 40 00 13 81 call 201c160 <_Watchdog_Insert> 2017360: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017364: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017368: 80 a0 60 00 cmp %g1, 0 201736c: 12 bf ff b1 bne 2017230 <_Timer_server_Schedule_operation_method+0x4c> 2017370: b6 06 20 08 add %i0, 8, %i3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017374: 40 00 13 dd call 201c2e8 <_Watchdog_Remove> 2017378: 90 10 00 1b mov %i3, %o0 { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 201737c: 7f ff df b8 call 200f25c 2017380: 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; 2017384: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017388: 80 a7 00 01 cmp %i4, %g1 201738c: 02 80 00 0c be 20173bc <_Timer_server_Schedule_operation_method+0x1d8> 2017390: 01 00 00 00 nop Watchdog_Interval delta_interval = 2017394: fa 00 60 10 ld [ %g1 + 0x10 ], %i5 _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 2017398: 7f ff df b5 call 200f26c 201739c: 01 00 00 00 nop ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20173a0: 92 10 00 1b mov %i3, %o1 20173a4: 11 00 80 f5 sethi %hi(0x203d400), %o0 20173a8: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 203d6f0 <_Watchdog_Ticks_chain> 20173ac: 40 00 13 6d call 201c160 <_Watchdog_Insert> 20173b0: fa 26 20 14 st %i5, [ %i0 + 0x14 ] if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 20173b4: 40 00 0f 40 call 201b0b4 <_Thread_Enable_dispatch> 20173b8: 81 e8 00 00 restore _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 20173bc: 7f ff df ac call 200f26c 20173c0: 01 00 00 00 nop if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 20173c4: 40 00 0f 3c call 201b0b4 <_Thread_Enable_dispatch> 20173c8: 81 e8 00 00 restore =============================================================================== 0200c810 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 200c810: 9d e3 bf a0 save %sp, -96, %sp 200c814: 82 10 00 18 mov %i0, %g1 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200c818: c6 06 00 00 ld [ %i0 ], %g3 time->tv_nsec += add->tv_nsec; 200c81c: 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; 200c820: f0 06 40 00 ld [ %i1 ], %i0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200c824: c4 06 60 04 ld [ %i1 + 4 ], %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200c828: 86 00 c0 18 add %g3, %i0, %g3 time->tv_nsec += add->tv_nsec; 200c82c: 84 01 00 02 add %g4, %g2, %g2 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200c830: 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 ) { 200c834: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 200c838: 88 11 21 ff or %g4, 0x1ff, %g4 ! 3b9ac9ff 200c83c: 80 a0 80 04 cmp %g2, %g4 200c840: 08 80 00 0b bleu 200c86c <_Timespec_Add_to+0x5c> <== ALWAYS TAKEN 200c844: c4 20 60 04 st %g2, [ %g1 + 4 ] time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c848: 1f 31 19 4d sethi %hi(0xc4653400), %o7 <== NOT EXECUTED 200c84c: 9e 13 e2 00 or %o7, 0x200, %o7 ! c4653600 <== NOT EXECUTED 200c850: 84 00 80 0f add %g2, %o7, %g2 <== NOT EXECUTED time->tv_sec++; 200c854: 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 ) { 200c858: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 200c85c: 18 bf ff fd bgu 200c850 <_Timespec_Add_to+0x40> <== NOT EXECUTED 200c860: b0 06 20 01 inc %i0 <== NOT EXECUTED 200c864: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 200c868: c6 20 40 00 st %g3, [ %g1 ] <== NOT EXECUTED time->tv_sec++; seconds++; } return seconds; } 200c86c: 81 c7 e0 08 ret 200c870: 81 e8 00 00 restore =============================================================================== 0200a2d0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a2d0: 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; 200a2d4: da 06 40 00 ld [ %i1 ], %o5 right += rhs->tv_nsec; 200a2d8: 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; 200a2dc: 99 3b 60 1f sra %o5, 0x1f, %o4 200a2e0: 83 2b 20 03 sll %o4, 3, %g1 200a2e4: 87 2b 60 03 sll %o5, 3, %g3 200a2e8: 89 33 60 1d srl %o5, 0x1d, %g4 200a2ec: 84 11 00 01 or %g4, %g1, %g2 200a2f0: 83 30 e0 1b srl %g3, 0x1b, %g1 200a2f4: 95 28 a0 05 sll %g2, 5, %o2 200a2f8: 97 28 e0 05 sll %g3, 5, %o3 200a2fc: 94 10 40 0a or %g1, %o2, %o2 200a300: 96 a2 c0 03 subcc %o3, %g3, %o3 200a304: 83 32 e0 1a srl %o3, 0x1a, %g1 200a308: 94 62 80 02 subx %o2, %g2, %o2 200a30c: 93 2a e0 06 sll %o3, 6, %o1 200a310: 91 2a a0 06 sll %o2, 6, %o0 200a314: 96 a2 40 0b subcc %o1, %o3, %o3 200a318: 90 10 40 08 or %g1, %o0, %o0 200a31c: 94 62 00 0a subx %o0, %o2, %o2 200a320: 96 82 c0 0d addcc %o3, %o5, %o3 200a324: 83 32 e0 1e srl %o3, 0x1e, %g1 200a328: 94 42 80 0c addx %o2, %o4, %o2 200a32c: bb 2a e0 02 sll %o3, 2, %i5 200a330: b9 2a a0 02 sll %o2, 2, %i4 200a334: 96 82 c0 1d addcc %o3, %i5, %o3 200a338: b8 10 40 1c or %g1, %i4, %i4 200a33c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a340: 94 42 80 1c addx %o2, %i4, %o2 200a344: a3 2a e0 02 sll %o3, 2, %l1 200a348: a1 2a a0 02 sll %o2, 2, %l0 200a34c: 96 82 c0 11 addcc %o3, %l1, %o3 200a350: a0 10 40 10 or %g1, %l0, %l0 200a354: 83 32 e0 1e srl %o3, 0x1e, %g1 200a358: 94 42 80 10 addx %o2, %l0, %o2 200a35c: a7 2a e0 02 sll %o3, 2, %l3 200a360: a5 2a a0 02 sll %o2, 2, %l2 200a364: 96 82 c0 13 addcc %o3, %l3, %o3 200a368: a4 10 40 12 or %g1, %l2, %l2 200a36c: 83 2a e0 09 sll %o3, 9, %g1 200a370: 94 42 80 12 addx %o2, %l2, %o2 200a374: 87 32 e0 17 srl %o3, 0x17, %g3 200a378: 85 2a a0 09 sll %o2, 9, %g2 right += rhs->tv_nsec; 200a37c: 96 80 40 15 addcc %g1, %l5, %o3 200a380: 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; 200a384: 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; 200a388: 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; 200a38c: 94 42 80 14 addx %o2, %l4, %o2 if ( right == 0 ) { 200a390: 80 92 80 0b orcc %o2, %o3, %g0 200a394: 02 80 00 64 be 200a524 <_Timespec_Divide+0x254> <== ALWAYS TAKEN 200a398: 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; 200a39c: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 200a3a0: 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; 200a3a4: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED 200a3a8: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED 200a3ac: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED 200a3b0: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED 200a3b4: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED left += lhs->tv_nsec; 200a3b8: 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; 200a3bc: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 200a3c0: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 200a3c4: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED 200a3c8: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED 200a3cc: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED 200a3d0: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED 200a3d4: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 200a3d8: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 200a3dc: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 200a3e0: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED 200a3e4: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED 200a3e8: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200a3ec: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED 200a3f0: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200a3f4: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200a3f8: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200a3fc: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED 200a400: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED 200a404: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED 200a408: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED 200a40c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200a410: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 200a414: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED 200a418: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED 200a41c: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED 200a420: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED 200a424: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED 200a428: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED 200a42c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200a430: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED 200a434: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED 200a438: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED 200a43c: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED 200a440: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED 200a444: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED 200a448: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED left += lhs->tv_nsec; 200a44c: 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; 200a450: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED left += lhs->tv_nsec; 200a454: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED 200a458: 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; 200a45c: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED 200a460: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED 200a464: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED 200a468: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED 200a46c: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED 200a470: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED 200a474: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED 200a478: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED 200a47c: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED 200a480: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED 200a484: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED 200a488: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED 200a48c: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200a490: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200a494: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200a498: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED 200a49c: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200a4a0: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED 200a4a4: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED 200a4a8: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200a4ac: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200a4b0: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200a4b4: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200a4b8: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200a4bc: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED 200a4c0: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200a4c4: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED 200a4c8: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED 200a4cc: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED 200a4d0: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED 200a4d4: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200a4d8: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200a4dc: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200a4e0: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200a4e4: 40 00 41 f4 call 201acb4 <__udivdi3> <== NOT EXECUTED 200a4e8: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a4ec: 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; 200a4f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200a4f4: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a4f8: 40 00 41 ef call 201acb4 <__udivdi3> <== NOT EXECUTED 200a4fc: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200a500: 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; 200a504: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200a508: 94 10 20 00 clr %o2 <== NOT EXECUTED 200a50c: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200a510: 40 00 42 be call 201b008 <__umoddi3> <== NOT EXECUTED 200a514: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200a518: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED 200a51c: 81 c7 e0 08 ret <== NOT EXECUTED 200a520: 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; 200a524: c0 26 80 00 clr [ %i2 ] *fval_percentage = 0; 200a528: c0 26 c0 00 clr [ %i3 ] return; 200a52c: 81 c7 e0 08 ret 200a530: 81 e8 00 00 restore =============================================================================== 0200c250 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c250: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c254: d4 1e 40 00 ldd [ %i1 ], %o2 200c258: 80 92 80 0b orcc %o2, %o3, %g0 200c25c: 22 80 00 2f be,a 200c318 <_Timestamp64_Divide+0xc8> <== NEVER TAKEN 200c260: 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; 200c264: f8 1e 00 00 ldd [ %i0 ], %i4 200c268: 83 2f 20 02 sll %i4, 2, %g1 200c26c: 9b 2f 60 02 sll %i5, 2, %o5 200c270: 89 37 60 1e srl %i5, 0x1e, %g4 200c274: 98 11 00 01 or %g4, %g1, %o4 200c278: 83 33 60 1b srl %o5, 0x1b, %g1 200c27c: 85 2b 20 05 sll %o4, 5, %g2 200c280: 87 2b 60 05 sll %o5, 5, %g3 200c284: 84 10 40 02 or %g1, %g2, %g2 200c288: 86 a0 c0 0d subcc %g3, %o5, %g3 200c28c: 84 60 80 0c subx %g2, %o4, %g2 200c290: 86 80 c0 1d addcc %g3, %i5, %g3 200c294: 83 30 e0 1e srl %g3, 0x1e, %g1 200c298: 84 40 80 1c addx %g2, %i4, %g2 200c29c: 93 28 e0 02 sll %g3, 2, %o1 200c2a0: 91 28 a0 02 sll %g2, 2, %o0 200c2a4: 86 80 c0 09 addcc %g3, %o1, %g3 200c2a8: 90 10 40 08 or %g1, %o0, %o0 200c2ac: 83 30 e0 1e srl %g3, 0x1e, %g1 200c2b0: 84 40 80 08 addx %g2, %o0, %g2 200c2b4: b3 28 e0 02 sll %g3, 2, %i1 200c2b8: b1 28 a0 02 sll %g2, 2, %i0 200c2bc: 92 80 c0 19 addcc %g3, %i1, %o1 200c2c0: b0 10 40 18 or %g1, %i0, %i0 200c2c4: 87 32 60 1b srl %o1, 0x1b, %g3 200c2c8: 90 40 80 18 addx %g2, %i0, %o0 200c2cc: 83 2a 60 05 sll %o1, 5, %g1 200c2d0: 85 2a 20 05 sll %o0, 5, %g2 200c2d4: 92 10 00 01 mov %g1, %o1 200c2d8: 40 00 41 a4 call 201c968 <__divdi3> 200c2dc: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200c2e0: 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; 200c2e4: b0 10 00 08 mov %o0, %i0 200c2e8: b8 10 00 09 mov %o1, %i4 *_ival_percentage = answer / 1000; 200c2ec: 40 00 41 9f call 201c968 <__divdi3> 200c2f0: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200c2f4: 90 10 00 18 mov %i0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200c2f8: d2 26 80 00 st %o1, [ %i2 ] *_fval_percentage = answer % 1000; 200c2fc: 94 10 20 00 clr %o2 200c300: 96 10 23 e8 mov 0x3e8, %o3 200c304: 40 00 42 7f call 201cd00 <__moddi3> 200c308: 92 10 00 1c mov %i4, %o1 200c30c: d2 26 c0 00 st %o1, [ %i3 ] 200c310: 81 c7 e0 08 ret 200c314: 81 e8 00 00 restore { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; 200c318: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200c31c: 81 c7 e0 08 ret <== NOT EXECUTED 200c320: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200aab8 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 200aab8: 9d e3 bf a0 save %sp, -96, %sp 200aabc: 39 00 80 7d sethi %hi(0x201f400), %i4 200aac0: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List> 200aac4: 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 ); 200aac8: 80 a7 40 1c cmp %i5, %i4 200aacc: 02 80 00 0d be 200ab00 <_User_extensions_Fatal+0x48> <== NEVER TAKEN 200aad0: 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 ) 200aad4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200aad8: 80 a0 60 00 cmp %g1, 0 200aadc: 02 80 00 05 be 200aaf0 <_User_extensions_Fatal+0x38> 200aae0: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 200aae4: 92 10 00 19 mov %i1, %o1 200aae8: 9f c0 40 00 call %g1 200aaec: 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 ) { 200aaf0: 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 ); 200aaf4: 80 a7 40 1c cmp %i5, %i4 200aaf8: 32 bf ff f8 bne,a 200aad8 <_User_extensions_Fatal+0x20> 200aafc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200ab00: 81 c7 e0 08 ret 200ab04: 81 e8 00 00 restore =============================================================================== 0200a964 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200a964: 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; 200a968: 07 00 80 79 sethi %hi(0x201e400), %g3 200a96c: 86 10 e3 5c or %g3, 0x35c, %g3 ! 201e75c initial_extensions = Configuration.User_extension_table; 200a970: f6 00 e0 40 ld [ %g3 + 0x40 ], %i3 200a974: 3b 00 80 7d sethi %hi(0x201f400), %i5 200a978: 09 00 80 7d sethi %hi(0x201f400), %g4 200a97c: 84 17 62 a8 or %i5, 0x2a8, %g2 200a980: 82 11 20 c4 or %g4, 0xc4, %g1 200a984: b4 00 a0 04 add %g2, 4, %i2 200a988: b8 00 60 04 add %g1, 4, %i4 200a98c: f4 27 62 a8 st %i2, [ %i5 + 0x2a8 ] head->previous = NULL; 200a990: c0 20 a0 04 clr [ %g2 + 4 ] tail->previous = head; 200a994: 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; 200a998: f8 21 20 c4 st %i4, [ %g4 + 0xc4 ] head->previous = NULL; 200a99c: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200a9a0: c2 20 60 08 st %g1, [ %g1 + 8 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200a9a4: 80 a6 e0 00 cmp %i3, 0 200a9a8: 02 80 00 1b be 200aa14 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200a9ac: f4 00 e0 3c ld [ %g3 + 0x3c ], %i2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200a9b0: 83 2e a0 02 sll %i2, 2, %g1 200a9b4: b9 2e a0 04 sll %i2, 4, %i4 200a9b8: b8 27 00 01 sub %i4, %g1, %i4 200a9bc: b8 07 00 1a add %i4, %i2, %i4 200a9c0: 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 *) 200a9c4: 40 00 01 9c call 200b034 <_Workspace_Allocate_or_fatal_error> 200a9c8: 90 10 00 1c mov %i4, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200a9cc: 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 *) 200a9d0: ba 10 00 08 mov %o0, %i5 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200a9d4: 40 00 1d 97 call 2012030 200a9d8: 94 10 00 1c mov %i4, %o2 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200a9dc: 80 a6 a0 00 cmp %i2, 0 200a9e0: 02 80 00 0d be 200aa14 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200a9e4: 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; 200a9e8: 92 10 00 1b mov %i3, %o1 200a9ec: 94 10 20 20 mov 0x20, %o2 200a9f0: 40 00 1d 54 call 2011f40 200a9f4: 90 07 60 14 add %i5, 0x14, %o0 _User_extensions_Add_set( extension ); 200a9f8: 40 00 11 62 call 200ef80 <_User_extensions_Add_set> 200a9fc: 90 10 00 1d mov %i5, %o0 200aa00: b8 07 20 01 inc %i4 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200aa04: 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++ ) { 200aa08: 80 a7 00 1a cmp %i4, %i2 200aa0c: 12 bf ff f7 bne 200a9e8 <_User_extensions_Handler_initialization+0x84> 200aa10: b6 06 e0 20 add %i3, 0x20, %i3 200aa14: 81 c7 e0 08 ret 200aa18: 81 e8 00 00 restore =============================================================================== 0200aa1c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 200aa1c: 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; 200aa20: 39 00 80 7d sethi %hi(0x201f400), %i4 200aa24: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List> 200aa28: b8 17 22 a8 or %i4, 0x2a8, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200aa2c: b8 07 20 04 add %i4, 4, %i4 200aa30: 80 a7 40 1c cmp %i5, %i4 200aa34: 02 80 00 0c be 200aa64 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 200aa38: 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 ) 200aa3c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200aa40: 80 a0 60 00 cmp %g1, 0 200aa44: 02 80 00 04 be 200aa54 <_User_extensions_Thread_begin+0x38> 200aa48: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 200aa4c: 9f c0 40 00 call %g1 200aa50: 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 ) { 200aa54: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200aa58: 80 a7 40 1c cmp %i5, %i4 200aa5c: 32 bf ff f9 bne,a 200aa40 <_User_extensions_Thread_begin+0x24> 200aa60: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200aa64: 81 c7 e0 08 ret 200aa68: 81 e8 00 00 restore =============================================================================== 0200ab08 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 200ab08: 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; 200ab0c: 39 00 80 7d sethi %hi(0x201f400), %i4 200ab10: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List> 200ab14: b8 17 22 a8 or %i4, 0x2a8, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 200ab18: b8 07 20 04 add %i4, 4, %i4 200ab1c: 80 a7 40 1c cmp %i5, %i4 200ab20: 02 80 00 12 be 200ab68 <_User_extensions_Thread_create+0x60><== NEVER TAKEN 200ab24: 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)( 200ab28: 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_create != NULL ) { 200ab2c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200ab30: 80 a0 60 00 cmp %g1, 0 200ab34: 02 80 00 08 be 200ab54 <_User_extensions_Thread_create+0x4c> 200ab38: 84 16 e2 00 or %i3, 0x200, %g2 status = (*the_extension->Callouts.thread_create)( 200ab3c: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200ab40: 9f c0 40 00 call %g1 200ab44: 92 10 00 18 mov %i0, %o1 _Thread_Executing, the_thread ); if ( !status ) 200ab48: 80 8a 20 ff btst 0xff, %o0 200ab4c: 02 80 00 0a be 200ab74 <_User_extensions_Thread_create+0x6c> 200ab50: 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 ) { 200ab54: 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 ); 200ab58: 80 a7 40 1c cmp %i5, %i4 200ab5c: 32 bf ff f5 bne,a 200ab30 <_User_extensions_Thread_create+0x28> 200ab60: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 if ( !status ) return false; } } return true; 200ab64: 82 10 20 01 mov 1, %g1 } 200ab68: b0 08 60 01 and %g1, 1, %i0 200ab6c: 81 c7 e0 08 ret 200ab70: 81 e8 00 00 restore 200ab74: b0 08 60 01 and %g1, 1, %i0 200ab78: 81 c7 e0 08 ret 200ab7c: 81 e8 00 00 restore =============================================================================== 0200ab80 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 200ab80: 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; 200ab84: 39 00 80 7d sethi %hi(0x201f400), %i4 200ab88: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List> 200ab8c: 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 ); 200ab90: 80 a7 40 1c cmp %i5, %i4 200ab94: 02 80 00 0d be 200abc8 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 200ab98: 37 00 80 7e sethi %hi(0x201f800), %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 ) 200ab9c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200aba0: 80 a0 60 00 cmp %g1, 0 200aba4: 02 80 00 05 be 200abb8 <_User_extensions_Thread_delete+0x38> 200aba8: 84 16 e2 00 or %i3, 0x200, %g2 (*the_extension->Callouts.thread_delete)( 200abac: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200abb0: 9f c0 40 00 call %g1 200abb4: 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 ) { 200abb8: 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 ); 200abbc: 80 a7 40 1c cmp %i5, %i4 200abc0: 32 bf ff f8 bne,a 200aba0 <_User_extensions_Thread_delete+0x20> 200abc4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200abc8: 81 c7 e0 08 ret 200abcc: 81 e8 00 00 restore =============================================================================== 0200aa6c <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 200aa6c: 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; 200aa70: 39 00 80 7d sethi %hi(0x201f400), %i4 200aa74: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List> 200aa78: 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 ); 200aa7c: 80 a7 40 1c cmp %i5, %i4 200aa80: 02 80 00 0c be 200aab0 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 200aa84: 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 ) 200aa88: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200aa8c: 80 a0 60 00 cmp %g1, 0 200aa90: 02 80 00 04 be 200aaa0 <_User_extensions_Thread_exitted+0x34> 200aa94: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 200aa98: 9f c0 40 00 call %g1 200aa9c: 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 ) { 200aaa0: 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 ); 200aaa4: 80 a7 40 1c cmp %i5, %i4 200aaa8: 32 bf ff f9 bne,a 200aa8c <_User_extensions_Thread_exitted+0x20> 200aaac: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200aab0: 81 c7 e0 08 ret 200aab4: 81 e8 00 00 restore =============================================================================== 0200b410 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200b410: 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; 200b414: 39 00 80 80 sethi %hi(0x2020000), %i4 200b418: fa 07 21 b8 ld [ %i4 + 0x1b8 ], %i5 ! 20201b8 <_User_extensions_List> 200b41c: b8 17 21 b8 or %i4, 0x1b8, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b420: b8 07 20 04 add %i4, 4, %i4 200b424: 80 a7 40 1c cmp %i5, %i4 200b428: 02 80 00 0d be 200b45c <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200b42c: 37 00 80 81 sethi %hi(0x2020400), %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 ) 200b430: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200b434: 80 a0 60 00 cmp %g1, 0 200b438: 02 80 00 05 be 200b44c <_User_extensions_Thread_restart+0x3c> 200b43c: 84 16 e1 10 or %i3, 0x110, %g2 (*the_extension->Callouts.thread_restart)( 200b440: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b444: 9f c0 40 00 call %g1 200b448: 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 ) { 200b44c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b450: 80 a7 40 1c cmp %i5, %i4 200b454: 32 bf ff f8 bne,a 200b434 <_User_extensions_Thread_restart+0x24> 200b458: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200b45c: 81 c7 e0 08 ret 200b460: 81 e8 00 00 restore =============================================================================== 0200abd0 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 200abd0: 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; 200abd4: 39 00 80 7d sethi %hi(0x201f400), %i4 200abd8: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List> 200abdc: b8 17 22 a8 or %i4, 0x2a8, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200abe0: b8 07 20 04 add %i4, 4, %i4 200abe4: 80 a7 40 1c cmp %i5, %i4 200abe8: 02 80 00 0d be 200ac1c <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 200abec: 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_start != NULL ) 200abf0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200abf4: 80 a0 60 00 cmp %g1, 0 200abf8: 02 80 00 05 be 200ac0c <_User_extensions_Thread_start+0x3c> 200abfc: 84 16 e2 00 or %i3, 0x200, %g2 (*the_extension->Callouts.thread_start)( 200ac00: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200ac04: 9f c0 40 00 call %g1 200ac08: 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 ) { 200ac0c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200ac10: 80 a7 40 1c cmp %i5, %i4 200ac14: 32 bf ff f8 bne,a 200abf4 <_User_extensions_Thread_start+0x24> 200ac18: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200ac1c: 81 c7 e0 08 ret 200ac20: 81 e8 00 00 restore =============================================================================== 0200ac24 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 200ac24: 9d e3 bf a0 save %sp, -96, %sp 200ac28: 39 00 80 7d sethi %hi(0x201f400), %i4 200ac2c: fa 07 20 c4 ld [ %i4 + 0xc4 ], %i5 ! 201f4c4 <_User_extensions_Switches_list> 200ac30: b8 17 20 c4 or %i4, 0xc4, %i4 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 200ac34: b8 07 20 04 add %i4, 4, %i4 200ac38: 80 a7 40 1c cmp %i5, %i4 200ac3c: 02 80 00 0a be 200ac64 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200ac40: 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 ); 200ac44: c2 07 60 08 ld [ %i5 + 8 ], %g1 200ac48: 90 10 00 18 mov %i0, %o0 200ac4c: 9f c0 40 00 call %g1 200ac50: 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 ) { 200ac54: 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 ); 200ac58: 80 a7 40 1c cmp %i5, %i4 200ac5c: 32 bf ff fb bne,a 200ac48 <_User_extensions_Thread_switch+0x24> 200ac60: c2 07 60 08 ld [ %i5 + 8 ], %g1 200ac64: 81 c7 e0 08 ret 200ac68: 81 e8 00 00 restore =============================================================================== 0200c66c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c66c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c670: 7f ff db 0e call 20032a8 200c674: 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; 200c678: 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 ); 200c67c: 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 ) ) { 200c680: 80 a0 40 1b cmp %g1, %i3 200c684: 02 80 00 1e be 200c6fc <_Watchdog_Adjust+0x90> 200c688: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c68c: 12 80 00 1e bne 200c704 <_Watchdog_Adjust+0x98> 200c690: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c694: 80 a6 a0 00 cmp %i2, 0 200c698: 02 80 00 19 be 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200c69c: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200c6a0: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200c6a4: 80 a6 80 1c cmp %i2, %i4 200c6a8: 1a 80 00 0a bcc 200c6d0 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN 200c6ac: b2 10 20 01 mov 1, %i1 _Watchdog_First( header )->delta_interval -= units; 200c6b0: 10 80 00 1c b 200c720 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED 200c6b4: 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 ) { 200c6b8: 02 80 00 11 be 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200c6bc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200c6c0: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200c6c4: 80 a7 00 1a cmp %i4, %i2 200c6c8: 38 80 00 16 bgu,a 200c720 <_Watchdog_Adjust+0xb4> 200c6cc: 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; 200c6d0: f2 20 60 10 st %i1, [ %g1 + 0x10 ] _ISR_Enable( level ); 200c6d4: 7f ff da f9 call 20032b8 200c6d8: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c6dc: 40 00 00 ab call 200c988 <_Watchdog_Tickle> 200c6e0: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200c6e4: 7f ff da f1 call 20032a8 200c6e8: 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; 200c6ec: c2 07 40 00 ld [ %i5 ], %g1 if ( _Chain_Is_empty( header ) ) 200c6f0: 80 a6 c0 01 cmp %i3, %g1 200c6f4: 32 bf ff f1 bne,a 200c6b8 <_Watchdog_Adjust+0x4c> 200c6f8: b4 a6 80 1c subcc %i2, %i4, %i2 } break; } } _ISR_Enable( level ); 200c6fc: 7f ff da ef call 20032b8 200c700: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200c704: 12 bf ff fe bne 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200c708: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c70c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c710: b4 00 80 1a add %g2, %i2, %i2 200c714: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200c718: 7f ff da e8 call 20032b8 200c71c: 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; 200c720: 10 bf ff f7 b 200c6fc <_Watchdog_Adjust+0x90> 200c724: f8 20 60 10 st %i4, [ %g1 + 0x10 ] =============================================================================== 0200adf4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200adf4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200adf8: 7f ff dd d9 call 200255c 200adfc: 01 00 00 00 nop previous_state = the_watchdog->state; 200ae00: fa 06 20 08 ld [ %i0 + 8 ], %i5 switch ( previous_state ) { 200ae04: 80 a7 60 01 cmp %i5, 1 200ae08: 02 80 00 2a be 200aeb0 <_Watchdog_Remove+0xbc> 200ae0c: 03 00 80 7d sethi %hi(0x201f400), %g1 200ae10: 1a 80 00 09 bcc 200ae34 <_Watchdog_Remove+0x40> 200ae14: 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; 200ae18: 03 00 80 7d sethi %hi(0x201f400), %g1 200ae1c: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201f5d0 <_Watchdog_Ticks_since_boot> 200ae20: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200ae24: 7f ff dd d2 call 200256c 200ae28: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200ae2c: 81 c7 e0 08 ret 200ae30: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200ae34: 18 bf ff fa bgu 200ae1c <_Watchdog_Remove+0x28> <== NEVER TAKEN 200ae38: 03 00 80 7d sethi %hi(0x201f400), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 200ae3c: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200ae40: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200ae44: c4 00 40 00 ld [ %g1 ], %g2 200ae48: 80 a0 a0 00 cmp %g2, 0 200ae4c: 02 80 00 07 be 200ae68 <_Watchdog_Remove+0x74> 200ae50: 05 00 80 7d sethi %hi(0x201f400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200ae54: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200ae58: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200ae5c: 84 00 c0 02 add %g3, %g2, %g2 200ae60: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200ae64: 05 00 80 7d sethi %hi(0x201f400), %g2 200ae68: c4 00 a1 cc ld [ %g2 + 0x1cc ], %g2 ! 201f5cc <_Watchdog_Sync_count> 200ae6c: 80 a0 a0 00 cmp %g2, 0 200ae70: 22 80 00 07 be,a 200ae8c <_Watchdog_Remove+0x98> 200ae74: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200ae78: 05 00 80 7e sethi %hi(0x201f800), %g2 200ae7c: c6 00 a2 08 ld [ %g2 + 0x208 ], %g3 ! 201fa08 <_Per_CPU_Information+0x8> 200ae80: 05 00 80 7d sethi %hi(0x201f400), %g2 200ae84: c6 20 a1 6c st %g3, [ %g2 + 0x16c ] ! 201f56c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200ae88: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; 200ae8c: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200ae90: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200ae94: 03 00 80 7d sethi %hi(0x201f400), %g1 200ae98: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201f5d0 <_Watchdog_Ticks_since_boot> 200ae9c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200aea0: 7f ff dd b3 call 200256c 200aea4: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200aea8: 81 c7 e0 08 ret 200aeac: 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; 200aeb0: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %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; 200aeb4: 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; 200aeb8: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200aebc: 7f ff dd ac call 200256c 200aec0: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200aec4: 81 c7 e0 08 ret 200aec8: 81 e8 00 00 restore =============================================================================== 0200c00c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c00c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c010: 7f ff db 87 call 2002e2c 200c014: 01 00 00 00 nop 200c018: ba 10 00 08 mov %o0, %i5 printk( "Watchdog Chain: %s %p\n", name, header ); 200c01c: 11 00 80 7c sethi %hi(0x201f000), %o0 200c020: 94 10 00 19 mov %i1, %o2 200c024: 92 10 00 18 mov %i0, %o1 200c028: 7f ff e3 22 call 2004cb0 200c02c: 90 12 23 80 or %o0, 0x380, %o0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c030: 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 ); 200c034: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200c038: 80 a7 00 19 cmp %i4, %i1 200c03c: 02 80 00 0f be 200c078 <_Watchdog_Report_chain+0x6c> 200c040: 11 00 80 7c sethi %hi(0x201f000), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c044: 92 10 00 1c mov %i4, %o1 200c048: 40 00 00 0f call 200c084 <_Watchdog_Report> 200c04c: 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 ) 200c050: 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 ) ; 200c054: 80 a7 00 19 cmp %i4, %i1 200c058: 12 bf ff fc bne 200c048 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200c05c: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c060: 11 00 80 7c sethi %hi(0x201f000), %o0 200c064: 92 10 00 18 mov %i0, %o1 200c068: 7f ff e3 12 call 2004cb0 200c06c: 90 12 23 98 or %o0, 0x398, %o0 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200c070: 7f ff db 73 call 2002e3c 200c074: 91 e8 00 1d restore %g0, %i5, %o0 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200c078: 7f ff e3 0e call 2004cb0 200c07c: 90 12 23 a8 or %o0, 0x3a8, %o0 200c080: 30 bf ff fc b,a 200c070 <_Watchdog_Report_chain+0x64> =============================================================================== 0200af74 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 200af74: 9d e3 bf a0 save %sp, -96, %sp uintptr_t memory_available = 0; void *starting_address = rtems_configuration_get_work_space_start(); 200af78: 05 00 80 79 sethi %hi(0x201e400), %g2 200af7c: 82 10 a3 5c or %g2, 0x35c, %g1 ! 201e75c uintptr_t size = rtems_configuration_get_work_space_size(); 200af80: c6 08 60 2e ldub [ %g1 + 0x2e ], %g3 * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { uintptr_t memory_available = 0; void *starting_address = rtems_configuration_get_work_space_start(); 200af84: f8 00 a3 5c ld [ %g2 + 0x35c ], %i4 uintptr_t size = rtems_configuration_get_work_space_size(); 200af88: fa 00 60 04 ld [ %g1 + 4 ], %i5 200af8c: 80 a0 e0 00 cmp %g3, 0 200af90: 12 80 00 03 bne 200af9c <_Workspace_Handler_initialization+0x28><== NEVER TAKEN 200af94: 84 10 20 00 clr %g2 200af98: c4 00 60 08 ld [ %g1 + 8 ], %g2 if ( rtems_configuration_get_do_zero_of_workspace() ) 200af9c: c2 08 60 2c ldub [ %g1 + 0x2c ], %g1 200afa0: 80 a0 60 00 cmp %g1, 0 200afa4: 12 80 00 0d bne 200afd8 <_Workspace_Handler_initialization+0x64> 200afa8: ba 00 80 1d add %g2, %i5, %i5 memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 200afac: 92 10 00 1c mov %i4, %o1 200afb0: 11 00 80 7d sethi %hi(0x201f400), %o0 200afb4: 94 10 00 1d mov %i5, %o2 200afb8: 90 12 20 e0 or %o0, 0xe0, %o0 200afbc: 7f ff f5 6b call 2008568 <_Heap_Initialize> 200afc0: 96 10 20 08 mov 8, %o3 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 200afc4: 80 a2 20 00 cmp %o0, 0 200afc8: 02 80 00 0a be 200aff0 <_Workspace_Handler_initialization+0x7c> 200afcc: 92 10 20 01 mov 1, %o1 200afd0: 81 c7 e0 08 ret 200afd4: 81 e8 00 00 restore uintptr_t memory_available = 0; void *starting_address = rtems_configuration_get_work_space_start(); uintptr_t size = rtems_configuration_get_work_space_size(); if ( rtems_configuration_get_do_zero_of_workspace() ) memset( starting_address, 0, size ); 200afd8: 90 10 00 1c mov %i4, %o0 200afdc: 92 10 20 00 clr %o1 200afe0: 40 00 1c 14 call 2012030 200afe4: 94 10 00 1d mov %i5, %o2 memory_available = _Heap_Initialize( 200afe8: 10 bf ff f2 b 200afb0 <_Workspace_Handler_initialization+0x3c> 200afec: 92 10 00 1c mov %i4, %o1 size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 200aff0: 7f ff f6 07 call 200880c <_Internal_error_Occurred> 200aff4: 94 10 20 02 mov 2, %o2 =============================================================================== 0200ce24 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 200ce24: 9d e3 bf a0 save %sp, -96, %sp ) { rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 200ce28: 03 00 80 7a sethi %hi(0x201e800), %g1 200ce2c: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c 200ce30: 80 a6 40 01 cmp %i1, %g1 200ce34: 1a 80 00 14 bcc 200ce84 <_close_r+0x60> <== NEVER TAKEN 200ce38: 03 00 80 7c sethi %hi(0x201f000), %g1 iop = rtems_libio_iop(fd); 200ce3c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 201f2f8 200ce40: b3 2e 60 06 sll %i1, 6, %i1 200ce44: b2 00 40 19 add %g1, %i1, %i1 rtems_libio_check_is_open(iop); 200ce48: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ce4c: 80 88 61 00 btst 0x100, %g1 200ce50: 02 80 00 0d be 200ce84 <_close_r+0x60> 200ce54: 01 00 00 00 nop rc = RTEMS_SUCCESSFUL; rc = (*iop->pathinfo.handlers->close_h)( iop ); 200ce58: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 200ce5c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ce60: 9f c0 40 00 call %g1 200ce64: 90 10 00 19 mov %i1, %o0 200ce68: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &iop->pathinfo ); 200ce6c: 7f ff d9 1a call 20032d4 200ce70: 90 06 60 1c add %i1, 0x1c, %o0 rtems_libio_free( iop ); 200ce74: 40 00 00 96 call 200d0cc 200ce78: 90 10 00 19 mov %i1, %o0 struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); } 200ce7c: 81 c7 e0 08 ret 200ce80: 81 e8 00 00 restore rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 200ce84: 40 00 11 d3 call 20115d0 <__errno> 200ce88: b0 10 3f ff mov -1, %i0 200ce8c: 82 10 20 09 mov 9, %g1 200ce90: c2 22 00 00 st %g1, [ %o0 ] 200ce94: 81 c7 e0 08 ret 200ce98: 81 e8 00 00 restore =============================================================================== 020152f8 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 20152f8: 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; 20152fc: 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; 2015300: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2015304: 80 a6 e0 00 cmp %i3, 0 2015308: 12 80 00 12 bne 2015350 <_fat_block_read+0x58> <== ALWAYS TAKEN 201530c: b0 10 20 00 clr %i0 2015310: 30 80 00 1a b,a 2015378 <_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)); 2015314: e0 17 40 00 lduh [ %i5 ], %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2015318: 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)); 201531c: a0 24 00 1a sub %l0, %i2, %l0 2015320: 80 a4 00 1b cmp %l0, %i3 2015324: 08 80 00 03 bleu 2015330 <_fat_block_read+0x38> 2015328: b2 06 60 01 inc %i1 201532c: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2015330: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2015334: 94 10 00 10 mov %l0, %o2 2015338: 40 00 30 4f call 2021474 201533c: 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) 2015340: b6 a6 c0 10 subcc %i3, %l0, %i3 2015344: 02 80 00 0d be 2015378 <_fat_block_read+0x80> 2015348: b0 04 00 18 add %l0, %i0, %i0 memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; 201534c: 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); 2015350: 92 10 00 19 mov %i1, %o1 2015354: 94 10 20 01 mov 1, %o2 2015358: 96 07 bf fc add %fp, -4, %o3 201535c: 7f ff ff 57 call 20150b8 2015360: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 2015364: 80 a2 20 00 cmp %o0, 0 2015368: 02 bf ff eb be 2015314 <_fat_block_read+0x1c> <== ALWAYS TAKEN 201536c: 90 07 00 18 add %i4, %i0, %o0 cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2015370: 81 c7 e0 08 ret <== NOT EXECUTED 2015374: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 2015378: 81 c7 e0 08 ret 201537c: 81 e8 00 00 restore =============================================================================== 0201543c <_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; 201543c: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2015440: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED 2015444: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2015448: 02 80 00 05 be 201545c <_fat_block_release+0x20> <== NOT EXECUTED 201544c: 01 00 00 00 nop <== NOT EXECUTED 2015450: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2015454: 7f ff fe c2 call 2014f5c <== NOT EXECUTED 2015458: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED _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); } 201545c: 81 c3 e0 08 retl <== NOT EXECUTED 2015460: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02015380 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2015380: 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; 2015384: 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; 2015388: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 201538c: 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) 2015390: 80 a6 e0 00 cmp %i3, 0 2015394: 12 80 00 14 bne 20153e4 <_fat_block_write+0x64> <== ALWAYS TAKEN 2015398: b0 10 20 00 clr %i0 201539c: 30 80 00 26 b,a 2015434 <_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); 20153a0: 96 07 bf fc add %fp, -4, %o3 20153a4: 7f ff ff 45 call 20150b8 20153a8: 90 10 00 10 mov %l0, %o0 if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 20153ac: 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) 20153b0: 80 a2 20 00 cmp %o0, 0 20153b4: 12 80 00 1e bne 201542c <_fat_block_write+0xac> <== NEVER TAKEN 20153b8: 94 10 00 1d mov %i5, %o2 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 20153bc: c2 07 bf fc ld [ %fp + -4 ], %g1 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 20153c0: 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); 20153c4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 20153c8: 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); 20153cc: 40 00 30 2a call 2021474 20153d0: 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) 20153d4: b6 a6 c0 1d subcc %i3, %i5, %i3 20153d8: 02 80 00 17 be 2015434 <_fat_block_write+0xb4> 20153dc: e2 2c 20 84 stb %l1, [ %l0 + 0x84 ] fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 20153e0: 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)); 20153e4: c2 14 00 00 lduh [ %l0 ], %g1 20153e8: ba 20 40 1a sub %g1, %i2, %i5 20153ec: 80 a7 40 1b cmp %i5, %i3 20153f0: 08 80 00 03 bleu 20153fc <_fat_block_write+0x7c> 20153f4: 92 10 00 19 mov %i1, %o1 20153f8: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bps) 20153fc: 80 a0 40 1d cmp %g1, %i5 2015400: 32 bf ff e8 bne,a 20153a0 <_fat_block_write+0x20> 2015404: 94 10 20 01 mov 1, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2015408: 92 10 00 19 mov %i1, %o1 201540c: 94 10 20 02 mov 2, %o2 2015410: 90 10 00 10 mov %l0, %o0 2015414: 7f ff ff 29 call 20150b8 2015418: 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); 201541c: 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) 2015420: 80 a2 20 00 cmp %o0, 0 2015424: 02 bf ff e6 be 20153bc <_fat_block_write+0x3c> <== ALWAYS TAKEN 2015428: 94 10 00 1d mov %i5, %o2 cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 201542c: 81 c7 e0 08 ret <== NOT EXECUTED 2015430: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 2015434: 81 c7 e0 08 ret 2015438: 81 e8 00 00 restore =============================================================================== 0201bbb8 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 201bbb8: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 201bbbc: 80 a6 a0 00 cmp %i2, 0 201bbc0: 02 80 00 1d be 201bc34 <_fstat_r+0x7c> <== NEVER TAKEN 201bbc4: 03 00 80 7a sethi %hi(0x201e800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 201bbc8: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c 201bbcc: 80 a6 40 01 cmp %i1, %g1 201bbd0: 1a 80 00 13 bcc 201bc1c <_fstat_r+0x64> <== NEVER TAKEN 201bbd4: 03 00 80 7c sethi %hi(0x201f000), %g1 201bbd8: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 201f2f8 201bbdc: b3 2e 60 06 sll %i1, 6, %i1 201bbe0: b2 00 40 19 add %g1, %i1, %i1 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201bbe4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 201bbe8: 80 88 61 00 btst 0x100, %g1 201bbec: 02 80 00 0c be 201bc1c <_fstat_r+0x64> <== NEVER TAKEN 201bbf0: 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) ); 201bbf4: 92 10 20 00 clr %o1 201bbf8: 7f ff d9 0e call 2012030 201bbfc: 90 10 00 1a mov %i2, %o0 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 201bc00: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 201bc04: 90 06 60 1c add %i1, 0x1c, %o0 201bc08: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201bc0c: 9f c0 40 00 call %g1 201bc10: 92 10 00 1a mov %i2, %o1 int fd, struct stat *buf ) { return fstat( fd, buf ); } 201bc14: 81 c7 e0 08 ret 201bc18: 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); 201bc1c: 7f ff d6 6d call 20115d0 <__errno> <== NOT EXECUTED 201bc20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201bc24: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 201bc28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201bc2c: 81 c7 e0 08 ret <== NOT EXECUTED 201bc30: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 201bc34: 7f ff d6 67 call 20115d0 <__errno> <== NOT EXECUTED 201bc38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201bc3c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 201bc40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201bc44: 81 c7 e0 08 ret <== NOT EXECUTED 201bc48: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020034c8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 20034c8: 9d e3 bf 98 save %sp, -104, %sp struct timeval *tp, void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 20034cc: b6 96 20 00 orcc %i0, 0, %i3 20034d0: 02 80 00 1e be 2003548 <_gettimeofday+0x80> <== ALWAYS TAKEN 20034d4: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 20034d8: 7f ff fc 21 call 200255c <== NOT EXECUTED 20034dc: 01 00 00 00 nop <== NOT EXECUTED 20034e0: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 20034e4: 40 00 13 66 call 200827c <_TOD_Get_as_timestamp> <== NOT EXECUTED 20034e8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 20034ec: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED _TOD_Get( &now ); _ISR_Enable(level); 20034f0: 7f ff fc 1f call 200256c <== NOT EXECUTED 20034f4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 20034f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20034fc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2003500: 94 10 20 00 clr %o2 <== NOT EXECUTED 2003504: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 <== NOT EXECUTED 2003508: 40 00 5d 1d call 201a97c <__divdi3> <== NOT EXECUTED 200350c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003510: 94 10 20 00 clr %o2 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2003514: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003518: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200351c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2003520: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 <== NOT EXECUTED 2003524: 40 00 5d fc call 201ad14 <__moddi3> <== NOT EXECUTED 2003528: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <== NOT EXECUTED * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 200352c: b0 10 20 00 clr %i0 <== NOT EXECUTED useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2003530: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2003534: 40 00 5b bc call 201a424 <.div> <== NOT EXECUTED 2003538: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED time->tv_sec = now.tv_sec; time->tv_usec = useconds; 200353c: d0 26 e0 04 st %o0, [ %i3 + 4 ] <== NOT EXECUTED struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); } 2003540: 81 c7 e0 08 ret <== NOT EXECUTED 2003544: 81 e8 00 00 restore <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 2003548: 40 00 38 22 call 20115d0 <__errno> 200354c: b0 10 3f ff mov -1, %i0 2003550: 82 10 20 0e mov 0xe, %g1 2003554: c2 22 00 00 st %g1, [ %o0 ] 2003558: 81 c7 e0 08 ret 200355c: 81 e8 00 00 restore =============================================================================== 02003430 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 2003430: 9d e3 bf 98 save %sp, -104, %sp struct timeval *tp, void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 2003434: 80 a6 60 00 cmp %i1, 0 2003438: 02 80 00 1e be 20034b0 <_gettimeofday_r+0x80> <== NEVER TAKEN 200343c: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 2003440: 7f ff fc 47 call 200255c 2003444: 01 00 00 00 nop 2003448: b6 10 00 08 mov %o0, %i3 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 200344c: 40 00 13 8c call 200827c <_TOD_Get_as_timestamp> 2003450: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2003454: f8 1f bf f8 ldd [ %fp + -8 ], %i4 _TOD_Get( &now ); _ISR_Enable(level); 2003458: 7f ff fc 45 call 200256c 200345c: 90 10 00 1b mov %i3, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2003460: 90 10 00 1c mov %i4, %o0 2003464: 92 10 00 1d mov %i5, %o1 2003468: 94 10 20 00 clr %o2 200346c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2003470: 40 00 5d 43 call 201a97c <__divdi3> 2003474: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003478: 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); 200347c: d2 26 40 00 st %o1, [ %i1 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003480: 90 10 00 1c mov %i4, %o0 2003484: 92 10 00 1d mov %i5, %o1 2003488: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 200348c: 40 00 5e 22 call 201ad14 <__moddi3> 2003490: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 2003494: b0 10 20 00 clr %i0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2003498: 90 10 00 09 mov %o1, %o0 200349c: 40 00 5b e2 call 201a424 <.div> 20034a0: 92 10 23 e8 mov 0x3e8, %o1 time->tv_sec = now.tv_sec; time->tv_usec = useconds; 20034a4: d0 26 60 04 st %o0, [ %i1 + 4 ] struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); } 20034a8: 81 c7 e0 08 ret 20034ac: 81 e8 00 00 restore void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 20034b0: 40 00 38 48 call 20115d0 <__errno> <== NOT EXECUTED 20034b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20034b8: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 20034bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20034c0: 81 c7 e0 08 ret <== NOT EXECUTED 20034c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02005aec <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 2005aec: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2005af0: 80 a6 a0 00 cmp %i2, 0 2005af4: 02 80 00 1b be 2005b60 <_lstat_r+0x74> <== ALWAYS TAKEN 2005af8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 2005afc: 40 00 3f 5c call 201586c <== NOT EXECUTED 2005b00: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2005b04: 94 10 20 00 clr %o2 <== NOT EXECUTED 2005b08: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 2005b0c: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED 2005b10: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2005b14: 98 10 20 00 clr %o4 <== NOT EXECUTED 2005b18: 7f ff fd 6e call 20050d0 <== NOT EXECUTED 2005b1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2005b20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005b24: 12 80 00 0d bne 2005b58 <_lstat_r+0x6c> <== NOT EXECUTED 2005b28: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 2005b2c: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED 2005b30: 40 00 3b ec call 2014ae0 <== NOT EXECUTED 2005b34: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 2005b38: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2005b3c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2005b40: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 2005b44: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005b48: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 2005b4c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2005b50: 7f ff fe 08 call 2005370 <== NOT EXECUTED 2005b54: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); } 2005b58: 81 c7 e0 08 ret <== NOT EXECUTED 2005b5c: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 2005b60: 40 00 39 48 call 2014080 <__errno> 2005b64: b0 10 3f ff mov -1, %i0 2005b68: 82 10 20 0e mov 0xe, %g1 2005b6c: c2 22 00 00 st %g1, [ %o0 ] 2005b70: 81 c7 e0 08 ret 2005b74: 81 e8 00 00 restore =============================================================================== 020224ac <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 20224ac: 9d e3 bf 58 save %sp, -168, %sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 20224b0: 7f ff 8b ea call 2005458 20224b4: 90 10 00 19 mov %i1, %o0 if ( old_parent_pathlen == 0 ) 20224b8: 80 a2 20 00 cmp %o0, 0 20224bc: 12 80 00 2b bne 2022568 <_rename_r+0xbc> 20224c0: b8 10 00 08 mov %o0, %i4 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 20224c4: ba 07 bf d0 add %fp, -48, %i5 20224c8: 90 10 00 19 mov %i1, %o0 20224cc: 92 07 bf f8 add %fp, -8, %o1 20224d0: 94 10 00 1d mov %i5, %o2 20224d4: 7f ff 93 58 call 2007234 20224d8: b8 10 20 00 clr %i4 rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 20224dc: b6 10 20 00 clr %i3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20224e0: c2 07 bf d0 ld [ %fp + -48 ], %g1 name = old + old_parent_pathlen; 20224e4: b2 06 40 1c add %i1, %i4, %i1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20224e8: c2 27 bf bc st %g1, [ %fp + -68 ] 20224ec: c2 07 bf d4 ld [ %fp + -44 ], %g1 name = old + old_parent_pathlen; 20224f0: f2 27 bf fc st %i1, [ %fp + -4 ] /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20224f4: c2 27 bf c0 st %g1, [ %fp + -64 ] 20224f8: c2 07 bf d8 ld [ %fp + -40 ], %g1 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 20224fc: 90 10 00 19 mov %i1, %o0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 2022500: c2 27 bf c4 st %g1, [ %fp + -60 ] 2022504: c2 07 bf dc ld [ %fp + -36 ], %g1 2022508: c2 27 bf c8 st %g1, [ %fp + -56 ] 202250c: c2 07 bf e0 ld [ %fp + -32 ], %g1 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 2022510: 7f ff cd 0b call 201593c 2022514: c2 27 bf cc st %g1, [ %fp + -52 ] 2022518: 92 10 00 08 mov %o0, %o1 202251c: 7f ff 8b de call 2005494 2022520: 90 10 00 19 mov %i1, %o0 2022524: b2 06 40 08 add %i1, %o0, %i1 2022528: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 202252c: 7f ff cd 04 call 201593c 2022530: 90 10 00 19 mov %i1, %o0 2022534: 94 10 20 00 clr %o2 2022538: 92 10 00 08 mov %o0, %o1 202253c: 96 07 bf bc add %fp, -68, %o3 2022540: 90 10 00 19 mov %i1, %o0 2022544: 7f ff 8b 85 call 2005358 2022548: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 202254c: 80 a2 20 00 cmp %o0, 0 2022550: 02 80 00 17 be 20225ac <_rename_r+0x100> 2022554: 80 8e e0 ff btst 0xff, %i3 if ( free_old_parentloc ) 2022558: 12 80 00 11 bne 202259c <_rename_r+0xf0> 202255c: b0 10 3f ff mov -1, %i0 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 2022560: 81 c7 e0 08 ret 2022564: 81 e8 00 00 restore old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 2022568: ba 07 bf d0 add %fp, -48, %i5 202256c: 90 10 00 19 mov %i1, %o0 2022570: 92 10 00 1c mov %i4, %o1 2022574: 94 10 20 02 mov 2, %o2 2022578: 96 10 00 1d mov %i5, %o3 202257c: 98 10 20 00 clr %o4 2022580: 7f ff 8b 93 call 20053cc 2022584: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 2022588: 80 a2 20 00 cmp %o0, 0 202258c: 12 bf ff f5 bne 2022560 <_rename_r+0xb4> <== NEVER TAKEN 2022590: b6 10 20 01 mov 1, %i3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 2022594: 10 bf ff d4 b 20224e4 <_rename_r+0x38> 2022598: c2 07 bf d0 ld [ %fp + -48 ], %g1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 202259c: 7f ff 8c 34 call 200566c 20225a0: 90 10 00 1d mov %i5, %o0 20225a4: 81 c7 e0 08 ret 20225a8: 81 e8 00 00 restore /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 20225ac: 90 10 00 1a mov %i2, %o0 20225b0: 92 07 bf f8 add %fp, -8, %o1 20225b4: 7f ff 93 20 call 2007234 20225b8: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 20225bc: c2 07 bf f0 ld [ %fp + -16 ], %g1 20225c0: d0 07 bf f8 ld [ %fp + -8 ], %o0 20225c4: c2 00 60 04 ld [ %g1 + 4 ], %g1 20225c8: 90 06 80 08 add %i2, %o0, %o0 20225cc: 92 07 bf e4 add %fp, -28, %o1 20225d0: 9f c0 40 00 call %g1 20225d4: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 20225d8: 80 a2 20 00 cmp %o0, 0 20225dc: 12 80 00 29 bne 2022680 <_rename_r+0x1d4> 20225e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 20225e4: c4 07 bf e0 ld [ %fp + -32 ], %g2 20225e8: 80 a0 80 01 cmp %g2, %g1 20225ec: 12 80 00 15 bne 2022640 <_rename_r+0x194> 20225f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 20225f4: d6 07 bf fc ld [ %fp + -4 ], %o3 20225f8: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 20225fc: 92 07 bf bc add %fp, -68, %o1 2022600: 94 07 bf e4 add %fp, -28, %o2 2022604: 9f c0 40 00 call %g1 2022608: 90 10 00 1d mov %i5, %o0 202260c: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 2022610: 7f ff 8c 17 call 200566c 2022614: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 2022618: 80 8e e0 ff btst 0xff, %i3 202261c: 12 80 00 06 bne 2022634 <_rename_r+0x188> 2022620: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 2022624: 7f ff 8c 12 call 200566c 2022628: 90 07 bf bc add %fp, -68, %o0 return result; } 202262c: 81 c7 e0 08 ret 2022630: 81 e8 00 00 restore result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 2022634: 7f ff 8c 0e call 200566c 2022638: 90 10 00 1d mov %i5, %o0 202263c: 30 bf ff fa b,a 2022624 <_rename_r+0x178> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 2022640: 7f ff 8c 0b call 200566c 2022644: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 2022648: 80 8e e0 ff btst 0xff, %i3 202264c: 12 80 00 0a bne 2022674 <_rename_r+0x1c8> 2022650: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 2022654: 7f ff 8c 06 call 200566c 2022658: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 202265c: 7f ff c6 e7 call 20141f8 <__errno> 2022660: b0 10 3f ff mov -1, %i0 2022664: 82 10 20 12 mov 0x12, %g1 2022668: c2 22 00 00 st %g1, [ %o0 ] 202266c: 81 c7 e0 08 ret 2022670: 81 e8 00 00 restore */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 2022674: 7f ff 8b fe call 200566c 2022678: 90 10 00 1d mov %i5, %o0 202267c: 30 bf ff f6 b,a 2022654 <_rename_r+0x1a8> rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 2022680: 7f ff 8b fb call 200566c 2022684: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 2022688: 80 8e e0 ff btst 0xff, %i3 202268c: 02 80 00 05 be 20226a0 <_rename_r+0x1f4> 2022690: 90 07 bf bc add %fp, -68, %o0 rtems_filesystem_freenode( &old_parent_loc ); 2022694: 7f ff 8b f6 call 200566c 2022698: 90 10 00 1d mov %i5, %o0 rtems_filesystem_freenode( &old_loc ); 202269c: 90 07 bf bc add %fp, -68, %o0 20226a0: 7f ff 8b f3 call 200566c 20226a4: b0 10 3f ff mov -1, %i0 return -1; 20226a8: 81 c7 e0 08 ret 20226ac: 81 e8 00 00 restore =============================================================================== 02004210 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 2004210: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2004214: 80 a6 a0 00 cmp %i2, 0 2004218: 02 80 00 1b be 2004284 <_stat_r+0x74> <== ALWAYS TAKEN 200421c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 2004220: 40 00 2d 91 call 200f864 <== NOT EXECUTED 2004224: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2004228: 94 10 20 00 clr %o2 <== NOT EXECUTED 200422c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 2004230: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED 2004234: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2004238: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 200423c: 7f ff fb 97 call 2003098 <== NOT EXECUTED 2004240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2004244: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004248: 12 80 00 0d bne 200427c <_stat_r+0x6c> <== NOT EXECUTED 200424c: 92 10 20 00 clr %o1 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 2004250: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED 2004254: 40 00 2a bc call 200ed44 <== NOT EXECUTED 2004258: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 200425c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004260: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2004264: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 2004268: 9f c0 40 00 call %g1 <== NOT EXECUTED 200426c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 2004270: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2004274: 7f ff fb d7 call 20031d0 <== NOT EXECUTED 2004278: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); } 200427c: 81 c7 e0 08 ret <== NOT EXECUTED 2004280: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 2004284: 40 00 28 18 call 200e2e4 <__errno> 2004288: b0 10 3f ff mov -1, %i0 200428c: 82 10 20 0e mov 0xe, %g1 2004290: c2 22 00 00 st %g1, [ %o0 ] 2004294: 81 c7 e0 08 ret 2004298: 81 e8 00 00 restore =============================================================================== 020067f4 <_times>: #endif clock_t _times( struct tms *ptms ) { 20067f4: 9d e3 bf 90 save %sp, -112, %sp rtems_interval ticks; if ( !ptms ) 20067f8: 80 a6 20 00 cmp %i0, 0 20067fc: 02 80 00 4c be 200692c <_times+0x138> <== NEVER TAKEN 2006800: 01 00 00 00 nop /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 2006804: 40 00 02 1c call 2007074 2006808: ac 10 20 00 clr %l6 ! 0 { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 200680c: 03 00 80 7a sethi %hi(0x201e800), %g1 2006810: f4 00 63 ec ld [ %g1 + 0x3ec ], %i2 ! 201ebec /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 2006814: ba 10 00 08 mov %o0, %i5 { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 2006818: 83 2e a0 02 sll %i2, 2, %g1 200681c: 91 2e a0 07 sll %i2, 7, %o0 2006820: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1 2006824: 90 22 00 01 sub %o0, %g1, %o0 2006828: 92 12 62 00 or %o1, 0x200, %o1 200682c: 90 02 00 1a add %o0, %i2, %o0 2006830: 40 00 50 ca call 201ab58 <.urem> 2006834: 91 2a 20 03 sll %o0, 3, %o0 2006838: 13 00 03 d0 sethi %hi(0xf4000), %o1 200683c: ae 10 00 08 mov %o0, %l7 2006840: 92 12 62 40 or %o1, 0x240, %o1 2006844: 40 00 50 19 call 201a8a8 <.udiv> 2006848: 90 10 00 1a mov %i2, %o0 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 200684c: 05 00 80 7f sethi %hi(0x201fc00), %g2 { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 2006850: 82 10 00 08 mov %o0, %g1 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 2006854: 9b 28 60 03 sll %g1, 3, %o5 2006858: 89 33 60 1b srl %o5, 0x1b, %g4 200685c: 99 30 60 1d srl %g1, 0x1d, %o4 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 2006860: d0 00 a2 8c ld [ %g2 + 0x28c ], %o0 2006864: 87 2b 60 05 sll %o5, 5, %g3 2006868: 85 2b 20 05 sll %o4, 5, %g2 200686c: 86 a0 c0 0d subcc %g3, %o5, %g3 2006870: 84 11 00 02 or %g4, %g2, %g2 2006874: b7 28 e0 06 sll %g3, 6, %i3 2006878: 84 60 80 0c subx %g2, %o4, %g2 200687c: 89 30 e0 1a srl %g3, 0x1a, %g4 2006880: b5 28 a0 06 sll %g2, 6, %i2 2006884: 86 a6 c0 03 subcc %i3, %g3, %g3 2006888: b4 11 00 1a or %g4, %i2, %i2 200688c: 84 66 80 02 subx %i2, %g2, %g2 2006890: 86 80 c0 01 addcc %g3, %g1, %g3 2006894: 83 30 e0 1e srl %g3, 0x1e, %g1 2006898: 84 40 a0 00 addx %g2, 0, %g2 200689c: a3 28 e0 02 sll %g3, 2, %l1 20068a0: a1 28 a0 02 sll %g2, 2, %l0 20068a4: 86 80 c0 11 addcc %g3, %l1, %g3 20068a8: a0 10 40 10 or %g1, %l0, %l0 20068ac: 83 30 e0 1e srl %g3, 0x1e, %g1 20068b0: 84 40 80 10 addx %g2, %l0, %g2 20068b4: a7 28 e0 02 sll %g3, 2, %l3 20068b8: a5 28 a0 02 sll %g2, 2, %l2 20068bc: 86 80 c0 13 addcc %g3, %l3, %g3 20068c0: a4 10 40 12 or %g1, %l2, %l2 20068c4: ab 28 e0 02 sll %g3, 2, %l5 20068c8: 84 40 80 12 addx %g2, %l2, %g2 20068cc: 83 30 e0 1e srl %g3, 0x1e, %g1 20068d0: a9 28 a0 02 sll %g2, 2, %l4 20068d4: 86 80 c0 15 addcc %g3, %l5, %g3 20068d8: a8 10 40 14 or %g1, %l4, %l4 20068dc: 84 40 80 14 addx %g2, %l4, %g2 20068e0: 83 28 e0 09 sll %g3, 9, %g1 20068e4: b5 30 e0 17 srl %g3, 0x17, %i2 20068e8: 89 28 a0 09 sll %g2, 9, %g4 20068ec: 86 85 c0 01 addcc %l7, %g1, %g3 20068f0: 84 16 80 04 or %i2, %g4, %g2 20068f4: 84 45 80 02 addx %l6, %g2, %g2 20068f8: 90 02 20 80 add %o0, 0x80, %o0 20068fc: 92 07 bf f0 add %fp, -16, %o1 2006900: 94 07 bf f8 add %fp, -8, %o2 2006904: 96 07 bf fc add %fp, -4, %o3 2006908: 40 00 11 05 call 200ad1c <_Timestamp64_Divide> 200690c: c4 3f bf f0 std %g2, [ %fp + -16 ] &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 2006910: c2 07 bf f8 ld [ %fp + -8 ], %g1 } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 2006914: fa 26 20 04 st %i5, [ %i0 + 4 ] &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 2006918: c2 26 00 00 st %g1, [ %i0 ] } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; ptms->tms_cutime = 0; 200691c: c0 26 20 08 clr [ %i0 + 8 ] ptms->tms_cstime = 0; 2006920: c0 26 20 0c clr [ %i0 + 0xc ] return ticks; } 2006924: 81 c7 e0 08 ret 2006928: 91 e8 00 1d restore %g0, %i5, %o0 ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 200692c: 40 00 2c 4c call 2011a5c <__errno> <== NOT EXECUTED 2006930: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED 2006934: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2006938: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 200693c: 81 c7 e0 08 ret <== NOT EXECUTED 2006940: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED =============================================================================== 02006a94 <_times_r>: clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 2006a94: 9d e3 bf 90 save %sp, -112, %sp struct tms *ptms ) { rtems_interval ticks; if ( !ptms ) 2006a98: 80 a6 60 00 cmp %i1, 0 2006a9c: 02 80 00 4c be 2006bcc <_times_r+0x138> <== ALWAYS TAKEN 2006aa0: 01 00 00 00 nop /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 2006aa4: 40 00 01 74 call 2007074 <== NOT EXECUTED 2006aa8: a8 10 20 00 clr %l4 ! 0 <== NOT EXECUTED { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 2006aac: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED 2006ab0: f8 00 63 ec ld [ %g1 + 0x3ec ], %i4 ! 201ebec <== NOT EXECUTED /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 2006ab4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 2006ab8: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED 2006abc: 91 2f 20 07 sll %i4, 7, %o0 <== NOT EXECUTED 2006ac0: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1 <== NOT EXECUTED 2006ac4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 2006ac8: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED 2006acc: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED 2006ad0: 40 00 50 22 call 201ab58 <.urem> <== NOT EXECUTED 2006ad4: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 2006ad8: 13 00 03 d0 sethi %hi(0xf4000), %o1 <== NOT EXECUTED 2006adc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED 2006ae0: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED 2006ae4: 40 00 4f 71 call 201a8a8 <.udiv> <== NOT EXECUTED 2006ae8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 2006aec: 05 00 80 7f sethi %hi(0x201fc00), %g2 <== NOT EXECUTED { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 2006af0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED 2006af4: 9b 28 60 03 sll %g1, 3, %o5 <== NOT EXECUTED 2006af8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED 2006afc: 99 30 60 1d srl %g1, 0x1d, %o4 <== NOT EXECUTED TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 2006b00: d0 00 a2 8c ld [ %g2 + 0x28c ], %o0 <== NOT EXECUTED 2006b04: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 2006b08: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 2006b0c: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 2006b10: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 2006b14: bb 28 e0 06 sll %g3, 6, %i5 <== NOT EXECUTED 2006b18: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 2006b1c: 89 30 e0 1a srl %g3, 0x1a, %g4 <== NOT EXECUTED 2006b20: b9 28 a0 06 sll %g2, 6, %i4 <== NOT EXECUTED 2006b24: 86 a7 40 03 subcc %i5, %g3, %g3 <== NOT EXECUTED 2006b28: b8 11 00 1c or %g4, %i4, %i4 <== NOT EXECUTED 2006b2c: 84 67 00 02 subx %i4, %g2, %g2 <== NOT EXECUTED 2006b30: 86 80 c0 01 addcc %g3, %g1, %g3 <== NOT EXECUTED 2006b34: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 2006b38: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 2006b3c: b7 28 e0 02 sll %g3, 2, %i3 <== NOT EXECUTED 2006b40: b5 28 a0 02 sll %g2, 2, %i2 <== NOT EXECUTED 2006b44: 86 80 c0 1b addcc %g3, %i3, %g3 <== NOT EXECUTED 2006b48: b4 10 40 1a or %g1, %i2, %i2 <== NOT EXECUTED 2006b4c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 2006b50: 84 40 80 1a addx %g2, %i2, %g2 <== NOT EXECUTED 2006b54: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED 2006b58: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED 2006b5c: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED 2006b60: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED 2006b64: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED 2006b68: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 2006b6c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 2006b70: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED 2006b74: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED 2006b78: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED 2006b7c: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED 2006b80: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED 2006b84: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED 2006b88: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED 2006b8c: 86 85 40 01 addcc %l5, %g1, %g3 <== NOT EXECUTED 2006b90: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED 2006b94: 84 45 00 02 addx %l4, %g2, %g2 <== NOT EXECUTED 2006b98: 90 02 20 80 add %o0, 0x80, %o0 <== NOT EXECUTED 2006b9c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 2006ba0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 2006ba4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2006ba8: 40 00 10 5d call 200ad1c <_Timestamp64_Divide> <== NOT EXECUTED 2006bac: c4 3f bf f0 std %g2, [ %fp + -16 ] <== NOT EXECUTED &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 2006bb0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 2006bb4: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 2006bb8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; ptms->tms_cutime = 0; 2006bbc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED ptms->tms_cstime = 0; 2006bc0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); } 2006bc4: 81 c7 e0 08 ret <== NOT EXECUTED 2006bc8: 81 e8 00 00 restore <== NOT EXECUTED ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 2006bcc: 40 00 2b a4 call 2011a5c <__errno> 2006bd0: b0 10 3f ff mov -1, %i0 2006bd4: 82 10 20 0e mov 0xe, %g1 2006bd8: c2 22 00 00 st %g1, [ %o0 ] 2006bdc: 81 c7 e0 08 ret 2006be0: 81 e8 00 00 restore =============================================================================== 020070cc : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 20070cc: 9d e3 bf 98 save %sp, -104, %sp long adjustment; /* * Simple validations */ if ( !delta ) 20070d0: ba 96 20 00 orcc %i0, 0, %i5 20070d4: 02 80 00 89 be 20072f8 20070d8: 03 00 03 d0 sethi %hi(0xf4000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 20070dc: c4 07 60 04 ld [ %i5 + 4 ], %g2 20070e0: 82 10 62 3f or %g1, 0x23f, %g1 20070e4: 80 a0 80 01 cmp %g2, %g1 20070e8: 18 80 00 84 bgu 20072f8 20070ec: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 20070f0: 22 80 00 06 be,a 2007108 20070f4: c2 07 40 00 ld [ %i5 ], %g1 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 20070f8: c0 26 60 04 clr [ %i1 + 4 ] 20070fc: 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; 2007100: c0 26 40 00 clr [ %i1 ] olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2007104: c2 07 40 00 ld [ %i5 ], %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2007108: 07 00 80 84 sethi %hi(0x2021000), %g3 200710c: c8 00 e3 3c ld [ %g3 + 0x33c ], %g4 ! 202133c olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2007110: b5 28 60 08 sll %g1, 8, %i2 2007114: 87 28 60 03 sll %g1, 3, %g3 2007118: 86 26 80 03 sub %i2, %g3, %g3 200711c: b5 28 e0 06 sll %g3, 6, %i2 2007120: 86 26 80 03 sub %i2, %g3, %g3 2007124: 82 00 c0 01 add %g3, %g1, %g1 2007128: 83 28 60 06 sll %g1, 6, %g1 adjustment += delta->tv_usec; 200712c: 84 00 40 02 add %g1, %g2, %g2 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2007130: 80 a0 80 04 cmp %g2, %g4 2007134: 0a 80 00 6f bcs 20072f0 2007138: 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++; 200713c: 03 00 80 88 sethi %hi(0x2022000), %g1 2007140: c4 00 61 c0 ld [ %g1 + 0x1c0 ], %g2 ! 20221c0 <_Thread_Dispatch_disable_level> 2007144: 84 00 a0 01 inc %g2 2007148: c4 20 61 c0 st %g2, [ %g1 + 0x1c0 ] return _Thread_Dispatch_disable_level; 200714c: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007150: 40 00 07 12 call 2008d98 <_TOD_Get_as_timestamp> 2007154: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007158: 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); 200715c: 94 10 20 00 clr %o2 2007160: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007164: 90 10 00 1a mov %i2, %o0 2007168: 96 12 e2 00 or %o3, 0x200, %o3 200716c: 40 00 58 34 call 201d23c <__divdi3> 2007170: 92 10 00 1b mov %i3, %o1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 2007174: e0 07 40 00 ld [ %i5 ], %l0 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007178: 94 10 20 00 clr %o2 200717c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007180: a0 04 00 09 add %l0, %o1, %l0 2007184: 96 12 e2 00 or %o3, 0x200, %o3 2007188: 90 10 00 1a mov %i2, %o0 200718c: 40 00 59 12 call 201d5d4 <__moddi3> 2007190: 92 10 00 1b mov %i3, %o1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2007194: c2 07 60 04 ld [ %i5 + 4 ], %g1 2007198: 87 28 60 07 sll %g1, 7, %g3 200719c: 85 28 60 02 sll %g1, 2, %g2 20071a0: 84 20 c0 02 sub %g3, %g2, %g2 20071a4: 82 00 80 01 add %g2, %g1, %g1 20071a8: 83 28 60 03 sll %g1, 3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20071ac: 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; 20071b0: 92 02 40 01 add %o1, %g1, %o1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20071b4: 84 10 a1 ff or %g2, 0x1ff, %g2 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 20071b8: 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; 20071bc: 82 10 00 09 mov %o1, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20071c0: 80 a2 40 02 cmp %o1, %g2 20071c4: 08 80 00 07 bleu 20071e0 20071c8: 86 10 e2 00 or %g3, 0x200, %g3 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 20071cc: 92 02 40 03 add %o1, %g3, %o1 ts.tv_sec++; 20071d0: 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 ) { 20071d4: 80 a2 40 02 cmp %o1, %g2 20071d8: 18 bf ff fd bgu 20071cc <== NEVER TAKEN 20071dc: 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) ) { 20071e0: 07 31 19 4d sethi %hi(0xc4653400), %g3 20071e4: 86 10 e2 00 or %g3, 0x200, %g3 ! c4653600 20071e8: 80 a2 40 03 cmp %o1, %g3 20071ec: 18 80 00 08 bgu 200720c <== NEVER TAKEN 20071f0: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 20071f4: 84 10 a2 00 or %g2, 0x200, %g2 ! 3b9aca00 20071f8: 92 02 40 02 add %o1, %g2, %o1 ts.tv_sec--; 20071fc: 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) ) { 2007200: 80 a2 40 03 cmp %o1, %g3 2007204: 08 bf ff fd bleu 20071f8 2007208: 82 10 00 09 mov %o1, %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 200720c: 99 3c 20 1f sra %l0, 0x1f, %o4 2007210: ae 10 00 01 mov %g1, %l7 2007214: ad 38 60 1f sra %g1, 0x1f, %l6 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 2007218: 83 2b 20 03 sll %o4, 3, %g1 200721c: b7 2c 20 03 sll %l0, 3, %i3 2007220: 89 34 20 1d srl %l0, 0x1d, %g4 2007224: b4 11 00 01 or %g4, %g1, %i2 2007228: 83 36 e0 1b srl %i3, 0x1b, %g1 200722c: 85 2e a0 05 sll %i2, 5, %g2 2007230: 87 2e e0 05 sll %i3, 5, %g3 2007234: 84 10 40 02 or %g1, %g2, %g2 2007238: 86 a0 c0 1b subcc %g3, %i3, %g3 200723c: 83 30 e0 1a srl %g3, 0x1a, %g1 2007240: 84 60 80 1a subx %g2, %i2, %g2 2007244: 97 28 e0 06 sll %g3, 6, %o3 2007248: 95 28 a0 06 sll %g2, 6, %o2 200724c: 86 a2 c0 03 subcc %o3, %g3, %g3 2007250: 94 10 40 0a or %g1, %o2, %o2 2007254: 84 62 80 02 subx %o2, %g2, %g2 2007258: 86 80 c0 10 addcc %g3, %l0, %g3 200725c: 83 30 e0 1e srl %g3, 0x1e, %g1 2007260: 84 40 80 0c addx %g2, %o4, %g2 2007264: a3 28 e0 02 sll %g3, 2, %l1 2007268: a1 28 a0 02 sll %g2, 2, %l0 200726c: 86 80 c0 11 addcc %g3, %l1, %g3 2007270: a0 10 40 10 or %g1, %l0, %l0 2007274: 83 30 e0 1e srl %g3, 0x1e, %g1 2007278: 84 40 80 10 addx %g2, %l0, %g2 200727c: a7 28 e0 02 sll %g3, 2, %l3 2007280: a5 28 a0 02 sll %g2, 2, %l2 2007284: 86 80 c0 13 addcc %g3, %l3, %g3 2007288: a4 10 40 12 or %g1, %l2, %l2 200728c: ab 28 e0 02 sll %g3, 2, %l5 2007290: 84 40 80 12 addx %g2, %l2, %g2 2007294: 83 30 e0 1e srl %g3, 0x1e, %g1 2007298: a9 28 a0 02 sll %g2, 2, %l4 200729c: 86 80 c0 15 addcc %g3, %l5, %g3 20072a0: a8 10 40 14 or %g1, %l4, %l4 20072a4: 84 40 80 14 addx %g2, %l4, %g2 20072a8: 83 28 e0 09 sll %g3, 9, %g1 20072ac: 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 ); 20072b0: 90 07 bf f8 add %fp, -8, %o0 20072b4: b5 30 e0 17 srl %g3, 0x17, %i2 20072b8: 86 85 c0 01 addcc %l7, %g1, %g3 20072bc: 84 16 80 04 or %i2, %g4, %g2 20072c0: 84 45 80 02 addx %l6, %g2, %g2 20072c4: 40 00 06 d2 call 2008e0c <_TOD_Set_with_timestamp> 20072c8: c4 3f bf f8 std %g2, [ %fp + -8 ] ts.tv_sec--; } _TOD_Set( &ts ); _Thread_Enable_dispatch(); 20072cc: 40 00 0d 9e call 200a944 <_Thread_Enable_dispatch> 20072d0: b0 10 20 00 clr %i0 /* set the user's output */ if ( olddelta ) 20072d4: 80 a6 60 00 cmp %i1, 0 20072d8: 02 80 00 0c be 2007308 20072dc: 01 00 00 00 nop *olddelta = *delta; 20072e0: c2 07 40 00 ld [ %i5 ], %g1 20072e4: c2 26 40 00 st %g1, [ %i1 ] 20072e8: c2 07 60 04 ld [ %i5 + 4 ], %g1 20072ec: c2 26 60 04 st %g1, [ %i1 + 4 ] return 0; } 20072f0: 81 c7 e0 08 ret 20072f4: 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 ); 20072f8: 40 00 2b d5 call 201224c <__errno> 20072fc: b0 10 3f ff mov -1, %i0 2007300: 82 10 20 16 mov 0x16, %g1 2007304: c2 22 00 00 st %g1, [ %o0 ] 2007308: 81 c7 e0 08 ret 200730c: 81 e8 00 00 restore =============================================================================== 020074b0 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 20074b0: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 20074b4: 3b 00 80 86 sethi %hi(0x2021800), %i5 20074b8: 40 00 04 f6 call 2008890 20074bc: 90 17 63 4c or %i5, 0x34c, %o0 ! 2021b4c if (fcntl (fildes, F_GETFD) < 0) { 20074c0: 90 10 00 18 mov %i0, %o0 20074c4: 40 00 20 a0 call 200f744 20074c8: 92 10 20 01 mov 1, %o1 20074cc: 80 a2 20 00 cmp %o0, 0 20074d0: 06 80 00 6c bl 2007680 20074d4: 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) { 20074d8: 02 80 00 3b be 20075c4 20074dc: 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) { 20074e0: f8 06 40 00 ld [ %i1 ], %i4 20074e4: 80 a7 00 18 cmp %i4, %i0 20074e8: 12 80 00 2f bne 20075a4 20074ec: 90 17 63 4c or %i5, 0x34c, %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); 20074f0: 92 10 00 1c mov %i4, %o1 20074f4: 11 00 80 86 sethi %hi(0x2021800), %o0 20074f8: 94 10 20 00 clr %o2 20074fc: 40 00 01 77 call 2007ad8 2007500: 90 12 23 94 or %o0, 0x394, %o0 if (r_chain == NULL) { 2007504: b0 92 20 00 orcc %o0, 0, %i0 2007508: 22 80 00 0f be,a 2007544 200750c: ba 17 63 4c or %i5, 0x34c, %i5 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007510: b8 06 20 1c add %i0, 0x1c, %i4 2007514: 40 00 04 df call 2008890 2007518: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 200751c: 92 10 00 19 mov %i1, %o1 2007520: 40 00 01 f4 call 2007cf0 2007524: 90 06 20 08 add %i0, 8, %o0 2007528: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 200752c: 40 00 04 f9 call 2008910 2007530: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007534: 40 00 04 f7 call 2008910 2007538: 90 17 63 4c or %i5, 0x34c, %o0 return result; } return AIO_ALLDONE; } 200753c: 81 c7 e0 08 ret 2007540: 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)) { 2007544: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 2007548: 82 07 60 58 add %i5, 0x58, %g1 200754c: 80 a0 80 01 cmp %g2, %g1 2007550: 02 80 00 0f be 200758c <== NEVER TAKEN 2007554: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 2007558: 92 10 00 1c mov %i4, %o1 200755c: 40 00 01 5f call 2007ad8 2007560: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007564: 80 a2 20 00 cmp %o0, 0 2007568: 02 80 00 0e be 20075a0 200756c: 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); 2007570: 40 00 01 e0 call 2007cf0 2007574: 90 02 20 08 add %o0, 8, %o0 2007578: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 200757c: 40 00 04 e5 call 2008910 2007580: 90 10 00 1d mov %i5, %o0 return result; 2007584: 81 c7 e0 08 ret 2007588: 81 e8 00 00 restore } else { pthread_mutex_unlock (&aio_request_queue.mutex); 200758c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2007590: 40 00 04 e0 call 2008910 2007594: b0 10 20 02 mov 2, %i0 return AIO_ALLDONE; 2007598: 81 c7 e0 08 ret 200759c: 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); 20075a0: 90 10 00 1d mov %i5, %o0 20075a4: 40 00 04 db call 2008910 20075a8: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one (EINVAL); 20075ac: 40 00 31 56 call 2013b04 <__errno> 20075b0: 01 00 00 00 nop 20075b4: 82 10 20 16 mov 0x16, %g1 ! 16 20075b8: c2 22 00 00 st %g1, [ %o0 ] 20075bc: 81 c7 e0 08 ret 20075c0: 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); 20075c4: 11 00 80 86 sethi %hi(0x2021800), %o0 20075c8: 94 10 20 00 clr %o2 20075cc: 40 00 01 43 call 2007ad8 20075d0: 90 12 23 94 or %o0, 0x394, %o0 if (r_chain == NULL) { 20075d4: b8 92 20 00 orcc %o0, 0, %i4 20075d8: 02 80 00 0f be 2007614 20075dc: b2 07 20 1c add %i4, 0x1c, %i1 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 20075e0: 40 00 04 ac call 2008890 20075e4: 90 10 00 19 mov %i1, %o0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20075e8: 40 00 0b 8b call 200a414 <_Chain_Extract> 20075ec: 90 10 00 1c mov %i4, %o0 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 20075f0: 40 00 01 ac call 2007ca0 20075f4: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 20075f8: 40 00 04 c6 call 2008910 20075fc: 90 10 00 19 mov %i1, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007600: 90 17 63 4c or %i5, 0x34c, %o0 2007604: 40 00 04 c3 call 2008910 2007608: b0 10 20 00 clr %i0 return AIO_CANCELED; 200760c: 81 c7 e0 08 ret 2007610: 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; 2007614: ba 17 63 4c or %i5, 0x34c, %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)) { 2007618: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200761c: 82 07 60 58 add %i5, 0x58, %g1 2007620: 80 a0 80 01 cmp %g2, %g1 2007624: 02 bf ff da be 200758c <== NEVER TAKEN 2007628: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 200762c: 92 10 00 18 mov %i0, %o1 2007630: 40 00 01 2a call 2007ad8 2007634: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007638: b8 92 20 00 orcc %o0, 0, %i4 200763c: 22 bf ff d5 be,a 2007590 2007640: 90 10 00 1d mov %i5, %o0 2007644: 40 00 0b 74 call 200a414 <_Chain_Extract> 2007648: 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); 200764c: 40 00 01 95 call 2007ca0 2007650: 90 10 00 1c mov %i4, %o0 pthread_mutex_destroy (&r_chain->mutex); 2007654: 40 00 03 e4 call 20085e4 2007658: 90 10 00 19 mov %i1, %o0 pthread_cond_destroy (&r_chain->mutex); 200765c: 40 00 03 03 call 2008268 2007660: 90 10 00 19 mov %i1, %o0 free (r_chain); 2007664: 7f ff f0 8c call 2003894 2007668: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 200766c: 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); 2007670: 40 00 04 a8 call 2008910 2007674: 90 10 00 1d mov %i5, %o0 return AIO_CANCELED; 2007678: 81 c7 e0 08 ret 200767c: 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); 2007680: 40 00 04 a4 call 2008910 2007684: 90 17 63 4c or %i5, 0x34c, %o0 rtems_set_errno_and_return_minus_one (EBADF); 2007688: 40 00 31 1f call 2013b04 <__errno> 200768c: b0 10 3f ff mov -1, %i0 2007690: 82 10 20 09 mov 9, %g1 2007694: c2 22 00 00 st %g1, [ %o0 ] 2007698: 81 c7 e0 08 ret 200769c: 81 e8 00 00 restore =============================================================================== 020076a8 : int aio_fsync( int op, struct aiocb *aiocbp ) { 20076a8: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 20076ac: 03 00 00 08 sethi %hi(0x2000), %g1 20076b0: 80 a6 00 01 cmp %i0, %g1 20076b4: 12 80 00 14 bne 2007704 20076b8: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 20076bc: d0 06 40 00 ld [ %i1 ], %o0 20076c0: 40 00 20 21 call 200f744 20076c4: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 20076c8: 90 0a 20 03 and %o0, 3, %o0 20076cc: 90 02 3f ff add %o0, -1, %o0 20076d0: 80 a2 20 01 cmp %o0, 1 20076d4: 18 80 00 0c bgu 2007704 20076d8: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 20076dc: 7f ff f2 4a call 2004004 20076e0: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 20076e4: 80 a2 20 00 cmp %o0, 0 20076e8: 02 80 00 06 be 2007700 <== NEVER TAKEN 20076ec: 82 10 20 03 mov 3, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 20076f0: f2 22 20 14 st %i1, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_SYNC; 20076f4: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 20076f8: 40 00 01 9a call 2007d60 20076fc: 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); 2007700: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 2007704: 82 10 3f ff mov -1, %g1 2007708: fa 26 60 34 st %i5, [ %i1 + 0x34 ] 200770c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 2007710: 40 00 30 fd call 2013b04 <__errno> 2007714: b0 10 3f ff mov -1, %i0 2007718: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 200771c: 81 c7 e0 08 ret 2007720: 81 e8 00 00 restore =============================================================================== 0200805c : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 200805c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2008060: d0 06 00 00 ld [ %i0 ], %o0 2008064: 40 00 1d b8 call 200f744 2008068: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 200806c: 90 0a 20 03 and %o0, 3, %o0 2008070: 80 a2 20 02 cmp %o0, 2 2008074: 12 80 00 1b bne 20080e0 2008078: 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) 200807c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008080: 80 a0 60 00 cmp %g1, 0 2008084: 12 80 00 0f bne 20080c0 2008088: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 200808c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008090: 80 a0 60 00 cmp %g1, 0 2008094: 06 80 00 0c bl 20080c4 2008098: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 200809c: 7f ff ef da call 2004004 20080a0: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 20080a4: 80 a2 20 00 cmp %o0, 0 20080a8: 02 80 00 12 be 20080f0 <== NEVER TAKEN 20080ac: 82 10 20 01 mov 1, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 20080b0: f0 22 20 14 st %i0, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_READ; 20080b4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 20080b8: 7f ff ff 2a call 2007d60 20080bc: 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); 20080c0: 82 10 3f ff mov -1, %g1 20080c4: fa 26 20 34 st %i5, [ %i0 + 0x34 ] 20080c8: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 20080cc: 40 00 2e 8e call 2013b04 <__errno> 20080d0: b0 10 3f ff mov -1, %i0 20080d4: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 20080d8: 81 c7 e0 08 ret 20080dc: 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))) 20080e0: 02 bf ff e7 be 200807c <== NEVER TAKEN 20080e4: 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); 20080e8: 10 bf ff f7 b 20080c4 20080ec: 82 10 3f ff mov -1, %g1 20080f0: 10 bf ff f4 b 20080c0 <== NOT EXECUTED 20080f4: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED =============================================================================== 02008100 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 2008100: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2008104: d0 06 00 00 ld [ %i0 ], %o0 2008108: 40 00 1d 8f call 200f744 200810c: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2008110: 90 0a 20 03 and %o0, 3, %o0 2008114: 90 02 3f ff add %o0, -1, %o0 2008118: 80 a2 20 01 cmp %o0, 1 200811c: 18 80 00 14 bgu 200816c 2008120: 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) 2008124: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008128: 80 a0 60 00 cmp %g1, 0 200812c: 12 80 00 10 bne 200816c 2008130: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 2008134: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008138: 80 a0 60 00 cmp %g1, 0 200813c: 06 80 00 0d bl 2008170 2008140: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2008144: 7f ff ef b0 call 2004004 2008148: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 200814c: 80 a2 20 00 cmp %o0, 0 2008150: 02 80 00 06 be 2008168 <== NEVER TAKEN 2008154: 82 10 20 02 mov 2, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 2008158: f0 22 20 14 st %i0, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_WRITE; 200815c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 2008160: 7f ff ff 00 call 2007d60 2008164: 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); 2008168: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 200816c: 82 10 3f ff mov -1, %g1 2008170: fa 26 20 34 st %i5, [ %i0 + 0x34 ] 2008174: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 2008178: 40 00 2e 63 call 2013b04 <__errno> 200817c: b0 10 3f ff mov -1, %i0 2008180: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 2008184: 81 c7 e0 08 ret 2008188: 81 e8 00 00 restore =============================================================================== 02004f10 : #include int chroot( const char *pathname ) { 2004f10: 9d e3 bf 88 save %sp, -120, %sp int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 2004f14: 3b 00 80 95 sethi %hi(0x2025400), %i5 2004f18: f8 07 62 a0 ld [ %i5 + 0x2a0 ], %i4 ! 20256a0 2004f1c: 03 00 80 98 sethi %hi(0x2026000), %g1 2004f20: 82 10 60 7c or %g1, 0x7c, %g1 ! 202607c 2004f24: 80 a7 00 01 cmp %i4, %g1 2004f28: 02 80 00 20 be 2004fa8 2004f2c: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 2004f30: 7f ff ff c3 call 2004e3c 2004f34: 90 10 00 18 mov %i0, %o0 if (result) { 2004f38: 80 a2 20 00 cmp %o0, 0 2004f3c: 12 80 00 27 bne 2004fd8 2004f40: 92 10 20 01 mov 1, %o1 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2004f44: 11 00 80 8c sethi %hi(0x2023000), %o0 2004f48: 94 10 20 00 clr %o2 2004f4c: 90 12 21 58 or %o0, 0x158, %o0 2004f50: 96 07 bf ec add %fp, -20, %o3 2004f54: 40 00 01 1e call 20053cc 2004f58: 98 10 20 00 clr %o4 2004f5c: 80 a2 20 00 cmp %o0, 0 2004f60: 12 80 00 1e bne 2004fd8 <== NEVER TAKEN 2004f64: d0 07 62 a0 ld [ %i5 + 0x2a0 ], %o0 rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; 2004f68: b0 10 20 00 clr %i0 /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 2004f6c: 40 00 01 c0 call 200566c 2004f70: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 2004f74: c2 07 62 a0 ld [ %i5 + 0x2a0 ], %g1 2004f78: c4 07 bf ec ld [ %fp + -20 ], %g2 2004f7c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 2004f80: c4 07 bf f0 ld [ %fp + -16 ], %g2 2004f84: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 2004f88: c4 07 bf f4 ld [ %fp + -12 ], %g2 2004f8c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 2004f90: c4 07 bf f8 ld [ %fp + -8 ], %g2 2004f94: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 2004f98: c4 07 bf fc ld [ %fp + -4 ], %g2 2004f9c: c4 20 60 28 st %g2, [ %g1 + 0x28 ] return 0; } 2004fa0: 81 c7 e0 08 ret 2004fa4: 81 e8 00 00 restore int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 2004fa8: 40 00 06 fc call 2006b98 2004fac: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 2004fb0: c2 07 62 a0 ld [ %i5 + 0x2a0 ], %g1 2004fb4: 80 a0 40 1c cmp %g1, %i4 2004fb8: 12 bf ff de bne 2004f30 2004fbc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004fc0: 40 00 3c 8e call 20141f8 <__errno> 2004fc4: b0 10 3f ff mov -1, %i0 ! ffffffff 2004fc8: 82 10 20 86 mov 0x86, %g1 2004fcc: c2 22 00 00 st %g1, [ %o0 ] 2004fd0: 81 c7 e0 08 ret 2004fd4: 81 e8 00 00 restore } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 2004fd8: 40 00 3c 88 call 20141f8 <__errno> 2004fdc: b0 10 3f ff mov -1, %i0 2004fe0: 40 00 3c 86 call 20141f8 <__errno> 2004fe4: ba 10 00 08 mov %o0, %i5 2004fe8: c2 02 00 00 ld [ %o0 ], %g1 2004fec: c2 27 40 00 st %g1, [ %i5 ] 2004ff0: 81 c7 e0 08 ret 2004ff4: 81 e8 00 00 restore =============================================================================== 02006f34 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 2006f34: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2006f38: 80 a6 60 00 cmp %i1, 0 2006f3c: 02 80 00 2f be 2006ff8 2006f40: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2006f44: 02 80 00 19 be 2006fa8 2006f48: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 2006f4c: 02 80 00 12 be 2006f94 <== NEVER TAKEN 2006f50: 80 a6 20 02 cmp %i0, 2 return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 2006f54: 02 80 00 10 be 2006f94 2006f58: 80 a6 20 03 cmp %i0, 3 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2006f5c: 02 80 00 08 be 2006f7c 2006f60: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2006f64: 40 00 2e 1c call 20127d4 <__errno> 2006f68: b0 10 3f ff mov -1, %i0 ! ffffffff 2006f6c: 82 10 20 16 mov 0x16, %g1 2006f70: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2006f74: 81 c7 e0 08 ret 2006f78: 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 ); 2006f7c: 40 00 2e 16 call 20127d4 <__errno> 2006f80: b0 10 3f ff mov -1, %i0 2006f84: 82 10 20 58 mov 0x58, %g1 2006f88: c2 22 00 00 st %g1, [ %o0 ] 2006f8c: 81 c7 e0 08 ret 2006f90: 81 e8 00 00 restore } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); 2006f94: 90 10 00 19 mov %i1, %o0 2006f98: 40 00 08 a2 call 2009220 <_TOD_Get_uptime_as_timespec> 2006f9c: b0 10 20 00 clr %i0 return 0; 2006fa0: 81 c7 e0 08 ret 2006fa4: 81 e8 00 00 restore struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2006fa8: 40 00 08 8c call 20091d8 <_TOD_Get_as_timestamp> 2006fac: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2006fb0: 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); 2006fb4: 94 10 20 00 clr %o2 2006fb8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2006fbc: 90 10 00 1c mov %i4, %o0 2006fc0: 96 12 e2 00 or %o3, 0x200, %o3 2006fc4: 40 00 5b ff call 201dfc0 <__divdi3> 2006fc8: 92 10 00 1d mov %i5, %o1 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2006fcc: 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); 2006fd0: d2 26 40 00 st %o1, [ %i1 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2006fd4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2006fd8: 90 10 00 1c mov %i4, %o0 2006fdc: 96 12 e2 00 or %o3, 0x200, %o3 2006fe0: 92 10 00 1d mov %i5, %o1 2006fe4: 40 00 5c dd call 201e358 <__moddi3> 2006fe8: b0 10 20 00 clr %i0 2006fec: 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; 2006ff0: 81 c7 e0 08 ret 2006ff4: 81 e8 00 00 restore clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 2006ff8: 40 00 2d f7 call 20127d4 <__errno> 2006ffc: b0 10 3f ff mov -1, %i0 2007000: 82 10 20 16 mov 0x16, %g1 2007004: c2 22 00 00 st %g1, [ %o0 ] 2007008: 81 c7 e0 08 ret 200700c: 81 e8 00 00 restore =============================================================================== 02007010 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2007010: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2007014: 80 a6 60 00 cmp %i1, 0 2007018: 02 80 00 54 be 2007168 <== NEVER TAKEN 200701c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2007020: 02 80 00 0c be 2007050 2007024: 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 ) 2007028: 02 80 00 4a be 2007150 200702c: 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 ) 2007030: 02 80 00 48 be 2007150 2007034: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 2007038: 40 00 2d e7 call 20127d4 <__errno> 200703c: b0 10 3f ff mov -1, %i0 ! ffffffff 2007040: 82 10 20 16 mov 0x16, %g1 2007044: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2007048: 81 c7 e0 08 ret 200704c: 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 ) 2007050: c4 06 40 00 ld [ %i1 ], %g2 2007054: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2007058: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 200705c: 80 a0 80 01 cmp %g2, %g1 2007060: 08 80 00 42 bleu 2007168 2007064: 03 00 80 8a sethi %hi(0x2022800), %g1 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2007068: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 2022a80 <_Thread_Dispatch_disable_level> 200706c: 84 00 a0 01 inc %g2 2007070: c4 20 62 80 st %g2, [ %g1 + 0x280 ] return _Thread_Dispatch_disable_level; 2007074: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 2007078: d6 06 40 00 ld [ %i1 ], %o3 200707c: e6 06 60 04 ld [ %i1 + 4 ], %l3 2007080: 95 3a e0 1f sra %o3, 0x1f, %o2 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 2007084: 83 2a a0 03 sll %o2, 3, %g1 2007088: 9b 2a e0 03 sll %o3, 3, %o5 200708c: 89 32 e0 1d srl %o3, 0x1d, %g4 2007090: 98 11 00 01 or %g4, %g1, %o4 2007094: 83 33 60 1b srl %o5, 0x1b, %g1 2007098: 85 2b 20 05 sll %o4, 5, %g2 200709c: 87 2b 60 05 sll %o5, 5, %g3 20070a0: 84 10 40 02 or %g1, %g2, %g2 20070a4: 86 a0 c0 0d subcc %g3, %o5, %g3 20070a8: 83 30 e0 1a srl %g3, 0x1a, %g1 20070ac: 84 60 80 0c subx %g2, %o4, %g2 20070b0: bb 28 e0 06 sll %g3, 6, %i5 20070b4: b9 28 a0 06 sll %g2, 6, %i4 20070b8: 86 a7 40 03 subcc %i5, %g3, %g3 20070bc: b8 10 40 1c or %g1, %i4, %i4 20070c0: 84 67 00 02 subx %i4, %g2, %g2 20070c4: 86 80 c0 0b addcc %g3, %o3, %g3 20070c8: 83 30 e0 1e srl %g3, 0x1e, %g1 20070cc: 84 40 80 0a addx %g2, %o2, %g2 20070d0: b7 28 e0 02 sll %g3, 2, %i3 20070d4: b5 28 a0 02 sll %g2, 2, %i2 20070d8: 86 80 c0 1b addcc %g3, %i3, %g3 20070dc: b4 10 40 1a or %g1, %i2, %i2 20070e0: 83 30 e0 1e srl %g3, 0x1e, %g1 20070e4: 84 40 80 1a addx %g2, %i2, %g2 20070e8: b3 28 e0 02 sll %g3, 2, %i1 20070ec: b1 28 a0 02 sll %g2, 2, %i0 20070f0: 86 80 c0 19 addcc %g3, %i1, %g3 20070f4: b0 10 40 18 or %g1, %i0, %i0 20070f8: a3 28 e0 02 sll %g3, 2, %l1 20070fc: 84 40 80 18 addx %g2, %i0, %g2 2007100: 83 30 e0 1e srl %g3, 0x1e, %g1 2007104: a1 28 a0 02 sll %g2, 2, %l0 2007108: 86 80 c0 11 addcc %g3, %l1, %g3 200710c: a0 10 40 10 or %g1, %l0, %l0 2007110: 84 40 80 10 addx %g2, %l0, %g2 2007114: 83 28 e0 09 sll %g3, 9, %g1 2007118: 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 ); 200711c: 90 07 bf f8 add %fp, -8, %o0 2007120: b9 30 e0 17 srl %g3, 0x17, %i4 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 2007124: a5 3c e0 1f sra %l3, 0x1f, %l2 2007128: 86 84 c0 01 addcc %l3, %g1, %g3 200712c: 84 17 00 04 or %i4, %g4, %g2 2007130: 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; 2007134: 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 ); 2007138: 40 00 08 59 call 200929c <_TOD_Set_with_timestamp> 200713c: 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(); 2007140: 40 00 0f 25 call 200add4 <_Thread_Enable_dispatch> 2007144: 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; 2007148: 81 c7 e0 08 ret 200714c: 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 ); 2007150: 40 00 2d a1 call 20127d4 <__errno> 2007154: b0 10 3f ff mov -1, %i0 2007158: 82 10 20 58 mov 0x58, %g1 200715c: c2 22 00 00 st %g1, [ %o0 ] 2007160: 81 c7 e0 08 ret 2007164: 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 ); 2007168: 40 00 2d 9b call 20127d4 <__errno> 200716c: b0 10 3f ff mov -1, %i0 2007170: 82 10 20 16 mov 0x16, %g1 2007174: c2 22 00 00 st %g1, [ %o0 ] 2007178: 81 c7 e0 08 ret 200717c: 81 e8 00 00 restore =============================================================================== 02002a84 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2002a84: 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) { 2002a88: 39 00 80 8d sethi %hi(0x2023400), %i4 2002a8c: e0 07 23 ec ld [ %i4 + 0x3ec ], %l0 ! 20237ec 2002a90: 03 00 80 8d sethi %hi(0x2023400), %g1 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2002a94: 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) { 2002a98: 80 a6 00 10 cmp %i0, %l0 2002a9c: 0a 80 00 16 bcs 2002af4 2002aa0: e2 00 63 f0 ld [ %g1 + 0x3f0 ], %l1 rtems_disk_device_table *table = disktab; 2002aa4: 27 00 80 8d sethi %hi(0x2023400), %l3 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2002aa8: a5 2c 20 01 sll %l0, 1, %l2 if (major >= new_size) { 2002aac: 80 a6 00 12 cmp %i0, %l2 2002ab0: 0a 80 00 03 bcs 2002abc <== NEVER TAKEN 2002ab4: d0 04 e3 f0 ld [ %l3 + 0x3f0 ], %o0 new_size = major + 1; 2002ab8: a4 06 20 01 add %i0, 1, %l2 } table = realloc(table, new_size * sizeof(*table)); 2002abc: 93 2c a0 03 sll %l2, 3, %o1 2002ac0: 40 00 0a 72 call 2005488 2002ac4: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2002ac8: 80 a2 20 00 cmp %o0, 0 2002acc: 02 80 00 1b be 2002b38 <== ALWAYS TAKEN 2002ad0: a2 10 00 08 mov %o0, %l1 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2002ad4: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED 2002ad8: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED 2002adc: 92 10 20 00 clr %o1 <== NOT EXECUTED 2002ae0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED 2002ae4: 40 00 4f 24 call 2016774 <== NOT EXECUTED 2002ae8: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 2002aec: e2 24 e3 f0 st %l1, [ %l3 + 0x3f0 ] <== NOT EXECUTED disktab_size = new_size; 2002af0: e4 27 23 ec st %l2, [ %i4 + 0x3ec ] <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2002af4: 83 2f 60 03 sll %i5, 3, %g1 2002af8: e0 04 40 01 ld [ %l1 + %g1 ], %l0 2002afc: a2 04 40 01 add %l1, %g1, %l1 2002b00: 80 a4 20 00 cmp %l0, 0 2002b04: 02 80 00 0f be 2002b40 2002b08: e4 04 60 04 ld [ %l1 + 4 ], %l2 2002b0c: 80 a6 40 12 cmp %i1, %l2 2002b10: 1a 80 00 0d bcc 2002b44 <== NEVER TAKEN 2002b14: 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; 2002b18: 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) { 2002b1c: b8 84 00 01 addcc %l0, %g1, %i4 2002b20: 02 80 00 06 be 2002b38 <== NEVER TAKEN 2002b24: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 2002b28: c2 04 00 01 ld [ %l0 + %g1 ], %g1 2002b2c: 80 a0 60 00 cmp %g1, 0 2002b30: 02 80 00 20 be 2002bb0 2002b34: b0 10 20 0c mov 0xc, %i0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 2002b38: 81 c7 e0 08 ret 2002b3c: 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) { 2002b40: 80 a4 a0 00 cmp %l2, 0 2002b44: 12 80 00 15 bne 2002b98 <== NEVER TAKEN 2002b48: b8 10 20 08 mov 8, %i4 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 2002b4c: 80 a6 40 1c cmp %i1, %i4 2002b50: 3a 80 00 02 bcc,a 2002b58 2002b54: b8 06 60 01 add %i1, 1, %i4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 2002b58: 90 10 00 10 mov %l0, %o0 2002b5c: 93 2f 20 02 sll %i4, 2, %o1 2002b60: 40 00 0a 4a call 2005488 2002b64: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2002b68: 80 a2 20 00 cmp %o0, 0 2002b6c: 02 bf ff f3 be 2002b38 2002b70: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2002b74: 94 27 00 12 sub %i4, %l2, %o2 2002b78: 91 2c a0 02 sll %l2, 2, %o0 2002b7c: 92 10 20 00 clr %o1 2002b80: 90 04 00 08 add %l0, %o0, %o0 2002b84: 40 00 4e fc call 2016774 2002b88: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2002b8c: e0 24 40 00 st %l0, [ %l1 ] disktab [major].size = new_size; 2002b90: 10 bf ff e2 b 2002b18 2002b94: 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; 2002b98: b9 2c a0 01 sll %l2, 1, %i4 <== NOT EXECUTED } if (minor >= new_size) { 2002b9c: 80 a6 40 1c cmp %i1, %i4 <== NOT EXECUTED 2002ba0: 0a bf ff ef bcs 2002b5c <== NOT EXECUTED 2002ba4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002ba8: 10 bf ff ed b 2002b5c <== NOT EXECUTED 2002bac: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 2002bb0: 90 10 20 38 mov 0x38, %o0 2002bb4: 40 00 07 21 call 2004838 2002bb8: b0 10 20 1a mov 0x1a, %i0 if (dd == NULL) { 2002bbc: 80 a2 20 00 cmp %o0, 0 2002bc0: 02 bf ff de be 2002b38 <== NEVER TAKEN 2002bc4: a0 10 00 08 mov %o0, %l0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2002bc8: 80 a6 a0 00 cmp %i2, 0 2002bcc: 02 80 00 0f be 2002c08 2002bd0: a2 10 20 00 clr %l1 alloc_name = strdup(name); 2002bd4: 40 00 50 48 call 2016cf4 2002bd8: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2002bdc: a2 92 20 00 orcc %o0, 0, %l1 2002be0: 02 80 00 15 be 2002c34 <== NEVER TAKEN 2002be4: b4 10 00 08 mov %o0, %i2 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2002be8: 94 10 00 1d mov %i5, %o2 2002bec: 13 00 00 18 sethi %hi(0x6000), %o1 2002bf0: 96 10 00 19 mov %i1, %o3 2002bf4: 40 00 07 61 call 2004978 2002bf8: 92 12 61 ff or %o1, 0x1ff, %o1 2002bfc: 80 a2 20 00 cmp %o0, 0 2002c00: 06 80 00 0b bl 2002c2c <== NEVER TAKEN 2002c04: 90 10 00 1a mov %i2, %o0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 2002c08: fa 24 00 00 st %i5, [ %l0 ] 2002c0c: f2 24 20 04 st %i1, [ %l0 + 4 ] dd->name = alloc_name; 2002c10: e2 24 20 10 st %l1, [ %l0 + 0x10 ] dd->uses = 0; 2002c14: c0 24 20 14 clr [ %l0 + 0x14 ] dd->deleted = false; 2002c18: c0 2c 20 30 clrb [ %l0 + 0x30 ] *dd_entry = dd; 2002c1c: e0 27 00 00 st %l0, [ %i4 ] *dd_ptr = dd; 2002c20: e0 26 c0 00 st %l0, [ %i3 ] return RTEMS_SUCCESSFUL; } 2002c24: 81 c7 e0 08 ret 2002c28: 91 e8 20 00 restore %g0, 0, %o0 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 2002c2c: 40 00 05 cf call 2004368 <== NOT EXECUTED 2002c30: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED free(dd); 2002c34: 40 00 05 cd call 2004368 <== NOT EXECUTED 2002c38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 2002c3c: 81 c7 e0 08 ret <== NOT EXECUTED 2002c40: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b700 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 200b700: 9d e3 bf a0 save %sp, -96, %sp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 200b704: 80 8e bf f8 btst -8, %i2 200b708: 12 80 00 33 bne 200b7d4 <== NEVER TAKEN 200b70c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 200b710: f4 06 c0 00 ld [ %i3 ], %i2 if (!device_name_table) 200b714: 80 a6 a0 00 cmp %i2, 0 200b718: 02 80 00 35 be 200b7ec 200b71c: 03 00 80 6d sethi %hi(0x201b400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 200b720: e0 00 60 90 ld [ %g1 + 0x90 ], %l0 ! 201b490 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( 200b724: ba 10 20 00 clr %i5 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 200b728: 80 a4 20 00 cmp %l0, 0 200b72c: 02 80 00 18 be 200b78c <== NEVER TAKEN 200b730: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 200b734: a3 28 60 02 sll %g1, 2, %l1 200b738: 83 28 60 04 sll %g1, 4, %g1 200b73c: a2 04 40 01 add %l1, %g1, %l1 200b740: f8 06 80 11 ld [ %i2 + %l1 ], %i4 200b744: 80 a7 20 00 cmp %i4, 0 200b748: 02 80 00 0d be 200b77c 200b74c: a2 06 80 11 add %i2, %l1, %l1 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 200b750: 90 10 00 18 mov %i0, %o0 200b754: 92 10 00 1c mov %i4, %o1 200b758: 40 00 11 e4 call 200fee8 200b75c: 94 10 00 19 mov %i1, %o2 200b760: 80 a2 20 00 cmp %o0, 0 200b764: 32 80 00 07 bne,a 200b780 200b768: ba 07 60 01 inc %i5 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200b76c: c2 4f 00 19 ldsb [ %i4 + %i1 ], %g1 200b770: 80 a0 60 00 cmp %g1, 0 200b774: 02 80 00 0c be 200b7a4 200b778: 03 00 80 6d sethi %hi(0x201b400), %g1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 200b77c: ba 07 60 01 inc %i5 200b780: 80 a7 40 10 cmp %i5, %l0 200b784: 12 bf ff ec bne 200b734 200b788: 82 10 00 1d mov %i5, %g1 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 200b78c: 40 00 0c 27 call 200e828 <__errno> 200b790: b0 10 3f ff mov -1, %i0 200b794: 82 10 20 02 mov 2, %g1 200b798: c2 22 00 00 st %g1, [ %o0 ] } 200b79c: 81 c7 e0 08 ret 200b7a0: 81 e8 00 00 restore /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200b7a4: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 200b7a8: 05 00 80 6d sethi %hi(0x201b400), %g2 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200b7ac: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 200b7b0: 84 10 a1 58 or %g2, 0x158, %g2 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 200b7b4: e2 26 c0 00 st %l1, [ %i3 ] pathloc->handlers = &devFS_file_handlers; 200b7b8: c4 26 e0 08 st %g2, [ %i3 + 8 ] pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200b7bc: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 200b7c0: 05 00 80 6d sethi %hi(0x201b400), %g2 200b7c4: 84 10 a1 90 or %g2, 0x190, %g2 ! 201b590 200b7c8: c4 26 e0 0c st %g2, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 200b7cc: 81 c7 e0 08 ret 200b7d0: 91 e8 20 00 restore %g0, 0, %o0 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 200b7d4: 40 00 0c 15 call 200e828 <__errno> <== NOT EXECUTED 200b7d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b7dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200b7e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200b7e4: 81 c7 e0 08 ret <== NOT EXECUTED 200b7e8: 81 e8 00 00 restore <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 200b7ec: 40 00 0c 0f call 200e828 <__errno> 200b7f0: b0 10 3f ff mov -1, %i0 200b7f4: 82 10 20 0e mov 0xe, %g1 200b7f8: c2 22 00 00 st %g1, [ %o0 ] 200b7fc: 81 c7 e0 08 ret 200b800: 81 e8 00 00 restore =============================================================================== 020030e0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 20030e0: 9d e3 bf a0 save %sp, -96, %sp * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 20030e4: c2 4e 00 00 ldsb [ %i0 ], %g1 20030e8: 80 a0 60 64 cmp %g1, 0x64 20030ec: 02 80 00 43 be 20031f8 20030f0: ba 10 00 18 mov %i0, %i5 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 20030f4: 03 00 00 3c sethi %hi(0xf000), %g1 20030f8: 05 00 00 08 sethi %hi(0x2000), %g2 20030fc: 82 0e 40 01 and %i1, %g1, %g1 2003100: 80 a0 40 02 cmp %g1, %g2 2003104: 12 80 00 4b bne 2003230 2003108: 05 00 00 18 sethi %hi(0x6000), %g2 rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 200310c: f0 07 00 00 ld [ %i4 ], %i0 if (!device_name_table) 2003110: 80 a6 20 00 cmp %i0, 0 2003114: 02 80 00 56 be 200326c 2003118: 03 00 80 6d sethi %hi(0x201b400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 200311c: e0 00 60 90 ld [ %g1 + 0x90 ], %l0 ! 201b490 2003120: 80 a4 20 00 cmp %l0, 0 2003124: 02 80 00 4c be 2003254 2003128: 82 10 20 00 clr %g1 #include #include #include "devfs.h" int devFS_mknod( 200312c: a2 10 3f ff mov -1, %l1 2003130: 10 80 00 0a b 2003158 2003134: b8 10 20 00 clr %i4 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 2003138: 40 00 31 82 call 200f740 200313c: 01 00 00 00 nop 2003140: 80 a2 20 00 cmp %o0, 0 2003144: 02 80 00 27 be 20031e0 2003148: b8 07 20 01 inc %i4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 200314c: 80 a7 00 10 cmp %i4, %l0 2003150: 02 80 00 0e be 2003188 2003154: 82 10 00 1c mov %i4, %g1 if (device_name_table[i].device_name == NULL) 2003158: 85 28 60 02 sll %g1, 2, %g2 200315c: 83 28 60 04 sll %g1, 4, %g1 2003160: 82 00 80 01 add %g2, %g1, %g1 2003164: d2 06 00 01 ld [ %i0 + %g1 ], %o1 2003168: 80 a2 60 00 cmp %o1, 0 200316c: 12 bf ff f3 bne 2003138 2003170: 90 10 00 1d mov %i5, %o0 2003174: a2 10 00 1c mov %i4, %l1 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 2003178: b8 07 20 01 inc %i4 200317c: 80 a7 00 10 cmp %i4, %l0 2003180: 12 bf ff f6 bne 2003158 2003184: 82 10 00 1c mov %i4, %g1 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 2003188: 80 a4 7f ff cmp %l1, -1 200318c: 02 80 00 32 be 2003254 <== NEVER TAKEN 2003190: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 2003194: 7f ff ff 44 call 2002ea4 2003198: 01 00 00 00 nop 200319c: a0 10 00 08 mov %o0, %l0 device_name_table[slot].device_name = path; 20031a0: 83 2c 60 02 sll %l1, 2, %g1 device_name_table[slot].device_name_length = strlen(path); 20031a4: 90 10 00 1d mov %i5, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = path; 20031a8: a3 2c 60 04 sll %l1, 4, %l1 20031ac: a2 00 40 11 add %g1, %l1, %l1 20031b0: b8 06 00 11 add %i0, %l1, %i4 device_name_table[slot].device_name_length = strlen(path); 20031b4: 40 00 33 1c call 200fe24 20031b8: fa 26 00 11 st %i5, [ %i0 + %l1 ] device_name_table[slot].major = major; 20031bc: f4 27 20 08 st %i2, [ %i4 + 8 ] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = path; device_name_table[slot].device_name_length = strlen(path); 20031c0: d0 27 20 04 st %o0, [ %i4 + 4 ] device_name_table[slot].major = major; device_name_table[slot].minor = minor; 20031c4: f6 27 20 0c st %i3, [ %i4 + 0xc ] device_name_table[slot].mode = mode; 20031c8: f2 27 20 10 st %i1, [ %i4 + 0x10 ] _ISR_Enable(level); return 0; 20031cc: b0 10 20 00 clr %i0 device_name_table[slot].device_name = path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); 20031d0: 7f ff ff 39 call 2002eb4 20031d4: 90 10 00 10 mov %l0, %o0 return 0; } 20031d8: 81 c7 e0 08 ret 20031dc: 81 e8 00 00 restore for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 20031e0: 40 00 2d 92 call 200e828 <__errno> 20031e4: b0 10 3f ff mov -1, %i0 20031e8: 82 10 20 11 mov 0x11, %g1 20031ec: c2 22 00 00 st %g1, [ %o0 ] 20031f0: 81 c7 e0 08 ret 20031f4: 81 e8 00 00 restore * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 20031f8: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 20031fc: 80 a0 60 65 cmp %g1, 0x65 2003200: 12 bf ff be bne 20030f8 <== NEVER TAKEN 2003204: 03 00 00 3c sethi %hi(0xf000), %g1 2003208: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 200320c: 80 a0 60 76 cmp %g1, 0x76 2003210: 12 bf ff ba bne 20030f8 <== NEVER TAKEN 2003214: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 2003218: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 200321c: 80 a0 60 00 cmp %g1, 0 2003220: 12 bf ff b5 bne 20030f4 2003224: b0 10 20 00 clr %i0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 2003228: 81 c7 e0 08 ret 200322c: 81 e8 00 00 restore if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 2003230: 80 a0 40 02 cmp %g1, %g2 2003234: 22 bf ff b7 be,a 2003110 2003238: f0 07 00 00 ld [ %i4 ], %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 200323c: 40 00 2d 7b call 200e828 <__errno> 2003240: b0 10 3f ff mov -1, %i0 2003244: 82 10 20 16 mov 0x16, %g1 2003248: c2 22 00 00 st %g1, [ %o0 ] 200324c: 81 c7 e0 08 ret 2003250: 81 e8 00 00 restore if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 2003254: 40 00 2d 75 call 200e828 <__errno> 2003258: b0 10 3f ff mov -1, %i0 200325c: 82 10 20 0c mov 0xc, %g1 2003260: c2 22 00 00 st %g1, [ %o0 ] 2003264: 81 c7 e0 08 ret 2003268: 81 e8 00 00 restore rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 200326c: 40 00 2d 6f call 200e828 <__errno> 2003270: b0 10 3f ff mov -1, %i0 2003274: 82 10 20 0e mov 0xe, %g1 2003278: c2 22 00 00 st %g1, [ %o0 ] 200327c: 81 c7 e0 08 ret 2003280: 81 e8 00 00 restore =============================================================================== 02002a48 : } } static void disk_unlock(void) { 2002a48: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 2002a4c: 03 00 80 8d sethi %hi(0x2023400), %g1 2002a50: d0 00 63 e8 ld [ %g1 + 0x3e8 ], %o0 ! 20237e8 static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 2002a54: 03 00 80 8d sethi %hi(0x2023400), %g1 2002a58: c0 28 63 e4 clrb [ %g1 + 0x3e4 ] ! 20237e4 sc = rtems_semaphore_release(diskdevs_mutex); 2002a5c: 40 00 16 c7 call 2008578 2002a60: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 2002a64: 80 a2 20 00 cmp %o0, 0 2002a68: 12 80 00 04 bne 2002a78 <== NEVER TAKEN 2002a6c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 2002a70: 81 c7 e0 08 ret 2002a74: 81 e8 00 00 restore /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2002a78: 40 00 18 22 call 2008b00 <== NOT EXECUTED 2002a7c: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02005468 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2005468: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && 200546c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2005470: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2005474: 02 80 00 08 be 2005494 <== NOT EXECUTED 2005478: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED iscntrl(c) && (c != '\t') && (c != '\n')) { 200547c: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED 2005480: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 2005484: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 2005488: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200548c: 12 80 00 07 bne 20054a8 <== NOT EXECUTED 2005490: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2005494: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2005498: 7f ff ff 8d call 20052cc <== NOT EXECUTED 200549c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20054a0: 81 c7 e0 08 ret <== NOT EXECUTED 20054a4: 81 e8 00 00 restore <== NOT EXECUTED */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 20054a8: 02 bf ff fc be 2005498 <== NOT EXECUTED 20054ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20054b0: 80 a6 20 0a cmp %i0, 0xa <== NOT EXECUTED 20054b4: 02 bf ff f9 be 2005498 <== NOT EXECUTED 20054b8: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 20054bc: b0 1e 20 40 xor %i0, 0x40, %i0 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 20054c0: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 20054c4: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 20054c8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 20054cc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 20054d0: 7f ff ff 2f call 200518c <== NOT EXECUTED 20054d4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 20054d8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 20054dc: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 20054e0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 20054e4: 81 c7 e0 08 ret <== NOT EXECUTED 20054e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200430c : void endgrent(void) { if (group_fp != NULL) 200430c: 03 00 80 83 sethi %hi(0x2020c00), %g1 2004310: d0 00 61 58 ld [ %g1 + 0x158 ], %o0 ! 2020d58 2004314: 80 a2 20 00 cmp %o0, 0 2004318: 02 80 00 05 be 200432c <== NEVER TAKEN 200431c: 01 00 00 00 nop fclose(group_fp); 2004320: 82 13 c0 00 mov %o7, %g1 2004324: 40 00 38 b6 call 20125fc 2004328: 9e 10 40 00 mov %g1, %o7 200432c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02004164 : void endpwent(void) { if (passwd_fp != NULL) 2004164: 03 00 80 83 sethi %hi(0x2020c00), %g1 2004168: d0 00 60 78 ld [ %g1 + 0x78 ], %o0 ! 2020c78 200416c: 80 a2 20 00 cmp %o0, 0 2004170: 02 80 00 05 be 2004184 <== NEVER TAKEN 2004174: 01 00 00 00 nop fclose(passwd_fp); 2004178: 82 13 c0 00 mov %o7, %g1 200417c: 40 00 39 20 call 20125fc 2004180: 9e 10 40 00 mov %g1, %o7 2004184: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 020054ec : * Erase a character or line * 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) 20054ec: 9d e3 bf 98 save %sp, -104, %sp tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 20054f0: 35 00 80 74 sethi %hi(0x201d000), %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20054f4: 39 00 80 74 sethi %hi(0x201d000), %i4 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 20054f8: 37 00 80 7a sethi %hi(0x201e800), %i3 rtems_termios_puts ("\b \b", 3, tty); 20054fc: b4 16 a3 90 or %i2, 0x390, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2005500: 10 80 00 07 b 200551c 2005504: b8 17 23 88 or %i4, 0x388, %i4 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2005508: 12 80 00 74 bne 20056d8 <== NOT EXECUTED 200550c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2005510: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005514: 02 80 00 6f be 20056d0 <== NEVER TAKEN 2005518: 01 00 00 00 nop echo ('\n', tty); return; } } while (tty->ccount) { 200551c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2005520: 80 a0 a0 00 cmp %g2, 0 2005524: 02 80 00 22 be 20055ac 2005528: 84 00 bf ff add %g2, -1, %g2 unsigned char c = tty->cbuf[--tty->ccount]; 200552c: c8 06 20 1c ld [ %i0 + 0x1c ], %g4 if (tty->termios.c_lflag & ECHO) { 2005530: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2005534: c4 26 20 20 st %g2, [ %i0 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 2005538: 80 88 e0 08 btst 8, %g3 200553c: 02 bf ff f5 be 2005510 <== NEVER TAKEN 2005540: fa 09 00 02 ldub [ %g4 + %g2 ], %i5 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2005544: 80 a6 60 00 cmp %i1, 0 2005548: 12 80 00 05 bne 200555c 200554c: ba 0f 60 ff and %i5, 0xff, %i5 2005550: 80 88 e0 10 btst 0x10, %g3 2005554: 22 80 00 42 be,a 200565c <== NEVER TAKEN 2005558: c2 0e 20 43 ldub [ %i0 + 0x43 ], %g1 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 200555c: 80 a7 60 09 cmp %i5, 9 2005560: 02 80 00 15 be 20055b4 2005564: c2 06 e3 34 ld [ %i3 + 0x334 ], %g1 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2005568: ba 07 60 01 inc %i5 200556c: c2 08 40 1d ldub [ %g1 + %i5 ], %g1 2005570: 80 88 60 20 btst 0x20, %g1 2005574: 12 bf ff e5 bne 2005508 <== NEVER TAKEN 2005578: 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); 200557c: 11 00 80 74 sethi %hi(0x201d000), %o0 2005580: 92 10 20 03 mov 3, %o1 2005584: 90 12 23 90 or %o0, 0x390, %o0 2005588: 7f ff ff 01 call 200518c 200558c: 94 10 00 18 mov %i0, %o2 if (tty->column) 2005590: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2005594: 80 a0 60 00 cmp %g1, 0 2005598: 02 bf ff df be 2005514 <== NEVER TAKEN 200559c: 80 a6 60 00 cmp %i1, 0 tty->column--; 20055a0: 82 00 7f ff add %g1, -1, %g1 } } } if (!lineFlag) 20055a4: 12 bf ff de bne 200551c 20055a8: c2 26 20 28 st %g1, [ %i0 + 0x28 ] 20055ac: 81 c7 e0 08 ret 20055b0: 81 e8 00 00 restore int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20055b4: 80 a0 a0 00 cmp %g2, 0 20055b8: 02 80 00 17 be 2005614 20055bc: fa 06 20 2c ld [ %i0 + 0x2c ], %i5 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 20055c0: da 06 e3 34 ld [ %i3 + 0x334 ], %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; 20055c4: 82 10 20 00 clr %g1 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) 20055c8: 10 80 00 07 b 20055e4 20055cc: 98 08 e2 00 and %g3, 0x200, %o4 20055d0: 32 80 00 02 bne,a 20055d8 <== NOT EXECUTED 20055d4: ba 07 60 02 add %i5, 2, %i5 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20055d8: 80 a0 80 01 cmp %g2, %g1 20055dc: 22 80 00 0f be,a 2005618 <== NEVER TAKEN 20055e0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 20055e4: c6 09 00 01 ldub [ %g4 + %g1 ], %g3 20055e8: 82 00 60 01 inc %g1 if (c == '\t') { 20055ec: 80 a0 e0 09 cmp %g3, 9 20055f0: 02 80 00 18 be 2005650 20055f4: 9e 03 40 03 add %o5, %g3, %o7 col = (col | 7) + 1; } else if (iscntrl (c)) { 20055f8: de 0b e0 01 ldub [ %o7 + 1 ], %o7 20055fc: 80 8b e0 20 btst 0x20, %o7 2005600: 12 bf ff f4 bne 20055d0 <== NEVER TAKEN 2005604: 80 a3 20 00 cmp %o4, 0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2005608: 80 a0 80 01 cmp %g2, %g1 200560c: 12 bf ff f6 bne 20055e4 2005610: ba 07 60 01 inc %i5 } /* * Back up over the tab */ while (tty->column > col) { 2005614: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2005618: 80 a7 40 01 cmp %i5, %g1 200561c: 16 bf ff be bge 2005514 <== NEVER TAKEN 2005620: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); 2005624: 90 10 00 1c mov %i4, %o0 2005628: 92 10 20 01 mov 1, %o1 200562c: 7f ff fe d8 call 200518c 2005630: 94 10 00 18 mov %i0, %o2 tty->column--; 2005634: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2005638: 82 00 7f ff add %g1, -1, %g1 } /* * Back up over the tab */ while (tty->column > col) { 200563c: 80 a0 40 1d cmp %g1, %i5 2005640: 14 bf ff f9 bg 2005624 2005644: c2 26 20 28 st %g1, [ %i0 + 0x28 ] if (tty->column) tty->column--; } } } if (!lineFlag) 2005648: 10 bf ff b3 b 2005514 200564c: 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; 2005650: ba 17 60 07 or %i5, 7, %i5 2005654: 10 bf ff e1 b 20055d8 2005658: ba 07 60 01 inc %i5 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 200565c: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 2005660: 02 80 00 1a be 20056c8 <== NOT EXECUTED 2005664: 90 08 60 ff and %g1, 0xff, %o0 <== NOT EXECUTED iscntrl(c) && (c != '\t') && (c != '\n')) { 2005668: 05 00 80 7a sethi %hi(0x201e800), %g2 <== NOT EXECUTED 200566c: c4 00 a3 34 ld [ %g2 + 0x334 ], %g2 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED 2005670: 90 08 60 ff and %g1, 0xff, %o0 <== NOT EXECUTED 2005674: 84 00 80 08 add %g2, %o0, %g2 <== NOT EXECUTED 2005678: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 200567c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2005680: 02 80 00 12 be 20056c8 <== NOT EXECUTED 2005684: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 2005688: 02 80 00 10 be 20056c8 <== NOT EXECUTED 200568c: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 2005690: 02 80 00 0e be 20056c8 <== NOT EXECUTED 2005694: 82 18 60 40 xor %g1, 0x40, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2005698: c2 2f bf f9 stb %g1, [ %fp + -7 ] <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 200569c: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 20056a0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 20056a4: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 20056a8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 20056ac: 7f ff fe b8 call 200518c <== NOT EXECUTED 20056b0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED tty->column += 2; 20056b4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 20056b8: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 20056bc: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 20056c0: 81 c7 e0 08 ret <== NOT EXECUTED 20056c4: 81 e8 00 00 restore <== NOT EXECUTED } else { oproc (c, tty); 20056c8: 7f ff ff 01 call 20052cc <== NOT EXECUTED 20056cc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20056d0: 81 c7 e0 08 ret <== NOT EXECUTED 20056d4: 81 e8 00 00 restore <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 20056d8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20056dc: 7f ff fe ac call 200518c <== NOT EXECUTED 20056e0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->column) 20056e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 20056e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20056ec: 12 80 00 0d bne 2005720 <== NOT EXECUTED 20056f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 20056f4: c2 06 e3 34 ld [ %i3 + 0x334 ], %g1 <== NOT EXECUTED 20056f8: c2 08 40 1d ldub [ %g1 + %i5 ], %g1 <== NOT EXECUTED 20056fc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2005700: 02 bf ff a0 be 2005580 <== NOT EXECUTED 2005704: 11 00 80 74 sethi %hi(0x201d000), %o0 <== NOT EXECUTED 2005708: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 200570c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2005710: 12 bf ff 9d bne 2005584 <== NOT EXECUTED 2005714: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2005718: 10 bf ff 7f b 2005514 <== NOT EXECUTED 200571c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; 2005720: 10 bf ff f5 b 20056f4 <== NOT EXECUTED 2005724: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED =============================================================================== 020150b8 : #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) { 20150b8: 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) 20150bc: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 20150c0: 80 a0 60 00 cmp %g1, 0 20150c4: 22 80 00 5c be,a 2015234 20150c8: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 20150cc: c2 06 20 80 ld [ %i0 + 0x80 ], %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) && 20150d0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 20150d4: 80 a0 80 01 cmp %g2, %g1 20150d8: 08 80 00 68 bleu 2015278 <== ALWAYS TAKEN 20150dc: b8 10 20 00 clr %i4 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 20150e0: 80 a6 40 01 cmp %i1, %g1 20150e4: 22 80 00 51 be,a 2015228 20150e8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 20150ec: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 20150f0: 80 a0 60 00 cmp %g1, 0 20150f4: 02 80 00 3b be 20151e0 20150f8: b8 8f 20 ff andcc %i4, 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 20150fc: 02 80 00 06 be 2015114 <== ALWAYS TAKEN 2015100: 01 00 00 00 nop 2015104: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2015108: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201510c: 22 80 00 63 be,a 2015298 <== NOT EXECUTED 2015110: c2 06 20 88 ld [ %i0 + 0x88 ], %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); 2015114: 7f ff f8 ed call 20134c8 2015118: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 201511c: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2015120: 80 a2 20 00 cmp %o0, 0 2015124: 12 80 00 66 bne 20152bc <== NEVER TAKEN 2015128: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 201512c: 80 a7 20 00 cmp %i4, 0 2015130: 22 80 00 32 be,a 20151f8 <== ALWAYS TAKEN 2015134: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2015138: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 201513c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2015140: 32 80 00 2e bne,a 20151f8 <== NOT EXECUTED 2015144: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2015148: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 201514c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2015150: 08 80 00 29 bleu 20151f4 <== NOT EXECUTED 2015154: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED 2015158: 10 80 00 10 b 2015198 <== NOT EXECUTED 201515c: 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); 2015160: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2015164: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 2015168: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 201516c: 40 00 30 c2 call 2021474 <== NOT EXECUTED 2015170: a0 04 20 01 inc %l0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2015174: 7f ff f8 d5 call 20134c8 <== NOT EXECUTED 2015178: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 201517c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2015180: 12 80 00 12 bne 20151c8 <== NOT EXECUTED 2015184: 90 0c 20 ff and %l0, 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++) 2015188: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 201518c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2015190: 28 80 00 1a bleu,a 20151f8 <== NOT EXECUTED 2015194: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2015198: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED 201519c: 40 00 61 48 call 202d6bc <.umul> <== NOT EXECUTED 20151a0: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 20151a4: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 20151a8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 20151ac: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 20151b0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 20151b4: 7f ff f7 60 call 2012f34 <== NOT EXECUTED 20151b8: 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) 20151bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20151c0: 02 bf ff e8 be 2015160 <== NOT EXECUTED 20151c4: 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); 20151c8: 40 00 2d dc call 2020938 <__errno> <== NOT EXECUTED 20151cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20151d0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20151d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20151d8: 81 c7 e0 08 ret <== NOT EXECUTED 20151dc: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 20151e0: 7f ff f8 64 call 2013370 20151e4: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 20151e8: 80 a2 20 00 cmp %o0, 0 20151ec: 12 80 00 34 bne 20152bc <== NEVER TAKEN 20151f0: c0 2e 20 85 clrb [ %i0 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 20151f4: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 20151f8: 94 10 00 19 mov %i1, %o2 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 20151fc: 80 a6 a0 01 cmp %i2, 1 2015200: 02 80 00 2b be 20152ac 2015204: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 2015208: 7f ff f7 4b call 2012f34 201520c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2015210: 80 a2 20 00 cmp %o0, 0 2015214: 12 80 00 2a bne 20152bc <== NEVER TAKEN 2015218: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 201521c: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2015220: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2015224: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2015228: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 201522c: 81 c7 e0 08 ret 2015230: 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.dev, blk, &fs_info->c.buf); 2015234: 94 10 00 19 mov %i1, %o2 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 2015238: 80 a6 a0 01 cmp %i2, 1 201523c: 02 80 00 13 be 2015288 2015240: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 2015244: 7f ff f7 3c call 2012f34 2015248: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 201524c: 80 a2 20 00 cmp %o0, 0 2015250: 12 80 00 1b bne 20152bc <== NEVER TAKEN 2015254: 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) && 2015258: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 201525c: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 2015260: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 2015264: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2015268: 82 10 00 19 mov %i1, %g1 } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 201526c: 80 a0 80 01 cmp %g2, %g1 2015270: 18 bf ff 9c bgu 20150e0 <== NEVER TAKEN 2015274: b8 10 20 00 clr %i4 2015278: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 201527c: 80 a0 40 02 cmp %g1, %g2 2015280: 10 bf ff 98 b 20150e0 2015284: b8 40 20 00 addx %g0, 0, %i4 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2015288: 7f ff f7 72 call 2013050 201528c: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2015290: 10 bf ff f0 b 2015250 2015294: 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, 2015298: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 201529c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 20152a0: 40 00 30 75 call 2021474 <== NOT EXECUTED 20152a4: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 20152a8: 30 bf ff 9b b,a 2015114 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 20152ac: 7f ff f7 69 call 2013050 20152b0: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 20152b4: 10 bf ff d8 b 2015214 20152b8: 80 a2 20 00 cmp %o0, 0 rtems_set_errno_and_return_minus_one(EIO); 20152bc: 40 00 2d 9f call 2020938 <__errno> <== NOT EXECUTED 20152c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20152c4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20152c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20152cc: 81 c7 e0 08 ret <== NOT EXECUTED 20152d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02014f5c : *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2014f5c: 9d e3 bf 98 save %sp, -104, %sp bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2014f60: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2014f64: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2014f68: 80 a0 40 02 cmp %g1, %g2 2014f6c: 0a 80 00 05 bcs 2014f80 <== NEVER TAKEN 2014f70: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2014f74: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2014f78: 80 a0 40 02 cmp %g1, %g2 2014f7c: 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) 2014f80: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 2014f84: 80 a0 60 00 cmp %g1, 0 2014f88: 02 80 00 35 be 201505c 2014f8c: b8 8f 20 ff andcc %i4, 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2014f90: 32 80 00 3b bne,a 201507c 2014f94: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2014f98: 7f ff f9 4c call 20134c8 2014f9c: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2014fa0: 80 a2 20 00 cmp %o0, 0 2014fa4: 12 80 00 3f bne 20150a0 <== NEVER TAKEN 2014fa8: 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) 2014fac: 02 80 00 31 be 2015070 2014fb0: c0 2e 20 84 clrb [ %i0 + 0x84 ] 2014fb4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 2014fb8: 80 a0 60 00 cmp %g1, 0 2014fbc: 32 80 00 2e bne,a 2015074 <== NEVER TAKEN 2014fc0: c0 2e 20 85 clrb [ %i0 + 0x85 ] <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2014fc4: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 2014fc8: 80 a0 60 01 cmp %g1, 1 2014fcc: 08 80 00 29 bleu 2015070 <== NEVER TAKEN 2014fd0: b6 10 20 01 mov 1, %i3 2014fd4: 10 80 00 10 b 2015014 2014fd8: 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); 2014fdc: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 2014fe0: d4 16 00 00 lduh [ %i0 ], %o2 2014fe4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2014fe8: 40 00 31 23 call 2021474 2014fec: b6 06 e0 01 inc %i3 sc = rtems_bdbuf_release_modified(b); 2014ff0: 7f ff f9 36 call 20134c8 2014ff4: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2014ff8: 80 a2 20 00 cmp %o0, 0 2014ffc: 12 80 00 12 bne 2015044 <== NEVER TAKEN 2015000: 90 0e e0 ff and %i3, 0xff, %o0 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2015004: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 2015008: 80 a2 00 01 cmp %o0, %g1 201500c: 3a 80 00 1a bcc,a 2015074 <== ALWAYS TAKEN 2015010: c0 2e 20 85 clrb [ %i0 + 0x85 ] { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2015014: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 2015018: 40 00 61 a9 call 202d6bc <.umul> 201501c: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 2015020: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 2015024: 96 07 bf fc add %fp, -4, %o3 2015028: 94 02 00 0a add %o0, %o2, %o2 201502c: 92 10 00 1d mov %i5, %o1 2015030: 7f ff f7 c1 call 2012f34 2015034: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2015038: 80 a2 20 00 cmp %o0, 0 201503c: 02 bf ff e8 be 2014fdc <== ALWAYS TAKEN 2015040: 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); 2015044: 40 00 2e 3d call 2020938 <__errno> <== NOT EXECUTED 2015048: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201504c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2015050: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015054: 81 c7 e0 08 ret <== NOT EXECUTED 2015058: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 201505c: 7f ff f8 c5 call 2013370 2015060: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2015064: 80 a2 20 00 cmp %o0, 0 2015068: 12 80 00 0e bne 20150a0 <== NEVER TAKEN 201506c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2015070: c0 2e 20 85 clrb [ %i0 + 0x85 ] return RC_OK; } 2015074: 81 c7 e0 08 ret 2015078: 91 e8 20 00 restore %g0, 0, %o0 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) { if (sec_of_fat && !fs_info->vol.mirror) 201507c: 80 a0 60 00 cmp %g1, 0 2015080: 12 bf ff c6 bne 2014f98 <== NEVER TAKEN 2015084: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2015088: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 201508c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 2015090: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2015094: 40 00 30 f8 call 2021474 2015098: d4 16 00 00 lduh [ %i0 ], %o2 201509c: 30 bf ff bf b,a 2014f98 } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 20150a0: 40 00 2e 26 call 2020938 <__errno> <== NOT EXECUTED 20150a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20150a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20150ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20150b0: 81 c7 e0 08 ret <== NOT EXECUTED 20150b4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02015464 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2015464: 9d e3 bf 98 save %sp, -104, %sp <== 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)) ) 2015468: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 201546c: 12 80 00 06 bne 2015484 <== NOT EXECUTED 2015470: f6 06 20 34 ld [ %i0 + 0x34 ], %i3 <== NOT EXECUTED 2015474: c2 0e e0 0a ldub [ %i3 + 0xa ], %g1 <== NOT EXECUTED 2015478: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 201547c: 32 80 00 07 bne,a 2015498 <== NOT EXECUTED 2015480: f8 06 e0 1c ld [ %i3 + 0x1c ], %i4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2015484: c4 0e e0 05 ldub [ %i3 + 5 ], %g2 <== NOT EXECUTED 2015488: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1 <== NOT EXECUTED 201548c: b8 06 7f fe add %i1, -2, %i4 <== NOT EXECUTED 2015490: b9 2f 00 02 sll %i4, %g2, %i4 <== NOT EXECUTED 2015494: b8 07 00 01 add %i4, %g1, %i4 <== 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); 2015498: c2 0e e0 02 ldub [ %i3 + 2 ], %g1 <== NOT EXECUTED 201549c: fa 0e e0 04 ldub [ %i3 + 4 ], %i5 <== NOT EXECUTED 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; 20154a0: c0 27 bf fc clr [ %fp + -4 ] <== 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); 20154a4: bb 2f 40 01 sll %i5, %g1, %i5 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 20154a8: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 20154ac: 12 80 00 10 bne 20154ec <== NOT EXECUTED 20154b0: b0 10 20 00 clr %i0 <== NOT EXECUTED 20154b4: 30 80 00 18 b,a 2015514 <== 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)); 20154b8: c2 16 c0 00 lduh [ %i3 ], %g1 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 20154bc: c4 07 bf fc ld [ %fp + -4 ], %g2 <== 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)); 20154c0: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED 20154c4: 08 80 00 03 bleu 20154d0 <== NOT EXECUTED 20154c8: b2 10 00 1d mov %i5, %i1 <== NOT EXECUTED 20154cc: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 20154d0: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1 <== NOT EXECUTED 20154d4: 40 00 2f e8 call 2021474 <== NOT EXECUTED 20154d8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED count -= c; cmpltd += c; 20154dc: b0 06 00 19 add %i0, %i1, %i0 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 20154e0: ba a7 40 19 subcc %i5, %i1, %i5 <== NOT EXECUTED 20154e4: 02 80 00 0c be 2015514 <== NOT EXECUTED 20154e8: b8 07 20 01 inc %i4 <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 20154ec: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 20154f0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20154f4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 20154f8: 7f ff fe f0 call 20150b8 <== NOT EXECUTED 20154fc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED if (rc != RC_OK) 2015500: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2015504: 02 bf ff ed be 20154b8 <== NOT EXECUTED 2015508: 90 06 80 18 add %i2, %i0, %o0 <== NOT EXECUTED 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); } 201550c: 81 c7 e0 08 ret <== NOT EXECUTED 2015510: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 2015514: 81 c7 e0 08 ret <== NOT EXECUTED 2015518: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201551c : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 201551c: 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)) ) 2015520: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2015524: 12 80 00 06 bne 201553c <== NOT EXECUTED 2015528: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED 201552c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2015530: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2015534: 32 80 00 0e bne,a 201556c <== NOT EXECUTED 2015538: 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) + 201553c: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 2015540: 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_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2015544: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED 2015548: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED 201554c: 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_write(mt_entry, fsec, 0, 2015550: 94 10 20 00 clr %o2 <== NOT EXECUTED 2015554: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2015558: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 201555c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 2015560: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2015564: 7f ff ff 87 call 2015380 <_fat_block_write> <== NOT EXECUTED 2015568: 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; 201556c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2015570: 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, 2015574: 94 10 20 00 clr %o2 <== NOT EXECUTED 2015578: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 201557c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2015580: 7f ff ff 80 call 2015380 <_fat_block_write> <== NOT EXECUTED 2015584: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02015804 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2015804: 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; 2015808: fa 06 20 34 ld [ %i0 + 0x34 ], %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; 201580c: 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, 2015810: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2015814: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2015818: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 201581c: 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; 2015820: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2015824: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED 2015828: 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; 201582c: 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; 2015830: 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; 2015834: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2015838: 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; 201583c: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED 2015840: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED 2015844: 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; 2015848: 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; 201584c: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; 2015850: 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; 2015854: 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; 2015858: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 201585c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2015860: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 2015864: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED 2015868: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 201586c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2015870: 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); 2015874: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2015878: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 201587c: 7f ff fe c1 call 2015380 <_fat_block_write> <== NOT EXECUTED 2015880: 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, 2015884: 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, 2015888: 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, 201588c: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2015890: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2015894: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2015898: 7f ff fe ba call 2015380 <_fat_block_write> <== NOT EXECUTED 201589c: 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) ) 20158a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20158a4: 06 80 00 06 bl 20158bc <== NOT EXECUTED 20158a8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 20158ac: 06 80 00 04 bl 20158bc <== NOT EXECUTED 20158b0: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; return RC_OK; } 20158b4: 81 c7 e0 08 ret <== NOT EXECUTED 20158b8: 81 e8 00 00 restore <== NOT EXECUTED 20158bc: 81 c7 e0 08 ret <== NOT EXECUTED 20158c0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02014604 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2014604: 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) 2014608: c2 06 60 08 ld [ %i1 + 8 ], %g1 201460c: 80 a0 60 01 cmp %g1, 1 2014610: 08 80 00 07 bleu 201462c 2014614: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 { fat_fd->links_num--; 2014618: 82 00 7f ff add %g1, -1, %g1 return rc; 201461c: 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--; 2014620: c2 26 60 08 st %g1, [ %i1 + 8 ] * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 2014624: 81 c7 e0 08 ret 2014628: 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) 201462c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2014630: 80 88 60 01 btst 1, %g1 2014634: 22 80 00 16 be,a 201468c <== ALWAYS TAKEN 2014638: d2 06 60 0c ld [ %i1 + 0xc ], %o1 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 201463c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2014640: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2014644: 7f ff ff 81 call 2014448 <== NOT EXECUTED 2014648: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201464c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014650: 12 bf ff f5 bne 2014624 <== NOT EXECUTED 2014654: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2014658: 7f ff de 20 call 200bed8 <_Chain_Extract> <== NOT EXECUTED 201465c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 2014660: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2014664: 40 00 04 63 call 20157f0 <== NOT EXECUTED 2014668: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201466c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2014670: 32 80 00 13 bne,a 20146bc <== NOT EXECUTED 2014674: 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); 2014678: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 201467c: 7f ff c7 b7 call 2006558 2014680: b0 10 00 1d mov %i5, %i0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2014684: 40 00 03 14 call 20152d4 2014688: 81 e8 00 00 restore free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 201468c: 40 00 04 59 call 20157f0 2014690: 90 10 00 18 mov %i0, %o0 2014694: 80 8a 20 ff btst 0xff, %o0 2014698: 02 80 00 05 be 20146ac <== ALWAYS TAKEN 201469c: 01 00 00 00 nop { fat_fd->links_num = 0; 20146a0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20146a4: 40 00 03 0c call 20152d4 <== NOT EXECUTED 20146a8: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED 20146ac: 7f ff de 0b call 200bed8 <_Chain_Extract> 20146b0: 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); 20146b4: 10 bf ff f2 b 201467c 20146b8: 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); 20146bc: 40 00 04 3f call 20157b8 <== NOT EXECUTED 20146c0: 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); 20146c4: 10 bf ff ee b 201467c <== NOT EXECUTED 20146c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED =============================================================================== 02014d74 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2014d74: 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; 2014d78: 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) 2014d7c: 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; 2014d80: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2014d84: 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; 2014d88: 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) 2014d8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014d90: 12 80 00 04 bne 2014da0 <== NOT EXECUTED 2014d94: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 2014d98: 81 c7 e0 08 ret <== NOT EXECUTED 2014d9c: 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); 2014da0: 40 00 01 4d call 20152d4 <== NOT EXECUTED 2014da4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2014da8: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2014dac: 12 bf ff fb bne 2014d98 <== NOT EXECUTED 2014db0: 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) 2014db4: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 2014db8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 2014dbc: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2014dc0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2014dc4: 1a bf ff f5 bcc 2014d98 <== NOT EXECUTED 2014dc8: 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)) ) 2014dcc: 02 80 00 23 be 2014e58 <== NOT EXECUTED 2014dd0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2014dd4: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED 2014dd8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2014ddc: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED 2014de0: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED 2014de4: 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++ ) 2014de8: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2014dec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014df0: 02 80 00 20 be 2014e70 <== NOT EXECUTED 2014df4: ba 10 20 00 clr %i5 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2014df8: 10 80 00 0c b 2014e28 <== NOT EXECUTED 2014dfc: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2014e00: 7f ff f9 e1 call 2013584 <== NOT EXECUTED 2014e04: ba 07 60 01 inc %i5 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2014e08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014e0c: 12 80 00 0d bne 2014e40 <== NOT EXECUTED 2014e10: 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++ ) 2014e14: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2014e18: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 2014e1c: 08 80 00 15 bleu 2014e70 <== NOT EXECUTED 2014e20: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2014e24: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED 2014e28: 94 07 40 1b add %i5, %i3, %o2 <== NOT EXECUTED 2014e2c: 7f ff f8 89 call 2013050 <== NOT EXECUTED 2014e30: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2014e34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014e38: 02 bf ff f2 be 2014e00 <== NOT EXECUTED 2014e3c: 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 ); 2014e40: 40 00 2e be call 2020938 <__errno> <== NOT EXECUTED 2014e44: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED 2014e48: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2014e4c: 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; } 2014e50: 81 c7 e0 08 ret <== NOT EXECUTED 2014e54: 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)) ) 2014e58: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2014e5c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2014e60: 22 bf ff de be,a 2014dd8 <== NOT EXECUTED 2014e64: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2014e68: 10 bf ff e0 b 2014de8 <== NOT EXECUTED 2014e6c: 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); 2014e70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2014e74: 40 00 26 1c call 201e6e4 <== NOT EXECUTED 2014e78: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2014e7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014e80: 02 bf ff cd be 2014db4 <== NOT EXECUTED 2014e84: 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); 2014e88: 10 bf ff c4 b 2014d98 <== NOT EXECUTED 2014e8c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED =============================================================================== 0201480c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 201480c: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2014810: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 2014814: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 2014818: 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; 201481c: 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; 2014820: 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 ) { 2014824: 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) 2014828: 80 a6 80 01 cmp %i2, %g1 201482c: 08 80 00 3d bleu 2014920 2014830: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2014834: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2014838: 80 a0 a0 01 cmp %g2, 1 201483c: 22 80 00 3b be,a 2014928 <== NEVER TAKEN 2014840: 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))) & 2014844: c6 17 20 06 lduh [ %i4 + 6 ], %g3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2014848: 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))) & 201484c: 84 00 ff ff add %g3, -1, %g2 2014850: 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 - 2014854: a0 20 c0 10 sub %g3, %l0, %l0 2014858: 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) 201485c: 80 a4 00 12 cmp %l0, %l2 2014860: 1a 80 00 30 bcc 2014920 2014864: 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) 2014868: a4 a4 80 10 subcc %l2, %l0, %l2 201486c: 02 80 00 2d be 2014920 <== NEVER TAKEN 2014870: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2014874: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2014878: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 201487c: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2014880: 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; 2014884: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2014888: 96 07 bf fc add %fp, -4, %o3 201488c: 94 10 00 11 mov %l1, %o2 2014890: 40 00 29 18 call 201ecf0 2014894: 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) 2014898: b0 92 20 00 orcc %o0, 0, %i0 201489c: 12 80 00 21 bne 2014920 <== NEVER TAKEN 20148a0: 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)) 20148a4: 80 94 00 01 orcc %l0, %g1, %g0 20148a8: 02 80 00 27 be 2014944 <== NEVER TAKEN 20148ac: 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) 20148b0: 02 80 00 0b be 20148dc <== ALWAYS TAKEN 20148b4: 88 38 00 01 xnor %g0, %g1, %g4 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20148b8: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20148bc: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED 20148c0: 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) - 20148c4: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20148c8: 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) - 20148cc: 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 - 20148d0: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20148d4: 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 - 20148d8: 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 ) 20148dc: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20148e0: 80 a2 e0 00 cmp %o3, 0 20148e4: 32 80 00 1e bne,a 201495c 20148e8: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20148ec: c4 07 bf f0 ld [ %fp + -16 ], %g2 fat_fd->map.file_cln = 0; 20148f0: 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; 20148f4: c4 26 60 1c st %g2, [ %i1 + 0x1c ] 20148f8: 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) 20148fc: 80 a0 60 00 cmp %g1, 0 2014900: 22 80 00 08 be,a 2014920 <== NEVER TAKEN 2014904: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2014908: c4 07 bf f8 ld [ %fp + -8 ], %g2 if (fat_fd->fat_file_type == FAT_DIRECTORY) 201490c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2014910: 80 a0 60 01 cmp %g1, 1 2014914: 02 80 00 20 be 2014994 2014918: c4 26 60 3c st %g2, [ %i1 + 0x3c ] return rc; } } } fat_fd->fat_file_size = new_length; 201491c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] return RC_OK; } 2014920: 81 c7 e0 08 ret 2014924: 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)) && 2014928: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 201492c: 32 bf ff c7 bne,a 2014848 <== NOT EXECUTED 2014930: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2014934: 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)) && 2014938: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 201493c: 22 bf ff c3 be,a 2014848 <== NOT EXECUTED 2014940: 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); 2014944: 40 00 2f fd call 2020938 <__errno> <== NOT EXECUTED 2014948: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201494c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2014950: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2014954: 81 c7 e0 08 ret <== NOT EXECUTED 2014958: 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) 201495c: 80 a2 7f ff cmp %o1, -1 2014960: 22 80 00 19 be,a 20149c4 <== NEVER TAKEN 2014964: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 2014968: 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); 201496c: d4 07 bf f0 ld [ %fp + -16 ], %o2 2014970: 40 00 27 e5 call 201e904 2014974: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2014978: 82 92 20 00 orcc %o0, 0, %g1 201497c: 12 80 00 0d bne 20149b0 <== NEVER TAKEN 2014980: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 2014984: 40 00 02 54 call 20152d4 2014988: 90 10 00 1c mov %i4, %o0 201498c: 10 bf ff dc b 20148fc 2014990: 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); 2014994: d2 07 bf f0 ld [ %fp + -16 ], %o1 2014998: 40 00 02 fc call 2015588 201499c: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20149a0: 82 92 20 00 orcc %o0, 0, %g1 20149a4: 22 bf ff df be,a 2014920 <== ALWAYS TAKEN 20149a8: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 20149ac: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20149b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20149b4: 40 00 28 96 call 201ec0c <== NOT EXECUTED 20149b8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 20149bc: 81 c7 e0 08 ret <== NOT EXECUTED 20149c0: 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, 20149c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20149c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20149cc: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 20149d0: 7f ff ff 3f call 20146cc <== NOT EXECUTED 20149d4: 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; 20149d8: 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 ) 20149dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20149e0: 02 bf ff e3 be 201496c <== NOT EXECUTED 20149e4: 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); 20149e8: 10 bf ff f2 b 20149b0 <== NOT EXECUTED 20149ec: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED =============================================================================== 020146cc : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20146cc: 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); 20146d0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20146d4: 82 07 a0 50 add %fp, 0x50, %g1 20146d8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20146dc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20146e0: c2 27 bf f8 st %g1, [ %fp + -8 ] fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20146e4: ba 10 00 18 mov %i0, %i5 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 20146e8: 80 a6 a0 01 cmp %i2, 1 20146ec: 02 80 00 08 be 201470c <== ALWAYS TAKEN 20146f0: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 *ret = cur_cln; break; default: errno = EINVAL; 20146f4: 40 00 30 91 call 2020938 <__errno> <== NOT EXECUTED 20146f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20146fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2014700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 2014704: 81 c7 e0 08 ret <== NOT EXECUTED 2014708: 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 ) { 201470c: 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 *); 2014710: b8 07 a0 58 add %fp, 0x58, %i4 2014714: f8 27 bf f8 st %i4, [ %fp + -8 ] va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2014718: 86 10 00 1b mov %i3, %g3 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 201471c: 80 a6 c0 04 cmp %i3, %g4 2014720: 1a 80 00 35 bcc 20147f4 <== NEVER TAKEN 2014724: e0 07 a0 54 ld [ %fp + 0x54 ], %l0 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2014728: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 201472c: 80 a0 60 01 cmp %g1, 1 2014730: 22 80 00 1c be,a 20147a0 2014734: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 2014738: f4 08 a0 08 ldub [ %g2 + 8 ], %i2 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 201473c: f6 06 60 34 ld [ %i1 + 0x34 ], %i3 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 2014740: b5 30 c0 1a srl %g3, %i2, %i2 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014744: 80 a6 80 1b cmp %i2, %i3 2014748: 22 80 00 28 be,a 20147e8 <== ALWAYS TAKEN 201474c: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2014750: 28 80 00 23 bleu,a 20147dc <== NOT EXECUTED 2014754: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2014758: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 201475c: b6 26 80 1b sub %i2, %i3, %i3 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2014760: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014764: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2014768: 02 80 00 18 be 20147c8 <== NOT EXECUTED 201476c: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014770: 10 80 00 06 b 2014788 <== NOT EXECUTED 2014774: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014778: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED 201477c: 02 80 00 13 be 20147c8 <== NOT EXECUTED 2014780: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014784: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2014788: 40 00 27 d7 call 201e6e4 <== NOT EXECUTED 201478c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2014790: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2014794: 22 bf ff f9 be,a 2014778 <== NOT EXECUTED 2014798: b8 07 20 01 inc %i4 <== NOT EXECUTED 201479c: 30 80 00 1a b,a 2014804 <== NOT EXECUTED 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)) && 20147a0: 80 a0 60 00 cmp %g1, 0 20147a4: 32 bf ff e6 bne,a 201473c <== NEVER TAKEN 20147a8: f4 08 a0 08 ldub [ %g2 + 8 ], %i2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20147ac: c2 08 a0 0a ldub [ %g2 + 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)) && 20147b0: 80 88 60 03 btst 3, %g1 20147b4: 22 bf ff e2 be,a 201473c <== NEVER TAKEN 20147b8: f4 08 a0 08 ldub [ %g2 + 8 ], %i2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 20147bc: c0 24 00 00 clr [ %l0 ] rc = RC_OK; break; 20147c0: 81 c7 e0 08 ret 20147c4: 91 e8 20 00 restore %g0, 0, %o0 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 20147c8: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 20147cc: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if ( rc != RC_OK ) break; *ret = cur_cln; 20147d0: d2 24 00 00 st %o1, [ %l0 ] <== NOT EXECUTED errno = EINVAL; rc = -1; break; } va_end(ap); return rc; 20147d4: 81 c7 e0 08 ret <== NOT EXECUTED 20147d8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 20147dc: b6 10 00 1a mov %i2, %i3 <== NOT EXECUTED 20147e0: 10 bf ff e1 b 2014764 <== NOT EXECUTED 20147e4: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if ( rc != RC_OK ) break; *ret = cur_cln; 20147e8: d2 24 00 00 st %o1, [ %l0 ] errno = EINVAL; rc = -1; break; } va_end(ap); return rc; 20147ec: 81 c7 e0 08 ret 20147f0: 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 ); 20147f4: 40 00 30 51 call 2020938 <__errno> <== NOT EXECUTED 20147f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20147fc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2014800: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2014804: 81 c7 e0 08 ret <== NOT EXECUTED 2014808: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02014cc8 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2014cc8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 2014ccc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2014cd0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2014cd4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2014cd8: 02 80 00 0c be 2014d08 <== NOT EXECUTED 2014cdc: 86 10 20 01 mov 1, %g3 <== 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)) ) 2014ce0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014ce4: 32 80 00 1f bne,a 2014d60 <== NOT EXECUTED 2014ce8: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED 2014cec: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 <== NOT EXECUTED 2014cf0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2014cf4: 22 80 00 1b be,a 2014d60 <== NOT EXECUTED 2014cf8: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2014cfc: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 <== 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) << 2014d00: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED 2014d04: 87 28 c0 02 sll %g3, %g2, %g3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2014d08: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED 2014d0c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2014d10: b9 30 a0 09 srl %g2, 9, %i4 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2014d14: 85 30 a0 05 srl %g2, 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) + 2014d18: 86 00 c0 1c add %g3, %i4, %g3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2014d1c: 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) + 2014d20: b9 28 e0 04 sll %g3, 4, %i4 <== NOT EXECUTED 2014d24: 7f ff dc 6d call 200bed8 <_Chain_Extract> <== NOT EXECUTED 2014d28: b8 07 00 02 add %i4, %g2, %i4 <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 2014d2c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2014d30: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 2014d34: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2014d38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2014d3c: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 2014d40: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 2014d44: 7f ff dc 5a call 200beac <_Chain_Append> <== NOT EXECUTED 2014d48: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 2014d4c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 2014d50: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2014d54: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 2014d58: 81 c7 e0 08 ret <== NOT EXECUTED 2014d5c: 81 e8 00 00 restore <== 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; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2014d60: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED 2014d64: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 2014d68: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED 2014d6c: 10 bf ff e5 b 2014d00 <== NOT EXECUTED 2014d70: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED =============================================================================== 02013efc : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2013efc: 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) + 2013f00: c2 06 40 00 ld [ %i1 ], %g1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2013f04: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2013f08: 80 a0 60 01 cmp %g1, 1 2013f0c: 02 80 00 0c be 2013f3c 2013f10: 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)) ) 2013f14: 80 a0 60 00 cmp %g1, 0 2013f18: 32 80 00 7d bne,a 201410c 2013f1c: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 2013f20: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 2013f24: 80 88 a0 03 btst 3, %g2 2013f28: 22 80 00 79 be,a 201410c <== NEVER TAKEN 2013f2c: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2013f30: 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) << 2013f34: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2013f38: 85 28 80 03 sll %g2, %g3, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2013f3c: 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); 2013f40: de 07 60 68 ld [ %i5 + 0x68 ], %o7 2013f44: b9 30 60 09 srl %g1, 9, %i4 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2013f48: 83 30 60 05 srl %g1, 5, %g1 2013f4c: 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) + 2013f50: 84 00 80 1c add %g2, %i4, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2013f54: 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) + 2013f58: 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; 2013f5c: 82 0f 20 01 and %i4, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2013f60: 85 28 60 02 sll %g1, 2, %g2 2013f64: a1 28 60 04 sll %g1, 4, %l0 2013f68: 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; 2013f6c: c2 03 c0 10 ld [ %o7 + %l0 ], %g1 2013f70: 9e 03 c0 10 add %o7, %l0, %o7 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 2013f74: 9e 03 e0 04 add %o7, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2013f78: 80 a0 40 0f cmp %g1, %o7 2013f7c: 22 80 00 1f be,a 2013ff8 2013f80: c4 07 60 6c ld [ %i5 + 0x6c ], %g2 2013f84: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2013f88: 80 a0 a0 01 cmp %g2, 1 2013f8c: 02 80 00 0c be 2013fbc 2013f90: 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)) ) 2013f94: 80 a0 a0 00 cmp %g2, 0 2013f98: 32 80 00 62 bne,a 2014120 2013f9c: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 2013fa0: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 2013fa4: 80 88 e0 03 btst 3, %g3 2013fa8: 22 80 00 5e be,a 2014120 <== NEVER TAKEN 2013fac: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2013fb0: 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) << 2013fb4: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2013fb8: 89 29 00 03 sll %g4, %g3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2013fbc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 2013fc0: b7 30 e0 09 srl %g3, 9, %i3 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2013fc4: 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) + 2013fc8: 88 01 00 1b add %g4, %i3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2013fcc: 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) + 2013fd0: 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) + 2013fd4: 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) 2013fd8: 80 a7 00 03 cmp %i4, %g3 2013fdc: 22 80 00 56 be,a 2014134 2013fe0: c4 00 60 08 ld [ %g1 + 8 ], %g2 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2013fe4: 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) ; ) 2013fe8: 80 a0 40 0f cmp %g1, %o7 2013fec: 32 bf ff e7 bne,a 2013f88 2013ff0: 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); 2013ff4: c4 07 60 6c ld [ %i5 + 0x6c ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2013ff8: c2 00 80 10 ld [ %g2 + %l0 ], %g1 2013ffc: 84 00 80 10 add %g2, %l0, %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 2014000: 9e 00 a0 04 add %g2, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2014004: 80 a0 40 0f cmp %g1, %o7 2014008: 02 80 00 1f be 2014084 <== ALWAYS TAKEN 201400c: a2 10 3f ff mov -1, %l1 2014010: 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) 2014014: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2014018: 02 80 00 0c be 2014048 <== NOT EXECUTED 201401c: 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)) ) 2014020: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2014024: 32 80 00 49 bne,a 2014148 <== NOT EXECUTED 2014028: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED 201402c: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED 2014030: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 2014034: 22 80 00 45 be,a 2014148 <== NOT EXECUTED 2014038: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 201403c: 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) << 2014040: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED 2014044: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2014048: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED 201404c: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2014050: 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) + 2014054: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2014058: 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) + 201405c: 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) + 2014060: 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) 2014064: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 2014068: 02 80 00 3d be 201415c <== NOT EXECUTED 201406c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2014070: 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) ; ) 2014074: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED 2014078: 32 bf ff e7 bne,a 2014014 <== NOT EXECUTED 201407c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 2014080: 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)); 2014084: 7f ff cb 57 call 2006de0 2014088: 90 10 20 44 mov 0x44, %o0 201408c: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 2014090: 80 a2 20 00 cmp %o0, 0 2014094: 02 80 00 40 be 2014194 <== NEVER TAKEN 2014098: b6 10 00 08 mov %o0, %i3 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 201409c: 92 10 20 00 clr %o1 20140a0: 40 00 35 31 call 2021564 20140a4: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 20140a8: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 20140ac: c8 06 40 00 ld [ %i1 ], %g4 20140b0: c6 06 60 04 ld [ %i1 + 4 ], %g3 20140b4: c4 06 60 08 ld [ %i1 + 8 ], %g2 20140b8: 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; 20140bc: b2 0b ff fe and %o7, -2, %i1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 20140c0: 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; 20140c4: 9e 10 20 01 mov 1, %o7 lfat_fd->flags &= ~FAT_FILE_REMOVED; 20140c8: 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; 20140cc: de 26 e0 08 st %o7, [ %i3 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 20140d0: b2 10 3f ff mov -1, %i1 lfat_fd->dir_pos = *dir_pos; 20140d4: 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; 20140d8: f2 26 e0 3c st %i1, [ %i3 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 20140dc: c4 26 e0 28 st %g2, [ %i3 + 0x28 ] if ( rc != RC_OK ) 20140e0: 80 a4 60 00 cmp %l1, 0 20140e4: 02 80 00 25 be 2014178 <== NEVER TAKEN 20140e8: c2 26 e0 2c st %g1, [ %i3 + 0x2c ] lfat_fd->ino = key; 20140ec: 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); 20140f0: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 20140f4: 92 10 00 1b mov %i3, %o1 20140f8: 90 02 00 10 add %o0, %l0, %o0 20140fc: 7f ff df 6c call 200beac <_Chain_Append> 2014100: b0 10 20 00 clr %i0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2014104: 81 c7 e0 08 ret 2014108: 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) + 201410c: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 2014110: 82 00 7f fe add %g1, -2, %g1 2014114: 85 28 40 02 sll %g1, %g2, %g2 2014118: 10 bf ff 87 b 2013f34 201411c: 84 00 80 03 add %g2, %g3, %g2 2014120: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 2014124: 84 00 bf fe add %g2, -2, %g2 2014128: 89 28 80 04 sll %g2, %g4, %g4 201412c: 10 bf ff a2 b 2013fb4 2014130: 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; 2014134: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2014138: 84 00 a0 01 inc %g2 201413c: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2014140: 81 c7 e0 08 ret 2014144: 91 e8 20 00 restore %g0, 0, %o0 2014148: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED 201414c: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 2014150: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED 2014154: 10 bf ff bb b 2014040 <== NOT EXECUTED 2014158: 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) ) 201415c: 02 bf ff ca be 2014084 <== NOT EXECUTED 2014160: a2 10 20 00 clr %l1 <== NOT EXECUTED 2014164: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 2014168: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED 201416c: 32 bf ff c2 bne,a 2014074 <== NOT EXECUTED 2014170: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 2014174: 30 bf ff c4 b,a 2014084 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2014178: 40 00 05 50 call 20156b8 <== NOT EXECUTED 201417c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2014180: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014184: 12 bf ff db bne 20140f0 <== NOT EXECUTED 2014188: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 201418c: 7f ff c8 f3 call 2006558 <== NOT EXECUTED 2014190: 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 ); 2014194: 40 00 31 e9 call 2020938 <__errno> <== NOT EXECUTED 2014198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201419c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20141a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20141a4: 81 c7 e0 08 ret <== NOT EXECUTED 20141a8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020141c4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 20141c4: 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; 20141c8: c0 27 bf f8 clr [ %fp + -8 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 20141cc: 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; 20141d0: e2 06 20 34 ld [ %i0 + 0x34 ], %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) 20141d4: 80 a6 e0 00 cmp %i3, 0 20141d8: 02 80 00 27 be 2014274 <== NEVER TAKEN 20141dc: 90 10 20 00 clr %o0 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 20141e0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20141e4: 80 a0 40 1a cmp %g1, %i2 20141e8: 08 80 00 23 bleu 2014274 <== NEVER TAKEN 20141ec: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 20141f0: 08 80 00 23 bleu 201427c <== ALWAYS TAKEN 20141f4: 84 20 40 1b sub %g1, %i3, %g2 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 20141f8: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20141fc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2014200: 80 a0 60 01 cmp %g1, 1 2014204: 22 80 00 23 be,a 2014290 2014208: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 201420c: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014210: e4 06 60 34 ld [ %i1 + 0x34 ], %l2 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2014214: a7 36 80 13 srl %i2, %l3, %l3 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014218: 80 a4 c0 12 cmp %l3, %l2 201421c: 02 80 00 76 be 20143f4 <== ALWAYS TAKEN 2014220: e8 14 60 06 lduh [ %l1 + 6 ], %l4 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2014224: 80 a4 c0 12 cmp %l3, %l2 <== NOT EXECUTED 2014228: 38 80 00 35 bgu,a 20142fc <== NOT EXECUTED 201422c: 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; 2014230: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED 2014234: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED 2014238: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 201423c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2014240: 02 80 00 32 be 2014308 <== NOT EXECUTED 2014244: a0 10 20 00 clr %l0 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014248: 10 80 00 06 b 2014260 <== NOT EXECUTED 201424c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014250: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED 2014254: 02 80 00 2d be 2014308 <== NOT EXECUTED 2014258: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 201425c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2014260: 40 00 29 21 call 201e6e4 <== NOT EXECUTED 2014264: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2014268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201426c: 02 bf ff f9 be 2014250 <== NOT EXECUTED 2014270: a0 04 20 01 inc %l0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 2014274: 81 c7 e0 08 ret 2014278: 91 e8 00 08 restore %g0, %o0, %o0 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 201427c: 80 a6 80 02 cmp %i2, %g2 2014280: 28 bf ff e0 bleu,a 2014200 <== ALWAYS TAKEN 2014284: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2014288: 10 bf ff dd b 20141fc <== NOT EXECUTED 201428c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2014290: 80 a0 60 00 cmp %g1, 0 2014294: 32 bf ff df bne,a 2014210 <== NEVER TAKEN 2014298: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201429c: 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)) && 20142a0: 80 88 60 03 btst 3, %g1 20142a4: 22 bf ff db be,a 2014210 <== NEVER TAKEN 20142a8: 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); 20142ac: 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)) ) 20142b0: 80 a0 60 00 cmp %g1, 0 20142b4: 32 80 00 53 bne,a 2014400 <== NEVER TAKEN 20142b8: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20142bc: d2 04 60 1c ld [ %l1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 20142c0: c2 0c 60 02 ldub [ %l1 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 20142c4: 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); 20142c8: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 20142cc: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 20142d0: 90 10 00 1d mov %i5, %o0 20142d4: 92 02 40 01 add %o1, %g1, %o1 20142d8: 94 0e 80 0a and %i2, %o2, %o2 20142dc: 96 10 00 1b mov %i3, %o3 20142e0: 40 00 04 06 call 20152f8 <_fat_block_read> 20142e4: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20142e8: 80 a2 20 00 cmp %o0, 0 20142ec: 16 bf ff e2 bge 2014274 <== ALWAYS TAKEN 20142f0: 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; 20142f4: 10 bf ff e0 b 2014274 <== NOT EXECUTED 20142f8: 90 10 3f ff mov -1, %o0 ! ffffffff <== 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; 20142fc: a4 24 c0 12 sub %l3, %l2, %l2 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2014300: 10 bf ff cf b 201423c <== NOT EXECUTED 2014304: 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; 2014308: e6 26 60 34 st %l3, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 201430c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2014310: d2 27 bf f8 st %o1, [ %fp + -8 ] <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2014314: a9 2d 20 10 sll %l4, 0x10, %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014318: 80 a6 e0 00 cmp %i3, 0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 201431c: a9 35 20 10 srl %l4, 0x10, %l4 2014320: a8 05 3f ff add %l4, -1, %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014324: 02 80 00 45 be 2014438 <== NEVER TAKEN 2014328: b4 0e 80 14 and %i2, %l4, %i2 /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 201432c: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 2014330: d4 14 40 00 lduh [ %l1 ], %o2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014334: 82 10 00 1a mov %i2, %g1 2014338: 10 80 00 20 b 20143b8 201433c: a4 10 20 00 clr %l2 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)) ) 2014340: de 08 e0 0a ldub [ %g3 + 0xa ], %o7 <== NOT EXECUTED 2014344: 80 8b e0 03 btst 3, %o7 <== NOT EXECUTED 2014348: 22 80 00 26 be,a 20143e0 <== NOT EXECUTED 201434c: de 08 e0 05 ldub [ %g3 + 5 ], %o7 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2014350: 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); 2014354: 85 30 40 02 srl %g1, %g2, %g2 byte = ofs & (fs_info->vol.bps - 1); 2014358: 95 2a a0 10 sll %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 201435c: 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); 2014360: 95 32 a0 10 srl %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 2014364: 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); 2014368: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 201436c: 96 10 00 10 mov %l0, %o3 2014370: 94 0a 80 01 and %o2, %g1, %o2 2014374: 40 00 03 e1 call 20152f8 <_fat_block_read> 2014378: 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); 201437c: 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_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) 2014380: 80 a2 20 00 cmp %o0, 0 2014384: 06 bf ff dc bl 20142f4 <== NEVER TAKEN 2014388: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 201438c: e8 07 bf f8 ld [ %fp + -8 ], %l4 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 2014390: a4 04 80 10 add %l2, %l0, %l2 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014394: 40 00 28 d4 call 201e6e4 2014398: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 201439c: 80 a2 20 00 cmp %o0, 0 20143a0: 12 bf ff b5 bne 2014274 <== NEVER TAKEN 20143a4: 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) 20143a8: 02 80 00 1b be 2014414 <== ALWAYS TAKEN 20143ac: 82 10 20 00 clr %g1 20143b0: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED 20143b4: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 20143b8: e0 14 60 06 lduh [ %l1 + 6 ], %l0 20143bc: a0 24 00 01 sub %l0, %g1, %l0 20143c0: 80 a4 00 1b cmp %l0, %i3 20143c4: 08 80 00 03 bleu 20143d0 20143c8: c8 07 bf f8 ld [ %fp + -8 ], %g4 20143cc: 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)) ) 20143d0: 80 a1 20 00 cmp %g4, 0 20143d4: 02 bf ff db be 2014340 <== NEVER TAKEN 20143d8: c6 07 60 34 ld [ %i5 + 0x34 ], %g3 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 20143dc: de 08 e0 05 ldub [ %g3 + 5 ], %o7 20143e0: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 20143e4: 92 01 3f fe add %g4, -2, %o1 20143e8: 93 2a 40 0f sll %o1, %o7, %o1 20143ec: 10 bf ff da b 2014354 20143f0: 92 02 40 03 add %o1, %g3, %o1 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 20143f4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 20143f8: 10 bf ff c7 b 2014314 20143fc: c2 27 bf f8 st %g1, [ %fp + -8 ] 2014400: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 2014404: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 2014408: 93 28 40 03 sll %g1, %g3, %o1 <== NOT EXECUTED 201440c: 10 bf ff ad b 20142c0 <== NOT EXECUTED 2014410: 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; 2014414: 90 10 00 12 mov %l2, %o0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2014418: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 201441c: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2014420: 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); 2014424: a4 06 80 12 add %i2, %l2, %l2 2014428: 83 34 80 01 srl %l2, %g1, %g1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 201442c: a6 00 40 13 add %g1, %l3, %l3 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2014430: 10 bf ff 91 b 2014274 2014434: e6 26 60 34 st %l3, [ %i1 + 0x34 ] rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014438: 90 10 20 00 clr %o0 <== NOT EXECUTED 201443c: a8 10 20 00 clr %l4 <== NOT EXECUTED 2014440: 10 bf ff f6 b 2014418 <== NOT EXECUTED 2014444: a4 10 20 00 clr %l2 <== NOT EXECUTED =============================================================================== 02014e90 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2014e90: 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; 2014e94: 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)) && 2014e98: 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; 2014e9c: 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 ) { 2014ea0: 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)) && 2014ea4: 80 a0 60 01 cmp %g1, 1 2014ea8: 02 80 00 21 be 2014f2c <== NEVER TAKEN 2014eac: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2014eb0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2014eb4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2014eb8: 84 0f 40 02 and %i5, %g2, %g2 2014ebc: 80 a0 80 01 cmp %g2, %g1 2014ec0: 0a 80 00 0e bcs 2014ef8 <== ALWAYS TAKEN 2014ec4: 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; 2014ec8: 10 80 00 15 b 2014f1c <== NOT EXECUTED 2014ecc: 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; 2014ed0: 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) 2014ed4: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2014ed8: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2014edc: 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; 2014ee0: 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) 2014ee4: 86 08 40 03 and %g1, %g3, %g3 2014ee8: 80 a0 c0 02 cmp %g3, %g2 2014eec: 1a 80 00 0c bcc 2014f1c <== ALWAYS TAKEN 2014ef0: c8 26 60 18 st %g4, [ %i1 + 0x18 ] 2014ef4: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014ef8: 92 10 00 1d mov %i5, %o1 2014efc: 90 10 00 1b mov %i3, %o0 2014f00: 40 00 25 f9 call 201e6e4 2014f04: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2014f08: 80 a2 20 00 cmp %o0, 0 2014f0c: 22 bf ff f1 be,a 2014ed0 <== ALWAYS TAKEN 2014f10: 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; } 2014f14: 81 c7 e0 08 ret <== NOT EXECUTED 2014f18: 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; 2014f1c: 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; 2014f20: fa 26 60 3c st %i5, [ %i1 + 0x3c ] return rc; } 2014f24: 81 c7 e0 08 ret 2014f28: 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)) && 2014f2c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2014f30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2014f34: 32 bf ff e0 bne,a 2014eb4 <== NOT EXECUTED 2014f38: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2014f3c: 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)) && 2014f40: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2014f44: 22 bf ff dc be,a 2014eb4 <== NOT EXECUTED 2014f48: 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; 2014f4c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED return rc; 2014f50: 90 10 20 00 clr %o0 <== NOT EXECUTED 2014f54: 10 bf ff f0 b 2014f14 <== NOT EXECUTED 2014f58: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED =============================================================================== 02014448 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2014448: 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 ) 201444c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2014450: ba 10 00 18 mov %i0, %i5 uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 2014454: 80 a0 40 1a cmp %g1, %i2 2014458: 08 80 00 2b bleu 2014504 <== NEVER TAKEN 201445c: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 return rc; assert(fat_fd->fat_file_size); 2014460: 80 a0 60 00 cmp %g1, 0 2014464: 02 80 00 60 be 20145e4 <== NEVER TAKEN 2014468: 11 00 80 c4 sethi %hi(0x2031000), %o0 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 201446c: c6 08 a0 08 ldub [ %g2 + 8 ], %g3 2014470: c4 10 a0 06 lduh [ %g2 + 6 ], %g2 2014474: 84 00 bf ff add %g2, -1, %g2 2014478: b4 00 80 1a add %g2, %i2, %i2 201447c: b5 36 80 03 srl %i2, %g3, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2014480: 87 2e 80 03 sll %i2, %g3, %g3 2014484: 80 a0 40 03 cmp %g1, %g3 2014488: 08 80 00 1d bleu 20144fc <== NEVER TAKEN 201448c: 90 10 20 00 clr %o0 return RC_OK; if (cl_start != 0) 2014490: 80 a6 a0 00 cmp %i2, 0 2014494: 32 80 00 1f bne,a 2014510 <== NEVER TAKEN 2014498: e4 06 60 34 ld [ %i1 + 0x34 ], %l2 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 201449c: e2 06 60 34 ld [ %i1 + 0x34 ], %l1 { 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; 20144a0: a0 10 3f ff mov -1, %l0 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 20144a4: 80 a6 80 11 cmp %i2, %l1 20144a8: 22 80 00 35 be,a 201457c <== ALWAYS TAKEN 20144ac: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 20144b0: 28 80 00 44 bleu,a 20145c0 <== NOT EXECUTED 20144b4: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 20144b8: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 20144bc: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 20144c0: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 20144c4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 20144c8: 02 80 00 2b be 2014574 <== NOT EXECUTED 20144cc: b8 10 20 00 clr %i4 <== NOT EXECUTED 20144d0: 10 80 00 05 b 20144e4 <== NOT EXECUTED 20144d4: b6 07 bf fc add %fp, -4, %i3 <== NOT EXECUTED 20144d8: 80 a7 00 11 cmp %i4, %l1 <== NOT EXECUTED 20144dc: 02 80 00 26 be 2014574 <== NOT EXECUTED 20144e0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20144e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20144e8: 40 00 28 7f call 201e6e4 <== NOT EXECUTED 20144ec: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20144f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20144f4: 02 bf ff f9 be 20144d8 <== NOT EXECUTED 20144f8: b8 07 20 01 inc %i4 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 20144fc: 81 c7 e0 08 ret 2014500: 91 e8 00 08 restore %g0, %o0, %o0 uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 2014504: 90 10 20 00 clr %o0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 2014508: 81 c7 e0 08 ret <== NOT EXECUTED 201450c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 2014510: a2 06 bf ff add %i2, -1, %l1 <== NOT EXECUTED uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014514: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 2014518: 22 bf ff e3 be,a 20144a4 <== NOT EXECUTED 201451c: e0 06 60 38 ld [ %i1 + 0x38 ], %l0 <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2014520: 28 80 00 2e bleu,a 20145d8 <== NOT EXECUTED 2014524: e0 06 60 1c ld [ %i1 + 0x1c ], %l0 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2014528: e0 06 60 38 ld [ %i1 + 0x38 ], %l0 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 201452c: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2014530: e0 27 bf fc st %l0, [ %fp + -4 ] <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014534: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2014538: 02 80 00 25 be 20145cc <== NOT EXECUTED 201453c: b8 10 20 00 clr %i4 <== NOT EXECUTED 2014540: 10 80 00 05 b 2014554 <== NOT EXECUTED 2014544: b6 07 bf fc add %fp, -4, %i3 <== NOT EXECUTED 2014548: 80 a7 00 12 cmp %i4, %l2 <== NOT EXECUTED 201454c: 02 80 00 20 be 20145cc <== NOT EXECUTED 2014550: e0 07 bf fc ld [ %fp + -4 ], %l0 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014554: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2014558: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201455c: 40 00 28 62 call 201e6e4 <== NOT EXECUTED 2014560: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2014564: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014568: 22 bf ff f8 be,a 2014548 <== NOT EXECUTED 201456c: b8 07 20 01 inc %i4 <== NOT EXECUTED 2014570: 30 bf ff e3 b,a 20144fc <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2014574: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2014578: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED 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); 201457c: 40 00 29 a4 call 201ec0c 2014580: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 2014584: 80 a2 20 00 cmp %o0, 0 2014588: 12 bf ff dd bne 20144fc <== NEVER TAKEN 201458c: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 2014590: 02 bf ff db be 20144fc <== ALWAYS TAKEN 2014594: 92 10 00 10 mov %l0, %o1 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 2014598: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201459c: 40 00 28 da call 201e904 <== NOT EXECUTED 20145a0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20145a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20145a8: 12 bf ff d5 bne 20144fc <== NOT EXECUTED 20145ac: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 20145b0: e0 26 60 38 st %l0, [ %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; 20145b4: 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; 20145b8: 10 bf ff d1 b 20144fc <== NOT EXECUTED 20145bc: e0 26 60 3c st %l0, [ %i1 + 0x3c ] <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 20145c0: a2 10 00 1a mov %i2, %l1 <== NOT EXECUTED 20145c4: 10 bf ff c0 b 20144c4 <== NOT EXECUTED 20145c8: 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; 20145cc: e2 26 60 34 st %l1, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 20145d0: 10 bf ff b5 b 20144a4 <== NOT EXECUTED 20145d4: e0 26 60 38 st %l0, [ %i1 + 0x38 ] <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 20145d8: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 20145dc: 10 bf ff d6 b 2014534 <== NOT EXECUTED 20145e0: e0 27 bf fc st %l0, [ %fp + -4 ] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 20145e4: 15 00 80 c4 sethi %hi(0x2031000), %o2 <== NOT EXECUTED 20145e8: 17 00 80 c4 sethi %hi(0x2031000), %o3 <== NOT EXECUTED 20145ec: 90 12 20 f8 or %o0, 0xf8, %o0 <== NOT EXECUTED 20145f0: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 20145f4: 94 12 a1 58 or %o2, 0x158, %o2 <== NOT EXECUTED 20145f8: 40 00 0d 2e call 2017ab0 <__assert_func> <== NOT EXECUTED 20145fc: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED =============================================================================== 020149f0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20149f0: 9d e3 bf 90 save %sp, -112, %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; 20149f4: c0 27 bf f4 clr [ %fp + -12 ] 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; 20149f8: c0 27 bf f8 clr [ %fp + -8 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20149fc: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 2014a00: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 2014a04: 80 a6 e0 00 cmp %i3, 0 2014a08: 02 80 00 99 be 2014c6c <== NEVER TAKEN 2014a0c: b0 10 20 00 clr %i0 return cmpltd; if ( start > fat_fd->fat_file_size ) 2014a10: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2014a14: 80 a0 40 1a cmp %g1, %i2 2014a18: 0a 80 00 91 bcs 2014c5c <== NEVER TAKEN 2014a1c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 2014a20: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 2014a24: 80 a6 c0 01 cmp %i3, %g1 2014a28: 18 80 00 8d bgu 2014c5c <== NEVER TAKEN 2014a2c: 82 20 40 1b sub %g1, %i3, %g1 2014a30: 80 a6 80 01 cmp %i2, %g1 2014a34: 18 80 00 8a bgu 2014c5c <== NEVER TAKEN 2014a38: 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); 2014a3c: 90 10 00 1d mov %i5, %o0 2014a40: 92 10 00 19 mov %i1, %o1 2014a44: 94 10 00 11 mov %l1, %o2 2014a48: 7f ff ff 71 call 201480c 2014a4c: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 2014a50: b0 92 20 00 orcc %o0, 0, %i0 2014a54: 12 80 00 86 bne 2014c6c <== NEVER TAKEN 2014a58: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 2014a5c: 80 a4 40 01 cmp %l1, %g1 2014a60: 32 80 00 02 bne,a 2014a68 <== NEVER TAKEN 2014a64: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2014a68: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2014a6c: 80 a0 60 01 cmp %g1, 1 2014a70: 22 80 00 20 be,a 2014af0 2014a74: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2014a78: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014a7c: e6 06 60 34 ld [ %i1 + 0x34 ], %l3 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2014a80: a5 36 80 12 srl %i2, %l2, %l2 uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2014a84: 80 a4 80 13 cmp %l2, %l3 2014a88: 02 80 00 7b be 2014c74 <== ALWAYS TAKEN 2014a8c: e8 14 20 06 lduh [ %l0 + 6 ], %l4 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2014a90: 80 a4 80 13 cmp %l2, %l3 <== NOT EXECUTED 2014a94: 38 80 00 36 bgu,a 2014b6c <== NOT EXECUTED 2014a98: 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; 2014a9c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED 2014aa0: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED 2014aa4: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014aa8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 2014aac: 02 80 00 33 be 2014b78 <== NOT EXECUTED 2014ab0: a2 10 20 00 clr %l1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014ab4: 10 80 00 06 b 2014acc <== NOT EXECUTED 2014ab8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2014abc: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 2014ac0: 02 80 00 2e be 2014b78 <== NOT EXECUTED 2014ac4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014ac8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2014acc: 40 00 27 06 call 201e6e4 <== NOT EXECUTED 2014ad0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2014ad4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2014ad8: 02 bf ff f9 be 2014abc <== NOT EXECUTED 2014adc: a2 04 60 01 inc %l1 <== NOT EXECUTED 2014ae0: 81 c7 e0 08 ret <== NOT EXECUTED 2014ae4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 2014ae8: 81 c7 e0 08 ret <== NOT EXECUTED 2014aec: 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)) && 2014af0: 80 a0 60 00 cmp %g1, 0 2014af4: 32 bf ff e2 bne,a 2014a7c <== NEVER TAKEN 2014af8: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2014afc: 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)) && 2014b00: 80 88 60 03 btst 3, %g1 2014b04: 22 bf ff de be,a 2014a7c <== NEVER TAKEN 2014b08: 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); 2014b0c: 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)) ) 2014b10: 80 a0 a0 00 cmp %g2, 0 2014b14: 12 80 00 5b bne 2014c80 <== NEVER TAKEN 2014b18: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2014b1c: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 2014b20: 80 88 e0 03 btst 3, %g3 2014b24: 22 80 00 58 be,a 2014c84 <== NEVER TAKEN 2014b28: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2014b2c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 2014b30: c2 0c 20 02 ldub [ %l0 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 2014b34: 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); 2014b38: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 2014b3c: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 2014b40: 90 10 00 1d mov %i5, %o0 2014b44: 92 02 40 01 add %o1, %g1, %o1 2014b48: 94 0e 80 0a and %i2, %o2, %o2 2014b4c: 96 10 00 1b mov %i3, %o3 2014b50: 40 00 02 0c call 2015380 <_fat_block_write> 2014b54: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2014b58: b0 92 20 00 orcc %o0, 0, %i0 2014b5c: 16 80 00 57 bge 2014cb8 <== ALWAYS TAKEN 2014b60: 01 00 00 00 nop return -1; 2014b64: 81 c7 e0 08 ret <== NOT EXECUTED 2014b68: 91 e8 3f ff restore %g0, -1, %o0 <== 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; 2014b6c: a6 24 80 13 sub %l2, %l3, %l3 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2014b70: 10 bf ff ce b 2014aa8 <== NOT EXECUTED 2014b74: 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; 2014b78: e4 26 60 34 st %l2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2014b7c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2014b80: d2 27 bf f4 st %o1, [ %fp + -12 ] <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2014b84: a9 2d 20 10 sll %l4, 0x10, %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014b88: 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); 2014b8c: a9 35 20 10 srl %l4, 0x10, %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014b90: 80 a6 e0 00 cmp %i3, 0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2014b94: a8 05 3f ff add %l4, -1, %l4 2014b98: b4 0e 80 14 and %i2, %l4, %i2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2014b9c: 12 80 00 20 bne 2014c1c <== ALWAYS TAKEN 2014ba0: 82 10 00 1a mov %i2, %g1 2014ba4: 10 80 00 47 b 2014cc0 <== NOT EXECUTED 2014ba8: a8 10 20 00 clr %l4 <== 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)) ) 2014bac: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED 2014bb0: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED 2014bb4: 22 80 00 25 be,a 2014c48 <== NOT EXECUTED 2014bb8: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2014bbc: d2 00 a0 1c ld [ %g2 + 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); 2014bc0: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 byte = ofs & (fs_info->vol.bps - 1); 2014bc4: 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); 2014bc8: 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); 2014bcc: 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); 2014bd0: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 2014bd4: 92 02 40 02 add %o1, %g2, %o1 2014bd8: 94 08 40 0a and %g1, %o2, %o2 2014bdc: 40 00 01 e9 call 2015380 <_fat_block_write> 2014be0: 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); 2014be4: 94 07 bf f4 add %fp, -12, %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 ) 2014be8: 80 a2 20 00 cmp %o0, 0 2014bec: 06 bf ff bf bl 2014ae8 <== NEVER TAKEN 2014bf0: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2014bf4: e8 07 bf f4 ld [ %fp + -12 ], %l4 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2014bf8: e6 07 bf f8 ld [ %fp + -8 ], %l3 cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2014bfc: 40 00 26 ba call 201e6e4 2014c00: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 2014c04: b0 92 20 00 orcc %o0, 0, %i0 2014c08: 12 80 00 19 bne 2014c6c <== NEVER TAKEN 2014c0c: 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) 2014c10: 02 80 00 22 be 2014c98 2014c14: 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; 2014c18: 82 10 20 00 clr %g1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2014c1c: d6 14 20 06 lduh [ %l0 + 6 ], %o3 2014c20: 96 22 c0 01 sub %o3, %g1, %o3 2014c24: 80 a2 c0 1b cmp %o3, %i3 2014c28: 08 80 00 03 bleu 2014c34 2014c2c: c6 07 bf f4 ld [ %fp + -12 ], %g3 2014c30: 96 10 00 1b mov %i3, %o3 2014c34: d6 27 bf f8 st %o3, [ %fp + -8 ] 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)) ) 2014c38: 80 a0 e0 00 cmp %g3, 0 2014c3c: 02 bf ff dc be 2014bac <== NEVER TAKEN 2014c40: c4 07 60 34 ld [ %i5 + 0x34 ], %g2 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2014c44: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 2014c48: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2 2014c4c: 92 00 ff fe add %g3, -2, %o1 2014c50: 93 2a 40 04 sll %o1, %g4, %o1 2014c54: 10 bf ff db b 2014bc0 2014c58: 92 02 40 02 add %o1, %g2, %o1 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 ); 2014c5c: 40 00 2f 37 call 2020938 <__errno> <== NOT EXECUTED 2014c60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2014c64: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2014c68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2014c6c: 81 c7 e0 08 ret <== NOT EXECUTED 2014c70: 81 e8 00 00 restore <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 2014c74: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2014c78: 10 bf ff c3 b 2014b84 2014c7c: c2 27 bf f4 st %g1, [ %fp + -12 ] 2014c80: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 2014c84: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2014c88: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 2014c8c: 93 28 80 03 sll %g2, %g3, %o1 <== NOT EXECUTED 2014c90: 10 bf ff a8 b 2014b30 <== NOT EXECUTED 2014c94: 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) 2014c98: 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); 2014c9c: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2014ca0: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2014ca4: 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); 2014ca8: a2 06 80 11 add %i2, %l1, %l1 2014cac: 83 34 40 01 srl %l1, %g1, %g1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2014cb0: a4 00 40 12 add %g1, %l2, %l2 2014cb4: 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; 2014cb8: 81 c7 e0 08 ret 2014cbc: 81 e8 00 00 restore } /* 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); 2014cc0: 10 bf ff f8 b 2014ca0 <== NOT EXECUTED 2014cc4: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== NOT EXECUTED =============================================================================== 0201ec0c : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 201ec0c: 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; 201ec10: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = chain; uint32_t next_cln = 0; 201ec14: 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) 201ec18: c4 07 60 0c ld [ %i5 + 0xc ], %g2 201ec1c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 201ec20: 84 0e 40 02 and %i1, %g2, %g2 201ec24: 80 a0 80 01 cmp %g2, %g1 201ec28: 1a 80 00 25 bcc 201ecbc <== NEVER TAKEN 201ec2c: b8 10 00 18 mov %i0, %i4 201ec30: b6 10 00 19 mov %i1, %i3 201ec34: b4 10 20 00 clr %i2 201ec38: 10 80 00 0e b 201ec70 201ec3c: 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); 201ec40: 7f ff ff 31 call 201e904 201ec44: 01 00 00 00 nop if ( rc != RC_OK ) 201ec48: 80 a2 20 00 cmp %o0, 0 201ec4c: 02 80 00 03 be 201ec58 <== ALWAYS TAKEN 201ec50: f6 07 bf fc ld [ %fp + -4 ], %i3 201ec54: 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) 201ec58: c4 07 60 0c ld [ %i5 + 0xc ], %g2 201ec5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 201ec60: 84 0e c0 02 and %i3, %g2, %g2 201ec64: 80 a0 80 01 cmp %g2, %g1 201ec68: 1a 80 00 17 bcc 201ecc4 <== ALWAYS TAKEN 201ec6c: b4 06 a0 01 inc %i2 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 201ec70: 92 10 00 1b mov %i3, %o1 201ec74: 94 07 bf fc add %fp, -4, %o2 201ec78: 7f ff fe 9b call 201e6e4 201ec7c: 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); 201ec80: 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); 201ec84: 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); 201ec88: 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 ) 201ec8c: 80 a6 20 00 cmp %i0, 0 201ec90: 02 bf ff ec be 201ec40 <== ALWAYS TAKEN 201ec94: 90 10 00 1c mov %i4, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 201ec98: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED 201ec9c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201eca0: 02 80 00 03 be 201ecac <== NOT EXECUTED 201eca4: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 201eca8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201ecac: 7f ff d9 8a call 20152d4 <== NOT EXECUTED 201ecb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; 201ecb4: 81 c7 e0 08 ret <== NOT EXECUTED 201ecb8: 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; 201ecbc: 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; 201ecc0: 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) 201ecc4: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 201ecc8: 80 a0 7f ff cmp %g1, -1 201eccc: 02 80 00 04 be 201ecdc <== ALWAYS TAKEN 201ecd0: f2 27 60 44 st %i1, [ %i5 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 201ecd4: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED 201ecd8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201ecdc: b0 10 00 10 mov %l0, %i0 201ece0: 7f ff d9 7d call 20152d4 201ece4: 90 10 00 1d mov %i5, %o0 if (rc1 != RC_OK) return rc1; return RC_OK; } 201ece8: 81 c7 e0 08 ret 201ecec: 81 e8 00 00 restore =============================================================================== 020157b8 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 20157b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 20157bc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 20157c0: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED 20157c4: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 20157c8: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 20157cc: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED 20157d0: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 20157d4: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 20157d8: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 20157dc: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED 20157e0: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED 20157e4: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED } 20157e8: 81 c7 e0 08 ret <== NOT EXECUTED 20157ec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201e6e4 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 201e6e4: 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; 201e6e8: 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)) ) 201e6ec: 80 a6 60 01 cmp %i1, 1 201e6f0: 08 80 00 26 bleu 201e788 <== NEVER TAKEN 201e6f4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201e6f8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201e6fc: 82 00 60 01 inc %g1 201e700: 80 a6 40 01 cmp %i1, %g1 201e704: 18 80 00 21 bgu 201e788 <== NEVER TAKEN 201e708: 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) + 201e70c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201e710: 80 88 60 01 btst 1, %g1 201e714: 12 80 00 23 bne 201e7a0 <== ALWAYS TAKEN 201e718: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 201e71c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201e720: 02 80 00 30 be 201e7e0 <== NOT EXECUTED 201e724: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 201e728: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201e72c: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 201e730: 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); 201e734: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201e738: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201e73c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 201e740: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201e744: 7f ff da 5d call 20150b8 <== NOT EXECUTED 201e748: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 201e74c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201e750: 12 80 00 5a bne 201e8b8 <== NOT EXECUTED 201e754: 01 00 00 00 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 201e758: 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); 201e75c: 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 ) 201e760: 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); 201e764: a1 34 20 10 srl %l0, 0x10, %l0 201e768: 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 ) 201e76c: 02 80 00 21 be 201e7f0 <== NEVER TAKEN 201e770: b8 0f 00 10 and %i4, %l0, %i4 201e774: 80 a0 60 04 cmp %g1, 4 201e778: 02 80 00 3e be 201e870 <== NEVER TAKEN 201e77c: 80 a0 60 01 cmp %g1, 1 201e780: 02 80 00 29 be 201e824 <== ALWAYS TAKEN 201e784: 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); 201e788: 40 00 08 6c call 2020938 <__errno> <== NOT EXECUTED 201e78c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201e790: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201e794: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201e798: 81 c7 e0 08 ret <== NOT EXECUTED 201e79c: 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) + 201e7a0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 201e7a4: 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); 201e7a8: 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) + 201e7ac: 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); 201e7b0: 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) + 201e7b4: 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); 201e7b8: 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) + 201e7bc: 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); 201e7c0: 96 07 bf fc add %fp, -4, %o3 201e7c4: 7f ff da 3d call 20150b8 201e7c8: 92 10 00 1b mov %i3, %o1 if (rc != RC_OK) 201e7cc: b0 92 20 00 orcc %o0, 0, %i0 201e7d0: 22 bf ff e3 be,a 201e75c <== ALWAYS TAKEN 201e7d4: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 201e7d8: 81 c7 e0 08 ret <== NOT EXECUTED 201e7dc: 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) + 201e7e0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201e7e4: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 201e7e8: 10 bf ff d3 b 201e734 <== NOT EXECUTED 201e7ec: 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)); 201e7f0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201e7f4: 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)); 201e7f8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201e7fc: 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)); 201e800: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201e804: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 201e808: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 201e80c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 201e810: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 201e814: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201e818: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 201e81c: 81 c7 e0 08 ret <== NOT EXECUTED 201e820: 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) ) 201e824: 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))); 201e828: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 201e82c: 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))); 201e830: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 201e834: 80 a0 c0 1c cmp %g3, %i4 201e838: 02 80 00 22 be 201e8c0 <== NEVER TAKEN 201e83c: c2 26 80 00 st %g1, [ %i2 ] *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 201e840: b8 00 80 1c add %g2, %i4, %i4 201e844: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 201e848: 85 28 a0 08 sll %g2, 8, %g2 201e84c: 82 10 80 01 or %g2, %g1, %g1 201e850: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 201e854: 80 8e 60 01 btst 1, %i1 201e858: 22 80 00 17 be,a 201e8b4 201e85c: 82 08 6f ff and %g1, 0xfff, %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 201e860: 83 30 60 04 srl %g1, 4, %g1 201e864: c2 26 80 00 st %g1, [ %i2 ] 201e868: 81 c7 e0 08 ret 201e86c: 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)); 201e870: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201e874: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 201e878: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED 201e87c: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 201e880: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 201e884: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 201e888: 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; 201e88c: 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; 201e890: 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; 201e894: 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; 201e898: 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; 201e89c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 201e8a0: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 201e8a4: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 201e8a8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 201e8ac: 81 c7 e0 08 ret <== NOT EXECUTED 201e8b0: 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; 201e8b4: c2 26 80 00 st %g1, [ %i2 ] 201e8b8: 81 c7 e0 08 ret 201e8bc: 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, 201e8c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201e8c4: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201e8c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201e8cc: 7f ff d9 fb call 20150b8 <== NOT EXECUTED 201e8d0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201e8d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201e8d8: 12 80 00 09 bne 201e8fc <== NOT EXECUTED 201e8dc: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 201e8e0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 201e8e4: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2 <== NOT EXECUTED 201e8e8: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED 201e8ec: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 201e8f0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201e8f4: 10 bf ff d8 b 201e854 <== NOT EXECUTED 201e8f8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 201e8fc: 81 c7 e0 08 ret <== NOT EXECUTED 201e900: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 020156b8 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 20156b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 20156bc: fa 06 20 34 ld [ %i0 + 0x34 ], %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)) 20156c0: 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; 20156c4: d2 07 60 78 ld [ %i5 + 0x78 ], %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)) 20156c8: 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++) 20156cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20156d0: 22 80 00 20 be,a 2015750 <== NOT EXECUTED 20156d4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 20156d8: c6 07 60 70 ld [ %i5 + 0x70 ], %g3 <== NOT EXECUTED 20156dc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 20156e0: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 20156e4: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED 20156e8: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 20156ec: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 20156f0: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED 20156f4: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED 20156f8: 02 80 00 1d be 201576c <== NOT EXECUTED 20156fc: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2015700: 10 80 00 0a b 2015728 <== NOT EXECUTED 2015704: 88 10 20 00 clr %g4 <== NOT EXECUTED 2015708: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 201570c: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2015710: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 2015714: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 2015718: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED 201571c: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED 2015720: 02 80 00 13 be 201576c <== NOT EXECUTED 2015724: 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++; 2015728: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 201572c: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 2015730: 0a 80 00 03 bcs 201573c <== NOT EXECUTED 2015734: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2015738: c0 27 60 74 clr [ %i5 + 0x74 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 201573c: 88 01 20 01 inc %g4 <== NOT EXECUTED 2015740: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED 2015744: 32 bf ff f1 bne,a 2015708 <== NOT EXECUTED 2015748: c2 07 60 74 ld [ %i5 + 0x74 ], %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)) 201574c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2015750: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2015754: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2015758: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 201575c: 0a 80 00 0c bcs 201578c <== NOT EXECUTED 2015760: b0 10 20 00 clr %i0 <== NOT EXECUTED 2015764: 81 c7 e0 08 ret <== NOT EXECUTED 2015768: 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); 201576c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2015770: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED 2015774: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED 2015778: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 201577c: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2015780: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2015784: 81 c7 e0 08 ret <== NOT EXECUTED 2015788: 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); 201578c: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 2015790: 7f ff c9 5e call 2007d08 <== NOT EXECUTED 2015794: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2015798: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201579c: 12 80 00 04 bne 20157ac <== NOT EXECUTED 20157a0: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 20157a4: 81 c7 e0 08 ret <== NOT EXECUTED 20157a8: 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; 20157ac: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 <== NOT EXECUTED 20157b0: 10 bf ff c7 b 20156cc <== NOT EXECUTED 20157b4: d2 27 60 74 st %o1, [ %i5 + 0x74 ] <== NOT EXECUTED =============================================================================== 02015588 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2015588: 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; 201558c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = start_cln; 2015590: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2015594: d0 17 20 06 lduh [ %i4 + 6 ], %o0 2015598: 92 10 20 01 mov 1, %o1 201559c: 7f ff c1 c7 call 2005cb8 20155a0: ba 10 00 18 mov %i0, %i5 if ( buf == NULL ) 20155a4: b6 92 20 00 orcc %o0, 0, %i3 20155a8: 32 80 00 19 bne,a 201560c <== ALWAYS TAKEN 20155ac: c4 07 20 0c ld [ %i4 + 0xc ], %g2 20155b0: 30 80 00 3c b,a 20156a0 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 20155b4: c6 08 60 05 ldub [ %g1 + 5 ], %g3 20155b8: 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); 20155bc: d6 08 60 04 ldub [ %g1 + 4 ], %o3 20155c0: c2 08 60 02 ldub [ %g1 + 2 ], %g1 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, 20155c4: 94 10 20 00 clr %o2 20155c8: 92 06 7f fe add %i1, -2, %o1 20155cc: 97 2a c0 01 sll %o3, %g1, %o3 20155d0: 93 2a 40 03 sll %o1, %g3, %o1 20155d4: 98 10 00 1b mov %i3, %o4 20155d8: 92 02 40 02 add %o1, %g2, %o1 20155dc: 7f ff ff 69 call 2015380 <_fat_block_write> 20155e0: 90 10 00 1d mov %i5, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20155e4: 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 ) 20155e8: 80 a2 3f ff cmp %o0, -1 20155ec: 02 80 00 1f be 2015668 <== NEVER TAKEN 20155f0: 90 10 00 1d mov %i5, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20155f4: 40 00 24 3c call 201e6e4 20155f8: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) 20155fc: b0 92 20 00 orcc %o0, 0, %i0 2015600: 12 80 00 1f bne 201567c <== NEVER TAKEN 2015604: f2 07 bf fc ld [ %fp + -4 ], %i1 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2015608: c4 07 20 0c ld [ %i4 + 0xc ], %g2 201560c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2015610: 84 0e 40 02 and %i1, %g2, %g2 2015614: 80 a0 80 01 cmp %g2, %g1 2015618: 1a 80 00 1d bcc 201568c 201561c: 80 a6 60 00 cmp %i1, 0 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)) ) 2015620: 12 bf ff e5 bne 20155b4 <== ALWAYS TAKEN 2015624: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2015628: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 201562c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2015630: 22 bf ff e2 be,a 20155b8 <== NOT EXECUTED 2015634: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 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); 2015638: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 201563c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 2015640: 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, 2015644: 94 10 20 00 clr %o2 <== NOT EXECUTED 2015648: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 201564c: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED 2015650: 7f ff ff 4c call 2015380 <_fat_block_write> <== NOT EXECUTED 2015654: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2015658: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 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 ) 201565c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2015660: 12 bf ff e5 bne 20155f4 <== NOT EXECUTED 2015664: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { free(buf); 2015668: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 201566c: 7f ff c3 bb call 2006558 <== NOT EXECUTED 2015670: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 2015674: 81 c7 e0 08 ret <== NOT EXECUTED 2015678: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) { free(buf); 201567c: 7f ff c3 b7 call 2006558 <== NOT EXECUTED 2015680: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2015684: 81 c7 e0 08 ret <== NOT EXECUTED 2015688: 81 e8 00 00 restore <== NOT EXECUTED } } free(buf); return rc; 201568c: b0 10 20 00 clr %i0 free(buf); return rc; } } free(buf); 2015690: 7f ff c3 b2 call 2006558 2015694: 90 10 00 1b mov %i3, %o0 return rc; } 2015698: 81 c7 e0 08 ret 201569c: 81 e8 00 00 restore 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 ); 20156a0: 40 00 2c a6 call 2020938 <__errno> <== NOT EXECUTED 20156a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20156a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20156ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20156b0: 81 c7 e0 08 ret <== NOT EXECUTED 20156b4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020159f8 : * 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) { 20159f8: 9d e3 bf 10 save %sp, -240, %sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 20159fc: d0 06 20 70 ld [ %i0 + 0x70 ], %o0 int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2015a00: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 2015a04: b8 10 00 18 mov %i0, %i4 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 2015a08: c0 27 bf f8 clr [ %fp + -8 ] rc = stat(mt_entry->dev, &stat_buf); 2015a0c: 7f ff c9 78 call 2007fec 2015a10: 92 07 bf a0 add %fp, -96, %o1 if (rc == -1) 2015a14: 80 a2 3f ff cmp %o0, -1 2015a18: 02 80 01 12 be 2015e60 <== NEVER TAKEN 2015a1c: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2015a20: c4 07 bf ac ld [ %fp + -84 ], %g2 2015a24: 03 00 00 3c sethi %hi(0xf000), %g1 2015a28: 84 08 80 01 and %g2, %g1, %g2 2015a2c: 03 00 00 18 sethi %hi(0x6000), %g1 2015a30: 80 a0 80 01 cmp %g2, %g1 2015a34: 12 80 01 e6 bne 20161cc <== NEVER TAKEN 2015a38: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 2015a3c: 7f ff bd 59 call 2004fa0 2015a40: d0 1f bf b8 ldd [ %fp + -72 ], %o0 if (vol->dd == NULL) 2015a44: 80 a2 20 00 cmp %o0, 0 2015a48: 02 80 01 ff be 2016244 <== NEVER TAKEN 2015a4c: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 2015a50: d0 1f bf b8 ldd [ %fp + -72 ], %o0 /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 2015a54: 94 10 20 00 clr %o2 /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 2015a58: d0 3f 60 58 std %o0, [ %i5 + 0x58 ] /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 2015a5c: 7f ff f5 7d call 2013050 2015a60: 96 07 bf f8 add %fp, -8, %o3 if (sc != RTEMS_SUCCESSFUL) 2015a64: 80 a2 20 00 cmp %o0, 0 2015a68: 12 80 01 ee bne 2016220 <== NEVER TAKEN 2015a6c: d0 07 bf f8 ld [ %fp + -8 ], %o0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2015a70: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 2015a74: c4 08 60 0b ldub [ %g1 + 0xb ], %g2 2015a78: c6 08 60 0c ldub [ %g1 + 0xc ], %g3 2015a7c: c4 2f bf 9b stb %g2, [ %fp + -101 ] 2015a80: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2 2015a84: c6 2f bf 9c stb %g3, [ %fp + -100 ] 2015a88: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3 2015a8c: c4 2f bf 99 stb %g2, [ %fp + -103 ] 2015a90: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2 2015a94: c6 2f bf 98 stb %g3, [ %fp + -104 ] 2015a98: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3 2015a9c: c4 2f bf 8f stb %g2, [ %fp + -113 ] 2015aa0: c4 08 60 28 ldub [ %g1 + 0x28 ], %g2 2015aa4: f2 08 60 0e ldub [ %g1 + 0xe ], %i1 2015aa8: c6 2f bf 97 stb %g3, [ %fp + -105 ] 2015aac: c6 08 60 2c ldub [ %g1 + 0x2c ], %g3 2015ab0: c4 2f bf 87 stb %g2, [ %fp + -121 ] 2015ab4: c4 08 60 2d ldub [ %g1 + 0x2d ], %g2 2015ab8: f2 2f bf 9a stb %i1, [ %fp + -102 ] 2015abc: c6 2f bf 94 stb %g3, [ %fp + -108 ] 2015ac0: c8 08 60 0f ldub [ %g1 + 0xf ], %g4 2015ac4: f6 08 60 0d ldub [ %g1 + 0xd ], %i3 2015ac8: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2 2015acc: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1 2015ad0: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0 2015ad4: e0 08 60 16 ldub [ %g1 + 0x16 ], %l0 2015ad8: e2 08 60 17 ldub [ %g1 + 0x17 ], %l1 2015adc: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5 2015ae0: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6 2015ae4: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7 2015ae8: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3 2015aec: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4 2015af0: e4 08 60 27 ldub [ %g1 + 0x27 ], %l2 2015af4: c4 2f bf 93 stb %g2, [ %fp + -109 ] 2015af8: c6 08 60 2e ldub [ %g1 + 0x2e ], %g3 2015afc: c4 08 60 2f ldub [ %g1 + 0x2f ], %g2 2015b00: c6 2f bf 92 stb %g3, [ %fp + -110 ] 2015b04: c6 08 60 30 ldub [ %g1 + 0x30 ], %g3 2015b08: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1 2015b0c: c4 2f bf 7f stb %g2, [ %fp + -129 ] sc = rtems_bdbuf_release( block); 2015b10: c8 27 bf 70 st %g4, [ %fp + -144 ] { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2015b14: c6 2f bf 96 stb %g3, [ %fp + -106 ] sc = rtems_bdbuf_release( block); 2015b18: 7f ff f6 16 call 2013370 2015b1c: c2 2f bf 95 stb %g1, [ %fp + -107 ] if (sc != RTEMS_SUCCESSFUL) 2015b20: 80 a2 20 00 cmp %o0, 0 2015b24: 12 80 01 bf bne 2016220 <== NEVER TAKEN 2015b28: c8 07 bf 70 ld [ %fp + -144 ], %g4 rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 2015b2c: c2 0f bf 9c ldub [ %fp + -100 ], %g1 2015b30: c4 0f bf 9b ldub [ %fp + -101 ], %g2 2015b34: 83 28 60 08 sll %g1, 8, %g1 2015b38: 92 10 40 02 or %g1, %g2, %o1 2015b3c: d2 37 40 00 sth %o1, [ %i5 ] if ( (vol->bps != 512) && 2015b40: 93 2a 60 10 sll %o1, 0x10, %o1 2015b44: 83 32 60 10 srl %o1, 0x10, %g1 2015b48: 80 a0 64 00 cmp %g1, 0x400 2015b4c: 12 80 00 c7 bne 2015e68 <== ALWAYS TAKEN 2015b50: 80 a0 62 00 cmp %g1, 0x200 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2015b54: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 2015b58: 80 88 60 01 btst 1, %g1 2015b5c: 12 80 00 0a bne 2015b84 <== ALWAYS TAKEN 2015b60: 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) { 2015b64: 10 80 00 03 b 2015b70 <== NOT EXECUTED 2015b68: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2015b6c: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 2015b70: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2015b74: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2015b78: 02 bf ff fd be 2015b6c <== NOT EXECUTED 2015b7c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 2015b80: 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; 2015b84: c0 2f 60 02 clrb [ %i5 + 2 ] 2015b88: 93 32 60 10 srl %o1, 0x10, %o1 2015b8c: 84 10 20 01 mov 1, %g2 2015b90: 80 8a 60 01 btst 1, %o1 2015b94: 02 80 00 05 be 2015ba8 <== ALWAYS TAKEN 2015b98: 82 10 00 09 mov %o1, %g1 i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 2015b9c: 10 80 00 09 b 2015bc0 <== NOT EXECUTED 2015ba0: 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; 2015ba4: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->sec_log2++); 2015ba8: 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; 2015bac: 80 88 60 01 btst 1, %g1 2015bb0: 02 bf ff fd be 2015ba4 2015bb4: 86 00 a0 01 add %g2, 1, %g3 2015bb8: c4 2f 60 02 stb %g2, [ %i5 + 2 ] i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 2015bbc: 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) 2015bc0: b6 8e e0 ff andcc %i3, 0xff, %i3 2015bc4: 02 80 01 77 be 20161a0 <== NEVER TAKEN 2015bc8: 82 10 00 1b mov %i3, %g1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2015bcc: c0 2f 60 05 clrb [ %i5 + 5 ] 2015bd0: 80 8e e0 01 btst 1, %i3 2015bd4: 12 80 00 0b bne 2015c00 <== NEVER TAKEN 2015bd8: 84 10 20 00 clr %g2 2015bdc: 10 80 00 03 b 2015be8 2015be0: 84 10 20 01 mov 1, %g2 2015be4: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 2015be8: 83 38 60 01 sra %g1, 1, %g1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2015bec: 80 88 60 01 btst 1, %g1 2015bf0: 02 bf ff fd be 2015be4 <== NEVER TAKEN 2015bf4: 86 00 a0 01 add %g2, 1, %g3 2015bf8: c4 2f 60 05 stb %g2, [ %i5 + 5 ] 2015bfc: 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) 2015c00: 85 2a 40 02 sll %o1, %g2, %g2 2015c04: c4 37 60 06 sth %g2, [ %i5 + 6 ] 2015c08: 83 28 a0 10 sll %g2, 0x10, %g1 2015c0c: 05 00 00 20 sethi %hi(0x8000), %g2 2015c10: 83 30 60 10 srl %g1, 0x10, %g1 2015c14: 80 a0 40 02 cmp %g1, %g2 2015c18: 18 80 01 62 bgu 20161a0 <== NEVER TAKEN 2015c1c: 80 88 60 01 btst 1, %g1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2015c20: c0 2f 60 08 clrb [ %i5 + 8 ] 2015c24: 02 80 00 05 be 2015c38 <== ALWAYS TAKEN 2015c28: 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); 2015c2c: 10 80 00 09 b 2015c50 <== NOT EXECUTED 2015c30: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2015c34: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->bpc_log2++); 2015c38: 83 38 60 01 sra %g1, 1, %g1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2015c3c: 80 88 60 01 btst 1, %g1 2015c40: 02 bf ff fd be 2015c34 2015c44: 86 00 a0 01 add %g2, 1, %g3 2015c48: 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); 2015c4c: c6 0f bf 9a ldub [ %fp + -102 ], %g3 2015c50: 88 09 20 ff and %g4, 0xff, %g4 2015c54: 89 29 20 08 sll %g4, 8, %g4 2015c58: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2015c5c: c4 0f bf 98 ldub [ %fp + -104 ], %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); 2015c60: c6 27 bf 9c st %g3, [ %fp + -100 ] 2015c64: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2015c68: c6 0f bf 99 ldub [ %fp + -103 ], %g3 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2015c6c: 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); 2015c70: 85 28 a0 08 sll %g2, 8, %g2 2015c74: 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)) / 2015c78: 87 28 a0 10 sll %g2, 0x10, %g3 2015c7c: 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); 2015c80: 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)) / 2015c84: 90 00 c0 01 add %g3, %g1, %o0 2015c88: 40 00 5e c9 call 202d7ac <.div> 2015c8c: f4 2f 60 09 stb %i2, [ %i5 + 9 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2015c90: 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)) / 2015c94: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2015c98: 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)) / 2015c9c: 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) 2015ca0: a2 0c 60 ff and %l1, 0xff, %l1 2015ca4: a0 0c 20 ff and %l0, 0xff, %l0 2015ca8: 91 2c 60 08 sll %l1, 8, %o0 2015cac: 90 12 00 10 or %o0, %l0, %o0 2015cb0: 91 2a 20 10 sll %o0, 0x10, %o0 2015cb4: 80 a2 20 00 cmp %o0, 0 2015cb8: 02 80 01 22 be 2016140 <== NEVER TAKEN 2015cbc: c4 27 60 28 st %g2, [ %i5 + 0x28 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2015cc0: 91 32 20 10 srl %o0, 0x10, %o0 2015cc4: 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 + 2015cc8: c2 27 bf 74 st %g1, [ %fp + -140 ] 2015ccc: 40 00 5e 7c call 202d6bc <.umul> 2015cd0: 92 0e a0 ff and %i2, 0xff, %o1 2015cd4: c2 07 bf 74 ld [ %fp + -140 ], %g1 2015cd8: c6 07 bf 9c ld [ %fp + -100 ], %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) 2015cdc: 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 + 2015ce0: 85 28 e0 10 sll %g3, 0x10, %g2 2015ce4: 85 30 a0 10 srl %g2, 0x10, %g2 2015ce8: 84 02 00 02 add %o0, %g2, %g2 2015cec: 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; 2015cf0: c4 27 60 1c st %g2, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2015cf4: 90 0e 20 ff and %i0, 0xff, %o0 2015cf8: 91 2a 20 08 sll %o0, 8, %o0 2015cfc: 90 12 00 19 or %o0, %i1, %o0 2015d00: 91 2a 20 10 sll %o0, 0x10, %o0 2015d04: 80 a2 20 00 cmp %o0, 0 2015d08: 02 80 00 63 be 2015e94 <== NEVER TAKEN 2015d0c: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2015d10: 91 32 20 10 srl %o0, 0x10, %o0 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; 2015d14: 92 10 00 1b mov %i3, %o1 /* 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) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2015d18: 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; 2015d1c: 40 00 5e a2 call 202d7a4 <.udiv> 2015d20: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2015d24: 80 a2 2f f4 cmp %o0, 0xff4 2015d28: 18 80 00 6c bgu 2015ed8 <== NEVER TAKEN 2015d2c: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2015d30: 82 10 20 01 mov 1, %g1 2015d34: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2015d38: 82 10 2f ff mov 0xfff, %g1 2015d3c: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2015d40: 82 10 2f f8 mov 0xff8, %g1 2015d44: c2 27 60 10 st %g1, [ %i5 + 0x10 ] else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2015d48: 82 10 3f ff mov -1, %g1 } } } else { vol->rdir_cl = 0; 2015d4c: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2015d50: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2015d54: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2015d58: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2015d5c: 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; 2015d60: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2015d64: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 2015d68: 80 a0 60 00 cmp %g1, 0 2015d6c: 22 80 00 05 be,a 2015d80 <== ALWAYS TAKEN 2015d70: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2015d74: 7f ff fc 7a call 2014f5c <== NOT EXECUTED 2015d78: 01 00 00 00 nop <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2015d7c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 <== NOT EXECUTED 2015d80: 40 00 5e 4f call 202d6bc <.umul> 2015d84: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2015d88: 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)); 2015d8c: 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; 2015d90: 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)); 2015d94: 90 10 20 02 mov 2, %o0 2015d98: 7f ff bf c8 call 2005cb8 2015d9c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2015da0: 80 a2 20 00 cmp %o0, 0 2015da4: 02 80 01 47 be 20162c0 <== NEVER TAKEN 2015da8: d0 27 60 68 st %o0, [ %i5 + 0x68 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2015dac: 86 02 20 04 add %o0, 4, %g3 2015db0: 82 02 20 0c add %o0, 0xc, %g1 2015db4: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2015db8: c6 22 00 00 st %g3, [ %o0 ] head->previous = NULL; 2015dbc: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2015dc0: 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; 2015dc4: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 2015dc8: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2015dcc: 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)); 2015dd0: 92 10 20 0c mov 0xc, %o1 2015dd4: 7f ff bf b9 call 2005cb8 2015dd8: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2015ddc: 80 a2 20 00 cmp %o0, 0 2015de0: 02 80 01 41 be 20162e4 <== NEVER TAKEN 2015de4: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 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 ); 2015de8: 82 02 20 0c add %o0, 0xc, %g1 2015dec: 84 02 20 04 add %o0, 4, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2015df0: 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 ); 2015df4: 82 02 20 10 add %o0, 0x10, %g1 head->next = tail; 2015df8: c4 22 00 00 st %g2, [ %o0 ] head->previous = NULL; 2015dfc: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2015e00: 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; 2015e04: 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; 2015e08: 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; 2015e0c: c2 22 20 0c st %g1, [ %o0 + 0xc ] 2015e10: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2015e14: c0 27 60 74 clr [ %i5 + 0x74 ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2015e18: 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; 2015e1c: 84 10 21 00 mov 0x100, %g2 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2015e20: 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; 2015e24: c4 27 60 78 st %g2, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2015e28: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2015e2c: 90 10 21 00 mov 0x100, %o0 2015e30: 7f ff bf a2 call 2005cb8 2015e34: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2015e38: 80 a2 20 00 cmp %o0, 0 2015e3c: 02 80 01 08 be 201625c <== NEVER TAKEN 2015e40: d0 27 60 70 st %o0, [ %i5 + 0x70 ] rtems_disk_release(vol->dd); 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)); 2015e44: d0 17 40 00 lduh [ %i5 ], %o0 2015e48: 7f ff bf 9c call 2005cb8 2015e4c: 92 10 20 01 mov 1, %o1 2015e50: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 2015e54: 80 a2 20 00 cmp %o0, 0 2015e58: 02 80 00 e3 be 20161e4 <== NEVER TAKEN 2015e5c: b0 10 20 00 clr %i0 free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 2015e60: 81 c7 e0 08 ret 2015e64: 81 e8 00 00 restore } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 2015e68: 22 bf ff 3c be,a 2015b58 <== ALWAYS TAKEN 2015e6c: 83 32 60 19 srl %o1, 0x19, %g1 (vol->bps != 1024) && 2015e70: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED 2015e74: 22 bf ff 3c be,a 2015b64 <== NOT EXECUTED 2015e78: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED (vol->bps != 2048) && 2015e7c: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 2015e80: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2015e84: 12 80 00 c7 bne 20161a0 <== NOT EXECUTED 2015e88: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 2015e8c: 10 bf ff 39 b 2015b70 <== NOT EXECUTED 2015e90: 84 10 20 01 mov 1, %g2 <== 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); 2015e94: f2 0f bf 8f ldub [ %fp + -113 ], %i1 <== NOT EXECUTED 2015e98: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED 2015e9c: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED 2015ea0: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED 2015ea4: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2015ea8: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED 2015eac: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2015eb0: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 2015eb4: 92 10 00 1b mov %i3, %o1 <== 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); 2015eb8: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 2015ebc: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2015ec0: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 2015ec4: 40 00 5e 38 call 202d7a4 <.udiv> <== NOT EXECUTED 2015ec8: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2015ecc: 80 a2 2f f4 cmp %o0, 0xff4 <== NOT EXECUTED 2015ed0: 08 bf ff 98 bleu 2015d30 <== NOT EXECUTED 2015ed4: d0 27 60 34 st %o0, [ %i5 + 0x34 ] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2015ed8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2015edc: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2015ee0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2015ee4: 08 80 00 a2 bleu 201616c <== NOT EXECUTED 2015ee8: 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; 2015eec: 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); 2015ef0: f6 0f bf 93 ldub [ %fp + -109 ], %i3 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2015ef4: 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); 2015ef8: f4 0f bf 94 ldub [ %fp + -108 ], %i2 <== NOT EXECUTED 2015efc: c6 0f bf 92 ldub [ %fp + -110 ], %g3 <== NOT EXECUTED 2015f00: f2 0f bf 7f ldub [ %fp + -129 ], %i1 <== NOT EXECUTED 2015f04: 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; 2015f08: 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); 2015f0c: 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; 2015f10: 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); 2015f14: 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; 2015f18: 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); 2015f1c: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED 2015f20: 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; 2015f24: 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); 2015f28: 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; 2015f2c: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2015f30: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2015f34: 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); 2015f38: 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) 2015f3c: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2015f40: 02 80 00 a1 be 20161c4 <== NOT EXECUTED 2015f44: 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; 2015f48: c4 0f bf 87 ldub [ %fp + -121 ], %g2 <== NOT EXECUTED 2015f4c: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED 2015f50: 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); 2015f54: c2 0f bf 95 ldub [ %fp + -107 ], %g1 <== NOT EXECUTED 2015f58: c4 0f bf 96 ldub [ %fp + -106 ], %g2 <== NOT EXECUTED 2015f5c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 2015f60: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED if( vol->info_sec == 0 ) 2015f64: b3 28 60 10 sll %g1, 0x10, %i1 <== NOT EXECUTED 2015f68: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED 2015f6c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2015f70: 02 80 00 8c be 20161a0 <== NOT EXECUTED 2015f74: c2 37 60 3c sth %g1, [ %i5 + 0x3c ] <== NOT EXECUTED uint32_t count, void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2015f78: f0 07 20 34 ld [ %i4 + 0x34 ], %i0 <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2015f7c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 2015f80: b4 10 20 00 clr %i2 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2015f84: b6 10 20 04 mov 4, %i3 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2015f88: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2015f8c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2015f90: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2015f94: 7f ff fc 49 call 20150b8 <== NOT EXECUTED 2015f98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 2015f9c: 86 07 bf e8 add %fp, -24, %g3 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 2015fa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2015fa4: 12 80 00 c2 bne 20162ac <== NOT EXECUTED 2015fa8: 90 00 c0 1a add %g3, %i2, %o0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2015fac: c2 16 00 00 lduh [ %i0 ], %g1 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2015fb0: c4 07 bf fc ld [ %fp + -4 ], %g2 <== 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)); 2015fb4: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2015fb8: 08 80 00 03 bleu 2015fc4 <== NOT EXECUTED 2015fbc: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 2015fc0: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2015fc4: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1 <== NOT EXECUTED 2015fc8: 40 00 2d 2b call 2021474 <== NOT EXECUTED 2015fcc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED count -= c; cmpltd += c; 2015fd0: b4 06 80 10 add %i2, %l0, %i2 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2015fd4: b6 a6 c0 10 subcc %i3, %l0, %i3 <== NOT EXECUTED 2015fd8: 12 bf ff ec bne 2015f88 <== NOT EXECUTED 2015fdc: b2 06 60 01 inc %i1 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2015fe0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2015fe4: 06 80 00 b2 bl 20162ac <== NOT EXECUTED 2015fe8: c2 0f bf eb ldub [ %fp + -21 ], %g1 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2015fec: c4 0f bf e9 ldub [ %fp + -23 ], %g2 <== NOT EXECUTED 2015ff0: c8 0f bf ea ldub [ %fp + -22 ], %g4 <== NOT EXECUTED 2015ff4: c6 0f bf e8 ldub [ %fp + -24 ], %g3 <== NOT EXECUTED 2015ff8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2015ffc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2016000: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 2016004: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED 2016008: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 201600c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2016010: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2016014: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2016018: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 201601c: 12 80 00 5a bne 2016184 <== NOT EXECUTED 2016020: b4 10 20 00 clr %i2 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2016024: f2 17 60 3c lduh [ %i5 + 0x3c ], %i1 <== NOT EXECUTED uint32_t count, void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2016028: e0 07 20 34 ld [ %i4 + 0x34 ], %l0 <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 201602c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED 2016030: b6 10 20 0c mov 0xc, %i3 <== NOT EXECUTED { 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; 2016034: 10 80 00 03 b 2016040 <== NOT EXECUTED 2016038: b0 10 21 e4 mov 0x1e4, %i0 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; 201603c: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2016040: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2016044: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2016048: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 201604c: 7f ff fc 1b call 20150b8 <== NOT EXECUTED 2016050: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 2016054: 82 07 bf e8 add %fp, -24, %g1 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 2016058: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201605c: 12 80 00 8d bne 2016290 <== NOT EXECUTED 2016060: 90 00 40 1a add %g1, %i2, %o0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2016064: e2 14 00 00 lduh [ %l0 ], %l1 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2016068: c2 07 bf fc ld [ %fp + -4 ], %g1 <== 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)); 201606c: a2 24 40 18 sub %l1, %i0, %l1 <== NOT EXECUTED 2016070: 80 a4 40 1b cmp %l1, %i3 <== NOT EXECUTED 2016074: 08 80 00 03 bleu 2016080 <== NOT EXECUTED 2016078: b2 06 60 01 inc %i1 <== NOT EXECUTED 201607c: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2016080: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2016084: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 2016088: 40 00 2c fb call 2021474 <== NOT EXECUTED 201608c: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2016090: b6 a6 c0 11 subcc %i3, %l1, %i3 <== NOT EXECUTED 2016094: 12 bf ff ea bne 201603c <== NOT EXECUTED 2016098: b4 04 40 1a add %l1, %i2, %i2 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 201609c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 20160a0: 06 80 00 7c bl 2016290 <== NOT EXECUTED 20160a4: c6 0f bf ed ldub [ %fp + -19 ], %g3 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160a8: f0 0f bf ee ldub [ %fp + -18 ], %i0 <== NOT EXECUTED 20160ac: f2 0f bf ec ldub [ %fp + -20 ], %i1 <== NOT EXECUTED 20160b0: f4 0f bf ef ldub [ %fp + -17 ], %i2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160b4: f6 0f bf f1 ldub [ %fp + -15 ], %i3 <== NOT EXECUTED 20160b8: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 20160bc: c8 0f bf f0 ldub [ %fp + -16 ], %g4 <== NOT EXECUTED 20160c0: c4 0f bf f3 ldub [ %fp + -13 ], %g2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160c4: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160c8: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160cc: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 20160d0: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED 20160d4: 86 10 c0 18 or %g3, %i0, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160d8: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160dc: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160e0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160e4: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160e8: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED 20160ec: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 20160f0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20160f4: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20160f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20160fc: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2016100: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 2016104: 7f ff fd c0 call 2015804 <== NOT EXECUTED 2016108: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 201610c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2016110: 02 bf ff 15 be 2015d64 <== NOT EXECUTED 2016114: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2016118: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED 201611c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2016120: 02 80 00 04 be 2016130 <== NOT EXECUTED 2016124: 01 00 00 00 nop <== NOT EXECUTED 2016128: 7f ff fb 8d call 2014f5c <== NOT EXECUTED 201612c: 01 00 00 00 nop <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 2016130: 7f ff bc 04 call 2005140 <== NOT EXECUTED 2016134: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 2016138: 81 c7 e0 08 ret <== NOT EXECUTED 201613c: 81 e8 00 00 restore <== 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); 2016140: c4 0f bf 97 ldub [ %fp + -105 ], %g2 <== NOT EXECUTED 2016144: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED 2016148: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 201614c: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2016150: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED 2016154: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2016158: a5 2c a0 18 sll %l2, 0x18, %l2 <== NOT EXECUTED 201615c: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED 2016160: 90 12 00 12 or %o0, %l2, %o0 <== NOT EXECUTED 2016164: 10 bf fe d9 b 2015cc8 <== NOT EXECUTED 2016168: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 201616c: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 2016170: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 2016174: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 2016178: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 201617c: 10 bf fe f3 b 2015d48 <== NOT EXECUTED 2016180: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED */ int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; 2016184: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2016188: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED 201618c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2016190: 22 80 00 05 be,a 20161a4 <== NOT EXECUTED 2016194: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2016198: 7f ff fb 71 call 2014f5c <== NOT EXECUTED 201619c: 01 00 00 00 nop <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 20161a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20161a4: 7f ff bb e7 call 2005140 <== NOT EXECUTED 20161a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20161ac: 40 00 29 e3 call 2020938 <__errno> <== NOT EXECUTED 20161b0: 01 00 00 00 nop <== NOT EXECUTED 20161b4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20161b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20161bc: 81 c7 e0 08 ret <== NOT EXECUTED 20161c0: 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; 20161c4: 10 bf ff 64 b 2015f54 <== NOT EXECUTED 20161c8: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 20161cc: 40 00 29 db call 2020938 <__errno> <== NOT EXECUTED 20161d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20161d4: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED 20161d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20161dc: 81 c7 e0 08 ret <== NOT EXECUTED 20161e0: 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) { rtems_disk_release(vol->dd); 20161e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20161e8: 7f ff bb d6 call 2005140 <== NOT EXECUTED 20161ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 20161f0: 7f ff c0 da call 2006558 <== NOT EXECUTED 20161f4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20161f8: 7f ff c0 d8 call 2006558 <== NOT EXECUTED 20161fc: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2016200: 7f ff c0 d6 call 2006558 <== NOT EXECUTED 2016204: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2016208: 40 00 29 cc call 2020938 <__errno> <== NOT EXECUTED 201620c: 01 00 00 00 nop <== NOT EXECUTED 2016210: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2016214: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 2016218: 81 c7 e0 08 ret <== NOT EXECUTED 201621c: 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) { rtems_disk_release(vol->dd); 2016220: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2016224: 7f ff bb c7 call 2005140 <== NOT EXECUTED 2016228: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 201622c: 40 00 29 c3 call 2020938 <__errno> <== NOT EXECUTED 2016230: 01 00 00 00 nop <== NOT EXECUTED 2016234: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2016238: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201623c: 81 c7 e0 08 ret <== NOT EXECUTED 2016240: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 2016244: 40 00 29 bd call 2020938 <__errno> <== NOT EXECUTED 2016248: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201624c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2016250: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2016254: 81 c7 e0 08 ret <== NOT EXECUTED 2016258: 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 ) { rtems_disk_release(vol->dd); 201625c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2016260: 7f ff bb b8 call 2005140 <== NOT EXECUTED 2016264: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2016268: 7f ff c0 bc call 2006558 <== NOT EXECUTED 201626c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2016270: 7f ff c0 ba call 2006558 <== NOT EXECUTED 2016274: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2016278: 40 00 29 b0 call 2020938 <__errno> <== NOT EXECUTED 201627c: 01 00 00 00 nop <== NOT EXECUTED 2016280: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2016284: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2016288: 81 c7 e0 08 ret <== NOT EXECUTED 201628c: 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; 2016290: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2016294: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED 2016298: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201629c: 22 80 00 05 be,a 20162b0 <== NOT EXECUTED 20162a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20162a4: 7f ff fb 2e call 2014f5c <== NOT EXECUTED 20162a8: 01 00 00 00 nop <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 20162ac: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20162b0: 7f ff bb a4 call 2005140 <== NOT EXECUTED 20162b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 20162b8: 81 c7 e0 08 ret <== NOT EXECUTED 20162bc: 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 ) { rtems_disk_release(vol->dd); 20162c0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20162c4: 7f ff bb 9f call 2005140 <== NOT EXECUTED 20162c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20162cc: 40 00 29 9b call 2020938 <__errno> <== NOT EXECUTED 20162d0: 01 00 00 00 nop <== NOT EXECUTED 20162d4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20162d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20162dc: 81 c7 e0 08 ret <== NOT EXECUTED 20162e0: 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 ) { rtems_disk_release(vol->dd); 20162e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20162e8: 7f ff bb 96 call 2005140 <== NOT EXECUTED 20162ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 20162f0: 7f ff c0 9a call 2006558 <== NOT EXECUTED 20162f4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20162f8: 40 00 29 90 call 2020938 <__errno> <== NOT EXECUTED 20162fc: 01 00 00 00 nop <== NOT EXECUTED 2016300: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2016304: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2016308: 81 c7 e0 08 ret <== NOT EXECUTED 201630c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201ecf0 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201ecf0: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201ecf4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 uint32_t cl4find = 2; uint32_t next_cln = 0; 201ecf8: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 201ecfc: e6 04 20 34 ld [ %l0 + 0x34 ], %l3 uint32_t i = 2; *cls_added = 0; 201ed00: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201ed04: 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) 201ed08: 80 a6 a0 00 cmp %i2, 0 201ed0c: 02 80 00 46 be 201ee24 <== NEVER TAKEN 201ed10: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 201ed14: e2 04 20 44 ld [ %l0 + 0x44 ], %l1 201ed18: 80 a4 7f ff cmp %l1, -1 201ed1c: 22 80 00 02 be,a 201ed24 201ed20: 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; 201ed24: 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) 201ed28: 80 a4 e0 02 cmp %l3, 2 201ed2c: 08 80 00 40 bleu 201ee2c <== NEVER TAKEN 201ed30: a4 10 20 02 mov 2, %l2 201ed34: 10 80 00 17 b 201ed90 201ed38: 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); 201ed3c: 90 10 00 1d mov %i5, %o0 201ed40: 92 10 00 11 mov %l1, %o1 201ed44: 7f ff fe f0 call 201e904 201ed48: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 201ed4c: 80 a2 20 00 cmp %o0, 0 201ed50: 32 80 00 35 bne,a 201ee24 <== NEVER TAKEN 201ed54: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 201ed58: c2 06 c0 00 ld [ %i3 ], %g1 201ed5c: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 201ed60: 80 a6 80 01 cmp %i2, %g1 201ed64: 02 80 00 49 be 201ee88 <== ALWAYS TAKEN 201ed68: c2 26 c0 00 st %g1, [ %i3 ] 201ed6c: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201ed70: a2 04 60 01 inc %l1 <== NOT EXECUTED if (cl4find >= data_cls_val) 201ed74: 80 a4 c0 11 cmp %l3, %l1 201ed78: 18 80 00 03 bgu 201ed84 <== ALWAYS TAKEN 201ed7c: a4 04 a0 01 inc %l2 cl4find = 2; 201ed80: 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) 201ed84: 80 a4 c0 12 cmp %l3, %l2 201ed88: 28 80 00 2b bleu,a 201ee34 <== NEVER TAKEN 201ed8c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 201ed90: 90 10 00 1d mov %i5, %o0 201ed94: 92 10 00 11 mov %l1, %o1 201ed98: 7f ff fe 53 call 201e6e4 201ed9c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201eda0: b0 92 20 00 orcc %o0, 0, %i0 201eda4: 12 80 00 30 bne 201ee64 <== NEVER TAKEN 201eda8: 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) 201edac: 80 a0 60 00 cmp %g1, 0 201edb0: 32 bf ff f1 bne,a 201ed74 201edb4: 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) 201edb8: c2 06 c0 00 ld [ %i3 ], %g1 201edbc: 80 a0 60 00 cmp %g1, 0 201edc0: 22 bf ff df be,a 201ed3c <== ALWAYS TAKEN 201edc4: 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); 201edc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201edcc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 201edd0: 7f ff fe cd call 201e904 <== NOT EXECUTED 201edd4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201edd8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 201eddc: 12 80 00 37 bne 201eeb8 <== NOT EXECUTED 201ede0: 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); 201ede4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201ede8: 7f ff fe c7 call 201e904 <== NOT EXECUTED 201edec: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201edf0: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED 201edf4: 22 bf ff da be,a 201ed5c <== NOT EXECUTED 201edf8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 201edfc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201ee00: 7f ff ff 83 call 201ec0c <== NOT EXECUTED 201ee04: 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); 201ee08: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201ee0c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 201ee10: 7f ff fe bd call 201e904 <== NOT EXECUTED 201ee14: 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); 201ee18: 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); 201ee1c: 7f ff d9 2e call 20152d4 <== NOT EXECUTED 201ee20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 201ee24: 81 c7 e0 08 ret <== NOT EXECUTED 201ee28: 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) 201ee2c: 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) 201ee30: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED 201ee34: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201ee38: 02 80 00 05 be 201ee4c <== NOT EXECUTED 201ee3c: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201ee40: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201ee44: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201ee48: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201ee4c: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201ee50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 201ee54: 7f ff d9 20 call 20152d4 <== NOT EXECUTED 201ee58: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201ee5c: 81 c7 e0 08 ret <== NOT EXECUTED 201ee60: 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) 201ee64: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 201ee68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201ee6c: 02 80 00 17 be 201eec8 <== NOT EXECUTED 201ee70: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 201ee74: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201ee78: 7f ff ff 65 call 201ec0c <== NOT EXECUTED 201ee7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201ee80: 81 c7 e0 08 ret <== NOT EXECUTED 201ee84: 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) 201ee88: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 201ee8c: 80 a0 7f ff cmp %g1, -1 201ee90: 02 80 00 05 be 201eea4 <== ALWAYS TAKEN 201ee94: e2 24 20 44 st %l1, [ %l0 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 201ee98: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201ee9c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201eea0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201eea4: e2 27 00 00 st %l1, [ %i4 ] fat_buf_release(fs_info); 201eea8: 7f ff d9 0b call 20152d4 201eeac: 90 10 00 10 mov %l0, %o0 return rc; 201eeb0: 81 c7 e0 08 ret 201eeb4: 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)); 201eeb8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201eebc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201eec0: 7f ff ff 53 call 201ec0c <== NOT EXECUTED 201eec4: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 201eec8: 81 c7 e0 08 ret <== NOT EXECUTED 201eecc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201e904 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 201e904: 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; 201e908: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 201e90c: 80 a6 60 01 cmp %i1, 1 201e910: 08 80 00 90 bleu 201eb50 <== NEVER TAKEN 201e914: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201e918: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201e91c: 82 00 60 01 inc %g1 201e920: 80 a6 40 01 cmp %i1, %g1 201e924: 18 80 00 8b bgu 201eb50 <== NEVER TAKEN 201e928: 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) + 201e92c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201e930: 80 88 60 01 btst 1, %g1 201e934: 12 80 00 22 bne 201e9bc <== ALWAYS TAKEN 201e938: e0 0f 60 02 ldub [ %i5 + 2 ], %l0 201e93c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201e940: 02 80 00 25 be 201e9d4 <== NOT EXECUTED 201e944: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 201e948: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201e94c: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 201e950: 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); 201e954: e2 17 40 00 lduh [ %i5 ], %l1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201e958: 90 10 00 1d mov %i5, %o0 201e95c: 92 10 00 10 mov %l0, %o1 201e960: 94 10 20 01 mov 1, %o2 201e964: 7f ff d9 d5 call 20150b8 201e968: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201e96c: b0 92 20 00 orcc %o0, 0, %i0 201e970: 12 80 00 11 bne 201e9b4 <== NEVER TAKEN 201e974: a3 2c 60 10 sll %l1, 0x10, %l1 return rc; switch ( fs_info->vol.type ) 201e978: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3 201e97c: 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); 201e980: a3 34 60 10 srl %l1, 0x10, %l1 201e984: 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 ) 201e988: 02 80 00 17 be 201e9e4 <== NEVER TAKEN 201e98c: b8 0f 00 11 and %i4, %l1, %i4 201e990: 80 a6 e0 04 cmp %i3, 4 201e994: 02 80 00 3d be 201ea88 <== NEVER TAKEN 201e998: 80 a6 e0 01 cmp %i3, 1 201e99c: 02 80 00 1d be 201ea10 <== ALWAYS TAKEN 201e9a0: 80 8e 60 01 btst 1, %i1 fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 201e9a4: 40 00 07 e5 call 2020938 <__errno> <== NOT EXECUTED 201e9a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201e9ac: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201e9b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 201e9b4: 81 c7 e0 08 ret <== NOT EXECUTED 201e9b8: 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) + 201e9bc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 201e9c0: b9 36 60 01 srl %i1, 1, %i4 201e9c4: b8 07 00 19 add %i4, %i1, %i4 201e9c8: a1 37 00 10 srl %i4, %l0, %l0 201e9cc: 10 bf ff e2 b 201e954 201e9d0: a0 04 00 01 add %l0, %g1, %l0 201e9d4: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201e9d8: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 201e9dc: 10 bf ff de b 201e954 <== NOT EXECUTED 201e9e0: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201e9e4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201e9e8: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201e9ec: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201e9f0: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 201e9f4: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 201e9f8: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201e9fc: 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; 201ea00: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 201ea04: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 201ea08: 81 c7 e0 08 ret <== NOT EXECUTED 201ea0c: 81 e8 00 00 restore <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 201ea10: 02 80 00 35 be 201eae4 201ea14: 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)) = 201ea18: 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; 201ea1c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 201ea20: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 201ea24: 86 08 e0 0f and %g3, 0xf, %g3 201ea28: c6 28 40 1c stb %g3, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201ea2c: c2 07 bf fc ld [ %fp + -4 ], %g1 201ea30: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 201ea34: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 201ea38: 84 10 c0 02 or %g3, %g2, %g2 201ea3c: 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) ) 201ea40: c2 17 40 00 lduh [ %i5 ], %g1 201ea44: 82 00 7f ff add %g1, -1, %g1 201ea48: 80 a0 40 1c cmp %g1, %i4 201ea4c: 02 80 00 5c be 201ebbc <== NEVER TAKEN 201ea50: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201ea54: c2 07 bf fc ld [ %fp + -4 ], %g1 201ea58: b8 07 20 01 inc %i4 201ea5c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201ea60: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201ea64: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 201ea68: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 201ea6c: 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))) | 201ea70: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 201ea74: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 201ea78: 84 10 80 1a or %g2, %i2, %g2 201ea7c: c4 28 40 1c stb %g2, [ %g1 + %i4 ] 201ea80: 81 c7 e0 08 ret 201ea84: 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)); 201ea88: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201ea8c: c4 00 60 24 ld [ %g1 + 0x24 ], %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)); 201ea90: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201ea94: 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)); 201ea98: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 201ea9c: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 201eaa0: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 201eaa4: 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; 201eaa8: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 201eaac: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED 201eab0: 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; 201eab4: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201eab8: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED 201eabc: 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; 201eac0: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED 201eac4: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 201eac8: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 201eacc: 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)) = 201ead0: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED 201ead4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 201ead8: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 201eadc: 81 c7 e0 08 ret <== NOT EXECUTED 201eae0: 81 e8 00 00 restore <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 201eae4: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201eae8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 201eaec: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201eaf0: c2 07 bf fc ld [ %fp + -4 ], %g1 201eaf4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 201eaf8: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 201eafc: 84 16 80 02 or %i2, %g2, %g2 201eb00: 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) ) 201eb04: c2 17 40 00 lduh [ %i5 ], %g1 201eb08: 82 00 7f ff add %g1, -1, %g1 201eb0c: 80 a0 40 1c cmp %g1, %i4 201eb10: 02 80 00 16 be 201eb68 <== NEVER TAKEN 201eb14: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 201eb18: c2 07 bf fc ld [ %fp + -4 ], %g1 201eb1c: b8 07 20 01 inc %i4 201eb20: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201eb24: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 201eb28: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 201eb2c: 84 08 bf f0 and %g2, -16, %g2 201eb30: 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))) | 201eb34: c2 07 bf fc ld [ %fp + -4 ], %g1 201eb38: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 201eb3c: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 201eb40: b4 10 80 1a or %g2, %i2, %i2 201eb44: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 201eb48: 81 c7 e0 08 ret 201eb4c: 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); 201eb50: 40 00 07 7a call 2020938 <__errno> <== NOT EXECUTED 201eb54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201eb58: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201eb5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201eb60: 81 c7 e0 08 ret <== NOT EXECUTED 201eb64: 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, 201eb68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201eb6c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 201eb70: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201eb74: 7f ff d9 51 call 20150b8 <== NOT EXECUTED 201eb78: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201eb7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201eb80: 12 bf ff 8d bne 201e9b4 <== NOT EXECUTED 201eb84: 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); 201eb88: 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; 201eb8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 201eb90: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201eb94: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 201eb98: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201eb9c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201eba0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 201eba4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201eba8: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED 201ebac: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 201ebb0: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED 201ebb4: 81 c7 e0 08 ret <== NOT EXECUTED 201ebb8: 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, 201ebbc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201ebc0: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 201ebc4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201ebc8: 7f ff d9 3c call 20150b8 <== NOT EXECUTED 201ebcc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201ebd0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201ebd4: 12 bf ff 78 bne 201e9b4 <== NOT EXECUTED 201ebd8: 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); 201ebdc: 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; 201ebe0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201ebe4: 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; 201ebe8: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201ebec: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201ebf0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 201ebf4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201ebf8: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 201ebfc: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 201ec00: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED 201ec04: 81 c7 e0 08 ret <== NOT EXECUTED 201ec08: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020158c4 : * 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) { 20158c4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20158c8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 20158cc: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 20158d0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 20158d4: 12 80 00 3e bne 20159cc <== NOT EXECUTED 20158d8: b8 10 20 00 clr %i4 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 20158dc: c2 0f 60 85 ldub [ %i5 + 0x85 ], %g1 <== NOT EXECUTED 20158e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20158e4: 02 80 00 04 be 20158f4 <== NOT EXECUTED 20158e8: 01 00 00 00 nop <== NOT EXECUTED 20158ec: 7f ff fd 9c call 2014f5c <== NOT EXECUTED 20158f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 20158f4: 7f ff f7 b4 call 20137c4 <== NOT EXECUTED 20158f8: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 20158fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2015900: 32 80 00 3c bne,a 20159f0 <== NOT EXECUTED 2015904: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 2015908: b4 10 20 00 clr %i2 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 201590c: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2015910: 10 80 00 04 b 2015920 <== NOT EXECUTED 2015914: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED free(node); 2015918: 7f ff c3 10 call 2006558 <== NOT EXECUTED 201591c: 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 ); 2015920: 7f ff d9 77 call 200befc <_Chain_Get> <== NOT EXECUTED 2015924: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 2015928: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201592c: 12 bf ff fb bne 2015918 <== NOT EXECUTED 2015930: 01 00 00 00 nop <== NOT EXECUTED 2015934: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 2015938: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED 201593c: 32 bf ff f5 bne,a 2015910 <== NOT EXECUTED 2015940: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED 2015944: b4 10 20 00 clr %i2 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 2015948: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 201594c: 10 80 00 04 b 201595c <== NOT EXECUTED 2015950: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED free(node); 2015954: 7f ff c3 01 call 2006558 <== NOT EXECUTED 2015958: 01 00 00 00 nop <== NOT EXECUTED 201595c: 7f ff d9 68 call 200befc <_Chain_Get> <== NOT EXECUTED 2015960: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 2015964: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2015968: 12 bf ff fb bne 2015954 <== NOT EXECUTED 201596c: 01 00 00 00 nop <== NOT EXECUTED 2015970: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 2015974: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED 2015978: 32 bf ff f5 bne,a 201594c <== NOT EXECUTED 201597c: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2015980: 7f ff c2 f6 call 2006558 <== NOT EXECUTED 2015984: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2015988: 7f ff c2 f4 call 2006558 <== NOT EXECUTED 201598c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2015990: 7f ff c2 f2 call 2006558 <== NOT EXECUTED 2015994: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 2015998: 7f ff c2 f0 call 2006558 <== NOT EXECUTED 201599c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 20159a0: 7f ff bd e8 call 2005140 <== NOT EXECUTED 20159a4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 20159a8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 20159ac: 02 80 00 06 be 20159c4 <== NOT EXECUTED 20159b0: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 20159b4: 40 00 2b e1 call 2020938 <__errno> <== NOT EXECUTED 20159b8: 01 00 00 00 nop <== NOT EXECUTED 20159bc: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20159c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 20159c4: 81 c7 e0 08 ret <== NOT EXECUTED 20159c8: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED 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, 20159cc: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 20159d0: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED 20159d4: 7f ff ff 8c call 2015804 <== NOT EXECUTED 20159d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 20159dc: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 20159e0: 32 bf ff bf bne,a 20158dc <== NOT EXECUTED 20159e4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 20159e8: 10 bf ff be b 20158e0 <== NOT EXECUTED 20159ec: c2 0f 60 85 ldub [ %i5 + 0x85 ], %g1 <== NOT EXECUTED } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; 20159f0: 10 bf ff c7 b 201590c <== NOT EXECUTED 20159f4: b4 10 20 00 clr %i2 <== NOT EXECUTED =============================================================================== 0201d368 : int fcntl( int fd, int cmd, ... ) { 201d368: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201d36c: 03 00 80 81 sethi %hi(0x2020400), %g1 201d370: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 202071c ... ) { int ret; va_list ap; va_start( ap, cmd ); 201d374: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 201d378: 82 07 a0 4c add %fp, 0x4c, %g1 201d37c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201d380: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 201d384: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201d388: 80 a6 00 02 cmp %i0, %g2 201d38c: 1a 80 00 65 bcc 201d520 201d390: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 201d394: 3b 00 80 84 sethi %hi(0x2021000), %i5 201d398: c6 07 62 18 ld [ %i5 + 0x218 ], %g3 ! 2021218 201d39c: 93 2e 20 06 sll %i0, 6, %o1 201d3a0: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 201d3a4: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 201d3a8: 80 8a 21 00 btst 0x100, %o0 201d3ac: 02 80 00 5d be 201d520 201d3b0: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 201d3b4: 08 80 00 08 bleu 201d3d4 201d3b8: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 201d3bc: 7f ff d4 7e call 20125b4 <__errno> 201d3c0: b0 10 3f ff mov -1, %i0 201d3c4: 82 10 20 16 mov 0x16, %g1 201d3c8: c2 22 00 00 st %g1, [ %o0 ] 201d3cc: 81 c7 e0 08 ret 201d3d0: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 201d3d4: 31 00 80 74 sethi %hi(0x201d000), %i0 201d3d8: b0 16 23 40 or %i0, 0x340, %i0 ! 201d340 <_calloc_r+0x14> 201d3dc: c8 06 00 04 ld [ %i0 + %g4 ], %g4 201d3e0: 81 c1 00 00 jmp %g4 201d3e4: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 201d3e8: 7f ff d4 73 call 20125b4 <__errno> 201d3ec: 01 00 00 00 nop 201d3f0: 82 10 20 86 mov 0x86, %g1 ! 86 201d3f4: c2 22 00 00 st %g1, [ %o0 ] int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201d3f8: 81 c7 e0 08 ret 201d3fc: 91 e8 3f ff restore %g0, -1, %o0 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 ) ); 201d400: d0 00 40 00 ld [ %g1 ], %o0 201d404: 7f ff 9b 18 call 2004064 201d408: d2 27 bf f4 st %o1, [ %fp + -12 ] /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 201d40c: d2 07 bf f4 ld [ %fp + -12 ], %o1 201d410: 90 0a 22 01 and %o0, 0x201, %o0 201d414: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 201d418: 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); 201d41c: 82 08 7d fe and %g1, -514, %g1 201d420: 82 12 00 01 or %o0, %g1, %g1 201d424: c2 22 60 18 st %g1, [ %o1 + 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)( cmd, iop ); 201d428: c2 02 60 24 ld [ %o1 + 0x24 ], %g1 201d42c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 201d430: 9f c0 40 00 call %g1 201d434: 90 10 00 19 mov %i1, %o0 if (err) { 201d438: b2 92 20 00 orcc %o0, 0, %i1 201d43c: 12 80 00 04 bne 201d44c <== NEVER TAKEN 201d440: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 201d444: 81 c7 e0 08 ret 201d448: 81 e8 00 00 restore */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 201d44c: 7f ff d4 5a call 20125b4 <__errno> <== NOT EXECUTED 201d450: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201d454: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 201d458: 81 c7 e0 08 ret <== NOT EXECUTED 201d45c: 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 ); 201d460: 7f ff 9b 0e call 2004098 201d464: d2 27 bf f4 st %o1, [ %fp + -12 ] 201d468: d2 07 bf f4 ld [ %fp + -12 ], %o1 201d46c: 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) { 201d470: 80 a6 20 00 cmp %i0, 0 201d474: 36 bf ff ee bge,a 201d42c <== ALWAYS TAKEN 201d478: c2 02 60 24 ld [ %o1 + 0x24 ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 201d47c: 81 c7 e0 08 ret <== NOT EXECUTED 201d480: 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 ) ) 201d484: c2 00 40 00 ld [ %g1 ], %g1 201d488: 80 a0 60 00 cmp %g1, 0 201d48c: 22 80 00 22 be,a 201d514 201d490: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 201d494: 90 12 28 00 or %o0, 0x800, %o0 rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 201d498: 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; 201d49c: 10 bf ff e3 b 201d428 201d4a0: d0 22 60 18 st %o0, [ %o1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 201d4a4: 90 0a 28 00 and %o0, 0x800, %o0 201d4a8: 80 a0 00 08 cmp %g0, %o0 201d4ac: 10 bf ff df b 201d428 201d4b0: b0 40 20 00 addx %g0, 0, %i0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 201d4b4: c8 00 40 00 ld [ %g1 ], %g4 if ( fd2 ) 201d4b8: 80 a1 20 00 cmp %g4, 0 201d4bc: 02 80 00 1f be 201d538 201d4c0: b0 10 20 00 clr %i0 diop = rtems_libio_iop( fd2 ); 201d4c4: 80 a0 80 04 cmp %g2, %g4 201d4c8: 08 80 00 05 bleu 201d4dc <== NEVER TAKEN 201d4cc: 82 10 20 00 clr %g1 201d4d0: 83 29 20 06 sll %g4, 6, %g1 201d4d4: 82 00 c0 01 add %g3, %g1, %g1 201d4d8: b0 10 00 01 mov %g1, %i0 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 201d4dc: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = (int) (diop - rtems_libio_iops); 201d4e0: b0 26 00 03 sub %i0, %g3, %i0 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 201d4e4: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 201d4e8: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 ret = -1; break; } } diop->flags = iop->flags; 201d4ec: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; 201d4f0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 201d4f4: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 201d4f8: b1 3e 20 06 sra %i0, 6, %i0 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 201d4fc: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 201d500: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 201d504: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 201d508: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 201d50c: 10 bf ff d9 b 201d470 201d510: c4 20 60 2c st %g2, [ %g1 + 0x2c ] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 201d514: 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; 201d518: 10 bf ff c4 b 201d428 201d51c: d0 22 60 18 st %o0, [ %o1 + 0x18 ] int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201d520: 7f ff d4 25 call 20125b4 <__errno> 201d524: b0 10 3f ff mov -1, %i0 201d528: 82 10 20 09 mov 9, %g1 201d52c: c2 22 00 00 st %g1, [ %o0 ] 201d530: 81 c7 e0 08 ret 201d534: 81 e8 00 00 restore fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 201d538: 7f ff 9a ef call 20040f4 201d53c: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 201d540: 82 92 20 00 orcc %o0, 0, %g1 201d544: 02 bf ff ad be 201d3f8 <== NEVER TAKEN 201d548: d2 07 bf f4 ld [ %fp + -12 ], %o1 201d54c: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 201d550: c6 07 62 18 ld [ %i5 + 0x218 ], %g3 201d554: 10 bf ff e2 b 201d4dc 201d558: b0 10 00 01 mov %g1, %i0 =============================================================================== 0200f9a4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200f9a4: 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) { 200f9a8: 3b 00 80 96 sethi %hi(0x2025800), %i5 200f9ac: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 ! 2025838 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200f9b0: b8 10 00 18 mov %i0, %i4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200f9b4: 80 a2 20 00 cmp %o0, 0 200f9b8: 02 80 00 54 be 200fb08 200f9bc: b4 17 60 38 or %i5, 0x38, %i2 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200f9c0: 92 10 20 00 clr %o1 200f9c4: 94 10 20 00 clr %o2 200f9c8: 7f ff e9 aa call 200a070 200f9cc: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200f9d0: 80 a2 20 00 cmp %o0, 0 200f9d4: 12 80 01 18 bne 200fe34 <== NEVER TAKEN 200f9d8: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200f9dc: f6 07 00 00 ld [ %i4 ], %i3 if (pipe == NULL) { 200f9e0: 80 a6 e0 00 cmp %i3, 0 200f9e4: 02 80 00 91 be 200fc28 200f9e8: 01 00 00 00 nop err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200f9ec: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 200f9f0: 92 10 20 00 clr %o1 200f9f4: 7f ff e9 9f call 200a070 200f9f8: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200f9fc: c2 07 00 00 ld [ %i4 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200fa00: 80 a0 00 08 cmp %g0, %o0 200fa04: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200fa08: 80 a0 60 00 cmp %g1, 0 200fa0c: 02 80 00 d9 be 200fd70 200fa10: b0 0e 3f fc and %i0, -4, %i0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200fa14: 7f ff e9 e1 call 200a198 200fa18: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200fa1c: 80 a6 20 00 cmp %i0, 0 200fa20: 12 80 01 05 bne 200fe34 <== NEVER TAKEN 200fa24: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200fa28: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200fa2c: 82 08 60 06 and %g1, 6, %g1 200fa30: 80 a0 60 04 cmp %g1, 4 200fa34: 02 80 00 42 be 200fb3c 200fa38: fa 07 00 00 ld [ %i4 ], %i5 200fa3c: 80 a0 60 06 cmp %g1, 6 200fa40: 02 80 00 65 be 200fbd4 200fa44: 80 a0 60 02 cmp %g1, 2 200fa48: 22 80 00 07 be,a 200fa64 <== ALWAYS TAKEN 200fa4c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 200fa50: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED 200fa54: 7f ff e9 d1 call 200a198 200fa58: b0 10 20 00 clr %i0 return 0; 200fa5c: 81 c7 e0 08 ret 200fa60: 81 e8 00 00 restore return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200fa64: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200fa68: 86 00 60 01 add %g1, 1, %g3 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200fa6c: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200fa70: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200fa74: 80 a0 60 00 cmp %g1, 0 200fa78: 02 80 00 d4 be 200fdc8 <== ALWAYS TAKEN 200fa7c: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 200fa80: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED 200fa84: 80 a0 60 00 cmp %g1, 0 200fa88: 32 bf ff f3 bne,a 200fa54 200fa8c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 /* Not an error */ if (LIBIO_NODELAY(iop)) 200fa90: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200fa94: 80 88 60 01 btst 1, %g1 200fa98: 32 bf ff ef bne,a 200fa54 200fa9c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 break; prevCounter = pipe->writerCounter; 200faa0: 10 80 00 0c b 200fad0 200faa4: 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)) 200faa8: 92 10 20 00 clr %o1 200faac: 7f ff e9 71 call 200a070 200fab0: 94 10 20 00 clr %o2 200fab4: 80 a2 20 00 cmp %o0, 0 200fab8: 12 80 00 0f bne 200faf4 <== NEVER TAKEN 200fabc: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->writerCounter); 200fac0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200fac4: 80 a0 40 1b cmp %g1, %i3 200fac8: 32 bf ff e3 bne,a 200fa54 <== ALWAYS TAKEN 200facc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200fad0: 7f ff e9 b2 call 200a198 200fad4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200fad8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200fadc: 40 00 07 ef call 2011a98 200fae0: 92 10 20 00 clr %o1 200fae4: 80 a2 20 00 cmp %o0, 0 200fae8: 22 bf ff f0 be,a 200faa8 <== ALWAYS TAKEN 200faec: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200faf0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200faf4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200faf8: 7f ff ff 68 call 200f898 200fafc: 92 10 00 19 mov %i1, %o1 return err; } 200fb00: 81 c7 e0 08 ret 200fb04: 81 e8 00 00 restore rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200fb08: 37 00 80 96 sethi %hi(0x2025800), %i3 200fb0c: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 ! 20259a4 200fb10: 92 10 20 00 clr %o1 200fb14: 7f ff e9 57 call 200a070 200fb18: 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) { 200fb1c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 200fb20: 80 a0 60 00 cmp %g1, 0 200fb24: 02 80 00 9a be 200fd8c <== ALWAYS TAKEN 200fb28: 98 10 00 1a mov %i2, %o4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200fb2c: 7f ff e9 9b call 200a198 <== NOT EXECUTED 200fb30: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 <== NOT EXECUTED 200fb34: 10 bf ff a3 b 200f9c0 <== NOT EXECUTED 200fb38: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200fb3c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200fb40: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200fb44: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200fb48: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200fb4c: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200fb50: 80 a0 60 00 cmp %g1, 0 200fb54: 02 80 00 a7 be 200fdf0 <== ALWAYS TAKEN 200fb58: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200fb5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED 200fb60: 80 a0 60 00 cmp %g1, 0 200fb64: 32 bf ff bc bne,a 200fa54 200fb68: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200fb6c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200fb70: 80 88 60 01 btst 1, %g1 200fb74: 32 80 00 b2 bne,a 200fe3c 200fb78: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 200fb7c: 10 80 00 0c b 200fbac 200fb80: 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)) 200fb84: 92 10 20 00 clr %o1 200fb88: 7f ff e9 3a call 200a070 200fb8c: 94 10 20 00 clr %o2 200fb90: 80 a2 20 00 cmp %o0, 0 200fb94: 12 bf ff d8 bne 200faf4 <== NEVER TAKEN 200fb98: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->readerCounter); 200fb9c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200fba0: 80 a0 40 1b cmp %g1, %i3 200fba4: 32 bf ff ac bne,a 200fa54 <== ALWAYS TAKEN 200fba8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200fbac: 7f ff e9 7b call 200a198 200fbb0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200fbb4: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200fbb8: 40 00 07 b8 call 2011a98 200fbbc: 92 10 20 00 clr %o1 200fbc0: 80 a2 20 00 cmp %o0, 0 200fbc4: 22 bf ff f0 be,a 200fb84 <== ALWAYS TAKEN 200fbc8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200fbcc: 10 bf ff ca b 200faf4 <== NOT EXECUTED 200fbd0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200fbd4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200fbd8: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200fbdc: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200fbe0: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200fbe4: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200fbe8: 80 a0 60 00 cmp %g1, 0 200fbec: 02 80 00 7c be 200fddc <== ALWAYS TAKEN 200fbf0: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200fbf4: 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 ++; 200fbf8: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200fbfc: 86 00 60 01 add %g1, 1, %g3 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200fc00: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200fc04: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200fc08: 80 a0 60 00 cmp %g1, 0 200fc0c: 12 bf ff 91 bne 200fa50 <== NEVER TAKEN 200fc10: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); 200fc14: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200fc18: 40 00 07 89 call 2011a3c 200fc1c: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200fc20: 10 bf ff 8d b 200fa54 200fc24: 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)); 200fc28: 7f ff da 13 call 2006474 200fc2c: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200fc30: b6 92 20 00 orcc %o0, 0, %i3 200fc34: 02 80 00 8e be 200fe6c 200fc38: 82 10 22 00 mov 0x200, %g1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200fc3c: c0 26 c0 00 clr [ %i3 ] 200fc40: c0 26 e0 08 clr [ %i3 + 8 ] 200fc44: c0 26 e0 0c clr [ %i3 + 0xc ] 200fc48: c0 26 e0 10 clr [ %i3 + 0x10 ] 200fc4c: c0 26 e0 14 clr [ %i3 + 0x14 ] 200fc50: c0 26 e0 18 clr [ %i3 + 0x18 ] 200fc54: c0 26 e0 1c clr [ %i3 + 0x1c ] 200fc58: c0 26 e0 20 clr [ %i3 + 0x20 ] 200fc5c: c0 26 e0 24 clr [ %i3 + 0x24 ] 200fc60: c0 26 e0 28 clr [ %i3 + 0x28 ] 200fc64: c0 26 e0 2c clr [ %i3 + 0x2c ] 200fc68: c0 26 e0 30 clr [ %i3 + 0x30 ] pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 200fc6c: 90 10 22 00 mov 0x200, %o0 200fc70: 7f ff da 01 call 2006474 200fc74: c2 26 e0 04 st %g1, [ %i3 + 4 ] if (! pipe->Buffer) 200fc78: 80 a2 20 00 cmp %o0, 0 200fc7c: 02 80 00 7a be 200fe64 <== NEVER TAKEN 200fc80: d0 26 c0 00 st %o0, [ %i3 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200fc84: 35 00 80 94 sethi %hi(0x2025000), %i2 200fc88: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0 ! 2025008 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200fc8c: 31 14 12 5c sethi %hi(0x50497000), %i0 200fc90: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 200fc94: 92 10 20 00 clr %o1 200fc98: 94 10 20 00 clr %o2 200fc9c: 90 12 00 01 or %o0, %g1, %o0 200fca0: 40 00 07 0d call 20118d4 200fca4: 96 06 e0 2c add %i3, 0x2c, %o3 200fca8: 80 a2 20 00 cmp %o0, 0 200fcac: 12 80 00 6c bne 200fe5c 200fcb0: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200fcb4: 03 14 12 5d sethi %hi(0x50497400), %g1 200fcb8: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200fcbc: 92 10 20 00 clr %o1 200fcc0: 94 10 20 00 clr %o2 200fcc4: 90 12 00 01 or %o0, %g1, %o0 200fcc8: 40 00 07 03 call 20118d4 200fccc: 96 06 e0 30 add %i3, 0x30, %o3 200fcd0: 80 a2 20 00 cmp %o0, 0 200fcd4: 12 80 00 60 bne 200fe54 200fcd8: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200fcdc: b0 16 23 00 or %i0, 0x300, %i0 200fce0: 92 10 20 01 mov 1, %o1 200fce4: 90 12 00 18 or %o0, %i0, %o0 200fce8: 94 10 20 10 mov 0x10, %o2 200fcec: 96 10 20 00 clr %o3 200fcf0: 7f ff e8 39 call 2009dd4 200fcf4: 98 06 e0 28 add %i3, 0x28, %o4 200fcf8: 80 a2 20 00 cmp %o0, 0 200fcfc: 12 80 00 54 bne 200fe4c 200fd00: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200fd04: d2 06 e0 2c ld [ %i3 + 0x2c ], %o1 200fd08: 21 00 80 99 sethi %hi(0x2026400), %l0 200fd0c: 7f ff ef 8c call 200bb3c <_Objects_Get> 200fd10: 90 14 20 a0 or %l0, 0xa0, %o0 ! 20264a0 <_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; 200fd14: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200fd18: 31 04 00 00 sethi %hi(0x10000000), %i0 200fd1c: 82 10 40 18 or %g1, %i0, %g1 _Thread_Enable_dispatch(); 200fd20: 7f ff f3 75 call 200caf4 <_Thread_Enable_dispatch> 200fd24: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200fd28: d2 06 e0 30 ld [ %i3 + 0x30 ], %o1 200fd2c: 94 07 bf fc add %fp, -4, %o2 200fd30: 7f ff ef 83 call 200bb3c <_Objects_Get> 200fd34: 90 14 20 a0 or %l0, 0xa0, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200fd38: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200fd3c: b0 10 40 18 or %g1, %i0, %i0 _Thread_Enable_dispatch(); 200fd40: 7f ff f3 6d call 200caf4 <_Thread_Enable_dispatch> 200fd44: f0 22 20 4c st %i0, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200fd48: c2 0e a0 08 ldub [ %i2 + 8 ], %g1 200fd4c: 84 00 60 01 add %g1, 1, %g2 200fd50: 83 28 60 18 sll %g1, 0x18, %g1 200fd54: 83 38 60 18 sra %g1, 0x18, %g1 200fd58: 80 a0 60 7a cmp %g1, 0x7a 200fd5c: 12 bf ff 24 bne 200f9ec 200fd60: c4 2e a0 08 stb %g2, [ %i2 + 8 ] c = 'a'; 200fd64: 82 10 20 61 mov 0x61, %g1 200fd68: 10 bf ff 21 b 200f9ec 200fd6c: c2 2e a0 08 stb %g1, [ %i2 + 8 ] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 200fd70: 80 a6 20 00 cmp %i0, 0 200fd74: 12 80 00 24 bne 200fe04 <== NEVER TAKEN 200fd78: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200fd7c: 7f ff e9 07 call 200a198 200fd80: f6 27 00 00 st %i3, [ %i4 ] err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200fd84: 10 bf ff 2a b 200fa2c 200fd88: 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( 200fd8c: 92 10 20 01 mov 1, %o1 200fd90: 94 10 20 54 mov 0x54, %o2 200fd94: 96 10 20 00 clr %o3 200fd98: 11 14 12 54 sethi %hi(0x50495000), %o0 200fd9c: 7f ff e8 0e call 2009dd4 200fda0: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 200fda4: b4 10 00 08 mov %o0, %i2 200fda8: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 200fdac: 7f ff e8 fb call 200a198 200fdb0: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200fdb4: 80 a6 a0 00 cmp %i2, 0 200fdb8: 12 bf ff 29 bne 200fa5c 200fdbc: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200fdc0: 10 bf ff 01 b 200f9c4 200fdc4: 92 10 20 00 clr %o1 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200fdc8: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200fdcc: 40 00 07 1c call 2011a3c 200fdd0: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200fdd4: 10 bf ff 2c b 200fa84 200fdd8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200fddc: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200fde0: 40 00 07 17 call 2011a3c 200fde4: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200fde8: 10 bf ff 84 b 200fbf8 200fdec: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 200fdf0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200fdf4: 40 00 07 12 call 2011a3c 200fdf8: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200fdfc: 10 bf ff 59 b 200fb60 200fe00: 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); 200fe04: 40 00 06 e5 call 2011998 <== NOT EXECUTED 200fe08: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 200fe0c: 40 00 06 e3 call 2011998 <== NOT EXECUTED 200fe10: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 200fe14: 7f ff e8 60 call 2009f94 <== NOT EXECUTED 200fe18: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 200fe1c: 7f ff d7 27 call 2005ab8 <== NOT EXECUTED 200fe20: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED free(pipe); 200fe24: 7f ff d7 25 call 2005ab8 <== NOT EXECUTED 200fe28: 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); 200fe2c: 7f ff e8 db call 200a198 200fe30: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 200fe34: 81 c7 e0 08 ret 200fe38: 81 e8 00 00 restore if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 200fe3c: 7f ff e8 d7 call 200a198 200fe40: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200fe44: 10 bf ff 2d b 200faf8 200fe48: 90 10 00 1c mov %i4, %o0 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200fe4c: 40 00 06 d3 call 2011998 200fe50: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200fe54: 40 00 06 d1 call 2011998 200fe58: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200fe5c: 7f ff d7 17 call 2005ab8 200fe60: d0 06 c0 00 ld [ %i3 ], %o0 err_buf: free(pipe); 200fe64: 7f ff d7 15 call 2005ab8 200fe68: 90 10 00 1b mov %i3, %o0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200fe6c: 10 bf ff f0 b 200fe2c 200fe70: b0 10 3f f4 mov -12, %i0 =============================================================================== 0200d23c : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 200d23c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 200d240: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 200d244: 40 00 14 8a call 201246c <== NOT EXECUTED 200d248: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 200d24c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d250: 12 80 00 05 bne 200d264 <== NOT EXECUTED 200d254: 82 10 20 00 clr %g1 <== NOT EXECUTED return false; } else { fa->mount_h = entry->mount_h; 200d258: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED return true; 200d25c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { return false; } else { fa->mount_h = entry->mount_h; 200d260: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED return true; } } 200d264: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED 200d268: 81 c7 e0 08 ret <== NOT EXECUTED 200d26c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003de8 : long fpathconf( int fd, int name ) { 2003de8: 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); 2003dec: 03 00 80 80 sethi %hi(0x2020000), %g1 2003df0: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 20202fc 2003df4: 80 a6 00 01 cmp %i0, %g1 2003df8: 1a 80 00 3b bcc 2003ee4 2003dfc: 03 00 80 83 sethi %hi(0x2020c00), %g1 iop = rtems_libio_iop(fd); 2003e00: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 2020d68 2003e04: b1 2e 20 06 sll %i0, 6, %i0 2003e08: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 2003e0c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2003e10: 80 88 61 00 btst 0x100, %g1 2003e14: 02 80 00 34 be 2003ee4 <== NEVER TAKEN 2003e18: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2003e1c: 08 80 00 08 bleu 2003e3c 2003e20: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2003e24: 40 00 39 ed call 20125d8 <__errno> 2003e28: b0 10 3f ff mov -1, %i0 2003e2c: 82 10 20 16 mov 0x16, %g1 2003e30: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2003e34: 81 c7 e0 08 ret 2003e38: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2003e3c: b3 2e 60 02 sll %i1, 2, %i1 2003e40: 05 00 80 0f sethi %hi(0x2003c00), %g2 2003e44: 84 10 a1 b8 or %g2, 0x1b8, %g2 ! 2003db8 2003e48: c4 00 80 19 ld [ %g2 + %i1 ], %g2 2003e4c: 81 c0 80 00 jmp %g2 2003e50: 01 00 00 00 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2003e54: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 2003e58: 81 c7 e0 08 ret 2003e5c: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2003e60: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 2003e64: 81 c7 e0 08 ret 2003e68: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2003e6c: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 2003e70: 81 c7 e0 08 ret 2003e74: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2003e78: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 2003e7c: 81 c7 e0 08 ret 2003e80: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2003e84: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 2003e88: 81 c7 e0 08 ret 2003e8c: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2003e90: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 2003e94: 81 c7 e0 08 ret 2003e98: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 2003e9c: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 2003ea0: 81 c7 e0 08 ret 2003ea4: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 2003ea8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 2003eac: 81 c7 e0 08 ret 2003eb0: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 2003eb4: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 2003eb8: 81 c7 e0 08 ret 2003ebc: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 2003ec0: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 2003ec4: 81 c7 e0 08 ret 2003ec8: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 2003ecc: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 2003ed0: 81 c7 e0 08 ret 2003ed4: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2003ed8: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 2003edc: 81 c7 e0 08 ret 2003ee0: 81 e8 00 00 restore 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); 2003ee4: 40 00 39 bd call 20125d8 <__errno> 2003ee8: b0 10 3f ff mov -1, %i0 2003eec: 82 10 20 09 mov 9, %g1 2003ef0: c2 22 00 00 st %g1, [ %o0 ] 2003ef4: 81 c7 e0 08 ret 2003ef8: 81 e8 00 00 restore =============================================================================== 020032f0 : #include void free( void *ptr ) { 20032f0: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 20032f4: 03 00 80 7c sethi %hi(0x201f000), %g1 20032f8: 82 10 63 10 or %g1, 0x310, %g1 ! 201f310 20032fc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 2003300: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 2003304: 84 00 a0 01 inc %g2 if ( !ptr ) 2003308: 80 a6 20 00 cmp %i0, 0 200330c: 02 80 00 15 be 2003360 2003310: 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()) && 2003314: 03 00 80 7d sethi %hi(0x201f400), %g1 2003318: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current> 200331c: 80 a0 60 03 cmp %g1, 3 2003320: 02 80 00 17 be 200337c <== ALWAYS TAKEN 2003324: 03 00 80 7c sethi %hi(0x201f000), %g1 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003328: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 201f064 200332c: 80 a0 60 00 cmp %g1, 0 2003330: 02 80 00 06 be 2003348 2003334: 3b 00 80 7a sethi %hi(0x201e800), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003338: c2 00 60 08 ld [ %g1 + 8 ], %g1 200333c: 9f c0 40 00 call %g1 2003340: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2003344: 3b 00 80 7a sethi %hi(0x201e800), %i5 2003348: d0 07 60 44 ld [ %i5 + 0x44 ], %o0 ! 201e844 200334c: 40 00 17 7f call 2009148 <_Protected_heap_Free> 2003350: 92 10 00 19 mov %i1, %o1 2003354: 80 8a 20 ff btst 0xff, %o0 2003358: 22 80 00 04 be,a 2003368 200335c: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 2003360: 81 c7 e0 08 ret 2003364: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2003368: 31 00 80 74 sethi %hi(0x201d000), %i0 200336c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2003370: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2003374: 40 00 04 1b call 20043e0 2003378: 91 ee 22 f0 restore %i0, 0x2f0, %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() ) { 200337c: 40 00 00 ad call 2003630 2003380: 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()) && 2003384: 80 8a 20 ff btst 0xff, %o0 2003388: 12 bf ff e8 bne 2003328 200338c: 03 00 80 7c sethi %hi(0x201f000), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 2003390: 40 00 00 c7 call 20036ac 2003394: 81 e8 00 00 restore =============================================================================== 02006b60 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2006b60: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2006b64: 03 00 80 98 sethi %hi(0x2026000), %g1 <== NOT EXECUTED 2006b68: 82 10 60 7c or %g1, 0x7c, %g1 ! 202607c <== NOT EXECUTED 2006b6c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 2006b70: 02 80 00 08 be 2006b90 <== NOT EXECUTED 2006b74: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2006b78: 7f ff fa bd call 200566c <== NOT EXECUTED 2006b7c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2006b80: 7f ff fa bb call 200566c <== NOT EXECUTED 2006b84: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 2006b88: 7f ff fa c0 call 2005688 <== NOT EXECUTED 2006b8c: 81 e8 00 00 restore <== NOT EXECUTED 2006b90: 81 c7 e0 08 ret <== NOT EXECUTED 2006b94: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201d6ac : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 201d6ac: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 201d6b0: 03 00 80 81 sethi %hi(0x2020400), %g1 201d6b4: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 202071c 201d6b8: 80 a6 00 01 cmp %i0, %g1 201d6bc: 1a 80 00 06 bcc 201d6d4 <== NEVER TAKEN 201d6c0: ba 10 20 00 clr %i5 201d6c4: 03 00 80 84 sethi %hi(0x2021000), %g1 201d6c8: fa 00 62 18 ld [ %g1 + 0x218 ], %i5 ! 2021218 201d6cc: b1 2e 20 06 sll %i0, 6, %i0 201d6d0: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 201d6d4: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 201d6d8: de 07 60 1c ld [ %i5 + 0x1c ], %o7 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 201d6dc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 201d6e0: f0 07 60 20 ld [ %i5 + 0x20 ], %i0 201d6e4: c8 07 60 24 ld [ %i5 + 0x24 ], %g4 201d6e8: c6 07 60 2c ld [ %i5 + 0x2c ], %g3 201d6ec: de 27 bf ec st %o7, [ %fp + -20 ] 201d6f0: f0 27 bf f0 st %i0, [ %fp + -16 ] 201d6f4: c8 27 bf f4 st %g4, [ %fp + -12 ] 201d6f8: c4 27 bf f8 st %g2, [ %fp + -8 ] 201d6fc: c6 27 bf fc st %g3, [ %fp + -4 ] if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 201d700: 9f c0 40 00 call %g1 201d704: 90 07 bf ec add %fp, -20, %o0 201d708: 80 a2 20 01 cmp %o0, 1 201d70c: 12 80 00 09 bne 201d730 201d710: 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 ); 201d714: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 201d718: c2 00 60 08 ld [ %g1 + 8 ], %g1 201d71c: 92 10 00 19 mov %i1, %o1 201d720: 9f c0 40 00 call %g1 201d724: 94 10 00 1a mov %i2, %o2 } 201d728: 81 c7 e0 08 ret 201d72c: 91 e8 00 08 restore %g0, %o0, %o0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 201d730: 7f ff d3 a1 call 20125b4 <__errno> 201d734: b0 10 3f ff mov -1, %i0 201d738: 82 10 20 14 mov 0x14, %g1 201d73c: c2 22 00 00 st %g1, [ %o0 ] 201d740: 81 c7 e0 08 ret 201d744: 81 e8 00 00 restore =============================================================================== 02003dd4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2003dd4: 9d e3 bf a0 save %sp, -96, %sp void init_etc_passwd_group(void) { FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2003dd8: 03 00 80 82 sethi %hi(0x2020800), %g1 2003ddc: c2 48 63 90 ldsb [ %g1 + 0x390 ], %g1 ! 2020b90 2003de0: 80 a0 60 00 cmp %g1, 0 2003de4: 12 80 00 05 bne 2003df8 <== ALWAYS TAKEN 2003de8: 11 00 80 7b sethi %hi(0x201ec00), %o0 2003dec: 7f ff ff c2 call 2003cf4 <== NOT EXECUTED 2003df0: 01 00 00 00 nop <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) 2003df4: 11 00 80 7b sethi %hi(0x201ec00), %o0 <== NOT EXECUTED 2003df8: 13 00 80 7d sethi %hi(0x201f400), %o1 2003dfc: 90 12 22 08 or %o0, 0x208, %o0 2003e00: 40 00 3b de call 2012d78 2003e04: 92 12 63 f8 or %o1, 0x3f8, %o1 2003e08: a0 92 20 00 orcc %o0, 0, %l0 2003e0c: 12 80 00 0b bne 2003e38 2003e10: 92 10 00 1a mov %i2, %o1 2003e14: 30 80 00 27 b,a 2003eb0 for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 2003e18: 40 00 40 3f call 2013f14 2003e1c: 92 10 00 18 mov %i0, %o1 2003e20: 80 a0 00 08 cmp %g0, %o0 2003e24: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 2003e28: 80 a0 60 00 cmp %g1, 0 2003e2c: 12 80 00 14 bne 2003e7c 2003e30: 90 10 00 10 mov %l0, %o0 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 2003e34: 92 10 00 1a mov %i2, %o1 2003e38: 94 10 00 1b mov %i3, %o2 2003e3c: 96 10 00 1c mov %i4, %o3 2003e40: 7f ff ff 06 call 2003a58 2003e44: 90 10 00 10 mov %l0, %o0 2003e48: 80 a2 20 00 cmp %o0, 0 2003e4c: 02 80 00 11 be 2003e90 2003e50: 80 a6 20 00 cmp %i0, 0 goto error_einval; if (name) { 2003e54: 32 bf ff f1 bne,a 2003e18 2003e58: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 2003e5c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 2003e60: 82 18 40 19 xor %g1, %i1, %g1 2003e64: 80 a0 00 01 cmp %g0, %g1 2003e68: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 2003e6c: 80 a0 60 00 cmp %g1, 0 2003e70: 02 bf ff f2 be 2003e38 2003e74: 92 10 00 1a mov %i2, %o1 fclose(fp); 2003e78: 90 10 00 10 mov %l0, %o0 2003e7c: 40 00 39 e0 call 20125fc 2003e80: b0 10 20 00 clr %i0 *result = grp; 2003e84: f4 27 40 00 st %i2, [ %i5 ] return 0; 2003e88: 81 c7 e0 08 ret 2003e8c: 81 e8 00 00 restore } } error_einval: fclose(fp); 2003e90: 40 00 39 db call 20125fc 2003e94: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 2003e98: 40 00 39 87 call 20124b4 <__errno> 2003e9c: b0 10 3f ff mov -1, %i0 2003ea0: 82 10 20 16 mov 0x16, %g1 2003ea4: c2 22 00 00 st %g1, [ %o0 ] } 2003ea8: 81 c7 e0 08 ret 2003eac: 81 e8 00 00 restore int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 2003eb0: 40 00 39 81 call 20124b4 <__errno> 2003eb4: b0 10 3f ff mov -1, %i0 2003eb8: 82 10 20 16 mov 0x16, %g1 2003ebc: c2 22 00 00 st %g1, [ %o0 ] 2003ec0: 81 c7 e0 08 ret 2003ec4: 81 e8 00 00 restore =============================================================================== 020041f8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 20041f8: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED 20041fc: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED 2004200: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2004204: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED 2004208: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 200420c: 90 10 20 00 clr %o0 <== NOT EXECUTED 2004210: 92 10 00 04 mov %g4, %o1 <== NOT EXECUTED 2004214: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED 2004218: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 200421c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 2004220: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2004224: 7f ff fe ec call 2003dd4 <== NOT EXECUTED 2004228: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200418c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 200418c: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED 2004190: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2004194: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED 2004198: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 200419c: 92 10 20 00 clr %o1 <== NOT EXECUTED 20041a0: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED 20041a4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 20041a8: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 20041ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20041b0: 7f ff ff 09 call 2003dd4 <== NOT EXECUTED 20041b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02003744 : * 4.2.4 Get User Name, P1003.1b-1993, p. 87 * * NOTE: P1003.1c/D10, p. 49 adds getlogin_r(). */ char *getlogin( void ) { 2003744: 9d e3 bf a0 save %sp, -96, %sp (void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX ); 2003748: 3b 00 80 81 sethi %hi(0x2020400), %i5 200374c: f0 07 60 70 ld [ %i5 + 0x70 ], %i0 ! 2020470 ) { struct passwd *pw; char *pname; if ( !name ) 2003750: b0 86 20 3a addcc %i0, 0x3a, %i0 2003754: 02 80 00 11 be 2003798 <== NEVER TAKEN 2003758: 01 00 00 00 nop return ERANGE; /* Set the pointer to a default name */ pname = ""; pw = getpwuid(getuid()); 200375c: 40 00 03 68 call 20044fc 2003760: 01 00 00 00 nop 2003764: 91 2a 20 10 sll %o0, 0x10, %o0 2003768: 40 00 02 47 call 2004084 200376c: 91 32 20 10 srl %o0, 0x10, %o0 if ( namesize < LOGIN_NAME_MAX ) return ERANGE; /* Set the pointer to a default name */ pname = ""; 2003770: 13 00 80 79 sethi %hi(0x201e400), %o1 pw = getpwuid(getuid()); if ( pw ) 2003774: 80 a2 20 00 cmp %o0, 0 2003778: 02 80 00 03 be 2003784 200377c: 92 12 63 b8 or %o1, 0x3b8, %o1 pname = pw->pw_name; 2003780: d2 02 00 00 ld [ %o0 ], %o1 strncpy( name, pname, LOGIN_NAME_MAX ); 2003784: 90 10 00 18 mov %i0, %o0 2003788: 40 00 44 05 call 201479c 200378c: 94 10 20 09 mov 9, %o2 2003790: f0 07 60 70 ld [ %i5 + 0x70 ], %i0 2003794: b0 06 20 3a add %i0, 0x3a, %i0 */ char *getlogin( void ) { (void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX ); return _POSIX_types_Getlogin_buffer; } 2003798: 81 c7 e0 08 ret 200379c: 81 e8 00 00 restore =============================================================================== 020037a0 : */ int getlogin_r( char *name, size_t namesize ) { 20037a0: 9d e3 bf a0 save %sp, -96, %sp 20037a4: ba 10 00 18 mov %i0, %i5 struct passwd *pw; char *pname; if ( !name ) 20037a8: 80 a7 60 00 cmp %i5, 0 20037ac: 02 80 00 13 be 20037f8 20037b0: b0 10 20 0e mov 0xe, %i0 return EFAULT; if ( namesize < LOGIN_NAME_MAX ) 20037b4: 80 a6 60 08 cmp %i1, 8 20037b8: 08 80 00 10 bleu 20037f8 <== ALWAYS TAKEN 20037bc: b0 10 20 22 mov 0x22, %i0 return ERANGE; /* Set the pointer to a default name */ pname = ""; pw = getpwuid(getuid()); 20037c0: 40 00 03 4f call 20044fc <== NOT EXECUTED 20037c4: 01 00 00 00 nop <== NOT EXECUTED 20037c8: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED 20037cc: 40 00 02 2e call 2004084 <== NOT EXECUTED 20037d0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED if ( namesize < LOGIN_NAME_MAX ) return ERANGE; /* Set the pointer to a default name */ pname = ""; 20037d4: 13 00 80 79 sethi %hi(0x201e400), %o1 <== NOT EXECUTED pw = getpwuid(getuid()); if ( pw ) 20037d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20037dc: 02 80 00 03 be 20037e8 <== NOT EXECUTED 20037e0: 92 12 63 b8 or %o1, 0x3b8, %o1 <== NOT EXECUTED pname = pw->pw_name; 20037e4: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED strncpy( name, pname, LOGIN_NAME_MAX ); 20037e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20037ec: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED 20037f0: 40 00 43 eb call 201479c <== NOT EXECUTED 20037f4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 20037f8: 81 c7 e0 08 ret 20037fc: 81 e8 00 00 restore =============================================================================== 02003fe4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2003fe4: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED 2003fe8: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2003fec: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED 2003ff0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 2003ff4: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003ff8: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED 2003ffc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2004000: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 2004004: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2004008: 7f ff ff b0 call 2003ec8 <== NOT EXECUTED 200400c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004050 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2004050: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED 2004054: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED 2004058: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 200405c: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED 2004060: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2004064: 90 10 20 00 clr %o0 <== NOT EXECUTED 2004068: 92 10 00 04 mov %g4, %o1 <== NOT EXECUTED 200406c: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED 2004070: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2004074: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 2004078: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200407c: 7f ff ff 93 call 2003ec8 <== NOT EXECUTED 2004080: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02010684 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 2010684: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 2010688: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 201068c: 80 a0 a0 01 cmp %g2, 1 2010690: 12 80 00 05 bne 20106a4 <== NEVER TAKEN 2010694: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 2010698: c0 22 20 10 clr [ %o0 + 0x10 ] 201069c: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 20106a0: 82 10 20 00 clr %g1 } 20106a4: 81 c3 e0 08 retl 20106a8: 90 10 00 01 mov %g1, %o0 =============================================================================== 020106ac : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 20106ac: 9d e3 be 88 save %sp, -376, %sp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 20106b0: f6 06 20 1c ld [ %i0 + 0x1c ], %i3 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 20106b4: 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; 20106b8: f8 06 e0 50 ld [ %i3 + 0x50 ], %i4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 20106bc: b6 06 e0 54 add %i3, 0x54, %i3 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 20106c0: 80 a7 00 1b cmp %i4, %i3 20106c4: 02 80 00 34 be 2010794 20106c8: b0 10 20 00 clr %i0 /* Move to the first of the desired directory entries */ the_node = rtems_chain_first( the_chain ); bytes_transferred = 0; first_entry = iop->offset; 20106cc: e0 07 60 14 ld [ %i5 + 0x14 ], %l0 /* 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); 20106d0: 90 10 00 1a mov %i2, %o0 20106d4: 40 00 27 52 call 201a41c <.udiv> 20106d8: 92 10 21 18 mov 0x118, %o1 for ( current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 20106dc: b4 10 20 00 clr %i2 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); 20106e0: 83 2a 20 03 sll %o0, 3, %g1 20106e4: 91 2a 20 05 sll %o0, 5, %o0 20106e8: 82 00 40 08 add %g1, %o0, %g1 20106ec: a3 28 60 03 sll %g1, 3, %l1 20106f0: a2 24 40 01 sub %l1, %g1, %l1 20106f4: a2 04 40 10 add %l1, %l0, %l1 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 20106f8: 80 a4 60 00 cmp %l1, 0 20106fc: 14 80 00 09 bg 2010720 <== ALWAYS TAKEN 2010700: a4 10 21 18 mov 0x118, %l2 2010704: 30 80 00 24 b,a 2010794 <== NOT EXECUTED 2010708: 80 a4 40 1a cmp %l1, %i2 201070c: 04 80 00 22 ble 2010794 <== NEVER TAKEN 2010710: f8 07 00 00 ld [ %i4 ], %i4 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 2010714: 80 a7 00 1b cmp %i4, %i3 2010718: 02 80 00 1f be 2010794 201071c: 01 00 00 00 nop /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 2010720: 80 a4 00 1a cmp %l0, %i2 2010724: 34 bf ff f9 bg,a 2010708 2010728: b4 06 a1 18 add %i2, 0x118, %i2 /* 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; 201072c: c2 07 20 38 ld [ %i4 + 0x38 ], %g1 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 2010730: 85 3e a0 1f sra %i2, 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 ); 2010734: a6 07 20 0c add %i4, 0xc, %l3 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 2010738: 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; 201073c: c2 27 be e8 st %g1, [ %fp + -280 ] /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 2010740: f4 27 be f4 st %i2, [ %fp + -268 ] tmp_dirent.d_reclen = sizeof( struct dirent ); 2010744: 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 ); 2010748: 40 00 09 3a call 2012c30 201074c: 90 10 00 13 mov %l3, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 2010750: 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 ); 2010754: d0 37 be fa sth %o0, [ %fp + -262 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 2010758: 40 00 07 72 call 2012520 201075c: 90 07 be fc add %fp, -260, %o0 memcpy( 2010760: 90 06 40 18 add %i1, %i0, %o0 2010764: 92 07 be e8 add %fp, -280, %o1 2010768: 40 00 05 f6 call 2011f40 201076c: 94 10 21 18 mov 0x118, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2010770: 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( 2010774: b4 06 a1 18 add %i2, 0x118, %i2 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2010778: 86 80 e1 18 addcc %g3, 0x118, %g3 201077c: 84 40 a0 00 addx %g2, 0, %g2 2010780: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] bytes_transferred = bytes_transferred + sizeof( struct dirent ); 2010784: b0 06 21 18 add %i0, 0x118, %i0 /* 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); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 2010788: 80 a4 40 1a cmp %l1, %i2 201078c: 14 bf ff e2 bg 2010714 <== NEVER TAKEN 2010790: f8 07 00 00 ld [ %i4 ], %i4 the_node = the_node->next; } /* Success */ return bytes_transferred; } 2010794: 81 c7 e0 08 ret 2010798: 81 e8 00 00 restore =============================================================================== 020108f4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 20108f4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 20108f8: fa 06 40 00 ld [ %i1 ], %i5 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 20108fc: 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 ); 2010900: 82 07 60 54 add %i5, 0x54, %g1 2010904: 80 a0 80 01 cmp %g2, %g1 2010908: 12 80 00 18 bne 2010968 201090c: 01 00 00 00 nop 2010910: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 2010914: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2010918: 80 a7 40 01 cmp %i5, %g1 201091c: 02 80 00 0d be 2010950 2010920: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 2010924: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 2010928: 80 a0 60 00 cmp %g1, 0 201092c: 12 80 00 09 bne 2010950 <== NEVER TAKEN 2010930: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 2010934: 7f ff f0 45 call 200ca48 2010938: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 201093c: 90 10 00 1d mov %i5, %o0 2010940: 7f ff f0 54 call 200ca90 2010944: b0 10 20 00 clr %i0 return 0; } 2010948: 81 c7 e0 08 ret 201094c: 81 e8 00 00 restore /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 2010950: 40 00 03 20 call 20115d0 <__errno> 2010954: b0 10 3f ff mov -1, %i0 2010958: 82 10 20 10 mov 0x10, %g1 201095c: c2 22 00 00 st %g1, [ %o0 ] 2010960: 81 c7 e0 08 ret 2010964: 81 e8 00 00 restore /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 2010968: 40 00 03 1a call 20115d0 <__errno> 201096c: b0 10 3f ff mov -1, %i0 2010970: 82 10 20 5a mov 0x5a, %g1 2010974: c2 22 00 00 st %g1, [ %o0 ] 2010978: 81 c7 e0 08 ret 201097c: 81 e8 00 00 restore =============================================================================== 02003fbc : void init_etc_passwd_group(void) { FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2003fbc: 03 00 80 82 sethi %hi(0x2020800), %g1 <== NOT EXECUTED 2003fc0: c2 48 63 90 ldsb [ %g1 + 0x390 ], %g1 ! 2020b90 <== NOT EXECUTED 2003fc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003fc8: 02 80 00 04 be 2003fd8 <== NOT EXECUTED 2003fcc: 01 00 00 00 nop <== NOT EXECUTED 2003fd0: 81 c3 e0 08 retl <== NOT EXECUTED 2003fd4: 01 00 00 00 nop <== NOT EXECUTED 2003fd8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003fdc: 7f ff ff 46 call 2003cf4 <== NOT EXECUTED 2003fe0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02003cf4 : static struct group grent; /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) 2003cf4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 2003cf8: 84 10 20 01 mov 1, %g2 2003cfc: 03 00 80 82 sethi %hi(0x2020800), %g1 mkdir("/etc", 0777); 2003d00: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 2003d04: c4 28 63 90 stb %g2, [ %g1 + 0x390 ] mkdir("/etc", 0777); 2003d08: 11 00 80 7b sethi %hi(0x201ec00), %o0 2003d0c: 40 00 02 e3 call 2004898 2003d10: 90 12 21 80 or %o0, 0x180, %o0 ! 201ed80 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 2003d14: 39 00 80 7b sethi %hi(0x201ec00), %i4 2003d18: 3b 00 80 7d sethi %hi(0x201f400), %i5 2003d1c: 90 17 21 88 or %i4, 0x188, %o0 2003d20: 40 00 3c 16 call 2012d78 2003d24: 92 17 63 f8 or %i5, 0x3f8, %o1 2003d28: 80 a2 20 00 cmp %o0, 0 2003d2c: 22 80 00 1b be,a 2003d98 2003d30: 90 17 21 88 or %i4, 0x188, %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); 2003d34: 40 00 3a 32 call 20125fc 2003d38: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2003d3c: 39 00 80 7b sethi %hi(0x201ec00), %i4 2003d40: 92 17 63 f8 or %i5, 0x3f8, %o1 2003d44: 40 00 3c 0d call 2012d78 2003d48: 90 17 22 08 or %i4, 0x208, %o0 2003d4c: 80 a2 20 00 cmp %o0, 0 2003d50: 22 80 00 04 be,a 2003d60 2003d54: 90 17 22 08 or %i4, 0x208, %o0 fclose(fp); 2003d58: 40 00 3a 29 call 20125fc 2003d5c: 91 e8 00 08 restore %g0, %o0, %o0 } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2003d60: 13 00 80 7b sethi %hi(0x201ec00), %o1 2003d64: 40 00 3c 05 call 2012d78 2003d68: 92 12 61 98 or %o1, 0x198, %o1 ! 201ed98 2003d6c: b0 92 20 00 orcc %o0, 0, %i0 2003d70: 02 80 00 17 be 2003dcc <== NEVER TAKEN 2003d74: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 2003d78: 92 10 20 01 mov 1, %o1 ! 1 2003d7c: 11 00 80 7b sethi %hi(0x201ec00), %o0 2003d80: 94 10 20 2a mov 0x2a, %o2 2003d84: 96 10 00 18 mov %i0, %o3 2003d88: 40 00 3e 00 call 2013588 2003d8c: 90 12 22 18 or %o0, 0x218, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2003d90: 40 00 3a 1b call 20125fc 2003d94: 81 e8 00 00 restore * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 2003d98: 13 00 80 7b sethi %hi(0x201ec00), %o1 2003d9c: 40 00 3b f7 call 2012d78 2003da0: 92 12 61 98 or %o1, 0x198, %o1 ! 201ed98 2003da4: b0 92 20 00 orcc %o0, 0, %i0 2003da8: 02 bf ff e5 be 2003d3c <== NEVER TAKEN 2003dac: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 2003db0: 94 10 20 66 mov 0x66, %o2 2003db4: 96 10 00 18 mov %i0, %o3 2003db8: 11 00 80 7b sethi %hi(0x201ec00), %o0 2003dbc: 40 00 3d f3 call 2013588 2003dc0: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 201eda0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 2003dc4: 10 bf ff dc b 2003d34 2003dc8: 90 10 00 18 mov %i0, %o0 2003dcc: 81 c7 e0 08 ret <== NOT EXECUTED 2003dd0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02005728 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2005728: 9d e3 bf 98 save %sp, -104, %sp if (tty->termios.c_iflag & ISTRIP) 200572c: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 2005730: 80 88 60 20 btst 0x20, %g1 2005734: 02 80 00 03 be 2005740 <== ALWAYS TAKEN 2005738: ba 10 00 18 mov %i0, %i5 c &= 0x7f; 200573c: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2005740: 80 88 62 00 btst 0x200, %g1 2005744: 02 80 00 0d be 2005778 2005748: 80 a7 60 0d cmp %i5, 0xd c = tolower (c); 200574c: 05 00 80 7a sethi %hi(0x201e800), %g2 2005750: c6 00 a3 34 ld [ %g2 + 0x334 ], %g3 ! 201eb34 <__ctype_ptr__> 2005754: 84 10 00 1d mov %i5, %g2 2005758: ba 00 c0 1d add %g3, %i5, %i5 200575c: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 2005760: 86 08 e0 03 and %g3, 3, %g3 2005764: 80 a0 e0 01 cmp %g3, 1 2005768: 22 80 00 02 be,a 2005770 200576c: 84 00 a0 20 add %g2, 0x20, %g2 2005770: ba 08 a0 ff and %g2, 0xff, %i5 if (c == '\r') { 2005774: 80 a7 60 0d cmp %i5, 0xd 2005778: 02 80 00 17 be 20057d4 200577c: 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)) { 2005780: 02 80 00 41 be 2005884 2005784: 80 a7 60 00 cmp %i5, 0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2005788: 32 80 00 1a bne,a 20057f0 <== ALWAYS TAKEN 200578c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2005790: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2005794: 05 00 80 7a sethi %hi(0x201e800), %g2 2005798: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2 ! 201e968 200579c: 84 00 bf ff add %g2, -1, %g2 20057a0: 80 a0 40 02 cmp %g1, %g2 20057a4: 1a 80 00 7b bcc 2005990 <== NEVER TAKEN 20057a8: b0 10 20 00 clr %i0 if (tty->termios.c_lflag & ECHO) 20057ac: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 20057b0: 80 88 a0 08 btst 8, %g2 20057b4: 12 80 00 39 bne 2005898 <== ALWAYS TAKEN 20057b8: 80 88 a2 00 btst 0x200, %g2 echo (c, tty); tty->cbuf[tty->ccount++] = c; 20057bc: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 20057c0: 84 00 60 01 add %g1, 1, %g2 20057c4: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] 20057c8: c4 26 60 20 st %g2, [ %i1 + 0x20 ] } return 0; } 20057cc: 81 c7 e0 08 ret 20057d0: 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) 20057d4: 80 88 60 80 btst 0x80, %g1 20057d8: 12 80 00 6e bne 2005990 <== NEVER TAKEN 20057dc: b0 10 20 00 clr %i0 return 0; if (tty->termios.c_iflag & ICRNL) 20057e0: 80 88 61 00 btst 0x100, %g1 20057e4: 32 80 00 02 bne,a 20057ec <== ALWAYS TAKEN 20057e8: 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)) { 20057ec: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20057f0: 80 88 60 02 btst 2, %g1 20057f4: 22 bf ff e8 be,a 2005794 20057f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if (c == tty->termios.c_cc[VERASE]) { 20057fc: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 2005800: 80 a0 80 1d cmp %g2, %i5 2005804: 22 80 00 72 be,a 20059cc 2005808: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 200580c: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 2005810: 90 08 a0 ff and %g2, 0xff, %o0 2005814: 80 a2 00 1d cmp %o0, %i5 2005818: 22 80 00 53 be,a 2005964 200581c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2005820: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 2005824: 80 a0 80 1d cmp %g2, %i5 2005828: 02 80 00 5a be 2005990 <== NEVER TAKEN 200582c: b0 10 20 01 mov 1, %i0 return 1; } else if (c == '\n') { 2005830: 80 a7 60 0a cmp %i5, 0xa 2005834: 02 80 00 59 be 2005998 2005838: 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]) || 200583c: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 2005840: 80 a0 80 1d cmp %g2, %i5 2005844: 02 80 00 07 be 2005860 <== NEVER TAKEN 2005848: 80 88 60 08 btst 8, %g1 200584c: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 2005850: 80 a0 80 1d cmp %g2, %i5 2005854: 32 bf ff d0 bne,a 2005794 <== ALWAYS TAKEN 2005858: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 200585c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2005860: 12 80 00 2b bne 200590c <== NOT EXECUTED 2005864: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2005868: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 200586c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2005870: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 2005874: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED 2005878: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 200587c: 81 c7 e0 08 ret <== NOT EXECUTED 2005880: 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)) { 2005884: 80 88 60 40 btst 0x40, %g1 2005888: 32 bf ff d9 bne,a 20057ec <== NEVER TAKEN 200588c: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2005890: 10 bf ff d8 b 20057f0 2005894: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 2005898: 02 80 00 19 be 20058fc <== NEVER TAKEN 200589c: 90 10 00 1d mov %i5, %o0 iscntrl(c) && (c != '\t') && (c != '\n')) { 20058a0: 03 00 80 7a sethi %hi(0x201e800), %g1 20058a4: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__> 20058a8: 82 00 40 1d add %g1, %i5, %g1 20058ac: c2 08 60 01 ldub [ %g1 + 1 ], %g1 20058b0: 80 88 60 20 btst 0x20, %g1 20058b4: 02 80 00 12 be 20058fc 20058b8: 80 a7 60 09 cmp %i5, 9 20058bc: 02 80 00 10 be 20058fc 20058c0: 80 a7 60 0a cmp %i5, 0xa 20058c4: 02 80 00 0e be 20058fc <== NEVER TAKEN 20058c8: 84 10 20 5e mov 0x5e, %g2 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 20058cc: 82 1f 60 40 xor %i5, 0x40, %g1 20058d0: c2 2f bf f9 stb %g1, [ %fp + -7 ] { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 20058d4: c4 2f bf f8 stb %g2, [ %fp + -8 ] echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 20058d8: 90 07 bf f8 add %fp, -8, %o0 20058dc: 92 10 20 02 mov 2, %o1 20058e0: 7f ff fe 2b call 200518c 20058e4: 94 10 00 19 mov %i1, %o2 tty->column += 2; 20058e8: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 20058ec: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20058f0: 84 00 a0 02 add %g2, 2, %g2 20058f4: 10 bf ff b2 b 20057bc 20058f8: c4 26 60 28 st %g2, [ %i1 + 0x28 ] } else { oproc (c, tty); 20058fc: 7f ff fe 74 call 20052cc 2005900: 92 10 00 19 mov %i1, %o1 2005904: 10 bf ff ae b 20057bc 2005908: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 200590c: 02 80 00 38 be 20059ec <== NOT EXECUTED 2005910: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED iscntrl(c) && (c != '\t') && (c != '\n')) { 2005914: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED 2005918: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED 200591c: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED 2005920: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 2005924: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2005928: 02 80 00 31 be 20059ec <== NOT EXECUTED 200592c: 80 a7 60 09 cmp %i5, 9 <== NOT EXECUTED 2005930: 02 80 00 2f be 20059ec <== NOT EXECUTED 2005934: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2005938: 82 1f 60 40 xor %i5, 0x40, %g1 <== NOT EXECUTED 200593c: c2 2f bf f9 stb %g1, [ %fp + -7 ] <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2005940: c4 2f bf f8 stb %g2, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2005944: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 2005948: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 200594c: 7f ff fe 10 call 200518c <== NOT EXECUTED 2005950: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 2005954: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 2005958: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 200595c: 10 bf ff c3 b 2005868 <== NOT EXECUTED 2005960: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 2005964: 80 a0 e0 00 cmp %g3, 0 2005968: 02 80 00 0a be 2005990 <== NEVER TAKEN 200596c: b0 10 20 00 clr %i0 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2005970: 80 88 60 08 btst 8, %g1 2005974: 02 80 00 22 be 20059fc <== NEVER TAKEN 2005978: 80 88 60 10 btst 0x10, %g1 tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 200597c: 02 80 00 23 be 2005a08 <== NEVER TAKEN 2005980: 80 88 62 00 btst 0x200, %g1 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2005984: 90 10 00 19 mov %i1, %o0 2005988: 7f ff fe d9 call 20054ec 200598c: 92 10 20 01 mov 1, %o1 2005990: 81 c7 e0 08 ret 2005994: 81 e8 00 00 restore return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 2005998: 22 80 00 06 be,a 20059b0 <== NEVER TAKEN 200599c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 20059a0: 90 10 20 0a mov 0xa, %o0 20059a4: 7f ff fe 4a call 20052cc 20059a8: 92 10 00 19 mov %i1, %o1 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 20059ac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20059b0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 20059b4: 86 10 20 0a mov 0xa, %g3 20059b8: c6 28 80 01 stb %g3, [ %g2 + %g1 ] 20059bc: 82 00 60 01 inc %g1 20059c0: c2 26 60 20 st %g1, [ %i1 + 0x20 ] return 1; 20059c4: 81 c7 e0 08 ret 20059c8: 91 e8 20 01 restore %g0, 1, %o0 * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 20059cc: 80 a0 60 00 cmp %g1, 0 20059d0: 02 bf ff f0 be 2005990 20059d4: b0 10 20 00 clr %i0 20059d8: 90 10 00 19 mov %i1, %o0 20059dc: 7f ff fe c4 call 20054ec 20059e0: 92 10 20 00 clr %o1 20059e4: 81 c7 e0 08 ret 20059e8: 81 e8 00 00 restore echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 20059ec: 7f ff fe 38 call 20052cc <== NOT EXECUTED 20059f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 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); tty->cbuf[tty->ccount++] = c; 20059f4: 10 bf ff 9e b 200586c <== NOT EXECUTED 20059f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 20059fc: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 2005a00: 81 c7 e0 08 ret <== NOT EXECUTED 2005a04: 81 e8 00 00 restore <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 2005a08: 02 80 00 0d be 2005a3c <== NOT EXECUTED 2005a0c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED iscntrl(c) && (c != '\t') && (c != '\n')) { 2005a10: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED 2005a14: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED 2005a18: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED 2005a1c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 2005a20: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2005a24: 02 80 00 06 be 2005a3c <== NOT EXECUTED 2005a28: 80 a7 60 09 cmp %i5, 9 <== NOT EXECUTED 2005a2c: 02 80 00 04 be 2005a3c <== NOT EXECUTED 2005a30: 80 a7 60 0a cmp %i5, 0xa <== NOT EXECUTED 2005a34: 12 80 00 0d bne 2005a68 <== NOT EXECUTED 2005a38: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2005a3c: 7f ff fe 24 call 20052cc <== NOT EXECUTED 2005a40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 2005a44: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2005a48: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2005a4c: 02 bf ff d1 be 2005990 <== NOT EXECUTED 2005a50: b0 10 20 00 clr %i0 <== NOT EXECUTED echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2005a54: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 2005a58: 7f ff fe 1d call 20052cc <== NOT EXECUTED 2005a5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2005a60: 81 c7 e0 08 ret <== NOT EXECUTED 2005a64: 81 e8 00 00 restore <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2005a68: 84 18 a0 40 xor %g2, 0x40, %g2 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2005a6c: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 2005a70: c4 2f bf f9 stb %g2, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 2005a74: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 2005a78: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2005a7c: 7f ff fd c4 call 200518c <== NOT EXECUTED 2005a80: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 2005a84: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 2005a88: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 2005a8c: 10 bf ff ee b 2005a44 <== NOT EXECUTED 2005a90: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED =============================================================================== 020039dc : static bool is_node_fs_root( const rtems_filesystem_mount_table_entry_t *mt_entry, void *arg ) { return arg == mt_entry->mt_fs_root.node_access; 20039dc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED 20039e0: 82 18 40 09 xor %g1, %o1, %g1 <== NOT EXECUTED } 20039e4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 20039e8: 81 c3 e0 08 retl <== NOT EXECUTED 20039ec: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 0201bf60 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201bf60: 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() ) 201bf64: 7f ff ff 3a call 201bc4c 201bf68: 01 00 00 00 nop 201bf6c: 80 a2 00 18 cmp %o0, %i0 201bf70: 12 80 00 af bne 201c22c 201bf74: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 201bf78: 02 80 00 b3 be 201c244 201bf7c: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 201bf80: 80 a0 60 1f cmp %g1, 0x1f 201bf84: 18 80 00 b0 bgu 201c244 201bf88: 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 ) 201bf8c: 39 00 80 7e sethi %hi(0x201f800), %i4 201bf90: a1 2e 60 04 sll %i1, 4, %l0 201bf94: b8 17 22 60 or %i4, 0x260, %i4 201bf98: 84 24 00 1b sub %l0, %i3, %g2 201bf9c: 84 07 00 02 add %i4, %g2, %g2 201bfa0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 201bfa4: 80 a0 a0 01 cmp %g2, 1 201bfa8: 02 80 00 3f be 201c0a4 201bfac: 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 ) ) 201bfb0: 80 a6 60 04 cmp %i1, 4 201bfb4: 02 80 00 3e be 201c0ac 201bfb8: 80 a6 60 08 cmp %i1, 8 201bfbc: 02 80 00 3c be 201c0ac 201bfc0: 80 a6 60 0b cmp %i1, 0xb 201bfc4: 02 80 00 3a be 201c0ac 201bfc8: ba 10 20 01 mov 1, %i5 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201bfcc: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 201bfd0: fa 27 bf f8 st %i5, [ %fp + -8 ] if ( !value ) { 201bfd4: 80 a6 a0 00 cmp %i2, 0 201bfd8: 02 80 00 3b be 201c0c4 201bfdc: bb 2f 40 01 sll %i5, %g1, %i5 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 201bfe0: c2 06 80 00 ld [ %i2 ], %g1 201bfe4: 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++; 201bfe8: 03 00 80 7d sethi %hi(0x201f400), %g1 201bfec: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level> 201bff0: 84 00 a0 01 inc %g2 201bff4: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 201bff8: c2 00 60 c0 ld [ %g1 + 0xc0 ], %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; 201bffc: 03 00 80 7e sethi %hi(0x201f800), %g1 201c000: d0 00 62 0c ld [ %g1 + 0x20c ], %o0 ! 201fa0c <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201c004: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 201c008: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 201c00c: 80 af 40 01 andncc %i5, %g1, %g0 201c010: 12 80 00 16 bne 201c068 201c014: 07 00 80 7e sethi %hi(0x201f800), %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 201c018: d0 00 e3 ec ld [ %g3 + 0x3ec ], %o0 ! 201fbec <_POSIX_signals_Wait_queue> 201c01c: 86 10 e3 ec or %g3, 0x3ec, %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 ); 201c020: 86 00 e0 04 add %g3, 4, %g3 201c024: 80 a2 00 03 cmp %o0, %g3 201c028: 32 80 00 0d bne,a 201c05c 201c02c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201c030: 10 80 00 27 b 201c0cc 201c034: 03 00 80 79 sethi %hi(0x201e400), %g1 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 201c038: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 201c03c: 80 af 40 01 andncc %i5, %g1, %g0 201c040: 12 80 00 0b bne 201c06c 201c044: 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 ) { 201c048: 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 ); 201c04c: 80 a2 00 03 cmp %o0, %g3 201c050: 02 80 00 1f be 201c0cc <== ALWAYS TAKEN 201c054: 03 00 80 79 sethi %hi(0x201e400), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 201c058: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 <== NOT EXECUTED 201c05c: 80 8f 40 01 btst %i5, %g1 201c060: 02 bf ff f6 be 201c038 201c064: 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 ) ) { 201c068: 92 10 00 19 mov %i1, %o1 201c06c: 40 00 00 8d call 201c2a0 <_POSIX_signals_Unblock_thread> 201c070: 94 07 bf f4 add %fp, -12, %o2 201c074: 80 8a 20 ff btst 0xff, %o0 201c078: 12 80 00 5a bne 201c1e0 201c07c: 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 ); 201c080: 40 00 00 7f call 201c27c <_POSIX_signals_Set_process_signals> 201c084: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 201c088: b6 24 00 1b sub %l0, %i3, %i3 201c08c: c2 07 00 1b ld [ %i4 + %i3 ], %g1 201c090: 80 a0 60 02 cmp %g1, 2 201c094: 02 80 00 57 be 201c1f0 201c098: 11 00 80 7e sethi %hi(0x201f800), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 201c09c: 7f ff b7 62 call 2009e24 <_Thread_Enable_dispatch> 201c0a0: b0 10 20 00 clr %i0 return 0; } 201c0a4: 81 c7 e0 08 ret 201c0a8: 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 ); 201c0ac: 40 00 01 0f call 201c4e8 201c0b0: 01 00 00 00 nop 201c0b4: 40 00 00 d2 call 201c3fc 201c0b8: 92 10 00 19 mov %i1, %o1 201c0bc: 81 c7 e0 08 ret 201c0c0: 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; 201c0c4: 10 bf ff c9 b 201bfe8 201c0c8: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201c0cc: c8 08 63 a0 ldub [ %g1 + 0x3a0 ], %g4 201c0d0: 1b 00 80 7d sethi %hi(0x201f400), %o5 201c0d4: 88 01 20 01 inc %g4 201c0d8: 9a 13 60 30 or %o5, 0x30, %o5 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 201c0dc: 90 10 20 00 clr %o0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201c0e0: 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); 201c0e4: 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 ] ) 201c0e8: c2 03 40 00 ld [ %o5 ], %g1 201c0ec: 80 a0 60 00 cmp %g1, 0 201c0f0: 22 80 00 31 be,a 201c1b4 <== NEVER TAKEN 201c0f4: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 201c0f8: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 201c0fc: f4 10 60 10 lduh [ %g1 + 0x10 ], %i2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201c100: 80 a6 a0 00 cmp %i2, 0 201c104: 02 80 00 2b be 201c1b0 201c108: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 201c10c: 82 10 20 01 mov 1, %g1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201c110: 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 ]; 201c114: c4 06 00 02 ld [ %i0 + %g2 ], %g2 if ( !the_thread ) 201c118: 80 a0 a0 00 cmp %g2, 0 201c11c: 22 80 00 22 be,a 201c1a4 201c120: 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 ) 201c124: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 201c128: 80 a0 c0 04 cmp %g3, %g4 201c12c: 38 80 00 1e bgu,a 201c1a4 201c130: 82 00 60 01 inc %g1 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 201c134: de 00 a1 5c ld [ %g2 + 0x15c ], %o7 201c138: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7 201c13c: 80 af 40 0f andncc %i5, %o7, %g0 201c140: 22 80 00 19 be,a 201c1a4 201c144: 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 ) { 201c148: 80 a0 c0 04 cmp %g3, %g4 201c14c: 2a 80 00 14 bcs,a 201c19c 201c150: 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 ) ) { 201c154: 80 a2 20 00 cmp %o0, 0 201c158: 22 80 00 13 be,a 201c1a4 <== NEVER TAKEN 201c15c: 82 00 60 01 inc %g1 <== NOT EXECUTED 201c160: de 02 20 10 ld [ %o0 + 0x10 ], %o7 201c164: 80 a3 e0 00 cmp %o7, 0 201c168: 22 80 00 0f be,a 201c1a4 <== NEVER TAKEN 201c16c: 82 00 60 01 inc %g1 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201c170: d6 00 a0 10 ld [ %g2 + 0x10 ], %o3 201c174: 80 a2 e0 00 cmp %o3, 0 201c178: 22 80 00 09 be,a 201c19c 201c17c: 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) ) { 201c180: 80 8b c0 0a btst %o7, %o2 201c184: 32 80 00 08 bne,a 201c1a4 201c188: 82 00 60 01 inc %g1 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 201c18c: 80 8a c0 0a btst %o3, %o2 201c190: 22 80 00 05 be,a 201c1a4 201c194: 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 ) ) { 201c198: 88 10 00 03 mov %g3, %g4 201c19c: 90 10 00 02 mov %g2, %o0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201c1a0: 82 00 60 01 inc %g1 201c1a4: 80 a6 80 01 cmp %i2, %g1 201c1a8: 1a bf ff db bcc 201c114 201c1ac: 85 28 60 02 sll %g1, 2, %g2 201c1b0: 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++) { 201c1b4: 80 a3 40 0c cmp %o5, %o4 201c1b8: 32 bf ff cd bne,a 201c0ec 201c1bc: c2 03 40 00 ld [ %o5 ], %g1 } } } } if ( interested ) { 201c1c0: 80 a2 20 00 cmp %o0, 0 201c1c4: 02 bf ff af be 201c080 201c1c8: 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 ) ) { 201c1cc: 40 00 00 35 call 201c2a0 <_POSIX_signals_Unblock_thread> 201c1d0: 94 07 bf f4 add %fp, -12, %o2 201c1d4: 80 8a 20 ff btst 0xff, %o0 201c1d8: 02 bf ff aa be 201c080 <== ALWAYS TAKEN 201c1dc: 01 00 00 00 nop _Thread_Enable_dispatch(); 201c1e0: 7f ff b7 11 call 2009e24 <_Thread_Enable_dispatch> 201c1e4: b0 10 20 00 clr %i0 ! 0 return 0; 201c1e8: 81 c7 e0 08 ret 201c1ec: 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 *) 201c1f0: 7f ff ae f7 call 2007dcc <_Chain_Get> 201c1f4: 90 12 23 e0 or %o0, 0x3e0, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 201c1f8: 92 92 20 00 orcc %o0, 0, %o1 201c1fc: 02 80 00 18 be 201c25c 201c200: 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 ); 201c204: 11 00 80 7f sethi %hi(0x201fc00), %o0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 201c208: c2 22 60 08 st %g1, [ %o1 + 8 ] 201c20c: c2 07 bf f8 ld [ %fp + -8 ], %g1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201c210: 90 12 20 58 or %o0, 0x58, %o0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 201c214: c2 22 60 0c st %g1, [ %o1 + 0xc ] 201c218: c2 07 bf fc ld [ %fp + -4 ], %g1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201c21c: 90 02 00 1b add %o0, %i3, %o0 201c220: 7f ff ae d7 call 2007d7c <_Chain_Append> 201c224: c2 22 60 10 st %g1, [ %o1 + 0x10 ] 201c228: 30 bf ff 9d b,a 201c09c /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 201c22c: 7f ff d4 e9 call 20115d0 <__errno> 201c230: b0 10 3f ff mov -1, %i0 201c234: 82 10 20 03 mov 3, %g1 201c238: c2 22 00 00 st %g1, [ %o0 ] 201c23c: 81 c7 e0 08 ret 201c240: 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 ); 201c244: 7f ff d4 e3 call 20115d0 <__errno> 201c248: b0 10 3f ff mov -1, %i0 201c24c: 82 10 20 16 mov 0x16, %g1 201c250: c2 22 00 00 st %g1, [ %o0 ] 201c254: 81 c7 e0 08 ret 201c258: 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(); 201c25c: 7f ff b6 f2 call 2009e24 <_Thread_Enable_dispatch> 201c260: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 201c264: 7f ff d4 db call 20115d0 <__errno> 201c268: 01 00 00 00 nop 201c26c: 82 10 20 0b mov 0xb, %g1 ! b 201c270: c2 22 00 00 st %g1, [ %o0 ] 201c274: 81 c7 e0 08 ret 201c278: 81 e8 00 00 restore =============================================================================== 02003dd8 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 2003dd8: 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())) 2003ddc: 03 00 80 7d sethi %hi(0x201f400), %g1 2003de0: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current> 2003de4: 80 a0 60 03 cmp %g1, 3 2003de8: 02 80 00 04 be 2003df8 <== ALWAYS TAKEN 2003dec: 3b 00 80 7a sethi %hi(0x201e800), %i5 2003df0: 81 c7 e0 08 ret <== NOT EXECUTED 2003df4: 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) { 2003df8: 05 00 80 77 sethi %hi(0x201dc00), %g2 2003dfc: c2 07 63 38 ld [ %i5 + 0x338 ], %g1 2003e00: f8 00 a0 d8 ld [ %g2 + 0xd8 ], %i4 2003e04: 80 a0 40 1c cmp %g1, %i4 2003e08: 02 80 00 05 be 2003e1c 2003e0c: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 2003e10: 40 00 39 2c call 20122c0 <_wrapup_reent> 2003e14: 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; 2003e18: f8 27 63 38 st %i4, [ %i5 + 0x338 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 2003e1c: 40 00 36 3f call 2011718 2003e20: d0 07 20 04 ld [ %i4 + 4 ], %o0 fclose (stdout); 2003e24: c2 07 63 38 ld [ %i5 + 0x338 ], %g1 2003e28: 40 00 36 3c call 2011718 2003e2c: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2003e30: c2 07 63 38 ld [ %i5 + 0x338 ], %g1 2003e34: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2003e38: 40 00 36 38 call 2011718 2003e3c: 81 e8 00 00 restore =============================================================================== 02005a60 : int _STAT_NAME( const char *path, struct stat *buf ) { 2005a60: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2005a64: 80 a6 60 00 cmp %i1, 0 2005a68: 02 80 00 1b be 2005ad4 <== NEVER TAKEN 2005a6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 2005a70: 40 00 3f 7f call 201586c 2005a74: 90 10 00 18 mov %i0, %o0 2005a78: 94 10 20 00 clr %o2 2005a7c: 92 10 00 08 mov %o0, %o1 2005a80: 96 07 bf ec add %fp, -20, %o3 2005a84: 90 10 00 18 mov %i0, %o0 2005a88: 98 10 20 00 clr %o4 2005a8c: 7f ff fd 91 call 20050d0 2005a90: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2005a94: 80 a2 20 00 cmp %o0, 0 2005a98: 12 80 00 0d bne 2005acc 2005a9c: 92 10 20 00 clr %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 2005aa0: 94 10 20 48 mov 0x48, %o2 2005aa4: 40 00 3c 0f call 2014ae0 2005aa8: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 2005aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005ab0: 92 10 00 19 mov %i1, %o1 2005ab4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2005ab8: 9f c0 40 00 call %g1 2005abc: 90 07 bf ec add %fp, -20, %o0 2005ac0: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &loc ); 2005ac4: 7f ff fe 2b call 2005370 2005ac8: 90 07 bf ec add %fp, -20, %o0 return status; } 2005acc: 81 c7 e0 08 ret 2005ad0: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 2005ad4: 40 00 39 6b call 2014080 <__errno> <== NOT EXECUTED 2005ad8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2005adc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2005ae0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2005ae4: 81 c7 e0 08 ret <== NOT EXECUTED 2005ae8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020037c0 : #include "malloc_p.h" void *malloc( size_t size ) { 20037c0: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 20037c4: 03 00 80 7c sethi %hi(0x201f000), %g1 20037c8: 82 10 63 10 or %g1, 0x310, %g1 ! 201f310 20037cc: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 20037d0: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 20037d4: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 20037d8: 7f ff ff a8 call 2003678 20037dc: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 20037e0: 80 a7 60 00 cmp %i5, 0 20037e4: 02 80 00 1e be 200385c 20037e8: 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()) && 20037ec: 03 00 80 7d sethi %hi(0x201f400), %g1 20037f0: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current> 20037f4: 80 a0 60 03 cmp %g1, 3 20037f8: 02 80 00 1b be 2003864 20037fc: 03 00 80 7a sethi %hi(0x201e800), %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 ); 2003800: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201e844 2003804: 92 10 00 1d mov %i5, %o1 2003808: 94 10 20 00 clr %o2 200380c: 40 00 16 41 call 2009110 <_Protected_heap_Allocate_aligned_with_boundary> 2003810: 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 ) { 2003814: b0 92 20 00 orcc %o0, 0, %i0 2003818: 02 80 00 21 be 200389c <== NEVER TAKEN 200381c: 03 00 80 7c sethi %hi(0x201f000), %g1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003820: 03 00 80 7c sethi %hi(0x201f000), %g1 2003824: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 ! 201f05c 2003828: 80 a0 60 00 cmp %g1, 0 200382c: 02 80 00 04 be 200383c 2003830: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003834: 9f c0 40 00 call %g1 2003838: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200383c: 03 00 80 7c sethi %hi(0x201f000), %g1 2003840: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 201f064 2003844: 80 a0 60 00 cmp %g1, 0 2003848: 02 80 00 25 be 20038dc 200384c: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003850: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003854: 9f c0 40 00 call %g1 2003858: 90 10 00 18 mov %i0, %o0 return return_this; } 200385c: 81 c7 e0 08 ret 2003860: 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() ) 2003864: 7f ff ff 73 call 2003630 2003868: 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()) && 200386c: 80 8a 20 ff btst 0xff, %o0 2003870: 02 bf ff fb be 200385c <== NEVER TAKEN 2003874: 03 00 80 7a sethi %hi(0x201e800), %g1 2003878: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201e844 200387c: 92 10 00 1d mov %i5, %o1 2003880: 94 10 20 00 clr %o2 2003884: 40 00 16 23 call 2009110 <_Protected_heap_Allocate_aligned_with_boundary> 2003888: 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 ) { 200388c: b0 92 20 00 orcc %o0, 0, %i0 2003890: 12 bf ff e5 bne 2003824 2003894: 03 00 80 7c sethi %hi(0x201f000), %g1 if (rtems_malloc_sbrk_helpers) 2003898: 03 00 80 7c sethi %hi(0x201f000), %g1 200389c: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f060 20038a0: 80 a0 60 00 cmp %g1, 0 20038a4: 02 80 00 0a be 20038cc 20038a8: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 20038ac: c2 00 60 04 ld [ %g1 + 4 ], %g1 20038b0: 9f c0 40 00 call %g1 20038b4: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 20038b8: 80 a2 20 00 cmp %o0, 0 20038bc: 02 80 00 04 be 20038cc 20038c0: 01 00 00 00 nop 20038c4: 10 bf ff d7 b 2003820 20038c8: b0 10 00 08 mov %o0, %i0 errno = ENOMEM; 20038cc: 40 00 37 41 call 20115d0 <__errno> 20038d0: 01 00 00 00 nop 20038d4: 82 10 20 0c mov 0xc, %g1 ! c 20038d8: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 20038dc: 81 c7 e0 08 ret 20038e0: 81 e8 00 00 restore =============================================================================== 020038ac : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 20038ac: 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; 20038b0: 03 00 80 7d sethi %hi(0x201f400), %g1 20038b4: fa 00 63 38 ld [ %g1 + 0x338 ], %i5 ! 201f738 if ( sbrk_amount == 0 ) 20038b8: 80 a7 60 00 cmp %i5, 0 20038bc: 02 80 00 20 be 200393c <== NEVER TAKEN 20038c0: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 20038c4: 92 10 00 1d mov %i5, %o1 20038c8: 40 00 5b a5 call 201a75c <.udiv> 20038cc: 90 06 00 1d add %i0, %i5, %o0 20038d0: 40 00 5b 69 call 201a674 <.umul> 20038d4: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 20038d8: 7f ff f6 d3 call 2001424 20038dc: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 20038e0: 80 a2 3f ff cmp %o0, -1 20038e4: 02 80 00 16 be 200393c 20038e8: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 20038ec: 39 00 80 7a sethi %hi(0x201e800), %i4 20038f0: d0 07 22 d4 ld [ %i4 + 0x2d4 ], %o0 ! 201ead4 20038f4: 40 00 16 01 call 20090f8 <_Protected_heap_Extend> 20038f8: 94 10 00 1d mov %i5, %o2 20038fc: 80 8a 20 ff btst 0xff, %o0 2003900: 02 80 00 09 be 2003924 2003904: 03 00 80 7d sethi %hi(0x201f400), %g1 2003908: f0 07 22 d4 ld [ %i4 + 0x2d4 ], %i0 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 200390c: c4 00 63 08 ld [ %g1 + 0x308 ], %g2 2003910: b4 10 20 00 clr %i2 2003914: ba 07 40 02 add %i5, %g2, %i5 2003918: fa 20 63 08 st %i5, [ %g1 + 0x308 ] 200391c: 40 00 15 e9 call 20090c0 <_Protected_heap_Allocate_aligned_with_boundary> 2003920: 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); 2003924: 7f ff f6 c0 call 2001424 2003928: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 200392c: 40 00 37 f9 call 2011910 <__errno> 2003930: 01 00 00 00 nop 2003934: 82 10 20 0c mov 0xc, %g1 ! c 2003938: c2 22 00 00 st %g1, [ %o0 ] MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 200393c: 81 c7 e0 08 ret 2003940: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02003944 : void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2003944: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2003948: 03 00 80 7d sethi %hi(0x201f400), %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) { 200394c: 80 a6 20 00 cmp %i0, 0 2003950: 02 80 00 04 be 2003960 2003954: f2 20 63 38 st %i1, [ %g1 + 0x338 ] } starting_address = (void *)uaddress; } return starting_address; } 2003958: 81 c7 e0 08 ret 200395c: 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); 2003960: 7f ff f6 b1 call 2001424 2003964: 90 10 00 19 mov %i1, %o0 if (uaddress == (uintptr_t) -1) { 2003968: 80 a2 3f ff cmp %o0, -1 200396c: 02 80 00 08 be 200398c <== ALWAYS TAKEN 2003970: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003974: 02 80 00 04 be 2003984 <== NOT EXECUTED 2003978: 01 00 00 00 nop <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 200397c: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003980: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 2003984: 81 c7 e0 08 ret <== NOT EXECUTED 2003988: 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 ); 200398c: 40 00 10 29 call 2007a30 2003990: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 020103fc : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 20103fc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 2010400: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2010404: d2 00 60 84 ld [ %g1 + 0x84 ], %o1 ! 201f084 <== NOT EXECUTED 2010408: 7f ff ca 97 call 2002e64 <== NOT EXECUTED 201040c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ( memory ) 2010410: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2010414: 02 80 00 05 be 2010428 <== NOT EXECUTED 2010418: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED memfile_blocks_allocated++; 201041c: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED 2010420: 84 00 a0 01 inc %g2 <== NOT EXECUTED 2010424: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED return memory; } 2010428: 81 c7 e0 08 ret <== NOT EXECUTED 201042c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02010430 : * Free a block from an in-memory file. */ void memfile_free_block( void *memory ) { 2010430: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED free(memory); 2010434: 7f ff cb af call 20032f0 <== NOT EXECUTED 2010438: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memfile_blocks_allocated--; 201043c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2010440: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <== NOT EXECUTED 2010444: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 2010448: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED } 201044c: 81 c7 e0 08 ret <== NOT EXECUTED 2010450: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f8d4 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 200f8d4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 200f8d8: 37 00 80 7c sethi %hi(0x201f000), %i3 <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NOT EXECUTED 200f8e4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 200f8e8: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED 200f8ec: b8 10 20 00 clr %i4 <== NOT EXECUTED if ( b[i] ) { 200f8f0: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED 200f8f4: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 200f8f8: 02 80 00 08 be 200f918 <== NOT EXECUTED 200f8fc: b8 07 20 01 inc %i4 <== NOT EXECUTED */ void memfile_free_block( void *memory ) { free(memory); 200f900: 7f ff ce 7c call 20032f0 <== NOT EXECUTED 200f904: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated--; 200f908: c2 06 e1 94 ld [ %i3 + 0x194 ], %g1 <== NOT EXECUTED 200f90c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200f910: c2 26 e1 94 st %g1, [ %i3 + 0x194 ] <== NOT EXECUTED b = *block_table; for ( i=0 ; i<== NOT EXECUTED 200f920: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED 200f924: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED */ void memfile_free_block( void *memory ) { free(memory); 200f928: 7f ff ce 72 call 20032f0 <== NOT EXECUTED 200f92c: 01 00 00 00 nop <== NOT EXECUTED memfile_blocks_allocated--; 200f930: c2 06 e1 94 ld [ %i3 + 0x194 ], %g1 <== NOT EXECUTED 200f934: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200f938: c2 26 e1 94 st %g1, [ %i3 + 0x194 ] <== NOT EXECUTED /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; 200f93c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED } 200f940: 81 c7 e0 08 ret <== NOT EXECUTED 200f944: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f5f0 : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200f5f0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200f5f4: fa 06 20 1c ld [ %i0 + 0x1c ], %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 ) 200f5f8: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200f5fc: 80 a0 40 19 cmp %g1, %i1 200f600: 06 80 00 13 bl 200f64c <== NEVER TAKEN 200f604: 03 00 80 7c sethi %hi(0x201f000), %g1 200f608: 22 80 00 0d be,a 200f63c 200f60c: 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; 200f610: f2 27 60 50 st %i1, [ %i5 + 0x50 ] 200f614: f4 27 60 54 st %i2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200f618: f2 26 20 08 st %i1, [ %i0 + 8 ] 200f61c: f4 26 20 0c st %i2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200f620: 90 07 bf f8 add %fp, -8, %o0 200f624: 7f ff cf 5d call 2003398 200f628: 92 10 20 00 clr %o1 200f62c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f630: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200f634: 81 c7 e0 08 ret 200f638: 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 ) 200f63c: 80 a0 40 1a cmp %g1, %i2 200f640: 3a bf ff f5 bcc,a 200f614 200f644: f2 27 60 50 st %i1, [ %i5 + 0x50 ] IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f648: 03 00 80 7c sethi %hi(0x201f000), %g1 200f64c: f6 00 60 84 ld [ %g1 + 0x84 ], %i3 ! 201f084 200f650: b9 36 e0 02 srl %i3, 2, %i4 200f654: 92 10 00 1c mov %i4, %o1 200f658: 40 00 2b 37 call 201a334 <.umul> 200f65c: 90 07 20 01 add %i4, 1, %o0 200f660: 92 10 00 1c mov %i4, %o1 200f664: 40 00 2b 34 call 201a334 <.umul> 200f668: 90 02 20 01 inc %o0 200f66c: 92 10 00 1b mov %i3, %o1 200f670: 40 00 2b 31 call 201a334 <.umul> 200f674: 90 02 3f ff add %o0, -1, %o0 200f678: 82 10 20 00 clr %g1 200f67c: 80 a0 40 19 cmp %g1, %i1 200f680: 04 80 00 08 ble 200f6a0 <== ALWAYS TAKEN 200f684: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 200f688: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200f68c: 92 10 00 19 mov %i1, %o1 200f690: 7f ff fe ee call 200f248 200f694: 94 10 00 1a mov %i2, %o2 * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 200f698: 81 c7 e0 08 ret 200f69c: 91 e8 00 08 restore %g0, %o0, %o0 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f6a0: 12 80 00 04 bne 200f6b0 <== NEVER TAKEN 200f6a4: 80 a2 00 1a cmp %o0, %i2 200f6a8: 18 bf ff f9 bgu 200f68c <== ALWAYS TAKEN 200f6ac: 90 10 00 1d mov %i5, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 200f6b0: 40 00 07 c8 call 20115d0 <__errno> <== NOT EXECUTED 200f6b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f6b8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200f6bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f6c0: 81 c7 e0 08 ret <== NOT EXECUTED 200f6c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f4b0 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 200f4b0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200f4b4: f6 06 20 1c ld [ %i0 + 0x1c ], %i3 if (the_jnode->type == IMFS_LINEAR_FILE) { 200f4b8: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1 200f4bc: 80 a0 60 06 cmp %g1, 6 200f4c0: 02 80 00 25 be 200f554 200f4c4: 03 00 80 7c sethi %hi(0x201f000), %g1 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f4c8: f2 00 60 84 ld [ %g1 + 0x84 ], %i1 ! 201f084 if (the_jnode->type == IMFS_LINEAR_FILE) { 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 )) 200f4cc: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f4d0: b5 36 60 02 srl %i1, 2, %i2 200f4d4: 92 10 00 1a mov %i2, %o1 200f4d8: 40 00 2b 97 call 201a334 <.umul> 200f4dc: 90 06 a0 01 add %i2, 1, %o0 200f4e0: 92 10 00 1a mov %i2, %o1 200f4e4: 40 00 2b 94 call 201a334 <.umul> 200f4e8: 90 02 20 01 inc %o0 200f4ec: 92 10 00 19 mov %i1, %o1 200f4f0: 40 00 2b 91 call 201a334 <.umul> 200f4f4: 90 02 3f ff add %o0, -1, %o0 200f4f8: 82 10 20 00 clr %g1 200f4fc: 80 a0 40 1c cmp %g1, %i4 200f500: 04 80 00 2d ble 200f5b4 200f504: 01 00 00 00 nop 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 ) 200f508: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1 200f50c: 80 a7 00 01 cmp %i4, %g1 200f510: 04 80 00 23 ble 200f59c <== ALWAYS TAKEN 200f514: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2 200f518: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200f51c: 92 10 00 1c mov %i4, %o1 200f520: 7f ff ff 4a call 200f248 200f524: 94 10 00 1d mov %i5, %o2 if (the_jnode->type == IMFS_LINEAR_FILE) { 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 )) 200f528: 80 a2 20 00 cmp %o0, 0 200f52c: 12 80 00 2a bne 200f5d4 200f530: 01 00 00 00 nop 200f534: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1 200f538: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2 200f53c: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 200f540: c2 26 20 08 st %g1, [ %i0 + 8 ] 200f544: c4 26 20 0c st %g2, [ %i0 + 0xc ] } return iop->offset; } 200f548: b0 10 00 1c mov %i4, %i0 200f54c: 81 c7 e0 08 ret 200f550: 93 e8 00 1d restore %g0, %i5, %o1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 200f554: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4 200f558: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1 200f55c: 80 a7 00 01 cmp %i4, %g1 200f560: 14 80 00 08 bg 200f580 <== NEVER TAKEN 200f564: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2 200f568: 80 a7 00 01 cmp %i4, %g1 200f56c: 32 bf ff f8 bne,a 200f54c <== NEVER TAKEN 200f570: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED 200f574: 80 a7 40 02 cmp %i5, %g2 200f578: 28 bf ff f5 bleu,a 200f54c <== ALWAYS TAKEN 200f57c: b0 10 00 1c mov %i4, %i0 iop->offset = the_jnode->info.linearfile.size; 200f580: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200f584: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED 200f588: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED 200f58c: ba 10 00 02 mov %g2, %i5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 200f590: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED 200f594: 81 c7 e0 08 ret <== NOT EXECUTED 200f598: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED 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 ) 200f59c: 12 bf ff e9 bne 200f540 200f5a0: 80 a7 40 02 cmp %i5, %g2 200f5a4: 18 bf ff de bgu 200f51c 200f5a8: 90 10 00 1b mov %i3, %o0 } 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 ); iop->size = the_jnode->info.file.size; 200f5ac: 10 bf ff e6 b 200f544 200f5b0: c2 26 20 08 st %g1, [ %i0 + 8 ] IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f5b4: 12 80 00 04 bne 200f5c4 <== NEVER TAKEN 200f5b8: 80 a2 00 1d cmp %o0, %i5 200f5bc: 38 bf ff d4 bgu,a 200f50c 200f5c0: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 200f5c4: 40 00 08 03 call 20115d0 <__errno> 200f5c8: 01 00 00 00 nop 200f5cc: 82 10 20 16 mov 0x16, %g1 ! 16 200f5d0: c2 22 00 00 st %g1, [ %o0 ] 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 ); 200f5d4: 40 00 07 ff call 20115d0 <__errno> 200f5d8: 39 3f ff ff sethi %hi(0xfffffc00), %i4 200f5dc: 82 10 20 1c mov 0x1c, %g1 200f5e0: b8 17 23 ff or %i4, 0x3ff, %i4 200f5e4: c2 22 00 00 st %g1, [ %o0 ] 200f5e8: 10 bf ff d8 b 200f548 200f5ec: ba 10 00 1c mov %i4, %i5 =============================================================================== 020102b8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 20102b8: 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)) 20102bc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 20102c0: 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)) 20102c4: 80 88 62 04 btst 0x204, %g1 20102c8: 02 80 00 06 be 20102e0 20102cc: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 && (the_jnode->type == IMFS_LINEAR_FILE)) { 20102d0: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 20102d4: 80 a0 a0 06 cmp %g2, 6 20102d8: 22 80 00 0c be,a 2010308 <== NEVER TAKEN 20102dc: 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)) 20102e0: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 20102e4: 80 88 62 00 btst 0x200, %g1 20102e8: 22 80 00 05 be,a 20102fc 20102ec: c4 3f 60 08 std %g2, [ %i5 + 8 ] iop->offset = the_jnode->info.file.size; 20102f0: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] 20102f4: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 20102f8: c4 3f 60 08 std %g2, [ %i5 + 8 ] return 0; 20102fc: b0 10 20 00 clr %i0 } 2010300: 81 c7 e0 08 ret 2010304: 81 e8 00 00 restore * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 2010308: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 201030c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 2010310: c0 27 20 50 clr [ %i4 + 0x50 ] <== NOT EXECUTED 2010314: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 2010318: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 201031c: c0 27 20 58 clr [ %i4 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 2010320: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 2010324: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 2010328: 12 80 00 06 bne 2010340 <== NOT EXECUTED 201032c: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED 2010330: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 2010334: 84 10 20 00 clr %g2 <== NOT EXECUTED 2010338: 10 bf ff eb b 20102e4 <== NOT EXECUTED 201033c: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 2010340: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2010344: 92 10 20 00 clr %o1 <== NOT EXECUTED 2010348: 94 10 20 00 clr %o2 <== NOT EXECUTED 201034c: 7f ff ff 1f call 200ffc8 <== NOT EXECUTED 2010350: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2010354: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2010358: 02 bf ff ea be 2010300 <== NOT EXECUTED 201035c: 01 00 00 00 nop <== NOT EXECUTED 2010360: 10 bf ff e0 b 20102e0 <== NOT EXECUTED 2010364: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED =============================================================================== 02003900 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2003900: 9d e3 bf 80 save %sp, -128, %sp int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2003904: 05 00 00 10 sethi %hi(0x4000), %g2 2003908: 03 00 00 3c sethi %hi(0xf000), %g1 200390c: 82 0e 40 01 and %i1, %g1, %g1 2003910: 80 a0 40 02 cmp %g1, %g2 2003914: 02 80 00 18 be 2003974 2003918: 90 10 00 18 mov %i0, %o0 200391c: 08 80 00 0f bleu 2003958 2003920: 05 00 00 04 sethi %hi(0x1000), %g2 2003924: 05 00 00 18 sethi %hi(0x6000), %g2 2003928: 80 a0 40 02 cmp %g1, %g2 200392c: 02 80 00 12 be 2003974 2003930: 05 00 00 20 sethi %hi(0x8000), %g2 2003934: 80 a0 40 02 cmp %g1, %g2 2003938: 02 80 00 10 be 2003978 <== ALWAYS TAKEN 200393c: 92 07 bf f8 add %fp, -8, %o1 case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2003940: 40 00 37 24 call 20115d0 <__errno> 2003944: b0 10 3f ff mov -1, %i0 2003948: 82 10 20 16 mov 0x16, %g1 200394c: c2 22 00 00 st %g1, [ %o0 ] 2003950: 81 c7 e0 08 ret 2003954: 81 e8 00 00 restore int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2003958: 80 a0 40 02 cmp %g1, %g2 200395c: 02 80 00 05 be 2003970 2003960: 05 00 00 08 sethi %hi(0x2000), %g2 2003964: 80 a0 40 02 cmp %g1, %g2 2003968: 12 bf ff f6 bne 2003940 200396c: 01 00 00 00 nop break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 2003970: 90 10 00 18 mov %i0, %o0 2003974: 92 07 bf f8 add %fp, -8, %o1 2003978: 40 00 02 fe call 2004570 200397c: 94 07 bf e4 add %fp, -28, %o2 result = (*temp_loc.ops->evalformake_h)( 2003980: c2 07 bf f0 ld [ %fp + -16 ], %g1 2003984: d0 07 bf f8 ld [ %fp + -8 ], %o0 2003988: c2 00 60 04 ld [ %g1 + 4 ], %g1 200398c: 90 06 00 08 add %i0, %o0, %o0 2003990: 92 07 bf e4 add %fp, -28, %o1 2003994: 94 07 bf fc add %fp, -4, %o2 2003998: 9f c0 40 00 call %g1 200399c: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 20039a0: 80 a2 20 00 cmp %o0, 0 20039a4: 12 bf ff eb bne 2003950 20039a8: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 20039ac: d0 07 bf fc ld [ %fp + -4 ], %o0 20039b0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20039b4: 92 10 00 19 mov %i1, %o1 20039b8: 94 10 00 1a mov %i2, %o2 20039bc: 96 10 00 1b mov %i3, %o3 20039c0: 9f c0 40 00 call %g1 20039c4: 98 07 bf e4 add %fp, -28, %o4 20039c8: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &temp_loc ); 20039cc: 7f ff fe 42 call 20032d4 20039d0: 90 07 bf e4 add %fp, -28, %o0 return result; } 20039d4: 81 c7 e0 08 ret 20039d8: 81 e8 00 00 restore =============================================================================== 020039f0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 20039f0: 9d e3 bf 88 save %sp, -120, %sp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 20039f4: 80 a6 e0 01 cmp %i3, 1 20039f8: 18 80 00 85 bgu 2003c0c 20039fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2003a00: 40 00 26 51 call 200d344 2003a04: 90 10 00 1a mov %i2, %o0 if ( !mount_h ) 2003a08: a2 92 20 00 orcc %o0, 0, %l1 2003a0c: 02 80 00 80 be 2003c0c 2003a10: 80 a0 00 19 cmp %g0, %i1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2003a14: a0 40 20 00 addx %g0, 0, %l0 2003a18: 80 a4 20 00 cmp %l0, 0 2003a1c: 02 80 00 77 be 2003bf8 2003a20: 90 10 00 19 mov %i1, %o0 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 2003a24: 40 00 3c 83 call 2012c30 2003a28: ae 10 00 19 mov %i1, %l7 2003a2c: ac 10 00 08 mov %o0, %l6 2003a30: a8 02 20 01 add %o0, 1, %l4 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; 2003a34: 40 00 3c 7f call 2012c30 2003a38: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003a3c: a4 10 20 00 clr %l2 2003a40: 80 a6 20 00 cmp %i0, 0 2003a44: 02 80 00 05 be 2003a58 2003a48: aa 10 00 08 mov %o0, %l5 2003a4c: 40 00 3c 79 call 2012c30 2003a50: 90 10 00 18 mov %i0, %o0 2003a54: a4 02 20 01 add %o0, 1, %l2 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 2003a58: 92 05 40 14 add %l5, %l4, %o1 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003a5c: 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; 2003a60: 92 02 60 75 add %o1, 0x75, %o1 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003a64: 7f ff fd 00 call 2002e64 2003a68: 92 02 40 12 add %o1, %l2, %o1 if ( mt_entry != NULL ) { 2003a6c: ba 92 20 00 orcc %o0, 0, %i5 2003a70: 02 80 00 5c be 2003be0 <== NEVER TAKEN 2003a74: a6 07 60 74 add %i5, 0x74, %l3 char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 2003a78: 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; 2003a7c: aa 05 60 01 inc %l5 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 2003a80: 90 10 00 13 mov %l3, %o0 2003a84: 40 00 39 2f call 2011f40 2003a88: 94 10 00 15 mov %l5, %o2 mt_entry->type = str; str += filesystemtype_size; 2003a8c: b4 04 c0 15 add %l3, %l5, %i2 memcpy( str, source_or_null, source_size ); 2003a90: 94 10 00 12 mov %l2, %o2 2003a94: 92 10 00 18 mov %i0, %o1 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 2003a98: e6 27 60 6c st %l3, [ %i5 + 0x6c ] str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 2003a9c: 40 00 39 29 call 2011f40 2003aa0: 90 10 00 1a mov %i2, %o0 mt_entry->dev = str; str += source_size; 2003aa4: a4 06 80 12 add %i2, %l2, %l2 memcpy( str, target, target_size ); 2003aa8: 92 10 00 17 mov %l7, %o1 2003aac: 94 10 00 14 mov %l4, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003ab0: f4 27 60 70 st %i2, [ %i5 + 0x70 ] str += source_size; memcpy( str, target, target_size ); 2003ab4: 40 00 39 23 call 2011f40 2003ab8: 90 10 00 12 mov %l2, %o0 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003abc: 90 07 60 38 add %i5, 0x38, %o0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2003ac0: e4 27 60 68 st %l2, [ %i5 + 0x68 ] &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 2003ac4: fa 27 60 2c st %i5, [ %i5 + 0x2c ] mt_entry->options = options; 2003ac8: f6 27 60 30 st %i3, [ %i5 + 0x30 ] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003acc: 94 10 20 30 mov 0x30, %o2 2003ad0: 13 00 80 74 sethi %hi(0x201d000), %o1 2003ad4: 40 00 39 1b call 2011f40 2003ad8: 92 12 63 28 or %o1, 0x328, %o1 ! 201d328 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2003adc: 80 a4 20 00 cmp %l0, 0 2003ae0: 12 80 00 11 bne 2003b24 2003ae4: 37 00 80 7a sethi %hi(0x201e800), %i3 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2003ae8: c4 06 e1 50 ld [ %i3 + 0x150 ], %g2 ! 201e950 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2003aec: 82 16 e1 50 or %i3, 0x150, %g1 2003af0: 82 00 60 04 add %g1, 4, %g1 2003af4: 80 a0 80 01 cmp %g2, %g1 2003af8: 02 80 00 26 be 2003b90 <== ALWAYS TAKEN 2003afc: b4 10 20 00 clr %i2 errno = EINVAL; 2003b00: 40 00 36 b4 call 20115d0 <__errno> <== NOT EXECUTED 2003b04: 01 00 00 00 nop <== NOT EXECUTED 2003b08: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003b0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2003b10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2003b14: 7f ff fd f7 call 20032f0 <== NOT EXECUTED 2003b18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003b1c: 81 c7 e0 08 ret 2003b20: 81 e8 00 00 restore * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 2003b24: 90 10 00 19 mov %i1, %o0 2003b28: 92 10 00 16 mov %l6, %o1 2003b2c: 94 10 20 07 mov 7, %o2 2003b30: 96 07 bf ec add %fp, -20, %o3 2003b34: 7f ff fd 9a call 200319c 2003b38: 98 10 20 01 mov 1, %o4 2003b3c: 80 a2 3f ff cmp %o0, -1 2003b40: 02 bf ff f4 be 2003b10 <== NEVER TAKEN 2003b44: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2003b48: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2003b4c: 9f c0 40 00 call %g1 2003b50: 90 07 bf ec add %fp, -20, %o0 2003b54: 80 a2 20 01 cmp %o0, 1 2003b58: 02 80 00 4d be 2003c8c 2003b5c: 33 00 80 7c sethi %hi(0x201f000), %i1 errno = ENOTDIR; 2003b60: 40 00 36 9c call 20115d0 <__errno> 2003b64: 01 00 00 00 nop 2003b68: 82 10 20 14 mov 0x14, %g1 ! 14 2003b6c: c2 22 00 00 st %g1, [ %o0 ] return 0; cleanup_and_bail: free( mt_entry ); 2003b70: 7f ff fd e0 call 20032f0 2003b74: 90 10 00 1d mov %i5, %o0 if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 2003b78: b4 07 bf ec add %fp, -20, %i2 free( mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 2003b7c: b0 10 3f ff mov -1, %i0 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 2003b80: 7f ff fd d5 call 20032d4 2003b84: 90 10 00 1a mov %i2, %o0 return -1; } 2003b88: 81 c7 e0 08 ret 2003b8c: 81 e8 00 00 restore * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 2003b90: 90 10 00 1d mov %i5, %o0 2003b94: 9f c4 40 00 call %l1 2003b98: 92 10 00 1c mov %i4, %o1 2003b9c: 80 a2 20 00 cmp %o0, 0 2003ba0: 22 80 00 21 be,a 2003c24 2003ba4: 39 00 80 7c sethi %hi(0x201f000), %i4 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 2003ba8: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003bac: 90 10 00 1d mov %i5, %o0 2003bb0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2003bb4: 9f c0 40 00 call %g1 2003bb8: b0 10 3f ff mov -1, %i0 return 0; cleanup_and_bail: free( mt_entry ); 2003bbc: 7f ff fd cd call 20032f0 2003bc0: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 2003bc4: 80 a6 a0 00 cmp %i2, 0 2003bc8: 02 bf ff d5 be 2003b1c <== NEVER TAKEN 2003bcc: 90 10 00 1a mov %i2, %o0 rtems_filesystem_freenode( loc_to_free ); 2003bd0: 7f ff fd c1 call 20032d4 2003bd4: b0 10 3f ff mov -1, %i0 return -1; } 2003bd8: 81 c7 e0 08 ret 2003bdc: 81 e8 00 00 restore target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 2003be0: 40 00 36 7c call 20115d0 <__errno> <== NOT EXECUTED 2003be4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003be8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2003bec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003bf0: 81 c7 e0 08 ret <== NOT EXECUTED 2003bf4: 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 : "/"; 2003bf8: 2f 00 80 73 sethi %hi(0x201cc00), %l7 2003bfc: a8 10 20 02 mov 2, %l4 2003c00: ac 10 20 01 mov 1, %l6 2003c04: 10 bf ff 8c b 2003a34 2003c08: ae 15 e1 f8 or %l7, 0x1f8, %l7 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 2003c0c: 40 00 36 71 call 20115d0 <__errno> 2003c10: b0 10 3f ff mov -1, %i0 2003c14: 82 10 20 16 mov 0x16, %g1 2003c18: c2 22 00 00 st %g1, [ %o0 ] 2003c1c: 81 c7 e0 08 ret 2003c20: 81 e8 00 00 restore rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2003c24: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 2003c28: 94 10 20 00 clr %o2 2003c2c: 40 00 0d a5 call 20072c0 2003c30: 92 10 20 00 clr %o1 2003c34: 90 16 e1 50 or %i3, 0x150, %o0 2003c38: 40 00 10 51 call 2007d7c <_Chain_Append> 2003c3c: 92 10 00 1d mov %i5, %o1 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003c40: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 2003c44: 40 00 0d e9 call 20073e8 2003c48: b0 10 20 00 clr %i0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2003c4c: 80 a4 20 00 cmp %l0, 0 2003c50: 12 bf ff b3 bne 2003b1c 2003c54: 03 00 80 7a sethi %hi(0x201e800), %g1 rtems_filesystem_root = mt_entry->mt_fs_root; 2003c58: f6 07 60 1c ld [ %i5 + 0x1c ], %i3 2003c5c: f8 07 60 20 ld [ %i5 + 0x20 ], %i4 2003c60: c8 07 60 24 ld [ %i5 + 0x24 ], %g4 2003c64: c6 07 60 28 ld [ %i5 + 0x28 ], %g3 2003c68: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 2003c6c: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 2003c70: f6 20 60 18 st %i3, [ %g1 + 0x18 ] 2003c74: f8 20 60 1c st %i4, [ %g1 + 0x1c ] 2003c78: c8 20 60 20 st %g4, [ %g1 + 0x20 ] 2003c7c: c6 20 60 24 st %g3, [ %g1 + 0x24 ] 2003c80: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 2003c84: 81 c7 e0 08 ret 2003c88: 81 e8 00 00 restore rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2003c8c: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2003c90: f4 07 bf ec ld [ %fp + -20 ], %i2 2003c94: 92 10 20 00 clr %o1 2003c98: 40 00 0d 8a call 20072c0 2003c9c: 94 10 20 00 clr %o2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2003ca0: 37 00 80 7a sethi %hi(0x201e800), %i3 2003ca4: c2 06 e1 50 ld [ %i3 + 0x150 ], %g1 ! 201e950 2003ca8: 86 16 e1 50 or %i3, 0x150, %g3 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 2003cac: 86 00 e0 04 add %g3, 4, %g3 2003cb0: 80 a0 40 03 cmp %g1, %g3 2003cb4: 32 80 00 06 bne,a 2003ccc <== ALWAYS TAKEN 2003cb8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 2003cbc: 30 80 00 26 b,a 2003d54 <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 2003cc0: 12 80 00 1e bne 2003d38 <== NEVER TAKEN 2003cc4: 01 00 00 00 nop static bool is_node_fs_root( const rtems_filesystem_mount_table_entry_t *mt_entry, void *arg ) { return arg == mt_entry->mt_fs_root.node_access; 2003cc8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 2003ccc: c2 00 40 00 ld [ %g1 ], %g1 2003cd0: 84 1e 80 02 xor %i2, %g2, %g2 2003cd4: 80 a0 00 02 cmp %g0, %g2 2003cd8: b0 60 3f ff subx %g0, -1, %i0 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 2003cdc: 80 a0 40 03 cmp %g1, %g3 2003ce0: 12 bf ff f8 bne 2003cc0 2003ce4: 80 8e 20 ff btst 0xff, %i0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003ce8: 40 00 0d c0 call 20073e8 2003cec: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2003cf0: 80 8e 20 ff btst 0xff, %i0 2003cf4: 12 80 00 13 bne 2003d40 2003cf8: c4 07 bf f8 ld [ %fp + -8 ], %g2 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 2003cfc: c6 07 bf ec ld [ %fp + -20 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 2003d00: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 2003d04: c6 27 60 08 st %g3, [ %i5 + 8 ] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2003d08: c4 27 60 14 st %g2, [ %i5 + 0x14 ] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 2003d0c: c6 07 bf f4 ld [ %fp + -12 ], %g3 mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2003d10: c4 07 bf fc ld [ %fp + -4 ], %g2 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 2003d14: c6 27 60 10 st %g3, [ %i5 + 0x10 ] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2003d18: c4 27 60 18 st %g2, [ %i5 + 0x18 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 2003d1c: 90 10 00 1d mov %i5, %o0 2003d20: 9f c0 40 00 call %g1 2003d24: b4 07 bf ec add %fp, -20, %i2 2003d28: 80 a2 20 00 cmp %o0, 0 2003d2c: 02 bf ff 9a be 2003b94 <== ALWAYS TAKEN 2003d30: 90 10 00 1d mov %i5, %o0 2003d34: 30 bf ff 8f b,a 2003b70 <== NOT EXECUTED 2003d38: 40 00 0d ac call 20073e8 <== NOT EXECUTED 2003d3c: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 2003d40: 40 00 36 24 call 20115d0 <__errno> 2003d44: 01 00 00 00 nop 2003d48: 82 10 20 10 mov 0x10, %g1 ! 10 goto cleanup_and_bail; 2003d4c: 10 bf ff 89 b 2003b70 2003d50: c2 22 00 00 st %g1, [ %o0 ] 2003d54: 40 00 0d a5 call 20073e8 <== NOT EXECUTED 2003d58: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 <== NOT EXECUTED * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2003d5c: 10 bf ff e8 b 2003cfc <== NOT EXECUTED 2003d60: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED =============================================================================== 02003f94 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003f94: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 2003f98: 90 96 60 00 orcc %i1, 0, %o0 2003f9c: 02 80 00 0b be 2003fc8 2003fa0: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2003fa4: 40 00 02 f4 call 2004b74 2003fa8: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 2003fac: 82 92 20 00 orcc %o0, 0, %g1 2003fb0: 02 80 00 04 be 2003fc0 <== ALWAYS TAKEN 2003fb4: 01 00 00 00 nop } else { errno = EINVAL; } return rv; } 2003fb8: 81 c7 e0 08 ret 2003fbc: 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( 2003fc0: 40 00 00 0d call 2003ff4 2003fc4: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 2003fc8: 40 00 36 15 call 201181c <__errno> 2003fcc: 01 00 00 00 nop 2003fd0: 84 10 20 16 mov 0x16, %g2 ! 16 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2003fd4: 82 10 3f ff mov -1, %g1 options, data ); } } else { errno = EINVAL; 2003fd8: 10 bf ff f8 b 2003fb8 2003fdc: c4 22 00 00 st %g2, [ %o0 ] =============================================================================== 0200c560 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 200c560: 9d e3 bf 90 save %sp, -112, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200c564: 03 00 80 b2 sethi %hi(0x202c800), %g1 200c568: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 202cb60 <_Thread_Dispatch_disable_level> Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 200c56c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 200c570: 84 00 a0 01 inc %g2 200c574: c4 20 63 60 st %g2, [ %g1 + 0x360 ] return _Thread_Dispatch_disable_level; 200c578: c2 00 63 60 ld [ %g1 + 0x360 ], %g1 200c57c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 200c580: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 200c584: fa 27 a0 58 st %i5, [ %fp + 0x58 ] POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 200c588: a0 8e 62 00 andcc %i1, 0x200, %l0 200c58c: 12 80 00 34 bne 200c65c 200c590: 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 *) 200c594: 39 00 80 b4 sethi %hi(0x202d000), %i4 200c598: 40 00 0c e2 call 200f920 <_Objects_Allocate> 200c59c: 90 17 20 2c or %i4, 0x2c, %o0 ! 202d02c <_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 ) { 200c5a0: ba 92 20 00 orcc %o0, 0, %i5 200c5a4: 02 80 00 37 be 200c680 <== NEVER TAKEN 200c5a8: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 200c5ac: f2 27 60 14 st %i1, [ %i5 + 0x14 ] status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 200c5b0: 90 10 00 18 mov %i0, %o0 200c5b4: 40 00 21 a9 call 2014c58 <_POSIX_Message_queue_Name_to_id> 200c5b8: 92 07 bf f4 add %fp, -12, %o1 * 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 ) { 200c5bc: b6 92 20 00 orcc %o0, 0, %i3 200c5c0: 22 80 00 0f be,a 200c5fc 200c5c4: 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) ) ) { 200c5c8: 80 a6 e0 02 cmp %i3, 2 200c5cc: 02 80 00 40 be 200c6cc 200c5d0: 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 ); 200c5d4: 90 17 20 2c or %i4, 0x2c, %o0 200c5d8: 40 00 0d bc call 200fcc8 <_Objects_Free> 200c5dc: 92 10 00 1d mov %i5, %o1 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 200c5e0: 40 00 12 1c call 2010e50 <_Thread_Enable_dispatch> 200c5e4: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 200c5e8: 40 00 32 81 call 2018fec <__errno> 200c5ec: 01 00 00 00 nop 200c5f0: f6 22 00 00 st %i3, [ %o0 ] 200c5f4: 81 c7 e0 08 ret 200c5f8: 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) ) { 200c5fc: 80 a6 6a 00 cmp %i1, 0xa00 200c600: 02 80 00 28 be 200c6a0 200c604: d2 07 bf f4 ld [ %fp + -12 ], %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 200c608: 94 07 bf fc add %fp, -4, %o2 200c60c: 11 00 80 b3 sethi %hi(0x202cc00), %o0 200c610: 40 00 0e 0f call 200fe4c <_Objects_Get> 200c614: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 202cea0 <_POSIX_Message_queue_Information> /* * 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; 200c618: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 200c61c: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 200c620: 84 00 a0 01 inc %g2 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200c624: b8 17 20 2c or %i4, 0x2c, %i4 200c628: c4 22 20 18 st %g2, [ %o0 + 0x18 ] 200c62c: 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 ); 200c630: d0 27 bf f8 st %o0, [ %fp + -8 ] the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 200c634: d0 27 60 10 st %o0, [ %i5 + 0x10 ] 200c638: 83 28 60 02 sll %g1, 2, %g1 200c63c: fa 20 80 01 st %i5, [ %g2 + %g1 ] _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200c640: 40 00 12 04 call 2010e50 <_Thread_Enable_dispatch> 200c644: c0 27 60 0c clr [ %i5 + 0xc ] _Thread_Enable_dispatch(); 200c648: 40 00 12 02 call 2010e50 <_Thread_Enable_dispatch> 200c64c: 01 00 00 00 nop return (mqd_t)the_mq_fd->Object.id; 200c650: f0 07 60 08 ld [ %i5 + 8 ], %i0 200c654: 81 c7 e0 08 ret 200c658: 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 * ); 200c65c: 82 07 a0 54 add %fp, 0x54, %g1 200c660: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 200c664: c2 27 bf f0 st %g1, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 200c668: 39 00 80 b4 sethi %hi(0x202d000), %i4 200c66c: 40 00 0c ad call 200f920 <_Objects_Allocate> 200c670: 90 17 20 2c or %i4, 0x2c, %o0 ! 202d02c <_POSIX_Message_queue_Information_fds> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200c674: ba 92 20 00 orcc %o0, 0, %i5 200c678: 32 bf ff ce bne,a 200c5b0 200c67c: f2 27 60 14 st %i1, [ %i5 + 0x14 ] _Thread_Enable_dispatch(); 200c680: 40 00 11 f4 call 2010e50 <_Thread_Enable_dispatch> 200c684: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENFILE ); 200c688: 40 00 32 59 call 2018fec <__errno> 200c68c: 01 00 00 00 nop 200c690: 82 10 20 17 mov 0x17, %g1 ! 17 200c694: c2 22 00 00 st %g1, [ %o0 ] 200c698: 81 c7 e0 08 ret 200c69c: 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 ); 200c6a0: 90 17 20 2c or %i4, 0x2c, %o0 200c6a4: 40 00 0d 89 call 200fcc8 <_Objects_Free> 200c6a8: 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(); 200c6ac: 40 00 11 e9 call 2010e50 <_Thread_Enable_dispatch> 200c6b0: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 200c6b4: 40 00 32 4e call 2018fec <__errno> 200c6b8: 01 00 00 00 nop 200c6bc: 82 10 20 11 mov 0x11, %g1 ! 11 200c6c0: c2 22 00 00 st %g1, [ %o0 ] 200c6c4: 81 c7 e0 08 ret 200c6c8: 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) ) ) { 200c6cc: 02 bf ff c3 be 200c5d8 200c6d0: 90 17 20 2c or %i4, 0x2c, %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( 200c6d4: 90 10 00 18 mov %i0, %o0 200c6d8: 92 10 20 01 mov 1, %o1 200c6dc: 94 10 00 1a mov %i2, %o2 200c6e0: 40 00 20 f9 call 2014ac4 <_POSIX_Message_queue_Create_support> 200c6e4: 96 07 bf f8 add %fp, -8, %o3 ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 200c6e8: 80 a2 3f ff cmp %o0, -1 200c6ec: 02 80 00 0d be 200c720 200c6f0: c6 07 bf f8 ld [ %fp + -8 ], %g3 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 200c6f4: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200c6f8: b8 17 20 2c or %i4, 0x2c, %i4 200c6fc: 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; 200c700: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200c704: 83 28 60 02 sll %g1, 2, %g1 200c708: fa 20 80 01 st %i5, [ %g2 + %g1 ] &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200c70c: 40 00 11 d1 call 2010e50 <_Thread_Enable_dispatch> 200c710: c0 27 60 0c clr [ %i5 + 0xc ] return (mqd_t) the_mq_fd->Object.id; 200c714: f0 07 60 08 ld [ %i5 + 8 ], %i0 } 200c718: 81 c7 e0 08 ret 200c71c: 81 e8 00 00 restore 200c720: 90 17 20 2c or %i4, 0x2c, %o0 200c724: 92 10 00 1d mov %i5, %o1 200c728: 40 00 0d 68 call 200fcc8 <_Objects_Free> 200c72c: 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(); 200c730: 40 00 11 c8 call 2010e50 <_Thread_Enable_dispatch> 200c734: 01 00 00 00 nop return (mqd_t) -1; 200c738: 81 c7 e0 08 ret 200c73c: 81 e8 00 00 restore =============================================================================== 0201b640 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 201b640: 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; 201b644: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 201b648: 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; 201b64c: e0 00 60 34 ld [ %g1 + 0x34 ], %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; 201b650: 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; 201b654: 82 10 3f ff mov -1, %g1 uint16_t date = 0; 201b658: c0 37 bf fe clrh [ %fp + -2 ] 201b65c: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 201b660: c2 27 bf f4 st %g1, [ %fp + -12 ] static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 201b664: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 201b668: c0 27 bf ec clr [ %fp + -20 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 201b66c: c0 27 bf a8 clr [ %fp + -88 ] 201b670: c0 27 bf ac clr [ %fp + -84 ] 201b674: c0 27 bf b0 clr [ %fp + -80 ] 201b678: c0 27 bf b4 clr [ %fp + -76 ] 201b67c: c0 27 bf b8 clr [ %fp + -72 ] 201b680: c0 27 bf bc clr [ %fp + -68 ] 201b684: c0 27 bf c0 clr [ %fp + -64 ] 201b688: c0 27 bf c4 clr [ %fp + -60 ] memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 201b68c: c0 27 bf 68 clr [ %fp + -152 ] 201b690: c0 27 bf 6c clr [ %fp + -148 ] 201b694: c0 27 bf 70 clr [ %fp + -144 ] 201b698: c0 27 bf 74 clr [ %fp + -140 ] 201b69c: c0 27 bf 78 clr [ %fp + -136 ] 201b6a0: c0 27 bf 7c clr [ %fp + -132 ] 201b6a4: c0 27 bf 80 clr [ %fp + -128 ] 201b6a8: c0 27 bf 84 clr [ %fp + -124 ] 201b6ac: c0 27 bf 88 clr [ %fp + -120 ] 201b6b0: c0 27 bf 8c clr [ %fp + -116 ] 201b6b4: c0 27 bf 90 clr [ %fp + -112 ] 201b6b8: c0 27 bf 94 clr [ %fp + -108 ] 201b6bc: c0 27 bf 98 clr [ %fp + -104 ] 201b6c0: c0 27 bf 9c clr [ %fp + -100 ] 201b6c4: c0 27 bf a0 clr [ %fp + -96 ] name_type = msdos_long_to_short (name, name_len, 201b6c8: 94 07 bf a8 add %fp, -88, %o2 201b6cc: 96 10 20 0b mov 0xb, %o3 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; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 201b6d0: e2 06 00 00 ld [ %i0 ], %l1 fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 201b6d4: 92 10 00 1b mov %i3, %o1 uint32_t byte = 0; 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); 201b6d8: c0 27 bf a4 clr [ %fp + -92 ] name_type = msdos_long_to_short (name, name_len, 201b6dc: 40 00 04 6f call 201c898 201b6e0: 90 10 00 1a mov %i2, %o0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 201b6e4: b8 10 00 18 mov %i0, %i4 fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 201b6e8: a4 10 00 08 mov %o0, %l2 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 201b6ec: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 201b6f0: 90 10 20 00 clr %o0 201b6f4: 40 00 25 f6 call 2024ecc