=============================================================================== 0200b7b8 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200b7b8: 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; 200b7bc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 switch( node->type ) { 200b7c0: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200b7c4: 80 a0 60 07 cmp %g1, 7 200b7c8: 18 80 00 0a bgu 200b7f0 <== NEVER TAKEN 200b7cc: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b7d0: 83 28 60 02 sll %g1, 2, %g1 200b7d4: 07 00 80 2d sethi %hi(0x200b400), %g3 200b7d8: 86 10 e3 98 or %g3, 0x398, %g3 ! 200b798 200b7dc: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 200b7e0: 81 c0 40 00 jmp %g1 200b7e4: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200b7e8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200b7ec: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 200b7f0: 81 c3 e0 08 retl 200b7f4: 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; 200b7f8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200b7fc: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 200b800: 81 c3 e0 08 retl 200b804: 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; 200b808: 03 00 80 76 sethi %hi(0x201d800), %g1 200b80c: 82 10 61 f8 or %g1, 0x1f8, %g1 ! 201d9f8 200b810: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 200b814: 81 c3 e0 08 retl 200b818: 90 10 20 00 clr %o0 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 200b81c: 03 00 80 76 sethi %hi(0x201d800), %g1 200b820: 82 10 60 b0 or %g1, 0xb0, %g1 ! 201d8b0 200b824: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200b828: 81 c3 e0 08 retl 200b82c: 90 10 20 00 clr %o0 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200b830: 03 00 80 76 sethi %hi(0x201d800), %g1 200b834: 82 10 61 88 or %g1, 0x188, %g1 ! 201d988 200b838: c2 22 20 08 st %g1, [ %o0 + 8 ] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 200b83c: 81 c3 e0 08 retl 200b840: 90 10 20 00 clr %o0 =============================================================================== 0200b5d8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 200b5d8: 9d e3 bf 98 save %sp, -104, %sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200b5dc: 90 10 20 01 mov 1, %o0 200b5e0: 7f ff dd 20 call 2002a60 200b5e4: 92 10 20 68 mov 0x68, %o1 if ( !node ) 200b5e8: a0 92 20 00 orcc %o0, 0, %l0 200b5ec: 02 80 00 14 be 200b63c <== NEVER TAKEN 200b5f0: 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 ); 200b5f4: 92 10 00 19 mov %i1, %o1 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 200b5f8: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200b5fc: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 200b600: f0 24 20 4c st %i0, [ %l0 + 0x4c ] strncpy( node->name, name, IMFS_NAME_MAX ); 200b604: 40 00 1d 00 call 2012a04 200b608: 90 04 20 0c add %l0, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200b60c: 40 00 05 4b call 200cb38 200b610: f4 24 20 30 st %i2, [ %l0 + 0x30 ] node->st_gid = getegid(); 200b614: 40 00 05 45 call 200cb28 200b618: d0 34 20 3c sth %o0, [ %l0 + 0x3c ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b61c: 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(); 200b620: d0 34 20 3e sth %o0, [ %l0 + 0x3e ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200b624: 7f ff dd dd call 2002d98 200b628: 90 07 bf f8 add %fp, -8, %o0 node->stat_atime = (time_t) tv.tv_sec; 200b62c: c2 07 bf f8 ld [ %fp + -8 ], %g1 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 200b630: c2 24 20 48 st %g1, [ %l0 + 0x48 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 200b634: c2 24 20 40 st %g1, [ %l0 + 0x40 ] node->stat_mtime = (time_t) tv.tv_sec; 200b638: c2 24 20 44 st %g1, [ %l0 + 0x44 ] node->stat_ctime = (time_t) tv.tv_sec; return node; } 200b63c: 81 c7 e0 08 ret 200b640: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 0200b550 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 200b550: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200b554: 40 00 05 79 call 200cb38 200b558: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200b55c: 91 2a 20 10 sll %o0, 0x10, %o0 200b560: 91 32 20 10 srl %o0, 0x10, %o0 200b564: 80 a2 20 00 cmp %o0, 0 200b568: 32 80 00 0b bne,a 200b594 <== NEVER TAKEN 200b56c: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 200b570: f2 34 20 3c sth %i1, [ %l0 + 0x3c ] jnode->st_gid = group; 200b574: f4 34 20 3e sth %i2, [ %l0 + 0x3e ] IMFS_update_ctime( jnode ); 200b578: 90 07 bf f8 add %fp, -8, %o0 200b57c: 7f ff de 07 call 2002d98 200b580: 92 10 20 00 clr %o1 200b584: c2 07 bf f8 ld [ %fp + -8 ], %g1 200b588: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 200b58c: 81 c7 e0 08 ret 200b590: 91 e8 20 00 restore %g0, 0, %o0 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200b594: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 200b598: 22 bf ff f7 be,a 200b574 <== NOT EXECUTED 200b59c: f2 34 20 3c sth %i1, [ %l0 + 0x3c ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 200b5a0: 40 00 19 17 call 20119fc <__errno> <== NOT EXECUTED 200b5a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b5a8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200b5ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200b5b0: 81 c7 e0 08 ret <== NOT EXECUTED 200b5b4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b684 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200b684: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 200b688: 80 a6 20 00 cmp %i0, 0 200b68c: 12 80 00 04 bne 200b69c <== ALWAYS TAKEN 200b690: a0 10 20 00 clr %l0 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200b694: 81 c7 e0 08 ret <== NOT EXECUTED 200b698: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200b69c: 03 00 80 7a sethi %hi(0x201e800), %g1 200b6a0: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201e980 200b6a4: 92 10 00 1a mov %i2, %o1 200b6a8: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200b6ac: 90 10 00 19 mov %i1, %o0 200b6b0: 7f ff ff ca call 200b5d8 200b6b4: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200b6b8: a0 92 20 00 orcc %o0, 0, %l0 200b6bc: 02 bf ff f6 be 200b694 <== NEVER TAKEN 200b6c0: 80 a6 60 07 cmp %i1, 7 return NULL; /* * Set the type specific information */ switch (type) { 200b6c4: 28 80 00 0a bleu,a 200b6ec <== ALWAYS TAKEN 200b6c8: b3 2e 60 02 sll %i1, 2, %i1 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 200b6cc: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 200b6d0: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 200b6d4: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 200b6d8: 90 12 23 d8 or %o0, 0x3d8, %o0 <== NOT EXECUTED 200b6dc: 94 12 a0 30 or %o2, 0x30, %o2 <== NOT EXECUTED 200b6e0: 96 12 e0 28 or %o3, 0x28, %o3 <== NOT EXECUTED 200b6e4: 40 00 04 86 call 200c8fc <__assert_func> <== NOT EXECUTED 200b6e8: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 200b6ec: 03 00 80 2d sethi %hi(0x200b400), %g1 200b6f0: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 200b5b8 200b6f4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 200b6f8: 81 c0 40 00 jmp %g1 200b6fc: 01 00 00 00 nop case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 200b700: c2 07 00 00 ld [ %i4 ], %g1 200b704: c2 24 20 50 st %g1, [ %l0 + 0x50 ] /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 200b708: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 200b70c: d0 06 00 00 ld [ %i0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 200b710: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 200b714: d0 24 20 08 st %o0, [ %l0 + 8 ] node->st_ino = ++fs_info->ino_count; 200b718: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200b71c: 90 02 20 50 add %o0, 0x50, %o0 200b720: 82 00 60 01 inc %g1 200b724: c2 20 a0 04 st %g1, [ %g2 + 4 ] 200b728: c2 24 20 38 st %g1, [ %l0 + 0x38 ] 200b72c: 92 10 00 10 mov %l0, %o1 200b730: 7f ff ee f9 call 2007314 <_Chain_Append> 200b734: b0 10 00 10 mov %l0, %i0 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200b738: 81 c7 e0 08 ret 200b73c: 81 e8 00 00 restore node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 200b740: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 200b744: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 200b748: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 200b74c: c0 24 20 50 clr [ %l0 + 0x50 ] 200b750: c0 24 20 54 clr [ %l0 + 0x54 ] node->info.file.indirect = 0; 200b754: c0 24 20 58 clr [ %l0 + 0x58 ] node->info.file.doubly_indirect = 0; 200b758: c0 24 20 5c clr [ %l0 + 0x5c ] node->info.file.triply_indirect = 0; break; 200b75c: 10 bf ff eb b 200b708 200b760: c0 24 20 60 clr [ %l0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 200b764: 10 bf ff e9 b 200b708 200b768: c0 24 20 50 clr [ %l0 + 0x50 ] node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 200b76c: c4 07 20 04 ld [ %i4 + 4 ], %g2 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 200b770: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 200b774: c4 24 20 54 st %g2, [ %l0 + 0x54 ] break; 200b778: 10 bf ff e4 b 200b708 200b77c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200b780: 82 04 20 54 add %l0, 0x54, %g1 the_chain->permanent_null = NULL; 200b784: c0 24 20 54 clr [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200b788: c2 24 20 50 st %g1, [ %l0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200b78c: 82 04 20 50 add %l0, 0x50, %g1 200b790: 10 bf ff de b 200b708 200b794: c2 24 20 58 st %g1, [ %l0 + 0x58 ] =============================================================================== 0200b644 : IMFS_jnode_t *IMFS_create_root_node(void) { 200b644: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 200b648: 90 10 20 01 mov 1, %o0 200b64c: 13 00 80 75 sethi %hi(0x201d400), %o1 200b650: 15 00 00 10 sethi %hi(0x4000), %o2 200b654: 92 12 63 d0 or %o1, 0x3d0, %o1 200b658: 7f ff ff e0 call 200b5d8 200b65c: 94 12 a1 ed or %o2, 0x1ed, %o2 if ( !node ) 200b660: 80 a2 20 00 cmp %o0, 0 200b664: 02 80 00 06 be 200b67c <== NEVER TAKEN 200b668: 82 02 20 54 add %o0, 0x54, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 200b66c: c0 22 20 54 clr [ %o0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200b670: c2 22 20 50 st %g1, [ %o0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200b674: 82 02 20 50 add %o0, 0x50, %g1 200b678: c2 22 20 58 st %g1, [ %o0 + 0x58 ] * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 200b67c: 81 c7 e0 08 ret 200b680: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02004b38 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2004b38: 9d e3 bf a0 save %sp, -96, %sp rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2004b3c: 80 a6 20 00 cmp %i0, 0 2004b40: 02 80 00 2b be 2004bec <== NEVER TAKEN 2004b44: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 2004b48: 06 80 00 38 bl 2004c28 <== NEVER TAKEN 2004b4c: 11 00 80 99 sethi %hi(0x2026400), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 2004b50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 2004b54: 80 a0 60 01 cmp %g1, 1 2004b58: 12 80 00 2d bne 2004c0c <== NEVER TAKEN 2004b5c: a8 06 20 54 add %i0, 0x54, %l4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2004b60: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 2004b64: 80 a4 c0 14 cmp %l3, %l4 2004b68: 02 80 00 1b be 2004bd4 2004b6c: 25 00 80 a1 sethi %hi(0x2028400), %l2 2004b70: 23 00 80 99 sethi %hi(0x2026400), %l1 2004b74: a4 14 a0 90 or %l2, 0x90, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2004b78: a2 14 61 30 or %l1, 0x130, %l1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2004b7c: aa 06 60 01 add %i1, 1, %l5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 2004b80: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2004b84: c2 04 80 00 ld [ %l2 ], %g1 2004b88: 90 10 00 11 mov %l1, %o0 2004b8c: d6 00 60 08 ld [ %g1 + 8 ], %o3 2004b90: 92 10 20 01 mov 1, %o1 2004b94: 40 00 49 5c call 2017104 2004b98: 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++ ) 2004b9c: a0 04 20 01 inc %l0 2004ba0: 80 a6 40 10 cmp %i1, %l0 2004ba4: 36 bf ff f9 bge,a 2004b88 2004ba8: c2 04 80 00 ld [ %l2 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2004bac: 7f ff ff 7d call 20049a0 2004bb0: 90 10 00 13 mov %l3, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 2004bb4: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 2004bb8: 80 a0 60 01 cmp %g1, 1 2004bbc: 22 80 00 08 be,a 2004bdc 2004bc0: 90 10 00 13 mov %l3, %o0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2004bc4: e6 04 c0 00 ld [ %l3 ], %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2004bc8: 80 a4 c0 14 cmp %l3, %l4 2004bcc: 12 bf ff ee bne 2004b84 2004bd0: a0 10 20 00 clr %l0 2004bd4: 81 c7 e0 08 ret 2004bd8: 81 e8 00 00 restore 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 ); 2004bdc: 7f ff ff d7 call 2004b38 2004be0: 92 10 00 15 mov %l5, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 2004be4: 10 bf ff f9 b 2004bc8 2004be8: e6 04 c0 00 ld [ %l3 ], %l3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2004bec: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 2004bf0: 15 00 80 99 sethi %hi(0x2026400), %o2 <== NOT EXECUTED 2004bf4: 17 00 80 99 sethi %hi(0x2026400), %o3 <== NOT EXECUTED 2004bf8: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 2004bfc: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED 2004c00: 96 12 e0 e8 or %o3, 0xe8, %o3 <== NOT EXECUTED 2004c04: 40 00 02 3a call 20054ec <__assert_func> <== NOT EXECUTED 2004c08: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 2004c0c: 15 00 80 99 sethi %hi(0x2026400), %o2 <== NOT EXECUTED 2004c10: 17 00 80 99 sethi %hi(0x2026400), %o3 <== NOT EXECUTED 2004c14: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 2004c18: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED 2004c1c: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 2004c20: 40 00 02 33 call 20054ec <__assert_func> <== NOT EXECUTED 2004c24: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 2004c28: 15 00 80 99 sethi %hi(0x2026400), %o2 <== NOT EXECUTED 2004c2c: 17 00 80 99 sethi %hi(0x2026400), %o3 <== NOT EXECUTED 2004c30: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 2004c34: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED 2004c38: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 2004c3c: 40 00 02 2c call 20054ec <__assert_func> <== NOT EXECUTED 2004c40: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED =============================================================================== 0200b9e8 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200b9e8: 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 ) ) { 200b9ec: 80 8e bf f8 btst -8, %i2 200b9f0: 12 80 00 ee bne 200bda8 <== NEVER TAKEN 200b9f4: a0 10 00 18 mov %i0, %l0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200b9f8: e4 06 c0 00 ld [ %i3 ], %l2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200b9fc: 2b 00 80 7a sethi %hi(0x201e800), %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200ba00: a2 10 20 00 clr %l1 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200ba04: aa 15 61 80 or %l5, 0x180, %l5 200ba08: a6 07 bf d8 add %fp, -40, %l3 200ba0c: a8 07 bf fc add %fp, -4, %l4 * 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 ); 200ba10: 90 04 00 11 add %l0, %l1, %o0 200ba14: 92 10 00 19 mov %i1, %o1 200ba18: 94 10 00 13 mov %l3, %o2 200ba1c: 40 00 03 15 call 200c670 200ba20: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 200ba24: c2 06 c0 00 ld [ %i3 ], %g1 * 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 ); 200ba28: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 200ba2c: 80 a0 60 00 cmp %g1, 0 200ba30: 02 80 00 87 be 200bc4c <== NEVER TAKEN 200ba34: c4 07 bf fc ld [ %fp + -4 ], %g2 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 200ba38: a2 04 40 02 add %l1, %g2, %l1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200ba3c: 80 a2 20 00 cmp %o0, 0 200ba40: 12 80 00 11 bne 200ba84 200ba44: b2 26 40 02 sub %i1, %g2, %i1 * 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 ) { 200ba48: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200ba4c: 80 a0 a0 01 cmp %g2, 1 200ba50: 22 80 00 85 be,a 200bc64 200ba54: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200ba58: 7f ff ff 58 call 200b7b8 200ba5c: 90 10 00 1b mov %i3, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200ba60: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200ba64: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200ba68: 7f ff ff 77 call 200b844 200ba6c: 90 10 00 1b mov %i3, %o0 200ba70: 80 a2 20 00 cmp %o0, 0 200ba74: 02 80 00 98 be 200bcd4 200ba78: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200ba7c: 81 c7 e0 08 ret 200ba80: 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 ) 200ba84: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 200ba88: 80 a0 a0 01 cmp %g2, 1 200ba8c: 02 80 00 60 be 200bc0c 200ba90: 90 10 00 1b mov %i3, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200ba94: 80 a5 a0 03 cmp %l6, 3 200ba98: 02 80 00 0b be 200bac4 200ba9c: a4 10 00 01 mov %g1, %l2 200baa0: 80 a5 a0 04 cmp %l6, 4 200baa4: 02 80 00 2f be 200bb60 200baa8: 80 a5 a0 02 cmp %l6, 2 200baac: 02 80 00 1a be 200bb14 200bab0: 80 a5 a0 04 cmp %l6, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 200bab4: 12 bf ff d8 bne 200ba14 <== ALWAYS TAKEN 200bab8: 90 04 00 11 add %l0, %l1, %o0 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 200babc: 10 bf ff e4 b 200ba4c <== NOT EXECUTED 200bac0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200bac4: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200bac8: 80 a0 60 03 cmp %g1, 3 200bacc: 02 80 00 57 be 200bc28 200bad0: 80 a0 60 04 cmp %g1, 4 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 200bad4: 02 80 00 99 be 200bd38 200bad8: 90 10 00 1b mov %i3, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200badc: 80 a0 60 01 cmp %g1, 1 200bae0: 12 80 00 77 bne 200bcbc 200bae4: 90 10 00 12 mov %l2, %o0 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200bae8: 40 00 02 b1 call 200c5ac 200baec: 92 10 00 13 mov %l3, %o1 if ( !node ) 200baf0: a4 92 20 00 orcc %o0, 0, %l2 200baf4: 02 80 00 56 be 200bc4c 200baf8: 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 )) { 200bafc: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 200bb00: 80 a0 60 01 cmp %g1, 1 200bb04: 22 80 00 1d be,a 200bb78 200bb08: c2 04 a0 5c ld [ %l2 + 0x5c ], %g1 /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200bb0c: 10 bf ff c1 b 200ba10 200bb10: e4 26 c0 00 st %l2, [ %i3 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200bb14: c4 05 40 00 ld [ %l5 ], %g2 200bb18: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 200bb1c: 80 a0 80 01 cmp %g2, %g1 200bb20: 02 bf ff bd be 200ba14 200bb24: 90 04 00 11 add %l0, %l1, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 200bb28: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 200bb2c: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 200bb30: 80 a0 80 01 cmp %g2, %g1 200bb34: 02 80 00 8f be 200bd70 200bb38: 92 02 60 08 add %o1, 8, %o1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200bb3c: e4 00 60 08 ld [ %g1 + 8 ], %l2 200bb40: 80 a4 a0 00 cmp %l2, 0 200bb44: 32 bf ff b4 bne,a 200ba14 200bb48: e4 26 c0 00 st %l2, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200bb4c: 40 00 17 ac call 20119fc <__errno> 200bb50: b0 10 3f ff mov -1, %i0 200bb54: ec 22 00 00 st %l6, [ %o0 ] 200bb58: 81 c7 e0 08 ret 200bb5c: 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 ); 200bb60: 40 00 17 a7 call 20119fc <__errno> 200bb64: b0 10 3f ff mov -1, %i0 200bb68: 82 10 20 5b mov 0x5b, %g1 200bb6c: c2 22 00 00 st %g1, [ %o0 ] 200bb70: 81 c7 e0 08 ret 200bb74: 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 )) { 200bb78: 80 a0 60 00 cmp %g1, 0 200bb7c: 02 bf ff e4 be 200bb0c 200bb80: ac 04 00 11 add %l0, %l1, %l6 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200bb84: d0 4d 80 00 ldsb [ %l6 ], %o0 200bb88: 7f ff e0 9b call 2003df4 200bb8c: b0 10 00 16 mov %l6, %i0 200bb90: 80 a2 20 00 cmp %o0, 0 200bb94: 22 80 00 11 be,a 200bbd8 <== NEVER TAKEN 200bb98: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED 200bb9c: c2 0d 80 00 ldub [ %l6 ], %g1 200bba0: 83 28 60 18 sll %g1, 0x18, %g1 200bba4: 80 a0 60 00 cmp %g1, 0 200bba8: 02 80 00 51 be 200bcec 200bbac: 80 a6 60 00 cmp %i1, 0 200bbb0: 02 80 00 0b be 200bbdc <== NEVER TAKEN 200bbb4: ac 05 a0 01 inc %l6 200bbb8: d0 4d 80 00 ldsb [ %l6 ], %o0 200bbbc: 7f ff e0 8e call 2003df4 200bbc0: a2 04 60 01 inc %l1 ++(*index); --(*len); 200bbc4: b2 06 7f ff add %i1, -1, %i1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200bbc8: 80 a2 20 00 cmp %o0, 0 200bbcc: 12 bf ff f4 bne 200bb9c 200bbd0: b0 10 00 16 mov %l6, %i0 200bbd4: c2 0d 80 00 ldub [ %l6 ], %g1 200bbd8: 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] != '.')) { 200bbdc: 83 38 60 18 sra %g1, 0x18, %g1 200bbe0: 80 a0 60 2e cmp %g1, 0x2e 200bbe4: 12 80 00 42 bne 200bcec 200bbe8: 82 04 00 11 add %l0, %l1, %g1 200bbec: c2 48 60 01 ldsb [ %g1 + 1 ], %g1 200bbf0: 80 a0 60 2e cmp %g1, 0x2e 200bbf4: 12 80 00 3e bne 200bcec 200bbf8: a2 04 60 02 add %l1, 2, %l1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200bbfc: e4 04 a0 08 ld [ %l2 + 8 ], %l2 return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; 200bc00: b2 06 7f fe add %i1, -2, %i1 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 200bc04: 10 bf ff 83 b 200ba10 200bc08: e4 26 c0 00 st %l2, [ %i3 ] /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200bc0c: 7f ff ff 0e call 200b844 200bc10: 92 10 20 01 mov 1, %o1 200bc14: 80 a2 20 00 cmp %o0, 0 200bc18: 02 80 00 50 be 200bd58 200bc1c: 01 00 00 00 nop 200bc20: 10 bf ff 9d b 200ba94 200bc24: c2 06 c0 00 ld [ %i3 ], %g1 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 200bc28: 90 10 00 1b mov %i3, %o0 200bc2c: 7f ff ff 27 call 200b8c8 200bc30: 92 10 20 00 clr %o1 node = pathloc->node_access; 200bc34: e4 06 c0 00 ld [ %i3 ], %l2 if ( !node ) 200bc38: 80 a4 a0 00 cmp %l2, 0 200bc3c: 02 80 00 20 be 200bcbc <== NEVER TAKEN 200bc40: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 200bc44: 10 bf ff a6 b 200badc 200bc48: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 200bc4c: 40 00 17 6c call 20119fc <__errno> 200bc50: b0 10 3f ff mov -1, %i0 200bc54: 82 10 20 02 mov 2, %g1 200bc58: c2 22 00 00 st %g1, [ %o0 ] 200bc5c: 81 c7 e0 08 ret 200bc60: 81 e8 00 00 restore * * 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 ) { 200bc64: 80 a0 a0 00 cmp %g2, 0 200bc68: 02 bf ff 7c be 200ba58 <== ALWAYS TAKEN 200bc6c: c2 07 bf fc ld [ %fp + -4 ], %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200bc70: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 <== NOT EXECUTED 200bc74: c6 26 c0 00 st %g3, [ %i3 ] <== NOT EXECUTED 200bc78: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bc7c: 92 06 40 01 add %i1, %g1, %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; 200bc80: c6 26 e0 04 st %g3, [ %i3 + 4 ] <== NOT EXECUTED 200bc84: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bc88: 90 24 40 01 sub %l1, %g1, %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; 200bc8c: c6 26 e0 08 st %g3, [ %i3 + 8 ] <== NOT EXECUTED 200bc90: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bc94: 90 04 00 08 add %l0, %o0, %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; 200bc98: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bc9c: 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; 200bca0: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bca4: 94 10 00 1a mov %i2, %o2 <== 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; 200bca8: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200bcac: 9f c0 40 00 call %g1 <== NOT EXECUTED 200bcb0: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 200bcb4: 81 c7 e0 08 ret <== NOT EXECUTED 200bcb8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 200bcbc: 40 00 17 50 call 20119fc <__errno> 200bcc0: b0 10 3f ff mov -1, %i0 200bcc4: 82 10 20 14 mov 0x14, %g1 200bcc8: c2 22 00 00 st %g1, [ %o0 ] 200bccc: 81 c7 e0 08 ret 200bcd0: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200bcd4: 40 00 17 4a call 20119fc <__errno> 200bcd8: b0 10 3f ff mov -1, %i0 200bcdc: 82 10 20 0d mov 0xd, %g1 200bce0: c2 22 00 00 st %g1, [ %o0 ] return result; } 200bce4: 81 c7 e0 08 ret 200bce8: 81 e8 00 00 restore * 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; 200bcec: c4 04 a0 5c ld [ %l2 + 0x5c ], %g2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bcf0: 90 10 00 18 mov %i0, %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; 200bcf4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bcf8: 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; 200bcfc: c2 26 c0 00 st %g1, [ %i3 ] 200bd00: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bd04: 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; 200bd08: c2 26 e0 04 st %g1, [ %i3 + 4 ] 200bd0c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bd10: 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; 200bd14: c2 26 e0 08 st %g1, [ %i3 + 8 ] 200bd18: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 200bd1c: c2 26 e0 0c st %g1, [ %i3 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i], 200bd20: 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; 200bd24: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200bd28: 9f c0 40 00 call %g1 200bd2c: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] 200bd30: 81 c7 e0 08 ret 200bd34: 91 e8 00 08 restore %g0, %o0, %o0 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 200bd38: 7f ff fe ff call 200b934 200bd3c: 92 10 20 00 clr %o1 node = pathloc->node_access; 200bd40: e4 06 c0 00 ld [ %i3 ], %l2 if ( result == -1 ) 200bd44: 80 a2 3f ff cmp %o0, -1 200bd48: 02 bf ff 4d be 200ba7c <== NEVER TAKEN 200bd4c: b0 10 00 08 mov %o0, %i0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 200bd50: 10 bf ff 63 b 200badc 200bd54: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 * I cannot move out of this directory without execute permission. */ 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 ); 200bd58: 40 00 17 29 call 20119fc <__errno> 200bd5c: b0 10 3f ff mov -1, %i0 200bd60: 82 10 20 0d mov 0xd, %g1 200bd64: c2 22 00 00 st %g1, [ %o0 ] 200bd68: 81 c7 e0 08 ret 200bd6c: 81 e8 00 00 restore */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200bd70: 94 10 20 14 mov 0x14, %o2 200bd74: 40 00 19 5e call 20122ec 200bd78: 90 10 00 1b mov %i3, %o0 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 200bd7c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200bd80: c4 07 bf fc ld [ %fp + -4 ], %g2 200bd84: c2 00 40 00 ld [ %g1 ], %g1 200bd88: 92 06 40 02 add %i1, %g2, %o1 200bd8c: 84 24 40 02 sub %l1, %g2, %g2 200bd90: 94 10 00 1a mov %i2, %o2 200bd94: 90 04 00 02 add %l0, %g2, %o0 200bd98: 9f c0 40 00 call %g1 200bd9c: 96 10 00 1b mov %i3, %o3 200bda0: 81 c7 e0 08 ret 200bda4: 91 e8 00 08 restore %g0, %o0, %o0 char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 200bda8: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED 200bdac: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 200bdb0: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 200bdb4: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 200bdb8: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED 200bdbc: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 200bdc0: 40 00 02 cf call 200c8fc <__assert_func> <== NOT EXECUTED 200bdc4: 92 10 22 08 mov 0x208, %o1 <== NOT EXECUTED =============================================================================== 0200bea4 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200bea4: 9d e3 bf 78 save %sp, -136, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200bea8: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 200beac: 90 10 00 18 mov %i0, %o0 200beb0: 40 00 1a a0 call 2012930 200beb4: 2d 00 80 7a sethi %hi(0x201e800), %l6 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200beb8: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200bebc: a6 10 20 00 clr %l3 200bec0: a8 07 bf d8 add %fp, -40, %l4 200bec4: aa 07 bf fc add %fp, -4, %l5 200bec8: a4 10 00 08 mov %o0, %l2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200becc: ac 15 a1 80 or %l6, 0x180, %l6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200bed0: 90 04 40 13 add %l1, %l3, %o0 200bed4: 92 10 00 12 mov %l2, %o1 200bed8: 94 10 00 14 mov %l4, %o2 200bedc: 40 00 01 e5 call 200c670 200bee0: 96 10 00 15 mov %l5, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 200bee4: c2 06 40 00 ld [ %i1 ], %g1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200bee8: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 200beec: 80 a0 60 00 cmp %g1, 0 200bef0: 02 80 00 85 be 200c104 <== NEVER TAKEN 200bef4: fa 07 bf fc ld [ %fp + -4 ], %i5 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200bef8: 80 a2 20 00 cmp %o0, 0 200befc: 32 80 00 08 bne,a 200bf1c 200bf00: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200bf04: 40 00 16 be call 20119fc <__errno> 200bf08: b0 10 3f ff mov -1, %i0 200bf0c: 82 10 20 11 mov 0x11, %g1 200bf10: c2 22 00 00 st %g1, [ %o0 ] 200bf14: 81 c7 e0 08 ret 200bf18: 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 ) 200bf1c: 80 a0 a0 01 cmp %g2, 1 200bf20: 02 80 00 69 be 200c0c4 200bf24: 90 10 00 19 mov %i1, %o0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 200bf28: a6 04 c0 1d add %l3, %i5, %l3 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 200bf2c: a4 24 80 1d sub %l2, %i5, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200bf30: 80 a5 e0 02 cmp %l7, 2 200bf34: 02 80 00 30 be 200bff4 200bf38: a0 10 00 01 mov %g1, %l0 200bf3c: 80 a5 e0 02 cmp %l7, 2 200bf40: 08 80 00 0d bleu 200bf74 200bf44: 80 a5 e0 00 cmp %l7, 0 200bf48: 80 a5 e0 03 cmp %l7, 3 200bf4c: 02 80 00 12 be 200bf94 200bf50: 80 a5 e0 04 cmp %l7, 4 200bf54: 12 bf ff e0 bne 200bed4 <== NEVER TAKEN 200bf58: 90 04 40 13 add %l1, %l3, %o0 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200bf5c: 40 00 16 a8 call 20119fc <__errno> 200bf60: b0 10 3f ff mov -1, %i0 200bf64: 82 10 20 5b mov 0x5b, %g1 200bf68: c2 22 00 00 st %g1, [ %o0 ] 200bf6c: 81 c7 e0 08 ret 200bf70: 81 e8 00 00 restore if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200bf74: 12 bf ff d8 bne 200bed4 <== ALWAYS TAKEN 200bf78: 90 04 40 13 add %l1, %l3, %o0 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200bf7c: 40 00 16 a0 call 20119fc <__errno> <== NOT EXECUTED 200bf80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200bf84: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 200bf88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200bf8c: 81 c7 e0 08 ret <== NOT EXECUTED 200bf90: 81 e8 00 00 restore <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200bf94: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200bf98: 80 a0 60 03 cmp %g1, 3 200bf9c: 02 80 00 83 be 200c1a8 200bfa0: 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 ) { 200bfa4: 02 80 00 82 be 200c1ac 200bfa8: 90 10 00 19 mov %i1, %o0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 200bfac: 80 a4 20 00 cmp %l0, 0 200bfb0: 02 80 00 78 be 200c190 <== NEVER TAKEN 200bfb4: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200bfb8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200bfbc: 80 a0 60 01 cmp %g1, 1 200bfc0: 12 80 00 74 bne 200c190 200bfc4: 90 10 00 10 mov %l0, %o0 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200bfc8: 40 00 01 79 call 200c5ac 200bfcc: 92 10 00 14 mov %l4, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 200bfd0: a0 92 20 00 orcc %o0, 0, %l0 200bfd4: 02 80 00 52 be 200c11c 200bfd8: c2 07 bf fc ld [ %fp + -4 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200bfdc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200bfe0: 80 a0 60 01 cmp %g1, 1 200bfe4: 22 80 00 17 be,a 200c040 200bfe8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 200bfec: 10 bf ff b9 b 200bed0 200bff0: e0 26 40 00 st %l0, [ %i1 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200bff4: c4 05 80 00 ld [ %l6 ], %g2 200bff8: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 200bffc: 80 a0 80 01 cmp %g2, %g1 200c000: 02 bf ff b5 be 200bed4 200c004: 90 04 40 13 add %l1, %l3, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 200c008: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 200c00c: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 200c010: 80 a0 80 01 cmp %g2, %g1 200c014: 02 80 00 85 be 200c228 200c018: 92 02 60 08 add %o1, 8, %o1 } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 200c01c: e0 00 60 08 ld [ %g1 + 8 ], %l0 200c020: 80 a4 20 00 cmp %l0, 0 200c024: 32 bf ff ac bne,a 200bed4 200c028: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200c02c: 40 00 16 74 call 20119fc <__errno> 200c030: b0 10 3f ff mov -1, %i0 200c034: ee 22 00 00 st %l7, [ %o0 ] 200c038: 81 c7 e0 08 ret 200c03c: 81 e8 00 00 restore */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200c040: 80 a0 60 00 cmp %g1, 0 200c044: 12 80 00 0d bne 200c078 200c048: ae 04 40 13 add %l1, %l3, %l7 200c04c: 10 bf ff a1 b 200bed0 200c050: e0 26 40 00 st %l0, [ %i1 ] const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200c054: 83 28 60 18 sll %g1, 0x18, %g1 200c058: 80 a0 60 00 cmp %g1, 0 200c05c: 02 80 00 5b be 200c1c8 <== NEVER TAKEN 200c060: ae 05 e0 01 inc %l7 200c064: 80 a4 a0 00 cmp %l2, 0 200c068: 02 80 00 0c be 200c098 <== NEVER TAKEN 200c06c: 83 38 60 18 sra %g1, 0x18, %g1 ++(*index); 200c070: a6 04 e0 01 inc %l3 --(*len); 200c074: a4 04 bf ff add %l2, -1, %l2 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200c078: d0 4d c0 00 ldsb [ %l7 ], %o0 200c07c: 7f ff df 5e call 2003df4 200c080: ba 10 00 17 mov %l7, %i5 200c084: 80 a2 20 00 cmp %o0, 0 200c088: 12 bf ff f3 bne 200c054 200c08c: c2 0d c0 00 ldub [ %l7 ], %g1 200c090: 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] != '.')) { 200c094: 83 38 60 18 sra %g1, 0x18, %g1 200c098: 80 a0 60 2e cmp %g1, 0x2e 200c09c: 12 80 00 4b bne 200c1c8 200c0a0: 82 04 40 13 add %l1, %l3, %g1 200c0a4: c2 48 60 01 ldsb [ %g1 + 1 ], %g1 200c0a8: 80 a0 60 2e cmp %g1, 0x2e 200c0ac: 12 80 00 47 bne 200c1c8 <== NEVER TAKEN 200c0b0: a6 04 e0 02 add %l3, 2, %l3 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200c0b4: e0 04 20 08 ld [ %l0 + 8 ], %l0 return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; 200c0b8: a4 04 bf fe add %l2, -2, %l2 node = node->Parent; } pathloc->node_access = node; 200c0bc: 10 bf ff 85 b 200bed0 200c0c0: e0 26 40 00 st %l0, [ %i1 ] * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200c0c4: 7f ff fd e0 call 200b844 200c0c8: 92 10 20 01 mov 1, %o1 200c0cc: 80 a2 20 00 cmp %o0, 0 200c0d0: 02 80 00 50 be 200c210 200c0d4: 01 00 00 00 nop 200c0d8: 10 bf ff 94 b 200bf28 200c0dc: c2 06 40 00 ld [ %i1 ], %g1 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 200c0e0: 91 2a 20 18 sll %o0, 0x18, %o0 200c0e4: 80 a2 20 00 cmp %o0, 0 200c0e8: 02 80 00 15 be 200c13c 200c0ec: a2 04 60 01 inc %l1 if ( !IMFS_is_separator( path[ i ] ) ) 200c0f0: 7f ff df 41 call 2003df4 200c0f4: 91 3a 20 18 sra %o0, 0x18, %o0 200c0f8: 80 a2 20 00 cmp %o0, 0 200c0fc: 32 bf ff f9 bne,a 200c0e0 200c100: d0 0c 60 01 ldub [ %l1 + 1 ], %o0 rtems_set_errno_and_return_minus_one( ENOENT ); 200c104: 40 00 16 3e call 20119fc <__errno> 200c108: b0 10 3f ff mov -1, %i0 200c10c: 82 10 20 02 mov 2, %g1 200c110: c2 22 00 00 st %g1, [ %o0 ] 200c114: 81 c7 e0 08 ret 200c118: 81 e8 00 00 restore case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200c11c: 82 24 c0 01 sub %l3, %g1, %g1 200c120: 82 04 40 01 add %l1, %g1, %g1 200c124: 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++) { 200c128: d0 0c 40 13 ldub [ %l1 + %l3 ], %o0 200c12c: 91 2a 20 18 sll %o0, 0x18, %o0 200c130: 80 a2 20 00 cmp %o0, 0 200c134: 12 bf ff ef bne 200c0f0 200c138: a2 04 40 13 add %l1, %l3, %l1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200c13c: 7f ff fd 9f call 200b7b8 200c140: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 200c144: c2 06 40 00 ld [ %i1 ], %g1 200c148: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200c14c: 80 a0 60 01 cmp %g1, 1 200c150: 12 80 00 10 bne 200c190 <== NEVER TAKEN 200c154: b0 10 00 08 mov %o0, %i0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 200c158: 90 10 00 19 mov %i1, %o0 200c15c: 7f ff fd ba call 200b844 200c160: 92 10 20 03 mov 3, %o1 200c164: 80 a2 20 00 cmp %o0, 0 200c168: 02 80 00 04 be 200c178 200c16c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200c170: 81 c7 e0 08 ret 200c174: 81 e8 00 00 restore /* * 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 ); 200c178: 40 00 16 21 call 20119fc <__errno> 200c17c: b0 10 3f ff mov -1, %i0 200c180: 82 10 20 0d mov 0xd, %g1 200c184: c2 22 00 00 st %g1, [ %o0 ] return result; } 200c188: 81 c7 e0 08 ret 200c18c: 81 e8 00 00 restore /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 200c190: 40 00 16 1b call 20119fc <__errno> 200c194: b0 10 3f ff mov -1, %i0 200c198: 82 10 20 14 mov 0x14, %g1 200c19c: c2 22 00 00 st %g1, [ %o0 ] 200c1a0: 81 c7 e0 08 ret 200c1a4: 81 e8 00 00 restore if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 200c1a8: 90 10 00 19 mov %i1, %o0 200c1ac: 7f ff ff 08 call 200bdcc 200c1b0: 92 10 20 00 clr %o1 if ( result == -1 ) 200c1b4: 80 a2 3f ff cmp %o0, -1 200c1b8: 02 bf ff 57 be 200bf14 <== NEVER TAKEN 200c1bc: b0 10 00 08 mov %o0, %i0 200c1c0: 10 bf ff 7b b 200bfac 200c1c4: e0 06 40 00 ld [ %i1 ], %l0 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; 200c1c8: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 return (*pathloc->ops->evalformake_h)( &path[i], 200c1cc: 90 10 00 1d mov %i5, %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; 200c1d0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 return (*pathloc->ops->evalformake_h)( &path[i], 200c1d4: 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; 200c1d8: c2 26 40 00 st %g1, [ %i1 ] 200c1dc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 return (*pathloc->ops->evalformake_h)( &path[i], 200c1e0: 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; 200c1e4: c2 26 60 04 st %g1, [ %i1 + 4 ] 200c1e8: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200c1ec: c2 26 60 08 st %g1, [ %i1 + 8 ] 200c1f0: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 200c1f4: c2 26 60 0c st %g1, [ %i1 + 0xc ] return (*pathloc->ops->evalformake_h)( &path[i], 200c1f8: 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; 200c1fc: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 return (*pathloc->ops->evalformake_h)( &path[i], 200c200: 9f c0 40 00 call %g1 200c204: c4 26 60 10 st %g2, [ %i1 + 0x10 ] 200c208: 81 c7 e0 08 ret 200c20c: 91 e8 00 08 restore %g0, %o0, %o0 */ 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 ); 200c210: 40 00 15 fb call 20119fc <__errno> 200c214: b0 10 3f ff mov -1, %i0 200c218: 82 10 20 0d mov 0xd, %g1 200c21c: c2 22 00 00 st %g1, [ %o0 ] 200c220: 81 c7 e0 08 ret 200c224: 81 e8 00 00 restore if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200c228: 94 10 20 14 mov 0x14, %o2 200c22c: 40 00 18 30 call 20122ec 200c230: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200c234: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200c238: d0 07 bf fc ld [ %fp + -4 ], %o0 200c23c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200c240: 90 24 c0 08 sub %l3, %o0, %o0 200c244: 92 10 00 19 mov %i1, %o1 200c248: 90 04 40 08 add %l1, %o0, %o0 200c24c: 9f c0 40 00 call %g1 200c250: 94 10 00 1a mov %i2, %o2 200c254: 81 c7 e0 08 ret 200c258: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200b8c8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200b8c8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 200b8cc: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 200b8d0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200b8d4: 80 a0 a0 03 cmp %g2, 3 200b8d8: 12 80 00 14 bne 200b928 <== NEVER TAKEN 200b8dc: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 200b8e0: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 IMFS_Set_handlers( node ); 200b8e4: 7f ff ff b5 call 200b7b8 200b8e8: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 200b8ec: 90 10 00 18 mov %i0, %o0 200b8f0: 92 10 00 19 mov %i1, %o1 200b8f4: 7f ff ff d4 call 200b844 200b8f8: b0 10 20 00 clr %i0 200b8fc: 80 a2 20 00 cmp %o0, 0 200b900: 02 80 00 04 be 200b910 <== NEVER TAKEN 200b904: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200b908: 81 c7 e0 08 ret 200b90c: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200b910: 40 00 18 3b call 20119fc <__errno> <== NOT EXECUTED 200b914: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b918: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 200b91c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 200b920: 81 c7 e0 08 ret <== NOT EXECUTED 200b924: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 200b928: 7f ff ed 8c call 2006f58 <== NOT EXECUTED 200b92c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED =============================================================================== 0200bdcc : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200bdcc: 9d e3 bf a0 save %sp, -96, %sp 200bdd0: 21 00 80 7a sethi %hi(0x201e800), %l0 200bdd4: a2 10 00 18 mov %i0, %l1 200bdd8: c2 04 21 80 ld [ %l0 + 0x180 ], %g1 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 ) ) ); 200bddc: 10 80 00 07 b 200bdf8 200bde0: a6 14 21 80 or %l0, 0x180, %l3 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 200bde4: 02 80 00 21 be 200be68 200bde8: 84 00 bf fd add %g2, -3, %g2 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 200bdec: 80 a0 a0 01 cmp %g2, 1 200bdf0: 18 80 00 1b bgu 200be5c <== ALWAYS TAKEN 200bdf4: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 200bdf8: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 200bdfc: e4 04 40 00 ld [ %l1 ], %l2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 200be00: 84 00 a0 01 inc %g2 200be04: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 200be08: 85 28 a0 10 sll %g2, 0x10, %g2 200be0c: 85 30 a0 10 srl %g2, 0x10, %g2 200be10: 80 a0 a0 05 cmp %g2, 5 200be14: 18 80 00 1d bgu 200be88 200be18: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 200be1c: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 200be20: 80 a0 a0 03 cmp %g2, 3 200be24: 12 bf ff f0 bne 200bde4 200be28: 80 a0 a0 04 cmp %g2, 4 result = IMFS_evaluate_hard_link( node, flags ); 200be2c: 90 10 00 11 mov %l1, %o0 200be30: 7f ff fe a6 call 200b8c8 200be34: 92 10 00 19 mov %i1, %o1 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 ) ) ); 200be38: 80 a2 20 00 cmp %o0, 0 200be3c: 12 80 00 08 bne 200be5c <== NEVER TAKEN 200be40: c2 04 21 80 ld [ %l0 + 0x180 ], %g1 200be44: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 200be48: 84 00 bf fd add %g2, -3, %g2 200be4c: 80 a0 a0 01 cmp %g2, 1 200be50: 08 bf ff ea bleu 200bdf8 <== ALWAYS TAKEN 200be54: c2 04 c0 00 ld [ %l3 ], %g1 200be58: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 200be5c: c0 30 60 30 clrh [ %g1 + 0x30 ] return result; } 200be60: 81 c7 e0 08 ret 200be64: 91 e8 00 08 restore %g0, %o0, %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 ); 200be68: 90 10 00 11 mov %l1, %o0 200be6c: 7f ff fe b2 call 200b934 200be70: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 200be74: 80 a2 20 00 cmp %o0, 0 200be78: 22 bf ff f4 be,a 200be48 200be7c: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 200be80: 10 bf ff f7 b 200be5c 200be84: c2 04 21 80 ld [ %l0 + 0x180 ], %g1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 200be88: 40 00 16 dd call 20119fc <__errno> 200be8c: c0 30 60 30 clrh [ %g1 + 0x30 ] 200be90: 82 10 20 5c mov 0x5c, %g1 200be94: c2 22 00 00 st %g1, [ %o0 ] 200be98: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 200be9c: 81 c7 e0 08 ret 200bea0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200b844 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200b844: 9d e3 bf a0 save %sp, -96, %sp uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200b848: 80 8e 7f f8 btst -8, %i1 200b84c: 12 80 00 19 bne 200b8b0 <== NEVER TAKEN 200b850: 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(); 200b854: 40 00 04 b9 call 200cb38 200b858: e0 06 00 00 ld [ %i0 ], %l0 st_gid = getegid(); 200b85c: 40 00 04 b3 call 200cb28 200b860: a2 10 00 08 mov %o0, %l1 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200b864: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 200b868: a3 2c 60 10 sll %l1, 0x10, %l1 200b86c: a3 34 60 10 srl %l1, 0x10, %l1 200b870: 80 a4 40 01 cmp %l1, %g1 200b874: 02 80 00 09 be 200b898 200b878: 83 2e 60 06 sll %i1, 6, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 200b87c: c2 14 20 3e lduh [ %l0 + 0x3e ], %g1 200b880: 91 2a 20 10 sll %o0, 0x10, %o0 200b884: 91 32 20 10 srl %o0, 0x10, %o0 200b888: 80 a2 00 01 cmp %o0, %g1 200b88c: 02 80 00 03 be 200b898 <== ALWAYS TAKEN 200b890: 83 2e 60 03 sll %i1, 3, %g1 200b894: 82 10 00 19 mov %i1, %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 ) 200b898: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 200b89c: 82 28 40 02 andn %g1, %g2, %g1 200b8a0: 80 a0 00 01 cmp %g0, %g1 200b8a4: b0 60 3f ff subx %g0, -1, %i0 return 1; return 0; } 200b8a8: 81 c7 e0 08 ret 200b8ac: 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 ); 200b8b0: 40 00 18 53 call 20119fc <__errno> <== NOT EXECUTED 200b8b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b8b8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200b8bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200b8c0: 81 c7 e0 08 ret <== NOT EXECUTED 200b8c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b934 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 200b934: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 200b938: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 200b93c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200b940: 80 a0 60 04 cmp %g1, 4 200b944: 12 80 00 26 bne 200b9dc <== NEVER TAKEN 200b948: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 200b94c: c2 04 20 08 ld [ %l0 + 8 ], %g1 200b950: 80 a0 60 00 cmp %g1, 0 200b954: 02 80 00 20 be 200b9d4 <== NEVER TAKEN 200b958: 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; 200b95c: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 200b960: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 200b964: 40 00 05 e8 call 200d104 200b968: 94 10 00 18 mov %i0, %o2 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 200b96c: c2 07 bf fc ld [ %fp + -4 ], %g1 200b970: e0 04 20 50 ld [ %l0 + 0x50 ], %l0 200b974: a0 04 00 01 add %l0, %g1, %l0 200b978: 40 00 1b ee call 2012930 200b97c: 90 10 00 10 mov %l0, %o0 200b980: 94 10 00 19 mov %i1, %o2 200b984: 92 10 00 08 mov %o0, %o1 200b988: 96 10 00 18 mov %i0, %o3 200b98c: 40 00 00 17 call 200b9e8 200b990: 90 10 00 10 mov %l0, %o0 200b994: a0 10 00 08 mov %o0, %l0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 200b998: 7f ff ff 88 call 200b7b8 200b99c: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 200b9a0: 90 10 00 18 mov %i0, %o0 200b9a4: 7f ff ff a8 call 200b844 200b9a8: 92 10 00 19 mov %i1, %o1 200b9ac: 80 a2 20 00 cmp %o0, 0 200b9b0: 02 80 00 04 be 200b9c0 <== NEVER TAKEN 200b9b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 200b9b8: 81 c7 e0 08 ret 200b9bc: 91 e8 00 10 restore %g0, %l0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 200b9c0: 40 00 18 0f call 20119fc <__errno> <== NOT EXECUTED 200b9c4: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 200b9c8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 200b9cc: 10 bf ff fb b 200b9b8 <== NOT EXECUTED 200b9d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 200b9d4: 7f ff ed 61 call 2006f58 <== NOT EXECUTED 200b9d8: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 200b9dc: 7f ff ed 5f call 2006f58 <== NOT EXECUTED 200b9e0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED =============================================================================== 02010488 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 2010488: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 201048c: 7f ff f1 ab call 200cb38 2010490: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 2010494: 91 2a 20 10 sll %o0, 0x10, %o0 2010498: 91 32 20 10 srl %o0, 0x10, %o0 201049c: 80 a2 20 00 cmp %o0, 0 20104a0: 32 80 00 0e bne,a 20104d8 <== NEVER TAKEN 20104a4: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 20104a8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 IMFS_update_ctime( jnode ); 20104ac: 90 07 bf f8 add %fp, -8, %o0 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 20104b0: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 20104b4: 92 10 20 00 clr %o1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 20104b8: b2 0e 6f ff and %i1, 0xfff, %i1 20104bc: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 20104c0: 7f ff ca 36 call 2002d98 20104c4: f2 24 20 30 st %i1, [ %l0 + 0x30 ] 20104c8: c2 07 bf f8 ld [ %fp + -8 ], %g1 20104cc: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 20104d0: 81 c7 e0 08 ret 20104d4: 91 e8 20 00 restore %g0, 0, %o0 * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 20104d8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 20104dc: 22 bf ff f4 be,a 20104ac <== NOT EXECUTED 20104e0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 20104e4: 40 00 05 46 call 20119fc <__errno> <== NOT EXECUTED 20104e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20104ec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20104f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20104f4: 81 c7 e0 08 ret <== NOT EXECUTED 20104f8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c41c : } int IMFS_fifo_close( rtems_libio_t *iop ) { 200c41c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200c420: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 200c424: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 200c428: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 200c42c: 7f ff fa e0 call 200afac <== NOT EXECUTED 200c430: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED if (! err) { 200c434: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200c438: 02 80 00 06 be 200c450 <== NOT EXECUTED 200c43c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 200c440: 06 80 00 14 bl 200c490 <== NOT EXECUTED 200c444: 01 00 00 00 nop <== NOT EXECUTED } 200c448: 81 c7 e0 08 ret <== NOT EXECUTED 200c44c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 200c450: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 200c454: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 200c458: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 200c45c: 40 00 01 d5 call 200cbb0 <== NOT EXECUTED 200c460: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED 200c464: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200c468: 12 80 00 08 bne 200c488 <== NOT EXECUTED 200c46c: 01 00 00 00 nop <== NOT EXECUTED 200c470: c2 14 60 34 lduh [ %l1 + 0x34 ], %g1 <== NOT EXECUTED 200c474: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200c478: 12 80 00 04 bne 200c488 <== NOT EXECUTED 200c47c: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 200c480: 7f ff da 1b call 2002cec <== NOT EXECUTED 200c484: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200c488: 81 c7 e0 08 ret <== NOT EXECUTED 200c48c: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 200c490: 40 00 15 5b call 20119fc <__errno> <== NOT EXECUTED 200c494: b0 20 00 18 neg %i0 <== NOT EXECUTED 200c498: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 200c49c: 81 c7 e0 08 ret <== NOT EXECUTED 200c4a0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 0200c2b8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200c2b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 200c2bc: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED 200c2c0: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <== NOT EXECUTED 200c2c4: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200c2c8: 02 80 00 0c be 200c2f8 <== NOT EXECUTED 200c2cc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 200c2d0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 200c2d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200c2d8: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 200c2dc: 7f ff fa 25 call 200ab70 <== NOT EXECUTED 200c2e0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200c2e4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200c2e8: 06 80 00 13 bl 200c334 <== NOT EXECUTED 200c2ec: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED } 200c2f0: 81 c7 e0 08 ret <== NOT EXECUTED 200c2f4: 81 e8 00 00 restore <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 200c2f8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 200c2fc: 02 80 00 0e be 200c334 <== NOT EXECUTED 200c300: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 200c304: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 200c308: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200c30c: 02 80 00 06 be 200c324 <== NOT EXECUTED 200c310: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 200c314: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 200c318: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 200c31c: 81 c7 e0 08 ret <== NOT EXECUTED 200c320: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 200c324: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 200c328: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 200c32c: 81 c7 e0 08 ret <== NOT EXECUTED 200c330: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 200c334: 40 00 15 b2 call 20119fc <__errno> <== NOT EXECUTED 200c338: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200c33c: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED } 200c340: 81 c7 e0 08 ret <== NOT EXECUTED 200c344: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c25c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200c25c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 200c260: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200c264: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 200c268: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 200c26c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 200c270: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200c274: 7f ff fa 21 call 200aaf8 <== NOT EXECUTED 200c278: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 200c27c: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 200c280: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200c284: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200c288: 06 80 00 05 bl 200c29c <== NOT EXECUTED 200c28c: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED } 200c290: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 200c294: 81 c7 e0 08 ret <== NOT EXECUTED 200c298: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 200c29c: 40 00 15 d8 call 20119fc <__errno> <== NOT EXECUTED 200c2a0: a0 20 00 10 neg %l0 <== NOT EXECUTED 200c2a4: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 200c2a8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 200c2ac: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 200c2b0: 10 bf ff f8 b 200c290 <== NOT EXECUTED 200c2b4: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED =============================================================================== 0200c4a4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200c4a4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 200c4a8: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200c4ac: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 200c4b0: 7f ff fb 10 call 200b0f0 200c4b4: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 200c4b8: b0 92 20 00 orcc %o0, 0, %i0 200c4bc: 06 80 00 04 bl 200c4cc <== ALWAYS TAKEN 200c4c0: 01 00 00 00 nop } 200c4c4: 81 c7 e0 08 ret <== NOT EXECUTED 200c4c8: 81 e8 00 00 restore <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 200c4cc: 40 00 15 4c call 20119fc <__errno> 200c4d0: b0 20 00 18 neg %i0 200c4d4: f0 22 00 00 st %i0, [ %o0 ] } 200c4d8: 81 c7 e0 08 ret 200c4dc: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200c3b4 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200c3b4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200c3b8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200c3bc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 200c3c0: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 200c3c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200c3c8: 7f ff fa 03 call 200abd4 <== NOT EXECUTED 200c3cc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 200c3d0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200c3d4: 04 80 00 08 ble 200c3f4 <== NOT EXECUTED 200c3d8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 200c3dc: 7f ff da 6f call 2002d98 <== NOT EXECUTED 200c3e0: 92 10 20 00 clr %o1 <== NOT EXECUTED 200c3e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200c3e8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 200c3ec: 81 c7 e0 08 ret <== NOT EXECUTED 200c3f0: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200c3f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200c3f8: 12 80 00 04 bne 200c408 <== NOT EXECUTED 200c3fc: 01 00 00 00 nop <== NOT EXECUTED } 200c400: 81 c7 e0 08 ret <== NOT EXECUTED 200c404: 81 e8 00 00 restore <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 200c408: 40 00 15 7d call 20119fc <__errno> <== NOT EXECUTED 200c40c: b0 20 00 18 neg %i0 <== NOT EXECUTED 200c410: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 200c414: 81 c7 e0 08 ret <== NOT EXECUTED 200c418: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 0200c348 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200c348: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200c34c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200c350: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 200c354: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 200c358: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200c35c: 7f ff fa 8d call 200ad90 <== NOT EXECUTED 200c360: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 200c364: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200c368: 04 80 00 09 ble 200c38c <== NOT EXECUTED 200c36c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 200c370: 7f ff da 8a call 2002d98 <== NOT EXECUTED 200c374: 92 10 20 00 clr %o1 <== NOT EXECUTED 200c378: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200c37c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 200c380: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 200c384: 81 c7 e0 08 ret <== NOT EXECUTED 200c388: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 200c38c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200c390: 12 80 00 04 bne 200c3a0 <== NOT EXECUTED 200c394: 01 00 00 00 nop <== NOT EXECUTED } 200c398: 81 c7 e0 08 ret <== NOT EXECUTED 200c39c: 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); 200c3a0: 40 00 15 97 call 20119fc <__errno> <== NOT EXECUTED 200c3a4: b0 20 00 18 neg %i0 <== NOT EXECUTED 200c3a8: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED } 200c3ac: 81 c7 e0 08 ret <== NOT EXECUTED 200c3b0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 0200c5ac : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200c5ac: 9d e3 bf a0 save %sp, -96, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 200c5b0: 80 a6 20 00 cmp %i0, 0 200c5b4: 02 80 00 26 be 200c64c <== NEVER TAKEN 200c5b8: 80 a6 60 00 cmp %i1, 0 if ( !name ) 200c5bc: 02 80 00 11 be 200c600 <== NEVER TAKEN 200c5c0: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200c5c4: 13 00 80 76 sethi %hi(0x201d800), %o1 200c5c8: 40 00 18 74 call 2012798 200c5cc: 92 12 61 50 or %o1, 0x150, %o1 ! 201d950 200c5d0: 80 a2 20 00 cmp %o0, 0 200c5d4: 02 80 00 09 be 200c5f8 <== NEVER TAKEN 200c5d8: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200c5dc: 13 00 80 76 sethi %hi(0x201d800), %o1 200c5e0: 40 00 18 6e call 2012798 200c5e4: 92 12 61 58 or %o1, 0x158, %o1 ! 201d958 200c5e8: 80 a2 20 00 cmp %o0, 0 200c5ec: 32 80 00 07 bne,a 200c608 <== ALWAYS TAKEN 200c5f0: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 return directory->Parent; 200c5f4: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200c5f8: 81 c7 e0 08 ret <== NOT EXECUTED 200c5fc: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200c600: 81 c7 e0 08 ret 200c604: 91 e8 20 00 restore %g0, 0, %o0 200c608: b0 06 20 54 add %i0, 0x54, %i0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 200c60c: 80 a4 00 18 cmp %l0, %i0 200c610: 12 80 00 07 bne 200c62c 200c614: 90 10 00 19 mov %i1, %o0 200c618: 81 c7 e0 08 ret 200c61c: 91 e8 20 00 restore %g0, 0, %o0 200c620: 80 a4 00 18 cmp %l0, %i0 200c624: 02 bf ff f7 be 200c600 200c628: 90 10 00 19 mov %i1, %o0 !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 ) ) 200c62c: 40 00 18 5b call 2012798 200c630: 92 04 20 0c add %l0, 0xc, %o1 200c634: 80 a2 20 00 cmp %o0, 0 200c638: 32 bf ff fa bne,a 200c620 200c63c: e0 04 00 00 ld [ %l0 ], %l0 200c640: b0 10 00 10 mov %l0, %i0 200c644: 81 c7 e0 08 ret 200c648: 81 e8 00 00 restore /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 200c64c: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED 200c650: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 200c654: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 200c658: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED 200c65c: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 200c660: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED 200c664: 40 00 00 a6 call 200c8fc <__assert_func> <== NOT EXECUTED 200c668: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED =============================================================================== 0200c4e8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200c4e8: 9d e3 bf 88 save %sp, -120, %sp * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 200c4ec: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 200c4f0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c4f4: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 200c4f8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 /* * 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; 200c4fc: e4 06 20 1c ld [ %i0 + 0x1c ], %l2 loc = temp_mt_entry->mt_fs_root; 200c500: c8 27 bf f0 st %g4, [ %fp + -16 ] 200c504: c6 27 bf f4 st %g3, [ %fp + -12 ] 200c508: c4 27 bf f8 st %g2, [ %fp + -8 ] 200c50c: 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; 200c510: c0 26 20 1c clr [ %i0 + 0x1c ] 200c514: a0 07 bf ec add %fp, -20, %l0 do { next = jnode->Parent; loc.node_access = (void *)jnode; 200c518: e4 27 bf ec st %l2, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200c51c: e2 04 a0 08 ld [ %l2 + 8 ], %l1 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 200c520: 7f ff fc a6 call 200b7b8 200c524: 90 10 00 10 mov %l0, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200c528: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 200c52c: 80 a0 60 01 cmp %g1, 1 200c530: 12 80 00 17 bne 200c58c 200c534: 84 04 a0 54 add %l2, 0x54, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200c538: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 200c53c: 80 a0 40 02 cmp %g1, %g2 200c540: 22 80 00 14 be,a 200c590 200c544: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 200c548: 80 a4 a0 00 cmp %l2, 0 200c54c: 02 80 00 0e be 200c584 200c550: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200c554: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 200c558: 80 a0 60 01 cmp %g1, 1 200c55c: 32 bf ff f0 bne,a 200c51c <== NEVER TAKEN 200c560: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED 200c564: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 200c568: 84 04 a0 54 add %l2, 0x54, %g2 200c56c: 80 a0 40 02 cmp %g1, %g2 200c570: 22 bf ff eb be,a 200c51c 200c574: e4 27 bf ec st %l2, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200c578: a4 90 60 00 orcc %g1, 0, %l2 200c57c: 32 bf ff e8 bne,a 200c51c <== ALWAYS TAKEN 200c580: e4 27 bf ec st %l2, [ %fp + -20 ] return 0; } 200c584: 81 c7 e0 08 ret 200c588: 91 e8 20 00 restore %g0, 0, %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 200c58c: 90 10 20 00 clr %o0 200c590: 7f ff d8 3f call 200268c 200c594: 92 10 00 10 mov %l0, %o1 if (result != 0) 200c598: 80 a2 20 00 cmp %o0, 0 200c59c: 02 bf ff eb be 200c548 <== ALWAYS TAKEN 200c5a0: a4 10 00 11 mov %l1, %l2 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200c5a4: 81 c7 e0 08 ret <== NOT EXECUTED 200c5a8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 0200c670 : const char *path, int pathlen, char *token, int *token_len ) { 200c670: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 200c674: a0 10 20 00 clr %l0 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200c678: 10 80 00 08 b 200c698 200c67c: e2 0e 00 00 ldub [ %i0 ], %l1 200c680: 16 80 00 0c bge 200c6b0 200c684: 80 a4 20 20 cmp %l0, 0x20 token[i] = c; 200c688: e2 2e 80 10 stb %l1, [ %i2 + %l0 ] if ( i == IMFS_NAME_MAX ) 200c68c: 02 80 00 2c be 200c73c 200c690: a0 04 20 01 inc %l0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 200c694: e2 0e 00 10 ldub [ %i0 + %l0 ], %l1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200c698: a5 2c 60 18 sll %l1, 0x18, %l2 200c69c: 7f ff dd d6 call 2003df4 200c6a0: 91 3c a0 18 sra %l2, 0x18, %o0 200c6a4: 80 a2 20 00 cmp %o0, 0 200c6a8: 02 bf ff f6 be 200c680 200c6ac: 80 a4 00 19 cmp %l0, %i1 /* * Copy a seperator into token. */ if ( i == 0 ) { 200c6b0: 80 a4 20 00 cmp %l0, 0 200c6b4: 12 80 00 0c bne 200c6e4 200c6b8: 82 06 80 10 add %i2, %l0, %g1 token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200c6bc: 80 a4 a0 00 cmp %l2, 0 200c6c0: 02 80 00 21 be 200c744 200c6c4: e2 2e 80 00 stb %l1, [ %i2 ] 200c6c8: 80 a6 60 00 cmp %i1, 0 200c6cc: 22 80 00 1f be,a 200c748 200c6d0: e0 26 c0 00 st %l0, [ %i3 ] 200c6d4: a0 10 20 01 mov 1, %l0 /* * Set token_len to the number of characters copied. */ *token_len = i; 200c6d8: e0 26 c0 00 st %l0, [ %i3 ] */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200c6dc: 81 c7 e0 08 ret 200c6e0: 91 e8 20 01 restore %g0, 1, %o0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 200c6e4: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200c6e8: 80 a0 60 00 cmp %g1, 0 200c6ec: 32 80 00 02 bne,a 200c6f4 <== ALWAYS TAKEN 200c6f0: c0 2e 80 10 clrb [ %i2 + %l0 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 200c6f4: e0 26 c0 00 st %l0, [ %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 ) 200c6f8: 90 10 00 1a mov %i2, %o0 200c6fc: 13 00 80 76 sethi %hi(0x201d800), %o1 200c700: b0 10 20 02 mov 2, %i0 200c704: 40 00 18 25 call 2012798 200c708: 92 12 61 80 or %o1, 0x180, %o1 200c70c: 80 a2 20 00 cmp %o0, 0 200c710: 02 80 00 09 be 200c734 200c714: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200c718: 13 00 80 76 sethi %hi(0x201d800), %o1 200c71c: 40 00 18 1f call 2012798 200c720: 92 12 61 78 or %o1, 0x178, %o1 ! 201d978 <__FUNCTION__.5518+0x18> 200c724: 80 a0 00 08 cmp %g0, %o0 200c728: b0 60 20 00 subx %g0, 0, %i0 200c72c: b0 0e 20 02 and %i0, 2, %i0 200c730: b0 06 20 01 inc %i0 type = IMFS_CURRENT_DIR; } return type; } 200c734: 81 c7 e0 08 ret 200c738: 81 e8 00 00 restore c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) 200c73c: 81 c7 e0 08 ret 200c740: 91 e8 20 04 restore %g0, 4, %o0 /* * Set token_len to the number of characters copied. */ *token_len = i; 200c744: e0 26 c0 00 st %l0, [ %i3 ] type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 200c748: 81 c7 e0 08 ret 200c74c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002220 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 2002220: 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, 2002224: 03 00 80 79 sethi %hi(0x201e400), %g1 2002228: c2 00 63 b8 ld [ %g1 + 0x3b8 ], %g1 ! 201e7b8 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 200222c: 80 a0 60 10 cmp %g1, 0x10 2002230: 02 80 00 0a be 2002258 <== NEVER TAKEN 2002234: 86 10 20 00 clr %g3 2002238: 84 10 20 20 mov 0x20, %g2 200223c: 80 a0 40 02 cmp %g1, %g2 2002240: 02 80 00 06 be 2002258 2002244: 86 00 e0 01 inc %g3 2002248: 80 a0 e0 05 cmp %g3, 5 200224c: 12 bf ff fc bne 200223c <== ALWAYS TAKEN 2002250: 85 28 a0 01 sll %g2, 1, %g2 2002254: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 2002258: 05 00 80 7b sethi %hi(0x201ec00), %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(); 200225c: 40 00 24 fa call 200b644 2002260: c2 20 a3 38 st %g1, [ %g2 + 0x338 ] ! 201ef38 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; 2002264: 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(); 2002268: d0 26 20 1c st %o0, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 200226c: f2 26 20 28 st %i1, [ %i0 + 0x28 ] * 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(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 2002270: f6 26 20 24 st %i3, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002274: 13 00 80 75 sethi %hi(0x201d400), %o1 2002278: 90 06 20 38 add %i0, 0x38, %o0 200227c: 40 00 40 1c call 20122ec 2002280: 92 12 63 9c or %o1, 0x39c, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 2002284: 90 10 20 01 mov 1, %o0 2002288: 40 00 01 f6 call 2002a60 200228c: 92 10 20 10 mov 0x10, %o1 if ( !fs_info ) { 2002290: 80 a2 20 00 cmp %o0, 0 2002294: 02 80 00 11 be 20022d8 <== NEVER TAKEN 2002298: 05 00 80 7b sethi %hi(0x201ec00), %g2 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 200229c: c8 06 20 1c ld [ %i0 + 0x1c ], %g4 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 20022a0: c2 00 a3 3c ld [ %g2 + 0x33c ], %g1 fs_info->ino_count = 1; 20022a4: 86 10 20 01 mov 1, %g3 20022a8: c6 22 20 04 st %g3, [ %o0 + 4 ] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 20022ac: c6 21 20 38 st %g3, [ %g4 + 0x38 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 20022b0: 86 00 60 01 add %g1, 1, %g3 20022b4: c6 20 a3 3c st %g3, [ %g2 + 0x33c ] 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; 20022b8: d0 26 20 34 st %o0, [ %i0 + 0x34 ] */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 20022bc: f6 22 20 0c st %i3, [ %o0 + 0xc ] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 20022c0: f4 22 20 08 st %i2, [ %o0 + 8 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 20022c4: c2 22 00 00 st %g1, [ %o0 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 20022c8: 40 00 22 0e call 200ab00 20022cc: b0 10 20 00 clr %i0 return 0; } 20022d0: 81 c7 e0 08 ret 20022d4: 81 e8 00 00 restore /* * 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); 20022d8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED 20022dc: 40 00 02 84 call 2002cec <== NOT EXECUTED 20022e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 20022e4: 40 00 3d c6 call 20119fc <__errno> <== NOT EXECUTED 20022e8: 01 00 00 00 nop <== NOT EXECUTED 20022ec: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20022f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20022f4: 81 c7 e0 08 ret <== NOT EXECUTED 20022f8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020022fc : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 20022fc: 9d e3 bf 50 save %sp, -176, %sp int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2002300: c2 06 00 00 ld [ %i0 ], %g1 2002304: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 2002308: c2 10 60 34 lduh [ %g1 + 0x34 ], %g1 200230c: 80 a0 60 07 cmp %g1, 7 2002310: 18 80 00 1f bgu 200238c 2002314: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 2002318: 40 00 41 86 call 2012930 200231c: 90 10 00 1a mov %i2, %o0 2002320: a0 07 bf b0 add %fp, -80, %l0 2002324: 92 10 00 08 mov %o0, %o1 2002328: 96 07 bf fc add %fp, -4, %o3 200232c: 94 10 00 10 mov %l0, %o2 2002330: 40 00 28 d0 call 200c670 2002334: 90 10 00 1a mov %i2, %o0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 2002338: 90 10 00 19 mov %i1, %o0 200233c: 94 10 00 10 mov %l0, %o2 2002340: 92 10 20 03 mov 3, %o1 2002344: 17 00 00 28 sethi %hi(0xa000), %o3 2002348: 98 07 bf d8 add %fp, -40, %o4 200234c: 40 00 24 ce call 200b684 2002350: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 2002354: 80 a2 20 00 cmp %o0, 0 2002358: 02 80 00 13 be 20023a4 <== NEVER TAKEN 200235c: c2 07 bf d8 ld [ %fp + -40 ], %g1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 2002360: 90 07 bf f4 add %fp, -12, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 2002364: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 2002368: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 200236c: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 2002370: 40 00 02 8a call 2002d98 2002374: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] 2002378: c4 07 bf f4 ld [ %fp + -12 ], %g2 200237c: c2 07 bf d8 ld [ %fp + -40 ], %g1 2002380: c4 20 60 48 st %g2, [ %g1 + 0x48 ] return 0; } 2002384: 81 c7 e0 08 ret 2002388: 91 e8 20 00 restore %g0, 0, %o0 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 200238c: 40 00 3d 9c call 20119fc <__errno> 2002390: b0 10 3f ff mov -1, %i0 2002394: 82 10 20 1f mov 0x1f, %g1 2002398: c2 22 00 00 st %g1, [ %o0 ] 200239c: 81 c7 e0 08 ret 20023a0: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 20023a4: 40 00 3d 96 call 20119fc <__errno> <== NOT EXECUTED 20023a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20023ac: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20023b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20023b4: 81 c7 e0 08 ret <== NOT EXECUTED 20023b8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200f358 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 200f358: 9d e3 bf a0 save %sp, -96, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 200f35c: 80 a6 20 00 cmp %i0, 0 200f360: 02 80 00 18 be 200f3c0 <== NEVER TAKEN 200f364: 11 00 80 77 sethi %hi(0x201dc00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f368: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200f36c: 80 a0 60 05 cmp %g1, 5 200f370: 12 80 00 1b bne 200f3dc <== NEVER TAKEN 200f374: 90 10 00 18 mov %i0, %o0 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 200f378: 92 10 00 19 mov %i1, %o1 200f37c: 7f ff fe 61 call 200ed00 200f380: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 200f384: c2 02 00 00 ld [ %o0 ], %g1 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 200f388: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 200f38c: 80 a0 60 00 cmp %g1, 0 200f390: 02 80 00 04 be 200f3a0 200f394: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 200f398: 81 c7 e0 08 ret 200f39c: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 200f3a0: 7f ff fe 4b call 200eccc 200f3a4: b0 10 20 01 mov 1, %i0 if ( !memory ) 200f3a8: 80 a2 20 00 cmp %o0, 0 200f3ac: 02 bf ff fb be 200f398 <== NEVER TAKEN 200f3b0: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 200f3b4: d0 24 00 00 st %o0, [ %l0 ] return 0; } 200f3b8: 81 c7 e0 08 ret 200f3bc: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 200f3c0: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f3c4: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f3c8: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f3cc: 94 12 a2 d0 or %o2, 0x2d0, %o2 <== NOT EXECUTED 200f3d0: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200f3d4: 7f ff f5 4a call 200c8fc <__assert_func> <== NOT EXECUTED 200f3d8: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f3dc: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f3e0: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f3e4: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f3e8: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f3ec: 94 12 a2 d0 or %o2, 0x2d0, %o2 <== NOT EXECUTED 200f3f0: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 200f3f4: 7f ff f5 42 call 200c8fc <__assert_func> <== NOT EXECUTED 200f3f8: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED =============================================================================== 0200f400 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200f400: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 200f404: 80 a6 20 00 cmp %i0, 0 200f408: 02 80 00 5b be 200f574 <== NEVER TAKEN 200f40c: 11 00 80 77 sethi %hi(0x201dc00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f410: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200f414: 80 a0 60 05 cmp %g1, 5 200f418: 12 80 00 50 bne 200f558 <== NEVER TAKEN 200f41c: 03 00 80 7b sethi %hi(0x201ec00), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f420: e2 00 63 38 ld [ %g1 + 0x338 ], %l1 ! 201ef38 200f424: a1 34 60 02 srl %l1, 2, %l0 200f428: 92 10 00 10 mov %l0, %o1 200f42c: 40 00 2e 8d call 201ae60 <.umul> 200f430: 90 04 20 01 add %l0, 1, %o0 200f434: 92 10 00 10 mov %l0, %o1 200f438: 40 00 2e 8a call 201ae60 <.umul> 200f43c: 90 02 20 01 inc %o0 200f440: 92 10 00 11 mov %l1, %o1 200f444: 40 00 2e 87 call 201ae60 <.umul> 200f448: 90 02 3f ff add %o0, -1, %o0 200f44c: 82 10 20 00 clr %g1 200f450: 80 a0 40 19 cmp %g1, %i1 200f454: 04 80 00 37 ble 200f530 <== ALWAYS TAKEN 200f458: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 200f45c: e4 1e 20 50 ldd [ %i0 + 0x50 ], %l2 <== NOT EXECUTED 200f460: 80 a6 40 12 cmp %i1, %l2 200f464: 04 80 00 29 ble 200f508 <== ALWAYS TAKEN 200f468: a9 3c 60 1f sra %l1, 0x1f, %l4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f46c: 96 10 00 11 mov %l1, %o3 200f470: 94 10 00 14 mov %l4, %o2 200f474: 90 10 00 19 mov %i1, %o0 200f478: 40 00 30 0c call 201b4a8 <__divdi3> 200f47c: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f480: 90 10 00 12 mov %l2, %o0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f484: a0 10 00 09 mov %o1, %l0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f488: 94 10 00 14 mov %l4, %o2 200f48c: 92 10 00 13 mov %l3, %o1 200f490: 40 00 30 06 call 201b4a8 <__divdi3> 200f494: 96 10 00 11 mov %l1, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200f498: 80 a4 00 09 cmp %l0, %o1 200f49c: 0a 80 00 21 bcs 200f520 <== NEVER TAKEN 200f4a0: a4 10 00 09 mov %o1, %l2 200f4a4: 10 80 00 05 b 200f4b8 200f4a8: a2 10 00 09 mov %o1, %l1 200f4ac: 80 a4 00 11 cmp %l0, %l1 200f4b0: 2a 80 00 1d bcs,a 200f524 200f4b4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200f4b8: 90 10 00 18 mov %i0, %o0 200f4bc: 7f ff ff a7 call 200f358 200f4c0: 92 10 00 11 mov %l1, %o1 200f4c4: 80 a2 20 00 cmp %o0, 0 200f4c8: 22 bf ff f9 be,a 200f4ac <== ALWAYS TAKEN 200f4cc: a2 04 60 01 inc %l1 for ( ; block>=old_blocks ; block-- ) { 200f4d0: 10 80 00 06 b 200f4e8 <== NOT EXECUTED 200f4d4: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 200f4d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200f4dc: 7f ff fe dc call 200f04c <== NOT EXECUTED 200f4e0: a2 04 7f ff add %l1, -1, %l1 <== 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-- ) { 200f4e4: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 200f4e8: 08 bf ff fc bleu 200f4d8 <== NOT EXECUTED 200f4ec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200f4f0: 40 00 09 43 call 20119fc <__errno> <== NOT EXECUTED 200f4f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f4f8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 200f4fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f500: 81 c7 e0 08 ret <== NOT EXECUTED 200f504: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 200f508: 12 80 00 04 bne 200f518 <== NEVER TAKEN 200f50c: 80 a6 80 13 cmp %i2, %l3 200f510: 18 bf ff d7 bgu 200f46c 200f514: a9 3c 60 1f sra %l1, 0x1f, %l4 200f518: 81 c7 e0 08 ret 200f51c: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200f520: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED 200f524: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 200f528: 81 c7 e0 08 ret 200f52c: 91 e8 20 00 restore %g0, 0, %o0 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200f530: 12 80 00 04 bne 200f540 <== NEVER TAKEN 200f534: 80 a2 00 1a cmp %o0, %i2 200f538: 38 bf ff ca bgu,a 200f460 <== ALWAYS TAKEN 200f53c: e4 1e 20 50 ldd [ %i0 + 0x50 ], %l2 rtems_set_errno_and_return_minus_one( EINVAL ); 200f540: 40 00 09 2f call 20119fc <__errno> <== NOT EXECUTED 200f544: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f548: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200f54c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f550: 81 c7 e0 08 ret <== NOT EXECUTED 200f554: 81 e8 00 00 restore <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f558: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f55c: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f560: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f564: 94 12 a2 e8 or %o2, 0x2e8, %o2 <== NOT EXECUTED 200f568: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 200f56c: 7f ff f4 e4 call 200c8fc <__assert_func> <== NOT EXECUTED 200f570: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 200f574: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f578: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f57c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f580: 94 12 a2 e8 or %o2, 0x2e8, %o2 <== NOT EXECUTED 200f584: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200f588: 7f ff f4 dd call 200c8fc <__assert_func> <== NOT EXECUTED 200f58c: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED =============================================================================== 0200ed00 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200ed00: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 200ed04: 80 a6 20 00 cmp %i0, 0 200ed08: 02 80 00 94 be 200ef58 <== NEVER TAKEN 200ed0c: 11 00 80 77 sethi %hi(0x201dc00), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 200ed10: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200ed14: 80 a0 60 05 cmp %g1, 5 200ed18: 12 80 00 97 bne 200ef74 <== NEVER TAKEN 200ed1c: 03 00 80 7b sethi %hi(0x201ec00), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200ed20: e0 00 63 38 ld [ %g1 + 0x338 ], %l0 ! 201ef38 200ed24: a1 34 20 02 srl %l0, 2, %l0 200ed28: 82 04 3f ff add %l0, -1, %g1 200ed2c: 80 a6 40 01 cmp %i1, %g1 200ed30: 08 80 00 20 bleu 200edb0 <== ALWAYS TAKEN 200ed34: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200ed38: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED 200ed3c: 40 00 30 49 call 201ae60 <.umul> <== NOT EXECUTED 200ed40: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200ed44: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 200ed48: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200ed4c: 18 80 00 21 bgu 200edd0 <== NOT EXECUTED 200ed50: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 200ed54: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200ed58: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200ed5c: 40 00 31 27 call 201b1f8 <.urem> <== NOT EXECUTED 200ed60: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200ed64: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200ed68: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200ed6c: 40 00 30 77 call 201af48 <.udiv> <== NOT EXECUTED 200ed70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 200ed74: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200ed78: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 200ed7c: 02 80 00 42 be 200ee84 <== NOT EXECUTED 200ed80: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 200ed84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ed88: 02 80 00 5e be 200ef00 <== NOT EXECUTED 200ed8c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 200ed90: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 200ed94: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 200ed98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200ed9c: 02 80 00 52 be 200eee4 <== NOT EXECUTED 200eda0: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 200eda4: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 200eda8: 81 c7 e0 08 ret <== NOT EXECUTED 200edac: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 200edb0: 02 80 00 40 be 200eeb0 200edb4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 if ( !p ) { 200edb8: 80 a2 20 00 cmp %o0, 0 200edbc: 02 80 00 43 be 200eec8 200edc0: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 200edc4: b3 2e 60 02 sll %i1, 2, %i1 200edc8: 81 c7 e0 08 ret 200edcc: 91 ea 00 19 restore %o0, %i1, %o0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200edd0: 90 02 20 01 inc %o0 <== NOT EXECUTED 200edd4: 40 00 30 23 call 201ae60 <.umul> <== NOT EXECUTED 200edd8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200eddc: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 200ede0: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 200ede4: 18 80 00 31 bgu 200eea8 <== NOT EXECUTED 200ede8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 200edec: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200edf0: 40 00 31 02 call 201b1f8 <.urem> <== NOT EXECUTED 200edf4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200edf8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200edfc: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200ee00: 40 00 30 52 call 201af48 <.udiv> <== NOT EXECUTED 200ee04: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200ee08: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200ee0c: 40 00 30 4f call 201af48 <.udiv> <== NOT EXECUTED 200ee10: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200ee14: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 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; 200ee18: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200ee1c: 40 00 30 f7 call 201b1f8 <.urem> <== NOT EXECUTED 200ee20: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 200ee24: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200ee28: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 200ee2c: 02 80 00 3c be 200ef1c <== NOT EXECUTED 200ee30: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 200ee34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ee38: 02 80 00 56 be 200ef90 <== NOT EXECUTED 200ee3c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 200ee40: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 200ee44: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 200ee48: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200ee4c: 02 80 00 58 be 200efac <== NOT EXECUTED 200ee50: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 200ee54: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 200ee58: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 200ee5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200ee60: 12 bf ff d9 bne 200edc4 <== NOT EXECUTED 200ee64: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 200ee68: 7f ff ff 99 call 200eccc <== NOT EXECUTED 200ee6c: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 200ee70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200ee74: 22 80 00 13 be,a 200eec0 <== NOT EXECUTED 200ee78: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 200ee7c: 10 bf ff d2 b 200edc4 <== NOT EXECUTED 200ee80: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 200ee84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ee88: 02 80 00 0e be 200eec0 <== NOT EXECUTED 200ee8c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 200ee90: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 200ee94: c2 00 40 10 ld [ %g1 + %l0 ], %g1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 200ee98: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 200ee9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200eea0: 12 80 00 08 bne 200eec0 <== NOT EXECUTED 200eea4: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 200eea8: 81 c7 e0 08 ret <== NOT EXECUTED 200eeac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 200eeb0: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200eeb4: 80 a2 20 00 cmp %o0, 0 200eeb8: 02 bf ff fc be 200eea8 <== NEVER TAKEN 200eebc: b0 02 00 19 add %o0, %i1, %i0 /* * This means the requested block number is out of range. */ return 0; } 200eec0: 81 c7 e0 08 ret 200eec4: 81 e8 00 00 restore p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200eec8: 7f ff ff 81 call 200eccc 200eecc: 01 00 00 00 nop if ( !p ) 200eed0: 80 a2 20 00 cmp %o0, 0 200eed4: 22 bf ff fb be,a 200eec0 <== NEVER TAKEN 200eed8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 200eedc: 10 bf ff ba b 200edc4 200eee0: d0 26 20 58 st %o0, [ %i0 + 0x58 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200eee4: 7f ff ff 7a call 200eccc <== NOT EXECUTED 200eee8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 200eeec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200eef0: 22 bf ff f4 be,a 200eec0 <== NOT EXECUTED 200eef4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 200eef8: 10 bf ff ab b 200eda4 <== NOT EXECUTED 200eefc: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200ef00: 7f ff ff 73 call 200eccc <== NOT EXECUTED 200ef04: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 200ef08: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 200ef0c: 22 bf ff ed be,a 200eec0 <== NOT EXECUTED 200ef10: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 200ef14: 10 bf ff 9f b 200ed90 <== NOT EXECUTED 200ef18: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 200ef1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ef20: 02 bf ff e8 be 200eec0 <== NOT EXECUTED 200ef24: b0 10 20 00 clr %i0 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 200ef28: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 200ef2c: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 200ef30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ef34: 02 bf ff e3 be 200eec0 <== NOT EXECUTED 200ef38: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 200ef3c: c2 00 40 10 ld [ %g1 + %l0 ], %g1 <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 200ef40: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 200ef44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ef48: 02 bf ff d8 be 200eea8 <== NOT EXECUTED 200ef4c: b0 00 40 19 add %g1, %i1, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 200ef50: 81 c7 e0 08 ret <== NOT EXECUTED 200ef54: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 200ef58: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200ef5c: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200ef60: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200ef64: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 200ef68: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200ef6c: 7f ff f6 64 call 200c8fc <__assert_func> <== NOT EXECUTED 200ef70: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 200ef74: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200ef78: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200ef7c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200ef80: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 200ef84: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 200ef88: 7f ff f6 5d call 200c8fc <__assert_func> <== NOT EXECUTED 200ef8c: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200ef90: 7f ff ff 4f call 200eccc <== NOT EXECUTED 200ef94: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 200ef98: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 200ef9c: 22 bf ff c9 be,a 200eec0 <== NOT EXECUTED 200efa0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 200efa4: 10 bf ff a7 b 200ee40 <== NOT EXECUTED 200efa8: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200efac: 7f ff ff 48 call 200eccc <== NOT EXECUTED 200efb0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 200efb4: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 200efb8: 22 bf ff c2 be,a 200eec0 <== NOT EXECUTED 200efbc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 200efc0: 10 bf ff a5 b 200ee54 <== NOT EXECUTED 200efc4: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED =============================================================================== 0200fa60 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200fa60: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 200fa64: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200fa68: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 200fa6c: 02 80 00 b5 be 200fd40 <== NEVER TAKEN 200fa70: a6 10 00 1a mov %i2, %l3 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 200fa74: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200fa78: 84 00 7f fb add %g1, -5, %g2 200fa7c: 80 a0 a0 01 cmp %g2, 1 200fa80: 18 80 00 a8 bgu 200fd20 <== NEVER TAKEN 200fa84: 80 a6 e0 00 cmp %i3, 0 /* * Error checks on arguments */ assert( dest ); 200fa88: 02 80 00 96 be 200fce0 <== NEVER TAKEN 200fa8c: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 200fa90: 02 80 00 86 be 200fca8 <== NEVER TAKEN 200fa94: 80 a0 60 06 cmp %g1, 6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 200fa98: 02 80 00 5f be 200fc14 <== NEVER TAKEN 200fa9c: 86 10 20 00 clr %g3 * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 200faa0: c4 04 20 50 ld [ %l0 + 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; 200faa4: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200faa8: 80 a0 c0 02 cmp %g3, %g2 200faac: c8 04 20 54 ld [ %l0 + 0x54 ], %g4 200fab0: 04 80 00 52 ble 200fbf8 <== ALWAYS TAKEN 200fab4: 9a 07 00 1a add %i4, %i2, %o5 my_length = the_jnode->info.file.size - start; 200fab8: 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; 200fabc: 29 00 80 7b sethi %hi(0x201ec00), %l4 <== NOT EXECUTED 200fac0: e2 05 23 38 ld [ %l4 + 0x338 ], %l1 ! 201ef38 <== NOT EXECUTED 200fac4: 90 10 00 12 mov %l2, %o0 200fac8: ab 3c 60 1f sra %l1, 0x1f, %l5 200facc: 96 10 00 11 mov %l1, %o3 200fad0: 94 10 00 15 mov %l5, %o2 200fad4: 40 00 2f 5c call 201b844 <__moddi3> 200fad8: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200fadc: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200fae0: ac 10 00 09 mov %o1, %l6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200fae4: 94 10 00 15 mov %l5, %o2 200fae8: 92 10 00 13 mov %l3, %o1 200faec: 40 00 2e 6f call 201b4a8 <__divdi3> 200faf0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 200faf4: 80 a5 a0 00 cmp %l6, 0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200faf8: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 200fafc: aa 10 00 1b mov %i3, %l5 200fb00: 02 80 00 14 be 200fb50 200fb04: b0 10 20 00 clr %i0 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200fb08: 90 10 00 10 mov %l0, %o0 200fb0c: 7f ff fc 7d call 200ed00 200fb10: 94 10 20 00 clr %o2 assert( block_ptr ); 200fb14: 80 a2 20 00 cmp %o0, 0 200fb18: 02 80 00 92 be 200fd60 <== NEVER TAKEN 200fb1c: a2 24 40 16 sub %l1, %l6, %l1 */ 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; 200fb20: 80 a7 00 11 cmp %i4, %l1 200fb24: 18 80 00 4f bgu 200fc60 200fb28: b0 10 00 1c mov %i4, %i0 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200fb2c: d2 02 00 00 ld [ %o0 ], %o1 200fb30: 94 10 00 18 mov %i0, %o2 200fb34: 90 10 00 1b mov %i3, %o0 200fb38: 40 00 09 ed call 20122ec 200fb3c: 92 02 40 16 add %o1, %l6, %o1 dest += to_copy; block++; my_length -= to_copy; 200fb40: e2 05 23 38 ld [ %l4 + 0x338 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 200fb44: aa 06 c0 18 add %i3, %i0, %l5 block++; 200fb48: a4 04 a0 01 inc %l2 my_length -= to_copy; 200fb4c: 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 ) { 200fb50: 80 a7 00 11 cmp %i4, %l1 200fb54: 0a 80 00 15 bcs 200fba8 200fb58: 80 a7 20 00 cmp %i4, 0 200fb5c: a8 15 23 38 or %l4, 0x338, %l4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200fb60: 90 10 00 10 mov %l0, %o0 200fb64: 92 10 00 12 mov %l2, %o1 200fb68: 7f ff fc 66 call 200ed00 200fb6c: 94 10 20 00 clr %o2 assert( block_ptr ); 200fb70: 80 a2 20 00 cmp %o0, 0 200fb74: 02 80 00 53 be 200fcc0 <== NEVER TAKEN 200fb78: 94 10 00 11 mov %l1, %o2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200fb7c: d2 02 00 00 ld [ %o0 ], %o1 200fb80: 40 00 09 db call 20122ec 200fb84: 90 10 00 15 mov %l5, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200fb88: c2 05 00 00 ld [ %l4 ], %g1 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 200fb8c: b8 27 00 11 sub %i4, %l1, %i4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 200fb90: aa 05 40 11 add %l5, %l1, %l5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200fb94: 80 a0 40 1c cmp %g1, %i4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 200fb98: a4 04 a0 01 inc %l2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200fb9c: 08 bf ff f1 bleu 200fb60 200fba0: b0 06 00 11 add %i0, %l1, %i0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200fba4: 80 a7 20 00 cmp %i4, 0 200fba8: 02 80 00 0e be 200fbe0 200fbac: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200fbb0: 92 10 00 12 mov %l2, %o1 200fbb4: 90 10 00 10 mov %l0, %o0 200fbb8: 7f ff fc 52 call 200ed00 200fbbc: 94 10 20 00 clr %o2 assert( block_ptr ); 200fbc0: 80 a2 20 00 cmp %o0, 0 200fbc4: 02 80 00 4f be 200fd00 <== NEVER TAKEN 200fbc8: b0 06 00 1c add %i0, %i4, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200fbcc: d2 02 00 00 ld [ %o0 ], %o1 200fbd0: 90 10 00 15 mov %l5, %o0 200fbd4: 40 00 09 c6 call 20122ec 200fbd8: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 200fbdc: 90 07 bf f8 add %fp, -8, %o0 200fbe0: 7f ff cc 6e call 2002d98 200fbe4: 92 10 20 00 clr %o1 200fbe8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200fbec: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 200fbf0: 81 c7 e0 08 ret 200fbf4: 81 e8 00 00 restore * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 200fbf8: 12 bf ff b2 bne 200fac0 <== NEVER TAKEN 200fbfc: 29 00 80 7b sethi %hi(0x201ec00), %l4 200fc00: 80 a3 40 04 cmp %o5, %g4 200fc04: 08 bf ff b0 bleu 200fac4 200fc08: e2 05 23 38 ld [ %l4 + 0x338 ], %l1 my_length = the_jnode->info.file.size - start; 200fc0c: 10 bf ff ae b 200fac4 200fc10: b8 21 00 01 sub %g4, %g1, %i4 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)) 200fc14: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 200fc18: 82 10 20 00 clr %g1 <== NOT EXECUTED 200fc1c: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 200fc20: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 200fc24: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200fc28: 04 80 00 10 ble 200fc68 <== NOT EXECUTED 200fc2c: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200fc30: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 200fc34: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 200fc38: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 200fc3c: 40 00 09 ac call 20122ec <== NOT EXECUTED 200fc40: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 200fc44: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 200fc48: 7f ff cc 54 call 2002d98 <== NOT EXECUTED 200fc4c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200fc50: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200fc54: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED return my_length; 200fc58: 81 c7 e0 08 ret <== NOT EXECUTED 200fc5c: 81 e8 00 00 restore <== NOT EXECUTED */ 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; 200fc60: 10 bf ff b3 b 200fb2c 200fc64: b0 10 00 11 mov %l1, %i0 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)) 200fc68: 12 80 00 04 bne 200fc78 <== NOT EXECUTED 200fc6c: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 200fc70: 38 bf ff f1 bgu,a 200fc34 <== NOT EXECUTED 200fc74: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200fc78: 92 02 40 13 add %o1, %l3, %o1 <== 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)) 200fc7c: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200fc80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200fc84: 40 00 09 9a call 20122ec <== NOT EXECUTED 200fc88: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 200fc8c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 200fc90: 7f ff cc 42 call 2002d98 <== NOT EXECUTED 200fc94: 92 10 20 00 clr %o1 <== NOT EXECUTED 200fc98: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200fc9c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED return my_length; 200fca0: 81 c7 e0 08 ret <== NOT EXECUTED 200fca4: 81 e8 00 00 restore <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 200fca8: 40 00 07 55 call 20119fc <__errno> <== NOT EXECUTED 200fcac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200fcb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200fcb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200fcb8: 81 c7 e0 08 ret <== NOT EXECUTED 200fcbc: 81 e8 00 00 restore <== 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 ); assert( block_ptr ); 200fcc0: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fcc4: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fcc8: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fccc: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fcd0: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fcd4: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200fcd8: 7f ff f3 09 call 200c8fc <__assert_func> <== NOT EXECUTED 200fcdc: 92 10 22 a7 mov 0x2a7, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 200fce0: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fce4: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fce8: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fcec: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fcf0: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fcf4: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 200fcf8: 7f ff f3 01 call 200c8fc <__assert_func> <== NOT EXECUTED 200fcfc: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 200fd00: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fd04: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fd08: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fd0c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fd10: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fd14: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200fd18: 7f ff f2 f9 call 200c8fc <__assert_func> <== NOT EXECUTED 200fd1c: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 200fd20: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fd24: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fd28: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fd2c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fd30: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fd34: 96 12 e1 d0 or %o3, 0x1d0, %o3 <== NOT EXECUTED 200fd38: 7f ff f2 f1 call 200c8fc <__assert_func> <== NOT EXECUTED 200fd3c: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 200fd40: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fd44: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fd48: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fd4c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fd50: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fd54: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200fd58: 7f ff f2 e9 call 200c8fc <__assert_func> <== NOT EXECUTED 200fd5c: 92 10 22 4c mov 0x24c, %o1 <== 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 ); assert( block_ptr ); 200fd60: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200fd64: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200fd68: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200fd6c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200fd70: 94 12 a2 60 or %o2, 0x260, %o2 <== NOT EXECUTED 200fd74: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200fd78: 7f ff f2 e1 call 200c8fc <__assert_func> <== NOT EXECUTED 200fd7c: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED =============================================================================== 0200f0a8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200f0a8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 200f0ac: 80 a6 20 00 cmp %i0, 0 200f0b0: 02 80 00 62 be 200f238 <== NEVER TAKEN 200f0b4: 11 00 80 77 sethi %hi(0x201dc00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f0b8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200f0bc: 80 a0 60 05 cmp %g1, 5 200f0c0: 12 80 00 65 bne 200f254 <== NEVER TAKEN 200f0c4: 23 00 80 7b sethi %hi(0x201ec00), %l1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 200f0c8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 200f0cc: e6 04 63 38 ld [ %l1 + 0x338 ], %l3 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 200f0d0: 80 a0 60 00 cmp %g1, 0 200f0d4: 02 80 00 05 be 200f0e8 200f0d8: a7 34 e0 02 srl %l3, 2, %l3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 200f0dc: 90 06 20 58 add %i0, 0x58, %o0 200f0e0: 7f ff ff ba call 200efc8 200f0e4: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 200f0e8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200f0ec: 80 a0 60 00 cmp %g1, 0 200f0f0: 02 80 00 1b be 200f15c <== ALWAYS TAKEN 200f0f4: c4 04 63 38 ld [ %l1 + 0x338 ], %g2 for ( i=0 ; i <== NOT EXECUTED 200f104: 90 10 20 00 clr %o0 <== NOT EXECUTED 200f108: 25 00 80 7b sethi %hi(0x201ec00), %l2 <== NOT EXECUTED 200f10c: a4 14 a3 38 or %l2, 0x338, %l2 ! 201ef38 <== NOT EXECUTED 200f110: 10 80 00 03 b 200f11c <== NOT EXECUTED 200f114: a0 10 20 00 clr %l0 <== NOT EXECUTED 200f118: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 200f11c: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 200f120: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 200f124: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200f128: 02 80 00 04 be 200f138 <== NOT EXECUTED 200f12c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 200f130: 7f ff ff a6 call 200efc8 <== NOT EXECUTED 200f134: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 200f14c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 200f150: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 200f154: 7f ff ff 9d call 200efc8 <== NOT EXECUTED 200f158: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 200f15c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200f160: 80 a2 20 00 cmp %o0, 0 200f164: 02 80 00 33 be 200f230 <== ALWAYS TAKEN 200f168: c2 04 63 38 ld [ %l1 + 0x338 ], %g1 for ( i=0 ; i <== NOT EXECUTED 200f178: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 200f17c: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 200f180: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 200f184: 22 80 00 29 be,a 200f228 <== NOT EXECUTED 200f188: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200f18c: 25 00 80 7b sethi %hi(0x201ec00), %l2 <== NOT EXECUTED 200f190: aa 10 20 00 clr %l5 <== NOT EXECUTED 200f194: a4 14 a3 38 or %l2, 0x338, %l2 <== NOT EXECUTED 200f198: a8 10 20 00 clr %l4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 200f1a4: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 200f1a8: 90 10 20 00 clr %o0 <== NOT EXECUTED 200f1ac: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 200f1b0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 200f1b4: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED 200f1b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200f1bc: 02 80 00 04 be 200f1cc <== NOT EXECUTED 200f1c0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200f1c4: 7f ff ff 81 call 200efc8 <== NOT EXECUTED 200f1c8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 200f1e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200f1e4: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200f1e8: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED 200f1ec: 7f ff ff 77 call 200efc8 <== NOT EXECUTED 200f1f0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 200f208: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 200f20c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 200f210: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200f214: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 200f218: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 200f21c: 12 bf ff e1 bne 200f1a0 <== NOT EXECUTED 200f220: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 200f224: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200f228: 7f ff ff 68 call 200efc8 <== NOT EXECUTED 200f22c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 200f230: 81 c7 e0 08 ret 200f234: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 200f238: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f23c: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f240: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f244: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED 200f248: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200f24c: 7f ff f5 ac call 200c8fc <__assert_func> <== NOT EXECUTED 200f250: 92 10 21 ee mov 0x1ee, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f254: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f258: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f25c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f260: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED 200f264: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 200f268: 7f ff f5 a5 call 200c8fc <__assert_func> <== NOT EXECUTED 200f26c: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED =============================================================================== 0200f04c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 200f04c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f050: 94 10 20 00 clr %o2 <== NOT EXECUTED 200f054: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200f058: 7f ff ff 2a call 200ed00 <== NOT EXECUTED 200f05c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 200f060: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200f064: 02 80 00 08 be 200f084 <== NOT EXECUTED 200f068: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 200f06c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_ptr = 0; 200f070: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 200f074: 7f ff ff 0d call 200eca8 <== NOT EXECUTED 200f078: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED } return 1; } 200f07c: 81 c7 e0 08 ret <== NOT EXECUTED 200f080: 81 e8 00 00 restore <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 200f084: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f088: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f08c: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f090: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f094: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 200f098: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200f09c: 7f ff f6 18 call 200c8fc <__assert_func> <== NOT EXECUTED 200f0a0: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED =============================================================================== 0200f6bc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200f6bc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 200f6c0: a0 96 20 00 orcc %i0, 0, %l0 200f6c4: 02 80 00 8e be 200f8fc <== NEVER TAKEN 200f6c8: 11 00 80 77 sethi %hi(0x201dc00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f6cc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200f6d0: 80 a0 60 05 cmp %g1, 5 200f6d4: 12 80 00 83 bne 200f8e0 <== NEVER TAKEN 200f6d8: 80 a6 e0 00 cmp %i3, 0 /* * Error check arguments */ assert( source ); 200f6dc: 02 80 00 9f be 200f958 <== NEVER TAKEN 200f6e0: 80 a7 20 00 cmp %i4, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 200f6e4: 02 80 00 71 be 200f8a8 <== NEVER TAKEN 200f6e8: 01 00 00 00 nop * 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 + length; if ( last_byte > the_jnode->info.file.size ) { 200f6ec: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 200f6f0: 80 a0 60 00 cmp %g1, 0 200f6f4: 06 80 00 57 bl 200f850 <== NEVER TAKEN 200f6f8: 94 07 00 1a add %i4, %i2, %o2 200f6fc: 80 a0 60 00 cmp %g1, 0 200f700: 22 80 00 51 be,a 200f844 <== ALWAYS TAKEN 200f704: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200f708: 25 00 80 7b sethi %hi(0x201ec00), %l2 <== NOT EXECUTED 200f70c: e2 04 a3 38 ld [ %l2 + 0x338 ], %l1 ! 201ef38 200f710: 90 10 00 19 mov %i1, %o0 200f714: a7 3c 60 1f sra %l1, 0x1f, %l3 200f718: 96 10 00 11 mov %l1, %o3 200f71c: 94 10 00 13 mov %l3, %o2 200f720: 40 00 30 49 call 201b844 <__moddi3> 200f724: 92 10 00 1a mov %i2, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f728: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200f72c: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200f730: 90 10 00 19 mov %i1, %o0 200f734: 92 10 00 1a mov %i2, %o1 200f738: 40 00 2f 5c call 201b4a8 <__divdi3> 200f73c: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 200f740: b0 10 20 00 clr %i0 200f744: 80 a5 20 00 cmp %l4, 0 200f748: 12 80 00 2d bne 200f7fc 200f74c: a6 10 00 09 mov %o1, %l3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f750: 80 a7 00 11 cmp %i4, %l1 200f754: 0a 80 00 15 bcs 200f7a8 200f758: 80 a7 20 00 cmp %i4, 0 200f75c: a4 14 a3 38 or %l2, 0x338, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f760: 90 10 00 10 mov %l0, %o0 200f764: 92 10 00 13 mov %l3, %o1 200f768: 7f ff fd 66 call 200ed00 200f76c: 94 10 20 00 clr %o2 assert( block_ptr ); 200f770: 80 a2 20 00 cmp %o0, 0 200f774: 02 80 00 53 be 200f8c0 <== NEVER TAKEN 200f778: 92 10 00 1b mov %i3, %o1 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 ); 200f77c: d0 02 00 00 ld [ %o0 ], %o0 200f780: 40 00 0a db call 20122ec 200f784: 94 10 00 11 mov %l1, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f788: c2 04 80 00 ld [ %l2 ], %g1 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; block++; my_length -= to_copy; 200f78c: b8 27 00 11 sub %i4, %l1, %i4 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; 200f790: b6 06 c0 11 add %i3, %l1, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f794: 80 a0 40 1c cmp %g1, %i4 #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; block++; 200f798: a6 04 e0 01 inc %l3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200f79c: 08 bf ff f1 bleu 200f760 200f7a0: b0 06 00 11 add %i0, %l1, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 200f7a4: 80 a7 20 00 cmp %i4, 0 200f7a8: 02 80 00 0e be 200f7e0 200f7ac: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f7b0: 92 10 00 13 mov %l3, %o1 200f7b4: 90 10 00 10 mov %l0, %o0 200f7b8: 7f ff fd 52 call 200ed00 200f7bc: 94 10 20 00 clr %o2 assert( block_ptr ); 200f7c0: 80 a2 20 00 cmp %o0, 0 200f7c4: 02 80 00 5d be 200f938 <== NEVER TAKEN 200f7c8: b0 06 00 1c add %i0, %i4, %i0 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, my_length ); 200f7cc: d0 02 00 00 ld [ %o0 ], %o0 200f7d0: 92 10 00 1b mov %i3, %o1 200f7d4: 40 00 0a c6 call 20122ec 200f7d8: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200f7dc: 90 07 bf f8 add %fp, -8, %o0 200f7e0: 7f ff cd 6e call 2002d98 200f7e4: 92 10 20 00 clr %o1 200f7e8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f7ec: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 200f7f0: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return copied; } 200f7f4: 81 c7 e0 08 ret 200f7f8: 81 e8 00 00 restore block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200f7fc: 90 10 00 10 mov %l0, %o0 200f800: 7f ff fd 40 call 200ed00 200f804: 94 10 20 00 clr %o2 assert( block_ptr ); 200f808: 80 a2 20 00 cmp %o0, 0 200f80c: 02 80 00 43 be 200f918 <== NEVER TAKEN 200f810: b0 24 40 14 sub %l1, %l4, %i0 */ 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; 200f814: 80 a6 00 1c cmp %i0, %i4 200f818: 18 80 00 1a bgu 200f880 200f81c: d0 02 00 00 ld [ %o0 ], %o0 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200f820: 92 10 00 1b mov %i3, %o1 200f824: 90 02 00 14 add %o0, %l4, %o0 200f828: 94 10 00 18 mov %i0, %o2 200f82c: 40 00 0a b0 call 20122ec 200f830: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200f834: a6 04 e0 01 inc %l3 my_length -= to_copy; copied += to_copy; 200f838: e2 04 a3 38 ld [ %l2 + 0x338 ], %l1 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 200f83c: 10 bf ff c5 b 200f750 200f840: b8 27 00 18 sub %i4, %i0, %i4 * 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 + length; if ( last_byte > the_jnode->info.file.size ) { 200f844: 80 a0 40 0a cmp %g1, %o2 200f848: 1a bf ff b1 bcc 200f70c <== NEVER TAKEN 200f84c: 25 00 80 7b sethi %hi(0x201ec00), %l2 status = IMFS_memfile_extend( the_jnode, last_byte ); 200f850: 90 10 00 10 mov %l0, %o0 200f854: 7f ff fe eb call 200f400 200f858: 92 10 20 00 clr %o1 if ( status ) 200f85c: 80 a2 20 00 cmp %o0, 0 200f860: 02 bf ff ab be 200f70c <== ALWAYS TAKEN 200f864: 25 00 80 7b sethi %hi(0x201ec00), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200f868: 40 00 08 65 call 20119fc <__errno> <== NOT EXECUTED 200f86c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f870: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 200f874: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f878: 81 c7 e0 08 ret <== NOT EXECUTED 200f87c: 81 e8 00 00 restore <== NOT EXECUTED */ 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; 200f880: b0 10 00 1c mov %i4, %i0 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200f884: 92 10 00 1b mov %i3, %o1 200f888: 90 02 00 14 add %o0, %l4, %o0 200f88c: 94 10 00 18 mov %i0, %o2 200f890: 40 00 0a 97 call 20122ec 200f894: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200f898: a6 04 e0 01 inc %l3 my_length -= to_copy; copied += to_copy; 200f89c: e2 04 a3 38 ld [ %l2 + 0x338 ], %l1 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 200f8a0: 10 bf ff ac b 200f750 200f8a4: b8 27 00 18 sub %i4, %i0, %i4 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 200f8a8: 40 00 08 55 call 20119fc <__errno> <== NOT EXECUTED 200f8ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200f8b0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200f8b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f8b8: 81 c7 e0 08 ret <== NOT EXECUTED 200f8bc: 81 e8 00 00 restore <== 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 ); assert( block_ptr ); 200f8c0: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f8c4: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f8c8: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f8cc: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f8d0: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f8d4: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200f8d8: 7f ff f4 09 call 200c8fc <__assert_func> <== NOT EXECUTED 200f8dc: 92 10 23 30 mov 0x330, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 200f8e0: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f8e4: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f8e8: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f8ec: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f8f0: 96 12 e1 80 or %o3, 0x180, %o3 <== NOT EXECUTED 200f8f4: 7f ff f4 02 call 200c8fc <__assert_func> <== NOT EXECUTED 200f8f8: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 200f8fc: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f900: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f904: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f908: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f90c: 96 12 e1 70 or %o3, 0x170, %o3 <== NOT EXECUTED 200f910: 7f ff f3 fb call 200c8fc <__assert_func> <== NOT EXECUTED 200f914: 92 10 22 e3 mov 0x2e3, %o1 <== 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 ); assert( block_ptr ); 200f918: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f91c: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f920: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f924: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f928: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f92c: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200f930: 7f ff f3 f3 call 200c8fc <__assert_func> <== NOT EXECUTED 200f934: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED 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 ); assert( block_ptr ); 200f938: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f93c: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f940: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f944: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f948: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f94c: 96 12 e1 b8 or %o3, 0x1b8, %o3 <== NOT EXECUTED 200f950: 7f ff f3 eb call 200c8fc <__assert_func> <== NOT EXECUTED 200f954: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 200f958: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f95c: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f960: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f964: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 200f968: 96 12 e1 c8 or %o3, 0x1c8, %o3 <== NOT EXECUTED 200f96c: 7f ff f3 e4 call 200c8fc <__assert_func> <== NOT EXECUTED 200f970: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED =============================================================================== 020023bc : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 20023bc: 9d e3 bf 58 save %sp, -168, %sp IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 20023c0: 40 00 41 5c call 2012930 20023c4: 90 10 00 18 mov %i0, %o0 20023c8: a0 07 bf b8 add %fp, -72, %l0 20023cc: 92 10 00 08 mov %o0, %o1 20023d0: 96 07 bf fc add %fp, -4, %o3 20023d4: 90 10 00 18 mov %i0, %o0 20023d8: 40 00 28 a6 call 200c670 20023dc: 94 10 00 10 mov %l0, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 20023e0: 03 00 00 3c sethi %hi(0xf000), %g1 20023e4: 05 00 00 10 sethi %hi(0x4000), %g2 20023e8: 82 0e 40 01 and %i1, %g1, %g1 20023ec: 80 a0 40 02 cmp %g1, %g2 20023f0: 02 80 00 23 be 200247c 20023f4: 05 00 00 20 sethi %hi(0x8000), %g2 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 20023f8: 80 a0 40 02 cmp %g1, %g2 20023fc: 02 80 00 08 be 200241c 2002400: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 2002404: 05 00 00 08 sethi %hi(0x2000), %g2 2002408: 80 a0 40 02 cmp %g1, %g2 200240c: 12 80 00 0f bne 2002448 2002410: 05 00 00 18 sethi %hi(0x6000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 2002414: f4 3f bf e0 std %i2, [ %fp + -32 ] 2002418: 92 10 20 02 mov 2, %o1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 200241c: 90 10 00 1c mov %i4, %o0 2002420: 94 10 00 10 mov %l0, %o2 2002424: 96 10 00 19 mov %i1, %o3 2002428: 98 07 bf e0 add %fp, -32, %o4 200242c: 40 00 24 96 call 200b684 2002430: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 2002434: 80 a2 20 00 cmp %o0, 0 2002438: 02 80 00 1b be 20024a4 <== NEVER TAKEN 200243c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 2002440: 81 c7 e0 08 ret 2002444: 81 e8 00 00 restore */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 2002448: 80 a0 40 02 cmp %g1, %g2 200244c: 22 bf ff f3 be,a 2002418 2002450: f4 3f bf e0 std %i2, [ %fp + -32 ] type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 2002454: 05 00 00 04 sethi %hi(0x1000), %g2 2002458: 80 a0 40 02 cmp %g1, %g2 200245c: 02 bf ff f0 be 200241c <== ALWAYS TAKEN 2002460: 92 10 20 07 mov 7, %o1 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 2002464: 40 00 3d 66 call 20119fc <__errno> <== NOT EXECUTED 2002468: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200246c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002470: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002474: 81 c7 e0 08 ret <== NOT EXECUTED 2002478: 81 e8 00 00 restore <== NOT EXECUTED 200247c: 92 10 20 01 mov 1, %o1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 2002480: 90 10 00 1c mov %i4, %o0 2002484: 94 10 00 10 mov %l0, %o2 2002488: 96 10 00 19 mov %i1, %o3 200248c: 98 07 bf e0 add %fp, -32, %o4 2002490: 40 00 24 7d call 200b684 2002494: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 2002498: 80 a2 20 00 cmp %o0, 0 200249c: 12 80 00 06 bne 20024b4 <== ALWAYS TAKEN 20024a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 20024a4: 40 00 3d 56 call 20119fc <__errno> <== NOT EXECUTED 20024a8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20024ac: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20024b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 20024b4: 81 c7 e0 08 ret 20024b8: 81 e8 00 00 restore =============================================================================== 020024bc : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 20024bc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 20024c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 20024c4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 20024c8: 80 a0 a0 01 cmp %g2, 1 20024cc: 12 80 00 05 bne 20024e0 <== NEVER TAKEN 20024d0: 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; 20024d4: f0 20 60 5c st %i0, [ %g1 + 0x5c ] return 0; } 20024d8: 81 c7 e0 08 ret 20024dc: 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 ); 20024e0: 40 00 3d 47 call 20119fc <__errno> <== NOT EXECUTED 20024e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20024e8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 20024ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20024f0: 81 c7 e0 08 ret <== NOT EXECUTED 20024f4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020049a0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 20049a0: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 20049a4: 80 a6 20 00 cmp %i0, 0 20049a8: 02 80 00 5b be 2004b14 <== NEVER TAKEN 20049ac: 21 00 80 a1 sethi %hi(0x2028400), %l0 fprintf(stdout, "%s", the_jnode->name ); 20049b0: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 ! 2028490 <_impure_ptr> 20049b4: 90 06 20 0c add %i0, 0xc, %o0 20049b8: 40 00 46 b4 call 2016488 20049bc: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 20049c0: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 20049c4: 80 a2 a0 07 cmp %o2, 7 20049c8: 08 80 00 0f bleu 2004a04 <== ALWAYS TAKEN 20049cc: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 20049d0: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 <== NOT EXECUTED 20049d4: 13 00 80 99 sethi %hi(0x2026400), %o1 <== NOT EXECUTED 20049d8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20049dc: 40 00 46 4d call 2016310 <== NOT EXECUTED 20049e0: 92 12 60 d0 or %o1, 0xd0, %o1 <== NOT EXECUTED assert(0); 20049e4: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 20049e8: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 20049ec: 15 00 80 99 sethi %hi(0x2026400), %o2 <== NOT EXECUTED 20049f0: 17 00 80 99 sethi %hi(0x2026400), %o3 <== NOT EXECUTED 20049f4: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 20049f8: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 20049fc: 40 00 02 bc call 20054ec <__assert_func> <== NOT EXECUTED 2004a00: 96 12 e0 b0 or %o3, 0xb0, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 2004a04: 05 00 80 12 sethi %hi(0x2004800), %g2 2004a08: 84 10 a1 44 or %g2, 0x144, %g2 ! 2004944 2004a0c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2004a10: 81 c0 40 00 jmp %g1 2004a14: 01 00 00 00 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004a18: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 <== NOT EXECUTED 2004a1c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2004a20: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2004a24: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 2004a28: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 2004a2c: 40 00 49 b6 call 2017104 <== NOT EXECUTED 2004a30: 90 12 20 b8 or %o0, 0xb8, %o0 ! 20264b8 <== NOT EXECUTED assert(0); 2004a34: 10 bf ff ed b 20049e8 <== NOT EXECUTED 2004a38: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED 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)", 2004a3c: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 <== NOT EXECUTED 2004a40: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 2004a44: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 2004a48: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 2004a4c: 13 00 80 99 sethi %hi(0x2026400), %o1 <== NOT EXECUTED 2004a50: 40 00 46 30 call 2016310 <== NOT EXECUTED 2004a54: 92 12 60 78 or %o1, 0x78, %o1 ! 2026478 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2004a58: 31 00 80 99 sethi %hi(0x2026400), %i0 <== NOT EXECUTED 2004a5c: 40 00 4d b4 call 201812c <== NOT EXECUTED 2004a60: 91 ee 20 e0 restore %i0, 0xe0, %o0 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2004a64: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2004a68: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 2004a6c: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004a70: 13 00 80 99 sethi %hi(0x2026400), %o1 2004a74: 40 00 46 27 call 2016310 2004a78: 92 12 60 88 or %o1, 0x88, %o1 ! 2026488 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2004a7c: 31 00 80 99 sethi %hi(0x2026400), %i0 2004a80: 40 00 4d ab call 201812c 2004a84: 91 ee 20 e0 restore %i0, 0xe0, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2004a88: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 <== NOT EXECUTED 2004a8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2004a90: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2004a94: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 2004a98: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 2004a9c: 40 00 49 9a call 2017104 <== NOT EXECUTED 2004aa0: 90 12 20 98 or %o0, 0x98, %o0 ! 2026498 <== NOT EXECUTED assert(0); 2004aa4: 10 bf ff d1 b 20049e8 <== NOT EXECUTED 2004aa8: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2004aac: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 <== NOT EXECUTED 2004ab0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2004ab4: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2004ab8: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 2004abc: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 2004ac0: 40 00 49 91 call 2017104 <== NOT EXECUTED 2004ac4: 90 12 20 98 or %o0, 0x98, %o0 ! 2026498 <== NOT EXECUTED assert(0); 2004ac8: 10 bf ff c8 b 20049e8 <== NOT EXECUTED 2004acc: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2004ad0: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2004ad4: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 2004ad8: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 2004adc: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ae0: 13 00 80 99 sethi %hi(0x2026400), %o1 2004ae4: 40 00 46 0b call 2016310 2004ae8: 92 12 60 60 or %o1, 0x60, %o1 ! 2026460 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2004aec: 31 00 80 99 sethi %hi(0x2026400), %i0 2004af0: 40 00 4d 8f call 201812c 2004af4: 91 ee 20 e0 restore %i0, 0xe0, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2004af8: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2004afc: 90 10 20 2f mov 0x2f, %o0 2004b00: d2 00 60 08 ld [ %g1 + 8 ], %o1 2004b04: 40 00 46 1d call 2016378 2004b08: 31 00 80 99 sethi %hi(0x2026400), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2004b0c: 40 00 4d 88 call 201812c 2004b10: 91 ee 20 e0 restore %i0, 0xe0, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 2004b14: 11 00 80 99 sethi %hi(0x2026400), %o0 <== NOT EXECUTED 2004b18: 15 00 80 99 sethi %hi(0x2026400), %o2 <== NOT EXECUTED 2004b1c: 17 00 80 99 sethi %hi(0x2026400), %o3 <== NOT EXECUTED 2004b20: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 2004b24: 94 12 a2 10 or %o2, 0x210, %o2 <== NOT EXECUTED 2004b28: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 2004b2c: 40 00 02 70 call 20054ec <__assert_func> <== NOT EXECUTED 2004b30: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED =============================================================================== 02002504 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 2002504: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 2002508: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 200250c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2002510: 80 a0 a0 04 cmp %g2, 4 2002514: 12 80 00 19 bne 2002578 <== NEVER TAKEN 2002518: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 200251c: 02 80 00 15 be 2002570 <== NEVER TAKEN 2002520: 86 10 20 00 clr %g3 2002524: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 2002528: c8 48 80 00 ldsb [ %g2 ], %g4 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 200252c: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2002530: 80 a1 20 00 cmp %g4, 0 2002534: 12 80 00 08 bne 2002554 <== ALWAYS TAKEN 2002538: c4 08 80 00 ldub [ %g2 ], %g2 200253c: 30 80 00 13 b,a 2002588 <== NOT EXECUTED 2002540: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 2002544: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4 2002548: 80 a1 20 00 cmp %g4, 0 200254c: 02 80 00 07 be 2002568 2002550: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; 2002554: c4 2e 40 03 stb %g2, [ %i1 + %g3 ] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2002558: b0 06 20 01 inc %i0 200255c: 80 a6 80 18 cmp %i2, %i0 2002560: 18 bf ff f8 bgu 2002540 2002564: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 2002568: 81 c7 e0 08 ret 200256c: 81 e8 00 00 restore 2002570: 81 c7 e0 08 ret <== NOT EXECUTED 2002574: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 2002578: 40 00 3d 21 call 20119fc <__errno> <== NOT EXECUTED 200257c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002580: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002584: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002588: 81 c7 e0 08 ret <== NOT EXECUTED 200258c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002590 : 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 */ ) { 2002590: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 2002594: e0 06 40 00 ld [ %i1 ], %l0 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 2002598: 92 10 00 1b mov %i3, %o1 200259c: 90 04 20 0c add %l0, 0xc, %o0 20025a0: 40 00 41 19 call 2012a04 20025a4: 94 10 20 20 mov 0x20, %o2 if ( the_jnode->Parent != NULL ) 20025a8: c2 04 20 08 ld [ %l0 + 8 ], %g1 20025ac: 80 a0 60 00 cmp %g1, 0 20025b0: 22 80 00 05 be,a 20025c4 <== NEVER TAKEN 20025b4: 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 ); 20025b8: 40 00 13 63 call 2007344 <_Chain_Extract> 20025bc: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 20025c0: 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 ); 20025c4: 92 10 00 10 mov %l0, %o1 20025c8: 90 00 60 50 add %g1, 0x50, %o0 20025cc: 40 00 13 52 call 2007314 <_Chain_Append> 20025d0: c2 24 20 08 st %g1, [ %l0 + 8 ] rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 20025d4: 90 07 bf f8 add %fp, -8, %o0 20025d8: 40 00 01 f0 call 2002d98 20025dc: 92 10 20 00 clr %o1 20025e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 20025e4: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 20025e8: 81 c7 e0 08 ret 20025ec: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200c750 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200c750: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200c754: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 200c758: c2 04 20 08 ld [ %l0 + 8 ], %g1 200c75c: 80 a0 60 00 cmp %g1, 0 200c760: 22 80 00 06 be,a 200c778 <== NEVER TAKEN 200c764: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 200c768: 7f ff ea f7 call 2007344 <_Chain_Extract> 200c76c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 200c770: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200c774: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 200c778: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200c77c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 200c780: 90 07 bf f8 add %fp, -8, %o0 200c784: 7f ff d9 85 call 2002d98 200c788: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 200c78c: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 200c790: 90 10 00 10 mov %l0, %o0 200c794: 40 00 01 07 call 200cbb0 200c798: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 200c79c: 80 a2 20 00 cmp %o0, 0 200c7a0: 12 80 00 12 bne 200c7e8 <== NEVER TAKEN 200c7a4: 01 00 00 00 nop 200c7a8: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 200c7ac: 80 a0 60 00 cmp %g1, 0 200c7b0: 12 80 00 0e bne 200c7e8 <== NEVER TAKEN 200c7b4: 03 00 80 7a sethi %hi(0x201e800), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 200c7b8: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201e980 200c7bc: c4 06 40 00 ld [ %i1 ], %g2 200c7c0: c6 00 60 04 ld [ %g1 + 4 ], %g3 200c7c4: 80 a0 c0 02 cmp %g3, %g2 200c7c8: 22 80 00 02 be,a 200c7d0 <== NEVER TAKEN 200c7cc: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 200c7d0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200c7d4: 80 a0 60 04 cmp %g1, 4 200c7d8: 22 80 00 06 be,a 200c7f0 200c7dc: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 200c7e0: 7f ff d9 43 call 2002cec 200c7e4: 90 10 00 10 mov %l0, %o0 } return 0; } 200c7e8: 81 c7 e0 08 ret 200c7ec: 91 e8 20 00 restore %g0, 0, %o0 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 200c7f0: 80 a2 20 00 cmp %o0, 0 200c7f4: 02 bf ff fb be 200c7e0 <== NEVER TAKEN 200c7f8: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 200c7fc: 7f ff d9 3c call 2002cec 200c800: 01 00 00 00 nop 200c804: 30 bf ff f7 b,a 200c7e0 =============================================================================== 0200c828 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200c828: 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; 200c82c: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200c830: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200c834: 80 a0 a0 07 cmp %g2, 7 200c838: 08 80 00 08 bleu 200c858 <== ALWAYS TAKEN 200c83c: 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 ); 200c840: 40 00 14 6f call 20119fc <__errno> <== NOT EXECUTED 200c844: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200c848: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200c84c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200c850: 81 c7 e0 08 ret <== NOT EXECUTED 200c854: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 200c858: 07 00 80 32 sethi %hi(0x200c800), %g3 200c85c: 86 10 e0 08 or %g3, 8, %g3 ! 200c808 200c860: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200c864: 81 c0 80 00 jmp %g2 200c868: 01 00 00 00 nop case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200c86c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 200c870: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED */ 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; 200c874: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 buf->st_nlink = the_jnode->st_nlink; 200c878: c8 10 60 34 lduh [ %g1 + 0x34 ], %g4 */ 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; 200c87c: c6 26 60 0c st %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200c880: c6 00 60 38 ld [ %g1 + 0x38 ], %g3 * 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 ); 200c884: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200c888: c6 26 60 08 st %g3, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 200c88c: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 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; 200c890: c8 36 60 10 sth %g4, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 200c894: c6 26 60 28 st %g3, [ %i1 + 0x28 ] * 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 ); 200c898: c6 00 a0 34 ld [ %g2 + 0x34 ], %g3 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 200c89c: c8 00 60 44 ld [ %g1 + 0x44 ], %g4 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; 200c8a0: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 200c8a4: c8 26 60 30 st %g4, [ %i1 + 0x30 ] 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; 200c8a8: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] * 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 ); 200c8ac: c8 00 c0 00 ld [ %g3 ], %g4 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 200c8b0: c4 00 60 48 ld [ %g1 + 0x48 ], %g2 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200c8b4: 07 00 80 79 sethi %hi(0x201e400), %g3 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; 200c8b8: c2 10 60 3e lduh [ %g1 + 0x3e ], %g1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200c8bc: c6 00 e3 b8 ld [ %g3 + 0x3b8 ], %g3 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; 200c8c0: c2 36 60 14 sth %g1, [ %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 = 200c8c4: c8 26 60 04 st %g4, [ %i1 + 4 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200c8c8: c6 26 60 40 st %g3, [ %i1 + 0x40 ] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 200c8cc: c4 26 60 38 st %g2, [ %i1 + 0x38 ] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200c8d0: 03 00 00 3f sethi %hi(0xfc00), %g1 200c8d4: 82 10 63 fe or %g1, 0x3fe, %g1 ! fffe /* * 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 = 200c8d8: c2 26 40 00 st %g1, [ %i1 ] buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 200c8dc: 81 c7 e0 08 ret 200c8e0: 91 e8 20 00 restore %g0, 0, %o0 200c8e4: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; 200c8e8: 10 bf ff e3 b 200c874 200c8ec: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200c8f0: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200c8f4: 10 bf ff e0 b 200c874 200c8f8: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] =============================================================================== 020025f0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 20025f0: 9d e3 bf 58 save %sp, -168, %sp int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 20025f4: 40 00 40 cf call 2012930 20025f8: 90 10 00 1a mov %i2, %o0 20025fc: 96 07 bf fc add %fp, -4, %o3 2002600: 92 10 00 08 mov %o0, %o1 2002604: a0 07 bf b8 add %fp, -72, %l0 2002608: 90 10 00 1a mov %i2, %o0 200260c: 40 00 28 19 call 200c670 2002610: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2002614: 40 00 40 b2 call 20128dc 2002618: 90 10 00 19 mov %i1, %o0 if (info.sym_link.name == NULL) { 200261c: 80 a2 20 00 cmp %o0, 0 2002620: 02 80 00 15 be 2002674 <== NEVER TAKEN 2002624: d0 27 bf e0 st %o0, [ %fp + -32 ] * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 2002628: 90 10 00 18 mov %i0, %o0 200262c: 94 10 00 10 mov %l0, %o2 2002630: 92 10 20 04 mov 4, %o1 2002634: 17 00 00 28 sethi %hi(0xa000), %o3 2002638: 98 07 bf e0 add %fp, -32, %o4 200263c: 96 12 e1 ff or %o3, 0x1ff, %o3 2002640: 40 00 24 11 call 200b684 2002644: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2002648: 80 a2 20 00 cmp %o0, 0 200264c: 12 80 00 08 bne 200266c <== ALWAYS TAKEN 2002650: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 2002654: 40 00 01 a6 call 2002cec <== NOT EXECUTED 2002658: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 200265c: 40 00 3c e8 call 20119fc <__errno> <== NOT EXECUTED 2002660: 01 00 00 00 nop <== NOT EXECUTED 2002664: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2002668: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 200266c: 81 c7 e0 08 ret 2002670: 81 e8 00 00 restore /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 2002674: 40 00 3c e2 call 20119fc <__errno> <== NOT EXECUTED 2002678: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200267c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2002680: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002684: 81 c7 e0 08 ret <== NOT EXECUTED 2002688: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200268c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 200268c: 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; 2002690: e0 06 40 00 ld [ %i1 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2002694: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2002698: 80 a0 60 03 cmp %g1, 3 200269c: 02 80 00 09 be 20026c0 20026a0: a2 10 00 18 mov %i0, %l1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 20026a4: c2 06 60 08 ld [ %i1 + 8 ], %g1 20026a8: 90 10 00 11 mov %l1, %o0 20026ac: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 20026b0: 9f c0 40 00 call %g1 20026b4: 92 10 00 19 mov %i1, %o1 return result; } 20026b8: 81 c7 e0 08 ret 20026bc: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 20026c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 20026c4: 80 a0 60 00 cmp %g1, 0 20026c8: 02 80 00 25 be 200275c <== NEVER TAKEN 20026cc: a4 07 bf e4 add %fp, -28, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 20026d0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 20026d4: da 06 60 04 ld [ %i1 + 4 ], %o5 20026d8: c8 06 60 08 ld [ %i1 + 8 ], %g4 20026dc: c6 06 60 0c ld [ %i1 + 0xc ], %g3 20026e0: c4 27 bf f4 st %g2, [ %fp + -12 ] the_link.node_access = node->info.hard_link.link_node; 20026e4: 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; 20026e8: da 27 bf e8 st %o5, [ %fp + -24 ] 20026ec: c8 27 bf ec st %g4, [ %fp + -20 ] 20026f0: c6 27 bf f0 st %g3, [ %fp + -16 ] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20026f4: 40 00 24 31 call 200b7b8 20026f8: 90 10 00 12 mov %l2, %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) 20026fc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 2002700: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 2002704: 80 a0 a0 01 cmp %g2, 1 2002708: 02 80 00 0a be 2002730 200270c: 86 00 bf ff add %g2, -1, %g3 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 2002710: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2002714: c6 30 60 34 sth %g3, [ %g1 + 0x34 ] IMFS_update_ctime( node->info.hard_link.link_node ); 2002718: 40 00 01 a0 call 2002d98 200271c: 92 10 20 00 clr %o1 2002720: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 2002724: c4 07 bf f8 ld [ %fp + -8 ], %g2 2002728: 10 bf ff df b 20026a4 200272c: c4 20 60 48 st %g2, [ %g1 + 0x48 ] * 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 ); 2002730: c2 07 bf ec ld [ %fp + -20 ], %g1 2002734: 90 10 00 18 mov %i0, %o0 2002738: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200273c: 92 10 00 12 mov %l2, %o1 2002740: 9f c0 40 00 call %g1 2002744: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2002748: 80 a2 20 00 cmp %o0, 0 200274c: 22 bf ff d7 be,a 20026a8 2002750: c2 06 60 08 ld [ %i1 + 8 ], %g1 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 2002754: 81 c7 e0 08 ret 2002758: 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 ); 200275c: 40 00 3c a8 call 20119fc <__errno> <== NOT EXECUTED 2002760: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002764: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002768: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200276c: 81 c7 e0 08 ret <== NOT EXECUTED 2002770: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002774 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2002774: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2002778: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 200277c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2002780: 80 a0 a0 01 cmp %g2, 1 2002784: 12 80 00 09 bne 20027a8 <== NEVER TAKEN 2002788: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 200278c: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2002790: 80 a0 a0 00 cmp %g2, 0 2002794: 02 80 00 0b be 20027c0 <== NEVER TAKEN 2002798: 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; 200279c: c0 20 60 5c clr [ %g1 + 0x5c ] return 0; } 20027a0: 81 c7 e0 08 ret 20027a4: 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 ); 20027a8: 40 00 3c 95 call 20119fc <__errno> <== NOT EXECUTED 20027ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20027b0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 20027b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20027b8: 81 c7 e0 08 ret <== NOT EXECUTED 20027bc: 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 */ 20027c0: 40 00 3c 8f call 20119fc <__errno> <== NOT EXECUTED 20027c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20027c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20027cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20027d0: 81 c7 e0 08 ret <== NOT EXECUTED 20027d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002f98 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 2002f98: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2002f9c: 03 00 80 7b sethi %hi(0x201ec00), %g1 2002fa0: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201eee8 2002fa4: 80 a0 60 00 cmp %g1, 0 2002fa8: 02 80 00 05 be 2002fbc 2002fac: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 2002fb0: c2 00 40 00 ld [ %g1 ], %g1 2002fb4: 9f c0 40 00 call %g1 2002fb8: 01 00 00 00 nop } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2002fbc: 7f ff ff dc call 2002f2c 2002fc0: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2002fc4: 03 00 80 7b sethi %hi(0x201ec00), %g1 2002fc8: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 201eeec 2002fcc: 80 a0 60 00 cmp %g1, 0 2002fd0: 02 80 00 08 be 2002ff0 <== ALWAYS TAKEN 2002fd4: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2002fd8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2002fdc: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2002fe0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002fe4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2002fe8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 2002fec: b2 26 40 08 sub %i1, %o0, %i1 <== NOT EXECUTED * 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 ( 2002ff0: 23 00 80 7b sethi %hi(0x201ec00), %l1 2002ff4: c2 0c 62 e5 ldub [ %l1 + 0x2e5 ], %g1 ! 201eee5 2002ff8: 80 a0 60 00 cmp %g1, 0 2002ffc: 12 80 00 10 bne 200303c 2003000: 21 00 80 79 sethi %hi(0x201e400), %l0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 2003004: 03 00 80 7a sethi %hi(0x201e800), %g1 2003008: c2 08 60 90 ldub [ %g1 + 0x90 ], %g1 ! 201e890 200300c: 80 a0 60 00 cmp %g1, 0 2003010: 12 80 00 13 bne 200305c 2003014: 90 10 00 18 mov %i0, %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 2003018: 21 00 80 79 sethi %hi(0x201e400), %l0 200301c: d0 04 23 c0 ld [ %l0 + 0x3c0 ], %o0 ! 201e7c0 2003020: 92 10 00 18 mov %i0, %o1 2003024: 94 10 00 19 mov %i1, %o2 2003028: 40 00 12 40 call 2007928 <_Heap_Initialize> 200302c: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003030: 80 a2 20 00 cmp %o0, 0 2003034: 02 80 00 13 be 2003080 <== NEVER TAKEN 2003038: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 200303c: d0 04 23 c0 ld [ %l0 + 0x3c0 ], %o0 2003040: 21 00 80 7c sethi %hi(0x201f000), %l0 2003044: 40 00 15 a0 call 20086c4 <_Protected_heap_Get_size> 2003048: e2 04 21 e0 ld [ %l0 + 0x1e0 ], %l1 ! 201f1e0 200304c: 90 02 00 11 add %o0, %l1, %o0 2003050: d0 24 21 e0 st %o0, [ %l0 + 0x1e0 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 2003054: 81 c7 e0 08 ret 2003058: 81 e8 00 00 restore if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 200305c: 92 10 20 00 clr %o1 2003060: 40 00 3c e2 call 20123e8 2003064: 94 10 00 19 mov %i1, %o2 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 2003068: c2 0c 62 e5 ldub [ %l1 + 0x2e5 ], %g1 200306c: 80 a0 60 00 cmp %g1, 0 2003070: 22 bf ff eb be,a 200301c <== ALWAYS TAKEN 2003074: 21 00 80 79 sethi %hi(0x201e400), %l0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 2003078: 10 bf ff f2 b 2003040 <== NOT EXECUTED 200307c: d0 04 23 c0 ld [ %l0 + 0x3c0 ], %o0 ! 201e7c0 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003080: 40 00 0f b6 call 2006f58 <== NOT EXECUTED 2003084: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED =============================================================================== 02006a08 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2006a08: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 2006a0c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2006a10: 02 80 00 3b be 2006afc <== NOT EXECUTED 2006a14: 27 00 81 c8 sethi %hi(0x2072000), %l3 <== NOT EXECUTED return; if ( !print_handler ) 2006a18: e8 04 e0 f0 ld [ %l3 + 0xf0 ], %l4 ! 20720f0 <== NOT EXECUTED 2006a1c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2006a20: 02 80 00 37 be 2006afc <== NOT EXECUTED 2006a24: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2006a28: 02 80 00 3e be 2006b20 <== NOT EXECUTED 2006a2c: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006a30: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2006a34: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006a38: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2006a3c: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 2006a40: ec 06 21 50 ld [ %i0 + 0x150 ], %l6 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 2006a44: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 2006a48: 7f ff ff d8 call 20069a8 <== NOT EXECUTED 2006a4c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 2006a50: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2006a54: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 2006a58: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2006a5c: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 2006a60: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2006a64: 02 80 00 44 be 2006b74 <== NOT EXECUTED 2006a68: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED (*print_handler)( 2006a6c: ee 06 20 08 ld [ %i0 + 8 ], %l7 <== NOT EXECUTED 2006a70: 2b 00 81 c8 sethi %hi(0x2072000), %l5 <== NOT EXECUTED 2006a74: fa 05 60 ec ld [ %l5 + 0xec ], %i5 ! 20720ec <== NOT EXECUTED 2006a78: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 2006a7c: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 2006a80: 40 00 1a 30 call 200d340 <== NOT EXECUTED 2006a84: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 2006a88: 13 00 81 96 sethi %hi(0x2065800), %o1 <== NOT EXECUTED 2006a8c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 2006a90: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 2006a94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2006a98: 9f c5 00 00 call %l4 <== NOT EXECUTED 2006a9c: 92 12 62 d8 or %o1, 0x2d8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 2006aa0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 2006aa4: c2 04 e0 f0 ld [ %l3 + 0xf0 ], %g1 <== NOT EXECUTED 2006aa8: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 2006aac: d0 05 60 ec ld [ %l5 + 0xec ], %o0 <== NOT EXECUTED 2006ab0: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2006ab4: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 2006ab8: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 2006abc: 9a 10 00 11 mov %l1, %o5 <== NOT EXECUTED 2006ac0: 13 00 81 96 sethi %hi(0x2065800), %o1 <== NOT EXECUTED 2006ac4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006ac8: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 2065af8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2006acc: 03 00 81 c8 sethi %hi(0x2072000), %g1 <== NOT EXECUTED 2006ad0: c4 00 60 e8 ld [ %g1 + 0xe8 ], %g2 ! 20720e8 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 2006ad4: 03 00 81 c8 sethi %hi(0x2072000), %g1 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2006ad8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2006adc: 02 80 00 0a be 2006b04 <== NOT EXECUTED 2006ae0: 05 00 81 c8 sethi %hi(0x2072000), %g2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2006ae4: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 <== NOT EXECUTED 2006ae8: d0 00 a0 ec ld [ %g2 + 0xec ], %o0 <== NOT EXECUTED 2006aec: 13 00 81 96 sethi %hi(0x2065800), %o1 <== NOT EXECUTED 2006af0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2006af4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006af8: 92 12 63 28 or %o1, 0x328, %o1 <== NOT EXECUTED 2006afc: 81 c7 e0 08 ret <== NOT EXECUTED 2006b00: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 2006b04: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 <== NOT EXECUTED 2006b08: d0 00 a0 ec ld [ %g2 + 0xec ], %o0 <== NOT EXECUTED 2006b0c: 13 00 81 96 sethi %hi(0x2065800), %o1 <== NOT EXECUTED 2006b10: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006b14: 92 12 63 18 or %o1, 0x318, %o1 ! 2065b18 <== NOT EXECUTED 2006b18: 81 c7 e0 08 ret <== NOT EXECUTED 2006b1c: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 2006b20: 25 00 81 d3 sethi %hi(0x2074c00), %l2 <== NOT EXECUTED 2006b24: a4 14 a0 58 or %l2, 0x58, %l2 ! 2074c58 <== NOT EXECUTED 2006b28: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED 2006b2c: ac 10 20 00 clr %l6 <== NOT EXECUTED 2006b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006b34: 02 bf ff f2 be 2006afc <== NOT EXECUTED 2006b38: b0 10 20 00 clr %i0 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006b3c: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2006b40: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006b44: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2006b48: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 2006b4c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 2006b50: 7f ff ff 96 call 20069a8 <== NOT EXECUTED 2006b54: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( high_water_mark ) 2006b58: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2006b5c: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 2006b60: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2006b64: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 2006b68: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2006b6c: 12 bf ff c0 bne 2006a6c <== NOT EXECUTED 2006b70: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 2006b74: 2b 00 81 c8 sethi %hi(0x2072000), %l5 <== NOT EXECUTED 2006b78: d0 05 60 ec ld [ %l5 + 0xec ], %o0 ! 20720ec <== NOT EXECUTED 2006b7c: 13 00 81 96 sethi %hi(0x2065800), %o1 <== NOT EXECUTED 2006b80: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2006b84: 9f c5 00 00 call %l4 <== NOT EXECUTED 2006b88: 92 12 62 e8 or %o1, 0x2e8, %o1 <== NOT EXECUTED } (*print_handler)( 2006b8c: 10 bf ff c6 b 2006aa4 <== NOT EXECUTED 2006b90: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED =============================================================================== 02006da8 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 2006da8: 9d e3 bf a0 save %sp, -96, %sp static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 2006dac: 21 00 81 c8 sethi %hi(0x2072000), %l0 2006db0: c2 04 20 e8 ld [ %l0 + 0xe8 ], %g1 ! 20720e8 2006db4: 80 a0 60 00 cmp %g1, 0 2006db8: 12 80 00 20 bne 2006e38 2006dbc: 1b 00 81 d3 sethi %hi(0x2074c00), %o5 2006dc0: 09 00 81 97 sethi %hi(0x2065c00), %g4 2006dc4: 9a 13 60 48 or %o5, 0x48, %o5 2006dc8: 88 11 20 80 or %g4, 0x80, %g4 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 2006dcc: 84 08 60 03 and %g1, 3, %g2 2006dd0: 85 28 a0 02 sll %g2, 2, %g2 2006dd4: c6 01 00 02 ld [ %g4 + %g2 ], %g3 2006dd8: 85 28 60 02 sll %g1, 2, %g2 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 2006ddc: 82 00 60 01 inc %g1 2006de0: 80 a0 60 04 cmp %g1, 4 2006de4: 12 bf ff fa bne 2006dcc 2006de8: c6 23 40 02 st %g3, [ %o5 + %g2 ] /* * 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) { 2006dec: 03 00 81 d3 sethi %hi(0x2074c00), %g1 2006df0: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 2074e50 <_CPU_Interrupt_stack_low> 2006df4: 80 a0 60 00 cmp %g1, 0 2006df8: 02 80 00 0e be 2006e30 <== NEVER TAKEN 2006dfc: 05 00 81 d3 sethi %hi(0x2074c00), %g2 2006e00: c6 00 a1 9c ld [ %g2 + 0x19c ], %g3 ! 2074d9c <_CPU_Interrupt_stack_high> 2006e04: 80 a0 e0 00 cmp %g3, 0 2006e08: 02 80 00 0a be 2006e30 <== NEVER TAKEN 2006e0c: 86 20 c0 01 sub %g3, %g1, %g3 Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 2006e10: 05 00 81 d3 sethi %hi(0x2074c00), %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 2006e14: c6 20 a0 58 st %g3, [ %g2 + 0x58 ] ! 2074c58 * 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; 2006e18: 84 10 a0 58 or %g2, 0x58, %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 2006e1c: 90 10 00 01 mov %g1, %o0 2006e20: 94 10 00 03 mov %g3, %o2 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 2006e24: c2 20 a0 04 st %g1, [ %g2 + 4 ] Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 2006e28: 40 01 1b 75 call 204dbfc 2006e2c: 92 10 20 a5 mov 0xa5, %o1 } #endif Stack_check_Initialized = 1; 2006e30: 82 10 20 01 mov 1, %g1 2006e34: c2 24 20 e8 st %g1, [ %l0 + 0xe8 ] 2006e38: 81 c7 e0 08 ret 2006e3c: 81 e8 00 00 restore =============================================================================== 020069a8 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 20069a8: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 20069ac: 86 0a 7f fc and %o1, -4, %g3 <== NOT EXECUTED 20069b0: 86 00 40 03 add %g1, %g3, %g3 <== NOT EXECUTED 20069b4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 20069b8: 1a 80 00 10 bcc 20069f8 <== NOT EXECUTED 20069bc: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 20069c0: c8 02 20 10 ld [ %o0 + 0x10 ], %g4 <== NOT EXECUTED 20069c4: 84 10 a1 a5 or %g2, 0x1a5, %g2 <== NOT EXECUTED 20069c8: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED 20069cc: 22 80 00 08 be,a 20069ec <== NOT EXECUTED 20069d0: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED return (void *) base; 20069d4: 81 c3 e0 08 retl <== NOT EXECUTED 20069d8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 20069dc: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED 20069e0: 12 80 00 08 bne 2006a00 <== NOT EXECUTED 20069e4: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 20069e8: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 20069ec: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 20069f0: 38 bf ff fb bgu,a 20069dc <== NOT EXECUTED 20069f4: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 20069f8: 81 c3 e0 08 retl <== NOT EXECUTED 20069fc: 90 10 20 00 clr %o0 <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 2006a00: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02006c08 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2006c08: 9d e3 bf 80 save %sp, -128, %sp Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 2006c0c: 11 00 81 96 sethi %hi(0x2065800), %o0 * the following message out. */ 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_area(stack); 2006c10: e0 06 20 c8 ld [ %i0 + 0xc8 ], %l0 char name [32]; printk("BLOWN STACK!!!\n"); 2006c14: 40 00 0c 99 call 2009e78 2006c18: 90 12 23 98 or %o0, 0x398, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2006c1c: 92 10 00 18 mov %i0, %o1 2006c20: 11 00 81 96 sethi %hi(0x2065800), %o0 2006c24: 40 00 0c 95 call 2009e78 2006c28: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 2065ba8 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2006c2c: d2 06 20 08 ld [ %i0 + 8 ], %o1 2006c30: 11 00 81 96 sethi %hi(0x2065800), %o0 2006c34: 40 00 0c 91 call 2009e78 2006c38: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 2065bc8 printk( 2006c3c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2006c40: 11 00 81 96 sethi %hi(0x2065800), %o0 2006c44: 40 00 0c 8d call 2009e78 2006c48: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 2065be0 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2006c4c: d0 06 20 08 ld [ %i0 + 8 ], %o0 2006c50: 94 07 bf e0 add %fp, -32, %o2 2006c54: 40 00 19 bb call 200d340 2006c58: 92 10 20 20 mov 0x20, %o1 2006c5c: 92 10 00 08 mov %o0, %o1 2006c60: 11 00 81 96 sethi %hi(0x2065800), %o0 2006c64: 40 00 0c 85 call 2009e78 2006c68: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 2065bf8 "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 2006c6c: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 2006c70: d4 06 20 c8 ld [ %i0 + 0xc8 ], %o2 2006c74: 11 00 81 97 sethi %hi(0x2065c00), %o0 2006c78: 96 02 80 09 add %o2, %o1, %o3 2006c7c: 40 00 0c 7f call 2009e78 2006c80: 90 12 20 10 or %o0, 0x10, %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) { 2006c84: 80 8e 60 ff btst 0xff, %i1 2006c88: 02 80 00 04 be 2006c98 <== ALWAYS TAKEN 2006c8c: 96 04 20 18 add %l0, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 2006c90: 40 00 1c 6d call 200de44 2006c94: 90 10 20 81 mov 0x81, %o0 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 2006c98: 11 00 81 97 sethi %hi(0x2065c00), %o0 2006c9c: 92 10 20 10 mov 0x10, %o1 2006ca0: 90 12 20 48 or %o0, 0x48, %o0 2006ca4: 40 00 0c 75 call 2009e78 2006ca8: 94 04 20 08 add %l0, 8, %o2 2006cac: 30 bf ff f9 b,a 2006c90 =============================================================================== 02049854 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 2049854: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 2049858: c0 2e 80 00 clrb [ %i2 ] <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 204985c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2049860: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 2049864: 7f ff fe dd call 20493d8 <== NOT EXECUTED 2049868: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (rc > 0) 204986c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2049870: 24 80 00 04 ble,a 2049880 <== NOT EXECUTED 2049874: e2 06 40 00 ld [ %i1 ], %l1 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 2049878: 81 c7 e0 08 ret <== NOT EXECUTED 204987c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; end_bit = test_bit + (window * direction); 2049880: a5 2e e0 0b sll %i3, 0xb, %l2 <== NOT EXECUTED if (end_bit < 0) 2049884: a4 84 80 11 addcc %l2, %l1, %l2 <== NOT EXECUTED 2049888: 2c 80 00 06 bneg,a 20498a0 <== NOT EXECUTED 204988c: a4 10 20 00 clr %l2 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 2049890: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 2049894: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 2049898: 3a 80 00 02 bcc,a 20498a0 <== NOT EXECUTED 204989c: a4 00 7f ff add %g1, -1, %l2 <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 20498a0: ee 04 20 14 ld [ %l0 + 0x14 ], %l7 <== NOT EXECUTED 20498a4: 83 3c 60 0a sra %l1, 0xa, %g1 <== NOT EXECUTED map_bits = &map[map_index]; 20498a8: ea 07 bf fc ld [ %fp + -4 ], %l5 <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 20498ac: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED if (end_bit < 0) end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); 20498b0: a9 3c 60 05 sra %l1, 5, %l4 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 20498b4: ae 05 c0 01 add %l7, %g1, %l7 <== NOT EXECUTED map_bits = &map[map_index]; 20498b8: 83 2d 20 02 sll %l4, 2, %g1 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 20498bc: b9 36 e0 1f srl %i3, 0x1f, %i4 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; map_bits = &map[map_index]; 20498c0: aa 05 40 01 add %l5, %g1, %l5 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); 20498c4: ac 0c 60 1f and %l1, 0x1f, %l6 <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 20498c8: 90 0d 20 1f and %l4, 0x1f, %o0 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 20498cc: bb 2e e0 02 sll %i3, 2, %i5 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 20498d0: 83 2e e0 05 sll %i3, 5, %g1 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 20498d4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 20498d8: b0 0f 20 ff and %i4, 0xff, %i0 <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 20498dc: d6 05 c0 00 ld [ %l7 ], %o3 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 20498e0: 98 05 00 1b add %l4, %i3, %o4 <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 20498e4: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 20498e8: 12 80 00 30 bne 20499a8 <== NOT EXECUTED 20498ec: 99 2b 20 05 sll %o4, 5, %o4 <== NOT EXECUTED * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) 20498f0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 20498f4: 04 80 00 80 ble 2049af4 <== NOT EXECUTED 20498f8: a2 0c 7f e0 and %l1, -32, %l1 <== NOT EXECUTED { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 20498fc: 84 10 20 20 mov 0x20, %g2 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 2049900: ac 10 20 00 clr %l6 <== NOT EXECUTED */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 2049904: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 2049908: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 204990c: a2 00 80 11 add %g2, %l1, %l1 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 2049910: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED 2049914: 7f fe e4 9e call 2002b8c <.umul> <== NOT EXECUTED 2049918: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 204991c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED map_index += direction * bits_skipped; 2049920: a8 05 00 08 add %l4, %o0, %l4 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 2049924: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 2049928: aa 05 40 08 add %l5, %o0, %l5 <== NOT EXECUTED map_index += direction * bits_skipped; } search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 204992c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2049930: 04 80 00 6a ble 2049ad8 <== NOT EXECUTED 2049934: ae 05 c0 1d add %l7, %i5, %l7 <== NOT EXECUTED 2049938: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 204993c: 14 80 00 4d bg 2049a70 <== NOT EXECUTED 2049940: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2049944: 84 10 20 00 clr %g2 <== NOT EXECUTED 2049948: 90 10 20 00 clr %o0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 204994c: 80 88 e0 ff btst 0xff, %g3 <== NOT EXECUTED 2049950: 12 80 00 3f bne 2049a4c <== NOT EXECUTED 2049954: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 2049958: 16 80 00 42 bge 2049a60 <== NOT EXECUTED 204995c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2049960: 10 bf ff c6 b 2049878 <== NOT EXECUTED 2049964: 90 10 20 00 clr %o0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 2049968: a8 06 c0 14 add %i3, %l4, %l4 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 204996c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2049970: a2 10 20 00 clr %l1 <== NOT EXECUTED 2049974: 04 80 00 42 ble 2049a7c <== NOT EXECUTED 2049978: ac 10 20 00 clr %l6 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 204997c: a2 03 00 11 add %o4, %l1, %l1 <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 2049980: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 2049984: 16 80 00 28 bge 2049a24 <== NOT EXECUTED 2049988: 84 10 00 1c mov %i4, %g2 <== NOT EXECUTED 204998c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 2049990: 14 80 00 05 bg 20499a4 <== NOT EXECUTED 2049994: 98 03 00 01 add %o4, %g1, %o4 <== NOT EXECUTED 2049998: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 204999c: 34 80 00 4d bg,a 2049ad0 <== NOT EXECUTED 20499a0: ae 05 c0 1d add %l7, %i5, %l7 <== NOT EXECUTED 20499a4: 90 06 c0 08 add %i3, %o0, %o0 <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 20499a8: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED 20499ac: 18 bf ff e1 bgu 2049930 <== NOT EXECUTED 20499b0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 20499b4: 95 2c c0 08 sll %l3, %o0, %o2 <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 20499b8: 80 8a 80 0b btst %o2, %o3 <== NOT EXECUTED 20499bc: 22 bf ff eb be,a 2049968 <== NOT EXECUTED 20499c0: aa 05 40 1d add %l5, %i5, %l5 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 20499c4: da 05 40 00 ld [ %l5 ], %o5 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 20499c8: 87 2c c0 16 sll %l3, %l6, %g3 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 20499cc: 80 88 c0 0d btst %g3, %o5 <== NOT EXECUTED 20499d0: 12 80 00 2e bne 2049a88 <== NOT EXECUTED 20499d4: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 20499d8: ac 05 80 1b add %l6, %i3, %l6 <== NOT EXECUTED 20499dc: 12 80 00 0d bne 2049a10 <== NOT EXECUTED 20499e0: 84 04 40 1b add %l1, %i3, %g2 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 20499e4: 10 bf ff e1 b 2049968 <== NOT EXECUTED 20499e8: aa 05 40 1d add %l5, %i5, %l5 <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 20499ec: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 20499f0: 80 88 c0 0d btst %g3, %o5 <== NOT EXECUTED 20499f4: 12 80 00 25 bne 2049a88 <== NOT EXECUTED 20499f8: ac 05 80 1b add %l6, %i3, %l6 <== NOT EXECUTED *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 20499fc: 84 00 80 1b add %g2, %i3, %g2 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 2049a00: 88 20 80 1b sub %g2, %i3, %g4 <== NOT EXECUTED 2049a04: 80 a4 80 04 cmp %l2, %g4 <== NOT EXECUTED 2049a08: 22 bf ff d8 be,a 2049968 <== NOT EXECUTED 2049a0c: aa 05 40 1d add %l5, %i5, %l5 <== NOT EXECUTED { /* * Find the clear bit in the map. Update the search map and map if * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) 2049a10: 80 a5 a0 1f cmp %l6, 0x1f <== NOT EXECUTED 2049a14: 28 bf ff f6 bleu,a 20499ec <== NOT EXECUTED 2049a18: 87 2c c0 16 sll %l3, %l6, %g3 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 2049a1c: 10 bf ff d3 b 2049968 <== NOT EXECUTED 2049a20: aa 05 40 1d add %l5, %i5, %l5 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 2049a24: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2049a28: 02 bf ff da be 2049990 <== NOT EXECUTED 2049a2c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 2049a30: ae 05 c0 1d add %l7, %i5, %l7 <== NOT EXECUTED 2049a34: 04 80 00 03 ble 2049a40 <== NOT EXECUTED 2049a38: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2049a3c: 86 10 20 00 clr %g3 <== NOT EXECUTED 2049a40: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 2049a44: 10 bf ff c2 b 204994c <== NOT EXECUTED 2049a48: 90 10 20 1f mov 0x1f, %o0 <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 2049a4c: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED 2049a50: 32 bf ff a4 bne,a 20498e0 <== NOT EXECUTED 2049a54: d6 05 c0 00 ld [ %l7 ], %o3 <== NOT EXECUTED 2049a58: 10 bf ff c0 b 2049958 <== NOT EXECUTED 2049a5c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 2049a60: 34 bf ff a0 bg,a 20498e0 <== NOT EXECUTED 2049a64: d6 05 c0 00 ld [ %l7 ], %o3 <== NOT EXECUTED 2049a68: 10 bf ff 84 b 2049878 <== NOT EXECUTED 2049a6c: 90 10 20 00 clr %o0 <== NOT EXECUTED map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 2049a70: 86 10 20 00 clr %g3 <== NOT EXECUTED 2049a74: 10 bf ff b5 b 2049948 <== NOT EXECUTED 2049a78: 84 10 20 00 clr %g2 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 2049a7c: a2 10 20 1f mov 0x1f, %l1 <== NOT EXECUTED 2049a80: 10 bf ff bf b 204997c <== NOT EXECUTED 2049a84: ac 10 20 1f mov 0x1f, %l6 <== NOT EXECUTED */ static rtems_rfs_bitmap_element rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_element bits) { return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 2049a88: 86 2b 40 03 andn %o5, %g3, %g3 <== NOT EXECUTED && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, 2049a8c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2049a90: 12 80 00 05 bne 2049aa4 <== NOT EXECUTED 2049a94: c6 25 40 00 st %g3, [ %l5 ] <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 2049a98: c2 05 c0 00 ld [ %l7 ], %g1 <== NOT EXECUTED 2049a9c: 94 28 40 0a andn %g1, %o2, %o2 <== NOT EXECUTED 2049aa0: d4 25 c0 00 st %o2, [ %l7 ] <== NOT EXECUTED 1 << search_offset); control->free--; 2049aa4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 2049aa8: c6 04 00 00 ld [ %l0 ], %g3 <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; *found = true; 2049aac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2049ab0: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 2049ab4: c2 28 c0 00 stb %g1, [ %g3 ] <== NOT EXECUTED 2049ab8: 90 10 20 00 clr %o0 <== NOT EXECUTED *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; 2049abc: 82 00 bf ff add %g2, -1, %g1 <== NOT EXECUTED *bit = test_bit; 2049ac0: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; 2049ac4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 2049ac8: 81 c7 e0 08 ret <== NOT EXECUTED 2049acc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 2049ad0: 10 bf ff 9e b 2049948 <== NOT EXECUTED 2049ad4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 2049ad8: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 2049adc: 84 10 00 1c mov %i4, %g2 <== NOT EXECUTED 2049ae0: 04 bf ff d9 ble 2049a44 <== NOT EXECUTED 2049ae4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2049ae8: 86 10 20 00 clr %g3 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 2049aec: 10 bf ff 98 b 204994c <== NOT EXECUTED 2049af0: 90 10 20 1f mov 0x1f, %o0 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 2049af4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 2049af8: ac 10 20 1f mov 0x1f, %l6 <== NOT EXECUTED 2049afc: 84 38 00 02 xnor %g0, %g2, %g2 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); map_offset = 0; } else { bits_skipped = search_offset + 1; 2049b00: 90 02 20 01 inc %o0 <== NOT EXECUTED /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 2049b04: 10 bf ff 83 b 2049910 <== NOT EXECUTED 2049b08: a2 00 80 11 add %g2, %l1, %l1 <== NOT EXECUTED =============================================================================== 02007184 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2007184: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2007188: 23 00 80 7d sethi %hi(0x201f400), %l1 200718c: e0 04 61 e4 ld [ %l1 + 0x1e4 ], %l0 ! 201f5e4 <_API_extensions_List> 2007190: a2 14 61 e4 or %l1, 0x1e4, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2007194: a2 04 60 04 add %l1, 4, %l1 2007198: 80 a4 00 11 cmp %l0, %l1 200719c: 02 80 00 09 be 20071c0 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 20071a0: 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)(); 20071a4: c2 04 20 08 ld [ %l0 + 8 ], %g1 20071a8: 9f c0 40 00 call %g1 20071ac: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 20071b0: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20071b4: 80 a4 00 11 cmp %l0, %l1 20071b8: 32 bf ff fc bne,a 20071a8 <_API_extensions_Run_postdriver+0x24> 20071bc: c2 04 20 08 ld [ %l0 + 8 ], %g1 20071c0: 81 c7 e0 08 ret 20071c4: 81 e8 00 00 restore =============================================================================== 020071c8 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20071c8: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20071cc: 23 00 80 7d sethi %hi(0x201f400), %l1 20071d0: e0 04 61 e4 ld [ %l1 + 0x1e4 ], %l0 ! 201f5e4 <_API_extensions_List> 20071d4: a2 14 61 e4 or %l1, 0x1e4, %l1 20071d8: a2 04 60 04 add %l1, 4, %l1 20071dc: 80 a4 00 11 cmp %l0, %l1 20071e0: 02 80 00 0a be 2007208 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 20071e4: 25 00 80 7d sethi %hi(0x201f400), %l2 20071e8: a4 14 a0 60 or %l2, 0x60, %l2 ! 201f460 <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 20071ec: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20071f0: 9f c0 40 00 call %g1 20071f4: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 20071f8: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20071fc: 80 a4 00 11 cmp %l0, %l1 2007200: 32 bf ff fc bne,a 20071f0 <_API_extensions_Run_postswitch+0x28> 2007204: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2007208: 81 c7 e0 08 ret 200720c: 81 e8 00 00 restore =============================================================================== 020012a8 <_Barrier_Manager_initialization>: #include #include void _Barrier_Manager_initialization(void) { } 20012a8: 81 c3 e0 08 retl =============================================================================== 020099f8 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 20099f8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 20099fc: 03 00 80 89 sethi %hi(0x2022400), %g1 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 2009a00: 7f ff e7 3e call 20036f8 2009a04: e0 00 63 f0 ld [ %g1 + 0x3f0 ], %l0 ! 20227f0 <_Thread_Executing> 2009a08: a2 10 00 08 mov %o0, %l1 switch ( the_rwlock->current_state ) { 2009a0c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2009a10: 80 a0 60 00 cmp %g1, 0 2009a14: 12 80 00 0c bne 2009a44 <_CORE_RWLock_Obtain_for_reading+0x4c> 2009a18: 80 a0 60 01 cmp %g1, 1 case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1; 2009a1c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2009a20: 84 10 20 01 mov 1, %g2 the_rwlock->number_of_readers += 1; 2009a24: 82 00 60 01 inc %g1 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2009a28: c4 26 20 44 st %g2, [ %i0 + 0x44 ] the_rwlock->number_of_readers += 1; 2009a2c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 2009a30: 7f ff e7 36 call 2003708 2009a34: 01 00 00 00 nop executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2009a38: c0 24 20 34 clr [ %l0 + 0x34 ] return; 2009a3c: 81 c7 e0 08 ret 2009a40: 81 e8 00 00 restore * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 2009a44: 02 80 00 15 be 2009a98 <_CORE_RWLock_Obtain_for_reading+0xa0> 2009a48: 80 8e a0 ff btst 0xff, %i2 /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 2009a4c: 02 80 00 0d be 2009a80 <_CORE_RWLock_Obtain_for_reading+0x88> 2009a50: 82 10 20 01 mov 1, %g1 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 2009a54: f2 24 20 20 st %i1, [ %l0 + 0x20 ] executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2009a58: c0 24 20 34 clr [ %l0 + 0x34 ] /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 2009a5c: f0 24 20 44 st %i0, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 2009a60: c0 24 20 30 clr [ %l0 + 0x30 ] 2009a64: c2 26 20 30 st %g1, [ %i0 + 0x30 ] executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 2009a68: 90 10 00 11 mov %l1, %o0 2009a6c: 7f ff e7 27 call 2003708 2009a70: 35 00 80 27 sethi %hi(0x2009c00), %i2 _Thread_queue_Enqueue_with_handler( 2009a74: b2 10 00 1b mov %i3, %i1 2009a78: 40 00 07 68 call 200b818 <_Thread_queue_Enqueue_with_handler> 2009a7c: 95 ee a0 44 restore %i2, 0x44, %o2 /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); 2009a80: 7f ff e7 22 call 2003708 2009a84: 90 10 00 11 mov %l1, %o0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2009a88: 82 10 20 02 mov 2, %g1 2009a8c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 2009a90: 81 c7 e0 08 ret 2009a94: 81 e8 00 00 restore executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 2009a98: 40 00 08 5b call 200bc04 <_Thread_queue_First> 2009a9c: 90 10 00 18 mov %i0, %o0 if ( !waiter ) { 2009aa0: 80 a2 20 00 cmp %o0, 0 2009aa4: 12 bf ff ea bne 2009a4c <_CORE_RWLock_Obtain_for_reading+0x54><== NEVER TAKEN 2009aa8: 80 8e a0 ff btst 0xff, %i2 the_rwlock->number_of_readers += 1; 2009aac: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009ab0: 82 00 60 01 inc %g1 2009ab4: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 2009ab8: 7f ff e7 14 call 2003708 2009abc: 90 10 00 11 mov %l1, %o0 executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2009ac0: c0 24 20 34 clr [ %l0 + 0x34 ] return; 2009ac4: 81 c7 e0 08 ret 2009ac8: 81 e8 00 00 restore =============================================================================== 02009b50 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 2009b50: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2009b54: 03 00 80 89 sethi %hi(0x2022400), %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 ); 2009b58: 7f ff e6 e8 call 20036f8 2009b5c: e0 00 63 f0 ld [ %g1 + 0x3f0 ], %l0 ! 20227f0 <_Thread_Executing> 2009b60: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2009b64: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2009b68: 80 a0 60 00 cmp %g1, 0 2009b6c: 02 80 00 2c be 2009c1c <_CORE_RWLock_Release+0xcc> 2009b70: 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 ) { 2009b74: 22 80 00 23 be,a 2009c00 <_CORE_RWLock_Release+0xb0> 2009b78: 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; 2009b7c: c0 24 20 34 clr [ %l0 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 2009b80: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2009b84: 7f ff e6 e1 call 2003708 2009b88: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2009b8c: 40 00 06 c1 call 200b690 <_Thread_queue_Dequeue> 2009b90: 90 10 00 18 mov %i0, %o0 if ( next ) { 2009b94: 80 a2 20 00 cmp %o0, 0 2009b98: 22 80 00 25 be,a 2009c2c <_CORE_RWLock_Release+0xdc> 2009b9c: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2009ba0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2009ba4: 80 a0 60 01 cmp %g1, 1 2009ba8: 02 80 00 23 be 2009c34 <_CORE_RWLock_Release+0xe4> 2009bac: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2009bb0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009bb4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2009bb8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2009bbc: 10 80 00 0a b 2009be4 <_CORE_RWLock_Release+0x94> 2009bc0: 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 || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 2009bc4: 80 a0 60 01 cmp %g1, 1 2009bc8: 02 80 00 0c be 2009bf8 <_CORE_RWLock_Release+0xa8> <== NEVER TAKEN 2009bcc: 92 10 00 08 mov %o0, %o1 return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2009bd0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009bd4: 90 10 00 18 mov %i0, %o0 while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2009bd8: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009bdc: 40 00 07 b9 call 200bac0 <_Thread_queue_Extract> 2009be0: 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 ); 2009be4: 40 00 08 08 call 200bc04 <_Thread_queue_First> 2009be8: 90 10 00 18 mov %i0, %o0 if ( !next || 2009bec: 80 a2 20 00 cmp %o0, 0 2009bf0: 32 bf ff f5 bne,a 2009bc4 <_CORE_RWLock_Release+0x74> 2009bf4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 2009bf8: 81 c7 e0 08 ret 2009bfc: 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; 2009c00: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2009c04: 80 a0 60 00 cmp %g1, 0 2009c08: 02 bf ff dd be 2009b7c <_CORE_RWLock_Release+0x2c> 2009c0c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2009c10: 7f ff e6 be call 2003708 2009c14: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 2009c18: 30 80 00 05 b,a 2009c2c <_CORE_RWLock_Release+0xdc> * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 2009c1c: 7f ff e6 bb call 2003708 2009c20: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2009c24: 82 10 20 02 mov 2, %g1 2009c28: c2 24 20 34 st %g1, [ %l0 + 0x34 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 2009c2c: 81 c7 e0 08 ret 2009c30: 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; 2009c34: 82 10 20 02 mov 2, %g1 2009c38: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 2009c3c: 81 c7 e0 08 ret 2009c40: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02009c44 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 2009c44: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009c48: 90 10 00 18 mov %i0, %o0 2009c4c: 40 00 05 8e call 200b284 <_Thread_Get> 2009c50: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009c54: c2 07 bf fc ld [ %fp + -4 ], %g1 2009c58: 80 a0 60 00 cmp %g1, 0 2009c5c: 12 80 00 08 bne 2009c7c <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN 2009c60: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009c64: 40 00 08 24 call 200bcf4 <_Thread_queue_Process_timeout> 2009c68: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2009c6c: 03 00 80 89 sethi %hi(0x2022400), %g1 2009c70: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 2022730 <_Thread_Dispatch_disable_level> 2009c74: 84 00 bf ff add %g2, -1, %g2 2009c78: c4 20 63 30 st %g2, [ %g1 + 0x330 ] 2009c7c: 81 c7 e0 08 ret 2009c80: 81 e8 00 00 restore =============================================================================== 02017b64 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 2017b64: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2017b68: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 2017b6c: a0 10 00 18 mov %i0, %l0 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2017b70: 80 a0 40 1a cmp %g1, %i2 2017b74: 0a 80 00 17 bcs 2017bd0 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 2017b78: b0 10 20 01 mov 1, %i0 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 2017b7c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2017b80: 80 a0 60 00 cmp %g1, 0 2017b84: 02 80 00 0a be 2017bac <_CORE_message_queue_Broadcast+0x48> 2017b88: a4 10 20 00 clr %l2 *count = 0; 2017b8c: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 2017b90: 81 c7 e0 08 ret 2017b94: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2017b98: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 2017b9c: 40 00 2f aa call 2023a44 2017ba0: a4 04 a0 01 inc %l2 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2017ba4: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 2017ba8: f4 20 40 00 st %i2, [ %g1 ] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 2017bac: 40 00 0a e9 call 201a750 <_Thread_queue_Dequeue> 2017bb0: 90 10 00 10 mov %l0, %o0 2017bb4: 92 10 00 19 mov %i1, %o1 2017bb8: a2 10 00 08 mov %o0, %l1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 2017bbc: 80 a2 20 00 cmp %o0, 0 2017bc0: 12 bf ff f6 bne 2017b98 <_CORE_message_queue_Broadcast+0x34> 2017bc4: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 2017bc8: e4 27 40 00 st %l2, [ %i5 ] 2017bcc: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 2017bd0: 81 c7 e0 08 ret 2017bd4: 81 e8 00 00 restore =============================================================================== 02011224 <_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 ) { 2011224: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 2011228: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 201122c: 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; 2011230: 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; 2011234: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2011238: 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)) { 201123c: 80 8e e0 03 btst 3, %i3 2011240: 02 80 00 09 be 2011264 <_CORE_message_queue_Initialize+0x40> 2011244: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 2011248: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 201124c: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 2011250: 80 a6 c0 11 cmp %i3, %l1 2011254: 08 80 00 05 bleu 2011268 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2011258: a0 04 60 14 add %l1, 0x14, %l0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 201125c: 81 c7 e0 08 ret 2011260: 91 e8 20 00 restore %g0, 0, %o0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 2011264: a0 04 60 14 add %l1, 0x14, %l0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 2011268: 92 10 00 1a mov %i2, %o1 201126c: 40 00 58 af call 2027528 <.umul> 2011270: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 2011274: 80 a2 00 11 cmp %o0, %l1 2011278: 0a bf ff f9 bcs 201125c <_CORE_message_queue_Initialize+0x38><== NEVER TAKEN 201127c: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2011280: 40 00 0c d1 call 20145c4 <_Workspace_Allocate> 2011284: 01 00 00 00 nop _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2011288: 80 a2 20 00 cmp %o0, 0 201128c: 02 bf ff f4 be 201125c <_CORE_message_queue_Initialize+0x38> 2011290: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2011294: 92 10 00 08 mov %o0, %o1 2011298: 94 10 00 1a mov %i2, %o2 201129c: 90 06 20 68 add %i0, 0x68, %o0 20112a0: 40 00 1c 68 call 2018440 <_Chain_Initialize> 20112a4: 96 10 00 10 mov %l0, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 20112a8: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 20112ac: c0 26 20 54 clr [ %i0 + 0x54 ] 20112b0: 82 18 60 01 xor %g1, 1, %g1 20112b4: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20112b8: 82 06 20 54 add %i0, 0x54, %g1 20112bc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20112c0: 82 06 20 50 add %i0, 0x50, %g1 20112c4: 90 10 00 18 mov %i0, %o0 20112c8: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 20112cc: 92 60 3f ff subx %g0, -1, %o1 20112d0: 94 10 20 80 mov 0x80, %o2 20112d4: 96 10 20 06 mov 6, %o3 20112d8: 40 00 09 67 call 2013874 <_Thread_queue_Initialize> 20112dc: b0 10 20 01 mov 1, %i0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 20112e0: 81 c7 e0 08 ret 20112e4: 81 e8 00 00 restore =============================================================================== 02007530 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 2007530: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 2007534: 21 00 80 7c sethi %hi(0x201f000), %l0 2007538: c2 04 23 a0 ld [ %l0 + 0x3a0 ], %g1 ! 201f3a0 <_Thread_Dispatch_disable_level> 200753c: 80 a0 60 00 cmp %g1, 0 2007540: 02 80 00 05 be 2007554 <_CORE_mutex_Seize+0x24> 2007544: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2007548: 80 8e a0 ff btst 0xff, %i2 200754c: 12 80 00 1a bne 20075b4 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN 2007550: 03 00 80 7d sethi %hi(0x201f400), %g1 2007554: 90 10 00 18 mov %i0, %o0 2007558: 40 00 1b 0e call 200e190 <_CORE_mutex_Seize_interrupt_trylock> 200755c: 92 07 a0 54 add %fp, 0x54, %o1 2007560: 80 a2 20 00 cmp %o0, 0 2007564: 02 80 00 12 be 20075ac <_CORE_mutex_Seize+0x7c> 2007568: 80 8e a0 ff btst 0xff, %i2 200756c: 02 80 00 1a be 20075d4 <_CORE_mutex_Seize+0xa4> 2007570: 01 00 00 00 nop 2007574: c4 04 23 a0 ld [ %l0 + 0x3a0 ], %g2 2007578: 03 00 80 7d sethi %hi(0x201f400), %g1 200757c: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> 2007580: f2 20 60 20 st %i1, [ %g1 + 0x20 ] 2007584: f0 20 60 44 st %i0, [ %g1 + 0x44 ] 2007588: 82 00 a0 01 add %g2, 1, %g1 200758c: c2 24 23 a0 st %g1, [ %l0 + 0x3a0 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2007590: 82 10 20 01 mov 1, %g1 2007594: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 2007598: 7f ff ea c7 call 20020b4 200759c: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 20075a0: 90 10 00 18 mov %i0, %o0 20075a4: 7f ff ff c0 call 20074a4 <_CORE_mutex_Seize_interrupt_blocking> 20075a8: 92 10 00 1b mov %i3, %o1 20075ac: 81 c7 e0 08 ret 20075b0: 81 e8 00 00 restore 20075b4: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 20075b8: 80 a0 60 01 cmp %g1, 1 20075bc: 28 bf ff e7 bleu,a 2007558 <_CORE_mutex_Seize+0x28> 20075c0: 90 10 00 18 mov %i0, %o0 20075c4: 90 10 20 00 clr %o0 20075c8: 92 10 20 00 clr %o1 20075cc: 40 00 01 c5 call 2007ce0 <_Internal_error_Occurred> 20075d0: 94 10 20 13 mov 0x13, %o2 20075d4: 7f ff ea b8 call 20020b4 20075d8: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 20075dc: 03 00 80 7d sethi %hi(0x201f400), %g1 20075e0: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> 20075e4: 84 10 20 01 mov 1, %g2 20075e8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 20075ec: 81 c7 e0 08 ret 20075f0: 81 e8 00 00 restore =============================================================================== 02007790 <_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 ) { 2007790: 9d e3 bf a0 save %sp, -96, %sp 2007794: a0 10 00 18 mov %i0, %l0 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2007798: b0 10 20 00 clr %i0 200779c: 40 00 06 92 call 20091e4 <_Thread_queue_Dequeue> 20077a0: 90 10 00 10 mov %l0, %o0 20077a4: 80 a2 20 00 cmp %o0, 0 20077a8: 02 80 00 04 be 20077b8 <_CORE_semaphore_Surrender+0x28> 20077ac: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 20077b0: 81 c7 e0 08 ret 20077b4: 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 ); 20077b8: 7f ff ea 3b call 20020a4 20077bc: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20077c0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 20077c4: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 20077c8: 80 a0 40 02 cmp %g1, %g2 20077cc: 1a 80 00 05 bcc 20077e0 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 20077d0: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20077d4: 82 00 60 01 inc %g1 20077d8: b0 10 20 00 clr %i0 20077dc: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20077e0: 7f ff ea 35 call 20020b4 20077e4: 01 00 00 00 nop } return status; } 20077e8: 81 c7 e0 08 ret 20077ec: 81 e8 00 00 restore =============================================================================== 0200e074 <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 200e074: c0 22 20 04 clr [ %o0 + 4 ] next = starting_address; while ( count-- ) { 200e078: 80 a2 a0 00 cmp %o2, 0 200e07c: 02 80 00 08 be 200e09c <_Chain_Initialize+0x28> <== NEVER TAKEN 200e080: 82 10 00 08 mov %o0, %g1 current->next = next; next->previous = current; 200e084: c2 22 60 04 st %g1, [ %o1 + 4 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 200e088: d2 20 40 00 st %o1, [ %g1 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200e08c: 94 82 bf ff addcc %o2, -1, %o2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 200e090: 82 10 00 09 mov %o1, %g1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200e094: 12 bf ff fc bne 200e084 <_Chain_Initialize+0x10> 200e098: 92 02 40 0b add %o1, %o3, %o1 next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 200e09c: 84 02 20 04 add %o0, 4, %g2 200e0a0: c4 20 40 00 st %g2, [ %g1 ] the_chain->last = current; } 200e0a4: 81 c3 e0 08 retl 200e0a8: c2 22 20 08 st %g1, [ %o0 + 8 ] =============================================================================== 020012b0 <_Dual_ported_memory_Manager_initialization>: #include #include void _Dual_ported_memory_Manager_initialization(void) { } 20012b0: 81 c3 e0 08 retl =============================================================================== 020012b8 <_Event_Manager_initialization>: #include #include void _Event_Manager_initialization(void) { } 20012b8: 81 c3 e0 08 retl =============================================================================== 020062cc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 20062cc: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 20062d0: 03 00 80 7d sethi %hi(0x201f400), %g1 20062d4: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 ! 201f460 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 20062d8: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 20062dc: 7f ff ef 72 call 20020a4 20062e0: e4 04 21 68 ld [ %l0 + 0x168 ], %l2 pending_events = api->pending_events; 20062e4: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 20062e8: a2 8e 00 01 andcc %i0, %g1, %l1 20062ec: 02 80 00 07 be 2006308 <_Event_Seize+0x3c> 20062f0: 80 8e 60 01 btst 1, %i1 20062f4: 80 a6 00 11 cmp %i0, %l1 20062f8: 02 80 00 23 be 2006384 <_Event_Seize+0xb8> 20062fc: 80 8e 60 02 btst 2, %i1 2006300: 12 80 00 21 bne 2006384 <_Event_Seize+0xb8> <== ALWAYS TAKEN 2006304: 80 8e 60 01 btst 1, %i1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 2006308: 12 80 00 18 bne 2006368 <_Event_Seize+0x9c> 200630c: 82 10 20 01 mov 1, %g1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 2006310: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t) event_in; 2006314: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 2006318: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 200631c: 33 00 80 7f sethi %hi(0x201fc00), %i1 2006320: c2 26 61 08 st %g1, [ %i1 + 0x108 ] ! 201fd08 <_Event_Sync_state> _ISR_Enable( level ); 2006324: 7f ff ef 64 call 20020b4 2006328: 01 00 00 00 nop if ( ticks ) { 200632c: 80 a6 a0 00 cmp %i2, 0 2006330: 32 80 00 1c bne,a 20063a0 <_Event_Seize+0xd4> 2006334: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2006338: 90 10 00 10 mov %l0, %o0 200633c: 40 00 0d 2b call 20097e8 <_Thread_Set_state> 2006340: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2006344: 7f ff ef 58 call 20020a4 2006348: 01 00 00 00 nop sync_state = _Event_Sync_state; 200634c: f0 06 61 08 ld [ %i1 + 0x108 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2006350: c0 26 61 08 clr [ %i1 + 0x108 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2006354: 80 a6 20 01 cmp %i0, 1 2006358: 02 80 00 1f be 20063d4 <_Event_Seize+0x108> 200635c: b2 10 00 10 mov %l0, %i1 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 2006360: 40 00 08 db call 20086cc <_Thread_blocking_operation_Cancel> 2006364: 95 e8 00 08 restore %g0, %o0, %o2 *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 2006368: 7f ff ef 53 call 20020b4 200636c: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 2006370: 82 10 20 0d mov 0xd, %g1 ! d 2006374: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 2006378: e2 26 c0 00 st %l1, [ %i3 ] 200637c: 81 c7 e0 08 ret 2006380: 81 e8 00 00 restore pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 2006384: 82 28 40 11 andn %g1, %l1, %g1 2006388: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 200638c: 7f ff ef 4a call 20020b4 2006390: 01 00 00 00 nop *event_out = seized_events; 2006394: e2 26 c0 00 st %l1, [ %i3 ] return; 2006398: 81 c7 e0 08 ret 200639c: 81 e8 00 00 restore Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20063a0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 20063a4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20063a8: 03 00 80 19 sethi %hi(0x2006400), %g1 20063ac: 82 10 61 70 or %g1, 0x170, %g1 ! 2006570 <_Event_Timeout> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20063b0: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 20063b4: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20063b8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20063bc: 11 00 80 7d sethi %hi(0x201f400), %o0 20063c0: 92 04 20 48 add %l0, 0x48, %o1 20063c4: 40 00 0f 25 call 200a058 <_Watchdog_Insert> 20063c8: 90 12 20 80 or %o0, 0x80, %o0 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 20063cc: 10 bf ff dc b 200633c <_Event_Seize+0x70> 20063d0: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 20063d4: 7f ff ef 38 call 20020b4 20063d8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02006438 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2006438: 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 ]; 200643c: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2006440: 7f ff ef 19 call 20020a4 2006444: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 2006448: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 200644c: c4 04 00 00 ld [ %l0 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 2006450: 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 ) ) { 2006454: 86 88 40 02 andcc %g1, %g2, %g3 2006458: 02 80 00 3a be 2006540 <_Event_Surrender+0x108> 200645c: 09 00 80 7d sethi %hi(0x201f400), %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() && 2006460: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 ! 201f43c <_ISR_Nest_level> 2006464: 80 a1 20 00 cmp %g4, 0 2006468: 12 80 00 1d bne 20064dc <_Event_Surrender+0xa4> 200646c: 09 00 80 7d sethi %hi(0x201f400), %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2006470: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 2006474: 80 89 21 00 btst 0x100, %g4 2006478: 02 80 00 32 be 2006540 <_Event_Surrender+0x108> 200647c: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2006480: 02 80 00 04 be 2006490 <_Event_Surrender+0x58> 2006484: 80 8c a0 02 btst 2, %l2 2006488: 02 80 00 2e be 2006540 <_Event_Surrender+0x108> <== NEVER TAKEN 200648c: 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; 2006490: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 /* * 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 ); 2006494: 84 28 80 03 andn %g2, %g3, %g2 2006498: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 200649c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20064a0: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 20064a4: 7f ff ef 04 call 20020b4 20064a8: 90 10 00 11 mov %l1, %o0 20064ac: 7f ff ee fe call 20020a4 20064b0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 20064b4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 20064b8: 80 a0 60 02 cmp %g1, 2 20064bc: 02 80 00 23 be 2006548 <_Event_Surrender+0x110> 20064c0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 20064c4: 90 10 00 11 mov %l1, %o0 20064c8: 7f ff ee fb call 20020b4 20064cc: 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 ); 20064d0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20064d4: 40 00 09 19 call 2008938 <_Thread_Clear_state> 20064d8: 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() && 20064dc: c8 01 20 60 ld [ %g4 + 0x60 ], %g4 20064e0: 80 a6 00 04 cmp %i0, %g4 20064e4: 32 bf ff e4 bne,a 2006474 <_Event_Surrender+0x3c> 20064e8: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 20064ec: 09 00 80 7f sethi %hi(0x201fc00), %g4 20064f0: da 01 21 08 ld [ %g4 + 0x108 ], %o5 ! 201fd08 <_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() && 20064f4: 80 a3 60 02 cmp %o5, 2 20064f8: 02 80 00 07 be 2006514 <_Event_Surrender+0xdc> <== NEVER TAKEN 20064fc: 80 a0 40 03 cmp %g1, %g3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2006500: da 01 21 08 ld [ %g4 + 0x108 ], %o5 /* * 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() && 2006504: 80 a3 60 01 cmp %o5, 1 2006508: 32 bf ff db bne,a 2006474 <_Event_Surrender+0x3c> 200650c: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _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) ) { 2006510: 80 a0 40 03 cmp %g1, %g3 2006514: 02 80 00 04 be 2006524 <_Event_Surrender+0xec> 2006518: 80 8c a0 02 btst 2, %l2 200651c: 02 80 00 09 be 2006540 <_Event_Surrender+0x108> <== NEVER TAKEN 2006520: 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; 2006524: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 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 ); 2006528: 84 28 80 03 andn %g2, %g3, %g2 200652c: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 2006530: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2006534: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2006538: 82 10 20 03 mov 3, %g1 200653c: c2 21 21 08 st %g1, [ %g4 + 0x108 ] _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2006540: 7f ff ee dd call 20020b4 2006544: 91 e8 00 11 restore %g0, %l1, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2006548: 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 ); 200654c: 7f ff ee da call 20020b4 2006550: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2006554: 40 00 0f 2a call 200a1fc <_Watchdog_Remove> 2006558: 90 06 20 48 add %i0, 0x48, %o0 200655c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2006560: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2006564: 40 00 08 f5 call 2008938 <_Thread_Clear_state> 2006568: 81 e8 00 00 restore =============================================================================== 02006570 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2006570: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2006574: 90 10 00 18 mov %i0, %o0 2006578: 40 00 0a 18 call 2008dd8 <_Thread_Get> 200657c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2006580: c2 07 bf fc ld [ %fp + -4 ], %g1 2006584: 80 a0 60 00 cmp %g1, 0 2006588: 12 80 00 15 bne 20065dc <_Event_Timeout+0x6c> <== NEVER TAKEN 200658c: a0 10 00 08 mov %o0, %l0 * * 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 ); 2006590: 7f ff ee c5 call 20020a4 2006594: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2006598: 03 00 80 7d sethi %hi(0x201f400), %g1 200659c: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> 20065a0: 80 a4 00 01 cmp %l0, %g1 20065a4: 02 80 00 10 be 20065e4 <_Event_Timeout+0x74> 20065a8: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20065ac: 82 10 20 06 mov 6, %g1 20065b0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 20065b4: 7f ff ee c0 call 20020b4 20065b8: 01 00 00 00 nop 20065bc: 90 10 00 10 mov %l0, %o0 20065c0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 20065c4: 40 00 08 dd call 2008938 <_Thread_Clear_state> 20065c8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20065cc: 03 00 80 7c sethi %hi(0x201f000), %g1 20065d0: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 201f3a0 <_Thread_Dispatch_disable_level> 20065d4: 84 00 bf ff add %g2, -1, %g2 20065d8: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] 20065dc: 81 c7 e0 08 ret 20065e0: 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 ) 20065e4: 03 00 80 7f sethi %hi(0x201fc00), %g1 20065e8: c4 00 61 08 ld [ %g1 + 0x108 ], %g2 ! 201fd08 <_Event_Sync_state> 20065ec: 80 a0 a0 01 cmp %g2, 1 20065f0: 32 bf ff f0 bne,a 20065b0 <_Event_Timeout+0x40> 20065f4: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20065f8: 84 10 20 02 mov 2, %g2 20065fc: c4 20 61 08 st %g2, [ %g1 + 0x108 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2006600: 10 bf ff ec b 20065b0 <_Event_Timeout+0x40> 2006604: 82 10 20 06 mov 6, %g1 =============================================================================== 020012f0 <_Extension_Manager_initialization>: #include #include void _Extension_Manager_initialization(void) { } 20012f0: 81 c3 e0 08 retl =============================================================================== 0200e364 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200e364: 9d e3 bf 98 save %sp, -104, %sp Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 200e368: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200e36c: a0 10 00 18 mov %i0, %l0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 200e370: 80 a6 40 14 cmp %i1, %l4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200e374: e4 06 20 08 ld [ %i0 + 8 ], %l2 200e378: 18 80 00 72 bgu 200e540 <_Heap_Allocate_aligned_with_boundary+0x1dc> 200e37c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200e380: 80 a6 e0 00 cmp %i3, 0 200e384: 12 80 00 6d bne 200e538 <_Heap_Allocate_aligned_with_boundary+0x1d4> 200e388: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200e38c: 80 a4 00 12 cmp %l0, %l2 200e390: 02 80 00 6f be 200e54c <_Heap_Allocate_aligned_with_boundary+0x1e8> 200e394: a2 10 20 00 clr %l1 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_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200e398: 82 10 20 04 mov 4, %g1 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; 200e39c: b8 07 60 07 add %i5, 7, %i4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200e3a0: 82 20 40 19 sub %g1, %i1, %g1 200e3a4: 10 80 00 09 b 200e3c8 <_Heap_Allocate_aligned_with_boundary+0x64> 200e3a8: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200e3ac: 80 a6 20 00 cmp %i0, 0 200e3b0: 32 80 00 54 bne,a 200e500 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN 200e3b4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200e3b8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200e3bc: 80 a4 00 12 cmp %l0, %l2 200e3c0: 22 80 00 57 be,a 200e51c <_Heap_Allocate_aligned_with_boundary+0x1b8> 200e3c4: b0 10 20 00 clr %i0 /* * 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 ) { 200e3c8: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200e3cc: 80 a5 00 13 cmp %l4, %l3 200e3d0: 1a bf ff fa bcc 200e3b8 <_Heap_Allocate_aligned_with_boundary+0x54> 200e3d4: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200e3d8: 80 a6 a0 00 cmp %i2, 0 200e3dc: 02 bf ff f4 be 200e3ac <_Heap_Allocate_aligned_with_boundary+0x48> 200e3e0: b0 04 a0 08 add %l2, 8, %i0 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_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200e3e4: c2 07 bf fc ld [ %fp + -4 ], %g1 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200e3e8: ee 04 20 14 ld [ %l0 + 0x14 ], %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; 200e3ec: a6 0c ff fe and %l3, -2, %l3 200e3f0: a6 04 80 13 add %l2, %l3, %l3 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_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200e3f4: b0 00 40 13 add %g1, %l3, %i0 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; 200e3f8: 82 27 00 17 sub %i4, %l7, %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200e3fc: 90 10 00 18 mov %i0, %o0 200e400: a6 00 40 13 add %g1, %l3, %l3 200e404: 40 00 33 7d call 201b1f8 <.urem> 200e408: 92 10 00 1a mov %i2, %o1 200e40c: 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 ) { 200e410: 80 a4 c0 18 cmp %l3, %i0 200e414: 1a 80 00 06 bcc 200e42c <_Heap_Allocate_aligned_with_boundary+0xc8> 200e418: ac 04 a0 08 add %l2, 8, %l6 200e41c: 90 10 00 13 mov %l3, %o0 200e420: 40 00 33 76 call 201b1f8 <.urem> 200e424: 92 10 00 1a mov %i2, %o1 200e428: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200e42c: 80 a6 e0 00 cmp %i3, 0 200e430: 02 80 00 24 be 200e4c0 <_Heap_Allocate_aligned_with_boundary+0x15c> 200e434: 80 a5 80 18 cmp %l6, %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; 200e438: a6 06 00 19 add %i0, %i1, %l3 200e43c: 92 10 00 1b mov %i3, %o1 200e440: 40 00 33 6e call 201b1f8 <.urem> 200e444: 90 10 00 13 mov %l3, %o0 200e448: 90 24 c0 08 sub %l3, %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 ) { 200e44c: 80 a4 c0 08 cmp %l3, %o0 200e450: 08 80 00 1b bleu 200e4bc <_Heap_Allocate_aligned_with_boundary+0x158> 200e454: 80 a6 00 08 cmp %i0, %o0 200e458: 1a 80 00 1a bcc 200e4c0 <_Heap_Allocate_aligned_with_boundary+0x15c> 200e45c: 80 a5 80 18 cmp %l6, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200e460: aa 05 80 19 add %l6, %i1, %l5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200e464: 80 a5 40 08 cmp %l5, %o0 200e468: 28 80 00 09 bleu,a 200e48c <_Heap_Allocate_aligned_with_boundary+0x128> 200e46c: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200e470: 10 bf ff d3 b 200e3bc <_Heap_Allocate_aligned_with_boundary+0x58> 200e474: e4 04 a0 08 ld [ %l2 + 8 ], %l2 /* 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 ) { 200e478: 1a 80 00 11 bcc 200e4bc <_Heap_Allocate_aligned_with_boundary+0x158> 200e47c: 80 a5 40 08 cmp %l5, %o0 if ( boundary_line < boundary_floor ) { 200e480: 38 bf ff cf bgu,a 200e3bc <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200e484: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200e488: b0 22 00 19 sub %o0, %i1, %i0 200e48c: 92 10 00 1a mov %i2, %o1 200e490: 40 00 33 5a call 201b1f8 <.urem> 200e494: 90 10 00 18 mov %i0, %o0 200e498: 92 10 00 1b mov %i3, %o1 200e49c: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200e4a0: a6 06 00 19 add %i0, %i1, %l3 200e4a4: 40 00 33 55 call 201b1f8 <.urem> 200e4a8: 90 10 00 13 mov %l3, %o0 200e4ac: 90 24 c0 08 sub %l3, %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 ) { 200e4b0: 80 a4 c0 08 cmp %l3, %o0 200e4b4: 18 bf ff f1 bgu 200e478 <_Heap_Allocate_aligned_with_boundary+0x114> 200e4b8: 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 ) { 200e4bc: 80 a5 80 18 cmp %l6, %i0 200e4c0: 18 bf ff be bgu 200e3b8 <_Heap_Allocate_aligned_with_boundary+0x54> 200e4c4: 82 10 3f f8 mov -8, %g1 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; 200e4c8: 90 10 00 18 mov %i0, %o0 200e4cc: a6 20 40 12 sub %g1, %l2, %l3 200e4d0: 92 10 00 1d mov %i5, %o1 200e4d4: 40 00 33 49 call 201b1f8 <.urem> 200e4d8: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200e4dc: 90 a4 c0 08 subcc %l3, %o0, %o0 200e4e0: 02 bf ff b4 be 200e3b0 <_Heap_Allocate_aligned_with_boundary+0x4c> 200e4e4: 80 a6 20 00 cmp %i0, 0 200e4e8: 80 a5 c0 08 cmp %l7, %o0 200e4ec: 18 bf ff b3 bgu 200e3b8 <_Heap_Allocate_aligned_with_boundary+0x54> 200e4f0: 80 a6 20 00 cmp %i0, 0 boundary ); } } if ( alloc_begin != 0 ) { 200e4f4: 22 bf ff b2 be,a 200e3bc <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200e4f8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200e4fc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200e500: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200e504: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200e508: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200e50c: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200e510: 90 10 00 10 mov %l0, %o0 200e514: 7f ff e5 a2 call 2007b9c <_Heap_Block_allocate> 200e518: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200e51c: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200e520: 80 a0 40 11 cmp %g1, %l1 200e524: 1a 80 00 08 bcc 200e544 <_Heap_Allocate_aligned_with_boundary+0x1e0> 200e528: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200e52c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200e530: 81 c7 e0 08 ret 200e534: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200e538: 08 80 00 07 bleu 200e554 <_Heap_Allocate_aligned_with_boundary+0x1f0> 200e53c: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200e540: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200e544: 81 c7 e0 08 ret 200e548: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200e54c: 10 bf ff f4 b 200e51c <_Heap_Allocate_aligned_with_boundary+0x1b8> 200e550: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200e554: 22 bf ff 8e be,a 200e38c <_Heap_Allocate_aligned_with_boundary+0x28> 200e558: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200e55c: 10 bf ff 8d b 200e390 <_Heap_Allocate_aligned_with_boundary+0x2c> 200e560: 80 a4 00 12 cmp %l0, %l2 =============================================================================== 02012fb8 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2012fb8: 9d e3 bf a0 save %sp, -96, %sp Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 2012fbc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2012fc0: a0 10 00 18 mov %i0, %l0 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 2012fc4: 80 a6 40 01 cmp %i1, %g1 2012fc8: 0a 80 00 2a bcs 2013070 <_Heap_Extend+0xb8> 2012fcc: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 2012fd0: 80 a6 40 01 cmp %i1, %g1 2012fd4: 12 80 00 25 bne 2013068 <_Heap_Extend+0xb0> 2012fd8: b0 10 20 02 mov 2, %i0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 2012fdc: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 2012fe0: b4 06 40 1a add %i1, %i2, %i2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 2012fe4: b2 26 80 11 sub %i2, %l1, %i1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 2012fe8: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 2012fec: b2 06 7f f8 add %i1, -8, %i1 2012ff0: 7f ff c4 e7 call 200438c <.urem> 2012ff4: 90 10 00 19 mov %i1, %o0 2012ff8: 90 26 40 08 sub %i1, %o0, %o0 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 2012ffc: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 2013000: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2013004: 80 a0 40 08 cmp %g1, %o0 2013008: 18 80 00 18 bgu 2013068 <_Heap_Extend+0xb0> <== NEVER TAKEN 201300c: b0 10 20 00 clr %i0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 2013010: c2 04 60 04 ld [ %l1 + 4 ], %g1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 2013014: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 2013018: 82 08 60 01 and %g1, 1, %g1 201301c: 82 12 00 01 or %o0, %g1, %g1 2013020: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2013024: 82 02 00 11 add %o0, %l1, %g1 2013028: 84 20 80 01 sub %g2, %g1, %g2 201302c: 84 10 a0 01 or %g2, 1, %g2 2013030: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2013034: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2013038: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 201303c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 2013040: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2013044: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2013048: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 201304c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 2013050: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2013054: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 2013058: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 201305c: 90 10 00 10 mov %l0, %o0 2013060: 7f ff e2 26 call 200b8f8 <_Heap_Free> 2013064: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 2013068: 81 c7 e0 08 ret 201306c: 81 e8 00 00 restore uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 2013070: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 2013074: 80 a6 40 02 cmp %i1, %g2 2013078: 0a bf ff d6 bcs 2012fd0 <_Heap_Extend+0x18> 201307c: b0 10 20 01 mov 1, %i0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 2013080: 81 c7 e0 08 ret 2013084: 81 e8 00 00 restore =============================================================================== 0200e564 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200e564: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 200e568: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200e56c: 40 00 33 23 call 201b1f8 <.urem> 200e570: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 200e574: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 200e578: b2 06 7f f8 add %i1, -8, %i1 200e57c: 90 26 40 08 sub %i1, %o0, %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 200e580: 80 a2 00 01 cmp %o0, %g1 200e584: 0a 80 00 36 bcs 200e65c <_Heap_Free+0xf8> 200e588: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 200e58c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 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 200e590: 80 a2 00 03 cmp %o0, %g3 200e594: 18 80 00 32 bgu 200e65c <_Heap_Free+0xf8> 200e598: 01 00 00 00 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 200e59c: da 02 20 04 ld [ %o0 + 4 ], %o5 200e5a0: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e5a4: 84 02 00 04 add %o0, %g4, %g2 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 200e5a8: 80 a0 40 02 cmp %g1, %g2 200e5ac: 18 80 00 2c bgu 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e5b0: 80 a0 c0 02 cmp %g3, %g2 200e5b4: 0a 80 00 2a bcs 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e5b8: 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; 200e5bc: d8 00 a0 04 ld [ %g2 + 4 ], %o4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200e5c0: 80 8b 20 01 btst 1, %o4 200e5c4: 02 80 00 26 be 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e5c8: 96 0b 3f fe and %o4, -2, %o3 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200e5cc: 80 a0 c0 02 cmp %g3, %g2 200e5d0: 02 80 00 06 be 200e5e8 <_Heap_Free+0x84> 200e5d4: 98 10 20 00 clr %o4 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200e5d8: 98 00 80 0b add %g2, %o3, %o4 200e5dc: d8 03 20 04 ld [ %o4 + 4 ], %o4 200e5e0: 98 0b 20 01 and %o4, 1, %o4 200e5e4: 98 1b 20 01 xor %o4, 1, %o4 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 ) ) { 200e5e8: 80 8b 60 01 btst 1, %o5 200e5ec: 12 80 00 1e bne 200e664 <_Heap_Free+0x100> 200e5f0: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200e5f4: d4 02 00 00 ld [ %o0 ], %o2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200e5f8: 9a 22 00 0a sub %o0, %o2, %o5 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 200e5fc: 80 a0 40 0d cmp %g1, %o5 200e600: 18 80 00 17 bgu 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e604: 80 a0 c0 0d cmp %g3, %o5 200e608: 0a 80 00 15 bcs 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e60c: 01 00 00 00 nop 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) ) { 200e610: c2 03 60 04 ld [ %o5 + 4 ], %g1 200e614: 80 88 60 01 btst 1, %g1 200e618: 02 80 00 11 be 200e65c <_Heap_Free+0xf8> <== NEVER TAKEN 200e61c: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200e620: 22 80 00 3a be,a 200e708 <_Heap_Free+0x1a4> 200e624: 94 01 00 0a add %g4, %o2, %o2 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200e628: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200e62c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200e630: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200e634: 86 00 ff ff add %g3, -1, %g3 200e638: c6 26 20 38 st %g3, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200e63c: 96 01 00 0b add %g4, %o3, %o3 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200e640: c2 20 a0 0c st %g1, [ %g2 + 0xc ] 200e644: 94 02 c0 0a add %o3, %o2, %o2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 200e648: c4 20 60 08 st %g2, [ %g1 + 8 ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200e64c: d4 23 40 0a st %o2, [ %o5 + %o2 ] 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; 200e650: 94 12 a0 01 or %o2, 1, %o2 200e654: 10 80 00 10 b 200e694 <_Heap_Free+0x130> 200e658: d4 23 60 04 st %o2, [ %o5 + 4 ] --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200e65c: 81 c7 e0 08 ret 200e660: 91 e8 20 00 restore %g0, 0, %o0 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 */ 200e664: 02 80 00 17 be 200e6c0 <_Heap_Free+0x15c> 200e668: 82 11 20 01 or %g4, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 200e66c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200e670: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 200e674: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 200e678: c4 22 20 08 st %g2, [ %o0 + 8 ] uintptr_t const size = block_size + next_block_size; 200e67c: 96 02 c0 04 add %o3, %g4, %o3 new_block->prev = prev; next->prev = new_block; 200e680: d0 20 a0 0c st %o0, [ %g2 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200e684: d6 22 00 0b st %o3, [ %o0 + %o3 ] prev->next = new_block; 200e688: d0 20 60 08 st %o0, [ %g1 + 8 ] 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; 200e68c: 96 12 e0 01 or %o3, 1, %o3 200e690: d6 22 20 04 st %o3, [ %o0 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e694: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200e698: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200e69c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e6a0: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 200e6a4: 88 00 c0 04 add %g3, %g4, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200e6a8: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 200e6ac: c8 26 20 30 st %g4, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 200e6b0: 82 00 60 01 inc %g1 200e6b4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 200e6b8: 81 c7 e0 08 ret 200e6bc: 91 e8 20 01 restore %g0, 1, %o0 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; 200e6c0: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200e6c4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 200e6c8: c6 06 20 08 ld [ %i0 + 8 ], %g3 200e6cc: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 200e6d0: c8 22 00 04 st %g4, [ %o0 + %g4 ] } 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; 200e6d4: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200e6d8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 200e6dc: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; 200e6e0: f0 22 20 0c st %i0, [ %o0 + 0xc ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200e6e4: 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; 200e6e8: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 200e6ec: d0 20 e0 0c st %o0, [ %g3 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200e6f0: d0 26 20 08 st %o0, [ %i0 + 8 ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200e6f4: 80 a0 40 02 cmp %g1, %g2 200e6f8: 08 bf ff e7 bleu 200e694 <_Heap_Free+0x130> 200e6fc: c2 26 20 38 st %g1, [ %i0 + 0x38 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 200e700: 10 bf ff e5 b 200e694 <_Heap_Free+0x130> 200e704: 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; 200e708: 82 12 a0 01 or %o2, 1, %g1 200e70c: c2 23 60 04 st %g1, [ %o5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200e710: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 200e714: d4 22 00 04 st %o2, [ %o0 + %g4 ] _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; 200e718: 82 08 7f fe and %g1, -2, %g1 200e71c: 10 bf ff de b 200e694 <_Heap_Free+0x130> 200e720: c2 20 a0 04 st %g1, [ %g2 + 4 ] =============================================================================== 02030d04 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 2030d04: 9d e3 bf a0 save %sp, -96, %sp return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2030d08: c2 06 20 08 ld [ %i0 + 8 ], %g1 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 2030d0c: c0 26 40 00 clr [ %i1 ] info->largest = 0; 2030d10: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 2030d14: 80 a6 00 01 cmp %i0, %g1 2030d18: 02 80 00 13 be 2030d64 <_Heap_Get_free_information+0x60> <== NEVER TAKEN 2030d1c: c0 26 60 08 clr [ %i1 + 8 ] 2030d20: 88 10 20 01 mov 1, %g4 2030d24: 10 80 00 03 b 2030d30 <_Heap_Get_free_information+0x2c> 2030d28: 86 10 20 00 clr %g3 2030d2c: 88 10 00 02 mov %g2, %g4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 2030d30: c4 00 60 04 ld [ %g1 + 4 ], %g2 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 2030d34: da 06 60 04 ld [ %i1 + 4 ], %o5 2030d38: 84 08 bf fe and %g2, -2, %g2 2030d3c: 80 a3 40 02 cmp %o5, %g2 2030d40: 1a 80 00 03 bcc 2030d4c <_Heap_Get_free_information+0x48> 2030d44: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 2030d48: c4 26 60 04 st %g2, [ %i1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 2030d4c: c2 00 60 08 ld [ %g1 + 8 ], %g1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 2030d50: 80 a6 00 01 cmp %i0, %g1 2030d54: 12 bf ff f6 bne 2030d2c <_Heap_Get_free_information+0x28> 2030d58: 84 01 20 01 add %g4, 1, %g2 2030d5c: c6 26 60 08 st %g3, [ %i1 + 8 ] 2030d60: c8 26 40 00 st %g4, [ %i1 ] 2030d64: 81 c7 e0 08 ret 2030d68: 81 e8 00 00 restore =============================================================================== 020475cc <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 20475cc: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 20475d0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 20475d4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 20475d8: c0 26 40 00 clr [ %i1 ] the_info->Free.total = 0; 20475dc: c0 26 60 08 clr [ %i1 + 8 ] the_info->Free.largest = 0; 20475e0: c0 26 60 04 clr [ %i1 + 4 ] the_info->Used.number = 0; 20475e4: c0 26 60 0c clr [ %i1 + 0xc ] the_info->Used.total = 0; 20475e8: c0 26 60 14 clr [ %i1 + 0x14 ] the_info->Used.largest = 0; 20475ec: c0 26 60 10 clr [ %i1 + 0x10 ] while ( the_block != end ) { 20475f0: 80 a0 40 02 cmp %g1, %g2 20475f4: 02 80 00 1a be 204765c <_Heap_Get_information+0x90> <== NEVER TAKEN 20475f8: 86 10 20 08 mov 8, %g3 20475fc: da 00 60 04 ld [ %g1 + 4 ], %o5 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) ) info = &the_info->Used; 2047600: 92 06 60 0c add %i1, 0xc, %o1 - 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; 2047604: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2047608: 82 00 40 04 add %g1, %g4, %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; 204760c: da 00 60 04 ld [ %g1 + 4 ], %o5 while ( the_block != end ) { 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) ) 2047610: 80 8b 60 01 btst 1, %o5 2047614: 12 80 00 03 bne 2047620 <_Heap_Get_information+0x54> 2047618: 86 10 00 09 mov %o1, %g3 204761c: 86 10 00 19 mov %i1, %g3 info = &the_info->Used; else info = &the_info->Free; info->number++; 2047620: d4 00 c0 00 ld [ %g3 ], %o2 info->total += the_size; 2047624: d6 00 e0 08 ld [ %g3 + 8 ], %o3 if ( info->largest < the_size ) 2047628: d8 00 e0 04 ld [ %g3 + 4 ], %o4 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 204762c: 94 02 a0 01 inc %o2 info->total += the_size; 2047630: 96 02 c0 04 add %o3, %g4, %o3 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 2047634: d4 20 c0 00 st %o2, [ %g3 ] info->total += the_size; if ( info->largest < the_size ) 2047638: 80 a3 00 04 cmp %o4, %g4 204763c: 1a 80 00 03 bcc 2047648 <_Heap_Get_information+0x7c> 2047640: d6 20 e0 08 st %o3, [ %g3 + 8 ] info->largest = the_size; 2047644: c8 20 e0 04 st %g4, [ %g3 + 4 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 2047648: 80 a0 80 01 cmp %g2, %g1 204764c: 12 bf ff ef bne 2047608 <_Heap_Get_information+0x3c> 2047650: 88 0b 7f fe and %o5, -2, %g4 2047654: c6 06 60 14 ld [ %i1 + 0x14 ], %g3 2047658: 86 00 e0 08 add %g3, 8, %g3 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 204765c: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } 2047660: 81 c7 e0 08 ret 2047664: 81 e8 00 00 restore =============================================================================== 0201cc24 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 201cc24: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 201cc28: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 201cc2c: 7f ff f9 73 call 201b1f8 <.urem> 201cc30: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 201cc34: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 201cc38: 84 06 7f f8 add %i1, -8, %g2 201cc3c: 84 20 80 08 sub %g2, %o0, %g2 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 201cc40: 80 a0 80 01 cmp %g2, %g1 201cc44: 0a 80 00 16 bcs 201cc9c <_Heap_Size_of_alloc_area+0x78> 201cc48: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 201cc4c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 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 201cc50: 80 a0 80 03 cmp %g2, %g3 201cc54: 18 80 00 12 bgu 201cc9c <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201cc58: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 201cc5c: c8 00 a0 04 ld [ %g2 + 4 ], %g4 201cc60: 88 09 3f fe and %g4, -2, %g4 201cc64: 84 00 80 04 add %g2, %g4, %g2 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 201cc68: 80 a0 40 02 cmp %g1, %g2 201cc6c: 18 80 00 0c bgu 201cc9c <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201cc70: 80 a0 c0 02 cmp %g3, %g2 201cc74: 0a 80 00 0a bcs 201cc9c <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201cc78: 01 00 00 00 nop } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 201cc7c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 201cc80: 80 88 60 01 btst 1, %g1 201cc84: 02 80 00 06 be 201cc9c <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201cc88: 84 20 80 19 sub %g2, %i1, %g2 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 201cc8c: 84 00 a0 04 add %g2, 4, %g2 201cc90: c4 26 80 00 st %g2, [ %i2 ] return true; 201cc94: 81 c7 e0 08 ret 201cc98: 91 e8 20 01 restore %g0, 1, %o0 } 201cc9c: 81 c7 e0 08 ret 201cca0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02008afc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2008afc: 9d e3 bf 80 save %sp, -128, %sp uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2008b00: 25 00 80 24 sethi %hi(0x2009000), %l2 2008b04: 80 8e a0 ff btst 0xff, %i2 2008b08: a4 14 a1 2c or %l2, 0x12c, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2008b0c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 2008b10: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2008b14: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2008b18: 12 80 00 04 bne 2008b28 <_Heap_Walk+0x2c> 2008b1c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2008b20: 25 00 80 22 sethi %hi(0x2008800), %l2 2008b24: a4 14 a2 f4 or %l2, 0x2f4, %l2 ! 2008af4 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2008b28: 03 00 80 87 sethi %hi(0x2021c00), %g1 2008b2c: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 2021ee0 <_System_state_Current> 2008b30: 80 a0 60 03 cmp %g1, 3 2008b34: 22 80 00 04 be,a 2008b44 <_Heap_Walk+0x48> 2008b38: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 2008b3c: 81 c7 e0 08 ret 2008b40: 91 e8 20 01 restore %g0, 1, %o0 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)( 2008b44: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2008b48: c4 06 20 08 ld [ %i0 + 8 ], %g2 2008b4c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008b50: 90 10 00 19 mov %i1, %o0 2008b54: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2008b58: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2008b5c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2008b60: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2008b64: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2008b68: 92 10 20 00 clr %o1 2008b6c: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008b70: 96 10 00 15 mov %l5, %o3 2008b74: 94 12 a0 30 or %o2, 0x30, %o2 2008b78: 9f c4 80 00 call %l2 2008b7c: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2008b80: 80 a5 60 00 cmp %l5, 0 2008b84: 02 80 00 36 be 2008c5c <_Heap_Walk+0x160> 2008b88: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2008b8c: 12 80 00 3c bne 2008c7c <_Heap_Walk+0x180> 2008b90: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2008b94: 7f ff e3 cc call 2001ac4 <.urem> 2008b98: 92 10 00 15 mov %l5, %o1 2008b9c: 80 a2 20 00 cmp %o0, 0 2008ba0: 12 80 00 40 bne 2008ca0 <_Heap_Walk+0x1a4> 2008ba4: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 2008ba8: 7f ff e3 c7 call 2001ac4 <.urem> 2008bac: 92 10 00 15 mov %l5, %o1 2008bb0: 80 a2 20 00 cmp %o0, 0 2008bb4: 32 80 00 44 bne,a 2008cc4 <_Heap_Walk+0x1c8> 2008bb8: 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; 2008bbc: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2008bc0: ba 8d a0 01 andcc %l6, 1, %i5 2008bc4: 22 80 00 48 be,a 2008ce4 <_Heap_Walk+0x1e8> 2008bc8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 2008bcc: d6 04 00 00 ld [ %l0 ], %o3 2008bd0: 80 a5 40 0b cmp %l5, %o3 2008bd4: 32 80 00 1a bne,a 2008c3c <_Heap_Walk+0x140> 2008bd8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2008bdc: c2 05 20 04 ld [ %l4 + 4 ], %g1 2008be0: 82 08 7f fe and %g1, -2, %g1 2008be4: 82 05 00 01 add %l4, %g1, %g1 2008be8: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008bec: 80 88 60 01 btst 1, %g1 2008bf0: 22 80 01 2e be,a 20090a8 <_Heap_Walk+0x5ac> 2008bf4: 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; 2008bf8: ee 06 20 08 ld [ %i0 + 8 ], %l7 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 ) { 2008bfc: 80 a6 00 17 cmp %i0, %l7 2008c00: 02 80 00 79 be 2008de4 <_Heap_Walk+0x2e8> 2008c04: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 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; 2008c08: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 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 2008c0c: 80 a6 c0 17 cmp %i3, %l7 2008c10: 28 80 00 3c bleu,a 2008d00 <_Heap_Walk+0x204> <== ALWAYS TAKEN 2008c14: f4 06 20 24 ld [ %i0 + 0x24 ], %i2 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 2008c18: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2008c1c: 96 10 00 17 mov %l7, %o3 2008c20: 92 10 20 01 mov 1, %o1 2008c24: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008c28: b0 10 20 00 clr %i0 2008c2c: 9f c4 80 00 call %l2 2008c30: 94 12 a1 d8 or %o2, 0x1d8, %o2 2008c34: 81 c7 e0 08 ret 2008c38: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 2008c3c: 98 10 00 15 mov %l5, %o4 2008c40: 92 10 20 01 mov 1, %o1 2008c44: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008c48: b0 10 20 00 clr %i0 2008c4c: 9f c4 80 00 call %l2 2008c50: 94 12 a1 90 or %o2, 0x190, %o2 2008c54: 81 c7 e0 08 ret 2008c58: 81 e8 00 00 restore first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 2008c5c: 90 10 00 19 mov %i1, %o0 2008c60: 92 10 20 01 mov 1, %o1 2008c64: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008c68: b0 10 20 00 clr %i0 2008c6c: 9f c4 80 00 call %l2 2008c70: 94 12 a0 c8 or %o2, 0xc8, %o2 2008c74: 81 c7 e0 08 ret 2008c78: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2008c7c: 90 10 00 19 mov %i1, %o0 2008c80: 96 10 00 15 mov %l5, %o3 2008c84: 92 10 20 01 mov 1, %o1 2008c88: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008c8c: b0 10 20 00 clr %i0 2008c90: 9f c4 80 00 call %l2 2008c94: 94 12 a0 e0 or %o2, 0xe0, %o2 2008c98: 81 c7 e0 08 ret 2008c9c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 2008ca0: 90 10 00 19 mov %i1, %o0 2008ca4: 96 10 00 13 mov %l3, %o3 2008ca8: 92 10 20 01 mov 1, %o1 2008cac: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008cb0: b0 10 20 00 clr %i0 2008cb4: 9f c4 80 00 call %l2 2008cb8: 94 12 a1 00 or %o2, 0x100, %o2 2008cbc: 81 c7 e0 08 ret 2008cc0: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2008cc4: 96 10 00 10 mov %l0, %o3 2008cc8: 92 10 20 01 mov 1, %o1 2008ccc: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008cd0: b0 10 20 00 clr %i0 2008cd4: 9f c4 80 00 call %l2 2008cd8: 94 12 a1 28 or %o2, 0x128, %o2 2008cdc: 81 c7 e0 08 ret 2008ce0: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2008ce4: 92 10 20 01 mov 1, %o1 2008ce8: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008cec: b0 10 20 00 clr %i0 2008cf0: 9f c4 80 00 call %l2 2008cf4: 94 12 a1 60 or %o2, 0x160, %o2 2008cf8: 81 c7 e0 08 ret 2008cfc: 81 e8 00 00 restore 2008d00: 80 a5 c0 1a cmp %l7, %i2 2008d04: 18 bf ff c6 bgu 2008c1c <_Heap_Walk+0x120> <== NEVER TAKEN 2008d08: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 2008d0c: 90 05 e0 08 add %l7, 8, %o0 2008d10: 7f ff e3 6d call 2001ac4 <.urem> 2008d14: 92 10 00 1c mov %i4, %o1 2008d18: 80 a2 20 00 cmp %o0, 0 2008d1c: 12 80 00 ea bne 20090c4 <_Heap_Walk+0x5c8> <== NEVER TAKEN 2008d20: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008d24: c2 05 e0 04 ld [ %l7 + 4 ], %g1 2008d28: 82 08 7f fe and %g1, -2, %g1 2008d2c: 82 05 c0 01 add %l7, %g1, %g1 2008d30: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008d34: 80 88 60 01 btst 1, %g1 2008d38: 12 80 00 f5 bne 200910c <_Heap_Walk+0x610> <== NEVER TAKEN 2008d3c: 01 00 00 00 nop ); return false; } if ( free_block->prev != prev_block ) { 2008d40: e2 05 e0 0c ld [ %l7 + 0xc ], %l1 2008d44: 80 a4 40 18 cmp %l1, %i0 2008d48: 12 80 00 e9 bne 20090ec <_Heap_Walk+0x5f0> <== NEVER TAKEN 2008d4c: 96 10 00 17 mov %l7, %o3 2008d50: fa 27 bf fc st %i5, [ %fp + -4 ] 2008d54: ba 10 00 15 mov %l5, %i5 2008d58: aa 10 00 13 mov %l3, %l5 2008d5c: a6 10 00 10 mov %l0, %l3 2008d60: 10 80 00 18 b 2008dc0 <_Heap_Walk+0x2c4> 2008d64: a0 10 00 1c mov %i4, %l0 2008d68: 18 bf ff ad bgu 2008c1c <_Heap_Walk+0x120> 2008d6c: 90 10 00 19 mov %i1, %o0 2008d70: 80 a5 c0 1a cmp %l7, %i2 2008d74: 18 bf ff ab bgu 2008c20 <_Heap_Walk+0x124> <== NEVER TAKEN 2008d78: 96 10 00 17 mov %l7, %o3 ); return false; } if ( 2008d7c: 90 05 e0 08 add %l7, 8, %o0 2008d80: 7f ff e3 51 call 2001ac4 <.urem> 2008d84: 92 10 00 10 mov %l0, %o1 2008d88: 80 a2 20 00 cmp %o0, 0 2008d8c: 32 80 00 ce bne,a 20090c4 <_Heap_Walk+0x5c8> 2008d90: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008d94: c2 05 e0 04 ld [ %l7 + 4 ], %g1 2008d98: 82 08 7f fe and %g1, -2, %g1 2008d9c: 82 00 40 17 add %g1, %l7, %g1 2008da0: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008da4: 80 88 60 01 btst 1, %g1 2008da8: 32 80 00 d9 bne,a 200910c <_Heap_Walk+0x610> 2008dac: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 2008db0: c2 05 e0 0c ld [ %l7 + 0xc ], %g1 2008db4: 80 a7 00 01 cmp %i4, %g1 2008db8: 32 80 00 cb bne,a 20090e4 <_Heap_Walk+0x5e8> 2008dbc: a2 10 00 01 mov %g1, %l1 (*printer)( 2008dc0: b8 10 00 17 mov %l7, %i4 return false; } prev_block = free_block; free_block = free_block->next; 2008dc4: ee 05 e0 08 ld [ %l7 + 8 ], %l7 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 ) { 2008dc8: 80 a4 40 17 cmp %l1, %l7 2008dcc: 12 bf ff e7 bne 2008d68 <_Heap_Walk+0x26c> 2008dd0: 80 a6 c0 17 cmp %i3, %l7 2008dd4: a0 10 00 13 mov %l3, %l0 2008dd8: a6 10 00 15 mov %l5, %l3 2008ddc: aa 10 00 1d mov %i5, %l5 2008de0: fa 07 bf fc ld [ %fp + -4 ], %i5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2008de4: 80 a5 00 10 cmp %l4, %l0 2008de8: 02 bf ff 55 be 2008b3c <_Heap_Walk+0x40> <== NEVER TAKEN 2008dec: 37 00 80 7b sethi %hi(0x201ec00), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008df0: 35 00 80 7b sethi %hi(0x201ec00), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008df4: 39 00 80 7b sethi %hi(0x201ec00), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008df8: 82 10 00 1d mov %i5, %g1 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; if ( prev_used ) { (*printer)( 2008dfc: b6 16 e2 80 or %i3, 0x280, %i3 2008e00: ba 10 00 15 mov %l5, %i5 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008e04: b4 16 a2 98 or %i2, 0x298, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008e08: b8 17 23 98 or %i4, 0x398, %i4 2008e0c: aa 10 00 14 mov %l4, %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; 2008e10: ac 0d bf fe and %l6, -2, %l6 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; if ( prev_used ) { 2008e14: 80 a0 60 00 cmp %g1, 0 2008e18: 02 80 00 16 be 2008e70 <_Heap_Walk+0x374> 2008e1c: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 2008e20: 90 10 00 19 mov %i1, %o0 2008e24: 92 10 20 00 clr %o1 2008e28: 94 10 00 1b mov %i3, %o2 2008e2c: 96 10 00 10 mov %l0, %o3 2008e30: 9f c4 80 00 call %l2 2008e34: 98 10 00 16 mov %l6, %o4 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 2008e38: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2008e3c: 80 a0 40 11 cmp %g1, %l1 2008e40: 28 80 00 18 bleu,a 2008ea0 <_Heap_Walk+0x3a4> <== ALWAYS TAKEN 2008e44: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 2008e48: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2008e4c: 96 10 00 10 mov %l0, %o3 2008e50: 98 10 00 11 mov %l1, %o4 2008e54: 92 10 20 01 mov 1, %o1 2008e58: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008e5c: b0 10 20 00 clr %i0 2008e60: 9f c4 80 00 call %l2 2008e64: 94 12 a2 c0 or %o2, 0x2c0, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 2008e68: 81 c7 e0 08 ret 2008e6c: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008e70: da 04 00 00 ld [ %l0 ], %o5 2008e74: 90 10 00 19 mov %i1, %o0 2008e78: 92 10 20 00 clr %o1 2008e7c: 94 10 00 1a mov %i2, %o2 2008e80: 96 10 00 10 mov %l0, %o3 2008e84: 9f c4 80 00 call %l2 2008e88: 98 10 00 16 mov %l6, %o4 2008e8c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2008e90: 80 a0 40 11 cmp %g1, %l1 2008e94: 18 bf ff ee bgu 2008e4c <_Heap_Walk+0x350> <== NEVER TAKEN 2008e98: 90 10 00 19 mov %i1, %o0 2008e9c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008ea0: 80 a0 40 11 cmp %g1, %l1 2008ea4: 0a bf ff ea bcs 2008e4c <_Heap_Walk+0x350> 2008ea8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 2008eac: 90 10 00 16 mov %l6, %o0 2008eb0: 7f ff e3 05 call 2001ac4 <.urem> 2008eb4: 92 10 00 1d mov %i5, %o1 2008eb8: 80 a2 20 00 cmp %o0, 0 2008ebc: 12 80 00 5d bne 2009030 <_Heap_Walk+0x534> 2008ec0: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 2008ec4: 18 80 00 65 bgu 2009058 <_Heap_Walk+0x55c> 2008ec8: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 2008ecc: 3a 80 00 6e bcc,a 2009084 <_Heap_Walk+0x588> 2008ed0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2008ed4: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008ed8: 80 88 60 01 btst 1, %g1 2008edc: 12 80 00 40 bne 2008fdc <_Heap_Walk+0x4e0> 2008ee0: 80 a5 40 11 cmp %l5, %l1 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; 2008ee4: e8 04 20 04 ld [ %l0 + 4 ], %l4 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)( 2008ee8: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008eec: c2 06 20 08 ld [ %i0 + 8 ], %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; 2008ef0: ac 0d 3f fe and %l4, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008ef4: 1b 00 80 7b sethi %hi(0x201ec00), %o5 2008ef8: 80 a0 40 0c cmp %g1, %o4 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 2008efc: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2008f00: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008f04: 02 80 00 07 be 2008f20 <_Heap_Walk+0x424> 2008f08: 9a 13 63 88 or %o5, 0x388, %o5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 2008f0c: 1b 00 80 7b sethi %hi(0x201ec00), %o5 2008f10: 80 a3 00 18 cmp %o4, %i0 2008f14: 02 80 00 03 be 2008f20 <_Heap_Walk+0x424> 2008f18: 9a 13 63 a0 or %o5, 0x3a0, %o5 2008f1c: 9a 10 00 1c mov %i4, %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)( 2008f20: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008f24: 05 00 80 7b sethi %hi(0x201ec00), %g2 2008f28: 80 a0 c0 01 cmp %g3, %g1 2008f2c: 02 80 00 07 be 2008f48 <_Heap_Walk+0x44c> 2008f30: 84 10 a3 b0 or %g2, 0x3b0, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008f34: 05 00 80 7b sethi %hi(0x201ec00), %g2 2008f38: 80 a0 40 18 cmp %g1, %i0 2008f3c: 02 80 00 03 be 2008f48 <_Heap_Walk+0x44c> 2008f40: 84 10 a3 c0 or %g2, 0x3c0, %g2 2008f44: 84 10 00 1c mov %i4, %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)( 2008f48: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2008f4c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008f50: 90 10 00 19 mov %i1, %o0 2008f54: 92 10 20 00 clr %o1 2008f58: 15 00 80 7b sethi %hi(0x201ec00), %o2 2008f5c: 96 10 00 10 mov %l0, %o3 2008f60: 9f c4 80 00 call %l2 2008f64: 94 12 a3 d0 or %o2, 0x3d0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2008f68: da 05 c0 00 ld [ %l7 ], %o5 2008f6c: 80 a5 80 0d cmp %l6, %o5 2008f70: 02 80 00 0c be 2008fa0 <_Heap_Walk+0x4a4> 2008f74: 90 10 00 19 mov %i1, %o0 (*printer)( 2008f78: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 2008f7c: 96 10 00 10 mov %l0, %o3 2008f80: 98 10 00 16 mov %l6, %o4 2008f84: 92 10 20 01 mov 1, %o1 2008f88: 15 00 80 7c sethi %hi(0x201f000), %o2 2008f8c: b0 10 20 00 clr %i0 2008f90: 9f c4 80 00 call %l2 2008f94: 94 12 a0 00 mov %o2, %o2 2008f98: 81 c7 e0 08 ret 2008f9c: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 2008fa0: 80 8d 20 01 btst 1, %l4 2008fa4: 02 80 00 1c be 2009014 <_Heap_Walk+0x518> 2008fa8: 96 10 00 10 mov %l0, %o3 2008fac: 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 ) { 2008fb0: 80 a0 40 18 cmp %g1, %i0 2008fb4: 12 80 00 07 bne 2008fd0 <_Heap_Walk+0x4d4> <== ALWAYS TAKEN 2008fb8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008fbc: 10 80 00 0f b 2008ff8 <_Heap_Walk+0x4fc> <== NOT EXECUTED 2008fc0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED ) { 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 ) { 2008fc4: 80 a0 40 18 cmp %g1, %i0 2008fc8: 02 80 00 0a be 2008ff0 <_Heap_Walk+0x4f4> 2008fcc: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 2008fd0: 32 bf ff fd bne,a 2008fc4 <_Heap_Walk+0x4c8> 2008fd4: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2008fd8: 80 a5 40 11 cmp %l5, %l1 2008fdc: 02 bf fe d8 be 2008b3c <_Heap_Walk+0x40> 2008fe0: a0 10 00 11 mov %l1, %l0 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 ) { 2008fe4: ec 04 60 04 ld [ %l1 + 4 ], %l6 2008fe8: 10 bf ff 8a b 2008e10 <_Heap_Walk+0x314> 2008fec: 82 0d a0 01 and %l6, 1, %g1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008ff0: 90 10 00 19 mov %i1, %o0 2008ff4: 96 10 00 10 mov %l0, %o3 2008ff8: 92 10 20 01 mov 1, %o1 2008ffc: 15 00 80 7c sethi %hi(0x201f000), %o2 2009000: b0 10 20 00 clr %i0 2009004: 9f c4 80 00 call %l2 2009008: 94 12 a0 70 or %o2, 0x70, %o2 200900c: 81 c7 e0 08 ret 2009010: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 2009014: 92 10 20 01 mov 1, %o1 2009018: 15 00 80 7c sethi %hi(0x201f000), %o2 200901c: b0 10 20 00 clr %i0 2009020: 9f c4 80 00 call %l2 2009024: 94 12 a0 40 or %o2, 0x40, %o2 2009028: 81 c7 e0 08 ret 200902c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 2009030: 90 10 00 19 mov %i1, %o0 2009034: 96 10 00 10 mov %l0, %o3 2009038: 98 10 00 16 mov %l6, %o4 200903c: 92 10 20 01 mov 1, %o1 2009040: 15 00 80 7b sethi %hi(0x201ec00), %o2 2009044: b0 10 20 00 clr %i0 2009048: 9f c4 80 00 call %l2 200904c: 94 12 a2 f0 or %o2, 0x2f0, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 2009050: 81 c7 e0 08 ret 2009054: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 2009058: 90 10 00 19 mov %i1, %o0 200905c: 96 10 00 10 mov %l0, %o3 2009060: 98 10 00 16 mov %l6, %o4 2009064: 9a 10 00 13 mov %l3, %o5 2009068: 92 10 20 01 mov 1, %o1 200906c: 15 00 80 7b sethi %hi(0x201ec00), %o2 2009070: b0 10 20 00 clr %i0 2009074: 9f c4 80 00 call %l2 2009078: 94 12 a3 20 or %o2, 0x320, %o2 block, block_size, min_block_size ); return false; 200907c: 81 c7 e0 08 ret 2009080: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 2009084: 96 10 00 10 mov %l0, %o3 2009088: 98 10 00 11 mov %l1, %o4 200908c: 92 10 20 01 mov 1, %o1 2009090: 15 00 80 7b sethi %hi(0x201ec00), %o2 2009094: b0 10 20 00 clr %i0 2009098: 9f c4 80 00 call %l2 200909c: 94 12 a3 50 or %o2, 0x350, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 20090a0: 81 c7 e0 08 ret 20090a4: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 20090a8: 92 10 20 01 mov 1, %o1 20090ac: 15 00 80 7b sethi %hi(0x201ec00), %o2 20090b0: b0 10 20 00 clr %i0 20090b4: 9f c4 80 00 call %l2 20090b8: 94 12 a1 c0 or %o2, 0x1c0, %o2 20090bc: 81 c7 e0 08 ret 20090c0: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20090c4: 96 10 00 17 mov %l7, %o3 20090c8: 92 10 20 01 mov 1, %o1 20090cc: 15 00 80 7b sethi %hi(0x201ec00), %o2 20090d0: b0 10 20 00 clr %i0 20090d4: 9f c4 80 00 call %l2 20090d8: 94 12 a1 f8 or %o2, 0x1f8, %o2 20090dc: 81 c7 e0 08 ret 20090e0: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 20090e4: 90 10 00 19 mov %i1, %o0 20090e8: 96 10 00 17 mov %l7, %o3 20090ec: 98 10 00 11 mov %l1, %o4 20090f0: 92 10 20 01 mov 1, %o1 20090f4: 15 00 80 7b sethi %hi(0x201ec00), %o2 20090f8: b0 10 20 00 clr %i0 20090fc: 9f c4 80 00 call %l2 2009100: 94 12 a2 48 or %o2, 0x248, %o2 2009104: 81 c7 e0 08 ret 2009108: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 200910c: 96 10 00 17 mov %l7, %o3 2009110: 92 10 20 01 mov 1, %o1 2009114: 15 00 80 7b sethi %hi(0x201ec00), %o2 2009118: b0 10 20 00 clr %i0 200911c: 9f c4 80 00 call %l2 2009120: 94 12 a2 28 or %o2, 0x228, %o2 2009124: 81 c7 e0 08 ret 2009128: 81 e8 00 00 restore =============================================================================== 02006f7c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 2006f7c: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2006f80: 23 00 80 7f sethi %hi(0x201fc00), %l1 2006f84: c2 04 61 0c ld [ %l1 + 0x10c ], %g1 ! 201fd0c <_IO_Number_of_drivers> 2006f88: 80 a0 60 00 cmp %g1, 0 2006f8c: 02 80 00 0c be 2006fbc <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 2006f90: a2 14 61 0c or %l1, 0x10c, %l1 2006f94: a0 10 20 00 clr %l0 (void) rtems_io_initialize( major, 0, NULL ); 2006f98: 90 10 00 10 mov %l0, %o0 2006f9c: 92 10 20 00 clr %o1 2006fa0: 40 00 1c 1e call 200e018 2006fa4: 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 ++ ) 2006fa8: c2 04 40 00 ld [ %l1 ], %g1 2006fac: a0 04 20 01 inc %l0 2006fb0: 80 a0 40 10 cmp %g1, %l0 2006fb4: 18 bf ff fa bgu 2006f9c <_IO_Initialize_all_drivers+0x20> 2006fb8: 90 10 00 10 mov %l0, %o0 2006fbc: 81 c7 e0 08 ret 2006fc0: 81 e8 00 00 restore =============================================================================== 02006fc4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 2006fc4: 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; 2006fc8: 03 00 80 7a sethi %hi(0x201e800), %g1 2006fcc: 82 10 60 68 or %g1, 0x68, %g1 ! 201e868 drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; 2006fd0: e6 00 60 2c ld [ %g1 + 0x2c ], %l3 rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; 2006fd4: e2 00 60 30 ld [ %g1 + 0x30 ], %l1 /* * 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 ) 2006fd8: 80 a4 40 13 cmp %l1, %l3 2006fdc: 0a 80 00 08 bcs 2006ffc <_IO_Manager_initialization+0x38> 2006fe0: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 * 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; 2006fe4: 03 00 80 7f sethi %hi(0x201fc00), %g1 2006fe8: e0 20 61 10 st %l0, [ %g1 + 0x110 ] ! 201fd10 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 2006fec: 03 00 80 7f sethi %hi(0x201fc00), %g1 2006ff0: e2 20 61 0c st %l1, [ %g1 + 0x10c ] ! 201fd0c <_IO_Number_of_drivers> return; 2006ff4: 81 c7 e0 08 ret 2006ff8: 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 ) 2006ffc: 83 2c e0 03 sll %l3, 3, %g1 2007000: a5 2c e0 05 sll %l3, 5, %l2 2007004: a4 24 80 01 sub %l2, %g1, %l2 /* * 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 *) 2007008: 40 00 0c dd call 200a37c <_Workspace_Allocate_or_fatal_error> 200700c: 90 10 00 12 mov %l2, %o0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2007010: 03 00 80 7f sethi %hi(0x201fc00), %g1 memset( 2007014: 94 10 00 12 mov %l2, %o2 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2007018: e6 20 61 0c st %l3, [ %g1 + 0x10c ] /* * 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 *) 200701c: 25 00 80 7f sethi %hi(0x201fc00), %l2 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 2007020: 92 10 20 00 clr %o1 2007024: 40 00 2c f1 call 20123e8 2007028: d0 24 a1 10 st %o0, [ %l2 + 0x110 ] _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 200702c: 80 a4 60 00 cmp %l1, 0 2007030: 02 bf ff f1 be 2006ff4 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 2007034: da 04 a1 10 ld [ %l2 + 0x110 ], %o5 2007038: 82 10 20 00 clr %g1 200703c: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 2007040: c4 04 00 01 ld [ %l0 + %g1 ], %g2 2007044: 86 04 00 01 add %l0, %g1, %g3 2007048: c4 23 40 01 st %g2, [ %o5 + %g1 ] 200704c: d8 00 e0 04 ld [ %g3 + 4 ], %o4 2007050: 84 03 40 01 add %o5, %g1, %g2 2007054: d8 20 a0 04 st %o4, [ %g2 + 4 ] 2007058: d8 00 e0 08 ld [ %g3 + 8 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 200705c: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 2007060: d8 20 a0 08 st %o4, [ %g2 + 8 ] 2007064: d8 00 e0 0c ld [ %g3 + 0xc ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2007068: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 200706c: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 2007070: d8 00 e0 10 ld [ %g3 + 0x10 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2007074: 80 a4 40 04 cmp %l1, %g4 _IO_Driver_address_table[index] = driver_table[index]; 2007078: d8 20 a0 10 st %o4, [ %g2 + 0x10 ] 200707c: 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++ ) 2007080: 18 bf ff f0 bgu 2007040 <_IO_Manager_initialization+0x7c> 2007084: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 2007088: 81 c7 e0 08 ret 200708c: 81 e8 00 00 restore =============================================================================== 020012c0 <_Message_queue_Manager_initialization>: #include #include void _Message_queue_Manager_initialization(void) { } 20012c0: 81 c3 e0 08 retl =============================================================================== 02007d9c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2007d9c: 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 ) 2007da0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2007da4: a0 10 00 18 mov %i0, %l0 * 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 ) 2007da8: 80 a0 60 00 cmp %g1, 0 2007dac: 02 80 00 19 be 2007e10 <_Objects_Allocate+0x74> <== NEVER TAKEN 2007db0: 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 ); 2007db4: a2 04 20 20 add %l0, 0x20, %l1 2007db8: 7f ff fd 6d call 200736c <_Chain_Get> 2007dbc: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2007dc0: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2007dc4: 80 a0 60 00 cmp %g1, 0 2007dc8: 02 80 00 12 be 2007e10 <_Objects_Allocate+0x74> 2007dcc: 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 ) { 2007dd0: 80 a2 20 00 cmp %o0, 0 2007dd4: 02 80 00 11 be 2007e18 <_Objects_Allocate+0x7c> 2007dd8: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007ddc: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 2007de0: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007de4: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 2007de8: 40 00 4c 58 call 201af48 <.udiv> 2007dec: 90 22 00 01 sub %o0, %g1, %o0 2007df0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2007df4: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2007df8: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007dfc: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 2007e00: 86 00 ff ff add %g3, -1, %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007e04: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2007e08: c6 34 20 2c sth %g3, [ %l0 + 0x2c ] block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007e0c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 2007e10: 81 c7 e0 08 ret 2007e14: 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 ); 2007e18: 40 00 00 11 call 2007e5c <_Objects_Extend_information> 2007e1c: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2007e20: 7f ff fd 53 call 200736c <_Chain_Get> 2007e24: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2007e28: b0 92 20 00 orcc %o0, 0, %i0 2007e2c: 32 bf ff ed bne,a 2007de0 <_Objects_Allocate+0x44> 2007e30: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 information->inactive--; } } return the_object; } 2007e34: 81 c7 e0 08 ret 2007e38: 81 e8 00 00 restore =============================================================================== 02007e5c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2007e5c: 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 ) 2007e60: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 2007e64: 80 a5 20 00 cmp %l4, 0 2007e68: 02 80 00 ab be 2008114 <_Objects_Extend_information+0x2b8> 2007e6c: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2007e70: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2007e74: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 2007e78: ab 2d 60 10 sll %l5, 0x10, %l5 2007e7c: 92 10 00 12 mov %l2, %o1 2007e80: 40 00 4c 32 call 201af48 <.udiv> 2007e84: 91 35 60 10 srl %l5, 0x10, %o0 2007e88: 91 2a 20 10 sll %o0, 0x10, %o0 2007e8c: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 2007e90: 80 a7 20 00 cmp %i4, 0 2007e94: 02 80 00 a7 be 2008130 <_Objects_Extend_information+0x2d4><== NEVER TAKEN 2007e98: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 2007e9c: c2 05 00 00 ld [ %l4 ], %g1 2007ea0: 80 a0 60 00 cmp %g1, 0 2007ea4: 02 80 00 a4 be 2008134 <_Objects_Extend_information+0x2d8><== NEVER TAKEN 2007ea8: a2 10 00 13 mov %l3, %l1 2007eac: 10 80 00 06 b 2007ec4 <_Objects_Extend_information+0x68> 2007eb0: a0 10 20 00 clr %l0 2007eb4: c2 05 00 01 ld [ %l4 + %g1 ], %g1 2007eb8: 80 a0 60 00 cmp %g1, 0 2007ebc: 22 80 00 08 be,a 2007edc <_Objects_Extend_information+0x80> 2007ec0: ab 35 60 10 srl %l5, 0x10, %l5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2007ec4: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2007ec8: a2 04 40 12 add %l1, %l2, %l1 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2007ecc: 80 a7 00 10 cmp %i4, %l0 2007ed0: 18 bf ff f9 bgu 2007eb4 <_Objects_Extend_information+0x58> 2007ed4: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007ed8: ab 35 60 10 srl %l5, 0x10, %l5 /* * 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 ) { 2007edc: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007ee0: aa 05 40 08 add %l5, %o0, %l5 /* * 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 ) { 2007ee4: 82 10 63 ff or %g1, 0x3ff, %g1 2007ee8: 80 a5 40 01 cmp %l5, %g1 2007eec: 18 80 00 96 bgu 2008144 <_Objects_Extend_information+0x2e8><== NEVER TAKEN 2007ef0: 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; 2007ef4: 40 00 4b db call 201ae60 <.umul> 2007ef8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2007efc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2007f00: 80 a0 60 00 cmp %g1, 0 2007f04: 12 80 00 6d bne 20080b8 <_Objects_Extend_information+0x25c> 2007f08: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 2007f0c: 40 00 09 1c call 200a37c <_Workspace_Allocate_or_fatal_error> 2007f10: 01 00 00 00 nop 2007f14: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2007f18: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007f1c: 80 a4 40 01 cmp %l1, %g1 2007f20: 2a 80 00 43 bcs,a 200802c <_Objects_Extend_information+0x1d0> 2007f24: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 2007f28: a8 07 20 01 add %i4, 1, %l4 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2007f2c: 91 2d 20 01 sll %l4, 1, %o0 2007f30: 90 02 00 14 add %o0, %l4, %o0 2007f34: 90 05 40 08 add %l5, %o0, %o0 2007f38: 90 02 00 13 add %o0, %l3, %o0 2007f3c: 40 00 09 1f call 200a3b8 <_Workspace_Allocate> 2007f40: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2007f44: ac 92 20 00 orcc %o0, 0, %l6 2007f48: 02 80 00 7d be 200813c <_Objects_Extend_information+0x2e0> 2007f4c: a9 2d 20 02 sll %l4, 2, %l4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2007f50: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007f54: 80 a4 c0 01 cmp %l3, %g1 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 2007f58: ae 05 80 14 add %l6, %l4, %l7 2007f5c: 0a 80 00 5e bcs 20080d4 <_Objects_Extend_information+0x278> 2007f60: a8 05 c0 14 add %l7, %l4, %l4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2007f64: 80 a4 e0 00 cmp %l3, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2007f68: 82 10 20 00 clr %g1 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2007f6c: 02 80 00 08 be 2007f8c <_Objects_Extend_information+0x130><== NEVER TAKEN 2007f70: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 2007f74: 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++ ) { 2007f78: 82 00 60 01 inc %g1 2007f7c: 80 a4 c0 01 cmp %l3, %g1 2007f80: 18 bf ff fd bgu 2007f74 <_Objects_Extend_information+0x118><== NEVER TAKEN 2007f84: c0 20 80 14 clr [ %g2 + %l4 ] 2007f88: bb 2f 20 02 sll %i4, 2, %i5 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007f8c: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2007f90: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007f94: 86 04 40 03 add %l1, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2007f98: 80 a4 40 03 cmp %l1, %g3 2007f9c: 1a 80 00 0a bcc 2007fc4 <_Objects_Extend_information+0x168><== NEVER TAKEN 2007fa0: c0 25 80 1d clr [ %l6 + %i5 ] 2007fa4: 85 2c 60 02 sll %l1, 2, %g2 2007fa8: 82 10 00 11 mov %l1, %g1 2007fac: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 2007fb0: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 2007fb4: 82 00 60 01 inc %g1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2007fb8: 80 a0 c0 01 cmp %g3, %g1 2007fbc: 18 bf ff fd bgu 2007fb0 <_Objects_Extend_information+0x154> 2007fc0: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2007fc4: 7f ff e8 38 call 20020a4 2007fc8: 01 00 00 00 nop 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( 2007fcc: c6 06 00 00 ld [ %i0 ], %g3 2007fd0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 2007fd4: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2007fd8: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 2007fdc: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 2007fe0: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007fe4: 87 28 e0 18 sll %g3, 0x18, %g3 2007fe8: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2007fec: ec 26 20 34 st %l6, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007ff0: ab 2d 60 10 sll %l5, 0x10, %l5 2007ff4: 03 00 00 40 sethi %hi(0x10000), %g1 2007ff8: ab 35 60 10 srl %l5, 0x10, %l5 2007ffc: 82 10 c0 01 or %g3, %g1, %g1 2008000: 82 10 40 02 or %g1, %g2, %g1 2008004: 82 10 40 15 or %g1, %l5, %g1 2008008: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 200800c: 7f ff e8 2a call 20020b4 2008010: 01 00 00 00 nop if ( old_tables ) 2008014: 80 a4 e0 00 cmp %l3, 0 2008018: 22 80 00 05 be,a 200802c <_Objects_Extend_information+0x1d0> 200801c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2008020: 40 00 08 ef call 200a3dc <_Workspace_Free> 2008024: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2008028: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 200802c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2008030: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2008034: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2008038: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 200803c: a6 06 20 20 add %i0, 0x20, %l3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2008040: e4 20 40 10 st %l2, [ %g1 + %l0 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 2008044: 29 00 00 40 sethi %hi(0x10000), %l4 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2008048: a4 07 bf f4 add %fp, -12, %l2 200804c: 40 00 18 0a call 200e074 <_Chain_Initialize> 2008050: 90 10 00 12 mov %l2, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 2008054: 30 80 00 0c b,a 2008084 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 2008058: c4 16 20 04 lduh [ %i0 + 4 ], %g2 200805c: 83 28 60 18 sll %g1, 0x18, %g1 2008060: 85 28 a0 1b sll %g2, 0x1b, %g2 2008064: 82 10 40 14 or %g1, %l4, %g1 2008068: 82 10 40 02 or %g1, %g2, %g1 200806c: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2008070: 92 10 00 08 mov %o0, %o1 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 2008074: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2008078: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 200807c: 7f ff fc a6 call 2007314 <_Chain_Append> 2008080: 90 10 00 13 mov %l3, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 2008084: 7f ff fc ba call 200736c <_Chain_Get> 2008088: 90 10 00 12 mov %l2, %o0 200808c: 80 a2 20 00 cmp %o0, 0 2008090: 32 bf ff f2 bne,a 2008058 <_Objects_Extend_information+0x1fc> 2008094: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 2008098: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 200809c: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20080a0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 20080a4: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20080a8: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 20080ac: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20080b0: 81 c7 e0 08 ret 20080b4: 81 e8 00 00 restore * 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; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 20080b8: 40 00 08 c0 call 200a3b8 <_Workspace_Allocate> 20080bc: 01 00 00 00 nop if ( !new_object_block ) 20080c0: a4 92 20 00 orcc %o0, 0, %l2 20080c4: 32 bf ff 96 bne,a 2007f1c <_Objects_Extend_information+0xc0> 20080c8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20080cc: 81 c7 e0 08 ret 20080d0: 81 e8 00 00 restore /* * 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, 20080d4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 20080d8: bb 2f 20 02 sll %i4, 2, %i5 /* * 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, 20080dc: 40 00 28 84 call 20122ec 20080e0: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 20080e4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 20080e8: 94 10 00 1d mov %i5, %o2 20080ec: 40 00 28 80 call 20122ec 20080f0: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20080f4: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 20080f8: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 20080fc: 94 04 c0 0a add %l3, %o2, %o2 2008100: 90 10 00 14 mov %l4, %o0 2008104: 40 00 28 7a call 20122ec 2008108: 95 2a a0 02 sll %o2, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 200810c: 10 bf ff a1 b 2007f90 <_Objects_Extend_information+0x134> 2008110: 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 ) 2008114: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2008118: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 200811c: ab 2d 60 10 sll %l5, 0x10, %l5 2008120: a2 10 00 13 mov %l3, %l1 2008124: a0 10 20 00 clr %l0 2008128: 10 bf ff 6c b 2007ed8 <_Objects_Extend_information+0x7c> 200812c: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2008130: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 2008134: 10 bf ff 69 b 2007ed8 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 2008138: a0 10 20 00 clr %l0 <== 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 ); 200813c: 40 00 08 a8 call 200a3dc <_Workspace_Free> 2008140: 90 10 00 12 mov %l2, %o0 return; 2008144: 81 c7 e0 08 ret 2008148: 81 e8 00 00 restore =============================================================================== 020081f8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 20081f8: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 20081fc: 80 a6 60 00 cmp %i1, 0 2008200: 12 80 00 04 bne 2008210 <_Objects_Get_information+0x18> 2008204: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 2008208: 81 c7 e0 08 ret 200820c: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 2008210: 40 00 19 45 call 200e724 <_Objects_API_maximum_class> 2008214: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2008218: 80 a2 20 00 cmp %o0, 0 200821c: 22 80 00 15 be,a 2008270 <_Objects_Get_information+0x78> 2008220: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2008224: 80 a6 40 08 cmp %i1, %o0 2008228: 38 80 00 12 bgu,a 2008270 <_Objects_Get_information+0x78> 200822c: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2008230: b1 2e 20 02 sll %i0, 2, %i0 2008234: 03 00 80 7c sethi %hi(0x201f000), %g1 2008238: 82 10 63 00 or %g1, 0x300, %g1 ! 201f300 <_Objects_Information_table> 200823c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2008240: 80 a0 60 00 cmp %g1, 0 2008244: 02 80 00 0b be 2008270 <_Objects_Get_information+0x78> <== NEVER TAKEN 2008248: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 200824c: b3 2e 60 02 sll %i1, 2, %i1 2008250: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 2008254: 80 a6 20 00 cmp %i0, 0 2008258: 02 80 00 06 be 2008270 <_Objects_Get_information+0x78> <== NEVER TAKEN 200825c: 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 ) 2008260: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2008264: 80 a0 60 00 cmp %g1, 0 2008268: 22 80 00 02 be,a 2008270 <_Objects_Get_information+0x78> 200826c: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2008270: 81 c7 e0 08 ret 2008274: 81 e8 00 00 restore =============================================================================== 02017f78 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 2017f78: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 2017f7c: 80 a6 60 00 cmp %i1, 0 2017f80: 12 80 00 05 bne 2017f94 <_Objects_Get_name_as_string+0x1c> 2017f84: 80 a6 a0 00 cmp %i2, 0 } } *d = '\0'; _Thread_Enable_dispatch(); return name; 2017f88: b4 10 20 00 clr %i2 } return NULL; /* unreachable path */ } 2017f8c: 81 c7 e0 08 ret 2017f90: 91 e8 00 1a restore %g0, %i2, %o0 Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 2017f94: 02 bf ff fe be 2017f8c <_Objects_Get_name_as_string+0x14> 2017f98: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2017f9c: 12 80 00 04 bne 2017fac <_Objects_Get_name_as_string+0x34> 2017fa0: 03 00 80 c8 sethi %hi(0x2032000), %g1 2017fa4: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 2032190 <_Thread_Executing> 2017fa8: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 2017fac: 7f ff d9 11 call 200e3f0 <_Objects_Get_information_id> 2017fb0: 90 10 00 18 mov %i0, %o0 if ( !information ) 2017fb4: a0 92 20 00 orcc %o0, 0, %l0 2017fb8: 22 bf ff f5 be,a 2017f8c <_Objects_Get_name_as_string+0x14> 2017fbc: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 2017fc0: 92 10 00 18 mov %i0, %o1 2017fc4: 7f ff d9 4f call 200e500 <_Objects_Get> 2017fc8: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 2017fcc: c2 07 bf fc ld [ %fp + -4 ], %g1 2017fd0: 80 a0 60 00 cmp %g1, 0 2017fd4: 32 bf ff ee bne,a 2017f8c <_Objects_Get_name_as_string+0x14> 2017fd8: b4 10 20 00 clr %i2 return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 2017fdc: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 2017fe0: 80 a0 60 00 cmp %g1, 0 2017fe4: 22 80 00 25 be,a 2018078 <_Objects_Get_name_as_string+0x100> 2017fe8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 2017fec: c8 02 20 0c ld [ %o0 + 0xc ], %g4 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 2017ff0: 80 a1 20 00 cmp %g4, 0 2017ff4: 02 80 00 1e be 201806c <_Objects_Get_name_as_string+0xf4> 2017ff8: 86 10 00 1a mov %i2, %g3 for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2017ffc: b2 86 7f ff addcc %i1, -1, %i1 2018000: 02 80 00 1b be 201806c <_Objects_Get_name_as_string+0xf4> <== NEVER TAKEN 2018004: 86 10 00 1a mov %i2, %g3 2018008: c2 49 00 00 ldsb [ %g4 ], %g1 201800c: 80 a0 60 00 cmp %g1, 0 2018010: 02 80 00 17 be 201806c <_Objects_Get_name_as_string+0xf4> 2018014: c4 09 00 00 ldub [ %g4 ], %g2 2018018: 17 00 80 c4 sethi %hi(0x2031000), %o3 201801c: 86 10 00 1a mov %i2, %g3 2018020: 96 12 e0 50 or %o3, 0x50, %o3 2018024: 10 80 00 06 b 201803c <_Objects_Get_name_as_string+0xc4> 2018028: 82 10 20 00 clr %g1 201802c: da 49 00 01 ldsb [ %g4 + %g1 ], %o5 2018030: 80 a3 60 00 cmp %o5, 0 2018034: 02 80 00 0e be 201806c <_Objects_Get_name_as_string+0xf4> 2018038: c4 09 00 01 ldub [ %g4 + %g1 ], %g2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 201803c: d8 02 c0 00 ld [ %o3 ], %o4 2018040: 9a 08 a0 ff and %g2, 0xff, %o5 2018044: 9a 03 00 0d add %o4, %o5, %o5 2018048: da 4b 60 01 ldsb [ %o5 + 1 ], %o5 201804c: 80 8b 60 97 btst 0x97, %o5 2018050: 12 80 00 03 bne 201805c <_Objects_Get_name_as_string+0xe4> 2018054: 82 00 60 01 inc %g1 2018058: 84 10 20 2a mov 0x2a, %g2 201805c: c4 28 c0 00 stb %g2, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2018060: 80 a0 40 19 cmp %g1, %i1 2018064: 0a bf ff f2 bcs 201802c <_Objects_Get_name_as_string+0xb4> 2018068: 86 00 e0 01 inc %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 201806c: 7f ff db fb call 200f058 <_Thread_Enable_dispatch> 2018070: c0 28 c0 00 clrb [ %g3 ] return name; 2018074: 30 bf ff c6 b,a 2017f8c <_Objects_Get_name_as_string+0x14> 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'; 2018078: 88 07 bf f0 add %fp, -16, %g4 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 201807c: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 2018080: c2 2f bf f3 stb %g1, [ %fp + -13 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2018084: c4 2f bf f0 stb %g2, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2018088: c0 2f bf f4 clrb [ %fp + -12 ] #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 201808c: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; 2018090: 83 30 60 08 srl %g1, 8, %g1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 2018094: c4 2f bf f1 stb %g2, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 2018098: 10 bf ff d9 b 2017ffc <_Objects_Get_name_as_string+0x84> 201809c: c2 2f bf f2 stb %g1, [ %fp + -14 ] =============================================================================== 02019714 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 2019714: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 2019718: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 201971c: 84 22 40 02 sub %o1, %g2, %g2 2019720: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 2019724: 80 a0 80 01 cmp %g2, %g1 2019728: 18 80 00 09 bgu 201974c <_Objects_Get_no_protection+0x38> 201972c: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 2019730: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2019734: d0 00 40 02 ld [ %g1 + %g2 ], %o0 2019738: 80 a2 20 00 cmp %o0, 0 201973c: 02 80 00 05 be 2019750 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2019740: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 2019744: 81 c3 e0 08 retl 2019748: c0 22 80 00 clr [ %o2 ] /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 201974c: 82 10 20 01 mov 1, %g1 2019750: 90 10 20 00 clr %o0 return NULL; } 2019754: 81 c3 e0 08 retl 2019758: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 0200e574 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200e574: 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; 200e578: 92 96 20 00 orcc %i0, 0, %o1 200e57c: 12 80 00 06 bne 200e594 <_Objects_Id_to_name+0x20> 200e580: 83 32 60 18 srl %o1, 0x18, %g1 200e584: 03 00 80 c8 sethi %hi(0x2032000), %g1 200e588: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 2032190 <_Thread_Executing> 200e58c: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200e590: 83 32 60 18 srl %o1, 0x18, %g1 200e594: 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 ) 200e598: 84 00 7f ff add %g1, -1, %g2 200e59c: 80 a0 a0 03 cmp %g2, 3 200e5a0: 18 80 00 11 bgu 200e5e4 <_Objects_Id_to_name+0x70> 200e5a4: 83 28 60 02 sll %g1, 2, %g1 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 200e5a8: 05 00 80 c8 sethi %hi(0x2032000), %g2 200e5ac: 84 10 a0 30 or %g2, 0x30, %g2 ! 2032030 <_Objects_Information_table> 200e5b0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200e5b4: 80 a0 60 00 cmp %g1, 0 200e5b8: 02 80 00 0b be 200e5e4 <_Objects_Id_to_name+0x70> 200e5bc: 85 32 60 1b srl %o1, 0x1b, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 200e5c0: 85 28 a0 02 sll %g2, 2, %g2 200e5c4: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200e5c8: 80 a2 20 00 cmp %o0, 0 200e5cc: 02 80 00 06 be 200e5e4 <_Objects_Id_to_name+0x70> <== NEVER TAKEN 200e5d0: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 200e5d4: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 200e5d8: 80 a0 60 00 cmp %g1, 0 200e5dc: 02 80 00 04 be 200e5ec <_Objects_Id_to_name+0x78> <== ALWAYS TAKEN 200e5e0: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 200e5e4: 81 c7 e0 08 ret 200e5e8: 91 e8 20 03 restore %g0, 3, %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 ); 200e5ec: 7f ff ff c5 call 200e500 <_Objects_Get> 200e5f0: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200e5f4: 80 a2 20 00 cmp %o0, 0 200e5f8: 02 bf ff fb be 200e5e4 <_Objects_Id_to_name+0x70> 200e5fc: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200e600: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 200e604: b0 10 20 00 clr %i0 200e608: 40 00 02 94 call 200f058 <_Thread_Enable_dispatch> 200e60c: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200e610: 81 c7 e0 08 ret 200e614: 81 e8 00 00 restore =============================================================================== 02008ba0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2008ba0: 9d e3 bf a0 save %sp, -96, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 2008ba4: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2008ba8: 40 00 2d 1d call 201401c 2008bac: 90 10 00 1a mov %i2, %o0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 2008bb0: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2008bb4: 80 a0 60 00 cmp %g1, 0 2008bb8: 12 80 00 1d bne 2008c2c <_Objects_Set_name+0x8c> 2008bbc: a0 10 00 08 mov %o0, %l0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 2008bc0: c4 4e 80 00 ldsb [ %i2 ], %g2 2008bc4: 80 a2 20 01 cmp %o0, 1 2008bc8: 08 80 00 13 bleu 2008c14 <_Objects_Set_name+0x74> 2008bcc: 85 28 a0 18 sll %g2, 0x18, %g2 2008bd0: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 2008bd4: 80 a2 20 02 cmp %o0, 2 2008bd8: 83 28 60 10 sll %g1, 0x10, %g1 2008bdc: 02 80 00 10 be 2008c1c <_Objects_Set_name+0x7c> 2008be0: 84 10 40 02 or %g1, %g2, %g2 2008be4: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 2008be8: 80 a2 20 03 cmp %o0, 3 2008bec: 83 28 60 08 sll %g1, 8, %g1 2008bf0: 84 10 80 01 or %g2, %g1, %g2 2008bf4: 02 80 00 03 be 2008c00 <_Objects_Set_name+0x60> 2008bf8: 82 10 20 20 mov 0x20, %g1 2008bfc: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 2008c00: 82 10 80 01 or %g2, %g1, %g1 2008c04: b0 10 20 01 mov 1, %i0 2008c08: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return true; } 2008c0c: 81 c7 e0 08 ret 2008c10: 81 e8 00 00 restore d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 2008c14: 03 00 08 00 sethi %hi(0x200000), %g1 2008c18: 84 10 80 01 or %g2, %g1, %g2 2008c1c: 03 00 00 08 sethi %hi(0x2000), %g1 2008c20: 84 10 80 01 or %g2, %g1, %g2 2008c24: 10 bf ff f7 b 2008c00 <_Objects_Set_name+0x60> 2008c28: 82 10 20 20 mov 0x20, %g1 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 2008c2c: 90 02 20 01 inc %o0 2008c30: 40 00 07 a8 call 200aad0 <_Workspace_Allocate> 2008c34: b0 10 20 00 clr %i0 if ( !d ) 2008c38: a2 92 20 00 orcc %o0, 0, %l1 2008c3c: 02 bf ff f4 be 2008c0c <_Objects_Set_name+0x6c> <== NEVER TAKEN 2008c40: 01 00 00 00 nop return false; if ( the_object->name.name_p ) { 2008c44: d0 06 60 0c ld [ %i1 + 0xc ], %o0 2008c48: 80 a2 20 00 cmp %o0, 0 2008c4c: 02 80 00 06 be 2008c64 <_Objects_Set_name+0xc4> 2008c50: 92 10 00 1a mov %i2, %o1 _Workspace_Free( (void *)the_object->name.name_p ); 2008c54: 40 00 07 a8 call 200aaf4 <_Workspace_Free> 2008c58: 01 00 00 00 nop the_object->name.name_p = NULL; 2008c5c: c0 26 60 0c clr [ %i1 + 0xc ] } strncpy( d, name, length ); 2008c60: 92 10 00 1a mov %i2, %o1 2008c64: 90 10 00 11 mov %l1, %o0 2008c68: 40 00 2c b2 call 2013f30 2008c6c: 94 10 00 10 mov %l0, %o2 d[length] = '\0'; 2008c70: c0 2c 40 10 clrb [ %l1 + %l0 ] the_object->name.name_p = d; 2008c74: e2 26 60 0c st %l1, [ %i1 + 0xc ] 2008c78: 81 c7 e0 08 ret 2008c7c: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 02008568 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2008568: 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 ); 200856c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 2008570: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2008574: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2008578: 92 10 00 11 mov %l1, %o1 200857c: 40 00 4a 73 call 201af48 <.udiv> 2008580: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2008584: 80 a2 20 00 cmp %o0, 0 2008588: 02 80 00 12 be 20085d0 <_Objects_Shrink_information+0x68> <== NEVER TAKEN 200858c: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 2008590: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2008594: c4 00 c0 00 ld [ %g3 ], %g2 2008598: 80 a4 40 02 cmp %l1, %g2 200859c: 12 80 00 09 bne 20085c0 <_Objects_Shrink_information+0x58><== ALWAYS TAKEN 20085a0: 82 10 20 00 clr %g1 20085a4: 10 80 00 0d b 20085d8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 20085a8: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 20085ac: a0 04 00 11 add %l0, %l1, %l0 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 ] == 20085b0: 80 a4 40 02 cmp %l1, %g2 20085b4: 02 80 00 09 be 20085d8 <_Objects_Shrink_information+0x70> 20085b8: 84 04 a0 04 add %l2, 4, %g2 20085bc: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 20085c0: 82 00 60 01 inc %g1 20085c4: 80 a2 00 01 cmp %o0, %g1 20085c8: 38 bf ff f9 bgu,a 20085ac <_Objects_Shrink_information+0x44> 20085cc: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 20085d0: 81 c7 e0 08 ret 20085d4: 81 e8 00 00 restore information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 20085d8: 10 80 00 06 b 20085f0 <_Objects_Shrink_information+0x88> 20085dc: 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 ); 20085e0: 80 a4 60 00 cmp %l1, 0 20085e4: 22 80 00 12 be,a 200862c <_Objects_Shrink_information+0xc4> 20085e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20085ec: 90 10 00 11 mov %l1, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 20085f0: 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) && 20085f4: 80 a0 40 10 cmp %g1, %l0 20085f8: 0a bf ff fa bcs 20085e0 <_Objects_Shrink_information+0x78> 20085fc: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 2008600: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2008604: 84 04 00 02 add %l0, %g2, %g2 2008608: 80 a0 40 02 cmp %g1, %g2 200860c: 1a bf ff f6 bcc 20085e4 <_Objects_Shrink_information+0x7c> 2008610: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 2008614: 7f ff fb 4c call 2007344 <_Chain_Extract> 2008618: 01 00 00 00 nop } } while ( the_object ); 200861c: 80 a4 60 00 cmp %l1, 0 2008620: 12 bf ff f4 bne 20085f0 <_Objects_Shrink_information+0x88><== ALWAYS TAKEN 2008624: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2008628: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 200862c: 40 00 07 6c call 200a3dc <_Workspace_Free> 2008630: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2008634: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2008638: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 200863c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 2008640: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 * 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; 2008644: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 2008648: 84 20 c0 02 sub %g3, %g2, %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 200864c: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2008650: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 2008654: 81 c7 e0 08 ret 2008658: 81 e8 00 00 restore =============================================================================== 0200788c <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 200788c: 9d e3 bf 98 save %sp, -104, %sp register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 2007890: a0 07 bf fc add %fp, -4, %l0 2007894: 90 10 00 19 mov %i1, %o0 2007898: 40 00 00 7f call 2007a94 <_POSIX_Mutex_Get> 200789c: 92 10 00 10 mov %l0, %o1 20078a0: 80 a2 20 00 cmp %o0, 0 20078a4: 22 80 00 18 be,a 2007904 <_POSIX_Condition_variables_Wait_support+0x78> 20078a8: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20078ac: 03 00 80 88 sethi %hi(0x2022000), %g1 20078b0: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 2022240 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 20078b4: 92 10 00 10 mov %l0, %o1 20078b8: 84 00 bf ff add %g2, -1, %g2 20078bc: 90 10 00 18 mov %i0, %o0 20078c0: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 20078c4: 7f ff ff 69 call 2007668 <_POSIX_Condition_variables_Get> 20078c8: 01 00 00 00 nop switch ( location ) { 20078cc: c2 07 bf fc ld [ %fp + -4 ], %g1 20078d0: 80 a0 60 00 cmp %g1, 0 20078d4: 12 80 00 1a bne 200793c <_POSIX_Condition_variables_Wait_support+0xb0> 20078d8: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 20078dc: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 20078e0: 80 a0 60 00 cmp %g1, 0 20078e4: 02 80 00 0a be 200790c <_POSIX_Condition_variables_Wait_support+0x80> 20078e8: 01 00 00 00 nop 20078ec: c4 06 40 00 ld [ %i1 ], %g2 20078f0: 80 a0 40 02 cmp %g1, %g2 20078f4: 02 80 00 06 be 200790c <_POSIX_Condition_variables_Wait_support+0x80> 20078f8: 01 00 00 00 nop _Thread_Enable_dispatch(); 20078fc: 40 00 0d c5 call 200b010 <_Thread_Enable_dispatch> 2007900: b0 10 20 16 mov 0x16, %i0 ! 16 return EINVAL; 2007904: 81 c7 e0 08 ret 2007908: 81 e8 00 00 restore } (void) pthread_mutex_unlock( mutex ); 200790c: 40 00 00 f5 call 2007ce0 2007910: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 2007914: 80 8e e0 ff btst 0xff, %i3 2007918: 22 80 00 0b be,a 2007944 <_POSIX_Condition_variables_Wait_support+0xb8> 200791c: c4 06 40 00 ld [ %i1 ], %g2 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 2007920: 40 00 0d bc call 200b010 <_Thread_Enable_dispatch> 2007924: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2007928: 40 00 00 cd call 2007c5c 200792c: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 2007930: 80 a2 20 00 cmp %o0, 0 2007934: 02 80 00 1c be 20079a4 <_POSIX_Condition_variables_Wait_support+0x118> 2007938: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 200793c: 81 c7 e0 08 ret 2007940: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2007944: 23 00 80 88 sethi %hi(0x2022000), %l1 2007948: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 ! 2022300 <_Thread_Executing> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 200794c: c4 24 20 14 st %g2, [ %l0 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2007950: c0 20 60 34 clr [ %g1 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 2007954: c6 06 00 00 ld [ %i0 ], %g3 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 2007958: 84 04 20 18 add %l0, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 200795c: c6 20 60 20 st %g3, [ %g1 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 2007960: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2007964: 92 10 00 1a mov %i2, %o1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2007968: 82 10 20 01 mov 1, %g1 200796c: 90 10 00 02 mov %g2, %o0 2007970: 15 00 80 2e sethi %hi(0x200b800), %o2 2007974: 94 12 a2 28 or %o2, 0x228, %o2 ! 200ba28 <_Thread_queue_Timeout> 2007978: 40 00 0f 19 call 200b5dc <_Thread_queue_Enqueue_with_handler> 200797c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] _Thread_Enable_dispatch(); 2007980: 40 00 0d a4 call 200b010 <_Thread_Enable_dispatch> 2007984: 01 00 00 00 nop /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 2007988: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 200798c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 2007990: 80 a6 20 74 cmp %i0, 0x74 2007994: 02 bf ff e5 be 2007928 <_POSIX_Condition_variables_Wait_support+0x9c> 2007998: 80 a6 20 00 cmp %i0, 0 200799c: 02 bf ff e3 be 2007928 <_POSIX_Condition_variables_Wait_support+0x9c><== ALWAYS TAKEN 20079a0: 01 00 00 00 nop 20079a4: 81 c7 e0 08 ret 20079a8: 81 e8 00 00 restore =============================================================================== 02010944 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 2010944: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 2010948: c2 06 20 08 ld [ %i0 + 8 ], %g1 201094c: 21 00 80 7e sethi %hi(0x201f800), %l0 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 ]; 2010950: a7 28 60 10 sll %g1, 0x10, %l3 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2010954: a9 30 60 18 srl %g1, 0x18, %l4 2010958: a0 14 20 08 or %l0, 8, %l0 201095c: a8 0d 20 07 and %l4, 7, %l4 2010960: a7 34 e0 0e srl %l3, 0xe, %l3 2010964: a8 05 20 04 add %l4, 4, %l4 2010968: a9 2d 20 02 sll %l4, 2, %l4 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 201096c: e4 14 20 10 lduh [ %l0 + 0x10 ], %l2 2010970: 80 a4 a0 00 cmp %l2, 0 2010974: 02 80 00 1e be 20109ec <_POSIX_Keys_Run_destructors+0xa8> 2010978: a2 10 20 01 mov 1, %l1 201097c: 84 10 20 01 mov 1, %g2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 2010980: c6 04 20 1c ld [ %l0 + 0x1c ], %g3 2010984: 83 2c 60 10 sll %l1, 0x10, %g1 2010988: 83 30 60 0e srl %g1, 0xe, %g1 201098c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( key != NULL && key->destructor != NULL ) { 2010990: 80 a0 60 00 cmp %g1, 0 2010994: 02 80 00 0e be 20109cc <_POSIX_Keys_Run_destructors+0x88> 2010998: 86 00 40 14 add %g1, %l4, %g3 201099c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 20109a0: 80 a0 60 00 cmp %g1, 0 20109a4: 22 80 00 0b be,a 20109d0 <_POSIX_Keys_Run_destructors+0x8c> 20109a8: a2 04 60 01 inc %l1 void *value = key->Values [ thread_api ][ thread_index ]; 20109ac: c6 00 e0 04 ld [ %g3 + 4 ], %g3 20109b0: d0 00 c0 13 ld [ %g3 + %l3 ], %o0 if ( value != NULL ) { 20109b4: 80 a2 20 00 cmp %o0, 0 20109b8: 22 80 00 06 be,a 20109d0 <_POSIX_Keys_Run_destructors+0x8c><== ALWAYS TAKEN 20109bc: a2 04 60 01 inc %l1 key->Values [ thread_api ][ thread_index ] = NULL; (*key->destructor)( value ); 20109c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20109c4: c0 20 c0 13 clr [ %g3 + %l3 ] <== NOT EXECUTED 20109c8: 84 10 20 00 clr %g2 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 20109cc: a2 04 60 01 inc %l1 20109d0: 83 2c 60 10 sll %l1, 0x10, %g1 20109d4: 83 30 60 10 srl %g1, 0x10, %g1 20109d8: 80 a4 80 01 cmp %l2, %g1 20109dc: 1a bf ff e9 bcc 2010980 <_POSIX_Keys_Run_destructors+0x3c> 20109e0: 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 ) { 20109e4: 22 bf ff e3 be,a 2010970 <_POSIX_Keys_Run_destructors+0x2c><== NEVER TAKEN 20109e8: e4 14 20 10 lduh [ %l0 + 0x10 ], %l2 <== NOT EXECUTED 20109ec: 81 c7 e0 08 ret 20109f0: 81 e8 00 00 restore =============================================================================== 0200b9e8 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200b9e8: 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( 200b9ec: 11 00 80 a6 sethi %hi(0x2029800), %o0 200b9f0: 92 10 00 18 mov %i0, %o1 200b9f4: 90 12 23 7c or %o0, 0x37c, %o0 200b9f8: 40 00 0d 4a call 200ef20 <_Objects_Get> 200b9fc: 94 07 bf fc add %fp, -4, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200ba00: c2 07 bf fc ld [ %fp + -4 ], %g1 200ba04: 80 a0 60 00 cmp %g1, 0 200ba08: 22 80 00 08 be,a 200ba28 <_POSIX_Message_queue_Receive_support+0x40> 200ba0c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200ba10: 40 00 34 23 call 2018a9c <__errno> 200ba14: b0 10 3f ff mov -1, %i0 200ba18: 82 10 20 09 mov 9, %g1 200ba1c: c2 22 00 00 st %g1, [ %o0 ] } 200ba20: 81 c7 e0 08 ret 200ba24: 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 ) { 200ba28: 84 08 60 03 and %g1, 3, %g2 200ba2c: 80 a0 a0 01 cmp %g2, 1 200ba30: 02 80 00 46 be 200bb48 <_POSIX_Message_queue_Receive_support+0x160> 200ba34: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200ba38: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200ba3c: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200ba40: 80 a0 80 1a cmp %g2, %i2 200ba44: 18 80 00 30 bgu 200bb04 <_POSIX_Message_queue_Receive_support+0x11c> 200ba48: 80 8f 20 ff btst 0xff, %i4 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200ba4c: 12 80 00 1c bne 200babc <_POSIX_Message_queue_Receive_support+0xd4><== ALWAYS TAKEN 200ba50: 98 10 20 00 clr %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200ba54: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200ba58: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED 200ba5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 200ba60: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 200ba64: 9a 10 00 1d mov %i5, %o5 <== NOT EXECUTED 200ba68: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED 200ba6c: 40 00 08 d4 call 200ddbc <_CORE_message_queue_Seize> <== NOT EXECUTED 200ba70: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200ba74: 40 00 0f bc call 200f964 <_Thread_Enable_dispatch> <== NOT EXECUTED 200ba78: 01 00 00 00 nop <== NOT EXECUTED if (msg_prio) { 200ba7c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 200ba80: 02 80 00 1f be 200bafc <_POSIX_Message_queue_Receive_support+0x114><== NOT EXECUTED 200ba84: 3b 00 80 a5 sethi %hi(0x2029400), %i5 <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200ba88: c2 07 63 20 ld [ %i5 + 0x320 ], %g1 ! 2029720 <_Thread_Executing> timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 200ba8c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 200ba90: 85 38 e0 1f sra %g3, 0x1f, %g2 200ba94: 86 18 80 03 xor %g2, %g3, %g3 200ba98: 84 20 c0 02 sub %g3, %g2, %g2 200ba9c: c4 26 c0 00 st %g2, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200baa0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200baa4: 80 a0 60 00 cmp %g1, 0 200baa8: 12 80 00 1f bne 200bb24 <_POSIX_Message_queue_Receive_support+0x13c> 200baac: 01 00 00 00 nop return length_out; 200bab0: f0 07 bf f8 ld [ %fp + -8 ], %i0 200bab4: 81 c7 e0 08 ret 200bab8: 81 e8 00 00 restore length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200babc: 99 30 60 0e srl %g1, 0xe, %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200bac0: 90 02 20 1c add %o0, 0x1c, %o0 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200bac4: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200bac8: 92 10 00 18 mov %i0, %o1 200bacc: 94 10 00 19 mov %i1, %o2 200bad0: 9a 10 00 1d mov %i5, %o5 200bad4: 96 07 bf f8 add %fp, -8, %o3 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200bad8: 98 1b 20 01 xor %o4, 1, %o4 200badc: 98 0b 20 01 and %o4, 1, %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200bae0: 40 00 08 b7 call 200ddbc <_CORE_message_queue_Seize> 200bae4: c2 27 bf f8 st %g1, [ %fp + -8 ] &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200bae8: 40 00 0f 9f call 200f964 <_Thread_Enable_dispatch> 200baec: 01 00 00 00 nop if (msg_prio) { 200baf0: 80 a6 e0 00 cmp %i3, 0 200baf4: 12 bf ff e5 bne 200ba88 <_POSIX_Message_queue_Receive_support+0xa0><== ALWAYS TAKEN 200baf8: 3b 00 80 a5 sethi %hi(0x2029400), %i5 200bafc: 10 bf ff e9 b 200baa0 <_POSIX_Message_queue_Receive_support+0xb8><== NOT EXECUTED 200bb00: c2 07 63 20 ld [ %i5 + 0x320 ], %g1 ! 2029720 <_Thread_Executing><== NOT EXECUTED } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 200bb04: 40 00 0f 98 call 200f964 <_Thread_Enable_dispatch> 200bb08: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200bb0c: 40 00 33 e4 call 2018a9c <__errno> 200bb10: 01 00 00 00 nop 200bb14: 82 10 20 7a mov 0x7a, %g1 ! 7a 200bb18: c2 22 00 00 st %g1, [ %o0 ] 200bb1c: 81 c7 e0 08 ret 200bb20: 81 e8 00 00 restore } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 200bb24: 40 00 33 de call 2018a9c <__errno> 200bb28: b0 10 3f ff mov -1, %i0 200bb2c: c2 07 63 20 ld [ %i5 + 0x320 ], %g1 200bb30: b6 10 00 08 mov %o0, %i3 200bb34: 40 00 00 b0 call 200bdf4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200bb38: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200bb3c: d0 26 c0 00 st %o0, [ %i3 ] 200bb40: 81 c7 e0 08 ret 200bb44: 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(); 200bb48: 40 00 0f 87 call 200f964 <_Thread_Enable_dispatch> 200bb4c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200bb50: 40 00 33 d3 call 2018a9c <__errno> 200bb54: 01 00 00 00 nop 200bb58: 82 10 20 09 mov 9, %g1 ! 9 200bb5c: c2 22 00 00 st %g1, [ %o0 ] 200bb60: 81 c7 e0 08 ret 200bb64: 81 e8 00 00 restore =============================================================================== 0200bb80 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 200bb80: 9d e3 bf 90 save %sp, -112, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 200bb84: 80 a6 e0 20 cmp %i3, 0x20 200bb88: 18 80 00 47 bgu 200bca4 <_POSIX_Message_queue_Send_support+0x124> 200bb8c: 11 00 80 a6 sethi %hi(0x2029800), %o0 200bb90: 92 10 00 18 mov %i0, %o1 200bb94: 90 12 23 7c or %o0, 0x37c, %o0 200bb98: 40 00 0c e2 call 200ef20 <_Objects_Get> 200bb9c: 94 07 bf fc add %fp, -4, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200bba0: c2 07 bf fc ld [ %fp + -4 ], %g1 200bba4: 80 a0 60 00 cmp %g1, 0 200bba8: 12 80 00 31 bne 200bc6c <_POSIX_Message_queue_Send_support+0xec> 200bbac: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 200bbb0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200bbb4: 80 88 60 03 btst 3, %g1 200bbb8: 02 80 00 41 be 200bcbc <_POSIX_Message_queue_Send_support+0x13c> 200bbbc: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200bbc0: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200bbc4: 12 80 00 15 bne 200bc18 <_POSIX_Message_queue_Send_support+0x98> 200bbc8: 84 10 20 00 clr %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 200bbcc: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 200bbd0: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 200bbd4: 92 10 00 19 mov %i1, %o1 200bbd8: 94 10 00 1a mov %i2, %o2 200bbdc: 96 10 00 18 mov %i0, %o3 200bbe0: 9a 20 00 1b neg %i3, %o5 200bbe4: 98 10 20 00 clr %o4 200bbe8: 40 00 08 b4 call 200deb8 <_CORE_message_queue_Submit> 200bbec: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 200bbf0: 40 00 0f 5d call 200f964 <_Thread_Enable_dispatch> 200bbf4: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 200bbf8: 80 a7 60 07 cmp %i5, 7 200bbfc: 02 80 00 19 be 200bc60 <_POSIX_Message_queue_Send_support+0xe0><== NEVER TAKEN 200bc00: 03 00 80 a5 sethi %hi(0x2029400), %g1 msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 200bc04: 80 a7 60 00 cmp %i5, 0 200bc08: 12 80 00 1f bne 200bc84 <_POSIX_Message_queue_Send_support+0x104> 200bc0c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 200bc10: 81 c7 e0 08 ret 200bc14: 81 e8 00 00 restore the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200bc18: 85 30 60 0e srl %g1, 0xe, %g2 200bc1c: 84 18 a0 01 xor %g2, 1, %g2 200bc20: 84 08 a0 01 and %g2, 1, %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 200bc24: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 200bc28: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 200bc2c: 92 10 00 19 mov %i1, %o1 200bc30: 94 10 00 1a mov %i2, %o2 200bc34: 96 10 00 18 mov %i0, %o3 200bc38: 9a 20 00 1b neg %i3, %o5 200bc3c: 98 10 20 00 clr %o4 200bc40: 40 00 08 9e call 200deb8 <_CORE_message_queue_Submit> 200bc44: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 200bc48: 40 00 0f 47 call 200f964 <_Thread_Enable_dispatch> 200bc4c: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 200bc50: 80 a7 60 07 cmp %i5, 7 200bc54: 12 bf ff ed bne 200bc08 <_POSIX_Message_queue_Send_support+0x88> 200bc58: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 200bc5c: 03 00 80 a5 sethi %hi(0x2029400), %g1 200bc60: c2 00 63 20 ld [ %g1 + 0x320 ], %g1 ! 2029720 <_Thread_Executing> 200bc64: 10 bf ff e8 b 200bc04 <_POSIX_Message_queue_Send_support+0x84> 200bc68: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200bc6c: 40 00 33 8c call 2018a9c <__errno> 200bc70: b0 10 3f ff mov -1, %i0 200bc74: 82 10 20 09 mov 9, %g1 200bc78: c2 22 00 00 st %g1, [ %o0 ] } 200bc7c: 81 c7 e0 08 ret 200bc80: 81 e8 00 00 restore msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 200bc84: 40 00 33 86 call 2018a9c <__errno> 200bc88: b0 10 3f ff mov -1, %i0 200bc8c: b8 10 00 08 mov %o0, %i4 200bc90: 40 00 00 59 call 200bdf4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200bc94: 90 10 00 1d mov %i5, %o0 200bc98: d0 27 00 00 st %o0, [ %i4 ] 200bc9c: 81 c7 e0 08 ret 200bca0: 81 e8 00 00 restore * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 200bca4: 40 00 33 7e call 2018a9c <__errno> 200bca8: b0 10 3f ff mov -1, %i0 200bcac: 82 10 20 16 mov 0x16, %g1 200bcb0: c2 22 00 00 st %g1, [ %o0 ] 200bcb4: 81 c7 e0 08 ret 200bcb8: 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_RDONLY ) { _Thread_Enable_dispatch(); 200bcbc: 40 00 0f 2a call 200f964 <_Thread_Enable_dispatch> 200bcc0: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200bcc4: 40 00 33 76 call 2018a9c <__errno> 200bcc8: 01 00 00 00 nop 200bccc: 82 10 20 09 mov 9, %g1 ! 9 200bcd0: c2 22 00 00 st %g1, [ %o0 ] 200bcd4: 81 c7 e0 08 ret 200bcd8: 81 e8 00 00 restore =============================================================================== 0200d664 <_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 ]; 200d664: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200d668: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 200d66c: 80 a0 a0 00 cmp %g2, 0 200d670: 12 80 00 06 bne 200d688 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN 200d674: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200d678: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200d67c: 80 a0 a0 01 cmp %g2, 1 200d680: 22 80 00 05 be,a 200d694 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30> 200d684: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 200d688: 82 13 c0 00 mov %o7, %g1 200d68c: 7f ff ee 99 call 20090f0 <_Thread_Enable_dispatch> 200d690: 9e 10 40 00 mov %g1, %o7 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 200d694: 80 a0 60 00 cmp %g1, 0 200d698: 02 bf ff fc be 200d688 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24> 200d69c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200d6a0: 03 00 80 82 sethi %hi(0x2020800), %g1 200d6a4: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 2020a10 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200d6a8: 92 10 3f ff mov -1, %o1 200d6ac: 84 00 bf ff add %g2, -1, %g2 200d6b0: c4 20 62 10 st %g2, [ %g1 + 0x210 ] 200d6b4: 82 13 c0 00 mov %o7, %g1 200d6b8: 40 00 01 e8 call 200de58 <_POSIX_Thread_Exit> 200d6bc: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200ecbc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200ecbc: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200ecc0: 7f ff ff f2 call 200ec88 <_POSIX_Priority_Is_valid> 200ecc4: d0 06 40 00 ld [ %i1 ], %o0 200ecc8: 80 8a 20 ff btst 0xff, %o0 200eccc: 02 80 00 0c be 200ecfc <_POSIX_Thread_Translate_sched_param+0x40><== NEVER TAKEN 200ecd0: 80 a6 20 00 cmp %i0, 0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200ecd4: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200ecd8: 02 80 00 0b be 200ed04 <_POSIX_Thread_Translate_sched_param+0x48> 200ecdc: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 200ece0: 80 a6 20 01 cmp %i0, 1 200ece4: 02 80 00 2e be 200ed9c <_POSIX_Thread_Translate_sched_param+0xe0> 200ece8: 80 a6 20 02 cmp %i0, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200ecec: 02 80 00 2f be 200eda8 <_POSIX_Thread_Translate_sched_param+0xec> 200ecf0: 80 a6 20 04 cmp %i0, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 200ecf4: 22 80 00 08 be,a 200ed14 <_POSIX_Thread_Translate_sched_param+0x58> 200ecf8: c2 06 60 08 ld [ %i1 + 8 ], %g1 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 200ecfc: 81 c7 e0 08 ret 200ed00: 91 e8 20 16 restore %g0, 0x16, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200ed04: 82 10 20 01 mov 1, %g1 200ed08: c2 26 80 00 st %g1, [ %i2 ] return 0; 200ed0c: 81 c7 e0 08 ret 200ed10: 81 e8 00 00 restore *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 200ed14: 80 a0 60 00 cmp %g1, 0 200ed18: 32 80 00 07 bne,a 200ed34 <_POSIX_Thread_Translate_sched_param+0x78> 200ed1c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 (param->sched_ss_repl_period.tv_nsec == 0) ) 200ed20: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ed24: 80 a0 60 00 cmp %g1, 0 200ed28: 02 bf ff f5 be 200ecfc <_POSIX_Thread_Translate_sched_param+0x40> 200ed2c: 01 00 00 00 nop return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200ed30: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200ed34: 80 a0 60 00 cmp %g1, 0 200ed38: 12 80 00 06 bne 200ed50 <_POSIX_Thread_Translate_sched_param+0x94> 200ed3c: 01 00 00 00 nop (param->sched_ss_init_budget.tv_nsec == 0) ) 200ed40: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200ed44: 80 a0 60 00 cmp %g1, 0 200ed48: 02 bf ff ed be 200ecfc <_POSIX_Thread_Translate_sched_param+0x40> 200ed4c: 01 00 00 00 nop return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200ed50: 7f ff f0 e5 call 200b0e4 <_Timespec_To_ticks> 200ed54: 90 06 60 08 add %i1, 8, %o0 200ed58: b0 10 00 08 mov %o0, %i0 200ed5c: 7f ff f0 e2 call 200b0e4 <_Timespec_To_ticks> 200ed60: 90 06 60 10 add %i1, 0x10, %o0 200ed64: 80 a6 00 08 cmp %i0, %o0 200ed68: 0a bf ff e5 bcs 200ecfc <_POSIX_Thread_Translate_sched_param+0x40> 200ed6c: 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 ) ) 200ed70: 7f ff ff c6 call 200ec88 <_POSIX_Priority_Is_valid> 200ed74: d0 06 60 04 ld [ %i1 + 4 ], %o0 200ed78: 80 8a 20 ff btst 0xff, %o0 200ed7c: 02 bf ff e0 be 200ecfc <_POSIX_Thread_Translate_sched_param+0x40> 200ed80: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200ed84: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200ed88: 03 00 80 1c sethi %hi(0x2007000), %g1 200ed8c: 82 10 61 bc or %g1, 0x1bc, %g1 ! 20071bc <_POSIX_Threads_Sporadic_budget_callout> 200ed90: c2 26 c0 00 st %g1, [ %i3 ] return 0; 200ed94: 81 c7 e0 08 ret 200ed98: 91 e8 20 00 restore %g0, 0, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200ed9c: c0 26 80 00 clr [ %i2 ] return 0; 200eda0: 81 c7 e0 08 ret 200eda4: 91 e8 20 00 restore %g0, 0, %o0 } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200eda8: f0 26 80 00 st %i0, [ %i2 ] return 0; 200edac: 81 c7 e0 08 ret 200edb0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d7d4 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200d7d4: 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 ]; 200d7d8: f0 06 61 6c ld [ %i1 + 0x16c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200d7dc: 40 00 0c 3e call 20108d4 <_POSIX_Threads_cancel_run> 200d7e0: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200d7e4: 90 10 00 19 mov %i1, %o0 200d7e8: 40 00 0c 57 call 2010944 <_POSIX_Keys_Run_destructors> 200d7ec: a0 06 20 40 add %i0, 0x40, %l0 /* * 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 )) ) 200d7f0: 10 80 00 03 b 200d7fc <_POSIX_Threads_Delete_extension+0x28> 200d7f4: e2 06 60 28 ld [ %i1 + 0x28 ], %l1 *(void **)the_thread->Wait.return_argument = value_ptr; 200d7f8: e2 20 40 00 st %l1, [ %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 )) ) 200d7fc: 7f ff ee 7a call 20091e4 <_Thread_queue_Dequeue> 200d800: 90 10 00 10 mov %l0, %o0 200d804: 80 a2 20 00 cmp %o0, 0 200d808: 32 bf ff fc bne,a 200d7f8 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200d80c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200d810: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 200d814: 80 a0 60 04 cmp %g1, 4 200d818: 02 80 00 05 be 200d82c <_POSIX_Threads_Delete_extension+0x58> 200d81c: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200d820: c0 26 61 6c clr [ %i1 + 0x16c ] (void) _Workspace_Free( api ); 200d824: 7f ff f2 ee call 200a3dc <_Workspace_Free> 200d828: 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 ); 200d82c: 7f ff f2 74 call 200a1fc <_Watchdog_Remove> 200d830: 90 06 20 a4 add %i0, 0xa4, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200d834: c0 26 61 6c clr [ %i1 + 0x16c ] (void) _Workspace_Free( api ); 200d838: 7f ff f2 e9 call 200a3dc <_Workspace_Free> 200d83c: 81 e8 00 00 restore =============================================================================== 02006ee0 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 2006ee0: 9d e3 bf 60 save %sp, -160, %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; 2006ee4: 03 00 80 7f sethi %hi(0x201fc00), %g1 2006ee8: 82 10 62 3c or %g1, 0x23c, %g1 ! 201fe3c maximum = Configuration_POSIX_API.number_of_initialization_threads; 2006eec: e6 00 60 30 ld [ %g1 + 0x30 ], %l3 if ( !user_threads || maximum == 0 ) 2006ef0: 80 a4 e0 00 cmp %l3, 0 2006ef4: 02 80 00 1a be 2006f5c <_POSIX_Threads_Initialize_user_threads_body+0x7c><== NEVER TAKEN 2006ef8: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 2006efc: 80 a4 60 00 cmp %l1, 0 2006f00: 02 80 00 17 be 2006f5c <_POSIX_Threads_Initialize_user_threads_body+0x7c><== NEVER TAKEN 2006f04: a4 10 20 00 clr %l2 2006f08: a0 07 bf c0 add %fp, -64, %l0 2006f0c: a8 07 bf fc add %fp, -4, %l4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2006f10: 40 00 1f a9 call 200edb4 2006f14: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 2006f18: 92 10 20 02 mov 2, %o1 2006f1c: 40 00 1f b2 call 200ede4 2006f20: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2006f24: d2 04 60 04 ld [ %l1 + 4 ], %o1 2006f28: 40 00 1f c0 call 200ee28 2006f2c: 90 10 00 10 mov %l0, %o0 status = pthread_create( 2006f30: d4 04 40 00 ld [ %l1 ], %o2 2006f34: 90 10 00 14 mov %l4, %o0 2006f38: 92 10 00 10 mov %l0, %o1 2006f3c: 7f ff fe f0 call 2006afc 2006f40: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2006f44: 80 a2 20 00 cmp %o0, 0 2006f48: 12 80 00 07 bne 2006f64 <_POSIX_Threads_Initialize_user_threads_body+0x84> 2006f4c: a4 04 a0 01 inc %l2 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 2006f50: 80 a4 c0 12 cmp %l3, %l2 2006f54: 18 bf ff ef bgu 2006f10 <_POSIX_Threads_Initialize_user_threads_body+0x30><== NEVER TAKEN 2006f58: a2 04 60 08 add %l1, 8, %l1 2006f5c: 81 c7 e0 08 ret 2006f60: 81 e8 00 00 restore &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2006f64: 94 10 00 08 mov %o0, %o2 2006f68: 92 10 20 01 mov 1, %o1 2006f6c: 40 00 08 41 call 2009070 <_Internal_error_Occurred> 2006f70: 90 10 20 02 mov 2, %o0 =============================================================================== 0200d9cc <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200d9cc: 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 ]; 200d9d0: e0 06 61 6c ld [ %i1 + 0x16c ], %l0 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200d9d4: 40 00 04 83 call 200ebe0 <_Timespec_To_ticks> 200d9d8: 90 04 20 94 add %l0, 0x94, %o0 200d9dc: 03 00 80 7a sethi %hi(0x201e800), %g1 200d9e0: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 200d9e4: d2 08 60 64 ldub [ %g1 + 0x64 ], %o1 */ #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 ) { 200d9e8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200d9ec: 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; 200d9f0: d0 26 60 78 st %o0, [ %i1 + 0x78 ] */ #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 ) { 200d9f4: 80 a0 60 00 cmp %g1, 0 200d9f8: 12 80 00 06 bne 200da10 <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN 200d9fc: 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 ) { 200da00: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200da04: 80 a0 40 09 cmp %g1, %o1 200da08: 38 80 00 09 bgu,a 200da2c <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200da0c: 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 ); 200da10: 40 00 04 74 call 200ebe0 <_Timespec_To_ticks> 200da14: 90 04 20 8c add %l0, 0x8c, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200da18: 31 00 80 7d sethi %hi(0x201f400), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200da1c: d0 24 20 b0 st %o0, [ %l0 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200da20: b2 04 20 a4 add %l0, 0xa4, %i1 200da24: 7f ff f1 8d call 200a058 <_Watchdog_Insert> 200da28: 91 ee 20 80 restore %i0, 0x80, %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 ); 200da2c: 7f ff eb 3f call 2008728 <_Thread_Change_priority> 200da30: 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 ); 200da34: 40 00 04 6b call 200ebe0 <_Timespec_To_ticks> 200da38: 90 04 20 8c add %l0, 0x8c, %o0 200da3c: 31 00 80 7d sethi %hi(0x201f400), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200da40: d0 24 20 b0 st %o0, [ %l0 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200da44: b2 04 20 a4 add %l0, 0xa4, %i1 200da48: 7f ff f1 84 call 200a058 <_Watchdog_Insert> 200da4c: 91 ee 20 80 restore %i0, 0x80, %o0 =============================================================================== 0200d978 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d978: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200d97c: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 200d980: 05 00 80 7a sethi %hi(0x201e800), %g2 200d984: d2 08 a0 64 ldub [ %g2 + 0x64 ], %o1 ! 201e864 */ #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 ) { 200d988: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200d98c: 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 */ 200d990: 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; 200d994: 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 ) { 200d998: 80 a0 a0 00 cmp %g2, 0 200d99c: 12 80 00 06 bne 200d9b4 <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN 200d9a0: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * 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 ) { 200d9a4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200d9a8: 80 a0 40 09 cmp %g1, %o1 200d9ac: 0a 80 00 04 bcs 200d9bc <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN 200d9b0: 94 10 20 01 mov 1, %o2 200d9b4: 81 c3 e0 08 retl <== NOT EXECUTED 200d9b8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 200d9bc: 82 13 c0 00 mov %o7, %g1 200d9c0: 7f ff eb 5a call 2008728 <_Thread_Change_priority> 200d9c4: 9e 10 40 00 mov %g1, %o7 =============================================================================== 020108d4 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 20108d4: 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 ]; 20108d8: e4 06 21 6c ld [ %i0 + 0x16c ], %l2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 20108dc: 84 10 20 01 mov 1, %g2 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 20108e0: c2 04 a0 e0 ld [ %l2 + 0xe0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20108e4: a2 04 a0 e4 add %l2, 0xe4, %l1 20108e8: 80 a0 40 11 cmp %g1, %l1 20108ec: 02 80 00 14 be 201093c <_POSIX_Threads_cancel_run+0x68> 20108f0: c4 24 a0 d4 st %g2, [ %l2 + 0xd4 ] thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 20108f4: 7f ff c5 ec call 20020a4 20108f8: 01 00 00 00 nop handler = (POSIX_Cancel_Handler_control *) 20108fc: e0 04 60 04 ld [ %l1 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2010900: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2010904: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2010908: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 201090c: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 2010910: 7f ff c5 e9 call 20020b4 2010914: 01 00 00 00 nop (*handler->routine)( handler->arg ); 2010918: c2 04 20 08 ld [ %l0 + 8 ], %g1 201091c: 9f c0 40 00 call %g1 2010920: d0 04 20 0c ld [ %l0 + 0xc ], %o0 _Workspace_Free( handler ); 2010924: 7f ff e6 ae call 200a3dc <_Workspace_Free> 2010928: 90 10 00 10 mov %l0, %o0 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 201092c: c2 04 a0 e0 ld [ %l2 + 0xe0 ], %g1 2010930: 80 a0 40 11 cmp %g1, %l1 2010934: 12 bf ff f0 bne 20108f4 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN 2010938: 01 00 00 00 nop 201093c: 81 c7 e0 08 ret 2010940: 81 e8 00 00 restore =============================================================================== 02006ae4 <_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) { 2006ae4: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2006ae8: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006aec: 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; 2006af0: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006af4: 80 a0 60 00 cmp %g1, 0 2006af8: 12 80 00 0e bne 2006b30 <_POSIX_Timer_TSR+0x4c> 2006afc: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 2006b00: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2006b04: 80 a0 60 00 cmp %g1, 0 2006b08: 32 80 00 0b bne,a 2006b34 <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN 2006b0c: 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; 2006b10: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2006b14: 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 ) ) { 2006b18: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2006b1c: 40 00 1e 09 call 200e340 2006b20: 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; 2006b24: c0 26 60 68 clr [ %i1 + 0x68 ] 2006b28: 81 c7 e0 08 ret 2006b2c: 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( 2006b30: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2006b34: d4 06 60 08 ld [ %i1 + 8 ], %o2 2006b38: 90 06 60 10 add %i1, 0x10, %o0 2006b3c: 17 00 80 1a sethi %hi(0x2006800), %o3 2006b40: 98 10 00 19 mov %i1, %o4 2006b44: 40 00 1f 2b call 200e7f0 <_POSIX_Timer_Insert_helper> 2006b48: 96 12 e2 e4 or %o3, 0x2e4, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2006b4c: 80 8a 20 ff btst 0xff, %o0 2006b50: 02 bf ff f6 be 2006b28 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN 2006b54: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2006b58: 40 00 05 f3 call 2008324 <_TOD_Get> 2006b5c: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2006b60: 82 10 20 03 mov 3, %g1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006b64: 10 bf ff ed b 2006b18 <_POSIX_Timer_TSR+0x34> 2006b68: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] =============================================================================== 02010d2c <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 2010d2c: 9d e3 bf 90 save %sp, -112, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 2010d30: 98 10 20 01 mov 1, %o4 2010d34: 96 0e a0 ff and %i2, 0xff, %o3 2010d38: a0 07 bf f4 add %fp, -12, %l0 2010d3c: 90 10 00 18 mov %i0, %o0 2010d40: 92 10 00 19 mov %i1, %o1 2010d44: 40 00 00 23 call 2010dd0 <_POSIX_signals_Clear_signals> 2010d48: 94 10 00 10 mov %l0, %o2 2010d4c: 80 8a 20 ff btst 0xff, %o0 2010d50: 02 80 00 1e be 2010dc8 <_POSIX_signals_Check_signal+0x9c> 2010d54: 83 2e 60 02 sll %i1, 2, %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 2010d58: 07 00 80 7e sethi %hi(0x201f800), %g3 2010d5c: 85 2e 60 04 sll %i1, 4, %g2 2010d60: 86 10 e1 28 or %g3, 0x128, %g3 2010d64: 84 20 80 01 sub %g2, %g1, %g2 2010d68: 88 00 c0 02 add %g3, %g2, %g4 2010d6c: c2 01 20 08 ld [ %g4 + 8 ], %g1 2010d70: 80 a0 60 01 cmp %g1, 1 2010d74: 02 80 00 15 be 2010dc8 <_POSIX_signals_Check_signal+0x9c> <== NEVER TAKEN 2010d78: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 2010d7c: c8 01 20 04 ld [ %g4 + 4 ], %g4 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 2010d80: e2 06 20 cc ld [ %i0 + 0xcc ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 2010d84: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 2010d88: 86 11 00 11 or %g4, %l1, %g3 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 2010d8c: 80 a0 a0 02 cmp %g2, 2 2010d90: 02 80 00 07 be 2010dac <_POSIX_signals_Check_signal+0x80> 2010d94: c6 26 20 cc st %g3, [ %i0 + 0xcc ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 2010d98: 9f c0 40 00 call %g1 2010d9c: 90 10 00 19 mov %i1, %o0 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 2010da0: e2 26 20 cc st %l1, [ %i0 + 0xcc ] return true; 2010da4: 81 c7 e0 08 ret 2010da8: 91 e8 20 01 restore %g0, 1, %o0 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 2010dac: 90 10 00 19 mov %i1, %o0 2010db0: 92 10 00 10 mov %l0, %o1 2010db4: 9f c0 40 00 call %g1 2010db8: 94 10 20 00 clr %o2 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 2010dbc: e2 26 20 cc st %l1, [ %i0 + 0xcc ] return true; 2010dc0: 81 c7 e0 08 ret 2010dc4: 91 e8 20 01 restore %g0, 1, %o0 } 2010dc8: 81 c7 e0 08 ret 2010dcc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020118b8 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 20118b8: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 20118bc: 7f ff c1 fa call 20020a4 20118c0: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 20118c4: 85 2e 20 04 sll %i0, 4, %g2 20118c8: 83 2e 20 02 sll %i0, 2, %g1 20118cc: 82 20 80 01 sub %g2, %g1, %g1 20118d0: 05 00 80 7e sethi %hi(0x201f800), %g2 20118d4: 84 10 a1 28 or %g2, 0x128, %g2 ! 201f928 <_POSIX_signals_Vectors> 20118d8: c4 00 80 01 ld [ %g2 + %g1 ], %g2 20118dc: 80 a0 a0 02 cmp %g2, 2 20118e0: 02 80 00 11 be 2011924 <_POSIX_signals_Clear_process_signals+0x6c> 20118e4: 05 00 80 7e sethi %hi(0x201f800), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 20118e8: 05 00 80 7e sethi %hi(0x201f800), %g2 20118ec: c6 00 a3 1c ld [ %g2 + 0x31c ], %g3 ! 201fb1c <_POSIX_signals_Pending> 20118f0: b0 06 3f ff add %i0, -1, %i0 20118f4: 82 10 20 01 mov 1, %g1 20118f8: 83 28 40 18 sll %g1, %i0, %g1 20118fc: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 2011900: 80 a0 60 00 cmp %g1, 0 2011904: 12 80 00 06 bne 201191c <_POSIX_signals_Clear_process_signals+0x64><== NEVER TAKEN 2011908: c2 20 a3 1c st %g1, [ %g2 + 0x31c ] _Thread_Do_post_task_switch_extension--; 201190c: 03 00 80 7d sethi %hi(0x201f400), %g1 2011910: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 ! 201f444 <_Thread_Do_post_task_switch_extension> 2011914: 84 00 bf ff add %g2, -1, %g2 2011918: c4 20 60 44 st %g2, [ %g1 + 0x44 ] } _ISR_Enable( level ); 201191c: 7f ff c1 e6 call 20020b4 2011920: 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 ] ) ) 2011924: 84 10 a3 20 or %g2, 0x320, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2011928: c6 00 40 02 ld [ %g1 + %g2 ], %g3 201192c: 82 00 40 02 add %g1, %g2, %g1 2011930: 82 00 60 04 add %g1, 4, %g1 2011934: 80 a0 c0 01 cmp %g3, %g1 2011938: 02 bf ff ed be 20118ec <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN 201193c: 05 00 80 7e sethi %hi(0x201f800), %g2 if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 2011940: 7f ff c1 dd call 20020b4 <== NOT EXECUTED 2011944: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02007720 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2007720: 82 10 20 1b mov 0x1b, %g1 ! 1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2007724: 86 10 20 01 mov 1, %g3 2007728: 84 00 7f ff add %g1, -1, %g2 200772c: 85 28 c0 02 sll %g3, %g2, %g2 2007730: 80 88 80 08 btst %g2, %o0 2007734: 12 80 00 11 bne 2007778 <_POSIX_signals_Get_highest+0x58> <== NEVER TAKEN 2007738: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200773c: 82 00 60 01 inc %g1 2007740: 80 a0 60 20 cmp %g1, 0x20 2007744: 12 bf ff fa bne 200772c <_POSIX_signals_Get_highest+0xc> 2007748: 84 00 7f ff add %g1, -1, %g2 200774c: 82 10 20 01 mov 1, %g1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2007750: 10 80 00 05 b 2007764 <_POSIX_signals_Get_highest+0x44> 2007754: 86 10 20 01 mov 1, %g3 */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2007758: 80 a0 60 1b cmp %g1, 0x1b 200775c: 02 80 00 07 be 2007778 <_POSIX_signals_Get_highest+0x58> <== NEVER TAKEN 2007760: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) { 2007764: 84 00 7f ff add %g1, -1, %g2 2007768: 85 28 c0 02 sll %g3, %g2, %g2 200776c: 80 88 80 08 btst %g2, %o0 2007770: 22 bf ff fa be,a 2007758 <_POSIX_signals_Get_highest+0x38> 2007774: 82 00 60 01 inc %g1 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2007778: 81 c3 e0 08 retl 200777c: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200d600 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200d600: 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; 200d604: 27 00 80 7d sethi %hi(0x201f400), %l3 POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200d608: e2 06 21 6c ld [ %i0 + 0x16c ], %l1 /* * 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; 200d60c: c2 04 e0 60 ld [ %l3 + 0x60 ], %g1 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 200d610: 80 a4 60 00 cmp %l1, 0 200d614: 02 80 00 34 be 200d6e4 <_POSIX_signals_Post_switch_extension+0xe4><== NEVER TAKEN 200d618: e8 00 60 34 ld [ %g1 + 0x34 ], %l4 * * 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 ); 200d61c: 7f ff d2 a2 call 20020a4 200d620: 25 00 80 7e sethi %hi(0x201f800), %l2 200d624: a4 14 a3 1c or %l2, 0x31c, %l2 ! 201fb1c <_POSIX_signals_Pending> if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d628: c6 04 80 00 ld [ %l2 ], %g3 200d62c: c2 04 60 d0 ld [ %l1 + 0xd0 ], %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 & 200d630: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d634: 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 & 200d638: 80 a8 40 02 andncc %g1, %g2, %g0 200d63c: 02 80 00 26 be 200d6d4 <_POSIX_signals_Post_switch_extension+0xd4> 200d640: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200d644: 7f ff d2 9c call 20020b4 200d648: a0 10 20 1b mov 0x1b, %l0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 200d64c: 92 10 00 10 mov %l0, %o1 200d650: 94 10 20 00 clr %o2 200d654: 40 00 0d b6 call 2010d2c <_POSIX_signals_Check_signal> 200d658: 90 10 00 11 mov %l1, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d65c: 92 10 00 10 mov %l0, %o1 200d660: 90 10 00 11 mov %l1, %o0 200d664: 40 00 0d b2 call 2010d2c <_POSIX_signals_Check_signal> 200d668: 94 10 20 01 mov 1, %o2 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200d66c: a0 04 20 01 inc %l0 200d670: 80 a4 20 20 cmp %l0, 0x20 200d674: 12 bf ff f7 bne 200d650 <_POSIX_signals_Post_switch_extension+0x50> 200d678: 92 10 00 10 mov %l0, %o1 200d67c: a0 10 20 01 mov 1, %l0 _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 ); 200d680: 92 10 00 10 mov %l0, %o1 200d684: 94 10 20 00 clr %o2 200d688: 40 00 0d a9 call 2010d2c <_POSIX_signals_Check_signal> 200d68c: 90 10 00 11 mov %l1, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200d690: 92 10 00 10 mov %l0, %o1 200d694: 90 10 00 11 mov %l1, %o0 200d698: 40 00 0d a5 call 2010d2c <_POSIX_signals_Check_signal> 200d69c: 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++ ) { 200d6a0: a0 04 20 01 inc %l0 200d6a4: 80 a4 20 1b cmp %l0, 0x1b 200d6a8: 12 bf ff f7 bne 200d684 <_POSIX_signals_Post_switch_extension+0x84> 200d6ac: 92 10 00 10 mov %l0, %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 ); 200d6b0: 7f ff d2 7d call 20020a4 200d6b4: 01 00 00 00 nop if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200d6b8: c6 04 80 00 ld [ %l2 ], %g3 200d6bc: c2 04 60 d0 ld [ %l1 + 0xd0 ], %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 & 200d6c0: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200d6c4: 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 & 200d6c8: 80 a8 40 02 andncc %g1, %g2, %g0 200d6cc: 12 bf ff de bne 200d644 <_POSIX_signals_Post_switch_extension+0x44><== NEVER TAKEN 200d6d0: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200d6d4: 7f ff d2 78 call 20020b4 200d6d8: 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; 200d6dc: c2 04 e0 60 ld [ %l3 + 0x60 ], %g1 200d6e0: e8 20 60 34 st %l4, [ %g1 + 0x34 ] 200d6e4: 81 c7 e0 08 ret 200d6e8: 81 e8 00 00 restore =============================================================================== 02010f58 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2010f58: 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 ) ) { 2010f5c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2010f60: 05 04 00 20 sethi %hi(0x10008000), %g2 2010f64: 88 06 7f ff add %i1, -1, %g4 2010f68: 9a 08 40 02 and %g1, %g2, %o5 2010f6c: 86 10 20 01 mov 1, %g3 2010f70: 80 a3 40 02 cmp %o5, %g2 2010f74: 89 28 c0 04 sll %g3, %g4, %g4 2010f78: 02 80 00 28 be 2011018 <_POSIX_signals_Unblock_thread+0xc0> 2010f7c: c4 06 21 6c ld [ %i0 + 0x16c ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 2010f80: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 2010f84: 80 a9 00 02 andncc %g4, %g2, %g0 2010f88: 02 80 00 22 be 2011010 <_POSIX_signals_Unblock_thread+0xb8> 2010f8c: 05 04 00 00 sethi %hi(0x10000000), %g2 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 2010f90: 80 88 40 02 btst %g1, %g2 2010f94: 02 80 00 14 be 2010fe4 <_POSIX_signals_Unblock_thread+0x8c> 2010f98: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 2010f9c: 84 10 20 04 mov 4, %g2 2010fa0: c4 26 20 34 st %g2, [ %i0 + 0x34 ] /* * 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) ) 2010fa4: 05 00 00 ef sethi %hi(0x3bc00), %g2 2010fa8: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 2010fac: 80 88 40 02 btst %g1, %g2 2010fb0: 12 80 00 32 bne 2011078 <_POSIX_signals_Unblock_thread+0x120> 2010fb4: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ){ 2010fb8: 02 80 00 16 be 2011010 <_POSIX_signals_Unblock_thread+0xb8><== NEVER TAKEN 2010fbc: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 2010fc0: 7f ff e4 8f call 200a1fc <_Watchdog_Remove> 2010fc4: 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 ); 2010fc8: 90 10 00 18 mov %i0, %o0 2010fcc: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2010fd0: b0 10 20 00 clr %i0 2010fd4: 7f ff de 59 call 2008938 <_Thread_Clear_state> 2010fd8: 92 12 63 f8 or %o1, 0x3f8, %o1 2010fdc: 81 c7 e0 08 ret 2010fe0: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 2010fe4: 80 a0 60 00 cmp %g1, 0 2010fe8: 12 80 00 0a bne 2011010 <_POSIX_signals_Unblock_thread+0xb8><== NEVER TAKEN 2010fec: 03 00 80 7d sethi %hi(0x201f400), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2010ff0: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 201f43c <_ISR_Nest_level> 2010ff4: 80 a0 60 00 cmp %g1, 0 2010ff8: 02 80 00 06 be 2011010 <_POSIX_signals_Unblock_thread+0xb8> 2010ffc: 03 00 80 7d sethi %hi(0x201f400), %g1 2011000: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> 2011004: 80 a6 00 01 cmp %i0, %g1 2011008: 02 80 00 26 be 20110a0 <_POSIX_signals_Unblock_thread+0x148><== ALWAYS TAKEN 201100c: 03 00 80 7d sethi %hi(0x201f400), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 2011010: 81 c7 e0 08 ret 2011014: 91 e8 20 00 restore %g0, 0, %o0 * 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) ) { 2011018: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201101c: 80 89 00 01 btst %g4, %g1 2011020: 22 80 00 12 be,a 2011068 <_POSIX_signals_Unblock_thread+0x110> 2011024: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 the_thread->Wait.return_code = EINTR; 2011028: 82 10 20 04 mov 4, %g1 201102c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 2011030: 80 a6 a0 00 cmp %i2, 0 2011034: 02 80 00 16 be 201108c <_POSIX_signals_Unblock_thread+0x134> 2011038: 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; 201103c: c4 06 80 00 ld [ %i2 ], %g2 2011040: c4 20 40 00 st %g2, [ %g1 ] 2011044: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2011048: c4 20 60 04 st %g2, [ %g1 + 4 ] 201104c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 2011050: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 2011054: 90 10 00 18 mov %i0, %o0 2011058: 7f ff e1 6f call 2009614 <_Thread_queue_Extract_with_proxy> 201105c: b0 10 20 01 mov 1, %i0 return true; 2011060: 81 c7 e0 08 ret 2011064: 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) ) { 2011068: 80 a9 00 01 andncc %g4, %g1, %g0 201106c: 12 bf ff f0 bne 201102c <_POSIX_signals_Unblock_thread+0xd4> 2011070: 82 10 20 04 mov 4, %g1 2011074: 30 bf ff e7 b,a 2011010 <_POSIX_signals_Unblock_thread+0xb8> /* * 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 ); 2011078: 90 10 00 18 mov %i0, %o0 201107c: 7f ff e1 66 call 2009614 <_Thread_queue_Extract_with_proxy> 2011080: b0 10 20 00 clr %i0 2011084: 81 c7 e0 08 ret 2011088: 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; 201108c: 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; 2011090: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 2011094: c0 20 60 08 clr [ %g1 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 2011098: 10 bf ff ef b 2011054 <_POSIX_signals_Unblock_thread+0xfc> 201109c: c4 20 60 04 st %g2, [ %g1 + 4 ] _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 20110a0: c6 28 60 f8 stb %g3, [ %g1 + 0xf8 ] 20110a4: 81 c7 e0 08 ret 20110a8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020012c8 <_Partition_Manager_initialization>: #include #include void _Partition_Manager_initialization(void) { } 20012c8: 81 c3 e0 08 retl =============================================================================== 02006ca8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 2006ca8: 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; 2006cac: 03 00 80 7a sethi %hi(0x201e800), %g1 2006cb0: 82 10 60 30 or %g1, 0x30, %g1 ! 201e830 2006cb4: e0 00 60 2c ld [ %g1 + 0x2c ], %l0 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 2006cb8: 80 a4 20 00 cmp %l0, 0 2006cbc: 02 80 00 1a be 2006d24 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 2006cc0: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2006cc4: 80 a4 a0 00 cmp %l2, 0 2006cc8: 02 80 00 17 be 2006d24 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN 2006ccc: a2 10 20 00 clr %l1 2006cd0: a6 07 bf fc add %fp, -4, %l3 return_value = rtems_task_create( 2006cd4: d0 04 00 00 ld [ %l0 ], %o0 2006cd8: d2 04 20 08 ld [ %l0 + 8 ], %o1 2006cdc: d4 04 20 04 ld [ %l0 + 4 ], %o2 2006ce0: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 2006ce4: d8 04 20 0c ld [ %l0 + 0xc ], %o4 2006ce8: 7f ff ff 6e call 2006aa0 2006cec: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 2006cf0: 80 a2 20 00 cmp %o0, 0 2006cf4: 12 80 00 0f bne 2006d30 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> 2006cf8: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 2006cfc: d0 07 bf fc ld [ %fp + -4 ], %o0 2006d00: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 2006d04: 40 00 00 0f call 2006d40 2006d08: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 2006d0c: 80 a2 20 00 cmp %o0, 0 2006d10: 12 80 00 07 bne 2006d2c <_RTEMS_tasks_Initialize_user_tasks_body+0x84> 2006d14: a2 04 60 01 inc %l1 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2006d18: 80 a4 80 11 cmp %l2, %l1 2006d1c: 18 bf ff ee bgu 2006cd4 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN 2006d20: a0 04 20 1c add %l0, 0x1c, %l0 2006d24: 81 c7 e0 08 ret 2006d28: 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 ); 2006d2c: 94 10 00 08 mov %o0, %o2 2006d30: 92 10 20 01 mov 1, %o1 2006d34: 40 00 03 eb call 2007ce0 <_Internal_error_Occurred> 2006d38: 90 10 20 01 mov 1, %o0 =============================================================================== 0200de24 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200de24: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200de28: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 if ( !api ) 200de2c: 80 a4 20 00 cmp %l0, 0 200de30: 02 80 00 1f be 200deac <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN 200de34: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200de38: 7f ff d0 9b call 20020a4 200de3c: 01 00 00 00 nop signal_set = asr->signals_posted; 200de40: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 200de44: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200de48: 7f ff d0 9b call 20020b4 200de4c: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200de50: 80 a4 60 00 cmp %l1, 0 200de54: 32 80 00 04 bne,a 200de64 <_RTEMS_tasks_Post_switch_extension+0x40> 200de58: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200de5c: 81 c7 e0 08 ret 200de60: 81 e8 00 00 restore return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200de64: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200de68: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200de6c: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200de70: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200de74: 94 10 00 12 mov %l2, %o2 200de78: 27 00 00 3f sethi %hi(0xfc00), %l3 200de7c: 40 00 0d 18 call 20112dc 200de80: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200de84: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200de88: 9f c0 40 00 call %g1 200de8c: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 200de90: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200de94: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200de98: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200de9c: 92 14 e3 ff or %l3, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200dea0: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200dea4: 40 00 0d 0e call 20112dc 200dea8: 94 10 00 12 mov %l2, %o2 200deac: 81 c7 e0 08 ret 200deb0: 81 e8 00 00 restore =============================================================================== 0200dd48 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200dd48: c2 02 21 78 ld [ %o0 + 0x178 ], %g1 while (tvp) { 200dd4c: 80 a0 60 00 cmp %g1, 0 200dd50: 22 80 00 0b be,a 200dd7c <_RTEMS_tasks_Switch_extension+0x34> 200dd54: c2 02 61 78 ld [ %o1 + 0x178 ], %g1 tvp->tval = *tvp->ptr; 200dd58: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200dd5c: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200dd60: c8 00 80 00 ld [ %g2 ], %g4 200dd64: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 200dd68: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200dd6c: 80 a0 60 00 cmp %g1, 0 200dd70: 12 bf ff fa bne 200dd58 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN 200dd74: c6 20 80 00 st %g3, [ %g2 ] tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 200dd78: c2 02 61 78 ld [ %o1 + 0x178 ], %g1 while (tvp) { 200dd7c: 80 a0 60 00 cmp %g1, 0 200dd80: 02 80 00 0a be 200dda8 <_RTEMS_tasks_Switch_extension+0x60> 200dd84: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200dd88: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200dd8c: 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; 200dd90: c8 00 80 00 ld [ %g2 ], %g4 200dd94: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 200dd98: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200dd9c: 80 a0 60 00 cmp %g1, 0 200dda0: 12 bf ff fa bne 200dd88 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN 200dda4: c6 20 80 00 st %g3, [ %g2 ] 200dda8: 81 c3 e0 08 retl =============================================================================== 020012e8 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { } 20012e8: 81 c3 e0 08 retl =============================================================================== 0204706c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 204706c: 9d e3 bf 98 save %sp, -104, %sp 2047070: 11 00 81 d6 sethi %hi(0x2075800), %o0 2047074: 92 10 00 18 mov %i0, %o1 2047078: 90 12 21 68 or %o0, 0x168, %o0 204707c: 7f ff 21 36 call 200f554 <_Objects_Get> 2047080: 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 ) { 2047084: c2 07 bf fc ld [ %fp + -4 ], %g1 2047088: 80 a0 60 00 cmp %g1, 0 204708c: 12 80 00 16 bne 20470e4 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN 2047090: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2047094: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2047098: 03 00 00 10 sethi %hi(0x4000), %g1 204709c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 20470a0: 80 88 80 01 btst %g2, %g1 20470a4: 22 80 00 08 be,a 20470c4 <_Rate_monotonic_Timeout+0x58> 20470a8: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 20470ac: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 20470b0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20470b4: 80 a0 80 01 cmp %g2, %g1 20470b8: 02 80 00 19 be 204711c <_Rate_monotonic_Timeout+0xb0> 20470bc: 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 ) { 20470c0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 20470c4: 80 a0 60 01 cmp %g1, 1 20470c8: 02 80 00 09 be 20470ec <_Rate_monotonic_Timeout+0x80> 20470cc: 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; 20470d0: c2 24 20 38 st %g1, [ %l0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20470d4: 03 00 81 d3 sethi %hi(0x2074c00), %g1 20470d8: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 2074e40 <_Thread_Dispatch_disable_level> 20470dc: 84 00 bf ff add %g2, -1, %g2 20470e0: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 20470e4: 81 c7 e0 08 ret 20470e8: 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; 20470ec: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 20470f0: 90 10 00 10 mov %l0, %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; 20470f4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 20470f8: 7f ff fe e5 call 2046c8c <_Rate_monotonic_Initiate_statistics> 20470fc: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2047100: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2047104: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2047108: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 204710c: 11 00 81 d3 sethi %hi(0x2074c00), %o0 2047110: 7f ff 28 7e call 2011308 <_Watchdog_Insert> 2047114: 90 12 23 20 or %o0, 0x320, %o0 ! 2074f20 <_Watchdog_Ticks_chain> 2047118: 30 bf ff ef b,a 20470d4 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 204711c: 7f ff 22 9d call 200fb90 <_Thread_Clear_state> 2047120: 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 ); 2047124: 10 bf ff f5 b 20470f8 <_Rate_monotonic_Timeout+0x8c> 2047128: 90 10 00 10 mov %l0, %o0 =============================================================================== 020012d0 <_Region_Manager_initialization>: #include #include void _Region_Manager_initialization(void) { } 20012d0: 81 c3 e0 08 retl =============================================================================== 02007958 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007958: 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(); 200795c: 03 00 80 94 sethi %hi(0x2025000), %g1 if ((!the_tod) || 2007960: 80 a6 20 00 cmp %i0, 0 2007964: 02 80 00 2e be 2007a1c <_TOD_Validate+0xc4> <== NEVER TAKEN 2007968: d2 00 60 74 ld [ %g1 + 0x74 ], %o1 200796c: 11 00 03 d0 sethi %hi(0xf4000), %o0 2007970: 40 00 62 b2 call 2020438 <.udiv> 2007974: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 (the_tod->ticks >= ticks_per_second) || 2007978: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200797c: 80 a2 00 01 cmp %o0, %g1 2007980: 08 80 00 27 bleu 2007a1c <_TOD_Validate+0xc4> 2007984: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2007988: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200798c: 80 a0 60 3b cmp %g1, 0x3b 2007990: 18 80 00 23 bgu 2007a1c <_TOD_Validate+0xc4> 2007994: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2007998: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200799c: 80 a0 60 3b cmp %g1, 0x3b 20079a0: 18 80 00 1f bgu 2007a1c <_TOD_Validate+0xc4> 20079a4: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 20079a8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20079ac: 80 a0 60 17 cmp %g1, 0x17 20079b0: 18 80 00 1b bgu 2007a1c <_TOD_Validate+0xc4> 20079b4: 01 00 00 00 nop (the_tod->month == 0) || 20079b8: c2 06 20 04 ld [ %i0 + 4 ], %g1 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) || 20079bc: 80 a0 60 00 cmp %g1, 0 20079c0: 02 80 00 17 be 2007a1c <_TOD_Validate+0xc4> <== NEVER TAKEN 20079c4: 80 a0 60 0c cmp %g1, 0xc 20079c8: 18 80 00 15 bgu 2007a1c <_TOD_Validate+0xc4> 20079cc: 01 00 00 00 nop (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) || 20079d0: c4 06 00 00 ld [ %i0 ], %g2 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) || 20079d4: 80 a0 a7 c3 cmp %g2, 0x7c3 20079d8: 08 80 00 11 bleu 2007a1c <_TOD_Validate+0xc4> 20079dc: 01 00 00 00 nop (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) || (the_tod->day == 0) ) 20079e0: c6 06 20 08 ld [ %i0 + 8 ], %g3 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) || 20079e4: 80 a0 e0 00 cmp %g3, 0 20079e8: 02 80 00 0d be 2007a1c <_TOD_Validate+0xc4> <== NEVER TAKEN 20079ec: 80 88 a0 03 btst 3, %g2 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 20079f0: 32 80 00 0d bne,a 2007a24 <_TOD_Validate+0xcc> 20079f4: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 20079f8: 82 00 60 0d add %g1, 0xd, %g1 20079fc: 05 00 80 8d sethi %hi(0x2023400), %g2 2007a00: 83 28 60 02 sll %g1, 2, %g1 2007a04: 84 10 a1 b4 or %g2, 0x1b4, %g2 2007a08: 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( 2007a0c: 80 a0 40 03 cmp %g1, %g3 2007a10: b0 60 3f ff subx %g0, -1, %i0 2007a14: 81 c7 e0 08 ret 2007a18: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 2007a1c: 81 c7 e0 08 ret 2007a20: 91 e8 20 00 restore %g0, 0, %o0 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 ]; 2007a24: 05 00 80 8d sethi %hi(0x2023400), %g2 2007a28: 84 10 a1 b4 or %g2, 0x1b4, %g2 ! 20235b4 <_TOD_Days_per_month> 2007a2c: 10 bf ff f8 b 2007a0c <_TOD_Validate+0xb4> 2007a30: c2 00 80 01 ld [ %g2 + %g1 ], %g1 =============================================================================== 02008728 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2008728: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 200872c: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * 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 ); 2008730: 40 00 04 90 call 2009970 <_Thread_Set_transient> 2008734: 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 ) 2008738: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200873c: 80 a0 40 19 cmp %g1, %i1 2008740: 02 80 00 05 be 2008754 <_Thread_Change_priority+0x2c> 2008744: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 2008748: 92 10 00 19 mov %i1, %o1 200874c: 40 00 04 0d call 2009780 <_Thread_Set_priority> 2008750: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2008754: 7f ff e6 54 call 20020a4 2008758: 01 00 00 00 nop 200875c: b0 10 00 08 mov %o0, %i0 /* * 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; 2008760: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2008764: 80 a4 a0 04 cmp %l2, 4 2008768: 02 80 00 18 be 20087c8 <_Thread_Change_priority+0xa0> 200876c: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2008770: 02 80 00 0b be 200879c <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 2008774: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 2008778: 7f ff e6 4f call 20020b4 <== NOT EXECUTED 200877c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2008780: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 2008784: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 2008788: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 200878c: 32 80 00 0d bne,a 20087c0 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2008790: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 2008794: 81 c7 e0 08 ret 2008798: 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 ); 200879c: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 20087a0: 7f ff e6 45 call 20020b4 20087a4: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20087a8: 03 00 00 ef sethi %hi(0x3bc00), %g1 20087ac: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20087b0: 80 8c 80 01 btst %l2, %g1 20087b4: 02 bf ff f8 be 2008794 <_Thread_Change_priority+0x6c> 20087b8: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 20087bc: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 20087c0: 40 00 03 c0 call 20096c0 <_Thread_queue_Requeue> 20087c4: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 20087c8: 12 80 00 14 bne 2008818 <_Thread_Change_priority+0xf0> <== NEVER TAKEN 20087cc: 23 00 80 7d sethi %hi(0x201f400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20087d0: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 20087d4: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 20087d8: c6 10 40 00 lduh [ %g1 ], %g3 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20087dc: c0 24 20 10 clr [ %l0 + 0x10 ] 20087e0: 84 10 c0 02 or %g3, %g2, %g2 20087e4: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 20087e8: c4 14 60 54 lduh [ %l1 + 0x54 ], %g2 20087ec: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 20087f0: 80 8e a0 ff btst 0xff, %i2 20087f4: 82 10 80 01 or %g2, %g1, %g1 20087f8: c2 34 60 54 sth %g1, [ %l1 + 0x54 ] 20087fc: 02 80 00 48 be 200891c <_Thread_Change_priority+0x1f4> 2008800: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008804: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2008808: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 200880c: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 2008810: e0 20 a0 04 st %l0, [ %g2 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2008814: c4 24 00 00 st %g2, [ %l0 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 2008818: 7f ff e6 27 call 20020b4 200881c: 90 10 00 18 mov %i0, %o0 2008820: 7f ff e6 21 call 20020a4 2008824: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 2008828: c2 14 60 54 lduh [ %l1 + 0x54 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 200882c: 05 00 80 7c sethi %hi(0x201f000), %g2 2008830: 83 28 60 10 sll %g1, 0x10, %g1 2008834: da 00 a2 f4 ld [ %g2 + 0x2f4 ], %o5 2008838: 85 30 60 10 srl %g1, 0x10, %g2 200883c: 80 a0 a0 ff cmp %g2, 0xff 2008840: 08 80 00 27 bleu 20088dc <_Thread_Change_priority+0x1b4> 2008844: 07 00 80 75 sethi %hi(0x201d400), %g3 2008848: 83 30 60 18 srl %g1, 0x18, %g1 200884c: 86 10 e2 28 or %g3, 0x228, %g3 2008850: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2008854: 09 00 80 7d sethi %hi(0x201f400), %g4 2008858: 85 28 a0 10 sll %g2, 0x10, %g2 200885c: 88 11 20 d0 or %g4, 0xd0, %g4 2008860: 83 30 a0 0f srl %g2, 0xf, %g1 2008864: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2008868: 83 28 60 10 sll %g1, 0x10, %g1 200886c: 89 30 60 10 srl %g1, 0x10, %g4 2008870: 80 a1 20 ff cmp %g4, 0xff 2008874: 18 80 00 28 bgu 2008914 <_Thread_Change_priority+0x1ec> 2008878: 83 30 60 18 srl %g1, 0x18, %g1 200887c: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2008880: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2008884: 85 30 a0 0c srl %g2, 0xc, %g2 2008888: 83 28 60 10 sll %g1, 0x10, %g1 200888c: 83 30 60 10 srl %g1, 0x10, %g1 2008890: 82 00 40 02 add %g1, %g2, %g1 2008894: 85 28 60 04 sll %g1, 4, %g2 2008898: 83 28 60 02 sll %g1, 2, %g1 200889c: 82 20 80 01 sub %g2, %g1, %g1 20088a0: c2 03 40 01 ld [ %o5 + %g1 ], %g1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 20088a4: 05 00 80 7d sethi %hi(0x201f400), %g2 20088a8: c4 00 a0 60 ld [ %g2 + 0x60 ], %g2 ! 201f460 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 20088ac: 07 00 80 7d sethi %hi(0x201f400), %g3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 20088b0: 80 a0 40 02 cmp %g1, %g2 20088b4: 02 80 00 08 be 20088d4 <_Thread_Change_priority+0x1ac> 20088b8: c2 20 e0 30 st %g1, [ %g3 + 0x30 ] _Thread_Executing->is_preemptible ) 20088bc: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 20088c0: 80 a0 60 00 cmp %g1, 0 20088c4: 02 80 00 04 be 20088d4 <_Thread_Change_priority+0x1ac> 20088c8: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 20088cc: 03 00 80 7d sethi %hi(0x201f400), %g1 20088d0: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] ! 201f470 <_Context_Switch_necessary> _ISR_Enable( level ); 20088d4: 7f ff e5 f8 call 20020b4 20088d8: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 20088dc: 86 10 e2 28 or %g3, 0x228, %g3 20088e0: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20088e4: 09 00 80 7d sethi %hi(0x201f400), %g4 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 20088e8: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20088ec: 88 11 20 d0 or %g4, 0xd0, %g4 20088f0: 85 28 a0 10 sll %g2, 0x10, %g2 20088f4: 83 30 a0 0f srl %g2, 0xf, %g1 20088f8: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 20088fc: 83 28 60 10 sll %g1, 0x10, %g1 2008900: 89 30 60 10 srl %g1, 0x10, %g4 2008904: 80 a1 20 ff cmp %g4, 0xff 2008908: 28 bf ff de bleu,a 2008880 <_Thread_Change_priority+0x158> 200890c: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2008910: 83 30 60 18 srl %g1, 0x18, %g1 2008914: 10 bf ff dc b 2008884 <_Thread_Change_priority+0x15c> 2008918: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200891c: 84 00 60 04 add %g1, 4, %g2 2008920: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2008924: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2008928: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200892c: c4 24 20 04 st %g2, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2008930: 10 bf ff ba b 2008818 <_Thread_Change_priority+0xf0> 2008934: e0 20 80 00 st %l0, [ %g2 ] =============================================================================== 02008938 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 2008938: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200893c: 7f ff e5 da call 20020a4 2008940: a0 10 00 18 mov %i0, %l0 2008944: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 2008948: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 200894c: 80 8e 40 01 btst %i1, %g1 2008950: 02 80 00 06 be 2008968 <_Thread_Clear_state+0x30> 2008954: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 2008958: b2 28 40 19 andn %g1, %i1, %i1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 200895c: 80 a6 60 00 cmp %i1, 0 2008960: 02 80 00 04 be 2008970 <_Thread_Clear_state+0x38> 2008964: f2 24 20 10 st %i1, [ %l0 + 0x10 ] the_thread->current_priority == 0 ) _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 2008968: 7f ff e5 d3 call 20020b4 200896c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2008970: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 2008974: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 2008978: c8 10 80 00 lduh [ %g2 ], %g4 200897c: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2008980: 86 11 00 03 or %g4, %g3, %g3 2008984: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008988: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200898c: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 2008990: c4 24 00 00 st %g2, [ %l0 ] 2008994: 07 00 80 7d sethi %hi(0x201f400), %g3 old_last_node = the_chain->last; 2008998: c4 00 60 08 ld [ %g1 + 8 ], %g2 200899c: da 10 e0 54 lduh [ %g3 + 0x54 ], %o5 the_chain->last = the_node; 20089a0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 20089a4: c4 24 20 04 st %g2, [ %l0 + 4 ] 20089a8: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 20089ac: e0 20 80 00 st %l0, [ %g2 ] 20089b0: c2 30 e0 54 sth %g1, [ %g3 + 0x54 ] _ISR_Flash( level ); 20089b4: 7f ff e5 c0 call 20020b4 20089b8: 01 00 00 00 nop 20089bc: 7f ff e5 ba call 20020a4 20089c0: 01 00 00 00 nop * 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) { 20089c4: 03 00 80 7d sethi %hi(0x201f400), %g1 20089c8: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 ! 201f430 <_Thread_Heir> 20089cc: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 20089d0: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 20089d4: 80 a0 80 03 cmp %g2, %g3 20089d8: 1a bf ff e4 bcc 2008968 <_Thread_Clear_state+0x30> 20089dc: 07 00 80 7d sethi %hi(0x201f400), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 20089e0: c6 00 e0 60 ld [ %g3 + 0x60 ], %g3 ! 201f460 <_Thread_Executing> * 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 20089e4: e0 20 60 30 st %l0, [ %g1 + 0x30 ] if ( _Thread_Executing->is_preemptible || 20089e8: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 20089ec: 80 a0 60 00 cmp %g1, 0 20089f0: 32 80 00 05 bne,a 2008a04 <_Thread_Clear_state+0xcc> 20089f4: 84 10 20 01 mov 1, %g2 20089f8: 80 a0 a0 00 cmp %g2, 0 20089fc: 12 bf ff db bne 2008968 <_Thread_Clear_state+0x30> <== ALWAYS TAKEN 2008a00: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 2008a04: 03 00 80 7d sethi %hi(0x201f400), %g1 2008a08: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] ! 201f470 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 2008a0c: 7f ff e5 aa call 20020b4 2008a10: 81 e8 00 00 restore =============================================================================== 02008bc0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008bc0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008bc4: 90 10 00 18 mov %i0, %o0 2008bc8: 40 00 00 84 call 2008dd8 <_Thread_Get> 2008bcc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008bd0: c2 07 bf fc ld [ %fp + -4 ], %g1 2008bd4: 80 a0 60 00 cmp %g1, 0 2008bd8: 12 80 00 08 bne 2008bf8 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 2008bdc: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008be0: 7f ff ff 56 call 2008938 <_Thread_Clear_state> 2008be4: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 2008be8: 03 00 80 7c sethi %hi(0x201f000), %g1 2008bec: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 201f3a0 <_Thread_Dispatch_disable_level> 2008bf0: 84 00 bf ff add %g2, -1, %g2 2008bf4: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] 2008bf8: 81 c7 e0 08 ret 2008bfc: 81 e8 00 00 restore =============================================================================== 02008c00 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008c00: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 2008c04: 2b 00 80 7d sethi %hi(0x201f400), %l5 _ISR_Disable( level ); 2008c08: 7f ff e5 27 call 20020a4 2008c0c: e0 05 60 60 ld [ %l5 + 0x60 ], %l0 ! 201f460 <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 2008c10: 2d 00 80 7d sethi %hi(0x201f400), %l6 2008c14: c2 0d a0 70 ldub [ %l6 + 0x70 ], %g1 ! 201f470 <_Context_Switch_necessary> 2008c18: 80 a0 60 00 cmp %g1, 0 2008c1c: 02 80 00 50 be 2008d5c <_Thread_Dispatch+0x15c> 2008c20: 33 00 80 7d sethi %hi(0x201f400), %i1 2008c24: 25 00 80 7d sethi %hi(0x201f400), %l2 2008c28: 35 00 80 7d sethi %hi(0x201f400), %i2 2008c2c: a4 14 a0 68 or %l2, 0x68, %l2 #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; 2008c30: 31 00 80 7c sethi %hi(0x201f000), %i0 #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 ); 2008c34: 2f 00 80 7d sethi %hi(0x201f400), %l7 2008c38: 03 00 80 7c sethi %hi(0x201f000), %g1 2008c3c: ac 15 a0 70 or %l6, 0x70, %l6 2008c40: aa 15 60 60 or %l5, 0x60, %l5 2008c44: b2 16 60 30 or %i1, 0x30, %i1 2008c48: b4 16 a0 2c or %i2, 0x2c, %i2 2008c4c: b0 16 22 f8 or %i0, 0x2f8, %i0 2008c50: ae 15 e0 28 or %l7, 0x28, %l7 2008c54: b6 10 63 a0 or %g1, 0x3a0, %i3 2008c58: a8 07 bf f8 add %fp, -8, %l4 2008c5c: a6 07 bf f0 add %fp, -16, %l3 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2008c60: b8 10 20 01 mov 1, %i4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008c64: 10 80 00 34 b 2008d34 <_Thread_Dispatch+0x134> 2008c68: ba 10 00 12 mov %l2, %i5 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; _ISR_Enable( level ); 2008c6c: 7f ff e5 12 call 20020b4 2008c70: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008c74: 40 00 15 9d call 200e2e8 <_TOD_Get_uptime> 2008c78: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 2008c7c: 90 10 00 1d mov %i5, %o0 2008c80: 92 10 00 14 mov %l4, %o1 2008c84: 40 00 04 21 call 2009d08 <_Timespec_Subtract> 2008c88: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008c8c: 92 10 00 13 mov %l3, %o1 2008c90: 40 00 04 05 call 2009ca4 <_Timespec_Add_to> 2008c94: 90 04 20 84 add %l0, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 2008c98: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c9c: c2 06 80 00 ld [ %i2 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008ca0: c4 24 80 00 st %g2, [ %l2 ] 2008ca4: c4 07 bf fc ld [ %fp + -4 ], %g2 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 2008ca8: 90 10 00 10 mov %l0, %o0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008cac: c4 24 a0 04 st %g2, [ %l2 + 4 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008cb0: 80 a0 60 00 cmp %g1, 0 2008cb4: 02 80 00 06 be 2008ccc <_Thread_Dispatch+0xcc> <== NEVER TAKEN 2008cb8: 92 10 00 11 mov %l1, %o1 executing->libc_reent = *_Thread_libc_reent; 2008cbc: c4 00 40 00 ld [ %g1 ], %g2 2008cc0: c4 24 21 64 st %g2, [ %l0 + 0x164 ] *_Thread_libc_reent = heir->libc_reent; 2008cc4: c4 04 61 64 ld [ %l1 + 0x164 ], %g2 2008cc8: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008ccc: 40 00 04 d1 call 200a010 <_User_extensions_Thread_switch> 2008cd0: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2008cd4: 92 04 60 d8 add %l1, 0xd8, %o1 2008cd8: 40 00 06 1e call 200a550 <_CPU_Context_switch> 2008cdc: 90 04 20 d8 add %l0, 0xd8, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2008ce0: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 2008ce4: 80 a0 60 00 cmp %g1, 0 2008ce8: 02 80 00 0d be 2008d1c <_Thread_Dispatch+0x11c> 2008cec: 01 00 00 00 nop 2008cf0: d0 05 c0 00 ld [ %l7 ], %o0 2008cf4: 80 a4 00 08 cmp %l0, %o0 2008cf8: 02 80 00 09 be 2008d1c <_Thread_Dispatch+0x11c> 2008cfc: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008d00: 02 80 00 04 be 2008d10 <_Thread_Dispatch+0x110> 2008d04: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008d08: 40 00 05 d8 call 200a468 <_CPU_Context_save_fp> 2008d0c: 90 02 21 60 add %o0, 0x160, %o0 _Context_Restore_fp( &executing->fp_context ); 2008d10: 40 00 05 f3 call 200a4dc <_CPU_Context_restore_fp> 2008d14: 90 04 21 60 add %l0, 0x160, %o0 _Thread_Allocated_fp = executing; 2008d18: e0 25 c0 00 st %l0, [ %l7 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2008d1c: 7f ff e4 e2 call 20020a4 2008d20: e0 05 40 00 ld [ %l5 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2008d24: c2 0d 80 00 ldub [ %l6 ], %g1 2008d28: 80 a0 60 00 cmp %g1, 0 2008d2c: 02 80 00 0d be 2008d60 <_Thread_Dispatch+0x160> 2008d30: 03 00 80 7c sethi %hi(0x201f000), %g1 heir = _Thread_Heir; 2008d34: e2 06 40 00 ld [ %i1 ], %l1 _Thread_Dispatch_disable_level = 1; 2008d38: f8 26 c0 00 st %i4, [ %i3 ] _Thread_Executing = heir; #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 ) 2008d3c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 2008d40: c0 2d 80 00 clrb [ %l6 ] _Thread_Executing = heir; #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 ) 2008d44: 80 a0 60 01 cmp %g1, 1 2008d48: 12 bf ff c9 bne 2008c6c <_Thread_Dispatch+0x6c> 2008d4c: e2 25 40 00 st %l1, [ %l5 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008d50: c2 06 00 00 ld [ %i0 ], %g1 2008d54: 10 bf ff c6 b 2008c6c <_Thread_Dispatch+0x6c> 2008d58: c2 24 60 78 st %g1, [ %l1 + 0x78 ] executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 2008d5c: 03 00 80 7c sethi %hi(0x201f000), %g1 2008d60: c0 20 63 a0 clr [ %g1 + 0x3a0 ] ! 201f3a0 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 2008d64: 7f ff e4 d4 call 20020b4 2008d68: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 2008d6c: 03 00 80 7d sethi %hi(0x201f400), %g1 2008d70: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 201f444 <_Thread_Do_post_task_switch_extension> 2008d74: 80 a0 60 00 cmp %g1, 0 2008d78: 12 80 00 06 bne 2008d90 <_Thread_Dispatch+0x190> 2008d7c: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 2008d80: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 2008d84: 80 a0 60 00 cmp %g1, 0 2008d88: 02 80 00 04 be 2008d98 <_Thread_Dispatch+0x198> 2008d8c: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 2008d90: 7f ff f9 0e call 20071c8 <_API_extensions_Run_postswitch> 2008d94: c0 2c 20 74 clrb [ %l0 + 0x74 ] 2008d98: 81 c7 e0 08 ret 2008d9c: 81 e8 00 00 restore =============================================================================== 02011680 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 2011680: 03 00 80 7d sethi %hi(0x201f400), %g1 2011684: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 2011688: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 201168c: 80 a0 a0 00 cmp %g2, 0 2011690: 12 80 00 0b bne 20116bc <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 2011694: 84 10 20 01 mov 1, %g2 2011698: 05 00 80 7d sethi %hi(0x201f400), %g2 201169c: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2 ! 201f430 <_Thread_Heir> 20116a0: 80 a0 40 02 cmp %g1, %g2 20116a4: 02 80 00 0b be 20116d0 <_Thread_Evaluate_mode+0x50> 20116a8: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 20116ac: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 20116b0: 80 a0 60 00 cmp %g1, 0 20116b4: 02 80 00 07 be 20116d0 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 20116b8: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 20116bc: 03 00 80 7d sethi %hi(0x201f400), %g1 20116c0: 90 10 20 01 mov 1, %o0 20116c4: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] return true; 20116c8: 81 c3 e0 08 retl 20116cc: 01 00 00 00 nop } return false; } 20116d0: 81 c3 e0 08 retl 20116d4: 90 10 20 00 clr %o0 ! 0 =============================================================================== 020116d8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 20116d8: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 20116dc: 03 00 80 7d sethi %hi(0x201f400), %g1 20116e0: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 ! 201f460 <_Thread_Executing> /* * 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(); 20116e4: 3f 00 80 45 sethi %hi(0x2011400), %i7 20116e8: be 17 e2 d8 or %i7, 0x2d8, %i7 ! 20116d8 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 20116ec: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 20116f0: 7f ff c2 71 call 20020b4 20116f4: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 20116f8: 03 00 80 7c sethi %hi(0x201f000), %g1 doneConstructors = 1; 20116fc: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 2011700: e4 08 60 52 ldub [ %g1 + 0x52 ], %l2 doneConstructors = 1; 2011704: c4 28 60 52 stb %g2, [ %g1 + 0x52 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2011708: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 201170c: 80 a0 60 00 cmp %g1, 0 2011710: 02 80 00 0b be 201173c <_Thread_Handler+0x64> 2011714: 23 00 80 7d sethi %hi(0x201f400), %l1 #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 ); 2011718: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 ! 201f428 <_Thread_Allocated_fp> 201171c: 80 a4 00 08 cmp %l0, %o0 2011720: 02 80 00 07 be 201173c <_Thread_Handler+0x64> 2011724: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2011728: 22 80 00 05 be,a 201173c <_Thread_Handler+0x64> 201172c: e0 24 60 28 st %l0, [ %l1 + 0x28 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2011730: 7f ff e3 4e call 200a468 <_CPU_Context_save_fp> 2011734: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 2011738: e0 24 60 28 st %l0, [ %l1 + 0x28 ] /* * 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 ); 201173c: 7f ff e1 b7 call 2009e18 <_User_extensions_Thread_begin> 2011740: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 2011744: 7f ff dd 97 call 2008da0 <_Thread_Enable_dispatch> 2011748: a5 2c a0 18 sll %l2, 0x18, %l2 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 201174c: 80 a4 a0 00 cmp %l2, 0 2011750: 02 80 00 0f be 201178c <_Thread_Handler+0xb4> 2011754: 01 00 00 00 nop INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 2011758: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 201175c: 80 a0 60 00 cmp %g1, 0 2011760: 22 80 00 12 be,a 20117a8 <_Thread_Handler+0xd0> 2011764: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 2011768: 80 a0 60 01 cmp %g1, 1 201176c: 22 80 00 13 be,a 20117b8 <_Thread_Handler+0xe0> <== ALWAYS TAKEN 2011770: c2 04 20 9c ld [ %l0 + 0x9c ], %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 ); 2011774: 7f ff e1 bd call 2009e68 <_User_extensions_Thread_exitted> 2011778: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 201177c: 90 10 20 00 clr %o0 2011780: 92 10 20 01 mov 1, %o1 2011784: 7f ff d9 57 call 2007ce0 <_Internal_error_Occurred> 2011788: 94 10 20 06 mov 6, %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 (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 201178c: 40 00 33 f7 call 201e768 <_init> 2011790: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 2011794: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 2011798: 80 a0 60 00 cmp %g1, 0 201179c: 12 bf ff f4 bne 201176c <_Thread_Handler+0x94> 20117a0: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 20117a4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 20117a8: 9f c0 40 00 call %g1 20117ac: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 20117b0: 10 bf ff f1 b 2011774 <_Thread_Handler+0x9c> 20117b4: d0 24 20 28 st %o0, [ %l0 + 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)( 20117b8: 9f c0 40 00 call %g1 20117bc: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 20117c0: 10 bf ff ed b 2011774 <_Thread_Handler+0x9c> 20117c4: d0 24 20 28 st %o0, [ %l0 + 0x28 ] =============================================================================== 02008e84 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008e84: 9d e3 bf a0 save %sp, -96, %sp 2008e88: 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; 2008e8c: c0 26 61 68 clr [ %i1 + 0x168 ] 2008e90: c0 26 61 6c clr [ %i1 + 0x16c ] 2008e94: c0 26 61 70 clr [ %i1 + 0x170 ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008e98: c0 26 61 64 clr [ %i1 + 0x164 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008e9c: e0 00 40 00 ld [ %g1 ], %l0 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 2008ea0: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008ea4: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 2008ea8: 02 80 00 82 be 20090b0 <_Thread_Initialize+0x22c> 2008eac: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 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; 2008eb0: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] 2008eb4: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008eb8: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2008ebc: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2008ec0: 80 8f 20 ff btst 0xff, %i4 2008ec4: 82 10 20 00 clr %g1 2008ec8: 12 80 00 56 bne 2009020 <_Thread_Initialize+0x19c> 2008ecc: b4 10 20 00 clr %i2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008ed0: 39 00 80 7d sethi %hi(0x201f400), %i4 2008ed4: c4 07 20 40 ld [ %i4 + 0x40 ], %g2 ! 201f440 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2008ed8: c2 26 60 cc st %g1, [ %i1 + 0xcc ] 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; 2008edc: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008ee0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008ee4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008ee8: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008eec: 80 a0 a0 00 cmp %g2, 0 2008ef0: 12 80 00 5c bne 2009060 <_Thread_Initialize+0x1dc> 2008ef4: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 2008ef8: c0 26 61 74 clr [ %i1 + 0x174 ] 2008efc: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008f00: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008f04: e4 2e 60 ac stb %l2, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008f08: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2008f0c: 80 a4 60 02 cmp %l1, 2 2008f10: 12 80 00 05 bne 2008f24 <_Thread_Initialize+0xa0> 2008f14: e2 26 60 b0 st %l1, [ %i1 + 0xb0 ] 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; 2008f18: 03 00 80 7c sethi %hi(0x201f000), %g1 2008f1c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 201f2f8 <_Thread_Ticks_per_timeslice> 2008f20: c2 26 60 78 st %g1, [ %i1 + 0x78 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f24: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008f28: 92 10 00 1d mov %i5, %o1 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f2c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2008f30: 82 10 20 01 mov 1, %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008f34: 90 10 00 19 mov %i1, %o0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2008f38: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2008f3c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2008f40: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 2008f44: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008f48: 40 00 02 0e call 2009780 <_Thread_Set_priority> 2008f4c: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f50: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 2008f54: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2008f58: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008f5c: e0 26 60 0c st %l0, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f60: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 2008f64: c0 26 60 84 clr [ %i1 + 0x84 ] 2008f68: c0 26 60 88 clr [ %i1 + 0x88 ] * 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 ); 2008f6c: 90 10 00 19 mov %i1, %o0 2008f70: 40 00 03 e5 call 2009f04 <_User_extensions_Thread_create> 2008f74: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008f78: 80 8a 20 ff btst 0xff, %o0 2008f7c: 12 80 00 27 bne 2009018 <_Thread_Initialize+0x194> 2008f80: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 2008f84: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 2008f88: 80 a2 20 00 cmp %o0, 0 2008f8c: 22 80 00 05 be,a 2008fa0 <_Thread_Initialize+0x11c> 2008f90: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->libc_reent ); 2008f94: 40 00 05 12 call 200a3dc <_Workspace_Free> 2008f98: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008f9c: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 2008fa0: 80 a2 20 00 cmp %o0, 0 2008fa4: 22 80 00 05 be,a 2008fb8 <_Thread_Initialize+0x134> 2008fa8: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008fac: 40 00 05 0c call 200a3dc <_Workspace_Free> 2008fb0: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008fb4: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 2008fb8: 80 a2 20 00 cmp %o0, 0 2008fbc: 22 80 00 05 be,a 2008fd0 <_Thread_Initialize+0x14c> 2008fc0: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008fc4: 40 00 05 06 call 200a3dc <_Workspace_Free> 2008fc8: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008fcc: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 2008fd0: 80 a2 20 00 cmp %o0, 0 2008fd4: 02 80 00 05 be 2008fe8 <_Thread_Initialize+0x164> <== ALWAYS TAKEN 2008fd8: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008fdc: 40 00 05 00 call 200a3dc <_Workspace_Free> <== NOT EXECUTED 2008fe0: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 2008fe4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2008fe8: 02 80 00 05 be 2008ffc <_Thread_Initialize+0x178> 2008fec: 80 a6 a0 00 cmp %i2, 0 (void) _Workspace_Free( extensions_area ); 2008ff0: 40 00 04 fb call 200a3dc <_Workspace_Free> 2008ff4: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2008ff8: 80 a6 a0 00 cmp %i2, 0 2008ffc: 02 80 00 05 be 2009010 <_Thread_Initialize+0x18c> 2009000: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2009004: 40 00 04 f6 call 200a3dc <_Workspace_Free> 2009008: 90 10 00 1a mov %i2, %o0 #endif _Thread_Stack_Free( the_thread ); 200900c: 90 10 00 19 mov %i1, %o0 2009010: 40 00 02 97 call 2009a6c <_Thread_Stack_Free> 2009014: b0 10 20 00 clr %i0 return false; } 2009018: 81 c7 e0 08 ret 200901c: 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 ); 2009020: 40 00 04 e6 call 200a3b8 <_Workspace_Allocate> 2009024: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2009028: b6 10 20 00 clr %i3 200902c: b4 92 20 00 orcc %o0, 0, %i2 2009030: 02 bf ff d5 be 2008f84 <_Thread_Initialize+0x100> 2009034: 82 10 00 1a mov %i2, %g1 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2009038: 39 00 80 7d sethi %hi(0x201f400), %i4 200903c: c4 07 20 40 ld [ %i4 + 0x40 ], %g2 ! 201f440 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2009040: c2 26 60 cc st %g1, [ %i1 + 0xcc ] 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; 2009044: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2009048: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200904c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2009050: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2009054: 80 a0 a0 00 cmp %g2, 0 2009058: 02 bf ff a8 be 2008ef8 <_Thread_Initialize+0x74> 200905c: c0 26 60 6c clr [ %i1 + 0x6c ] extensions_area = _Workspace_Allocate( 2009060: 84 00 a0 01 inc %g2 2009064: 40 00 04 d5 call 200a3b8 <_Workspace_Allocate> 2009068: 91 28 a0 02 sll %g2, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200906c: b6 92 20 00 orcc %o0, 0, %i3 2009070: 02 bf ff c5 be 2008f84 <_Thread_Initialize+0x100> 2009074: c8 07 20 40 ld [ %i4 + 0x40 ], %g4 goto failed; } the_thread->extensions = (void **) extensions_area; 2009078: f6 26 61 74 st %i3, [ %i1 + 0x174 ] 200907c: 86 10 00 1b mov %i3, %g3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2009080: 84 10 20 00 clr %g2 2009084: 10 80 00 03 b 2009090 <_Thread_Initialize+0x20c> 2009088: 82 10 20 00 clr %g1 200908c: c6 06 61 74 ld [ %i1 + 0x174 ], %g3 the_thread->extensions[i] = NULL; 2009090: 85 28 a0 02 sll %g2, 2, %g2 2009094: 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++ ) 2009098: 82 00 60 01 inc %g1 200909c: 80 a1 00 01 cmp %g4, %g1 20090a0: 1a bf ff fb bcc 200908c <_Thread_Initialize+0x208> 20090a4: 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; 20090a8: 10 bf ff 97 b 2008f04 <_Thread_Initialize+0x80> 20090ac: 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 ); 20090b0: 90 10 00 19 mov %i1, %o0 20090b4: 40 00 02 53 call 2009a00 <_Thread_Stack_Allocate> 20090b8: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 20090bc: 80 a6 c0 08 cmp %i3, %o0 20090c0: 18 80 00 07 bgu 20090dc <_Thread_Initialize+0x258> 20090c4: 80 a2 20 00 cmp %o0, 0 20090c8: 02 80 00 05 be 20090dc <_Thread_Initialize+0x258> <== NEVER TAKEN 20090cc: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 20090d0: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = true; 20090d4: 10 bf ff 79 b 2008eb8 <_Thread_Initialize+0x34> 20090d8: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] 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 ) 20090dc: 81 c7 e0 08 ret 20090e0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d178 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 200d178: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200d17c: 7f ff d4 1a call 20021e4 200d180: a0 10 00 18 mov %i0, %l0 200d184: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 200d188: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 200d18c: 80 88 60 02 btst 2, %g1 200d190: 02 80 00 05 be 200d1a4 <_Thread_Resume+0x2c> <== NEVER TAKEN 200d194: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 200d198: 80 a0 60 00 cmp %g1, 0 200d19c: 02 80 00 04 be 200d1ac <_Thread_Resume+0x34> 200d1a0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 200d1a4: 7f ff d4 14 call 20021f4 200d1a8: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 200d1ac: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 200d1b0: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 200d1b4: c8 10 80 00 lduh [ %g2 ], %g4 200d1b8: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 200d1bc: 86 11 00 03 or %g4, %g3, %g3 200d1c0: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200d1c4: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200d1c8: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 200d1cc: c4 24 00 00 st %g2, [ %l0 ] 200d1d0: 07 00 80 8c sethi %hi(0x2023000), %g3 old_last_node = the_chain->last; 200d1d4: c4 00 60 08 ld [ %g1 + 8 ], %g2 200d1d8: da 10 e1 94 lduh [ %g3 + 0x194 ], %o5 the_chain->last = the_node; 200d1dc: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200d1e0: c4 24 20 04 st %g2, [ %l0 + 4 ] 200d1e4: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 200d1e8: e0 20 80 00 st %l0, [ %g2 ] 200d1ec: c2 30 e1 94 sth %g1, [ %g3 + 0x194 ] _ISR_Flash( level ); 200d1f0: 7f ff d4 01 call 20021f4 200d1f4: 01 00 00 00 nop 200d1f8: 7f ff d3 fb call 20021e4 200d1fc: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200d200: 03 00 80 8c sethi %hi(0x2023000), %g1 200d204: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 ! 2023170 <_Thread_Heir> 200d208: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 200d20c: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200d210: 80 a0 80 03 cmp %g2, %g3 200d214: 1a bf ff e4 bcc 200d1a4 <_Thread_Resume+0x2c> 200d218: 07 00 80 8c sethi %hi(0x2023000), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200d21c: c6 00 e1 a0 ld [ %g3 + 0x1a0 ], %g3 ! 20231a0 <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 200d220: e0 20 61 70 st %l0, [ %g1 + 0x170 ] if ( _Thread_Executing->is_preemptible || 200d224: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 200d228: 80 a0 60 00 cmp %g1, 0 200d22c: 32 80 00 05 bne,a 200d240 <_Thread_Resume+0xc8> 200d230: 84 10 20 01 mov 1, %g2 200d234: 80 a0 a0 00 cmp %g2, 0 200d238: 12 bf ff db bne 200d1a4 <_Thread_Resume+0x2c> <== ALWAYS TAKEN 200d23c: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 200d240: 03 00 80 8c sethi %hi(0x2023000), %g1 200d244: c4 28 61 b0 stb %g2, [ %g1 + 0x1b0 ] ! 20231b0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200d248: 7f ff d3 eb call 20021f4 200d24c: 81 e8 00 00 restore =============================================================================== 02009a6c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 2009a6c: 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 ) 2009a70: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 2009a74: 80 a0 60 00 cmp %g1, 0 2009a78: 02 80 00 08 be 2009a98 <_Thread_Stack_Free+0x2c> <== NEVER TAKEN 2009a7c: 03 00 80 7a sethi %hi(0x201e800), %g1 * 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 ) 2009a80: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c 2009a84: 80 a0 60 00 cmp %g1, 0 2009a88: 22 80 00 06 be,a 2009aa0 <_Thread_Stack_Free+0x34> 2009a8c: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 2009a90: 9f c0 40 00 call %g1 2009a94: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 2009a98: 81 c7 e0 08 ret 2009a9c: 81 e8 00 00 restore else _Workspace_Free( the_thread->Start.Initial_stack.area ); 2009aa0: 40 00 02 4f call 200a3dc <_Workspace_Free> 2009aa4: 81 e8 00 00 restore =============================================================================== 02009b4c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 2009b4c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 2009b50: 03 00 80 7d sethi %hi(0x201f400), %g1 2009b54: d0 00 60 60 ld [ %g1 + 0x60 ], %o0 ! 201f460 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2009b58: c2 0a 20 75 ldub [ %o0 + 0x75 ], %g1 2009b5c: 80 a0 60 00 cmp %g1, 0 2009b60: 02 80 00 24 be 2009bf0 <_Thread_Tickle_timeslice+0xa4> 2009b64: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2009b68: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2009b6c: 80 a0 60 00 cmp %g1, 0 2009b70: 12 80 00 20 bne 2009bf0 <_Thread_Tickle_timeslice+0xa4> 2009b74: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2009b78: c2 02 20 7c ld [ %o0 + 0x7c ], %g1 2009b7c: 80 a0 60 01 cmp %g1, 1 2009b80: 0a 80 00 07 bcs 2009b9c <_Thread_Tickle_timeslice+0x50> 2009b84: 80 a0 60 02 cmp %g1, 2 2009b88: 28 80 00 10 bleu,a 2009bc8 <_Thread_Tickle_timeslice+0x7c> 2009b8c: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 2009b90: 80 a0 60 03 cmp %g1, 3 2009b94: 22 80 00 04 be,a 2009ba4 <_Thread_Tickle_timeslice+0x58> <== ALWAYS TAKEN 2009b98: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 2009b9c: 81 c7 e0 08 ret 2009ba0: 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 ) 2009ba4: 82 00 7f ff add %g1, -1, %g1 2009ba8: 80 a0 60 00 cmp %g1, 0 2009bac: 12 bf ff fc bne 2009b9c <_Thread_Tickle_timeslice+0x50> 2009bb0: c2 22 20 78 st %g1, [ %o0 + 0x78 ] (*executing->budget_callout)( executing ); 2009bb4: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 2009bb8: 9f c0 40 00 call %g1 2009bbc: 01 00 00 00 nop 2009bc0: 81 c7 e0 08 ret 2009bc4: 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 ) { 2009bc8: 82 00 7f ff add %g1, -1, %g1 2009bcc: 80 a0 60 00 cmp %g1, 0 2009bd0: 14 bf ff f3 bg 2009b9c <_Thread_Tickle_timeslice+0x50> 2009bd4: c2 22 20 78 st %g1, [ %o0 + 0x78 ] _Thread_Reset_timeslice(); 2009bd8: 40 00 13 de call 200eb50 <_Thread_Reset_timeslice> 2009bdc: d0 27 bf fc st %o0, [ %fp + -4 ] executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009be0: 03 00 80 7c sethi %hi(0x201f000), %g1 2009be4: d0 07 bf fc ld [ %fp + -4 ], %o0 2009be8: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 2009bec: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 2009bf0: 81 c7 e0 08 ret 2009bf4: 81 e8 00 00 restore =============================================================================== 02009bf8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 2009bf8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 2009bfc: 03 00 80 7d sethi %hi(0x201f400), %g1 2009c00: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 ! 201f460 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 2009c04: 7f ff e1 28 call 20020a4 2009c08: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 2009c0c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2009c10: c4 04 40 00 ld [ %l1 ], %g2 2009c14: c2 04 60 08 ld [ %l1 + 8 ], %g1 2009c18: 80 a0 80 01 cmp %g2, %g1 2009c1c: 02 80 00 19 be 2009c80 <_Thread_Yield_processor+0x88> 2009c20: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2009c24: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2009c28: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2009c2c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009c30: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009c34: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 2009c38: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 2009c3c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2009c40: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2009c44: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2009c48: 7f ff e1 1b call 20020b4 2009c4c: 01 00 00 00 nop 2009c50: 7f ff e1 15 call 20020a4 2009c54: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2009c58: 03 00 80 7d sethi %hi(0x201f400), %g1 2009c5c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 ! 201f430 <_Thread_Heir> 2009c60: 80 a4 00 02 cmp %l0, %g2 2009c64: 22 80 00 0e be,a 2009c9c <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN 2009c68: c4 04 40 00 ld [ %l1 ], %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 2009c6c: 84 10 20 01 mov 1, %g2 2009c70: 03 00 80 7d sethi %hi(0x201f400), %g1 2009c74: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] ! 201f470 <_Context_Switch_necessary> _ISR_Enable( level ); 2009c78: 7f ff e1 0f call 20020b4 2009c7c: 81 e8 00 00 restore if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 2009c80: 03 00 80 7d sethi %hi(0x201f400), %g1 2009c84: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 201f430 <_Thread_Heir> 2009c88: 80 a4 00 01 cmp %l0, %g1 2009c8c: 32 bf ff f9 bne,a 2009c70 <_Thread_Yield_processor+0x78> <== NEVER TAKEN 2009c90: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 2009c94: 7f ff e1 08 call 20020b4 2009c98: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 2009c9c: 10 bf ff f4 b 2009c6c <_Thread_Yield_processor+0x74> 2009ca0: c4 20 60 30 st %g2, [ %g1 + 0x30 ] =============================================================================== 02009404 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 2009404: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 2009408: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200940c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2009410: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2009414: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2009418: 82 06 60 38 add %i1, 0x38, %g1 200941c: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 2009420: 2d 00 80 7a sethi %hi(0x201e800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 2009424: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2009428: 80 8c 20 20 btst 0x20, %l0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 200942c: ab 28 60 04 sll %g1, 4, %l5 2009430: ac 15 a0 64 or %l6, 0x64, %l6 2009434: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 2009438: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 200943c: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2009440: 12 80 00 24 bne 20094d0 <_Thread_queue_Enqueue_priority+0xcc> 2009444: aa 06 00 15 add %i0, %l5, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2009448: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 200944c: 7f ff e3 16 call 20020a4 2009450: 01 00 00 00 nop 2009454: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 2009458: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 200945c: 80 a0 40 16 cmp %g1, %l6 2009460: 02 80 00 3a be 2009548 <_Thread_queue_Enqueue_priority+0x144> 2009464: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 2009468: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 200946c: 80 a4 00 13 cmp %l0, %l3 2009470: 18 80 00 0b bgu 200949c <_Thread_queue_Enqueue_priority+0x98> 2009474: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2009478: 10 80 00 36 b 2009550 <_Thread_queue_Enqueue_priority+0x14c> 200947c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2009480: 80 a4 40 16 cmp %l1, %l6 2009484: 02 80 00 32 be 200954c <_Thread_queue_Enqueue_priority+0x148> 2009488: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 200948c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 2009490: 80 a4 00 13 cmp %l0, %l3 2009494: 28 80 00 2f bleu,a 2009550 <_Thread_queue_Enqueue_priority+0x14c> 2009498: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 200949c: 7f ff e3 06 call 20020b4 20094a0: 90 10 00 12 mov %l2, %o0 20094a4: 7f ff e3 00 call 20020a4 20094a8: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20094ac: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20094b0: 80 8d 00 01 btst %l4, %g1 20094b4: 32 bf ff f3 bne,a 2009480 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN 20094b8: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 20094bc: 7f ff e2 fe call 20020b4 <== NOT EXECUTED 20094c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 20094c4: 30 bf ff e2 b,a 200944c <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 20094c8: 7f ff e2 fb call 20020b4 20094cc: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 20094d0: 7f ff e2 f5 call 20020a4 20094d4: e6 0d 80 00 ldub [ %l6 ], %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 20094d8: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 20094dc: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 20094e0: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 20094e4: 80 a0 40 15 cmp %g1, %l5 20094e8: 02 80 00 20 be 2009568 <_Thread_queue_Enqueue_priority+0x164> 20094ec: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 20094f0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 20094f4: 80 a4 00 13 cmp %l0, %l3 20094f8: 0a 80 00 0b bcs 2009524 <_Thread_queue_Enqueue_priority+0x120> 20094fc: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2009500: 10 80 00 1b b 200956c <_Thread_queue_Enqueue_priority+0x168> 2009504: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2009508: 80 a4 40 15 cmp %l1, %l5 200950c: 02 80 00 17 be 2009568 <_Thread_queue_Enqueue_priority+0x164> 2009510: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2009514: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 2009518: 80 a4 00 13 cmp %l0, %l3 200951c: 3a 80 00 14 bcc,a 200956c <_Thread_queue_Enqueue_priority+0x168> 2009520: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2009524: 7f ff e2 e4 call 20020b4 2009528: 90 10 00 12 mov %l2, %o0 200952c: 7f ff e2 de call 20020a4 2009530: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2009534: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2009538: 80 8d 00 01 btst %l4, %g1 200953c: 32 bf ff f3 bne,a 2009508 <_Thread_queue_Enqueue_priority+0x104> 2009540: e2 04 60 04 ld [ %l1 + 4 ], %l1 2009544: 30 bf ff e1 b,a 20094c8 <_Thread_queue_Enqueue_priority+0xc4> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2009548: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 200954c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2009550: 80 a0 a0 01 cmp %g2, 1 2009554: 02 80 00 17 be 20095b0 <_Thread_queue_Enqueue_priority+0x1ac> 2009558: 80 a4 00 13 cmp %l0, %l3 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 200955c: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 2009560: 81 c7 e0 08 ret 2009564: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2009568: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 200956c: 80 a0 a0 01 cmp %g2, 1 2009570: 32 bf ff fc bne,a 2009560 <_Thread_queue_Enqueue_priority+0x15c> 2009574: e4 26 80 00 st %l2, [ %i2 ] THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2009578: 80 a4 00 13 cmp %l0, %l3 200957c: 02 80 00 1a be 20095e4 <_Thread_queue_Enqueue_priority+0x1e0> 2009580: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2009584: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2009588: c2 26 60 04 st %g1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 200958c: c4 26 40 00 st %g2, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2009590: f0 26 60 44 st %i0, [ %i1 + 0x44 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 2009594: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 2009598: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 200959c: b0 10 20 01 mov 1, %i0 20095a0: 7f ff e2 c5 call 20020b4 20095a4: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20095a8: 81 c7 e0 08 ret 20095ac: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 20095b0: 02 80 00 0d be 20095e4 <_Thread_queue_Enqueue_priority+0x1e0> 20095b4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 20095b8: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20095bc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 20095c0: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 20095c4: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 20095c8: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 20095cc: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20095d0: b0 10 20 01 mov 1, %i0 20095d4: 7f ff e2 b8 call 20020b4 20095d8: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20095dc: 81 c7 e0 08 ret 20095e0: 81 e8 00 00 restore 20095e4: a2 04 60 3c add %l1, 0x3c, %l1 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 20095e8: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20095ec: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 20095f0: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 20095f4: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 20095f8: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 20095fc: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2009600: b0 10 20 01 mov 1, %i0 2009604: 7f ff e2 ac call 20020b4 2009608: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 200960c: 81 c7 e0 08 ret 2009610: 81 e8 00 00 restore =============================================================================== 020096c0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20096c0: 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 ) 20096c4: 80 a6 20 00 cmp %i0, 0 20096c8: 02 80 00 13 be 2009714 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 20096cc: 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 ) { 20096d0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 20096d4: 80 a4 60 01 cmp %l1, 1 20096d8: 02 80 00 04 be 20096e8 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 20096dc: 01 00 00 00 nop 20096e0: 81 c7 e0 08 ret <== NOT EXECUTED 20096e4: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 20096e8: 7f ff e2 6f call 20020a4 20096ec: 01 00 00 00 nop 20096f0: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 20096f4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 20096f8: 03 00 00 ef sethi %hi(0x3bc00), %g1 20096fc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009700: 80 88 80 01 btst %g2, %g1 2009704: 12 80 00 06 bne 200971c <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 2009708: 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 ); 200970c: 7f ff e2 6a call 20020b4 2009710: 90 10 00 10 mov %l0, %o0 2009714: 81 c7 e0 08 ret 2009718: 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 ); 200971c: 92 10 00 19 mov %i1, %o1 2009720: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 2009724: 40 00 14 6b call 200e8d0 <_Thread_queue_Extract_priority_helper> 2009728: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200972c: 90 10 00 18 mov %i0, %o0 2009730: 92 10 00 19 mov %i1, %o1 2009734: 7f ff ff 34 call 2009404 <_Thread_queue_Enqueue_priority> 2009738: 94 07 bf fc add %fp, -4, %o2 200973c: 30 bf ff f4 b,a 200970c <_Thread_queue_Requeue+0x4c> =============================================================================== 02009740 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009740: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009744: 90 10 00 18 mov %i0, %o0 2009748: 7f ff fd a4 call 2008dd8 <_Thread_Get> 200974c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009750: c2 07 bf fc ld [ %fp + -4 ], %g1 2009754: 80 a0 60 00 cmp %g1, 0 2009758: 12 80 00 08 bne 2009778 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 200975c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009760: 40 00 14 95 call 200e9b4 <_Thread_queue_Process_timeout> 2009764: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2009768: 03 00 80 7c sethi %hi(0x201f000), %g1 200976c: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 201f3a0 <_Thread_Dispatch_disable_level> 2009770: 84 00 bf ff add %g2, -1, %g2 2009774: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] 2009778: 81 c7 e0 08 ret 200977c: 81 e8 00 00 restore =============================================================================== 020012e0 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { } 20012e0: 81 c3 e0 08 retl =============================================================================== 02016f7c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2016f7c: 9d e3 bf 88 save %sp, -120, %sp 2016f80: 2d 00 81 03 sethi %hi(0x2040c00), %l6 2016f84: ba 07 bf f4 add %fp, -12, %i5 2016f88: a8 07 bf f8 add %fp, -8, %l4 2016f8c: a4 07 bf e8 add %fp, -24, %l2 2016f90: ae 07 bf ec add %fp, -20, %l7 2016f94: 2b 00 81 03 sethi %hi(0x2040c00), %l5 2016f98: 39 00 81 03 sethi %hi(0x2040c00), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2016f9c: c0 27 bf f8 clr [ %fp + -8 ] 2016fa0: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2016fa4: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2016fa8: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2016fac: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2016fb0: ee 27 bf e8 st %l7, [ %fp + -24 ] 2016fb4: ac 15 a2 34 or %l6, 0x234, %l6 2016fb8: aa 15 61 74 or %l5, 0x174, %l5 2016fbc: b8 17 20 e0 or %i4, 0xe0, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016fc0: a2 06 20 30 add %i0, 0x30, %l1 /* * 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 ); 2016fc4: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2016fc8: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2016fcc: b4 06 20 40 add %i0, 0x40, %i2 _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; 2016fd0: b6 10 20 01 mov 1, %i3 { /* * 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; 2016fd4: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2016fd8: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2016fdc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016fe0: 90 10 00 11 mov %l1, %o0 2016fe4: 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; 2016fe8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016fec: 40 00 12 9c call 201ba5c <_Watchdog_Adjust_to_chain> 2016ff0: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2016ff4: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2016ff8: e0 05 40 00 ld [ %l5 ], %l0 /* * 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 ) { 2016ffc: 80 a4 00 09 cmp %l0, %o1 2017000: 38 80 00 2f bgu,a 20170bc <_Timer_server_Body+0x140> 2017004: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 2017008: 80 a4 00 09 cmp %l0, %o1 201700c: 0a 80 00 30 bcs 20170cc <_Timer_server_Body+0x150> 2017010: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2017014: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017018: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201701c: 40 00 02 b1 call 2017ae0 <_Chain_Get> 2017020: 01 00 00 00 nop if ( timer == NULL ) { 2017024: 80 a2 20 00 cmp %o0, 0 2017028: 02 80 00 10 be 2017068 <_Timer_server_Body+0xec> 201702c: 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 ) { 2017030: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2017034: 80 a0 60 01 cmp %g1, 1 2017038: 02 80 00 29 be 20170dc <_Timer_server_Body+0x160> 201703c: 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 ) { 2017040: 12 bf ff f6 bne 2017018 <_Timer_server_Body+0x9c> <== NEVER TAKEN 2017044: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017048: 40 00 12 bb call 201bb34 <_Watchdog_Insert> 201704c: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017050: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017054: 40 00 02 a3 call 2017ae0 <_Chain_Get> 2017058: 01 00 00 00 nop if ( timer == NULL ) { 201705c: 80 a2 20 00 cmp %o0, 0 2017060: 32 bf ff f5 bne,a 2017034 <_Timer_server_Body+0xb8> <== NEVER TAKEN 2017064: c2 02 20 38 ld [ %o0 + 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 ); 2017068: 7f ff e0 f4 call 200f438 201706c: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2017070: c2 07 bf f4 ld [ %fp + -12 ], %g1 2017074: 80 a5 00 01 cmp %l4, %g1 2017078: 02 80 00 1d be 20170ec <_Timer_server_Body+0x170> <== ALWAYS TAKEN 201707c: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2017080: 7f ff e0 f2 call 200f448 <== NOT EXECUTED 2017084: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2017088: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 201708c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017090: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2017094: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017098: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201709c: 40 00 12 70 call 201ba5c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 20170a0: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 20170a4: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 20170a8: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED /* * 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 ) { 20170ac: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 20170b0: 08 bf ff d7 bleu 201700c <_Timer_server_Body+0x90> <== NOT EXECUTED 20170b4: 01 00 00 00 nop <== NOT EXECUTED /* * 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 ); 20170b8: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 20170bc: 90 10 00 13 mov %l3, %o0 20170c0: 40 00 12 67 call 201ba5c <_Watchdog_Adjust_to_chain> 20170c4: 94 10 00 12 mov %l2, %o2 20170c8: 30 bf ff d3 b,a 2017014 <_Timer_server_Body+0x98> /* * 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 ); 20170cc: 90 10 00 13 mov %l3, %o0 20170d0: 40 00 12 33 call 201b99c <_Watchdog_Adjust> 20170d4: 92 10 20 01 mov 1, %o1 20170d8: 30 bf ff cf b,a 2017014 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 20170dc: 92 02 20 10 add %o0, 0x10, %o1 20170e0: 40 00 12 95 call 201bb34 <_Watchdog_Insert> 20170e4: 90 10 00 11 mov %l1, %o0 20170e8: 30 bf ff cc b,a 2017018 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 20170ec: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 20170f0: 7f ff e0 d6 call 200f448 20170f4: 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 ) ) { 20170f8: c2 07 bf e8 ld [ %fp + -24 ], %g1 20170fc: 80 a5 c0 01 cmp %l7, %g1 2017100: 12 80 00 0c bne 2017130 <_Timer_server_Body+0x1b4> 2017104: 01 00 00 00 nop 2017108: 30 80 00 13 b,a 2017154 <_Timer_server_Body+0x1d8> * 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; 201710c: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 2017110: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 2017114: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 2017118: 7f ff e0 cc call 200f448 201711c: 01 00 00 00 nop /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 2017120: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2017124: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2017128: 9f c0 40 00 call %g1 201712c: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2017130: 7f ff e0 c2 call 200f438 2017134: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2017138: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 201713c: 80 a5 c0 10 cmp %l7, %l0 2017140: 32 bf ff f3 bne,a 201710c <_Timer_server_Body+0x190> 2017144: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 2017148: 7f ff e0 c0 call 200f448 201714c: 01 00 00 00 nop 2017150: 30 bf ff a1 b,a 2016fd4 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017154: c0 2e 20 7c clrb [ %i0 + 0x7c ] 2017158: c2 07 00 00 ld [ %i4 ], %g1 201715c: 82 00 60 01 inc %g1 2017160: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2017164: d0 06 00 00 ld [ %i0 ], %o0 2017168: 40 00 0f 55 call 201aebc <_Thread_Set_state> 201716c: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017170: 7f ff ff 59 call 2016ed4 <_Timer_server_Reset_interval_system_watchdog> 2017174: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017178: 7f ff ff 6c call 2016f28 <_Timer_server_Reset_tod_system_watchdog> 201717c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017180: 40 00 0c 4d call 201a2b4 <_Thread_Enable_dispatch> 2017184: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017188: 90 10 00 19 mov %i1, %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; 201718c: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017190: 40 00 12 d2 call 201bcd8 <_Watchdog_Remove> 2017194: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017198: 40 00 12 d0 call 201bcd8 <_Watchdog_Remove> 201719c: 90 10 00 1a mov %i2, %o0 20171a0: 30 bf ff 8d b,a 2016fd4 <_Timer_server_Body+0x58> =============================================================================== 02009eb4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 2009eb4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009eb8: 23 00 80 7d sethi %hi(0x201f400), %l1 2009ebc: a2 14 61 d8 or %l1, 0x1d8, %l1 ! 201f5d8 <_User_extensions_List> 2009ec0: e0 04 60 08 ld [ %l1 + 8 ], %l0 2009ec4: 80 a4 00 11 cmp %l0, %l1 2009ec8: 02 80 00 0d be 2009efc <_User_extensions_Fatal+0x48> <== NEVER TAKEN 2009ecc: b2 0e 60 ff and %i1, 0xff, %i1 !_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 ) 2009ed0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2009ed4: 80 a0 60 00 cmp %g1, 0 2009ed8: 02 80 00 05 be 2009eec <_User_extensions_Fatal+0x38> 2009edc: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 2009ee0: 92 10 00 19 mov %i1, %o1 2009ee4: 9f c0 40 00 call %g1 2009ee8: 94 10 00 1a mov %i2, %o2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2009eec: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009ef0: 80 a4 00 11 cmp %l0, %l1 2009ef4: 32 bf ff f8 bne,a 2009ed4 <_User_extensions_Fatal+0x20> 2009ef8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2009efc: 81 c7 e0 08 ret 2009f00: 81 e8 00 00 restore =============================================================================== 02009d60 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009d60: 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; 2009d64: 07 00 80 7a sethi %hi(0x201e800), %g3 2009d68: 86 10 e0 68 or %g3, 0x68, %g3 ! 201e868 initial_extensions = Configuration.User_extension_table; 2009d6c: e6 00 e0 3c ld [ %g3 + 0x3c ], %l3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2009d70: 1b 00 80 7d sethi %hi(0x201f400), %o5 2009d74: 09 00 80 7c sethi %hi(0x201f000), %g4 2009d78: 84 13 61 d8 or %o5, 0x1d8, %g2 2009d7c: 82 11 23 a4 or %g4, 0x3a4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2009d80: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2009d84: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2009d88: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2009d8c: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2009d90: 84 00 a0 04 add %g2, 4, %g2 2009d94: 82 00 60 04 add %g1, 4, %g1 2009d98: c4 23 61 d8 st %g2, [ %o5 + 0x1d8 ] 2009d9c: c2 21 23 a4 st %g1, [ %g4 + 0x3a4 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2009da0: 80 a4 e0 00 cmp %l3, 0 2009da4: 02 80 00 1b be 2009e10 <_User_extensions_Handler_initialization+0xb0> 2009da8: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 2009dac: 83 2c a0 02 sll %l2, 2, %g1 2009db0: a3 2c a0 04 sll %l2, 4, %l1 2009db4: a2 24 40 01 sub %l1, %g1, %l1 2009db8: a2 04 40 12 add %l1, %l2, %l1 2009dbc: a3 2c 60 02 sll %l1, 2, %l1 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 2009dc0: 40 00 01 6f call 200a37c <_Workspace_Allocate_or_fatal_error> 2009dc4: 90 10 00 11 mov %l1, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009dc8: 94 10 00 11 mov %l1, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 2009dcc: a0 10 00 08 mov %o0, %l0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009dd0: 40 00 21 86 call 20123e8 2009dd4: 92 10 20 00 clr %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 2009dd8: 80 a4 a0 00 cmp %l2, 0 2009ddc: 02 80 00 0d be 2009e10 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 2009de0: a2 10 20 00 clr %l1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 2009de4: 93 2c 60 05 sll %l1, 5, %o1 2009de8: 94 10 20 20 mov 0x20, %o2 2009dec: 92 04 c0 09 add %l3, %o1, %o1 2009df0: 40 00 21 3f call 20122ec 2009df4: 90 04 20 14 add %l0, 0x14, %o0 _User_extensions_Add_set( extension ); 2009df8: 40 00 13 9b call 200ec64 <_User_extensions_Add_set> 2009dfc: 90 10 00 10 mov %l0, %o0 2009e00: a2 04 60 01 inc %l1 2009e04: 80 a4 80 11 cmp %l2, %l1 2009e08: 18 bf ff f7 bgu 2009de4 <_User_extensions_Handler_initialization+0x84> 2009e0c: a0 04 20 34 add %l0, 0x34, %l0 2009e10: 81 c7 e0 08 ret 2009e14: 81 e8 00 00 restore =============================================================================== 02009e18 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 2009e18: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009e1c: 23 00 80 7d sethi %hi(0x201f400), %l1 2009e20: e0 04 61 d8 ld [ %l1 + 0x1d8 ], %l0 ! 201f5d8 <_User_extensions_List> 2009e24: a2 14 61 d8 or %l1, 0x1d8, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2009e28: a2 04 60 04 add %l1, 4, %l1 2009e2c: 80 a4 00 11 cmp %l0, %l1 2009e30: 02 80 00 0c be 2009e60 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 2009e34: 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 ) 2009e38: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2009e3c: 80 a0 60 00 cmp %g1, 0 2009e40: 02 80 00 04 be 2009e50 <_User_extensions_Thread_begin+0x38> 2009e44: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 2009e48: 9f c0 40 00 call %g1 2009e4c: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009e50: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009e54: 80 a4 00 11 cmp %l0, %l1 2009e58: 32 bf ff f9 bne,a 2009e3c <_User_extensions_Thread_begin+0x24> 2009e5c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2009e60: 81 c7 e0 08 ret 2009e64: 81 e8 00 00 restore =============================================================================== 02009f04 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2009f04: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 2009f08: 23 00 80 7d sethi %hi(0x201f400), %l1 2009f0c: e0 04 61 d8 ld [ %l1 + 0x1d8 ], %l0 ! 201f5d8 <_User_extensions_List> 2009f10: a2 14 61 d8 or %l1, 0x1d8, %l1 2009f14: a2 04 60 04 add %l1, 4, %l1 2009f18: 80 a4 00 11 cmp %l0, %l1 2009f1c: 02 80 00 10 be 2009f5c <_User_extensions_Thread_create+0x58><== NEVER TAKEN 2009f20: 25 00 80 7d sethi %hi(0x201f400), %l2 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)( 2009f24: a4 14 a0 60 or %l2, 0x60, %l2 ! 201f460 <_Thread_Executing> !_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 ) { 2009f28: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2009f2c: 80 a0 60 00 cmp %g1, 0 2009f30: 02 80 00 07 be 2009f4c <_User_extensions_Thread_create+0x48> 2009f34: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2009f38: 9f c0 40 00 call %g1 2009f3c: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2009f40: 80 8a 20 ff btst 0xff, %o0 2009f44: 02 80 00 08 be 2009f64 <_User_extensions_Thread_create+0x60> 2009f48: 01 00 00 00 nop User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009f4c: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 2009f50: 80 a4 00 11 cmp %l0, %l1 2009f54: 32 bf ff f6 bne,a 2009f2c <_User_extensions_Thread_create+0x28> 2009f58: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return false; } } return true; } 2009f5c: 81 c7 e0 08 ret 2009f60: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 2009f64: 81 c7 e0 08 ret 2009f68: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02009f6c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 2009f6c: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009f70: 23 00 80 7d sethi %hi(0x201f400), %l1 2009f74: a2 14 61 d8 or %l1, 0x1d8, %l1 ! 201f5d8 <_User_extensions_List> 2009f78: e0 04 60 08 ld [ %l1 + 8 ], %l0 2009f7c: 80 a4 00 11 cmp %l0, %l1 2009f80: 02 80 00 0d be 2009fb4 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 2009f84: 25 00 80 7d sethi %hi(0x201f400), %l2 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( 2009f88: a4 14 a0 60 or %l2, 0x60, %l2 ! 201f460 <_Thread_Executing> !_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 ) 2009f8c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2009f90: 80 a0 60 00 cmp %g1, 0 2009f94: 02 80 00 04 be 2009fa4 <_User_extensions_Thread_delete+0x38> 2009f98: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_delete)( 2009f9c: 9f c0 40 00 call %g1 2009fa0: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2009fa4: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009fa8: 80 a4 00 11 cmp %l0, %l1 2009fac: 32 bf ff f9 bne,a 2009f90 <_User_extensions_Thread_delete+0x24> 2009fb0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2009fb4: 81 c7 e0 08 ret 2009fb8: 81 e8 00 00 restore =============================================================================== 02009e68 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 2009e68: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009e6c: 23 00 80 7d sethi %hi(0x201f400), %l1 2009e70: a2 14 61 d8 or %l1, 0x1d8, %l1 ! 201f5d8 <_User_extensions_List> 2009e74: e0 04 60 08 ld [ %l1 + 8 ], %l0 2009e78: 80 a4 00 11 cmp %l0, %l1 2009e7c: 02 80 00 0c be 2009eac <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 2009e80: 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 ) 2009e84: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2009e88: 80 a0 60 00 cmp %g1, 0 2009e8c: 02 80 00 04 be 2009e9c <_User_extensions_Thread_exitted+0x34> 2009e90: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 2009e94: 9f c0 40 00 call %g1 2009e98: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 2009e9c: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009ea0: 80 a4 00 11 cmp %l0, %l1 2009ea4: 32 bf ff f9 bne,a 2009e88 <_User_extensions_Thread_exitted+0x20> 2009ea8: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2009eac: 81 c7 e0 08 ret 2009eb0: 81 e8 00 00 restore =============================================================================== 0200acc4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200acc4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200acc8: 23 00 80 8f sethi %hi(0x2023c00), %l1 200accc: e0 04 63 78 ld [ %l1 + 0x378 ], %l0 ! 2023f78 <_User_extensions_List> 200acd0: a2 14 63 78 or %l1, 0x378, %l1 200acd4: a2 04 60 04 add %l1, 4, %l1 200acd8: 80 a4 00 11 cmp %l0, %l1 200acdc: 02 80 00 0d be 200ad10 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200ace0: 25 00 80 8f sethi %hi(0x2023c00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( 200ace4: a4 14 a2 00 or %l2, 0x200, %l2 ! 2023e00 <_Thread_Executing> !_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 ) 200ace8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200acec: 80 a0 60 00 cmp %g1, 0 200acf0: 02 80 00 04 be 200ad00 <_User_extensions_Thread_restart+0x3c> 200acf4: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_restart)( 200acf8: 9f c0 40 00 call %g1 200acfc: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200ad00: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200ad04: 80 a4 00 11 cmp %l0, %l1 200ad08: 32 bf ff f9 bne,a 200acec <_User_extensions_Thread_restart+0x28> 200ad0c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200ad10: 81 c7 e0 08 ret 200ad14: 81 e8 00 00 restore =============================================================================== 02009fbc <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 2009fbc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009fc0: 23 00 80 7d sethi %hi(0x201f400), %l1 2009fc4: e0 04 61 d8 ld [ %l1 + 0x1d8 ], %l0 ! 201f5d8 <_User_extensions_List> 2009fc8: a2 14 61 d8 or %l1, 0x1d8, %l1 2009fcc: a2 04 60 04 add %l1, 4, %l1 2009fd0: 80 a4 00 11 cmp %l0, %l1 2009fd4: 02 80 00 0d be 200a008 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 2009fd8: 25 00 80 7d sethi %hi(0x201f400), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( 2009fdc: a4 14 a0 60 or %l2, 0x60, %l2 ! 201f460 <_Thread_Executing> !_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 ) 2009fe0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2009fe4: 80 a0 60 00 cmp %g1, 0 2009fe8: 02 80 00 04 be 2009ff8 <_User_extensions_Thread_start+0x3c> 2009fec: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_start)( 2009ff0: 9f c0 40 00 call %g1 2009ff4: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009ff8: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009ffc: 80 a4 00 11 cmp %l0, %l1 200a000: 32 bf ff f9 bne,a 2009fe4 <_User_extensions_Thread_start+0x28> 200a004: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 200a008: 81 c7 e0 08 ret 200a00c: 81 e8 00 00 restore =============================================================================== 0200a010 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 200a010: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 200a014: 23 00 80 7c sethi %hi(0x201f000), %l1 200a018: e0 04 63 a4 ld [ %l1 + 0x3a4 ], %l0 ! 201f3a4 <_User_extensions_Switches_list> 200a01c: a2 14 63 a4 or %l1, 0x3a4, %l1 200a020: a2 04 60 04 add %l1, 4, %l1 200a024: 80 a4 00 11 cmp %l0, %l1 200a028: 02 80 00 0a be 200a050 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200a02c: 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 ); 200a030: c2 04 20 08 ld [ %l0 + 8 ], %g1 200a034: 90 10 00 18 mov %i0, %o0 200a038: 9f c0 40 00 call %g1 200a03c: 92 10 00 19 mov %i1, %o1 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 200a040: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 200a044: 80 a4 00 11 cmp %l0, %l1 200a048: 32 bf ff fb bne,a 200a034 <_User_extensions_Thread_switch+0x24> 200a04c: c2 04 20 08 ld [ %l0 + 8 ], %g1 200a050: 81 c7 e0 08 ret 200a054: 81 e8 00 00 restore =============================================================================== 0200c2a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c2a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c2a8: 7f ff db 5c call 2003018 200c2ac: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200c2b0: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200c2b4: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200c2b8: 80 a0 40 11 cmp %g1, %l1 200c2bc: 02 80 00 1f be 200c338 <_Watchdog_Adjust+0x94> 200c2c0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c2c4: 12 80 00 1f bne 200c340 <_Watchdog_Adjust+0x9c> 200c2c8: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c2cc: 80 a6 a0 00 cmp %i2, 0 200c2d0: 02 80 00 1a be 200c338 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200c2d4: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200c2d8: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200c2dc: 80 a6 80 19 cmp %i2, %i1 200c2e0: 1a 80 00 0b bcc 200c30c <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN 200c2e4: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 200c2e8: 10 80 00 1d b 200c35c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200c2ec: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c2f0: b4 a6 80 19 subcc %i2, %i1, %i2 200c2f4: 02 80 00 11 be 200c338 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200c2f8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200c2fc: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200c300: 80 a6 40 1a cmp %i1, %i2 200c304: 38 80 00 16 bgu,a 200c35c <_Watchdog_Adjust+0xb8> 200c308: b4 26 40 1a sub %i1, %i2, %i2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 200c30c: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 200c310: 7f ff db 46 call 2003028 200c314: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c318: 40 00 00 b2 call 200c5e0 <_Watchdog_Tickle> 200c31c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200c320: 7f ff db 3e call 2003018 200c324: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200c328: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 200c32c: 80 a4 40 02 cmp %l1, %g2 200c330: 12 bf ff f0 bne 200c2f0 <_Watchdog_Adjust+0x4c> 200c334: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 200c338: 7f ff db 3c call 2003028 200c33c: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200c340: 12 bf ff fe bne 200c338 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200c344: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c348: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c34c: b4 00 80 1a add %g2, %i2, %i2 200c350: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200c354: 7f ff db 35 call 2003028 200c358: 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; 200c35c: 10 bf ff f7 b 200c338 <_Watchdog_Adjust+0x94> 200c360: f4 20 60 10 st %i2, [ %g1 + 0x10 ] =============================================================================== 0200a1fc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200a1fc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200a200: 7f ff df a9 call 20020a4 200a204: 01 00 00 00 nop previous_state = the_watchdog->state; 200a208: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 200a20c: 80 a4 20 01 cmp %l0, 1 200a210: 02 80 00 2a be 200a2b8 <_Watchdog_Remove+0xbc> 200a214: 03 00 80 7d sethi %hi(0x201f400), %g1 200a218: 1a 80 00 09 bcc 200a23c <_Watchdog_Remove+0x40> 200a21c: 80 a4 20 03 cmp %l0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200a220: 03 00 80 7d sethi %hi(0x201f400), %g1 200a224: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 201f4f4 <_Watchdog_Ticks_since_boot> 200a228: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200a22c: 7f ff df a2 call 20020b4 200a230: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 200a234: 81 c7 e0 08 ret 200a238: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200a23c: 18 bf ff fa bgu 200a224 <_Watchdog_Remove+0x28> <== NEVER TAKEN 200a240: 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 ); 200a244: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200a248: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200a24c: c4 00 40 00 ld [ %g1 ], %g2 200a250: 80 a0 a0 00 cmp %g2, 0 200a254: 02 80 00 07 be 200a270 <_Watchdog_Remove+0x74> 200a258: 05 00 80 7d sethi %hi(0x201f400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200a25c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200a260: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200a264: 84 00 c0 02 add %g3, %g2, %g2 200a268: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200a26c: 05 00 80 7d sethi %hi(0x201f400), %g2 200a270: c4 00 a0 f0 ld [ %g2 + 0xf0 ], %g2 ! 201f4f0 <_Watchdog_Sync_count> 200a274: 80 a0 a0 00 cmp %g2, 0 200a278: 22 80 00 07 be,a 200a294 <_Watchdog_Remove+0x98> 200a27c: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200a280: 05 00 80 7d sethi %hi(0x201f400), %g2 200a284: c6 00 a0 3c ld [ %g2 + 0x3c ], %g3 ! 201f43c <_ISR_Nest_level> 200a288: 05 00 80 7d sethi %hi(0x201f400), %g2 200a28c: c6 20 a0 5c st %g3, [ %g2 + 0x5c ] ! 201f45c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200a290: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; previous->next = next; 200a294: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200a298: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200a29c: 03 00 80 7d sethi %hi(0x201f400), %g1 200a2a0: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 201f4f4 <_Watchdog_Ticks_since_boot> 200a2a4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200a2a8: 7f ff df 83 call 20020b4 200a2ac: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 200a2b0: 81 c7 e0 08 ret 200a2b4: 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; 200a2b8: c2 00 60 f4 ld [ %g1 + 0xf4 ], %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; 200a2bc: 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; 200a2c0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200a2c4: 7f ff df 7c call 20020b4 200a2c8: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 200a2cc: 81 c7 e0 08 ret 200a2d0: 81 e8 00 00 restore =============================================================================== 0200ba50 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200ba50: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200ba54: 7f ff dc 38 call 2002b34 200ba58: a0 10 00 18 mov %i0, %l0 200ba5c: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200ba60: 11 00 80 8b sethi %hi(0x2022c00), %o0 200ba64: 94 10 00 19 mov %i1, %o2 200ba68: 90 12 23 e0 or %o0, 0x3e0, %o0 200ba6c: 7f ff e4 07 call 2004a88 200ba70: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ba74: e2 06 40 00 ld [ %i1 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200ba78: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200ba7c: 80 a4 40 19 cmp %l1, %i1 200ba80: 02 80 00 0f be 200babc <_Watchdog_Report_chain+0x6c> 200ba84: 11 00 80 8c sethi %hi(0x2023000), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200ba88: 92 10 00 11 mov %l1, %o1 200ba8c: 40 00 00 11 call 200bad0 <_Watchdog_Report> 200ba90: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 200ba94: e2 04 40 00 ld [ %l1 ], %l1 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 200ba98: 80 a4 40 19 cmp %l1, %i1 200ba9c: 12 bf ff fc bne 200ba8c <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200baa0: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200baa4: 92 10 00 10 mov %l0, %o1 200baa8: 11 00 80 8b sethi %hi(0x2022c00), %o0 200baac: 7f ff e3 f7 call 2004a88 200bab0: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 2022ff8 <_Status_Object_name_errors_to_status+0x30> } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200bab4: 7f ff dc 24 call 2002b44 200bab8: 81 e8 00 00 restore _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200babc: 7f ff e3 f3 call 2004a88 200bac0: 90 12 20 08 or %o0, 8, %o0 } _ISR_Enable( level ); 200bac4: 7f ff dc 20 call 2002b44 200bac8: 81 e8 00 00 restore =============================================================================== 0201c6e8 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 201c6e8: 9d e3 bf a0 save %sp, -96, %sp 201c6ec: 40 00 08 26 call 201e784 <_fini> 201c6f0: 01 00 00 00 nop * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 201c6f4: 7f ff ff e2 call 201c67c 201c6f8: 01 00 00 00 nop rtems_shutdown_executive(status); 201c6fc: 40 00 00 50 call 201c83c 201c700: 90 10 00 18 mov %i0, %o0 201c704: 30 80 00 00 b,a 201c704 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 02029c18 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2029c18: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2029c1c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2029c20: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2029c24: 02 80 00 1d be 2029c98 <_fat_block_read+0x80> <== NOT EXECUTED 2029c28: b0 10 20 00 clr %i0 <== 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; 2029c2c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED 2029c30: 10 80 00 10 b 2029c70 <_fat_block_read+0x58> <== NOT EXECUTED 2029c34: a2 07 bf fc add %fp, -4, %l1 <== 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)); 2029c38: e4 14 00 00 lduh [ %l0 ], %l2 <== NOT EXECUTED 2029c3c: a4 24 80 1a sub %l2, %i2, %l2 <== NOT EXECUTED 2029c40: 80 a4 80 1b cmp %l2, %i3 <== NOT EXECUTED 2029c44: 08 80 00 03 bleu 2029c50 <_fat_block_read+0x38> <== NOT EXECUTED 2029c48: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2029c4c: a4 10 00 1b mov %i3, %l2 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2029c50: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2029c54: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 2029c58: 40 00 8f 56 call 204d9b0 <== NOT EXECUTED 2029c5c: 92 02 40 1a add %o1, %i2, %o1 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2029c60: b6 a6 c0 12 subcc %i3, %l2, %i3 <== NOT EXECUTED 2029c64: 02 80 00 0d be 2029c98 <_fat_block_read+0x80> <== NOT EXECUTED 2029c68: b0 04 80 18 add %l2, %i0, %i0 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 2029c6c: b4 10 20 00 clr %i2 <== 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); 2029c70: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2029c74: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 2029c78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2029c7c: 7f ff fe 6c call 202962c <== NOT EXECUTED 2029c80: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 2029c84: b2 06 60 01 inc %i1 <== 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) 2029c88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029c8c: 02 bf ff eb be 2029c38 <_fat_block_read+0x20> <== NOT EXECUTED 2029c90: 90 07 00 18 add %i4, %i0, %o0 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 2029c94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 2029c98: 81 c7 e0 08 ret <== NOT EXECUTED 2029c9c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029618 <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2029618: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 202961c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029620: 7f ff ff 9c call 2029490 <== NOT EXECUTED 2029624: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202984c <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 202984c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2029850: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2029854: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2029858: 02 80 00 2a be 2029900 <_fat_block_write+0xb4> <== NOT EXECUTED 202985c: b0 10 20 00 clr %i0 <== NOT EXECUTED 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; 2029860: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED 2029864: a4 07 bf fc add %fp, -4, %l2 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2029868: 10 80 00 13 b 20298b4 <_fat_block_write+0x68> <== NOT EXECUTED 202986c: a6 10 20 01 mov 1, %l3 <== 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); 2029870: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED 2029874: 7f ff ff 6e call 202962c <== NOT EXECUTED 2029878: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202987c: 92 07 00 18 add %i4, %i0, %o1 <== NOT EXECUTED 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) 2029880: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029884: 12 80 00 1e bne 20298fc <_fat_block_write+0xb0> <== NOT EXECUTED 2029888: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202988c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2029890: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED 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); 2029894: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 2029898: b2 06 60 01 inc %i1 <== NOT EXECUTED 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); 202989c: 40 00 90 45 call 204d9b0 <== NOT EXECUTED 20298a0: 90 02 00 1a add %o0, %i2, %o0 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 20298a4: b6 a6 c0 10 subcc %i3, %l0, %i3 <== NOT EXECUTED 20298a8: 02 80 00 16 be 2029900 <_fat_block_write+0xb4> <== NOT EXECUTED 20298ac: e6 2c 60 84 stb %l3, [ %l1 + 0x84 ] <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 20298b0: b4 10 20 00 clr %i2 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 20298b4: c2 14 40 00 lduh [ %l1 ], %g1 <== NOT EXECUTED 20298b8: a0 20 40 1a sub %g1, %i2, %l0 <== NOT EXECUTED 20298bc: 80 a4 00 1b cmp %l0, %i3 <== NOT EXECUTED 20298c0: 08 80 00 03 bleu 20298cc <_fat_block_write+0x80> <== NOT EXECUTED 20298c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20298c8: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED if (c == fs_info->vol.bps) 20298cc: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 20298d0: 32 bf ff e8 bne,a 2029870 <_fat_block_write+0x24> <== NOT EXECUTED 20298d4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 20298d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20298dc: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED 20298e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20298e4: 7f ff ff 52 call 202962c <== NOT EXECUTED 20298e8: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED 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); 20298ec: 92 07 00 18 add %i4, %i0, %o1 <== NOT EXECUTED 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) 20298f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20298f4: 02 bf ff e6 be 202988c <_fat_block_write+0x40> <== NOT EXECUTED 20298f8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 20298fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 2029900: 81 c7 e0 08 ret <== NOT EXECUTED 2029904: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02045f30 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 2045f30: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2045f34: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2045f38: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 2045f3c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2045f40: 7f ff ff 69 call 2045ce4 <== NOT EXECUTED 2045f44: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200cb50 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 200cb50: 81 c3 e0 08 retl <== NOT EXECUTED 200cb54: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED =============================================================================== 02002dfc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 2002dfc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002e00: 7f ff ff e6 call 2002d98 <== NOT EXECUTED 2002e04: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202d9c0 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 202d9c0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202d9c4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202d9c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202d9cc: 7f ff ff 70 call 202d78c <== NOT EXECUTED 202d9d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202dc98 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 202dc98: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202dc9c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202dca0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202dca4: 7f ff ff b1 call 202db68 <== NOT EXECUTED 202dca8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0201c808 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 201c808: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 201c80c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 201c810: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 201c814: 40 00 00 17 call 201c870 <== NOT EXECUTED 201c818: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02064084 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 2064084: 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 ); 2064088: 7f fe 91 a2 call 2008710 206408c: 90 10 00 19 mov %i1, %o0 if ( old_parent_pathlen == 0 ) 2064090: 80 a2 20 00 cmp %o0, 0 2064094: 12 80 00 9d bne 2064308 <_rename_r+0x284> 2064098: a0 07 bf d0 add %fp, -48, %l0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 206409c: 90 10 00 19 mov %i1, %o0 20640a0: 92 07 bf fc add %fp, -4, %o1 20640a4: 94 10 00 10 mov %l0, %o2 20640a8: 7f fe 99 10 call 200a4e8 20640ac: a2 10 20 00 clr %l1 20640b0: a4 10 20 00 clr %l2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20640b4: c2 07 bf d0 ld [ %fp + -48 ], %g1 name = old + old_parent_pathlen; 20640b8: b2 06 40 11 add %i1, %l1, %i1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20640bc: c2 27 bf e4 st %g1, [ %fp + -28 ] 20640c0: c2 07 bf d4 ld [ %fp + -44 ], %g1 name = old + old_parent_pathlen; 20640c4: f2 27 bf f8 st %i1, [ %fp + -8 ] /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 20640c8: c2 27 bf e8 st %g1, [ %fp + -24 ] 20640cc: c2 07 bf d8 ld [ %fp + -40 ], %g1 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 20640d0: 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; 20640d4: c2 27 bf ec st %g1, [ %fp + -20 ] 20640d8: c2 07 bf dc ld [ %fp + -36 ], %g1 20640dc: c2 27 bf f0 st %g1, [ %fp + -16 ] 20640e0: c2 07 bf e0 ld [ %fp + -32 ], %g1 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 20640e4: 7f ff b4 a3 call 2051370 20640e8: c2 27 bf f4 st %g1, [ %fp + -12 ] 20640ec: 92 10 00 08 mov %o0, %o1 20640f0: 7f fe 91 6d call 20086a4 20640f4: 90 10 00 19 mov %i1, %o0 20640f8: b2 06 40 08 add %i1, %o0, %i1 20640fc: f2 27 bf f8 st %i1, [ %fp + -8 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 2064100: 7f ff b4 9c call 2051370 2064104: 90 10 00 19 mov %i1, %o0 2064108: 94 10 20 00 clr %o2 206410c: 92 10 00 08 mov %o0, %o1 2064110: 98 10 20 00 clr %o4 2064114: 90 10 00 19 mov %i1, %o0 2064118: b2 07 bf e4 add %fp, -28, %i1 206411c: 7f fe 91 90 call 200875c 2064120: 96 10 00 19 mov %i1, %o3 0, &old_loc, false ); if ( result != 0 ) { 2064124: 80 a2 20 00 cmp %o0, 0 2064128: 12 80 00 41 bne 206422c <_rename_r+0x1a8> 206412c: a2 07 bf bc add %fp, -68, %l1 /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 2064130: 90 10 00 1a mov %i2, %o0 2064134: 92 07 bf fc add %fp, -4, %o1 2064138: 7f fe 98 ec call 200a4e8 206413c: 94 10 00 11 mov %l1, %o2 if ( !new_parent_loc.ops->evalformake_h ) { 2064140: c2 07 bf c8 ld [ %fp + -56 ], %g1 2064144: c2 00 60 04 ld [ %g1 + 4 ], %g1 2064148: 80 a0 60 00 cmp %g1, 0 206414c: 02 80 00 a4 be 20643dc <_rename_r+0x358> 2064150: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 2064154: d0 07 bf fc ld [ %fp + -4 ], %o0 2064158: 90 06 80 08 add %i2, %o0, %o0 206415c: 9f c0 40 00 call %g1 2064160: 94 07 bf f8 add %fp, -8, %o2 if ( result != 0 ) { 2064164: 80 a2 20 00 cmp %o0, 0 2064168: 12 80 00 74 bne 2064338 <_rename_r+0x2b4> 206416c: c2 07 bf cc ld [ %fp + -52 ], %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 ) { 2064170: c4 07 bf e0 ld [ %fp + -32 ], %g2 2064174: 80 a0 80 01 cmp %g2, %g1 2064178: 12 80 00 32 bne 2064240 <_rename_r+0x1bc> 206417c: c4 07 bf c8 ld [ %fp + -56 ], %g2 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 2064180: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2064184: 80 a0 60 00 cmp %g1, 0 2064188: 02 80 00 8f be 20643c4 <_rename_r+0x340> 206418c: d6 07 bf f8 ld [ %fp + -8 ], %o3 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 2064190: 90 10 00 10 mov %l0, %o0 2064194: 92 10 00 19 mov %i1, %o1 2064198: 9f c0 40 00 call %g1 206419c: 94 10 00 11 mov %l1, %o2 rtems_filesystem_freenode( &new_parent_loc ); 20641a0: c2 07 bf c8 ld [ %fp + -56 ], %g1 20641a4: 80 a0 60 00 cmp %g1, 0 20641a8: 02 80 00 08 be 20641c8 <_rename_r+0x144> <== NEVER TAKEN 20641ac: b0 10 00 08 mov %o0, %i0 20641b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20641b4: 80 a0 60 00 cmp %g1, 0 20641b8: 02 80 00 05 be 20641cc <_rename_r+0x148> <== NEVER TAKEN 20641bc: 80 8c a0 ff btst 0xff, %l2 20641c0: 9f c0 40 00 call %g1 20641c4: 90 10 00 11 mov %l1, %o0 if ( free_old_parentloc ) 20641c8: 80 8c a0 ff btst 0xff, %l2 20641cc: 02 80 00 0d be 2064200 <_rename_r+0x17c> 20641d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 20641d4: c2 07 bf dc ld [ %fp + -36 ], %g1 20641d8: 80 a0 60 00 cmp %g1, 0 20641dc: 22 80 00 09 be,a 2064200 <_rename_r+0x17c> <== NEVER TAKEN 20641e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 20641e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20641e8: 80 a0 60 00 cmp %g1, 0 20641ec: 22 80 00 05 be,a 2064200 <_rename_r+0x17c> <== NEVER TAKEN 20641f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 20641f4: 9f c0 40 00 call %g1 20641f8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &old_loc ); 20641fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 2064200: 80 a0 60 00 cmp %g1, 0 2064204: 02 80 00 91 be 2064448 <_rename_r+0x3c4> <== NEVER TAKEN 2064208: 01 00 00 00 nop 206420c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2064210: 80 a0 60 00 cmp %g1, 0 2064214: 02 80 00 8d be 2064448 <_rename_r+0x3c4> <== NEVER TAKEN 2064218: 01 00 00 00 nop 206421c: 9f c0 40 00 call %g1 2064220: 90 10 00 19 mov %i1, %o0 2064224: 81 c7 e0 08 ret 2064228: 81 e8 00 00 restore name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 206422c: 80 8c a0 ff btst 0xff, %l2 2064230: 12 80 00 2b bne 20642dc <_rename_r+0x258> <== ALWAYS TAKEN 2064234: c2 07 bf dc ld [ %fp + -36 ], %g1 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 2064238: 81 c7 e0 08 ret <== NOT EXECUTED 206423c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * 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 ); 2064240: c2 07 bf c8 ld [ %fp + -56 ], %g1 2064244: 80 a0 60 00 cmp %g1, 0 2064248: 02 80 00 09 be 206426c <_rename_r+0x1e8> <== NEVER TAKEN 206424c: 80 8c a0 ff btst 0xff, %l2 2064250: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2064254: 80 a0 60 00 cmp %g1, 0 2064258: 02 80 00 05 be 206426c <_rename_r+0x1e8> <== NEVER TAKEN 206425c: 80 8c a0 ff btst 0xff, %l2 2064260: 9f c0 40 00 call %g1 2064264: 90 10 00 11 mov %l1, %o0 if ( free_old_parentloc ) 2064268: 80 8c a0 ff btst 0xff, %l2 206426c: 02 80 00 0d be 20642a0 <_rename_r+0x21c> 2064270: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 2064274: c2 07 bf dc ld [ %fp + -36 ], %g1 2064278: 80 a0 60 00 cmp %g1, 0 206427c: 22 80 00 09 be,a 20642a0 <_rename_r+0x21c> <== NEVER TAKEN 2064280: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2064284: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2064288: 80 a0 60 00 cmp %g1, 0 206428c: 22 80 00 05 be,a 20642a0 <_rename_r+0x21c> <== NEVER TAKEN 2064290: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2064294: 9f c0 40 00 call %g1 2064298: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &old_loc ); 206429c: c2 07 bf f0 ld [ %fp + -16 ], %g1 20642a0: 80 a0 60 00 cmp %g1, 0 20642a4: 02 80 00 08 be 20642c4 <_rename_r+0x240> <== NEVER TAKEN 20642a8: 01 00 00 00 nop 20642ac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20642b0: 80 a0 60 00 cmp %g1, 0 20642b4: 02 80 00 04 be 20642c4 <_rename_r+0x240> <== NEVER TAKEN 20642b8: 01 00 00 00 nop 20642bc: 9f c0 40 00 call %g1 20642c0: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 20642c4: 7f ff 98 6f call 204a480 <__errno> 20642c8: b0 10 3f ff mov -1, %i0 20642cc: 82 10 20 12 mov 0x12, %g1 20642d0: c2 22 00 00 st %g1, [ %o0 ] 20642d4: 81 c7 e0 08 ret 20642d8: 81 e8 00 00 restore 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 ); 20642dc: 80 a0 60 00 cmp %g1, 0 20642e0: 02 bf ff d1 be 2064224 <_rename_r+0x1a0> <== NEVER TAKEN 20642e4: b0 10 3f ff mov -1, %i0 20642e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20642ec: 80 a0 60 00 cmp %g1, 0 20642f0: 02 bf ff cd be 2064224 <_rename_r+0x1a0> <== NEVER TAKEN 20642f4: 90 10 00 10 mov %l0, %o0 20642f8: 9f c0 40 00 call %g1 20642fc: 01 00 00 00 nop 2064300: 81 c7 e0 08 ret 2064304: 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, 2064308: a2 10 00 08 mov %o0, %l1 206430c: 90 10 00 19 mov %i1, %o0 2064310: 92 10 00 11 mov %l1, %o1 2064314: 94 10 20 02 mov 2, %o2 2064318: 96 10 00 10 mov %l0, %o3 206431c: 7f fe 91 51 call 2008860 2064320: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 2064324: 80 a2 20 00 cmp %o0, 0 2064328: 12 bf ff c4 bne 2064238 <_rename_r+0x1b4> <== NEVER TAKEN 206432c: a4 10 20 01 mov 1, %l2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 2064330: 10 bf ff 62 b 20640b8 <_rename_r+0x34> 2064334: c2 07 bf d0 ld [ %fp + -48 ], %g1 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 2064338: c2 07 bf c8 ld [ %fp + -56 ], %g1 206433c: 80 a0 60 00 cmp %g1, 0 2064340: 02 80 00 09 be 2064364 <_rename_r+0x2e0> <== NEVER TAKEN 2064344: 80 8c a0 ff btst 0xff, %l2 2064348: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 206434c: 80 a0 60 00 cmp %g1, 0 2064350: 02 80 00 05 be 2064364 <_rename_r+0x2e0> <== NEVER TAKEN 2064354: 80 8c a0 ff btst 0xff, %l2 2064358: 9f c0 40 00 call %g1 206435c: 90 10 00 11 mov %l1, %o0 if ( free_old_parentloc ) 2064360: 80 8c a0 ff btst 0xff, %l2 2064364: 02 80 00 0d be 2064398 <_rename_r+0x314> <== NEVER TAKEN 2064368: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 206436c: c2 07 bf dc ld [ %fp + -36 ], %g1 2064370: 80 a0 60 00 cmp %g1, 0 2064374: 22 80 00 09 be,a 2064398 <_rename_r+0x314> <== NEVER TAKEN 2064378: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 206437c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2064380: 80 a0 60 00 cmp %g1, 0 2064384: 22 80 00 05 be,a 2064398 <_rename_r+0x314> <== NEVER TAKEN 2064388: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 206438c: 9f c0 40 00 call %g1 2064390: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &old_loc ); 2064394: c2 07 bf f0 ld [ %fp + -16 ], %g1 2064398: 80 a0 60 00 cmp %g1, 0 206439c: 02 bf ff a2 be 2064224 <_rename_r+0x1a0> <== NEVER TAKEN 20643a0: b0 10 3f ff mov -1, %i0 20643a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20643a8: 80 a0 60 00 cmp %g1, 0 20643ac: 02 bf ff 9e be 2064224 <_rename_r+0x1a0> <== NEVER TAKEN 20643b0: 90 10 00 19 mov %i1, %o0 20643b4: 9f c0 40 00 call %g1 20643b8: 01 00 00 00 nop 20643bc: 81 c7 e0 08 ret 20643c0: 81 e8 00 00 restore rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 20643c4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 20643c8: 80 a0 60 00 cmp %g1, 0 20643cc: 02 80 00 05 be 20643e0 <_rename_r+0x35c> <== NEVER TAKEN 20643d0: 80 8c a0 ff btst 0xff, %l2 20643d4: 9f c0 40 00 call %g1 20643d8: 90 10 00 11 mov %l1, %o0 if ( free_old_parentloc ) 20643dc: 80 8c a0 ff btst 0xff, %l2 20643e0: 02 80 00 0d be 2064414 <_rename_r+0x390> <== NEVER TAKEN 20643e4: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 20643e8: c2 07 bf dc ld [ %fp + -36 ], %g1 20643ec: 80 a0 60 00 cmp %g1, 0 20643f0: 22 80 00 09 be,a 2064414 <_rename_r+0x390> <== NEVER TAKEN 20643f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 20643f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20643fc: 80 a0 60 00 cmp %g1, 0 2064400: 22 80 00 05 be,a 2064414 <_rename_r+0x390> <== NEVER TAKEN 2064404: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2064408: 9f c0 40 00 call %g1 206440c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &old_loc ); 2064410: c2 07 bf f0 ld [ %fp + -16 ], %g1 2064414: 80 a0 60 00 cmp %g1, 0 2064418: 02 80 00 08 be 2064438 <_rename_r+0x3b4> <== NEVER TAKEN 206441c: 01 00 00 00 nop 2064420: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2064424: 80 a0 60 00 cmp %g1, 0 2064428: 02 80 00 04 be 2064438 <_rename_r+0x3b4> <== NEVER TAKEN 206442c: 01 00 00 00 nop 2064430: 9f c0 40 00 call %g1 2064434: 90 10 00 19 mov %i1, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2064438: 7f ff 98 12 call 204a480 <__errno> 206443c: b0 10 3f ff mov -1, %i0 2064440: 82 10 20 86 mov 0x86, %g1 2064444: c2 22 00 00 st %g1, [ %o0 ] 2064448: 81 c7 e0 08 ret 206444c: 81 e8 00 00 restore =============================================================================== 0200a4d0 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 200a4d0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 200a4d4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 200a4d8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200a4dc: 7f ff ff b1 call 200a3a0 <== NOT EXECUTED 200a4e0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020108c0 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 20108c0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20108c4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20108c8: 7f ff ff 5d call 201063c <== NOT EXECUTED 20108cc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02006804 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 2006804: 9d e3 bf 98 save %sp, -104, %sp long adjustment; /* * Simple validations */ if ( !delta ) 2006808: a0 96 20 00 orcc %i0, 0, %l0 200680c: 02 80 00 55 be 2006960 2006810: 03 00 03 d0 sethi %hi(0xf4000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 2006814: c4 04 20 04 ld [ %l0 + 4 ], %g2 2006818: 82 10 62 3f or %g1, 0x23f, %g1 200681c: 80 a0 80 01 cmp %g2, %g1 2006820: 18 80 00 50 bgu 2006960 2006824: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 2006828: 22 80 00 06 be,a 2006840 200682c: c2 04 00 00 ld [ %l0 ], %g1 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 2006830: c0 26 60 04 clr [ %i1 + 4 ] 2006834: c4 04 20 04 ld [ %l0 + 4 ], %g2 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 2006838: c0 26 40 00 clr [ %i1 ] olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 200683c: c2 04 00 00 ld [ %l0 ], %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2006840: 07 00 80 80 sethi %hi(0x2020000), %g3 2006844: c8 00 e1 14 ld [ %g3 + 0x114 ], %g4 ! 2020114 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2006848: 9b 28 60 08 sll %g1, 8, %o5 200684c: 87 28 60 03 sll %g1, 3, %g3 2006850: 86 23 40 03 sub %o5, %g3, %g3 2006854: 9b 28 e0 06 sll %g3, 6, %o5 2006858: 86 23 40 03 sub %o5, %g3, %g3 200685c: 82 00 c0 01 add %g3, %g1, %g1 2006860: 83 28 60 06 sll %g1, 6, %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2006864: 84 00 80 01 add %g2, %g1, %g2 2006868: 80 a0 80 04 cmp %g2, %g4 200686c: 1a 80 00 04 bcc 200687c 2006870: 03 00 80 83 sethi %hi(0x2020c00), %g1 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 2006874: 81 c7 e0 08 ret 2006878: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200687c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 2006880: 84 00 a0 01 inc %g2 2006884: c4 20 61 70 st %g2, [ %g1 + 0x170 ] * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 2006888: a2 07 bf f8 add %fp, -8, %l1 200688c: 40 00 06 81 call 2008290 <_TOD_Get> 2006890: 90 10 00 11 mov %l1, %o0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2006894: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 2006898: c4 04 00 00 ld [ %l0 ], %g2 200689c: c8 07 bf f8 ld [ %fp + -8 ], %g4 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 20068a0: 87 28 60 02 sll %g1, 2, %g3 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 20068a4: 84 01 00 02 add %g4, %g2, %g2 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 20068a8: 89 28 60 07 sll %g1, 7, %g4 20068ac: 86 21 00 03 sub %g4, %g3, %g3 20068b0: 82 00 c0 01 add %g3, %g1, %g1 20068b4: c6 07 bf fc ld [ %fp + -4 ], %g3 20068b8: 83 28 60 03 sll %g1, 3, %g1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 20068bc: c4 27 bf f8 st %g2, [ %fp + -8 ] ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 20068c0: 82 00 40 03 add %g1, %g3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20068c4: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 20068c8: 88 11 21 ff or %g4, 0x1ff, %g4 ! 3b9ac9ff 20068cc: 80 a0 40 04 cmp %g1, %g4 20068d0: 08 80 00 0a bleu 20068f8 20068d4: c2 27 bf fc st %g1, [ %fp + -4 ] ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 20068d8: 07 31 19 4d sethi %hi(0xc4653400), %g3 20068dc: 86 10 e2 00 or %g3, 0x200, %g3 ! c4653600 20068e0: 82 00 40 03 add %g1, %g3, %g1 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 ) { 20068e4: 80 a0 40 04 cmp %g1, %g4 20068e8: 18 bf ff fe bgu 20068e0 <== NEVER TAKEN 20068ec: 84 00 a0 01 inc %g2 20068f0: c4 27 bf f8 st %g2, [ %fp + -8 ] 20068f4: c2 27 bf fc st %g1, [ %fp + -4 ] 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) ) { 20068f8: 09 31 19 4d sethi %hi(0xc4653400), %g4 20068fc: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 2006900: 80 a0 40 04 cmp %g1, %g4 2006904: 18 80 00 0a bgu 200692c <== NEVER TAKEN 2006908: c4 07 bf f8 ld [ %fp + -8 ], %g2 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 200690c: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3 2006910: 86 10 e2 00 or %g3, 0x200, %g3 ! 3b9aca00 2006914: 82 00 40 03 add %g1, %g3, %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) ) { 2006918: 80 a0 40 04 cmp %g1, %g4 200691c: 08 bf ff fe bleu 2006914 2006920: 84 00 bf ff add %g2, -1, %g2 2006924: c2 27 bf fc st %g1, [ %fp + -4 ] 2006928: c4 27 bf f8 st %g2, [ %fp + -8 ] ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 200692c: 40 00 06 85 call 2008340 <_TOD_Set> 2006930: 90 10 00 11 mov %l1, %o0 _Thread_Enable_dispatch(); 2006934: 40 00 0b be call 200982c <_Thread_Enable_dispatch> 2006938: 01 00 00 00 nop /* set the user's output */ if ( olddelta ) 200693c: 80 a6 60 00 cmp %i1, 0 2006940: 02 bf ff cd be 2006874 <== NEVER TAKEN 2006944: 01 00 00 00 nop *olddelta = *delta; 2006948: c2 04 00 00 ld [ %l0 ], %g1 200694c: c2 26 40 00 st %g1, [ %i1 ] 2006950: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006954: c2 26 60 04 st %g1, [ %i1 + 4 ] 2006958: 81 c7 e0 08 ret 200695c: 91 e8 20 00 restore %g0, 0, %o0 */ 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 ); 2006960: 40 00 2f 8e call 2012798 <__errno> 2006964: b0 10 3f ff mov -1, %i0 2006968: 82 10 20 16 mov 0x16, %g1 200696c: c2 22 00 00 st %g1, [ %o0 ] 2006970: 81 c7 e0 08 ret 2006974: 81 e8 00 00 restore =============================================================================== 02002a60 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 2002a60: 9d e3 bf a0 save %sp, -96, %sp 2002a64: 21 00 80 7c sethi %hi(0x201f000), %l0 2002a68: a0 14 21 e0 or %l0, 0x1e0, %l0 ! 201f1e0 2002a6c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 length = nelem * elsize; 2002a70: 92 10 00 18 mov %i0, %o1 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 2002a74: 82 00 60 01 inc %g1 length = nelem * elsize; 2002a78: 90 10 00 19 mov %i1, %o0 2002a7c: 40 00 60 f9 call 201ae60 <.umul> 2002a80: c2 24 20 14 st %g1, [ %l0 + 0x14 ] cptr = malloc( length ); 2002a84: 40 00 01 82 call 200308c 2002a88: a2 10 00 08 mov %o0, %l1 if ( cptr ) 2002a8c: b0 92 20 00 orcc %o0, 0, %i0 2002a90: 02 80 00 04 be 2002aa0 <== NEVER TAKEN 2002a94: 94 10 00 11 mov %l1, %o2 memset( cptr, '\0', length ); 2002a98: 40 00 3e 54 call 20123e8 2002a9c: 92 10 20 00 clr %o1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 2002aa0: c2 04 20 04 ld [ %l0 + 4 ], %g1 2002aa4: 82 00 7f ff add %g1, -1, %g1 2002aa8: c2 24 20 04 st %g1, [ %l0 + 4 ] return cptr; } 2002aac: 81 c7 e0 08 ret 2002ab0: 81 e8 00 00 restore =============================================================================== 0202c56c : #include int chdir( const char *pathname ) { 202c56c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 202c570: 80 a6 20 00 cmp %i0, 0 202c574: 02 80 00 31 be 202c638 202c578: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 202c57c: 40 00 93 7d call 2051370 202c580: 90 10 00 18 mov %i0, %o0 202c584: a0 07 bf ec add %fp, -20, %l0 202c588: 92 10 00 08 mov %o0, %o1 202c58c: 94 10 20 01 mov 1, %o2 202c590: 90 10 00 18 mov %i0, %o0 202c594: 96 10 00 10 mov %l0, %o3 202c598: 98 10 20 01 mov 1, %o4 202c59c: 7f ff 70 b1 call 2008860 202c5a0: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 202c5a4: 80 a2 20 00 cmp %o0, 0 202c5a8: 12 80 00 28 bne 202c648 202c5ac: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 202c5b0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 202c5b4: 80 a0 60 00 cmp %g1, 0 202c5b8: 22 80 00 35 be,a 202c68c <== NEVER TAKEN 202c5bc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 202c5c0: 9f c0 40 00 call %g1 202c5c4: 90 10 00 10 mov %l0, %o0 202c5c8: 80 a2 20 01 cmp %o0, 1 202c5cc: 12 80 00 21 bne 202c650 202c5d0: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 202c5d4: 21 00 81 c3 sethi %hi(0x2070c00), %l0 202c5d8: d0 04 22 24 ld [ %l0 + 0x224 ], %o0 ! 2070e24 202c5dc: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 202c5e0: 80 a0 60 00 cmp %g1, 0 202c5e4: 22 80 00 0a be,a 202c60c <== NEVER TAKEN 202c5e8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 202c5ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202c5f0: 80 a0 60 00 cmp %g1, 0 202c5f4: 22 80 00 06 be,a 202c60c <== NEVER TAKEN 202c5f8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 202c5fc: 9f c0 40 00 call %g1 202c600: 90 02 20 04 add %o0, 4, %o0 202c604: d0 04 22 24 ld [ %l0 + 0x224 ], %o0 rtems_filesystem_current = loc; 202c608: c2 07 bf ec ld [ %fp + -20 ], %g1 202c60c: c2 22 20 04 st %g1, [ %o0 + 4 ] 202c610: c2 07 bf f0 ld [ %fp + -16 ], %g1 202c614: c2 22 20 08 st %g1, [ %o0 + 8 ] 202c618: c2 07 bf f4 ld [ %fp + -12 ], %g1 202c61c: c2 22 20 0c st %g1, [ %o0 + 0xc ] 202c620: c2 07 bf f8 ld [ %fp + -8 ], %g1 202c624: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 202c628: c2 07 bf fc ld [ %fp + -4 ], %g1 202c62c: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return 0; } 202c630: 81 c7 e0 08 ret 202c634: 91 e8 20 00 restore %g0, 0, %o0 { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 202c638: 40 00 77 92 call 204a480 <__errno> 202c63c: b0 10 3f ff mov -1, %i0 202c640: 82 10 20 0e mov 0xe, %g1 202c644: c2 22 00 00 st %g1, [ %o0 ] 202c648: 81 c7 e0 08 ret 202c64c: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 202c650: 80 a0 60 00 cmp %g1, 0 202c654: 02 80 00 08 be 202c674 <== NEVER TAKEN 202c658: 01 00 00 00 nop 202c65c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202c660: 80 a0 60 00 cmp %g1, 0 202c664: 02 80 00 04 be 202c674 <== NEVER TAKEN 202c668: 01 00 00 00 nop 202c66c: 9f c0 40 00 call %g1 202c670: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 202c674: 40 00 77 83 call 204a480 <__errno> 202c678: b0 10 3f ff mov -1, %i0 202c67c: 82 10 20 14 mov 0x14, %g1 202c680: c2 22 00 00 st %g1, [ %o0 ] 202c684: 81 c7 e0 08 ret 202c688: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 202c68c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202c690: 02 80 00 04 be 202c6a0 <== NOT EXECUTED 202c694: 01 00 00 00 nop <== NOT EXECUTED 202c698: 9f c0 40 00 call %g1 <== NOT EXECUTED 202c69c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 202c6a0: 40 00 77 78 call 204a480 <__errno> <== NOT EXECUTED 202c6a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c6a8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202c6ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c6b0: 81 c7 e0 08 ret <== NOT EXECUTED 202c6b4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020082a8 : int chmod( const char *path, mode_t mode ) { 20082a8: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 20082ac: 40 01 24 31 call 2051370 20082b0: 90 10 00 18 mov %i0, %o0 20082b4: a0 07 bf ec add %fp, -20, %l0 20082b8: 92 10 00 08 mov %o0, %o1 20082bc: 94 10 20 00 clr %o2 20082c0: 90 10 00 18 mov %i0, %o0 20082c4: 96 10 00 10 mov %l0, %o3 20082c8: 98 10 20 01 mov 1, %o4 20082cc: 40 00 01 65 call 2008860 20082d0: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 20082d4: 80 a2 20 00 cmp %o0, 0 20082d8: 12 80 00 15 bne 200832c 20082dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 20082e0: 80 a0 60 00 cmp %g1, 0 20082e4: 22 80 00 24 be,a 2008374 <== NEVER TAKEN 20082e8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 20082ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20082f0: 80 a0 60 00 cmp %g1, 0 20082f4: 02 80 00 10 be 2008334 <== NEVER TAKEN 20082f8: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 20082fc: 9f c0 40 00 call %g1 2008300: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2008304: c2 07 bf f8 ld [ %fp + -8 ], %g1 2008308: 80 a0 60 00 cmp %g1, 0 200830c: 02 80 00 08 be 200832c <== NEVER TAKEN 2008310: b0 10 00 08 mov %o0, %i0 2008314: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2008318: 80 a0 60 00 cmp %g1, 0 200831c: 02 80 00 23 be 20083a8 <== NEVER TAKEN 2008320: 01 00 00 00 nop 2008324: 9f c0 40 00 call %g1 2008328: 90 10 00 10 mov %l0, %o0 return result; } 200832c: 81 c7 e0 08 ret 2008330: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 2008334: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2008338: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200833c: 02 80 00 08 be 200835c <== NOT EXECUTED 2008340: 01 00 00 00 nop <== NOT EXECUTED 2008344: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2008348: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200834c: 02 80 00 04 be 200835c <== NOT EXECUTED 2008350: 01 00 00 00 nop <== NOT EXECUTED 2008354: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008358: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 200835c: 40 01 08 49 call 204a480 <__errno> <== NOT EXECUTED 2008360: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2008364: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2008368: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200836c: 81 c7 e0 08 ret <== NOT EXECUTED 2008370: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 2008374: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2008378: 02 80 00 08 be 2008398 <== NOT EXECUTED 200837c: 01 00 00 00 nop <== NOT EXECUTED 2008380: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2008384: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2008388: 02 80 00 04 be 2008398 <== NOT EXECUTED 200838c: 01 00 00 00 nop <== NOT EXECUTED 2008390: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008394: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 2008398: 40 01 08 3a call 204a480 <__errno> <== NOT EXECUTED 200839c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20083a0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 20083a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20083a8: 81 c7 e0 08 ret <== NOT EXECUTED 20083ac: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202c6b8 : int chown( const char *path, uid_t owner, gid_t group ) { 202c6b8: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 202c6bc: 40 00 93 2d call 2051370 202c6c0: 90 10 00 18 mov %i0, %o0 202c6c4: a0 07 bf ec add %fp, -20, %l0 202c6c8: 92 10 00 08 mov %o0, %o1 202c6cc: 94 10 20 00 clr %o2 202c6d0: 90 10 00 18 mov %i0, %o0 202c6d4: 96 10 00 10 mov %l0, %o3 202c6d8: 98 10 20 01 mov 1, %o4 202c6dc: 7f ff 70 61 call 2008860 202c6e0: b0 10 3f ff mov -1, %i0 202c6e4: 80 a2 20 00 cmp %o0, 0 202c6e8: 12 80 00 15 bne 202c73c 202c6ec: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 202c6f0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 202c6f4: 80 a0 60 00 cmp %g1, 0 202c6f8: 02 80 00 13 be 202c744 <== NEVER TAKEN 202c6fc: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 202c700: 95 2e a0 10 sll %i2, 0x10, %o2 202c704: 93 32 60 10 srl %o1, 0x10, %o1 202c708: 95 32 a0 10 srl %o2, 0x10, %o2 202c70c: 9f c0 40 00 call %g1 202c710: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 202c714: c2 07 bf f8 ld [ %fp + -8 ], %g1 202c718: 80 a0 60 00 cmp %g1, 0 202c71c: 02 80 00 08 be 202c73c <== NEVER TAKEN 202c720: b0 10 00 08 mov %o0, %i0 202c724: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202c728: 80 a0 60 00 cmp %g1, 0 202c72c: 02 80 00 10 be 202c76c <== NEVER TAKEN 202c730: 01 00 00 00 nop 202c734: 9f c0 40 00 call %g1 202c738: 90 10 00 10 mov %l0, %o0 return result; } 202c73c: 81 c7 e0 08 ret 202c740: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 202c744: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 202c748: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202c74c: 02 80 00 04 be 202c75c <== NOT EXECUTED 202c750: 01 00 00 00 nop <== NOT EXECUTED 202c754: 9f c0 40 00 call %g1 <== NOT EXECUTED 202c758: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 202c75c: 40 00 77 49 call 204a480 <__errno> <== NOT EXECUTED 202c760: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c764: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202c768: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c76c: 81 c7 e0 08 ret <== NOT EXECUTED 202c770: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202c774 : #include int chroot( const char *pathname ) { 202c774: 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) { 202c778: 21 00 81 c3 sethi %hi(0x2070c00), %l0 202c77c: e2 04 22 24 ld [ %l0 + 0x224 ], %l1 ! 2070e24 202c780: 03 00 81 d3 sethi %hi(0x2074c00), %g1 202c784: 82 10 60 bc or %g1, 0xbc, %g1 ! 2074cbc 202c788: 80 a4 40 01 cmp %l1, %g1 202c78c: 02 80 00 28 be 202c82c <== ALWAYS TAKEN 202c790: 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); 202c794: 7f ff ff 76 call 202c56c 202c798: 90 10 00 18 mov %i0, %o0 if (result) { 202c79c: 80 a2 20 00 cmp %o0, 0 202c7a0: 12 80 00 2f bne 202c85c <== NEVER TAKEN 202c7a4: 11 00 81 ab sethi %hi(0x206ac00), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 202c7a8: 92 10 20 01 mov 1, %o1 202c7ac: 90 12 21 f8 or %o0, 0x1f8, %o0 202c7b0: 94 10 20 00 clr %o2 202c7b4: 96 07 bf ec add %fp, -20, %o3 202c7b8: 7f ff 70 2a call 2008860 202c7bc: 98 10 20 00 clr %o4 202c7c0: 80 a2 20 00 cmp %o0, 0 202c7c4: 12 80 00 26 bne 202c85c <== NEVER TAKEN 202c7c8: d0 04 22 24 ld [ %l0 + 0x224 ], %o0 /* 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); 202c7cc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 202c7d0: 80 a0 60 00 cmp %g1, 0 202c7d4: 22 80 00 0b be,a 202c800 <== NEVER TAKEN 202c7d8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 202c7dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202c7e0: 80 a0 60 00 cmp %g1, 0 202c7e4: 22 80 00 07 be,a 202c800 <== NEVER TAKEN 202c7e8: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 202c7ec: 9f c0 40 00 call %g1 202c7f0: 90 02 20 18 add %o0, 0x18, %o0 202c7f4: 03 00 81 c3 sethi %hi(0x2070c00), %g1 202c7f8: d0 00 62 24 ld [ %g1 + 0x224 ], %o0 ! 2070e24 rtems_filesystem_root = loc; 202c7fc: c2 07 bf ec ld [ %fp + -20 ], %g1 202c800: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 202c804: c2 07 bf f0 ld [ %fp + -16 ], %g1 202c808: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 202c80c: c2 07 bf f4 ld [ %fp + -12 ], %g1 202c810: c2 22 20 20 st %g1, [ %o0 + 0x20 ] 202c814: c2 07 bf f8 ld [ %fp + -8 ], %g1 202c818: c2 22 20 24 st %g1, [ %o0 + 0x24 ] 202c81c: c2 07 bf fc ld [ %fp + -4 ], %g1 202c820: c2 22 20 28 st %g1, [ %o0 + 0x28 ] return 0; } 202c824: 81 c7 e0 08 ret 202c828: 91 e8 20 00 restore %g0, 0, %o0 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*/ 202c82c: 40 00 06 79 call 202e210 202c830: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 202c834: c2 04 22 24 ld [ %l0 + 0x224 ], %g1 202c838: 80 a0 40 11 cmp %g1, %l1 202c83c: 12 bf ff d6 bne 202c794 <== ALWAYS TAKEN 202c840: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 202c844: 40 00 77 0f call 204a480 <__errno> <== NOT EXECUTED 202c848: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 202c84c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202c850: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c854: 81 c7 e0 08 ret <== NOT EXECUTED 202c858: 81 e8 00 00 restore <== NOT EXECUTED } /* 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 ); 202c85c: 40 00 77 09 call 204a480 <__errno> <== NOT EXECUTED 202c860: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c864: 40 00 77 07 call 204a480 <__errno> <== NOT EXECUTED 202c868: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 202c86c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 202c870: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 202c874: 81 c7 e0 08 ret <== NOT EXECUTED 202c878: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020067f0 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 20067f0: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 20067f4: 80 a6 60 00 cmp %i1, 0 20067f8: 02 80 00 20 be 2006878 20067fc: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2006800: 02 80 00 19 be 2006864 2006804: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 2006808: 02 80 00 12 be 2006850 <== NEVER TAKEN 200680c: 80 a6 20 02 cmp %i0, 2 return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 2006810: 02 80 00 10 be 2006850 2006814: 80 a6 20 03 cmp %i0, 3 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2006818: 02 80 00 08 be 2006838 200681c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2006820: 40 00 31 45 call 2012d34 <__errno> 2006824: b0 10 3f ff mov -1, %i0 ! ffffffff 2006828: 82 10 20 16 mov 0x16, %g1 200682c: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2006830: 81 c7 e0 08 ret 2006834: 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 ); 2006838: 40 00 31 3f call 2012d34 <__errno> 200683c: b0 10 3f ff mov -1, %i0 2006840: 82 10 20 58 mov 0x58, %g1 2006844: c2 22 00 00 st %g1, [ %o0 ] 2006848: 81 c7 e0 08 ret 200684c: 81 e8 00 00 restore } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); 2006850: 90 10 00 19 mov %i1, %o0 2006854: 40 00 08 69 call 20089f8 <_TOD_Get_uptime_as_timespec> 2006858: b0 10 20 00 clr %i0 return 0; 200685c: 81 c7 e0 08 ret 2006860: 81 e8 00 00 restore { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 2006864: 90 10 00 19 mov %i1, %o0 2006868: 40 00 08 45 call 200897c <_TOD_Get> 200686c: b0 10 20 00 clr %i0 return 0; 2006870: 81 c7 e0 08 ret 2006874: 81 e8 00 00 restore clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 2006878: 40 00 31 2f call 2012d34 <__errno> 200687c: b0 10 3f ff mov -1, %i0 2006880: 82 10 20 16 mov 0x16, %g1 2006884: c2 22 00 00 st %g1, [ %o0 ] 2006888: 81 c7 e0 08 ret 200688c: 81 e8 00 00 restore =============================================================================== 0202ee24 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 202ee24: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 202ee28: 80 a6 60 00 cmp %i1, 0 202ee2c: 02 80 00 24 be 202eebc <== NEVER TAKEN 202ee30: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 202ee34: 02 80 00 0c be 202ee64 202ee38: 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 ) 202ee3c: 02 80 00 1a be 202eea4 202ee40: 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 ) 202ee44: 02 80 00 18 be 202eea4 202ee48: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 202ee4c: 40 00 6d 8d call 204a480 <__errno> 202ee50: b0 10 3f ff mov -1, %i0 ! ffffffff 202ee54: 82 10 20 16 mov 0x16, %g1 202ee58: c2 22 00 00 st %g1, [ %o0 ] return 0; } 202ee5c: 81 c7 e0 08 ret 202ee60: 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 ) 202ee64: c4 06 40 00 ld [ %i1 ], %g2 202ee68: 03 08 76 b9 sethi %hi(0x21dae400), %g1 202ee6c: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 202ee70: 80 a0 80 01 cmp %g2, %g1 202ee74: 08 80 00 12 bleu 202eebc 202ee78: 03 00 81 d3 sethi %hi(0x2074c00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 202ee7c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 2074e40 <_Thread_Dispatch_disable_level> 202ee80: 84 00 a0 01 inc %g2 202ee84: c4 20 62 40 st %g2, [ %g1 + 0x240 ] rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 202ee88: 90 10 00 19 mov %i1, %o0 202ee8c: 40 00 06 85 call 20308a0 <_TOD_Set> 202ee90: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 202ee94: 7f ff 84 59 call 200fff8 <_Thread_Enable_dispatch> 202ee98: 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; 202ee9c: 81 c7 e0 08 ret 202eea0: 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 ); 202eea4: 40 00 6d 77 call 204a480 <__errno> 202eea8: b0 10 3f ff mov -1, %i0 202eeac: 82 10 20 58 mov 0x58, %g1 202eeb0: c2 22 00 00 st %g1, [ %o0 ] 202eeb4: 81 c7 e0 08 ret 202eeb8: 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 ); 202eebc: 40 00 6d 71 call 204a480 <__errno> 202eec0: b0 10 3f ff mov -1, %i0 202eec4: 82 10 20 16 mov 0x16, %g1 202eec8: c2 22 00 00 st %g1, [ %o0 ] 202eecc: 81 c7 e0 08 ret 202eed0: 81 e8 00 00 restore =============================================================================== 0200c944 : #include int close( int fd ) { 200c944: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 200c948: 03 00 80 79 sethi %hi(0x201e400), %g1 200c94c: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 201e7b4 200c950: 80 a6 00 01 cmp %i0, %g1 200c954: 1a 80 00 21 bcc 200c9d8 200c958: 03 00 80 7c sethi %hi(0x201f000), %g1 iop = rtems_libio_iop(fd); 200c95c: e0 00 61 c4 ld [ %g1 + 0x1c4 ], %l0 ! 201f1c4 200c960: 83 2e 20 06 sll %i0, 6, %g1 200c964: b1 2e 20 03 sll %i0, 3, %i0 200c968: b0 06 00 01 add %i0, %g1, %i0 200c96c: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 200c970: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 200c974: 80 88 61 00 btst 0x100, %g1 200c978: 02 80 00 18 be 200c9d8 200c97c: 01 00 00 00 nop rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 200c980: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 200c984: c2 00 60 04 ld [ %g1 + 4 ], %g1 200c988: 80 a0 60 00 cmp %g1, 0 200c98c: 02 80 00 05 be 200c9a0 <== NEVER TAKEN 200c990: b0 10 20 00 clr %i0 rc = (*iop->handlers->close_h)( iop ); 200c994: 9f c0 40 00 call %g1 200c998: 90 10 00 10 mov %l0, %o0 200c99c: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &iop->pathinfo ); 200c9a0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 200c9a4: 80 a0 60 00 cmp %g1, 0 200c9a8: 02 80 00 08 be 200c9c8 <== NEVER TAKEN 200c9ac: 01 00 00 00 nop 200c9b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200c9b4: 80 a0 60 00 cmp %g1, 0 200c9b8: 02 80 00 04 be 200c9c8 200c9bc: 01 00 00 00 nop 200c9c0: 9f c0 40 00 call %g1 200c9c4: 90 04 20 1c add %l0, 0x1c, %o0 rtems_libio_free( iop ); 200c9c8: 40 00 00 bc call 200ccb8 200c9cc: 90 10 00 10 mov %l0, %o0 return rc; } 200c9d0: 81 c7 e0 08 ret 200c9d4: 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); 200c9d8: 40 00 14 09 call 20119fc <__errno> 200c9dc: b0 10 3f ff mov -1, %i0 200c9e0: 82 10 20 09 mov 9, %g1 200c9e4: c2 22 00 00 st %g1, [ %o0 ] 200c9e8: 81 c7 e0 08 ret 200c9ec: 81 e8 00 00 restore =============================================================================== 02002f3c : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2002f3c: 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) { 2002f40: 23 00 80 8b sethi %hi(0x2022c00), %l1 2002f44: e4 04 62 5c ld [ %l1 + 0x25c ], %l2 ! 2022e5c 2002f48: 80 a6 00 12 cmp %i0, %l2 2002f4c: 1a 80 00 4a bcc 2003074 2002f50: a0 10 00 18 mov %i0, %l0 2002f54: 29 00 80 8b sethi %hi(0x2022c00), %l4 2002f58: e6 05 22 58 ld [ %l4 + 0x258 ], %l3 ! 2022e58 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2002f5c: a3 2c 20 03 sll %l0, 3, %l1 2002f60: e4 04 c0 11 ld [ %l3 + %l1 ], %l2 2002f64: 80 a4 a0 00 cmp %l2, 0 2002f68: 02 80 00 2b be 2003014 2002f6c: a6 04 c0 11 add %l3, %l1, %l3 2002f70: ea 04 e0 04 ld [ %l3 + 4 ], %l5 2002f74: 80 a6 40 15 cmp %i1, %l5 2002f78: 1a 80 00 29 bcc 200301c <== NEVER TAKEN 2002f7c: 80 a5 60 00 cmp %l5, 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; 2002f80: 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) { 2002f84: a2 84 80 01 addcc %l2, %g1, %l1 2002f88: 02 80 00 4e be 20030c0 <== NEVER TAKEN 2002f8c: 01 00 00 00 nop return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 2002f90: c2 04 80 01 ld [ %l2 + %g1 ], %g1 2002f94: 80 a0 60 00 cmp %g1, 0 2002f98: 12 80 00 51 bne 20030dc 2002f9c: b0 10 20 0c mov 0xc, %i0 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 2002fa0: 40 00 04 64 call 2004130 2002fa4: 90 10 20 38 mov 0x38, %o0 if (dd == NULL) { 2002fa8: a4 92 20 00 orcc %o0, 0, %l2 2002fac: 02 80 00 45 be 20030c0 <== NEVER TAKEN 2002fb0: 80 a6 a0 00 cmp %i2, 0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2002fb4: 02 80 00 0f be 2002ff0 2002fb8: a6 10 20 00 clr %l3 alloc_name = strdup(name); 2002fbc: 40 00 4e 94 call 2016a0c 2002fc0: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2002fc4: b4 92 20 00 orcc %o0, 0, %i2 2002fc8: 02 80 00 47 be 20030e4 <== NEVER TAKEN 2002fcc: a6 10 00 1a mov %i2, %l3 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2002fd0: 13 00 00 18 sethi %hi(0x6000), %o1 2002fd4: 94 10 00 10 mov %l0, %o2 2002fd8: 92 12 61 ff or %o1, 0x1ff, %o1 2002fdc: 40 00 04 9d call 2004250 2002fe0: 96 10 00 19 mov %i1, %o3 2002fe4: 80 a2 20 00 cmp %o0, 0 2002fe8: 06 80 00 38 bl 20030c8 <== NEVER TAKEN 2002fec: 01 00 00 00 nop dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; *dd_entry = dd; 2002ff0: e4 24 40 00 st %l2, [ %l1 ] *dd_ptr = dd; 2002ff4: e4 26 c0 00 st %l2, [ %i3 ] free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 2002ff8: e0 24 80 00 st %l0, [ %l2 ] 2002ffc: f2 24 a0 04 st %i1, [ %l2 + 4 ] dd->name = alloc_name; 2003000: e6 24 a0 10 st %l3, [ %l2 + 0x10 ] dd->uses = 0; 2003004: c0 24 a0 14 clr [ %l2 + 0x14 ] dd->deleted = false; 2003008: c0 2c a0 30 clrb [ %l2 + 0x30 ] *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 200300c: 81 c7 e0 08 ret 2003010: 91 e8 20 00 restore %g0, 0, %o0 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2003014: ea 04 e0 04 ld [ %l3 + 4 ], %l5 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) { 2003018: 80 a5 60 00 cmp %l5, 0 200301c: 12 80 00 03 bne 2003028 <== NEVER TAKEN 2003020: a7 2d 60 01 sll %l5, 1, %l3 2003024: a6 10 20 08 mov 8, %l3 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 2003028: 80 a6 40 13 cmp %i1, %l3 200302c: 3a 80 00 02 bcc,a 2003034 2003030: a6 06 60 01 add %i1, 1, %l3 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 2003034: 90 10 00 12 mov %l2, %o0 2003038: 40 00 07 75 call 2004e0c 200303c: 93 2c e0 02 sll %l3, 2, %o1 if (table == NULL) { 2003040: a4 92 20 00 orcc %o0, 0, %l2 2003044: 02 80 00 1f be 20030c0 2003048: 91 2d 60 02 sll %l5, 2, %o0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 200304c: 94 24 c0 15 sub %l3, %l5, %o2 2003050: 90 04 80 08 add %l2, %o0, %o0 2003054: 95 2a a0 02 sll %o2, 2, %o2 2003058: 40 00 4d 5e call 20165d0 200305c: 92 10 20 00 clr %o1 disktab [major].minor = table; 2003060: c2 05 22 58 ld [ %l4 + 0x258 ], %g1 2003064: e4 20 40 11 st %l2, [ %g1 + %l1 ] 2003068: a2 00 40 11 add %g1, %l1, %l1 disktab [major].size = new_size; 200306c: 10 bf ff c5 b 2002f80 2003070: e6 24 60 04 st %l3, [ %l1 + 4 ] rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 2003074: 29 00 80 8b sethi %hi(0x2022c00), %l4 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2003078: ab 2c a0 01 sll %l2, 1, %l5 if (major >= new_size) { 200307c: 80 a6 00 15 cmp %i0, %l5 2003080: 0a 80 00 03 bcs 200308c <== NEVER TAKEN 2003084: d0 05 22 58 ld [ %l4 + 0x258 ], %o0 new_size = major + 1; 2003088: aa 06 20 01 add %i0, 1, %l5 } table = realloc(table, new_size * sizeof(*table)); 200308c: 40 00 07 60 call 2004e0c 2003090: 93 2d 60 03 sll %l5, 3, %o1 if (table == NULL) { 2003094: a6 92 20 00 orcc %o0, 0, %l3 2003098: 02 80 00 0a be 20030c0 <== ALWAYS TAKEN 200309c: 91 2c a0 03 sll %l2, 3, %o0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 20030a0: 94 25 40 12 sub %l5, %l2, %o2 <== NOT EXECUTED 20030a4: 90 04 c0 08 add %l3, %o0, %o0 <== NOT EXECUTED 20030a8: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED 20030ac: 40 00 4d 49 call 20165d0 <== NOT EXECUTED 20030b0: 92 10 20 00 clr %o1 <== NOT EXECUTED disktab = table; disktab_size = new_size; 20030b4: ea 24 62 5c st %l5, [ %l1 + 0x25c ] <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; 20030b8: 10 bf ff a9 b 2002f5c <== NOT EXECUTED 20030bc: e6 25 22 58 st %l3, [ %l4 + 0x258 ] <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 20030c0: 81 c7 e0 08 ret 20030c4: 91 e8 20 1a restore %g0, 0x1a, %o0 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 20030c8: 40 00 03 32 call 2003d90 <== NOT EXECUTED 20030cc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED free(dd); 20030d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 20030d4: 40 00 03 2f call 2003d90 <== NOT EXECUTED 20030d8: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 20030dc: 81 c7 e0 08 ret 20030e0: 81 e8 00 00 restore if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 20030e4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 20030e8: 40 00 03 2a call 2003d90 <== NOT EXECUTED 20030ec: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 20030f0: 81 c7 e0 08 ret <== NOT EXECUTED 20030f4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a044 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 200a044: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 200a048: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 200a04c: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 200a050: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 200a054: d2 00 60 0c ld [ %g1 + 0xc ], %o1 200a058: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 200a05c: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 200a060: 94 07 bf f4 add %fp, -12, %o2 200a064: 40 00 06 15 call 200b8b8 200a068: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 200a06c: 80 a2 20 00 cmp %o0, 0 200a070: 12 80 00 04 bne 200a080 <== NEVER TAKEN 200a074: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 200a078: 81 c7 e0 08 ret 200a07c: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 200a080: 40 00 00 48 call 200a1a0 <== NOT EXECUTED 200a084: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 200a088: 81 c7 e0 08 ret <== NOT EXECUTED 200a08c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200a09c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 200a09c: 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 ) ) 200a0a0: 80 8e bf f8 btst -8, %i2 200a0a4: 12 80 00 33 bne 200a170 <== NEVER TAKEN 200a0a8: 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; 200a0ac: e4 06 c0 00 ld [ %i3 ], %l2 if (!device_name_table) 200a0b0: 80 a4 a0 00 cmp %l2, 0 200a0b4: 02 80 00 35 be 200a188 <== NEVER TAKEN 200a0b8: 03 00 80 42 sethi %hi(0x2010800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 200a0bc: e6 00 62 88 ld [ %g1 + 0x288 ], %l3 ! 2010a88 rtems_set_errno_and_return_minus_one( EPERM ); /* 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 ); 200a0c0: a0 10 20 00 clr %l0 for (i = 0; i < rtems_device_table_size; i++) { 200a0c4: 80 a4 e0 00 cmp %l3, 0 200a0c8: 02 80 00 18 be 200a128 <== NEVER TAKEN 200a0cc: 82 10 20 00 clr %g1 if (!device_name_table[i].device_name) 200a0d0: 85 28 60 04 sll %g1, 4, %g2 200a0d4: a9 28 60 02 sll %g1, 2, %l4 200a0d8: a8 05 00 02 add %l4, %g2, %l4 200a0dc: e2 04 80 14 ld [ %l2 + %l4 ], %l1 /* 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++) { 200a0e0: a0 04 20 01 inc %l0 if (!device_name_table[i].device_name) 200a0e4: 80 a4 60 00 cmp %l1, 0 200a0e8: 02 80 00 0d be 200a11c 200a0ec: a8 04 80 14 add %l2, %l4, %l4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 200a0f0: 90 10 00 18 mov %i0, %o0 200a0f4: 92 10 00 11 mov %l1, %o1 200a0f8: 40 00 0f 25 call 200dd8c 200a0fc: 94 10 00 19 mov %i1, %o2 200a100: 80 a2 20 00 cmp %o0, 0 200a104: 12 80 00 07 bne 200a120 <== NEVER TAKEN 200a108: 80 a4 c0 10 cmp %l3, %l0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200a10c: c2 4c 40 19 ldsb [ %l1 + %i1 ], %g1 200a110: 80 a0 60 00 cmp %g1, 0 200a114: 02 80 00 0b be 200a140 200a118: 03 00 80 43 sethi %hi(0x2010c00), %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++) { 200a11c: 80 a4 c0 10 cmp %l3, %l0 200a120: 18 bf ff ec bgu 200a0d0 200a124: 82 10 00 10 mov %l0, %g1 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 200a128: 40 00 0b 78 call 200cf08 <__errno> 200a12c: b0 10 3f ff mov -1, %i0 200a130: 82 10 20 02 mov 2, %g1 200a134: c2 22 00 00 st %g1, [ %o0 ] } 200a138: 81 c7 e0 08 ret 200a13c: 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; 200a140: c2 00 60 b8 ld [ %g1 + 0xb8 ], %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]; 200a144: e8 26 c0 00 st %l4, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a148: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200a14c: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] 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; 200a150: 03 00 80 43 sethi %hi(0x2010c00), %g1 200a154: 82 10 60 60 or %g1, 0x60, %g1 ! 2010c60 200a158: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 200a15c: 03 00 80 43 sethi %hi(0x2010c00), %g1 200a160: 82 10 60 18 or %g1, 0x18, %g1 ! 2010c18 200a164: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 200a168: 81 c7 e0 08 ret 200a16c: 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 ); 200a170: 40 00 0b 66 call 200cf08 <__errno> <== NOT EXECUTED 200a174: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a178: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a17c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a180: 81 c7 e0 08 ret <== NOT EXECUTED 200a184: 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 ); 200a188: 40 00 0b 60 call 200cf08 <__errno> <== NOT EXECUTED 200a18c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a190: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 200a194: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a198: 81 c7 e0 08 ret <== NOT EXECUTED 200a19c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02001fd8 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 2001fd8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 2001fdc: 23 00 80 42 sethi %hi(0x2010800), %l1 2001fe0: c2 04 62 88 ld [ %l1 + 0x288 ], %g1 ! 2010a88 2001fe4: 85 28 60 04 sll %g1, 4, %g2 2001fe8: 83 28 60 02 sll %g1, 2, %g1 2001fec: 40 00 1e 46 call 2009904 <_Workspace_Allocate> 2001ff0: 90 00 40 02 add %g1, %g2, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 2001ff4: a0 92 20 00 orcc %o0, 0, %l0 2001ff8: 02 80 00 10 be 2002038 <== NEVER TAKEN 2001ffc: c2 04 62 88 ld [ %l1 + 0x288 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 2002000: 92 10 20 00 clr %o1 2002004: 85 28 60 04 sll %g1, 4, %g2 2002008: 83 28 60 02 sll %g1, 2, %g1 200200c: 40 00 2e 20 call 200d88c 2002010: 94 00 40 02 add %g1, %g2, %o2 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 2002014: 03 00 80 43 sethi %hi(0x2010c00), %g1 2002018: 82 10 60 60 or %g1, 0x60, %g1 ! 2010c60 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 200201c: e0 26 20 1c st %l0, [ %i0 + 0x1c ] device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 2002020: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 2002024: 03 00 80 43 sethi %hi(0x2010c00), %g1 2002028: 82 10 60 18 or %g1, 0x18, %g1 ! 2010c18 200202c: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 2002030: 81 c7 e0 08 ret 2002034: 91 e8 20 00 restore %g0, 0, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 2002038: 40 00 2b b4 call 200cf08 <__errno> <== NOT EXECUTED 200203c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002040: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2002044: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002048: 81 c7 e0 08 ret <== NOT EXECUTED 200204c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020021fc : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 20021fc: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 2002200: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 2002204: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 2002208: d2 00 60 0c ld [ %g1 + 0xc ], %o1 200220c: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 2002210: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 2002214: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 2002218: 40 00 11 47 call 2006734 200221c: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 2002220: 80 a2 20 00 cmp %o0, 0 2002224: 12 80 00 05 bne 2002238 <== NEVER TAKEN 2002228: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 200222c: f0 07 bf fc ld [ %fp + -4 ], %i0 } 2002230: 81 c7 e0 08 ret 2002234: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 2002238: 40 00 1f da call 200a1a0 <== NOT EXECUTED 200223c: 01 00 00 00 nop <== NOT EXECUTED 2002240: 81 c7 e0 08 ret <== NOT EXECUTED 2002244: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02002050 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 2002050: 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') && 2002054: c2 4e 00 00 ldsb [ %i0 ], %g1 2002058: 80 a0 60 64 cmp %g1, 0x64 200205c: 02 80 00 43 be 2002168 <== ALWAYS TAKEN 2002060: a0 10 00 18 mov %i0, %l0 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 2002064: 03 00 00 3c sethi %hi(0xf000), %g1 2002068: 05 00 00 08 sethi %hi(0x2000), %g2 200206c: 82 0e 40 01 and %i1, %g1, %g1 2002070: 80 a0 40 02 cmp %g1, %g2 2002074: 12 80 00 4b bne 20021a0 <== NEVER TAKEN 2002078: 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; 200207c: e4 07 00 00 ld [ %i4 ], %l2 if (!device_name_table) 2002080: 80 a4 a0 00 cmp %l2, 0 2002084: 02 80 00 56 be 20021dc <== NEVER TAKEN 2002088: 03 00 80 42 sethi %hi(0x2010800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 200208c: e6 00 62 88 ld [ %g1 + 0x288 ], %l3 ! 2010a88 2002090: 80 a4 e0 00 cmp %l3, 0 2002094: 02 80 00 4c be 20021c4 <== NEVER TAKEN 2002098: 82 10 20 00 clr %g1 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 ); 200209c: a8 10 3f ff mov -1, %l4 20020a0: 10 80 00 0a b 20020c8 20020a4: a2 10 20 00 clr %l1 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) 20020a8: 40 00 2e b3 call 200db74 20020ac: 01 00 00 00 nop 20020b0: 80 a2 20 00 cmp %o0, 0 20020b4: 02 80 00 27 be 2002150 <== NEVER TAKEN 20020b8: a2 04 60 01 inc %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++){ 20020bc: 80 a4 40 13 cmp %l1, %l3 20020c0: 1a 80 00 0e bcc 20020f8 <== ALWAYS TAKEN 20020c4: 82 10 00 11 mov %l1, %g1 if (device_name_table[i].device_name == NULL) 20020c8: 85 28 60 04 sll %g1, 4, %g2 20020cc: 83 28 60 02 sll %g1, 2, %g1 20020d0: 82 00 40 02 add %g1, %g2, %g1 20020d4: d2 04 80 01 ld [ %l2 + %g1 ], %o1 20020d8: 80 a2 60 00 cmp %o1, 0 20020dc: 12 bf ff f3 bne 20020a8 20020e0: 90 10 00 10 mov %l0, %o0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 20020e4: a8 10 00 11 mov %l1, %l4 /* 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++){ 20020e8: a2 04 60 01 inc %l1 20020ec: 80 a4 40 13 cmp %l1, %l3 20020f0: 0a bf ff f6 bcs 20020c8 20020f4: 82 10 00 11 mov %l1, %g1 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 20020f8: 80 a5 3f ff cmp %l4, -1 20020fc: 02 80 00 32 be 20021c4 <== NEVER TAKEN 2002100: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 2002104: 7f ff ff 3e call 2001dfc 2002108: 01 00 00 00 nop 200210c: a2 10 00 08 mov %o0, %l1 device_name_table[slot].device_name = (char *)path; 2002110: 83 2d 20 04 sll %l4, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 2002114: 90 10 00 10 mov %l0, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 2002118: a9 2d 20 02 sll %l4, 2, %l4 200211c: a8 05 00 01 add %l4, %g1, %l4 2002120: e0 24 80 14 st %l0, [ %l2 + %l4 ] device_name_table[slot].device_name_length = strlen(path); 2002124: 40 00 2e e5 call 200dcb8 2002128: a4 04 80 14 add %l2, %l4, %l2 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 200212c: f2 24 a0 10 st %i1, [ %l2 + 0x10 ] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 2002130: d0 24 a0 04 st %o0, [ %l2 + 4 ] device_name_table[slot].major = major; 2002134: f4 24 a0 08 st %i2, [ %l2 + 8 ] device_name_table[slot].minor = minor; 2002138: f6 24 a0 0c st %i3, [ %l2 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 200213c: b0 10 20 00 clr %i0 2002140: 7f ff ff 33 call 2001e0c 2002144: 90 10 00 11 mov %l1, %o0 return 0; } 2002148: 81 c7 e0 08 ret 200214c: 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 ); 2002150: 40 00 2b 6e call 200cf08 <__errno> <== NOT EXECUTED 2002154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002158: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED 200215c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002160: 81 c7 e0 08 ret <== NOT EXECUTED 2002164: 81 e8 00 00 restore <== NOT EXECUTED * 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') && 2002168: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 200216c: 80 a0 60 65 cmp %g1, 0x65 2002170: 12 bf ff be bne 2002068 <== NEVER TAKEN 2002174: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 2002178: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 200217c: 80 a0 60 76 cmp %g1, 0x76 2002180: 12 bf ff ba bne 2002068 <== NEVER TAKEN 2002184: 03 00 00 3c sethi %hi(0xf000), %g1 2002188: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 200218c: 80 a0 60 00 cmp %g1, 0 2002190: 12 bf ff b5 bne 2002064 2002194: b0 10 20 00 clr %i0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 2002198: 81 c7 e0 08 ret 200219c: 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)) 20021a0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20021a4: 22 bf ff b7 be,a 2002080 <== NOT EXECUTED 20021a8: e4 07 00 00 ld [ %i4 ], %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20021ac: 40 00 2b 57 call 200cf08 <__errno> <== NOT EXECUTED 20021b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20021b4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20021b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20021bc: 81 c7 e0 08 ret <== NOT EXECUTED 20021c0: 81 e8 00 00 restore <== NOT EXECUTED 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 ); 20021c4: 40 00 2b 51 call 200cf08 <__errno> <== NOT EXECUTED 20021c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20021cc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20021d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20021d4: 81 c7 e0 08 ret <== NOT EXECUTED 20021d8: 81 e8 00 00 restore <== NOT EXECUTED 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 ); 20021dc: 40 00 2b 4b call 200cf08 <__errno> <== NOT EXECUTED 20021e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20021e4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 20021e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20021ec: 81 c7 e0 08 ret <== NOT EXECUTED 20021f0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002248 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 2002248: 9d e3 bf 90 save %sp, -112, %sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 200224c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 2002250: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 2002254: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 2002258: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 200225c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 2002260: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 2002264: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 2002268: 94 07 bf f4 add %fp, -12, %o2 200226c: 40 00 11 8f call 20068a8 2002270: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 2002274: 80 a2 20 00 cmp %o0, 0 2002278: 12 80 00 04 bne 2002288 <== NEVER TAKEN 200227c: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 2002280: 81 c7 e0 08 ret 2002284: 81 e8 00 00 restore np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 2002288: 40 00 1f c6 call 200a1a0 <== NOT EXECUTED 200228c: 01 00 00 00 nop <== NOT EXECUTED return 0; } 2002290: 81 c7 e0 08 ret <== NOT EXECUTED 2002294: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02002298 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2002298: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 200229c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 20022a0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 20022a4: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 20022a8: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 20022ac: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 20022b0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 20022b4: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 20022b8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 20022bc: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 20022c0: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 20022c4: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 20022c8: 40 00 11 90 call 2006908 <== NOT EXECUTED 20022cc: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 20022d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20022d4: 12 80 00 05 bne 20022e8 <== NOT EXECUTED 20022d8: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 20022dc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 20022e0: 81 c7 e0 08 ret <== NOT EXECUTED 20022e4: 81 e8 00 00 restore <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 20022e8: 40 00 1f ae call 200a1a0 <== NOT EXECUTED 20022ec: 01 00 00 00 nop <== NOT EXECUTED 20022f0: 81 c7 e0 08 ret <== NOT EXECUTED 20022f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 020022f8 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 20022f8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 20022fc: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 2002300: 80 a0 60 00 cmp %g1, 0 2002304: 02 80 00 0a be 200232c <== NEVER TAKEN 2002308: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 200230c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 buf->st_mode = the_dev->mode; 2002310: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 2002314: c2 00 60 08 ld [ %g1 + 8 ], %g1 the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 2002318: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; 200231c: c6 26 60 0c st %g3, [ %i1 + 0xc ] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 2002320: c2 26 60 18 st %g1, [ %i1 + 0x18 ] buf->st_mode = the_dev->mode; return 0; } 2002324: 81 c7 e0 08 ret 2002328: 91 e8 20 00 restore %g0, 0, %o0 { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 200232c: 40 00 2a f7 call 200cf08 <__errno> <== NOT EXECUTED 2002330: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002334: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2002338: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200233c: 81 c7 e0 08 ret <== NOT EXECUTED 2002340: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002344 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2002344: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 2002348: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 200234c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 2002350: c4 27 bf f8 st %g2, [ %fp + -8 ] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 2002354: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 2002358: c0 27 bf fc clr [ %fp + -4 ] rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 200235c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 2002360: d2 00 60 0c ld [ %g1 + 0xc ], %o1 2002364: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 2002368: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 200236c: f2 27 bf f0 st %i1, [ %fp + -16 ] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 2002370: f0 27 bf e0 st %i0, [ %fp + -32 ] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 2002374: 40 00 11 7d call 2006968 2002378: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 200237c: 80 a2 20 00 cmp %o0, 0 2002380: 12 80 00 05 bne 2002394 <== NEVER TAKEN 2002384: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 2002388: f0 07 bf fc ld [ %fp + -4 ], %i0 } 200238c: 81 c7 e0 08 ret 2002390: 81 e8 00 00 restore np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 2002394: 40 00 1f 83 call 200a1a0 <== NOT EXECUTED 2002398: 01 00 00 00 nop <== NOT EXECUTED 200239c: 81 c7 e0 08 ret <== NOT EXECUTED 20023a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02010074 : */ int device_close( rtems_libio_t *iop ) { 2010074: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 2010078: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 201007c: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 2010080: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 2010084: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 2010088: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 201008c: 94 07 bf f4 add %fp, -12, %o2 2010090: 40 00 04 fc call 2011480 2010094: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 2010098: 80 a2 20 00 cmp %o0, 0 201009c: 12 80 00 04 bne 20100ac <== NEVER TAKEN 20100a0: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 20100a4: 81 c7 e0 08 ret 20100a8: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 20100ac: 40 00 05 ec call 201185c <== NOT EXECUTED 20100b0: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 20100b4: 81 c7 e0 08 ret <== NOT EXECUTED 20100b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200ff74 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200ff74: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 200ff78: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 200ff7c: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 200ff80: f4 27 bf f8 st %i2, [ %fp + -8 ] { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 200ff84: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 200ff88: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200ff8c: 40 00 05 55 call 20114e0 200ff90: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200ff94: 80 a2 20 00 cmp %o0, 0 200ff98: 12 80 00 05 bne 200ffac <== NEVER TAKEN 200ff9c: 01 00 00 00 nop return rtems_deviceio_errno(status); return args.ioctl_return; 200ffa0: f0 07 bf fc ld [ %fp + -4 ], %i0 } 200ffa4: 81 c7 e0 08 ret 200ffa8: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 200ffac: 40 00 06 2c call 201185c <== NOT EXECUTED 200ffb0: 01 00 00 00 nop <== NOT EXECUTED 200ffb4: 81 c7 e0 08 ret <== NOT EXECUTED 200ffb8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 020100bc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 20100bc: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 20100c0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 20100c4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 20100c8: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 20100cc: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 20100d0: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 20100d4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 20100d8: 94 07 bf f4 add %fp, -12, %o2 20100dc: 40 00 05 19 call 2011540 20100e0: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 20100e4: 80 a2 20 00 cmp %o0, 0 20100e8: 12 80 00 04 bne 20100f8 <== NEVER TAKEN 20100ec: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 20100f0: 81 c7 e0 08 ret 20100f4: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 20100f8: 40 00 05 d9 call 201185c <== NOT EXECUTED 20100fc: 01 00 00 00 nop <== NOT EXECUTED return 0; } 2010100: 81 c7 e0 08 ret <== NOT EXECUTED 2010104: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02010018 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2010018: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 201001c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 2010020: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 2010024: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = buffer; 2010028: f2 27 bf f0 st %i1, [ %fp + -16 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 201002c: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = buffer; args.count = count; 2010030: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 2010034: c4 27 bf f8 st %g2, [ %fp + -8 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 2010038: f0 27 bf e0 st %i0, [ %fp + -32 ] args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 201003c: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_read( 2010040: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 2010044: 40 00 05 57 call 20115a0 2010048: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 201004c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2010050: 12 80 00 05 bne 2010064 <== NOT EXECUTED 2010054: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 2010058: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED } 201005c: 81 c7 e0 08 ret <== NOT EXECUTED 2010060: 81 e8 00 00 restore <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 2010064: 40 00 05 fe call 201185c <== NOT EXECUTED 2010068: 01 00 00 00 nop <== NOT EXECUTED 201006c: 81 c7 e0 08 ret <== NOT EXECUTED 2010070: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200ffbc : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200ffbc: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 200ffc0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200ffc4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 200ffc8: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 200ffcc: f2 27 bf f0 st %i1, [ %fp + -16 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 200ffd0: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 200ffd4: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 200ffd8: c4 27 bf f8 st %g2, [ %fp + -8 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 200ffdc: f0 27 bf e0 st %i0, [ %fp + -32 ] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 200ffe0: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 200ffe4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200ffe8: 40 00 05 86 call 2011600 200ffec: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200fff0: 80 a2 20 00 cmp %o0, 0 200fff4: 12 80 00 05 bne 2010008 <== NEVER TAKEN 200fff8: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 200fffc: f0 07 bf fc ld [ %fp + -4 ], %i0 } 2010000: 81 c7 e0 08 ret 2010004: 81 e8 00 00 restore the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 2010008: 40 00 06 15 call 201185c <== NOT EXECUTED 201000c: 01 00 00 00 nop <== NOT EXECUTED 2010010: 81 c7 e0 08 ret <== NOT EXECUTED 2010014: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02002b28 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 2002b28: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2002b2c: 03 00 80 8b sethi %hi(0x2022c00), %g1 2002b30: d0 00 62 60 ld [ %g1 + 0x260 ], %o0 ! 2022e60 2002b34: 92 10 20 00 clr %o1 2002b38: 94 10 20 00 clr %o2 2002b3c: 40 00 14 63 call 2007cc8 2002b40: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 2002b44: 80 a2 20 00 cmp %o0, 0 2002b48: 12 80 00 05 bne 2002b5c <== NEVER TAKEN 2002b4c: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 2002b50: 03 00 80 8b sethi %hi(0x2022c00), %g1 2002b54: b0 10 20 00 clr %i0 2002b58: c4 28 62 64 stb %g2, [ %g1 + 0x264 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 2002b5c: 81 c7 e0 08 ret 2002b60: 81 e8 00 00 restore =============================================================================== 02002b64 : static void disk_unlock(void) { 2002b64: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 2002b68: 03 00 80 8b sethi %hi(0x2022c00), %g1 2002b6c: d0 00 62 60 ld [ %g1 + 0x260 ], %o0 ! 2022e60 static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 2002b70: 03 00 80 8b sethi %hi(0x2022c00), %g1 2002b74: c0 28 62 64 clrb [ %g1 + 0x264 ] ! 2022e64 sc = rtems_semaphore_release(diskdevs_mutex); 2002b78: 40 00 14 9b call 2007de4 2002b7c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 2002b80: 80 a2 20 00 cmp %o0, 0 2002b84: 12 80 00 04 bne 2002b94 <== NEVER TAKEN 2002b88: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 2002b8c: 81 c7 e0 08 ret 2002b90: 81 e8 00 00 restore /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2002b94: 40 00 15 d6 call 20082ec <== NOT EXECUTED 2002b98: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02004d38 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2004d38: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2004d3c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 2004d40: 80 a0 60 00 cmp %g1, 0 2004d44: 12 80 00 04 bne 2004d54 <== NEVER TAKEN 2004d48: 01 00 00 00 nop 2004d4c: 81 c7 e0 08 ret 2004d50: 81 e8 00 00 restore rtems_interrupt_disable (level); 2004d54: 7f ff f4 d4 call 20020a4 <== NOT EXECUTED 2004d58: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2004d5c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 2004d60: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2004d64: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004d68: 02 80 00 14 be 2004db8 <== NOT EXECUTED 2004d6c: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2004d70: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 2004d74: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 2004d78: 7f ff f4 cf call 20020b4 <== NOT EXECUTED 2004d7c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2004d80: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2004d84: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004d88: 40 00 06 d3 call 20068d4 <== NOT EXECUTED 2004d8c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2004d90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004d94: 12 80 00 0b bne 2004dc0 <== NOT EXECUTED 2004d98: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2004d9c: 7f ff f4 c2 call 20020a4 <== NOT EXECUTED 2004da0: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2004da4: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 2004da8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2004dac: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004db0: 32 bf ff f2 bne,a 2004d78 <== NOT EXECUTED 2004db4: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2004db8: 7f ff f4 bf call 20020b4 <== NOT EXECUTED 2004dbc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 2004dc0: 40 00 08 66 call 2006f58 <== NOT EXECUTED =============================================================================== 0200346c : int dup2( int fildes, int fildes2 ) { 200346c: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003470: a0 07 bf b8 add %fp, -72, %l0 2003474: 90 10 00 18 mov %i0, %o0 2003478: 40 00 01 ed call 2003c2c 200347c: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 2003480: 80 a2 3f ff cmp %o0, -1 2003484: 12 80 00 04 bne 2003494 <== ALWAYS TAKEN 2003488: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 200348c: 81 c7 e0 08 ret 2003490: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003494: 40 00 01 e6 call 2003c2c 2003498: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 200349c: 80 a2 3f ff cmp %o0, -1 20034a0: 02 bf ff fb be 200348c <== ALWAYS TAKEN 20034a4: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 20034a8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 20034ac: 40 00 00 a2 call 2003734 <== NOT EXECUTED 20034b0: 92 10 20 00 clr %o1 <== NOT EXECUTED 20034b4: 81 c7 e0 08 ret <== NOT EXECUTED 20034b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02004764 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2004764: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2004768: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 200476c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004770: 02 80 00 09 be 2004794 <== NOT EXECUTED 2004774: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 2004778: 05 00 80 7a sethi %hi(0x201e800), %g2 <== NOT EXECUTED 200477c: c4 00 a2 2c ld [ %g2 + 0x22c ], %g2 ! 201ea2c <__ctype_ptr__><== NOT EXECUTED 2004780: 82 00 80 08 add %g2, %o0, %g1 <== NOT EXECUTED 2004784: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 2004788: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200478c: 12 80 00 06 bne 20047a4 <== NOT EXECUTED 2004790: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2004794: 7f ff ff 87 call 20045b0 <== NOT EXECUTED 2004798: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200479c: 81 c7 e0 08 ret <== NOT EXECUTED 20047a0: 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) && iscntrl(c) && (c != '\t') && (c != '\n')) { 20047a4: 02 bf ff fc be 2004794 <== NOT EXECUTED 20047a8: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 20047ac: 02 bf ff fa be 2004794 <== NOT EXECUTED 20047b0: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 20047b4: b0 1e 20 40 xor %i0, 0x40, %i0 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 20047b8: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 20047bc: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 20047c0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 20047c4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 20047c8: 7f ff ff 2b call 2004474 <== NOT EXECUTED 20047cc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 20047d0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 20047d4: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 20047d8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 20047dc: 81 c7 e0 08 ret <== NOT EXECUTED 20047e0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202cd08 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 202cd08: 03 00 81 d2 sethi %hi(0x2074800), %g1 <== NOT EXECUTED 202cd0c: d0 00 61 5c ld [ %g1 + 0x15c ], %o0 ! 207495c <== NOT EXECUTED 202cd10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202cd14: 02 80 00 05 be 202cd28 <== NOT EXECUTED 202cd18: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 202cd1c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202cd20: 40 00 76 30 call 204a5e0 <== NOT EXECUTED 202cd24: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 202cd28: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0202cd30 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 202cd30: 03 00 81 d2 sethi %hi(0x2074800), %g1 <== NOT EXECUTED 202cd34: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 2074874 <== NOT EXECUTED 202cd38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202cd3c: 02 80 00 05 be 202cd50 <== NOT EXECUTED 202cd40: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 202cd44: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202cd48: 40 00 76 26 call 204a5e0 <== NOT EXECUTED 202cd4c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 202cd50: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 020047e4 : * 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) { 20047e4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 20047e8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 20047ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20047f0: 02 80 00 36 be 20048c8 <== NOT EXECUTED 20047f4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 20047f8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20047fc: 12 80 00 35 bne 20048d0 <== NOT EXECUTED 2004800: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2004804: 27 00 80 7a sethi %hi(0x201e800), %l3 <== NOT EXECUTED 2004808: 29 00 80 75 sethi %hi(0x201d400), %l4 <== NOT EXECUTED 200480c: 25 00 80 75 sethi %hi(0x201d400), %l2 <== NOT EXECUTED 2004810: a6 14 e2 2c or %l3, 0x22c, %l3 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2004814: a8 15 21 d0 or %l4, 0x1d0, %l4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004818: 10 80 00 0c b 2004848 <== NOT EXECUTED 200481c: a4 14 a1 c8 or %l2, 0x1c8, %l2 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2004820: 12 80 00 6a bne 20049c8 <== NOT EXECUTED 2004824: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2004828: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 200482c: 02 80 00 63 be 20049b8 <== NOT EXECUTED 2004830: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2004834: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2004838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200483c: 02 80 00 5f be 20049b8 <== NOT EXECUTED 2004840: 01 00 00 00 nop <== NOT EXECUTED 2004844: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 2004848: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED 200484c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2004850: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2004854: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2004858: 02 bf ff f4 be 2004828 <== NOT EXECUTED 200485c: e2 09 00 01 ldub [ %g4 + %g1 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2004860: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2004864: 12 80 00 05 bne 2004878 <== NOT EXECUTED 2004868: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 200486c: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 2004870: 22 80 00 54 be,a 20049c0 <== NOT EXECUTED 2004874: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2004878: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 200487c: 02 80 00 24 be 200490c <== NOT EXECUTED 2004880: a2 04 60 01 inc %l1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2004884: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 2004888: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 200488c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004890: 12 bf ff e4 bne 2004820 <== NOT EXECUTED 2004894: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 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); 2004898: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 200489c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20048a0: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED 20048a4: 7f ff fe f4 call 2004474 <== NOT EXECUTED 20048a8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 20048ac: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 20048b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20048b4: 02 bf ff de be 200482c <== NOT EXECUTED 20048b8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 20048bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 20048c0: 12 bf ff dd bne 2004834 <== NOT EXECUTED 20048c4: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 20048c8: 81 c7 e0 08 ret <== NOT EXECUTED 20048cc: 81 e8 00 00 restore <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 20048d0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 20048d4: 02 80 00 38 be 20049b4 <== NOT EXECUTED 20048d8: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 20048dc: 12 bf ff cb bne 2004808 <== NOT EXECUTED 20048e0: 27 00 80 7a sethi %hi(0x201e800), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 20048e4: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 20048e8: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 20048ec: 7f ff ff 9e call 2004764 <== NOT EXECUTED 20048f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 20048f4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 20048f8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20048fc: 02 bf ff f3 be 20048c8 <== NOT EXECUTED 2004900: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 2004904: 7f ff ff 98 call 2004764 <== NOT EXECUTED 2004908: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 200490c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004910: 02 80 00 17 be 200496c <== NOT EXECUTED 2004914: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2004918: 96 08 a2 00 and %g2, 0x200, %o3 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 200491c: d8 04 c0 00 ld [ %l3 ], %o4 <== NOT EXECUTED 2004920: 10 80 00 07 b 200493c <== NOT EXECUTED 2004924: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2004928: 32 80 00 02 bne,a 2004930 <== NOT EXECUTED 200492c: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2004930: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004934: 22 80 00 0f be,a 2004970 <== NOT EXECUTED 2004938: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 200493c: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 <== NOT EXECUTED 2004940: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (c == '\t') { 2004944: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 2004948: 02 80 00 18 be 20049a8 <== NOT EXECUTED 200494c: 9a 03 00 03 add %o4, %g3, %o5 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2004950: c6 0b 60 01 ldub [ %o5 + 1 ], %g3 <== NOT EXECUTED 2004954: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 2004958: 12 bf ff f4 bne 2004928 <== NOT EXECUTED 200495c: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2004960: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004964: 12 bf ff f6 bne 200493c <== NOT EXECUTED 2004968: a2 04 60 01 inc %l1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 200496c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2004970: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 2004974: 16 bf ff ae bge 200482c <== NOT EXECUTED 2004978: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 200497c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2004980: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2004984: 7f ff fe bc call 2004474 <== NOT EXECUTED 2004988: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 200498c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2004990: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2004994: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 2004998: 06 bf ff f9 bl 200497c <== NOT EXECUTED 200499c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 20049a0: 10 bf ff a3 b 200482c <== NOT EXECUTED 20049a4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 20049a8: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED 20049ac: 10 bf ff e1 b 2004930 <== NOT EXECUTED 20049b0: a2 04 60 01 inc %l1 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 20049b4: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 20049b8: 81 c7 e0 08 ret <== NOT EXECUTED 20049bc: 81 e8 00 00 restore <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 20049c0: 7f ff ff 69 call 2004764 <== NOT EXECUTED 20049c4: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 20049c8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20049cc: 7f ff fe aa call 2004474 <== NOT EXECUTED 20049d0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 20049d4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 20049d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20049dc: 22 80 00 05 be,a 20049f0 <== NOT EXECUTED 20049e0: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED tty->column--; 20049e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20049e8: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 20049ec: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED 20049f0: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 20049f4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20049f8: 02 bf ff a9 be 200489c <== NOT EXECUTED 20049fc: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2004a00: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED 2004a04: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 2004a08: 12 bf ff a6 bne 20048a0 <== NOT EXECUTED 2004a0c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2004a10: 10 bf ff 87 b 200482c <== NOT EXECUTED 2004a14: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED =============================================================================== 0202962c : #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) { 202962c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2029630: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 <== NOT EXECUTED 2029634: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2029638: 02 80 00 5c be 20297a8 <== NOT EXECUTED 202963c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED 2029640: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 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) && 2029644: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 2029648: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 202964c: 08 80 00 67 bleu 20297e8 <== NOT EXECUTED 2029650: a0 10 20 00 clr %l0 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2029654: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2029658: 22 80 00 51 be,a 202979c <== NOT EXECUTED 202965c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED { if (fs_info->c.modified) 2029660: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 2029664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2029668: 02 80 00 3c be 2029758 <== NOT EXECUTED 202966c: a0 8c 20 ff andcc %l0, 0xff, %l0 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 2029670: 02 80 00 06 be 2029688 <== NOT EXECUTED 2029674: 01 00 00 00 nop <== NOT EXECUTED 2029678: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 202967c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2029680: 22 80 00 63 be,a 202980c <== NOT EXECUTED 2029684: 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); 2029688: 7f ff 6d 92 call 2004cd0 <== NOT EXECUTED 202968c: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 2029690: c0 2e 20 85 clrb [ %i0 + 0x85 ] <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2029694: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029698: 12 80 00 67 bne 2029834 <== NOT EXECUTED 202969c: c0 2e 20 84 clrb [ %i0 + 0x84 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 20296a0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 20296a4: 02 80 00 33 be 2029770 <== NOT EXECUTED 20296a8: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED 20296ac: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20296b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20296b4: 12 80 00 2f bne 2029770 <== NOT EXECUTED 20296b8: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 20296bc: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 20296c0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20296c4: 08 80 00 2a bleu 202976c <== NOT EXECUTED 20296c8: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED 20296cc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 20296d0: 10 80 00 10 b 2029710 <== NOT EXECUTED 20296d4: a2 07 bf fc add %fp, -4, %l1 <== 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); 20296d8: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 20296dc: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 20296e0: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 20296e4: 40 00 90 b3 call 204d9b0 <== NOT EXECUTED 20296e8: a0 04 20 01 inc %l0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 20296ec: 7f ff 6d 79 call 2004cd0 <== NOT EXECUTED 20296f0: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 20296f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20296f8: 12 80 00 12 bne 2029740 <== NOT EXECUTED 20296fc: 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++) 2029700: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2029704: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2029708: 08 80 00 1a bleu 2029770 <== NOT EXECUTED 202970c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 2029710: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED 2029714: 7f ff 65 1e call 2002b8c <.umul> <== NOT EXECUTED 2029718: e4 1e 20 58 ldd [ %i0 + 0x58 ], %l2 <== NOT EXECUTED 202971c: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 2029720: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 2029724: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 2029728: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 202972c: 7f ff 72 32 call 2005ff4 <== NOT EXECUTED 2029730: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2029734: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029738: 02 bf ff e8 be 20296d8 <== NOT EXECUTED 202973c: 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); 2029740: 40 00 83 50 call 204a480 <__errno> <== NOT EXECUTED 2029744: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029748: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 202974c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029750: 81 c7 e0 08 ret <== NOT EXECUTED 2029754: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2029758: 7f ff 6d 81 call 2004d5c <== NOT EXECUTED 202975c: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2029760: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029764: 12 80 00 34 bne 2029834 <== NOT EXECUTED 2029768: c0 2e 20 85 clrb [ %i0 + 0x85 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 202976c: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED 2029770: 02 80 00 2c be 2029820 <== NOT EXECUTED 2029774: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 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); 2029778: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED 202977c: 7f ff 72 1e call 2005ff4 <== NOT EXECUTED 2029780: 96 06 20 88 add %i0, 0x88, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2029784: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029788: 12 80 00 2b bne 2029834 <== NOT EXECUTED 202978c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2029790: f2 26 20 80 st %i1, [ %i0 + 0x80 ] <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 2029794: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] <== NOT EXECUTED } *buf = fs_info->c.buf; 2029798: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 202979c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED return RC_OK; } 20297a0: 81 c7 e0 08 ret <== NOT EXECUTED 20297a4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 20297a8: 02 80 00 14 be 20297f8 <== NOT EXECUTED 20297ac: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 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); 20297b0: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED 20297b4: 7f ff 72 10 call 2005ff4 <== NOT EXECUTED 20297b8: 96 06 20 88 add %i0, 0x88, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 20297bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20297c0: 12 80 00 1d bne 2029834 <== NOT EXECUTED 20297c4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 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) && 20297c8: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 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; 20297cc: f2 26 20 80 st %i1, [ %i0 + 0x80 ] <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 20297d0: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] <== NOT EXECUTED 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; 20297d4: c0 2e 20 84 clrb [ %i0 + 0x84 ] <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 20297d8: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 20297dc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20297e0: 18 bf ff 9d bgu 2029654 <== NOT EXECUTED 20297e4: a0 10 20 00 clr %l0 <== NOT EXECUTED 20297e8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 20297ec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20297f0: 10 bf ff 99 b 2029654 <== NOT EXECUTED 20297f4: a0 40 20 00 addx %g0, 0, %l0 <== NOT EXECUTED 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); 20297f8: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED 20297fc: 7f ff 72 33 call 20060c8 <== NOT EXECUTED 2029800: 96 06 20 88 add %i0, 0x88, %o3 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2029804: 10 bf ff ef b 20297c0 <== NOT EXECUTED 2029808: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 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, 202980c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2029810: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2029814: 40 00 90 67 call 204d9b0 <== NOT EXECUTED 2029818: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 202981c: 30 bf ff 9b b,a 2029688 <== 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); 2029820: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED 2029824: 7f ff 72 29 call 20060c8 <== NOT EXECUTED 2029828: 96 06 20 88 add %i0, 0x88, %o3 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 202982c: 10 bf ff d7 b 2029788 <== NOT EXECUTED 2029830: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 2029834: 40 00 83 13 call 204a480 <__errno> <== NOT EXECUTED 2029838: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202983c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2029840: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029844: 81 c7 e0 08 ret <== NOT EXECUTED 2029848: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029490 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2029490: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2029494: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 <== NOT EXECUTED return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2029498: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 202949c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20294a0: 02 80 00 41 be 20295a4 <== NOT EXECUTED 20294a4: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 20294a8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 20294ac: c4 14 20 14 lduh [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 20294b0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20294b4: 1a 80 00 46 bcc 20295cc <== NOT EXECUTED 20294b8: a2 10 20 00 clr %l1 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 20294bc: c2 0c 20 84 ldub [ %l0 + 0x84 ], %g1 <== NOT EXECUTED 20294c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20294c4: 02 80 00 3a be 20295ac <== NOT EXECUTED 20294c8: a2 8c 60 ff andcc %l1, 0xff, %l1 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 20294cc: 02 80 00 06 be 20294e4 <== NOT EXECUTED 20294d0: 01 00 00 00 nop <== NOT EXECUTED 20294d4: c2 0c 20 48 ldub [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 20294d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20294dc: 22 80 00 44 be,a 20295ec <== NOT EXECUTED 20294e0: c2 04 20 88 ld [ %l0 + 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); 20294e4: 7f ff 6d fb call 2004cd0 <== NOT EXECUTED 20294e8: d0 04 20 88 ld [ %l0 + 0x88 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 20294ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20294f0: 12 80 00 44 bne 2029600 <== NOT EXECUTED 20294f4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 20294f8: 02 80 00 32 be 20295c0 <== NOT EXECUTED 20294fc: c0 2c 20 84 clrb [ %l0 + 0x84 ] <== NOT EXECUTED 2029500: c2 0c 20 48 ldub [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 2029504: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2029508: 32 80 00 2f bne,a 20295c4 <== NOT EXECUTED 202950c: c0 2c 20 85 clrb [ %l0 + 0x85 ] <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2029510: c2 0c 20 09 ldub [ %l0 + 9 ], %g1 <== NOT EXECUTED 2029514: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2029518: 08 80 00 2a bleu 20295c0 <== NOT EXECUTED 202951c: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED 2029520: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2029524: 10 80 00 10 b 2029564 <== NOT EXECUTED 2029528: a4 07 bf fc add %fp, -4, %l2 <== 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); 202952c: d2 04 20 8c ld [ %l0 + 0x8c ], %o1 <== NOT EXECUTED 2029530: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2029534: d4 14 00 00 lduh [ %l0 ], %o2 <== NOT EXECUTED 2029538: 40 00 91 1e call 204d9b0 <== NOT EXECUTED 202953c: a2 04 60 01 inc %l1 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2029540: 7f ff 6d e4 call 2004cd0 <== NOT EXECUTED 2029544: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2029548: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202954c: 12 80 00 12 bne 2029594 <== NOT EXECUTED 2029550: 90 0c 60 ff and %l1, 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++) 2029554: c2 0c 20 09 ldub [ %l0 + 9 ], %g1 <== NOT EXECUTED 2029558: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 202955c: 28 80 00 1a bleu,a 20295c4 <== NOT EXECUTED 2029560: c0 2c 20 85 clrb [ %l0 + 0x85 ] <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 2029564: d2 04 20 18 ld [ %l0 + 0x18 ], %o1 <== NOT EXECUTED 2029568: 7f ff 65 89 call 2002b8c <.umul> <== NOT EXECUTED 202956c: e8 1c 20 58 ldd [ %l0 + 0x58 ], %l4 <== NOT EXECUTED 2029570: d4 04 20 80 ld [ %l0 + 0x80 ], %o2 <== NOT EXECUTED 2029574: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED 2029578: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 202957c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 2029580: 7f ff 72 9d call 2005ff4 <== NOT EXECUTED 2029584: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2029588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202958c: 02 bf ff e8 be 202952c <== NOT EXECUTED 2029590: 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); 2029594: 40 00 83 bb call 204a480 <__errno> <== NOT EXECUTED 2029598: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202959c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20295a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20295a4: 81 c7 e0 08 ret <== NOT EXECUTED 20295a8: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 20295ac: 7f ff 6d ec call 2004d5c <== NOT EXECUTED 20295b0: d0 04 20 88 ld [ %l0 + 0x88 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 20295b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20295b8: 12 80 00 12 bne 2029600 <== NOT EXECUTED 20295bc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 20295c0: c0 2c 20 85 clrb [ %l0 + 0x85 ] <== NOT EXECUTED return RC_OK; } 20295c4: 81 c7 e0 08 ret <== NOT EXECUTED 20295c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 20295cc: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED 20295d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 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) 20295d4: c2 0c 20 84 ldub [ %l0 + 0x84 ], %g1 <== NOT EXECUTED *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 20295d8: a2 40 20 00 addx %g0, 0, %l1 <== NOT EXECUTED 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) 20295dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20295e0: 32 bf ff bb bne,a 20294cc <== NOT EXECUTED 20295e4: a2 8c 60 ff andcc %l1, 0xff, %l1 <== NOT EXECUTED 20295e8: 30 bf ff f1 b,a 20295ac <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 20295ec: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 20295f0: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 20295f4: 40 00 90 ef call 204d9b0 <== NOT EXECUTED 20295f8: d4 14 00 00 lduh [ %l0 ], %o2 <== NOT EXECUTED 20295fc: 30 bf ff ba b,a 20294e4 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 2029600: 40 00 83 a0 call 204a480 <__errno> <== NOT EXECUTED 2029604: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029608: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 202960c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029610: 81 c7 e0 08 ret <== NOT EXECUTED 2029614: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202a464 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 202a464: 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)) ) 202a468: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 202a46c: 12 80 00 06 bne 202a484 <== NOT EXECUTED 202a470: c4 02 20 34 ld [ %o0 + 0x34 ], %g2 <== NOT EXECUTED 202a474: c2 08 a0 0a ldub [ %g2 + 0xa ], %g1 <== NOT EXECUTED 202a478: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 202a47c: 32 80 00 0e bne,a 202a4b4 <== NOT EXECUTED 202a480: c2 08 a0 02 ldub [ %g2 + 2 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 202a484: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 202a488: c6 08 a0 05 ldub [ %g2 + 5 ], %g3 <== NOT EXECUTED 202a48c: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 202a490: d6 08 a0 04 ldub [ %g2 + 4 ], %o3 <== NOT EXECUTED 202a494: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 202a498: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 202a49c: c2 08 a0 02 ldub [ %g2 + 2 ], %g1 <== NOT EXECUTED 202a4a0: 94 10 20 00 clr %o2 <== NOT EXECUTED 202a4a4: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 202a4a8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202a4ac: 7f ff fd db call 2029c18 <_fat_block_read> <== NOT EXECUTED 202a4b0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 202a4b4: d6 08 a0 04 ldub [ %g2 + 4 ], %o3 <== 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; 202a4b8: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED 202a4bc: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 202a4c0: 94 10 20 00 clr %o2 <== NOT EXECUTED 202a4c4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202a4c8: 7f ff fd d4 call 2029c18 <_fat_block_read> <== NOT EXECUTED 202a4cc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02029ae8 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 2029ae8: 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)) ) 2029aec: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029af0: 12 80 00 06 bne 2029b08 <== NOT EXECUTED 2029af4: c4 02 20 34 ld [ %o0 + 0x34 ], %g2 <== NOT EXECUTED 2029af8: c2 08 a0 0a ldub [ %g2 + 0xa ], %g1 <== NOT EXECUTED 2029afc: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2029b00: 32 80 00 0e bne,a 2029b38 <== NOT EXECUTED 2029b04: c2 08 a0 02 ldub [ %g2 + 2 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2029b08: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 2029b0c: c6 08 a0 05 ldub [ %g2 + 5 ], %g3 <== NOT EXECUTED 2029b10: 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, 2029b14: d6 08 a0 04 ldub [ %g2 + 4 ], %o3 <== NOT EXECUTED 2029b18: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2029b1c: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 2029b20: c2 08 a0 02 ldub [ %g2 + 2 ], %g1 <== NOT EXECUTED 2029b24: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029b28: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2029b2c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029b30: 7f ff ff 47 call 202984c <_fat_block_write> <== NOT EXECUTED 2029b34: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2029b38: d6 08 a0 04 ldub [ %g2 + 4 ], %o3 <== 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; 2029b3c: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED 2029b40: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2029b44: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029b48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029b4c: 7f ff ff 40 call 202984c <_fat_block_write> <== NOT EXECUTED 2029b50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02029908 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 2029908: 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; 202990c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 2029910: 89 2e 60 18 sll %i1, 0x18, %g4 <== NOT EXECUTED le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 2029914: d2 14 20 3c lduh [ %l0 + 0x3c ], %o1 <== 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); 2029918: 87 36 60 10 srl %i1, 0x10, %g3 <== NOT EXECUTED 202991c: 83 36 60 18 srl %i1, 0x18, %g1 <== NOT EXECUTED 2029920: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED 2029924: 82 11 00 01 or %g4, %g1, %g1 <== NOT EXECUTED 2029928: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 202992c: b3 36 60 08 srl %i1, 8, %i1 <== NOT EXECUTED 2029930: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED 2029934: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED 2029938: 82 10 40 19 or %g1, %i1, %g1 <== NOT EXECUTED 202993c: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2029940: 85 36 a0 10 srl %i2, 0x10, %g2 <== NOT EXECUTED 2029944: 87 2e a0 18 sll %i2, 0x18, %g3 <== 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); 2029948: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 202994c: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 2029950: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED 2029954: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2029958: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED 202995c: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED 2029960: b4 0e a0 ff and %i2, 0xff, %i2 <== NOT EXECUTED 2029964: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED 2029968: 82 10 40 1a or %g1, %i2, %g1 <== NOT EXECUTED 202996c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2029970: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); 2029974: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2029978: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 202997c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 2029980: 7f ff ff b3 call 202984c <_fat_block_write> <== NOT EXECUTED 2029984: 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, 2029988: d2 14 20 3c lduh [ %l0 + 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, 202998c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2029990: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2029994: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2029998: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 202999c: 7f ff ff ac call 202984c <_fat_block_write> <== NOT EXECUTED 20299a0: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 20299a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20299a8: 06 80 00 06 bl 20299c0 <== NOT EXECUTED 20299ac: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 20299b0: 06 80 00 04 bl 20299c0 <== NOT EXECUTED 20299b4: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; return RC_OK; } 20299b8: 81 c7 e0 08 ret <== NOT EXECUTED 20299bc: 81 e8 00 00 restore <== NOT EXECUTED 20299c0: 81 c7 e0 08 ret <== NOT EXECUTED 20299c4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02028fd4 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028fd4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED /* * 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) 2028fd8: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED 2028fdc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028fe0: 08 80 00 07 bleu 2028ffc <== NOT EXECUTED 2028fe4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED { fat_fd->links_num--; 2028fe8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2028fec: 90 10 20 00 clr %o0 <== NOT EXECUTED 2028ff0: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 2028ff4: 81 c7 e0 08 ret <== NOT EXECUTED 2028ff8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 2028ffc: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 2029000: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2029004: 22 80 00 16 be,a 202905c <== NOT EXECUTED 2029008: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 202900c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2029010: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2029014: 7f ff fe 0b call 2028840 <== NOT EXECUTED 2029018: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 202901c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029020: 12 bf ff f5 bne 2028ff4 <== NOT EXECUTED 2029024: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2029028: 7f ff 94 e5 call 200e3bc <_Chain_Extract> <== NOT EXECUTED 202902c: 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) ) 2029030: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2029034: 40 00 00 d4 call 2029384 <== NOT EXECUTED 2029038: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202903c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2029040: 32 80 00 13 bne,a 202908c <== NOT EXECUTED 2029044: 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); 2029048: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 202904c: 7f ff 7e 24 call 20088dc <== NOT EXECUTED 2029050: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2029054: 40 00 01 0f call 2029490 <== NOT EXECUTED 2029058: 81 e8 00 00 restore <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 202905c: 40 00 00 ca call 2029384 <== NOT EXECUTED 2029060: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2029064: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2029068: 02 80 00 05 be 202907c <== NOT EXECUTED 202906c: 01 00 00 00 nop <== NOT EXECUTED { fat_fd->links_num = 0; 2029070: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2029074: 40 00 01 07 call 2029490 <== NOT EXECUTED 2029078: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED 202907c: 7f ff 94 d0 call 200e3bc <_Chain_Extract> <== NOT EXECUTED 2029080: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 2029084: 10 bf ff f2 b 202904c <== NOT EXECUTED 2029088: 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) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 202908c: 40 00 00 b0 call 202934c <== NOT EXECUTED 2029090: 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); 2029094: 10 bf ff ee b 202904c <== NOT EXECUTED 2029098: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED =============================================================================== 020285ec : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20285ec: 9d e3 bf 98 save %sp, -104, %sp <== 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) 20285f0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20285f4: a8 10 00 18 mov %i0, %l4 <== 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) 20285f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 20285fc: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 2028600: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2028604: 02 80 00 33 be 20286d0 <== NOT EXECUTED 2028608: b0 10 20 00 clr %i0 <== 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; 202860c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2028610: c0 27 bf f8 clr [ %fp + -8 ] <== 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); 2028614: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2028618: 40 00 03 9e call 2029490 <== NOT EXECUTED 202861c: a4 07 bf f8 add %fp, -8, %l2 <== NOT EXECUTED if (rc != RC_OK) 2028620: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED 2028624: 12 80 00 33 bne 20286f0 <== NOT EXECUTED 2028628: ac 07 bf fc add %fp, -4, %l6 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 202862c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2028630: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 2028634: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 2028638: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 202863c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2028640: 1a 80 00 2c bcc 20286f0 <== NOT EXECUTED 2028644: 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)) ) 2028648: 02 80 00 24 be 20286d8 <== NOT EXECUTED 202864c: c2 05 20 34 ld [ %l4 + 0x34 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028650: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED 2028654: c2 08 60 05 ldub [ %g1 + 5 ], %g1 <== NOT EXECUTED 2028658: a6 02 7f fe add %o1, -2, %l3 <== NOT EXECUTED 202865c: a7 2c c0 01 sll %l3, %g1, %l3 <== NOT EXECUTED 2028660: a6 04 c0 02 add %l3, %g2, %l3 <== 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++ ) 2028664: c2 0c 60 04 ldub [ %l1 + 4 ], %g1 <== NOT EXECUTED 2028668: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202866c: 02 80 00 23 be 20286f8 <== NOT EXECUTED 2028670: a0 10 20 00 clr %l0 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2028674: 10 80 00 0c b 20286a4 <== NOT EXECUTED 2028678: d0 1c 60 58 ldd [ %l1 + 0x58 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 202867c: 7f ff 74 5c call 20057ec <== NOT EXECUTED 2028680: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2028684: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028688: 12 80 00 0e bne 20286c0 <== NOT EXECUTED 202868c: 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++ ) 2028690: c2 0c 60 04 ldub [ %l1 + 4 ], %g1 <== NOT EXECUTED 2028694: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 2028698: 08 80 00 18 bleu 20286f8 <== NOT EXECUTED 202869c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 20286a0: d0 1c 60 58 ldd [ %l1 + 0x58 ], %o0 <== NOT EXECUTED 20286a4: 94 04 00 13 add %l0, %l3, %o2 <== NOT EXECUTED 20286a8: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED 20286ac: 7f ff 76 87 call 20060c8 <== NOT EXECUTED 20286b0: a0 04 20 01 inc %l0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 20286b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20286b8: 02 bf ff f1 be 202867c <== NOT EXECUTED 20286bc: 01 00 00 00 nop <== 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 ); 20286c0: 40 00 87 70 call 204a480 <__errno> <== NOT EXECUTED 20286c4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20286c8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20286cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20286d0: 81 c7 e0 08 ret <== NOT EXECUTED 20286d4: 81 e8 00 00 restore <== 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)) ) 20286d8: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 20286dc: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 20286e0: 22 bf ff dd be,a 2028654 <== NOT EXECUTED 20286e4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20286e8: 10 bf ff df b 2028664 <== NOT EXECUTED 20286ec: e6 00 60 1c ld [ %g1 + 0x1c ], %l3 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 20286f0: 81 c7 e0 08 ret <== NOT EXECUTED 20286f4: 91 e8 00 15 restore %g0, %l5, %o0 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20286f8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 20286fc: 40 00 72 c2 call 2045204 <== NOT EXECUTED 2028700: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2028704: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2028708: 02 bf ff ca be 2028630 <== NOT EXECUTED 202870c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED return rc; } return rc; } 2028710: 81 c7 e0 08 ret <== NOT EXECUTED 2028714: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02028948 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2028948: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 202894c: f4 26 c0 00 st %i2, [ %i3 ] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 2028950: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 2028954: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 2028958: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 202895c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 2028960: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 2028964: 08 80 00 3f bleu 2028a60 <== NOT EXECUTED 2028968: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202896c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 2028970: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2028974: 22 80 00 3d be,a 2028a68 <== NOT EXECUTED 2028978: 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))) & 202897c: c6 14 60 06 lduh [ %l1 + 6 ], %g3 <== NOT EXECUTED (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2028980: a8 26 80 01 sub %i2, %g1, %l4 <== NOT EXECUTED 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))) & 2028984: 84 00 ff ff add %g3, -1, %g2 <== NOT EXECUTED 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 - 2028988: a4 08 80 01 and %g2, %g1, %l2 <== NOT EXECUTED 202898c: a4 20 c0 12 sub %g3, %l2, %l2 <== NOT EXECUTED 2028990: a4 0c 80 02 and %l2, %g2, %l2 <== NOT EXECUTED (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) 2028994: 80 a4 80 14 cmp %l2, %l4 <== NOT EXECUTED 2028998: 1a 80 00 3f bcc 2028a94 <== NOT EXECUTED 202899c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * 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) 20289a0: a8 a5 00 12 subcc %l4, %l2, %l4 <== NOT EXECUTED 20289a4: 02 80 00 3c be 2028a94 <== NOT EXECUTED 20289a8: a6 05 3f ff add %l4, -1, %l3 <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 20289ac: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 20289b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 20289b4: a7 34 c0 01 srl %l3, %g1, %l3 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 20289b8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 20289bc: a6 04 e0 01 inc %l3 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 20289c0: 96 07 bf f0 add %fp, -16, %o3 <== NOT EXECUTED 20289c4: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED 20289c8: 40 00 72 cb call 20454f4 <== NOT EXECUTED 20289cc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 20289d0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20289d4: 12 80 00 30 bne 2028a94 <== NOT EXECUTED 20289d8: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 20289dc: 02 80 00 53 be 2028b28 <== NOT EXECUTED 20289e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20289e4: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED 20289e8: 02 80 00 0b be 2028a14 <== NOT EXECUTED 20289ec: 88 38 00 01 xnor %g0, %g1, %g4 <== NOT EXECUTED *a_length = new_length - 20289f0: c6 0c 60 08 ldub [ %l1 + 8 ], %g3 <== NOT EXECUTED 20289f4: c4 14 60 06 lduh [ %l1 + 6 ], %g2 <== NOT EXECUTED 20289f8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 20289fc: a6 01 00 13 add %g4, %l3, %l3 <== NOT EXECUTED 2028a00: a8 0d 00 02 and %l4, %g2, %l4 <== NOT EXECUTED 2028a04: a7 2c c0 03 sll %l3, %g3, %l3 <== NOT EXECUTED 2028a08: a6 26 80 13 sub %i2, %l3, %l3 <== NOT EXECUTED 2028a0c: a8 24 c0 14 sub %l3, %l4, %l4 <== NOT EXECUTED 2028a10: e8 26 c0 00 st %l4, [ %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 ) 2028a14: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 <== NOT EXECUTED 2028a18: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 2028a1c: 32 80 00 20 bne,a 2028a9c <== NOT EXECUTED 2028a20: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 2028a24: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED fat_fd->map.file_cln = 0; 2028a28: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED (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; 2028a2c: c4 26 60 38 st %g2, [ %i1 + 0x38 ] <== NOT EXECUTED 2028a30: c4 26 60 1c st %g2, [ %i1 + 0x1c ] <== NOT EXECUTED } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2028a34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028a38: 22 80 00 08 be,a 2028a58 <== NOT EXECUTED 2028a3c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2028a40: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 2028a44: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED 2028a48: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028a4c: 02 80 00 22 be 2028ad4 <== NOT EXECUTED 2028a50: c4 26 60 3c st %g2, [ %i1 + 0x3c ] <== NOT EXECUTED return rc; } } } fat_fd->fat_file_size = new_length; 2028a54: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED return RC_OK; 2028a58: 81 c7 e0 08 ret <== NOT EXECUTED 2028a5c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2028a60: 81 c7 e0 08 ret <== NOT EXECUTED 2028a64: 91 e8 20 00 restore %g0, 0, %o0 <== 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)) && 2028a68: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2028a6c: 32 bf ff c5 bne,a 2028980 <== NOT EXECUTED 2028a70: c6 14 60 06 lduh [ %l1 + 6 ], %g3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028a74: c4 0c 60 0a ldub [ %l1 + 0xa ], %g2 <== NOT EXECUTED 2028a78: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028a7c: 22 bf ff c1 be,a 2028980 <== NOT EXECUTED 2028a80: c6 14 60 06 lduh [ %l1 + 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); 2028a84: 40 00 86 7f call 204a480 <__errno> <== NOT EXECUTED 2028a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028a8c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2028a90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028a94: 81 c7 e0 08 ret <== NOT EXECUTED 2028a98: 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) 2028a9c: 80 a2 7f ff cmp %o1, -1 <== NOT EXECUTED 2028aa0: 02 80 00 18 be 2028b00 <== NOT EXECUTED 2028aa4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 2028aa8: d2 27 bf f8 st %o1, [ %fp + -8 ] <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 2028aac: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED 2028ab0: 40 00 71 10 call 2044ef0 <== NOT EXECUTED 2028ab4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( rc != RC_OK ) 2028ab8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2028abc: 12 80 00 0d bne 2028af0 <== NOT EXECUTED 2028ac0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 2028ac4: 40 00 02 73 call 2029490 <== NOT EXECUTED 2028ac8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2028acc: 10 bf ff da b 2028a34 <== NOT EXECUTED 2028ad0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 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); 2028ad4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2028ad8: 40 00 04 20 call 2029b58 <== NOT EXECUTED 2028adc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( rc != RC_OK ) 2028ae0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2028ae4: 22 bf ff dd be,a 2028a58 <== NOT EXECUTED 2028ae8: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 2028aec: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2028af0: 40 00 72 49 call 2045414 <== NOT EXECUTED 2028af4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 2028af8: 81 c7 e0 08 ret <== NOT EXECUTED 2028afc: 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, 2028b00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028b04: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028b08: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2028b0c: 7f ff ff 18 call 202876c <== NOT EXECUTED 2028b10: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2028b14: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2028b18: 12 bf ff f5 bne 2028aec <== NOT EXECUTED 2028b1c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 2028b20: 10 bf ff e4 b 2028ab0 <== NOT EXECUTED 2028b24: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED /* this means that low level I/O error occured */ if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 2028b28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028b2c: 12 bf ff af bne 20289e8 <== NOT EXECUTED 2028b30: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED 2028b34: 30 bf ff d4 b,a 2028a84 <== NOT EXECUTED =============================================================================== 0202876c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 202876c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 2028770: 82 07 a0 50 add %fp, 0x50, %g1 <== NOT EXECUTED 2028774: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED 2028778: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 202877c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2028780: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2028784: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2028788: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED 202878c: 02 80 00 08 be 20287ac <== NOT EXECUTED 2028790: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 2028794: 40 00 87 3b call 204a480 <__errno> <== NOT EXECUTED 2028798: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202879c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20287a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; break; } return rc; } 20287a4: 81 c7 e0 08 ret <== NOT EXECUTED 20287a8: 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 ) 20287ac: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); 20287b0: 86 07 a0 58 add %fp, 0x58, %g3 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 20287b4: 80 a6 c0 02 cmp %i3, %g2 <== NOT EXECUTED 20287b8: 1a 80 00 1c bcc 2028828 <== NOT EXECUTED 20287bc: c6 27 bf f8 st %g3, [ %fp + -8 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20287c0: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 20287c4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 20287c8: 22 80 00 0e be,a 2028800 <== NOT EXECUTED 20287cc: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20287d0: d4 08 60 08 ldub [ %g1 + 8 ], %o2 <== NOT EXECUTED 20287d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20287d8: 95 36 c0 0a srl %i3, %o2, %o2 <== NOT EXECUTED 20287dc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20287e0: 7f ff ff 55 call 2028534 <== NOT EXECUTED 20287e4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if ( rc != RC_OK ) 20287e8: b0 92 60 00 orcc %o1, 0, %i0 <== NOT EXECUTED 20287ec: 12 bf ff ee bne 20287a4 <== NOT EXECUTED 20287f0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret = cur_cln; 20287f4: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED break; 20287f8: 81 c7 e0 08 ret <== NOT EXECUTED 20287fc: 81 e8 00 00 restore <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028800: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2028804: 32 bf ff f4 bne,a 20287d4 <== NOT EXECUTED 2028808: d4 08 60 08 ldub [ %g1 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 202880c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2028810: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028814: 22 bf ff f0 be,a 20287d4 <== NOT EXECUTED 2028818: d4 08 60 08 ldub [ %g1 + 8 ], %o2 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 202881c: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED return RC_OK; 2028820: 81 c7 e0 08 ret <== NOT EXECUTED 2028824: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); 2028828: 40 00 87 16 call 204a480 <__errno> <== NOT EXECUTED 202882c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028830: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028834: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028838: 81 c7 e0 08 ret <== NOT EXECUTED 202883c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02028534 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2028534: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2028538: e2 06 60 34 ld [ %i1 + 0x34 ], %l1 <== NOT EXECUTED 202853c: 80 a4 40 1a cmp %l1, %i2 <== NOT EXECUTED 2028540: 22 80 00 25 be,a 20285d4 <== NOT EXECUTED 2028544: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2028548: 2a 80 00 18 bcs,a 20285a8 <== NOT EXECUTED 202854c: 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; 2028550: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED 2028554: a2 10 00 1a mov %i2, %l1 <== NOT EXECUTED 2028558: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 202855c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2028560: 02 80 00 15 be 20285b4 <== NOT EXECUTED 2028564: a0 10 20 00 clr %l0 <== NOT EXECUTED 2028568: 10 80 00 05 b 202857c <== NOT EXECUTED 202856c: a4 07 bf fc add %fp, -4, %l2 <== NOT EXECUTED 2028570: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 2028574: 08 80 00 10 bleu 20285b4 <== NOT EXECUTED 2028578: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 202857c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2028580: 40 00 73 21 call 2045204 <== NOT EXECUTED 2028584: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2028588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202858c: 22 bf ff f9 be,a 2028570 <== NOT EXECUTED 2028590: a0 04 20 01 inc %l0 <== NOT EXECUTED return rc; 2028594: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 2028598: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 202859c: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 20285a0: 81 c7 e0 08 ret <== NOT EXECUTED 20285a4: 91 e8 00 02 restore %g0, %g2, %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; 20285a8: 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; 20285ac: 10 bf ff ec b 202855c <== NOT EXECUTED 20285b0: 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; 20285b4: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 20285b8: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 20285bc: 84 10 20 00 clr %g2 <== NOT EXECUTED 20285c0: 86 10 20 00 clr %g3 <== NOT EXECUTED 20285c4: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; } 20285c8: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 20285cc: 81 c7 e0 08 ret <== NOT EXECUTED 20285d0: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 20285d4: 84 10 20 00 clr %g2 <== NOT EXECUTED 20285d8: 86 10 20 00 clr %g3 <== NOT EXECUTED 20285dc: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 20285e0: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 20285e4: 81 c7 e0 08 ret <== NOT EXECUTED 20285e8: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED =============================================================================== 02028718 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028718: 9d e3 bf a0 save %sp, -96, %sp <== 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) + 202871c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2028720: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2028724: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028728: e2 06 60 24 ld [ %i1 + 0x24 ], %l1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 202872c: 7f ff 97 24 call 200e3bc <_Chain_Extract> <== NOT EXECUTED 2028730: 90 10 00 19 mov %i1, %o0 <== 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 ); 2028734: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 2028738: a3 34 60 05 srl %l1, 5, %l1 <== NOT EXECUTED 202873c: a2 0c 60 01 and %l1, 1, %l1 <== NOT EXECUTED 2028740: 83 2c 60 04 sll %l1, 4, %g1 <== NOT EXECUTED 2028744: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028748: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 202874c: a2 20 40 11 sub %g1, %l1, %l1 <== NOT EXECUTED 2028750: 7f ff 97 0f call 200e38c <_Chain_Append> <== NOT EXECUTED 2028754: 90 02 00 11 add %o0, %l1, %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; 2028758: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 202875c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2028760: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 2028764: 81 c7 e0 08 ret <== NOT EXECUTED 2028768: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202909c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 202909c: 9d e3 bf a0 save %sp, -96, %sp <== 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) + 20290a0: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20290a4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 20290a8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20290ac: 02 80 00 0c be 20290dc <== NOT EXECUTED 20290b0: 84 10 20 01 mov 1, %g2 <== 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)) ) 20290b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20290b8: 32 80 00 7d bne,a 20292ac <== NOT EXECUTED 20290bc: c4 0c 20 05 ldub [ %l0 + 5 ], %g2 <== NOT EXECUTED 20290c0: c4 0c 20 0a ldub [ %l0 + 0xa ], %g2 <== NOT EXECUTED 20290c4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 20290c8: 22 80 00 79 be,a 20292ac <== NOT EXECUTED 20290cc: c4 0c 20 05 ldub [ %l0 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20290d0: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== 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) << 20290d4: c2 0c 20 03 ldub [ %l0 + 3 ], %g1 <== NOT EXECUTED 20290d8: 85 28 80 01 sll %g2, %g1, %g2 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 20290dc: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 20290e0: da 04 20 68 ld [ %l0 + 0x68 ], %o5 <== 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) + 20290e4: 87 30 60 05 srl %g1, 5, %g3 <== NOT EXECUTED 20290e8: a3 30 60 09 srl %g1, 9, %l1 <== NOT EXECUTED 20290ec: 86 08 e0 0f and %g3, 0xf, %g3 <== NOT EXECUTED 20290f0: a2 00 80 11 add %g2, %l1, %l1 <== NOT EXECUTED 20290f4: a3 2c 60 04 sll %l1, 4, %l1 <== NOT EXECUTED 20290f8: a2 04 40 03 add %l1, %g3, %l1 <== NOT EXECUTED 20290fc: 82 0c 60 01 and %l1, 1, %g1 <== NOT EXECUTED 2029100: a7 28 60 04 sll %g1, 4, %l3 <== NOT EXECUTED 2029104: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 2029108: a6 24 c0 01 sub %l3, %g1, %l3 <== NOT EXECUTED 202910c: c2 03 40 13 ld [ %o5 + %l3 ], %g1 <== NOT EXECUTED 2029110: 9a 03 40 13 add %o5, %l3, %o5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2029114: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2029118: 80 a3 40 01 cmp %o5, %g1 <== NOT EXECUTED 202911c: 22 80 00 1f be,a 2029198 <== NOT EXECUTED 2029120: da 04 20 6c ld [ %l0 + 0x6c ], %o5 <== NOT EXECUTED 2029124: 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) 2029128: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 202912c: 02 80 00 0c be 202915c <== NOT EXECUTED 2029130: 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)) ) 2029134: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2029138: 32 80 00 67 bne,a 20292d4 <== NOT EXECUTED 202913c: c8 0c 20 05 ldub [ %l0 + 5 ], %g4 <== NOT EXECUTED 2029140: c6 0c 20 0a ldub [ %l0 + 0xa ], %g3 <== NOT EXECUTED 2029144: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 2029148: 22 80 00 63 be,a 20292d4 <== NOT EXECUTED 202914c: c8 0c 20 05 ldub [ %l0 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2029150: c8 04 20 1c ld [ %l0 + 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) << 2029154: c6 0c 20 03 ldub [ %l0 + 3 ], %g3 <== NOT EXECUTED 2029158: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 202915c: c6 00 60 24 ld [ %g1 + 0x24 ], %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) 2029160: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED 2029164: 87 30 e0 09 srl %g3, 9, %g3 <== NOT EXECUTED 2029168: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED 202916c: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED 2029170: 89 29 20 04 sll %g4, 4, %g4 <== NOT EXECUTED 2029174: 88 01 00 02 add %g4, %g2, %g4 <== NOT EXECUTED 2029178: 80 a4 40 04 cmp %l1, %g4 <== NOT EXECUTED 202917c: 22 80 00 62 be,a 2029304 <== NOT EXECUTED 2029180: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2029184: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2029188: 80 a3 40 01 cmp %o5, %g1 <== NOT EXECUTED 202918c: 32 bf ff e7 bne,a 2029128 <== NOT EXECUTED 2029190: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 2029194: da 04 20 6c ld [ %l0 + 0x6c ], %o5 <== NOT EXECUTED 2029198: c2 03 40 13 ld [ %o5 + %l3 ], %g1 <== NOT EXECUTED 202919c: 9a 03 40 13 add %o5, %l3, %o5 <== NOT EXECUTED 20291a0: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 20291a4: 80 a0 40 0d cmp %g1, %o5 <== NOT EXECUTED 20291a8: 02 80 00 1f be 2029224 <== NOT EXECUTED 20291ac: a8 10 3f ff mov -1, %l4 <== 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) + 20291b0: 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) 20291b4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 20291b8: 02 80 00 0c be 20291e8 <== NOT EXECUTED 20291bc: 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)) ) 20291c0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20291c4: 32 80 00 3f bne,a 20292c0 <== NOT EXECUTED 20291c8: c8 0c 20 05 ldub [ %l0 + 5 ], %g4 <== NOT EXECUTED 20291cc: c6 0c 20 0a ldub [ %l0 + 0xa ], %g3 <== NOT EXECUTED 20291d0: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 20291d4: 22 80 00 3b be,a 20292c0 <== NOT EXECUTED 20291d8: c8 0c 20 05 ldub [ %l0 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20291dc: c8 04 20 1c ld [ %l0 + 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) << 20291e0: c6 0c 20 03 ldub [ %l0 + 3 ], %g3 <== NOT EXECUTED 20291e4: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 20291e8: c6 00 60 24 ld [ %g1 + 0x24 ], %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) 20291ec: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED 20291f0: 87 30 e0 09 srl %g3, 9, %g3 <== NOT EXECUTED 20291f4: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED 20291f8: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED 20291fc: 89 29 20 04 sll %g4, 4, %g4 <== NOT EXECUTED 2029200: 88 01 00 02 add %g4, %g2, %g4 <== NOT EXECUTED 2029204: 80 a4 40 04 cmp %l1, %g4 <== NOT EXECUTED 2029208: 02 80 00 38 be 20292e8 <== NOT EXECUTED 202920c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2029210: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2029214: 80 a3 40 01 cmp %o5, %g1 <== NOT EXECUTED 2029218: 32 bf ff e7 bne,a 20291b4 <== NOT EXECUTED 202921c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED 2029220: a8 10 3f ff mov -1, %l4 <== 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)); 2029224: 7f ff 7f 8f call 2009060 <== NOT EXECUTED 2029228: 90 10 20 44 mov 0x44, %o0 <== NOT EXECUTED 202922c: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED if ( lfat_fd == NULL ) 2029230: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029234: 02 80 00 40 be 2029334 <== NOT EXECUTED 2029238: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 202923c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2029240: 40 00 92 6f call 204dbfc <== NOT EXECUTED 2029244: 94 10 20 44 mov 0x44, %o2 <== NOT EXECUTED lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 2029248: c2 0c a0 30 ldub [ %l2 + 0x30 ], %g1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 202924c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 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; 2029250: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2029254: da 06 40 00 ld [ %i1 ], %o5 <== NOT EXECUTED 2029258: c8 06 60 04 ld [ %i1 + 4 ], %g4 <== NOT EXECUTED 202925c: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED 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; 2029260: c2 2c a0 30 stb %g1, [ %l2 + 0x30 ] <== NOT EXECUTED 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; 2029264: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2029268: da 24 a0 20 st %o5, [ %l2 + 0x20 ] <== NOT EXECUTED 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; 202926c: c2 24 a0 08 st %g1, [ %l2 + 8 ] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2029270: c8 24 a0 24 st %g4, [ %l2 + 0x24 ] <== NOT EXECUTED 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; 2029274: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 2029278: c6 24 a0 28 st %g3, [ %l2 + 0x28 ] <== NOT EXECUTED 202927c: c4 24 a0 2c st %g2, [ %l2 + 0x2c ] <== NOT EXECUTED if ( rc != RC_OK ) 2029280: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2029284: 02 80 00 25 be 2029318 <== NOT EXECUTED 2029288: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] <== NOT EXECUTED lfat_fd->ino = key; 202928c: e2 24 a0 0c st %l1, [ %l2 + 0xc ] <== 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 ); 2029290: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 2029294: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2029298: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED 202929c: 7f ff 94 3c call 200e38c <_Chain_Append> <== NOT EXECUTED 20292a0: b0 10 20 00 clr %i0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 20292a4: 81 c7 e0 08 ret <== NOT EXECUTED 20292a8: 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) + 20292ac: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 <== NOT EXECUTED 20292b0: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 20292b4: 85 28 40 02 sll %g1, %g2, %g2 <== NOT EXECUTED 20292b8: 10 bf ff 87 b 20290d4 <== NOT EXECUTED 20292bc: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 20292c0: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 <== NOT EXECUTED 20292c4: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 20292c8: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED 20292cc: 10 bf ff c5 b 20291e0 <== NOT EXECUTED 20292d0: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED 20292d4: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 <== NOT EXECUTED 20292d8: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 20292dc: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED 20292e0: 10 bf ff 9d b 2029154 <== NOT EXECUTED 20292e4: 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) ) 20292e8: 02 bf ff cf be 2029224 <== NOT EXECUTED 20292ec: a8 10 20 00 clr %l4 <== NOT EXECUTED 20292f0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 20292f4: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 20292f8: 32 bf ff c7 bne,a 2029214 <== NOT EXECUTED 20292fc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 2029300: 30 bf ff c9 b,a 2029224 <== NOT EXECUTED /* 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; 2029304: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED lfat_fd->links_num++; 2029308: 84 00 a0 01 inc %g2 <== NOT EXECUTED 202930c: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED return rc; 2029310: 81 c7 e0 08 ret <== NOT EXECUTED 2029314: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2029318: 40 00 00 20 call 2029398 <== NOT EXECUTED 202931c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2029320: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029324: 12 bf ff db bne 2029290 <== NOT EXECUTED 2029328: d0 24 a0 0c st %o0, [ %l2 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 202932c: 7f ff 7d 6c call 20088dc <== NOT EXECUTED 2029330: 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 ); 2029334: 40 00 84 53 call 204a480 <__errno> <== NOT EXECUTED 2029338: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202933c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2029340: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029344: 81 c7 e0 08 ret <== NOT EXECUTED 2029348: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02028da8 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2028da8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 2028dac: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED 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) 2028db0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2028db4: 02 80 00 50 be 2028ef4 <== NOT EXECUTED 2028db8: e4 06 20 34 ld [ %i0 + 0x34 ], %l2 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 2028dbc: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 2028dc0: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 2028dc4: 08 80 00 4c bleu 2028ef4 <== NOT EXECUTED 2028dc8: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2028dcc: 08 80 00 68 bleu 2028f6c <== NOT EXECUTED 2028dd0: 84 20 40 1b sub %g1, %i3, %g2 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2028dd4: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028dd8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2028ddc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028de0: 02 80 00 47 be 2028efc <== NOT EXECUTED 2028de4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028de8: ea 0c a0 08 ldub [ %l2 + 8 ], %l5 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028dec: e2 14 a0 06 lduh [ %l2 + 6 ], %l1 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028df0: ab 36 80 15 srl %i2, %l5, %l5 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2028df4: a8 07 bf fc add %fp, -4, %l4 <== NOT EXECUTED 2028df8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028dfc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028e00: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 2028e04: 7f ff fd cc call 2028534 <== NOT EXECUTED 2028e08: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED if (rc != RC_OK) 2028e0c: b0 92 60 00 orcc %o1, 0, %i0 <== NOT EXECUTED 2028e10: 12 80 00 66 bne 2028fa8 <== NOT EXECUTED 2028e14: a3 2c 60 10 sll %l1, 0x10, %l1 <== NOT EXECUTED return rc; while (count > 0) 2028e18: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028e1c: a3 34 60 10 srl %l1, 0x10, %l1 <== NOT EXECUTED 2028e20: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028e24: 02 80 00 63 be 2028fb0 <== NOT EXECUTED 2028e28: b4 0e 80 11 and %i2, %l1, %i2 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 2028e2c: c6 0c a0 02 ldub [ %l2 + 2 ], %g3 <== NOT EXECUTED 2028e30: d4 14 80 00 lduh [ %l2 ], %o2 <== NOT EXECUTED 2028e34: 82 10 00 1a mov %i2, %g1 <== NOT EXECUTED 2028e38: 10 80 00 20 b 2028eb8 <== NOT EXECUTED 2028e3c: a6 10 20 00 clr %l3 <== 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)) ) 2028e40: da 08 a0 0a ldub [ %g2 + 0xa ], %o5 <== NOT EXECUTED 2028e44: 80 8b 60 03 btst 3, %o5 <== NOT EXECUTED 2028e48: 22 80 00 27 be,a 2028ee4 <== NOT EXECUTED 2028e4c: da 00 a0 30 ld [ %g2 + 0x30 ], %o5 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028e50: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED 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); 2028e54: 87 30 40 03 srl %g1, %g3, %g3 <== NOT EXECUTED 2028e58: 98 07 00 13 add %i4, %l3, %o4 <== NOT EXECUTED 2028e5c: 92 02 40 03 add %o1, %g3, %o1 <== NOT EXECUTED 2028e60: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED 2028e64: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 2028e68: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 2028e6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028e70: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2028e74: 40 00 03 69 call 2029c18 <_fat_block_read> <== NOT EXECUTED 2028e78: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; 2028e7c: a6 04 c0 11 add %l3, %l1, %l3 <== NOT EXECUTED 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 ) 2028e80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028e84: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 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 ) 2028e88: 06 80 00 37 bl 2028f64 <== NOT EXECUTED 2028e8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2028e90: ec 07 bf fc ld [ %fp + -4 ], %l6 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028e94: 40 00 70 dc call 2045204 <== NOT EXECUTED 2028e98: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED if ( rc != RC_OK ) 2028e9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028ea0: 12 80 00 38 bne 2028f80 <== NOT EXECUTED 2028ea4: b6 a6 c0 11 subcc %i3, %l1, %i3 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028ea8: 02 80 00 38 be 2028f88 <== NOT EXECUTED 2028eac: 82 10 20 00 clr %g1 <== NOT EXECUTED 2028eb0: c6 0c a0 02 ldub [ %l2 + 2 ], %g3 <== NOT EXECUTED 2028eb4: d4 14 80 00 lduh [ %l2 ], %o2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028eb8: e2 14 a0 06 lduh [ %l2 + 6 ], %l1 <== NOT EXECUTED 2028ebc: a2 24 40 01 sub %l1, %g1, %l1 <== NOT EXECUTED 2028ec0: 80 a4 40 1b cmp %l1, %i3 <== NOT EXECUTED 2028ec4: 08 80 00 03 bleu 2028ed0 <== NOT EXECUTED 2028ec8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 2028ecc: a2 10 00 1b mov %i3, %l1 <== 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)) ) 2028ed0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028ed4: 88 00 bf fe add %g2, -2, %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)) ) 2028ed8: 02 bf ff da be 2028e40 <== NOT EXECUTED 2028edc: c4 04 20 34 ld [ %l0 + 0x34 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028ee0: da 00 a0 30 ld [ %g2 + 0x30 ], %o5 <== NOT EXECUTED 2028ee4: d2 08 a0 05 ldub [ %g2 + 5 ], %o1 <== NOT EXECUTED 2028ee8: 93 29 00 09 sll %g4, %o1, %o1 <== NOT EXECUTED 2028eec: 10 bf ff da b 2028e54 <== NOT EXECUTED 2028ef0: 92 02 40 0d add %o1, %o5, %o1 <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ 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; 2028ef4: 81 c7 e0 08 ret <== NOT EXECUTED 2028ef8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 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)) && 2028efc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2028f00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028f04: 32 bf ff ba bne,a 2028dec <== NOT EXECUTED 2028f08: ea 0c a0 08 ldub [ %l2 + 8 ], %l5 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028f0c: c2 0c a0 0a ldub [ %l2 + 0xa ], %g1 <== NOT EXECUTED 2028f10: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2028f14: 22 bf ff b6 be,a 2028dec <== NOT EXECUTED 2028f18: ea 0c a0 08 ldub [ %l2 + 8 ], %l5 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2028f1c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2028f20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028f24: 32 80 00 27 bne,a 2028fc0 <== NOT EXECUTED 2028f28: c6 0c a0 05 ldub [ %l2 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028f2c: d2 04 a0 1c ld [ %l2 + 0x1c ], %o1 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 2028f30: d4 14 80 00 lduh [ %l2 ], %o2 <== NOT EXECUTED 2028f34: c2 0c a0 02 ldub [ %l2 + 2 ], %g1 <== NOT EXECUTED 2028f38: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2028f3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028f40: 94 0e 80 0a and %i2, %o2, %o2 <== NOT EXECUTED 2028f44: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 2028f48: b5 36 80 01 srl %i2, %g1, %i2 <== NOT EXECUTED 2028f4c: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED 2028f50: 40 00 03 32 call 2029c18 <_fat_block_read> <== NOT EXECUTED 2028f54: 92 02 40 1a add %o1, %i2, %o1 <== NOT EXECUTED if ( ret < 0 ) 2028f58: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2028f5c: 16 80 00 13 bge 2028fa8 <== NOT EXECUTED 2028f60: 01 00 00 00 nop <== 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; } 2028f64: 81 c7 e0 08 ret <== NOT EXECUTED 2028f68: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2028f6c: 80 a6 80 02 cmp %i2, %g2 <== NOT EXECUTED 2028f70: 28 bf ff 9b bleu,a 2028ddc <== NOT EXECUTED 2028f74: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2028f78: 10 bf ff 98 b 2028dd8 <== NOT EXECUTED 2028f7c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) 2028f80: 81 c7 e0 08 ret <== NOT EXECUTED 2028f84: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028f88: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028f8c: c2 0c a0 08 ldub [ %l2 + 8 ], %g1 <== NOT EXECUTED 2028f90: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 2028f94: ec 26 60 38 st %l6, [ %i1 + 0x38 ] <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028f98: a6 06 80 13 add %i2, %l3, %l3 <== NOT EXECUTED 2028f9c: a7 34 c0 01 srl %l3, %g1, %l3 <== NOT EXECUTED 2028fa0: aa 04 c0 15 add %l3, %l5, %l5 <== NOT EXECUTED 2028fa4: ea 26 60 34 st %l5, [ %i1 + 0x34 ] <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2028fa8: 81 c7 e0 08 ret <== NOT EXECUTED 2028fac: 81 e8 00 00 restore <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028fb0: b0 10 20 00 clr %i0 <== NOT EXECUTED 2028fb4: ac 10 20 00 clr %l6 <== NOT EXECUTED 2028fb8: 10 bf ff f5 b 2028f8c <== NOT EXECUTED 2028fbc: a6 10 20 00 clr %l3 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028fc0: c4 04 a0 30 ld [ %l2 + 0x30 ], %g2 <== NOT EXECUTED 2028fc4: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 2028fc8: 93 28 40 03 sll %g1, %g3, %o1 <== NOT EXECUTED 2028fcc: 10 bf ff d9 b 2028f30 <== NOT EXECUTED 2028fd0: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED =============================================================================== 02028448 : * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { fat_fd->links_num++; 2028448: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED * RETURNS: * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { 202844c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED fat_fd->links_num++; 2028450: 84 00 a0 01 inc %g2 <== NOT EXECUTED return RC_OK; } 2028454: 90 10 20 00 clr %o0 <== NOT EXECUTED 2028458: 81 c3 e0 08 retl <== NOT EXECUTED 202845c: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED =============================================================================== 02028460 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028460: 9d e3 bf 98 save %sp, -104, %sp <== 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)) && 2028464: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028468: a4 10 00 18 mov %i0, %l2 <== 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)) && 202846c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2028470: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED 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)) && 2028474: 02 80 00 24 be 2028504 <== NOT EXECUTED 2028478: e2 06 60 1c ld [ %i1 + 0x1c ], %l1 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 202847c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028480: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED 2028484: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 2028488: 84 0c 40 02 and %l1, %g2, %g2 <== NOT EXECUTED 202848c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2028490: 1a 80 00 18 bcc 20284f0 <== NOT EXECUTED 2028494: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 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; 2028498: 10 80 00 0d b 20284cc <== NOT EXECUTED 202849c: e2 27 bf fc st %l1, [ %fp + -4 ] <== 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; 20284a0: c4 14 20 06 lduh [ %l0 + 6 ], %g2 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20284a4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== 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; 20284a8: 84 00 c0 02 add %g3, %g2, %g2 <== NOT EXECUTED 20284ac: c4 26 60 18 st %g2, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20284b0: c6 04 20 0c ld [ %l0 + 0xc ], %g3 <== NOT EXECUTED 20284b4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED 20284b8: 86 08 40 03 and %g1, %g3, %g3 <== NOT EXECUTED 20284bc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 20284c0: 1a 80 00 0e bcc 20284f8 <== NOT EXECUTED 20284c4: 90 10 20 00 clr %o0 <== NOT EXECUTED 20284c8: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20284cc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 20284d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 20284d4: 40 00 73 4c call 2045204 <== NOT EXECUTED 20284d8: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20284dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20284e0: 22 bf ff f0 be,a 20284a0 <== NOT EXECUTED 20284e4: c6 06 60 18 ld [ %i1 + 0x18 ], %g3 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 20284e8: 81 c7 e0 08 ret <== NOT EXECUTED 20284ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20284f0: a2 10 20 00 clr %l1 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 20284f4: 90 10 20 00 clr %o0 <== NOT EXECUTED 20284f8: e2 26 60 3c st %l1, [ %i1 + 0x3c ] <== NOT EXECUTED return rc; } 20284fc: 81 c7 e0 08 ret <== NOT EXECUTED 2028500: 91 e8 00 08 restore %g0, %o0, %o0 <== 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)) && 2028504: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2028508: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202850c: 32 bf ff dd bne,a 2028480 <== NOT EXECUTED 2028510: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028514: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 <== NOT EXECUTED 2028518: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 202851c: 22 bf ff d9 be,a 2028480 <== NOT EXECUTED 2028520: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2028524: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2028528: 90 10 20 00 clr %o0 <== NOT EXECUTED return rc; 202852c: 10 bf ff ef b 20284e8 <== NOT EXECUTED 2028530: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED =============================================================================== 02028840 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2028840: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 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 ) 2028844: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 2028848: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 202884c: 08 80 00 33 bleu 2028918 <== NOT EXECUTED 2028850: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 <== NOT EXECUTED { 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; 2028854: 86 10 3f ff mov -1, %g3 <== NOT EXECUTED uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2028858: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 202885c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028860: 02 80 00 31 be 2028924 <== NOT EXECUTED 2028864: c6 27 bf f8 st %g3, [ %fp + -8 ] <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2028868: c6 10 a0 06 lduh [ %g2 + 6 ], %g3 <== NOT EXECUTED 202886c: c4 08 a0 08 ldub [ %g2 + 8 ], %g2 <== NOT EXECUTED 2028870: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 2028874: b4 00 c0 1a add %g3, %i2, %i2 <== NOT EXECUTED 2028878: b5 36 80 02 srl %i2, %g2, %i2 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 202887c: 85 2e 80 02 sll %i2, %g2, %g2 <== NOT EXECUTED 2028880: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2028884: 08 80 00 25 bleu 2028918 <== NOT EXECUTED 2028888: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 202888c: 02 80 00 09 be 20288b0 <== NOT EXECUTED 2028890: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 2028894: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028898: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 202889c: 7f ff ff 26 call 2028534 <== NOT EXECUTED 20288a0: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED if (rc != RC_OK) 20288a4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20288a8: 12 80 00 1d bne 202891c <== NOT EXECUTED 20288ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20288b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20288b4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 20288b8: 7f ff ff 1f call 2028534 <== NOT EXECUTED 20288bc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20288c0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20288c4: 12 80 00 16 bne 202891c <== NOT EXECUTED 20288c8: 01 00 00 00 nop <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20288cc: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 20288d0: 40 00 72 d1 call 2045414 <== NOT EXECUTED 20288d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (rc != RC_OK) 20288d8: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 20288dc: 12 80 00 10 bne 202891c <== NOT EXECUTED 20288e0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED return rc; if (cl_start != 0) 20288e4: 02 80 00 0e be 202891c <== NOT EXECUTED 20288e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20288ec: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20288f0: 40 00 71 80 call 2044ef0 <== NOT EXECUTED 20288f4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20288f8: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 20288fc: 12 80 00 08 bne 202891c <== NOT EXECUTED 2028900: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2028904: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 2028908: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== 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; 202890c: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2028910: 10 80 00 03 b 202891c <== NOT EXECUTED 2028914: c2 26 60 38 st %g1, [ %i1 + 0x38 ] <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 2028918: 92 10 20 00 clr %o1 <== NOT EXECUTED } return RC_OK; } 202891c: 81 c7 e0 08 ret <== NOT EXECUTED 2028920: 91 e8 00 09 restore %g0, %o1, %o0 <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 2028924: 11 00 81 aa sethi %hi(0x206a800), %o0 <== NOT EXECUTED 2028928: 15 00 81 aa sethi %hi(0x206a800), %o2 <== NOT EXECUTED 202892c: 17 00 81 aa sethi %hi(0x206a800), %o3 <== NOT EXECUTED 2028930: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED 2028934: 94 12 a2 b0 or %o2, 0x2b0, %o2 <== NOT EXECUTED 2028938: 96 12 e2 98 or %o3, 0x298, %o3 <== NOT EXECUTED 202893c: 40 00 0e 85 call 202c350 <__assert_func> <== NOT EXECUTED 2028940: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED =============================================================================== 02028b38 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2028b38: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 2028b3c: 90 10 20 00 clr %o0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2028b40: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 2028b44: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2028b48: 02 80 00 81 be 2028d4c <== NOT EXECUTED 2028b4c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 <== NOT EXECUTED return cmpltd; if ( start > fat_fd->fat_file_size ) 2028b50: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED { 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; 2028b54: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t c = 0; if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 2028b58: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 2028b5c: 0a 80 00 7e bcs 2028d54 <== NOT EXECUTED 2028b60: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 2028b64: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 <== NOT EXECUTED 2028b68: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2028b6c: 18 80 00 7a bgu 2028d54 <== NOT EXECUTED 2028b70: 82 20 40 1b sub %g1, %i3, %g1 <== NOT EXECUTED 2028b74: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 2028b78: 18 80 00 77 bgu 2028d54 <== NOT EXECUTED 2028b7c: a4 06 c0 1a add %i3, %i2, %l2 <== NOT EXECUTED (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); 2028b80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2028b84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028b88: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 2028b8c: 7f ff ff 6f call 2028948 <== NOT EXECUTED 2028b90: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED if (rc != RC_OK) 2028b94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028b98: 12 80 00 6d bne 2028d4c <== NOT EXECUTED 2028b9c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 2028ba0: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 2028ba4: 32 80 00 02 bne,a 2028bac <== NOT EXECUTED 2028ba8: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028bac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2028bb0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028bb4: 22 80 00 48 be,a 2028cd4 <== NOT EXECUTED 2028bb8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028bbc: e8 0c 60 08 ldub [ %l1 + 8 ], %l4 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028bc0: e4 14 60 06 lduh [ %l1 + 6 ], %l2 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028bc4: a9 36 80 14 srl %i2, %l4, %l4 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2028bc8: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 2028bcc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028bd0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2028bd4: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 2028bd8: 7f ff fe 57 call 2028534 <== NOT EXECUTED 2028bdc: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED if (rc != RC_OK) 2028be0: 90 92 60 00 orcc %o1, 0, %o0 <== NOT EXECUTED 2028be4: 12 80 00 5a bne 2028d4c <== NOT EXECUTED 2028be8: a5 2c a0 10 sll %l2, 0x10, %l2 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028bec: a5 34 a0 10 srl %l2, 0x10, %l2 <== NOT EXECUTED 2028bf0: a4 04 bf ff add %l2, -1, %l2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028bf4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028bf8: b4 0e 80 12 and %i2, %l2, %i2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028bfc: ac 10 20 00 clr %l6 <== NOT EXECUTED 2028c00: 02 80 00 5c be 2028d70 <== NOT EXECUTED 2028c04: a4 10 20 00 clr %l2 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 2028c08: c8 0c 60 02 ldub [ %l1 + 2 ], %g4 <== NOT EXECUTED 2028c0c: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED 2028c10: 10 80 00 22 b 2028c98 <== NOT EXECUTED 2028c14: 84 10 00 1a mov %i2, %g2 <== 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)) ) 2028c18: d8 08 e0 0a ldub [ %g3 + 0xa ], %o4 <== NOT EXECUTED 2028c1c: 80 8b 20 03 btst 3, %o4 <== NOT EXECUTED 2028c20: 22 80 00 29 be,a 2028cc4 <== NOT EXECUTED 2028c24: d8 00 e0 30 ld [ %g3 + 0x30 ], %o4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028c28: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED 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); 2028c2c: 89 30 80 04 srl %g2, %g4, %g4 <== NOT EXECUTED 2028c30: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED 2028c34: 92 02 40 04 add %o1, %g4, %o1 <== NOT EXECUTED 2028c38: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 2028c3c: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028c40: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED 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); 2028c44: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2028c48: 98 07 00 12 add %i4, %l2, %o4 <== NOT EXECUTED 2028c4c: 94 0a 80 02 and %o2, %g2, %o2 <== NOT EXECUTED 2028c50: 40 00 02 ff call 202984c <_fat_block_write> <== NOT EXECUTED 2028c54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028c58: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED 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 ) 2028c5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028c60: 06 80 00 3a bl 2028d48 <== NOT EXECUTED 2028c64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2028c68: ec 07 bf fc ld [ %fp + -4 ], %l6 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2028c6c: ea 07 bf f8 ld [ %fp + -8 ], %l5 <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028c70: 40 00 71 65 call 2045204 <== NOT EXECUTED 2028c74: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED if ( rc != RC_OK ) 2028c78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028c7c: 12 80 00 34 bne 2028d4c <== NOT EXECUTED 2028c80: b6 a6 c0 15 subcc %i3, %l5, %i3 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028c84: 02 80 00 3a be 2028d6c <== NOT EXECUTED 2028c88: a4 04 80 15 add %l2, %l5, %l2 <== NOT EXECUTED 2028c8c: c8 0c 60 02 ldub [ %l1 + 2 ], %g4 <== NOT EXECUTED 2028c90: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED 2028c94: 84 10 20 00 clr %g2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028c98: c2 14 60 06 lduh [ %l1 + 6 ], %g1 <== NOT EXECUTED 2028c9c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2028ca0: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 2028ca4: 08 80 00 03 bleu 2028cb0 <== NOT EXECUTED 2028ca8: c6 07 bf fc ld [ %fp + -4 ], %g3 <== NOT EXECUTED 2028cac: 82 10 00 1b mov %i3, %g1 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2028cb0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028cb4: 9a 00 ff fe add %g3, -2, %o5 <== 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)) ) 2028cb8: 02 bf ff d8 be 2028c18 <== NOT EXECUTED 2028cbc: c6 04 20 34 ld [ %l0 + 0x34 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028cc0: d8 00 e0 30 ld [ %g3 + 0x30 ], %o4 <== NOT EXECUTED 2028cc4: d2 08 e0 05 ldub [ %g3 + 5 ], %o1 <== NOT EXECUTED 2028cc8: 93 2b 40 09 sll %o5, %o1, %o1 <== NOT EXECUTED 2028ccc: 10 bf ff d8 b 2028c2c <== NOT EXECUTED 2028cd0: 92 02 40 0c add %o1, %o4, %o1 <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028cd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028cd8: 32 bf ff ba bne,a 2028bc0 <== NOT EXECUTED 2028cdc: e8 0c 60 08 ldub [ %l1 + 8 ], %l4 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028ce0: c2 0c 60 0a ldub [ %l1 + 0xa ], %g1 <== NOT EXECUTED 2028ce4: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2028ce8: 22 bf ff b6 be,a 2028bc0 <== NOT EXECUTED 2028cec: e8 0c 60 08 ldub [ %l1 + 8 ], %l4 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2028cf0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== 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)) ) 2028cf4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2028cf8: 12 80 00 26 bne 2028d90 <== NOT EXECUTED 2028cfc: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 2028d00: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED 2028d04: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 2028d08: 22 80 00 23 be,a 2028d94 <== NOT EXECUTED 2028d0c: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028d10: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 2028d14: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED 2028d18: c2 0c 60 02 ldub [ %l1 + 2 ], %g1 <== NOT EXECUTED 2028d1c: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2028d20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2028d24: 94 0e 80 0a and %i2, %o2, %o2 <== NOT EXECUTED 2028d28: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 2028d2c: b5 36 80 01 srl %i2, %g1, %i2 <== NOT EXECUTED 2028d30: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED 2028d34: 40 00 02 c6 call 202984c <_fat_block_write> <== NOT EXECUTED 2028d38: 92 02 40 1a add %o1, %i2, %o1 <== NOT EXECUTED if ( ret < 0 ) 2028d3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028d40: 16 80 00 03 bge 2028d4c <== NOT EXECUTED 2028d44: 01 00 00 00 nop <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ 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; 2028d48: 90 10 3f ff mov -1, %o0 ! ffffffff <== NOT EXECUTED } 2028d4c: 81 c7 e0 08 ret <== NOT EXECUTED 2028d50: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2028d54: 40 00 85 cb call 204a480 <__errno> <== NOT EXECUTED 2028d58: 01 00 00 00 nop <== NOT EXECUTED 2028d5c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2028d60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028d64: 10 bf ff fa b 2028d4c <== NOT EXECUTED 2028d68: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028d6c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028d70: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 <== NOT EXECUTED 2028d74: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 2028d78: ec 26 60 38 st %l6, [ %i1 + 0x38 ] <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028d7c: a4 06 80 12 add %i2, %l2, %l2 <== NOT EXECUTED 2028d80: a5 34 80 01 srl %l2, %g1, %l2 <== NOT EXECUTED 2028d84: a8 04 80 14 add %l2, %l4, %l4 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2028d88: 10 bf ff f1 b 2028d4c <== NOT EXECUTED 2028d8c: e8 26 60 34 st %l4, [ %i1 + 0x34 ] <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028d90: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 <== NOT EXECUTED 2028d94: c2 08 60 05 ldub [ %g1 + 5 ], %g1 <== NOT EXECUTED 2028d98: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 2028d9c: 93 28 80 01 sll %g2, %g1, %o1 <== NOT EXECUTED 2028da0: 10 bf ff dd b 2028d14 <== NOT EXECUTED 2028da4: 92 02 40 03 add %o1, %g3, %o1 <== NOT EXECUTED =============================================================================== 02045414 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2045414: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2045418: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 204541c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2045420: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED 2045424: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 2045428: 84 0e 40 02 and %i1, %g2, %g2 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 204542c: a2 10 00 18 mov %i0, %l1 <== 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) 2045430: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2045434: a6 10 20 00 clr %l3 <== NOT EXECUTED 2045438: 08 80 00 24 bleu 20454c8 <== NOT EXECUTED 204543c: aa 10 20 00 clr %l5 <== NOT EXECUTED 2045440: a4 10 00 19 mov %i1, %l2 <== NOT EXECUTED 2045444: 10 80 00 0e b 204547c <== NOT EXECUTED 2045448: a8 07 bf fc add %fp, -4, %l4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 204544c: 7f ff fe a9 call 2044ef0 <== NOT EXECUTED 2045450: 01 00 00 00 nop <== NOT EXECUTED if ( rc != RC_OK ) 2045454: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2045458: 02 80 00 03 be 2045464 <== NOT EXECUTED 204545c: e4 07 bf fc ld [ %fp + -4 ], %l2 <== NOT EXECUTED 2045460: aa 10 00 08 mov %o0, %l5 <== 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) 2045464: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED 2045468: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 204546c: 84 0c 80 02 and %l2, %g2, %g2 <== NOT EXECUTED 2045470: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2045474: 1a 80 00 15 bcc 20454c8 <== NOT EXECUTED 2045478: a6 04 e0 01 inc %l3 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 204547c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2045480: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 2045484: 7f ff ff 60 call 2045204 <== NOT EXECUTED 2045488: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 204548c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 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); 2045490: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2045494: 94 10 20 00 clr %o2 <== NOT EXECUTED 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 ) 2045498: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 204549c: 02 bf ff ec be 204544c <== NOT EXECUTED 20454a0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20454a4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED 20454a8: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 20454ac: 02 80 00 03 be 20454b8 <== NOT EXECUTED 20454b0: 82 04 c0 01 add %l3, %g1, %g1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 20454b4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 20454b8: 7f ff 8f f6 call 2029490 <== NOT EXECUTED 20454bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 20454c0: 81 c7 e0 08 ret <== NOT EXECUTED 20454c4: 81 e8 00 00 restore <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20454c8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED 20454cc: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 20454d0: 02 80 00 04 be 20454e0 <== NOT EXECUTED 20454d4: f2 24 20 44 st %i1, [ %l0 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 20454d8: 82 04 c0 01 add %l3, %g1, %g1 <== NOT EXECUTED 20454dc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 20454e0: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED 20454e4: 7f ff 8f eb call 2029490 <== NOT EXECUTED 20454e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 20454ec: 81 c7 e0 08 ret <== NOT EXECUTED 20454f0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202934c : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 202934c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2029350: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2029354: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED 2029358: c2 00 a0 70 ld [ %g2 + 0x70 ], %g1 <== NOT EXECUTED 202935c: c4 00 a0 7c ld [ %g2 + 0x7c ], %g2 <== NOT EXECUTED 2029360: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED 2029364: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2029368: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 202936c: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2029370: 85 2b 40 02 sll %o5, %g2, %g2 <== NOT EXECUTED 2029374: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED 2029378: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED } 202937c: 81 c7 e0 08 ret <== NOT EXECUTED 2029380: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02045204 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 2045204: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 2045208: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 204520c: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 2045210: 08 80 00 6c bleu 20453c0 <== NOT EXECUTED 2045214: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED 2045218: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 204521c: 82 00 60 01 inc %g1 <== NOT EXECUTED 2045220: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2045224: 18 80 00 67 bgu 20453c0 <== NOT EXECUTED 2045228: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 204522c: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 <== NOT EXECUTED 2045230: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2045234: 12 80 00 24 bne 20452c4 <== NOT EXECUTED 2045238: e6 0c 20 02 ldub [ %l0 + 2 ], %l3 <== NOT EXECUTED 204523c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2045240: 02 80 00 27 be 20452dc <== NOT EXECUTED 2045244: 01 00 00 00 nop <== NOT EXECUTED 2045248: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 204524c: a3 2e 60 01 sll %i1, 1, %l1 <== NOT EXECUTED 2045250: a7 34 40 13 srl %l1, %l3, %l3 <== NOT EXECUTED 2045254: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2045258: e8 14 00 00 lduh [ %l0 ], %l4 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 204525c: a4 07 bf fc add %fp, -4, %l2 <== NOT EXECUTED 2045260: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2045264: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 2045268: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 204526c: 7f ff 90 f0 call 202962c <== NOT EXECUTED 2045270: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED if (rc != RC_OK) 2045274: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2045278: 12 80 00 11 bne 20452bc <== NOT EXECUTED 204527c: a9 2d 20 10 sll %l4, 0x10, %l4 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 2045280: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 <== NOT EXECUTED 2045284: 80 a0 60 02 cmp %g1, 2 <== 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); 2045288: a9 35 20 10 srl %l4, 0x10, %l4 <== NOT EXECUTED 204528c: a8 05 3f ff add %l4, -1, %l4 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2045290: 02 80 00 18 be 20452f0 <== NOT EXECUTED 2045294: a2 0c 40 14 and %l1, %l4, %l1 <== NOT EXECUTED 2045298: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 204529c: 02 80 00 35 be 2045370 <== NOT EXECUTED 20452a0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20452a4: 02 80 00 20 be 2045324 <== NOT EXECUTED 20452a8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 20452ac: 40 00 14 75 call 204a480 <__errno> <== NOT EXECUTED 20452b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20452b4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20452b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 20452bc: 81 c7 e0 08 ret <== NOT EXECUTED 20452c0: 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) + 20452c4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 20452c8: a3 36 60 01 srl %i1, 1, %l1 <== NOT EXECUTED 20452cc: a2 04 40 19 add %l1, %i1, %l1 <== NOT EXECUTED 20452d0: a7 34 40 13 srl %l1, %l3, %l3 <== NOT EXECUTED 20452d4: 10 bf ff e1 b 2045258 <== NOT EXECUTED 20452d8: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED 20452dc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 20452e0: a3 2e 60 02 sll %i1, 2, %l1 <== NOT EXECUTED 20452e4: a7 34 40 13 srl %l1, %l3, %l3 <== NOT EXECUTED 20452e8: 10 bf ff dc b 2045258 <== NOT EXECUTED 20452ec: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 20452f0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 20452f4: 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)); 20452f8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 20452fc: 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)); 2045300: c2 10 40 11 lduh [ %g1 + %l1 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2045304: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2045308: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 204530c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2045310: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2045314: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2045318: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 204531c: 81 c7 e0 08 ret <== NOT EXECUTED 2045320: 91 e8 20 00 restore %g0, 0, %o0 <== 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) ) 2045324: c6 14 00 00 lduh [ %l0 ], %g3 <== NOT EXECUTED 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))); 2045328: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 204532c: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 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))); 2045330: c2 08 80 11 ldub [ %g2 + %l1 ], %g1 <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 2045334: 80 a0 c0 11 cmp %g3, %l1 <== NOT EXECUTED 2045338: 02 80 00 28 be 20453d8 <== NOT EXECUTED 204533c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 2045340: a2 00 80 11 add %g2, %l1, %l1 <== NOT EXECUTED 2045344: c4 0c 60 01 ldub [ %l1 + 1 ], %g2 <== NOT EXECUTED 2045348: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 204534c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2045350: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 2045354: 80 8e 60 01 btst 1, %i1 <== NOT EXECUTED 2045358: 22 80 00 17 be,a 20453b4 <== NOT EXECUTED 204535c: 82 08 6f ff and %g1, 0xfff, %g1 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; 2045360: 83 30 60 04 srl %g1, 4, %g1 <== NOT EXECUTED 2045364: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 2045368: 81 c7 e0 08 ret <== NOT EXECUTED 204536c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED *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)); 2045370: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045374: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 2045378: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 204537c: 85 30 60 10 srl %g1, 0x10, %g2 <== NOT EXECUTED 2045380: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED 2045384: 87 30 60 18 srl %g1, 0x18, %g3 <== NOT EXECUTED 2045388: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 204538c: 86 11 00 03 or %g4, %g3, %g3 <== NOT EXECUTED 2045390: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2045394: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2045398: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 204539c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20453a0: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED 20453a4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20453a8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 20453ac: 81 c7 e0 08 ret <== NOT EXECUTED 20453b0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 20453b4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 20453b8: 81 c7 e0 08 ret <== NOT EXECUTED 20453bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 20453c0: 40 00 14 30 call 204a480 <__errno> <== NOT EXECUTED 20453c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20453c8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20453cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20453d0: 81 c7 e0 08 ret <== NOT EXECUTED 20453d4: 81 e8 00 00 restore <== NOT EXECUTED * 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, 20453d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20453dc: 92 04 e0 01 add %l3, 1, %o1 <== NOT EXECUTED 20453e0: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED 20453e4: 7f ff 90 92 call 202962c <== NOT EXECUTED 20453e8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &block0); if (rc != RC_OK) 20453ec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20453f0: 12 bf ff b3 bne 20452bc <== NOT EXECUTED 20453f4: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 20453f8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20453fc: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2 <== NOT EXECUTED 2045400: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED 2045404: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2045408: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 204540c: 10 bf ff d2 b 2045354 <== NOT EXECUTED 2045410: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED =============================================================================== 02029398 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2029398: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 202939c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== 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)) 20293a0: 23 03 ff ff sethi %hi(0xffffc00), %l1 <== NOT EXECUTED 20293a4: da 04 20 78 ld [ %l0 + 0x78 ], %o5 <== NOT EXECUTED 20293a8: a2 14 63 ff or %l1, 0x3ff, %l1 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 20293ac: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 20293b0: 02 80 00 20 be 2029430 <== NOT EXECUTED 20293b4: 92 10 00 0d mov %o5, %o1 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 20293b8: c6 04 20 70 ld [ %l0 + 0x70 ], %g3 <== NOT EXECUTED 20293bc: c2 04 20 74 ld [ %l0 + 0x74 ], %g1 <== NOT EXECUTED 20293c0: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 20293c4: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED 20293c8: 98 08 60 07 and %g1, 7, %o4 <== NOT EXECUTED 20293cc: 96 00 c0 02 add %g3, %g2, %o3 <== NOT EXECUTED 20293d0: 89 39 00 0c sra %g4, %o4, %g4 <== NOT EXECUTED 20293d4: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED 20293d8: 02 80 00 1e be 2029450 <== NOT EXECUTED 20293dc: 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); 20293e0: 10 80 00 0a b 2029408 <== NOT EXECUTED 20293e4: 88 10 20 00 clr %g4 <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 20293e8: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 20293ec: d6 48 c0 02 ldsb [ %g3 + %g2 ], %o3 <== NOT EXECUTED 20293f0: 98 08 60 07 and %g1, 7, %o4 <== NOT EXECUTED 20293f4: 97 3a c0 0c sra %o3, %o4, %o3 <== NOT EXECUTED 20293f8: 80 8a e0 01 btst 1, %o3 <== NOT EXECUTED 20293fc: 96 00 c0 02 add %g3, %g2, %o3 <== NOT EXECUTED 2029400: 02 80 00 14 be 2029450 <== NOT EXECUTED 2029404: 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++; 2029408: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 202940c: 80 a3 40 01 cmp %o5, %g1 <== NOT EXECUTED 2029410: 18 80 00 03 bgu 202941c <== NOT EXECUTED 2029414: c2 24 20 74 st %g1, [ %l0 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2029418: c0 24 20 74 clr [ %l0 + 0x74 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 202941c: 88 01 20 01 inc %g4 <== NOT EXECUTED 2029420: 80 a1 00 0d cmp %g4, %o5 <== NOT EXECUTED 2029424: 2a bf ff f1 bcs,a 20293e8 <== NOT EXECUTED 2029428: c2 04 20 74 ld [ %l0 + 0x74 ], %g1 <== NOT EXECUTED 202942c: 92 10 00 0d mov %o5, %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)) 2029430: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 <== NOT EXECUTED 2029434: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2029438: 82 24 40 01 sub %l1, %g1, %g1 <== NOT EXECUTED 202943c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2029440: 2a 80 00 0c bcs,a 2029470 <== NOT EXECUTED 2029444: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 2029448: 81 c7 e0 08 ret <== NOT EXECUTED 202944c: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 2029450: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2029454: 99 28 40 0c sll %g1, %o4, %o4 <== NOT EXECUTED 2029458: 84 13 00 02 or %o4, %g2, %g2 <== NOT EXECUTED 202945c: c4 2a c0 00 stb %g2, [ %o3 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2029460: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 <== NOT EXECUTED 2029464: f0 04 20 74 ld [ %l0 + 0x74 ], %i0 <== NOT EXECUTED 2029468: 81 c7 e0 08 ret <== NOT EXECUTED 202946c: 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); 2029470: 7f ff 82 da call 2009fd8 <== NOT EXECUTED 2029474: d2 24 20 78 st %o1, [ %l0 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2029478: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202947c: 02 bf ff f3 be 2029448 <== NOT EXECUTED 2029480: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2029484: da 04 20 78 ld [ %l0 + 0x78 ], %o5 <== NOT EXECUTED 2029488: 10 bf ff c9 b 20293ac <== NOT EXECUTED 202948c: da 24 20 74 st %o5, [ %l0 + 0x74 ] <== NOT EXECUTED =============================================================================== 02029b58 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2029b58: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2029b5c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED uint32_t cur_cln = start_cln; 2029b60: f2 27 bf fc st %i1, [ %fp + -4 ] <== NOT EXECUTED char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2029b64: d0 14 20 06 lduh [ %l0 + 6 ], %o0 <== NOT EXECUTED 2029b68: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2029b6c: 7f ff 79 ba call 2008254 <== NOT EXECUTED 2029b70: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if ( buf == NULL ) 2029b74: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 2029b78: 02 80 00 22 be 2029c00 <== NOT EXECUTED 2029b7c: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2029b80: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2029b84: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED 2029b88: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 2029b8c: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2029b90: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2029b94: 1a 80 00 11 bcc 2029bd8 <== NOT EXECUTED 2029b98: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 2029b9c: 7f ff ff d3 call 2029ae8 <== NOT EXECUTED 2029ba0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2029ba4: 94 10 00 13 mov %l3, %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 ) 2029ba8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2029bac: 02 80 00 10 be 2029bec <== NOT EXECUTED 2029bb0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2029bb4: 40 00 6d 94 call 2045204 <== NOT EXECUTED 2029bb8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) 2029bbc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2029bc0: 02 bf ff f1 be 2029b84 <== NOT EXECUTED 2029bc4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { free(buf); 2029bc8: 7f ff 7b 45 call 20088dc <== NOT EXECUTED 2029bcc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return rc; 2029bd0: 81 c7 e0 08 ret <== NOT EXECUTED 2029bd4: 81 e8 00 00 restore <== NOT EXECUTED } } free(buf); 2029bd8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2029bdc: 7f ff 7b 40 call 20088dc <== NOT EXECUTED 2029be0: b0 10 20 00 clr %i0 <== NOT EXECUTED return rc; } 2029be4: 81 c7 e0 08 ret <== NOT EXECUTED 2029be8: 81 e8 00 00 restore <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 2029bec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 2029bf0: 7f ff 7b 3b call 20088dc <== NOT EXECUTED 2029bf4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 2029bf8: 81 c7 e0 08 ret <== NOT EXECUTED 2029bfc: 81 e8 00 00 restore <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 2029c00: 40 00 82 20 call 204a480 <__errno> <== NOT EXECUTED 2029c04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029c08: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2029c0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029c10: 81 c7 e0 08 ret <== NOT EXECUTED 2029c14: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029ca0 : * 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) { 2029ca0: 9d e3 be e8 save %sp, -280, %sp <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 2029ca4: d0 06 20 70 ld [ %i0 + 0x70 ], %o0 <== NOT EXECUTED 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; 2029ca8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED * 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) { 2029cac: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED 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; 2029cb0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 2029cb4: 7f ff 81 bb call 200a3a0 <== NOT EXECUTED 2029cb8: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED if (rc == -1) 2029cbc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2029cc0: 02 80 00 ed be 202a074 <== NOT EXECUTED 2029cc4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2029cc8: c4 07 bf b4 ld [ %fp + -76 ], %g2 <== NOT EXECUTED 2029ccc: 03 00 00 3c sethi %hi(0xf000), %g1 <== NOT EXECUTED 2029cd0: 84 08 80 01 and %g2, %g1, %g2 <== NOT EXECUTED 2029cd4: 03 00 00 18 sethi %hi(0x6000), %g1 <== NOT EXECUTED 2029cd8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2029cdc: 12 80 01 7d bne 202a2d0 <== NOT EXECUTED 2029ce0: 01 00 00 00 nop <== 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); 2029ce4: 7f ff 75 eb call 2007490 <== NOT EXECUTED 2029ce8: d0 1f bf c0 ldd [ %fp + -64 ], %o0 <== NOT EXECUTED if (vol->dd == NULL) 2029cec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029cf0: 02 80 01 aa be 202a398 <== NOT EXECUTED 2029cf4: d0 24 20 60 st %o0, [ %l0 + 0x60 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 2029cf8: d0 1f bf c0 ldd [ %fp + -64 ], %o0 <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 2029cfc: 94 10 20 00 clr %o2 <== NOT EXECUTED /* 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; 2029d00: d0 3c 20 58 std %o0, [ %l0 + 0x58 ] <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 2029d04: 7f ff 70 f1 call 20060c8 <== NOT EXECUTED 2029d08: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2029d0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029d10: 12 80 01 8e bne 202a348 <== NOT EXECUTED 2029d14: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2029d18: 94 10 20 5a mov 0x5a, %o2 <== NOT EXECUTED 2029d1c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2029d20: 40 00 8f 24 call 204d9b0 <== NOT EXECUTED 2029d24: 90 07 bf 48 add %fp, -184, %o0 <== NOT EXECUTED sc = rtems_bdbuf_release( block); 2029d28: 7f ff 6c 0d call 2004d5c <== NOT EXECUTED 2029d2c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2029d30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029d34: 12 80 01 85 bne 202a348 <== NOT EXECUTED 2029d38: c4 0f bf 53 ldub [ %fp + -173 ], %g2 <== NOT EXECUTED 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); 2029d3c: c2 0f bf 54 ldub [ %fp + -172 ], %g1 <== NOT EXECUTED 2029d40: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 2029d44: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2029d48: c2 34 00 00 sth %g1, [ %l0 ] <== NOT EXECUTED if ( (vol->bps != 512) && 2029d4c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2029d50: 85 30 60 10 srl %g1, 0x10, %g2 <== NOT EXECUTED 2029d54: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 2029d58: 12 80 00 c9 bne 202a07c <== NOT EXECUTED 2029d5c: 80 a0 a2 00 cmp %g2, 0x200 <== 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; 2029d60: 83 30 60 19 srl %g1, 0x19, %g1 <== NOT EXECUTED 2029d64: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2029d68: 12 80 00 09 bne 2029d8c <== NOT EXECUTED 2029d6c: c0 2c 20 03 clrb [ %l0 + 3 ] <== NOT EXECUTED 2029d70: c4 0c 20 03 ldub [ %l0 + 3 ], %g2 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 2029d74: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED 2029d78: 86 00 a0 01 add %g2, 1, %g3 <== 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; 2029d7c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2029d80: 02 bf ff fd be 2029d74 <== NOT EXECUTED 2029d84: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED 2029d88: c6 2c 20 03 stb %g3, [ %l0 + 3 ] <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2029d8c: c4 14 00 00 lduh [ %l0 ], %g2 <== NOT EXECUTED 2029d90: c0 2c 20 02 clrb [ %l0 + 2 ] <== NOT EXECUTED 2029d94: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2029d98: 12 80 00 0a bne 2029dc0 <== NOT EXECUTED 2029d9c: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED 2029da0: 10 80 00 03 b 2029dac <== NOT EXECUTED 2029da4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2029da8: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 2029dac: 85 38 a0 01 sra %g2, 1, %g2 <== 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; 2029db0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2029db4: 02 bf ff fd be 2029da8 <== NOT EXECUTED 2029db8: 88 00 e0 01 add %g3, 1, %g4 <== NOT EXECUTED 2029dbc: c6 2c 20 02 stb %g3, [ %l0 + 2 ] <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 2029dc0: c4 0f bf 55 ldub [ %fp + -171 ], %g2 <== NOT EXECUTED 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; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 2029dc4: c4 2c 20 04 stb %g2, [ %l0 + 4 ] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 2029dc8: 84 88 a0 ff andcc %g2, 0xff, %g2 <== NOT EXECUTED 2029dcc: 02 80 01 47 be 202a2e8 <== NOT EXECUTED 2029dd0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2029dd4: c0 2c 20 05 clrb [ %l0 + 5 ] <== NOT EXECUTED 2029dd8: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2029ddc: 02 80 00 05 be 2029df0 <== NOT EXECUTED 2029de0: 88 10 20 00 clr %g4 <== NOT EXECUTED 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) 2029de4: 10 80 00 0a b 2029e0c <== NOT EXECUTED 2029de8: 85 28 60 10 sll %g1, 0x10, %g2 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2029dec: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 2029df0: 85 38 a0 01 sra %g2, 1, %g2 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2029df4: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2029df8: 02 bf ff fd be 2029dec <== NOT EXECUTED 2029dfc: 88 00 e0 01 add %g3, 1, %g4 <== NOT EXECUTED 2029e00: c6 2c 20 05 stb %g3, [ %l0 + 5 ] <== NOT EXECUTED 2029e04: 88 08 e0 ff and %g3, 0xff, %g4 <== NOT EXECUTED 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) 2029e08: 85 28 60 10 sll %g1, 0x10, %g2 <== NOT EXECUTED 2029e0c: 85 30 a0 10 srl %g2, 0x10, %g2 <== NOT EXECUTED 2029e10: 85 28 80 04 sll %g2, %g4, %g2 <== NOT EXECUTED 2029e14: c4 34 20 06 sth %g2, [ %l0 + 6 ] <== NOT EXECUTED 2029e18: 07 00 00 20 sethi %hi(0x8000), %g3 <== NOT EXECUTED 2029e1c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2029e20: 85 30 a0 10 srl %g2, 0x10, %g2 <== NOT EXECUTED 2029e24: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 2029e28: 18 80 01 30 bgu 202a2e8 <== NOT EXECUTED 2029e2c: 80 88 a0 01 btst 1, %g2 <== 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; 2029e30: 12 80 00 0a bne 2029e58 <== NOT EXECUTED 2029e34: c0 2c 20 08 clrb [ %l0 + 8 ] <== NOT EXECUTED 2029e38: 10 80 00 03 b 2029e44 <== NOT EXECUTED 2029e3c: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2029e40: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 2029e44: 85 38 a0 01 sra %g2, 1, %g2 <== 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; 2029e48: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2029e4c: 02 bf ff fd be 2029e40 <== NOT EXECUTED 2029e50: 88 00 e0 01 add %g3, 1, %g4 <== NOT EXECUTED 2029e54: c6 2c 20 08 stb %g3, [ %l0 + 8 ] <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 2029e58: e6 0f bf 58 ldub [ %fp + -168 ], %l3 <== NOT EXECUTED 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)) / 2029e5c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED } 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); 2029e60: e6 2c 20 09 stb %l3, [ %l0 + 9 ] <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2029e64: c4 0f bf 56 ldub [ %fp + -170 ], %g2 <== NOT EXECUTED 2029e68: e4 0f bf 57 ldub [ %fp + -169 ], %l2 <== NOT EXECUTED 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)) / 2029e6c: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED 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); 2029e70: a5 2c a0 08 sll %l2, 8, %l2 <== NOT EXECUTED 2029e74: a4 14 80 02 or %l2, %g2, %l2 <== NOT EXECUTED 2029e78: e4 34 20 14 sth %l2, [ %l0 + 0x14 ] <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2029e7c: c6 0f bf 59 ldub [ %fp + -167 ], %g3 <== NOT EXECUTED 2029e80: c4 0f bf 5a ldub [ %fp + -166 ], %g2 <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029e84: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 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); 2029e88: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2029e8c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029e90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2029e94: 87 28 a0 10 sll %g2, 0x10, %g3 <== NOT EXECUTED 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); 2029e98: c4 34 20 20 sth %g2, [ %l0 + 0x20 ] <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029e9c: 85 30 e0 0b srl %g3, 0xb, %g2 <== NOT EXECUTED 2029ea0: 40 00 e2 bb call 206298c <.div> <== NOT EXECUTED 2029ea4: 90 00 40 02 add %g1, %g2, %o0 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029ea8: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 <== NOT EXECUTED 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)) / 2029eac: d0 24 20 24 st %o0, [ %l0 + 0x24 ] <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029eb0: 85 2a 00 02 sll %o0, %g2, %g2 <== NOT EXECUTED 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)) / 2029eb4: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029eb8: c4 24 20 28 st %g2, [ %l0 + 0x28 ] <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2029ebc: d0 0f bf 5f ldub [ %fp + -161 ], %o0 <== NOT EXECUTED 2029ec0: c4 0f bf 5e ldub [ %fp + -162 ], %g2 <== NOT EXECUTED 2029ec4: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029ec8: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029ecc: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED 2029ed0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029ed4: 22 80 00 ec be,a 202a284 <== NOT EXECUTED 2029ed8: d0 0f bf 6d ldub [ %fp + -147 ], %o0 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2029edc: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 2029ee0: d0 24 20 18 st %o0, [ %l0 + 0x18 ] <== NOT EXECUTED else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2029ee4: 92 0c e0 ff and %l3, 0xff, %o1 <== NOT EXECUTED 2029ee8: a5 2c a0 10 sll %l2, 0x10, %l2 <== NOT EXECUTED 2029eec: a5 34 a0 10 srl %l2, 0x10, %l2 <== NOT EXECUTED 2029ef0: 7f ff 63 27 call 2002b8c <.umul> <== NOT EXECUTED 2029ef4: a4 00 40 12 add %g1, %l2, %l2 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 2029ef8: d2 04 20 18 ld [ %l0 + 0x18 ], %o1 <== NOT EXECUTED 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 + 2029efc: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 2029f00: d0 0c 20 09 ldub [ %l0 + 9 ], %o0 <== NOT EXECUTED 2029f04: 7f ff 63 22 call 2002b8c <.umul> <== NOT EXECUTED 2029f08: e4 24 20 30 st %l2, [ %l0 + 0x30 ] <== NOT EXECUTED 2029f0c: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 2029f10: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 2029f14: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2029f18: d0 0f bf 5c ldub [ %fp + -164 ], %o0 <== NOT EXECUTED 2029f1c: c2 0f bf 5b ldub [ %fp + -165 ], %g1 <== NOT EXECUTED 2029f20: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029f24: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 2029f28: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED 2029f2c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029f30: 22 80 00 ca be,a 202a258 <== NOT EXECUTED 2029f34: d0 0f bf 69 ldub [ %fp + -151 ], %o0 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2029f38: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 2029f3c: d0 24 20 2c st %o0, [ %l0 + 0x2c ] <== NOT EXECUTED 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; 2029f40: d2 0c 20 04 ldub [ %l0 + 4 ], %o1 <== NOT EXECUTED 2029f44: 40 00 e2 90 call 2062984 <.udiv> <== NOT EXECUTED 2029f48: 90 22 00 12 sub %o0, %l2, %o0 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2029f4c: 80 a2 2f f4 cmp %o0, 0xff4 <== NOT EXECUTED 2029f50: 18 80 00 56 bgu 202a0a8 <== NOT EXECUTED 2029f54: d0 24 20 34 st %o0, [ %l0 + 0x34 ] <== NOT EXECUTED { vol->type = FAT_FAT12; 2029f58: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2029f5c: c2 2c 20 0a stb %g1, [ %l0 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 2029f60: 82 10 2f ff mov 0xfff, %g1 <== NOT EXECUTED 2029f64: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 2029f68: 82 10 2f f8 mov 0xff8, %g1 <== NOT EXECUTED 2029f6c: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2029f70: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 2029f74: c0 24 20 38 clr [ %l0 + 0x38 ] <== NOT EXECUTED vol->mirror = 0; 2029f78: c0 2c 20 48 clrb [ %l0 + 0x48 ] <== NOT EXECUTED vol->afat = 0; 2029f7c: c0 2c 20 50 clrb [ %l0 + 0x50 ] <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 2029f80: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2029f84: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2029f88: 7f ff fd 42 call 2029490 <== NOT EXECUTED 2029f8c: d0 04 60 34 ld [ %l1 + 0x34 ], %o0 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2029f90: d2 04 20 18 ld [ %l0 + 0x18 ], %o1 <== NOT EXECUTED 2029f94: 7f ff 62 fe call 2002b8c <.umul> <== NOT EXECUTED 2029f98: d0 0c 20 50 ldub [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 2029f9c: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2029fa0: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2029fa4: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2029fa8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 2029fac: 7f ff 78 aa call 2008254 <== NOT EXECUTED 2029fb0: c2 24 20 4c st %g1, [ %l0 + 0x4c ] <== NOT EXECUTED if ( fs_info->vhash == NULL ) 2029fb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029fb8: 02 80 01 1d be 202a42c <== NOT EXECUTED 2029fbc: d0 24 20 68 st %o0, [ %l0 + 0x68 ] <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); 2029fc0: 82 02 20 0c add %o0, 0xc, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2029fc4: c0 22 20 04 clr [ %o0 + 4 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 2029fc8: d0 22 20 08 st %o0, [ %o0 + 8 ] <== NOT EXECUTED 2029fcc: c2 20 60 08 st %g1, [ %g1 + 8 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2029fd0: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2029fd4: 82 02 20 04 add %o0, 4, %g1 <== NOT EXECUTED 2029fd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029fdc: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2029fe0: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED 2029fe4: c2 22 20 0c st %g1, [ %o0 + 0xc ] <== NOT EXECUTED 2029fe8: 7f ff 78 9b call 2008254 <== NOT EXECUTED 2029fec: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 2029ff0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029ff4: 02 80 01 03 be 202a400 <== NOT EXECUTED 2029ff8: d0 24 20 6c st %o0, [ %l0 + 0x6c ] <== NOT EXECUTED the_chain->permanent_null = NULL; 2029ffc: c0 22 20 04 clr [ %o0 + 4 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 202a000: d0 22 20 08 st %o0, [ %o0 + 8 ] <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); 202a004: 82 02 20 0c add %o0, 0xc, %g1 <== NOT EXECUTED 202a008: c2 20 60 08 st %g1, [ %g1 + 8 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 202a00c: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 202a010: 82 02 20 04 add %o0, 4, %g1 <== NOT EXECUTED 202a014: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a018: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 202a01c: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 <== NOT EXECUTED 202a020: c2 22 20 0c st %g1, [ %o0 + 0xc ] <== NOT EXECUTED 202a024: c2 0c 20 03 ldub [ %l0 + 3 ], %g1 <== NOT EXECUTED fs_info->index = 0; 202a028: c0 24 20 74 clr [ %l0 + 0x74 ] <== NOT EXECUTED } 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; 202a02c: 83 28 80 01 sll %g2, %g1, %g1 <== NOT EXECUTED 202a030: 83 28 60 04 sll %g1, 4, %g1 <== NOT EXECUTED 202a034: c2 24 20 7c st %g1, [ %l0 + 0x7c ] <== NOT EXECUTED 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; 202a038: 82 10 21 00 mov 0x100, %g1 <== 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)); 202a03c: 90 10 21 00 mov 0x100, %o0 <== NOT EXECUTED 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; 202a040: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== 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)); 202a044: 7f ff 78 84 call 2008254 <== NOT EXECUTED 202a048: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED if ( fs_info->uino == NULL ) 202a04c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202a050: 02 80 00 d8 be 202a3b0 <== NOT EXECUTED 202a054: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED 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)); 202a058: d0 14 00 00 lduh [ %l0 ], %o0 <== NOT EXECUTED 202a05c: 7f ff 78 7e call 2008254 <== NOT EXECUTED 202a060: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 202a064: d0 24 20 8c st %o0, [ %l0 + 0x8c ] <== NOT EXECUTED if (fs_info->sec_buf == NULL) 202a068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202a06c: 02 80 00 a8 be 202a30c <== NOT EXECUTED 202a070: b0 10 20 00 clr %i0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 202a074: 81 c7 e0 08 ret <== NOT EXECUTED 202a078: 81 e8 00 00 restore <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 202a07c: 22 bf ff 3a be,a 2029d64 <== NOT EXECUTED 202a080: 83 30 60 19 srl %g1, 0x19, %g1 <== NOT EXECUTED 202a084: 80 a0 a8 00 cmp %g2, 0x800 <== NOT EXECUTED 202a088: 02 80 00 05 be 202a09c <== NOT EXECUTED 202a08c: 07 00 00 04 sethi %hi(0x1000), %g3 <== NOT EXECUTED 202a090: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 202a094: 32 80 00 96 bne,a 202a2ec <== NOT EXECUTED 202a098: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== 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; 202a09c: c0 2c 20 03 clrb [ %l0 + 3 ] <== NOT EXECUTED 202a0a0: 10 bf ff 34 b 2029d70 <== NOT EXECUTED 202a0a4: 83 30 60 19 srl %g1, 0x19, %g1 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 202a0a8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 202a0ac: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 202a0b0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 202a0b4: 08 80 00 7f bleu 202a2b0 <== NOT EXECUTED 202a0b8: 84 10 63 f8 or %g1, 0x3f8, %g2 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 202a0bc: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 202a0c0: 84 10 63 f8 or %g1, 0x3f8, %g2 ! ffffff8 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 202a0c4: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 202a0c8: c4 24 20 10 st %g2, [ %l0 + 0x10 ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 202a0cc: 84 10 20 04 mov 4, %g2 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 202a0d0: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 202a0d4: c4 2c 20 0a stb %g2, [ %l0 + 0xa ] <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 202a0d8: c8 0f bf 75 ldub [ %fp + -139 ], %g4 <== NOT EXECUTED 202a0dc: c4 0f bf 76 ldub [ %fp + -138 ], %g2 <== NOT EXECUTED 202a0e0: c6 0f bf 74 ldub [ %fp + -140 ], %g3 <== NOT EXECUTED 202a0e4: c2 0f bf 77 ldub [ %fp + -137 ], %g1 <== NOT EXECUTED 202a0e8: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 202a0ec: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 202a0f0: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 202a0f4: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 202a0f8: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 202a0fc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 202a100: c2 24 20 38 st %g1, [ %l0 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 202a104: c4 0f bf 71 ldub [ %fp + -143 ], %g2 <== NOT EXECUTED 202a108: c2 0f bf 70 ldub [ %fp + -144 ], %g1 <== NOT EXECUTED 202a10c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 202a110: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 202a114: 82 08 7f 80 and %g1, -128, %g1 <== NOT EXECUTED if (vol->mirror) 202a118: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 202a11c: 02 80 00 6b be 202a2c8 <== NOT EXECUTED 202a120: c2 2c 20 48 stb %g1, [ %l0 + 0x48 ] <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 202a124: c2 0f bf 70 ldub [ %fp + -144 ], %g1 <== NOT EXECUTED 202a128: 82 08 60 0f and %g1, 0xf, %g1 <== NOT EXECUTED 202a12c: c2 2c 20 50 stb %g1, [ %l0 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 202a130: c2 0f bf 79 ldub [ %fp + -135 ], %g1 <== NOT EXECUTED 202a134: c4 0f bf 78 ldub [ %fp + -136 ], %g2 <== NOT EXECUTED 202a138: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 202a13c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 202a140: c2 34 20 3c sth %g1, [ %l0 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 202a144: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 202a148: 93 30 60 10 srl %g1, 0x10, %o1 <== NOT EXECUTED 202a14c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 202a150: 02 80 00 66 be 202a2e8 <== NOT EXECUTED 202a154: a4 07 bf f0 add %fp, -16, %l2 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 202a158: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 202a15c: 94 10 20 00 clr %o2 <== NOT EXECUTED 202a160: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 202a164: 7f ff fe ad call 2029c18 <_fat_block_read> <== NOT EXECUTED 202a168: 98 10 00 12 mov %l2, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 202a16c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202a170: 06 80 00 b8 bl 202a450 <== NOT EXECUTED 202a174: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 202a178: c8 0f bf f1 ldub [ %fp + -15 ], %g4 <== NOT EXECUTED 202a17c: c4 0f bf f2 ldub [ %fp + -14 ], %g2 <== NOT EXECUTED 202a180: c6 0f bf f0 ldub [ %fp + -16 ], %g3 <== NOT EXECUTED 202a184: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 202a188: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 202a18c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 202a190: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 202a194: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 202a198: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 202a19c: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 202a1a0: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 202a1a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 202a1a8: 12 80 00 71 bne 202a36c <== NOT EXECUTED 202a1ac: 98 10 00 12 mov %l2, %o4 <== 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, 202a1b0: d2 14 20 3c lduh [ %l0 + 0x3c ], %o1 <== NOT EXECUTED 202a1b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 202a1b8: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 202a1bc: 7f ff fe 97 call 2029c18 <_fat_block_read> <== NOT EXECUTED 202a1c0: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 202a1c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202a1c8: 06 80 00 87 bl 202a3e4 <== NOT EXECUTED 202a1cc: c6 0f bf f4 ldub [ %fp + -12 ], %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); 202a1d0: c8 0f bf f5 ldub [ %fp + -11 ], %g4 <== NOT EXECUTED 202a1d4: c4 0f bf f6 ldub [ %fp + -10 ], %g2 <== NOT EXECUTED 202a1d8: c2 0f bf f7 ldub [ %fp + -9 ], %g1 <== NOT EXECUTED 202a1dc: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 202a1e0: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 202a1e4: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 202a1e8: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 202a1ec: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 202a1f0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 202a1f4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 202a1f8: c8 0f bf f9 ldub [ %fp + -7 ], %g4 <== NOT EXECUTED 202a1fc: c4 0f bf fa ldub [ %fp + -6 ], %g2 <== NOT EXECUTED 202a200: c6 0f bf f8 ldub [ %fp + -8 ], %g3 <== NOT EXECUTED 202a204: c2 0f bf fb ldub [ %fp + -5 ], %g1 <== NOT EXECUTED 202a208: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 202a20c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 202a210: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 202a214: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 202a218: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 202a21c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 202a220: 90 10 00 11 mov %l1, %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); 202a224: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 202a228: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 202a22c: 7f ff fd b7 call 2029908 <== NOT EXECUTED 202a230: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 202a234: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 202a238: 02 bf ff 54 be 2029f88 <== NOT EXECUTED 202a23c: 01 00 00 00 nop <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 202a240: 7f ff fc 94 call 2029490 <== NOT EXECUTED 202a244: d0 04 60 34 ld [ %l1 + 0x34 ], %o0 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 202a248: 7f ff 74 7d call 200743c <== NOT EXECUTED 202a24c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED return rc; 202a250: 81 c7 e0 08 ret <== NOT EXECUTED 202a254: 81 e8 00 00 restore <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 202a258: c6 0f bf 6a ldub [ %fp + -150 ], %g3 <== NOT EXECUTED 202a25c: c4 0f bf 68 ldub [ %fp + -152 ], %g2 <== NOT EXECUTED 202a260: c2 0f bf 6b ldub [ %fp + -149 ], %g1 <== NOT EXECUTED 202a264: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 202a268: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED 202a26c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 202a270: 90 12 00 03 or %o0, %g3, %o0 <== NOT EXECUTED 202a274: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 202a278: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 202a27c: 10 bf ff 31 b 2029f40 <== NOT EXECUTED 202a280: d0 24 20 2c st %o0, [ %l0 + 0x2c ] <== 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); 202a284: c8 0f bf 6e ldub [ %fp + -146 ], %g4 <== NOT EXECUTED 202a288: c6 0f bf 6c ldub [ %fp + -148 ], %g3 <== NOT EXECUTED 202a28c: c4 0f bf 6f ldub [ %fp + -145 ], %g2 <== NOT EXECUTED 202a290: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 202a294: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 202a298: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 202a29c: 90 12 00 04 or %o0, %g4, %o0 <== NOT EXECUTED 202a2a0: 90 12 00 03 or %o0, %g3, %o0 <== NOT EXECUTED 202a2a4: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 202a2a8: 10 bf ff 0f b 2029ee4 <== NOT EXECUTED 202a2ac: d0 24 20 18 st %o0, [ %l0 + 0x18 ] <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 202a2b0: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 202a2b4: c4 24 20 10 st %g2, [ %l0 + 0x10 ] <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 202a2b8: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 202a2bc: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 202a2c0: 10 bf ff 2c b 2029f70 <== NOT EXECUTED 202a2c4: c4 2c 20 0a stb %g2, [ %l0 + 0xa ] <== 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; 202a2c8: 10 bf ff 9a b 202a130 <== NOT EXECUTED 202a2cc: c0 2c 20 50 clrb [ %l0 + 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); 202a2d0: 40 00 80 6c call 204a480 <__errno> <== NOT EXECUTED 202a2d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202a2d8: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED 202a2dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a2e0: 81 c7 e0 08 ret <== NOT EXECUTED 202a2e4: 81 e8 00 00 restore <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 202a2e8: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a2ec: 7f ff 74 54 call 200743c <== NOT EXECUTED 202a2f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 202a2f4: 40 00 80 63 call 204a480 <__errno> <== NOT EXECUTED 202a2f8: 01 00 00 00 nop <== NOT EXECUTED 202a2fc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 202a300: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a304: 81 c7 e0 08 ret <== NOT EXECUTED 202a308: 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); 202a30c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a310: 7f ff 74 4b call 200743c <== NOT EXECUTED 202a314: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 202a318: 7f ff 79 71 call 20088dc <== NOT EXECUTED 202a31c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 202a320: 7f ff 79 6f call 20088dc <== NOT EXECUTED 202a324: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 202a328: 7f ff 79 6d call 20088dc <== NOT EXECUTED 202a32c: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a330: 40 00 80 54 call 204a480 <__errno> <== NOT EXECUTED 202a334: 01 00 00 00 nop <== NOT EXECUTED 202a338: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a33c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 202a340: 81 c7 e0 08 ret <== NOT EXECUTED 202a344: 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); 202a348: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a34c: 7f ff 74 3c call 200743c <== NOT EXECUTED 202a350: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 202a354: 40 00 80 4b call 204a480 <__errno> <== NOT EXECUTED 202a358: 01 00 00 00 nop <== NOT EXECUTED 202a35c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 202a360: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a364: 81 c7 e0 08 ret <== NOT EXECUTED 202a368: 81 e8 00 00 restore <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 202a36c: d0 04 60 34 ld [ %l1 + 0x34 ], %o0 <== NOT EXECUTED 202a370: 7f ff fc 48 call 2029490 <== NOT EXECUTED 202a374: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 202a378: 7f ff 74 31 call 200743c <== NOT EXECUTED 202a37c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 202a380: 40 00 80 40 call 204a480 <__errno> <== NOT EXECUTED 202a384: 01 00 00 00 nop <== NOT EXECUTED 202a388: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 202a38c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a390: 81 c7 e0 08 ret <== NOT EXECUTED 202a394: 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); 202a398: 40 00 80 3a call 204a480 <__errno> <== NOT EXECUTED 202a39c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202a3a0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 202a3a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a3a8: 81 c7 e0 08 ret <== NOT EXECUTED 202a3ac: 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); 202a3b0: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a3b4: 7f ff 74 22 call 200743c <== NOT EXECUTED 202a3b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 202a3bc: 7f ff 79 48 call 20088dc <== NOT EXECUTED 202a3c0: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 202a3c4: 7f ff 79 46 call 20088dc <== NOT EXECUTED 202a3c8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a3cc: 40 00 80 2d call 204a480 <__errno> <== NOT EXECUTED 202a3d0: 01 00 00 00 nop <== NOT EXECUTED 202a3d4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a3d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a3dc: 81 c7 e0 08 ret <== NOT EXECUTED 202a3e0: 81 e8 00 00 restore <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 202a3e4: d0 04 60 34 ld [ %l1 + 0x34 ], %o0 <== NOT EXECUTED 202a3e8: 7f ff fc 2a call 2029490 <== NOT EXECUTED 202a3ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 202a3f0: 7f ff 74 13 call 200743c <== NOT EXECUTED 202a3f4: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED return -1; 202a3f8: 81 c7 e0 08 ret <== NOT EXECUTED 202a3fc: 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); 202a400: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a404: 7f ff 74 0e call 200743c <== NOT EXECUTED 202a408: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 202a40c: 7f ff 79 34 call 20088dc <== NOT EXECUTED 202a410: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a414: 40 00 80 1b call 204a480 <__errno> <== NOT EXECUTED 202a418: 01 00 00 00 nop <== NOT EXECUTED 202a41c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a420: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a424: 81 c7 e0 08 ret <== NOT EXECUTED 202a428: 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); 202a42c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a430: 7f ff 74 03 call 200743c <== NOT EXECUTED 202a434: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 202a438: 40 00 80 12 call 204a480 <__errno> <== NOT EXECUTED 202a43c: 01 00 00 00 nop <== NOT EXECUTED 202a440: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 202a444: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202a448: 81 c7 e0 08 ret <== NOT EXECUTED 202a44c: 81 e8 00 00 restore <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 202a450: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 202a454: 7f ff 73 fa call 200743c <== NOT EXECUTED 202a458: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 202a45c: 81 c7 e0 08 ret <== NOT EXECUTED 202a460: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029384 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 2029384: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED 2029388: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 <== NOT EXECUTED 202938c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 2029390: 81 c3 e0 08 retl <== NOT EXECUTED 2029394: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 020454f4 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 20454f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20454f8: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 <== NOT EXECUTED uint32_t cl4find = 2; uint32_t next_cln = 0; 20454fc: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2045500: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 2045504: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2045508: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 204550c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2045510: 02 80 00 47 be 204562c <== NOT EXECUTED 2045514: b0 10 20 00 clr %i0 <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2045518: e4 04 60 44 ld [ %l1 + 0x44 ], %l2 <== NOT EXECUTED 204551c: 80 a4 bf ff cmp %l2, -1 <== NOT EXECUTED 2045520: 22 80 00 02 be,a 2045528 <== NOT EXECUTED 2045524: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED 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; 2045528: a8 05 20 02 add %l4, 2, %l4 <== 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) 204552c: 80 a5 20 02 cmp %l4, 2 <== NOT EXECUTED 2045530: 08 80 00 41 bleu 2045634 <== NOT EXECUTED 2045534: ac 10 20 00 clr %l6 <== NOT EXECUTED 2045538: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 204553c: 10 80 00 17 b 2045598 <== NOT EXECUTED 2045540: aa 07 bf fc add %fp, -4, %l5 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2045544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2045548: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 204554c: 7f ff fe 69 call 2044ef0 <== NOT EXECUTED 2045550: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2045554: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2045558: 12 80 00 59 bne 20456bc <== NOT EXECUTED 204555c: 01 00 00 00 nop <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 2045560: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2045564: 82 00 60 01 inc %g1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 2045568: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 204556c: 02 80 00 47 be 2045688 <== NOT EXECUTED 2045570: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return rc; 2045574: ac 10 00 12 mov %l2, %l6 <== NOT EXECUTED } } i++; cl4find++; 2045578: a4 04 a0 01 inc %l2 <== NOT EXECUTED if (cl4find >= data_cls_val) 204557c: 80 a5 00 12 cmp %l4, %l2 <== NOT EXECUTED 2045580: 18 80 00 03 bgu 204558c <== NOT EXECUTED 2045584: a6 04 e0 01 inc %l3 <== NOT EXECUTED 2045588: a4 10 20 02 mov 2, %l2 <== 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) 204558c: 80 a5 00 13 cmp %l4, %l3 <== NOT EXECUTED 2045590: 28 80 00 2a bleu,a 2045638 <== NOT EXECUTED 2045594: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 2045598: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 204559c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 20455a0: 7f ff ff 19 call 2045204 <== NOT EXECUTED 20455a4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20455a8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 20455ac: 32 80 00 2f bne,a 2045668 <== NOT EXECUTED 20455b0: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 20455b4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 20455b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20455bc: 32 bf ff f0 bne,a 204557c <== NOT EXECUTED 20455c0: a4 04 a0 01 inc %l2 <== NOT EXECUTED /* * 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) 20455c4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 20455c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20455cc: 22 bf ff de be,a 2045544 <== NOT EXECUTED 20455d0: e4 26 40 00 st %l2, [ %i1 ] <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 20455d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20455d8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 20455dc: 7f ff fe 45 call 2044ef0 <== NOT EXECUTED 20455e0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20455e4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20455e8: 12 80 00 23 bne 2045674 <== NOT EXECUTED 20455ec: 92 10 00 16 mov %l6, %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); 20455f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20455f4: 7f ff fe 3f call 2044ef0 <== NOT EXECUTED 20455f8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20455fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2045600: 22 bf ff d9 be,a 2045564 <== NOT EXECUTED 2045604: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2045608: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 204560c: 7f ff ff 82 call 2045414 <== NOT EXECUTED 2045610: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 2045614: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2045618: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 204561c: 7f ff fe 35 call 2044ef0 <== NOT EXECUTED 2045620: 94 10 20 00 clr %o2 <== NOT EXECUTED fat_buf_release(fs_info); 2045624: 7f ff 8f 9b call 2029490 <== NOT EXECUTED 2045628: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return rc; 204562c: 81 c7 e0 08 ret <== NOT EXECUTED 2045630: 81 e8 00 00 restore <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2045634: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 2045638: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 204563c: 02 80 00 05 be 2045650 <== NOT EXECUTED 2045640: ec 24 60 44 st %l6, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 2045644: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2045648: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 204564c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2045650: ec 27 00 00 st %l6, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 2045654: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2045658: 7f ff 8f 8e call 2029490 <== NOT EXECUTED 204565c: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; } 2045660: 81 c7 e0 08 ret <== NOT EXECUTED 2045664: 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) 2045668: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 204566c: 02 bf ff f0 be 204562c <== NOT EXECUTED 2045670: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED /* 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)); 2045674: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2045678: 7f ff ff 67 call 2045414 <== NOT EXECUTED 204567c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 2045680: 81 c7 e0 08 ret <== NOT EXECUTED 2045684: 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) 2045688: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 204568c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2045690: 02 80 00 05 be 20456a4 <== NOT EXECUTED 2045694: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 2045698: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 204569c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20456a0: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 20456a4: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 20456a8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20456ac: 7f ff 8f 79 call 2029490 <== NOT EXECUTED 20456b0: b0 10 20 00 clr %i0 <== NOT EXECUTED return rc; 20456b4: 81 c7 e0 08 ret <== NOT EXECUTED 20456b8: 81 e8 00 00 restore <== NOT EXECUTED 20456bc: 81 c7 e0 08 ret <== NOT EXECUTED 20456c0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02044ef0 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2044ef0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 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; 2044ef4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2044ef8: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 2044efc: 08 80 00 93 bleu 2045148 <== NOT EXECUTED 2044f00: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED 2044f04: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 2044f08: 82 00 60 01 inc %g1 <== NOT EXECUTED 2044f0c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2044f10: 18 80 00 8e bgu 2045148 <== NOT EXECUTED 2044f14: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2044f18: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 <== NOT EXECUTED 2044f1c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2044f20: 12 80 00 24 bne 2044fb0 <== NOT EXECUTED 2044f24: e8 0c 20 02 ldub [ %l0 + 2 ], %l4 <== NOT EXECUTED 2044f28: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2044f2c: 02 80 00 27 be 2044fc8 <== NOT EXECUTED 2044f30: 01 00 00 00 nop <== NOT EXECUTED 2044f34: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 2044f38: a3 2e 60 01 sll %i1, 1, %l1 <== NOT EXECUTED 2044f3c: a9 34 40 14 srl %l1, %l4, %l4 <== NOT EXECUTED 2044f40: a8 05 00 01 add %l4, %g1, %l4 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2044f44: ea 14 00 00 lduh [ %l0 ], %l5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2044f48: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 2044f4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2044f50: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 2044f54: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2044f58: 7f ff 91 b5 call 202962c <== NOT EXECUTED 2044f5c: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED if (rc != RC_OK) 2044f60: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2044f64: 12 80 00 11 bne 2044fa8 <== NOT EXECUTED 2044f68: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 2044f6c: e4 0c 20 0a ldub [ %l0 + 0xa ], %l2 <== NOT EXECUTED 2044f70: 80 a4 a0 02 cmp %l2, 2 <== 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); 2044f74: ab 35 60 10 srl %l5, 0x10, %l5 <== NOT EXECUTED 2044f78: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2044f7c: 02 80 00 18 be 2044fdc <== NOT EXECUTED 2044f80: a2 0c 40 15 and %l1, %l5, %l1 <== NOT EXECUTED 2044f84: 80 a4 a0 04 cmp %l2, 4 <== NOT EXECUTED 2044f88: 02 80 00 3e be 2045080 <== NOT EXECUTED 2044f8c: 80 a4 a0 01 cmp %l2, 1 <== NOT EXECUTED 2044f90: 02 80 00 1e be 2045008 <== NOT EXECUTED 2044f94: 80 8e 60 01 btst 1, %i1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2044f98: 40 00 15 3a call 204a480 <__errno> <== NOT EXECUTED 2044f9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2044fa0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2044fa4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2044fa8: 81 c7 e0 08 ret <== NOT EXECUTED 2044fac: 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) + 2044fb0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 2044fb4: a3 36 60 01 srl %i1, 1, %l1 <== NOT EXECUTED 2044fb8: a2 04 40 19 add %l1, %i1, %l1 <== NOT EXECUTED 2044fbc: a9 34 40 14 srl %l1, %l4, %l4 <== NOT EXECUTED 2044fc0: 10 bf ff e1 b 2044f44 <== NOT EXECUTED 2044fc4: a8 05 00 01 add %l4, %g1, %l4 <== NOT EXECUTED 2044fc8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED 2044fcc: a3 2e 60 02 sll %i1, 2, %l1 <== NOT EXECUTED 2044fd0: a9 34 40 14 srl %l1, %l4, %l4 <== NOT EXECUTED 2044fd4: 10 bf ff dc b 2044f44 <== NOT EXECUTED 2044fd8: a8 05 00 01 add %l4, %g1, %l4 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2044fdc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2044fe0: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED 2044fe4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 2044fe8: 85 36 a0 18 srl %i2, 0x18, %g2 <== NOT EXECUTED 2044fec: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED 2044ff0: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 2044ff4: f4 30 40 11 sth %i2, [ %g1 + %l1 ] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2044ff8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2044ffc: c2 2c 20 84 stb %g1, [ %l0 + 0x84 ] <== NOT EXECUTED 2045000: 81 c7 e0 08 ret <== NOT EXECUTED 2045004: 81 e8 00 00 restore <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2045008: 02 80 00 35 be 20450dc <== NOT EXECUTED 204500c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED { 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)) = 2045010: 85 2e a0 04 sll %i2, 4, %g2 <== NOT EXECUTED 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; 2045014: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 2045018: c6 08 40 11 ldub [ %g1 + %l1 ], %g3 <== NOT EXECUTED 204501c: 86 08 e0 0f and %g3, 0xf, %g3 <== NOT EXECUTED 2045020: c6 28 40 11 stb %g3, [ %g1 + %l1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2045024: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045028: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED { 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)) = 204502c: c6 08 40 11 ldub [ %g1 + %l1 ], %g3 <== NOT EXECUTED 2045030: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 2045034: c4 28 40 11 stb %g2, [ %g1 + %l1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2045038: c2 14 00 00 lduh [ %l0 ], %g1 <== NOT EXECUTED 204503c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2045040: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 2045044: 02 80 00 5c be 20451b4 <== NOT EXECUTED 2045048: e4 2c 20 84 stb %l2, [ %l0 + 0x84 ] <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 204504c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045050: a2 04 60 01 inc %l1 <== NOT EXECUTED 2045054: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = 2045058: b5 2e a0 14 sll %i2, 0x14, %i2 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 204505c: c0 28 40 11 clrb [ %g1 + %l1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2045060: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 2045064: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) | 2045068: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 204506c: c4 08 40 11 ldub [ %g1 + %l1 ], %g2 <== NOT EXECUTED 2045070: 84 10 80 1a or %g2, %i2, %g2 <== NOT EXECUTED 2045074: c4 28 40 11 stb %g2, [ %g1 + %l1 ] <== NOT EXECUTED 2045078: 81 c7 e0 08 ret <== NOT EXECUTED 204507c: 81 e8 00 00 restore <== NOT EXECUTED 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)); 2045080: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 2045084: 05 3c 00 00 sethi %hi(0xf0000000), %g2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2045088: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = 204508c: 9b 2e a0 18 sll %i2, 0x18, %o5 <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 2045090: c6 00 40 11 ld [ %g1 + %l1 ], %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)); 2045094: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = 2045098: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 204509c: 89 36 a0 10 srl %i2, 0x10, %g4 <== NOT EXECUTED 20450a0: 85 36 a0 18 srl %i2, 0x18, %g2 <== NOT EXECUTED 20450a4: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED 20450a8: 84 13 40 02 or %o5, %g2, %g2 <== NOT EXECUTED 20450ac: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 20450b0: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED 20450b4: b4 0e a0 ff and %i2, 0xff, %i2 <== NOT EXECUTED 20450b8: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED 20450bc: 84 10 80 1a or %g2, %i2, %g2 <== NOT EXECUTED 20450c0: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED 20450c4: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 20450c8: c4 20 40 11 st %g2, [ %g1 + %l1 ] <== NOT EXECUTED 20450cc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20450d0: c2 2c 20 84 stb %g1, [ %l0 + 0x84 ] <== NOT EXECUTED 20450d4: 81 c7 e0 08 ret <== NOT EXECUTED 20450d8: 81 e8 00 00 restore <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 20450dc: b4 0e af ff and %i2, 0xfff, %i2 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 20450e0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 20450e4: c0 28 40 11 clrb [ %g1 + %l1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 20450e8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 20450ec: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 20450f0: c4 08 40 11 ldub [ %g1 + %l1 ], %g2 <== NOT EXECUTED 20450f4: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED 20450f8: c4 28 40 11 stb %g2, [ %g1 + %l1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 20450fc: c2 14 00 00 lduh [ %l0 ], %g1 <== NOT EXECUTED 2045100: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2045104: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 2045108: 02 80 00 16 be 2045160 <== NOT EXECUTED 204510c: e4 2c 20 84 stb %l2, [ %l0 + 0x84 ] <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 2045110: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045114: a2 04 60 01 inc %l1 <== NOT EXECUTED 2045118: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs+1)) = 204511c: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2045120: c4 08 40 11 ldub [ %g1 + %l1 ], %g2 <== NOT EXECUTED 2045124: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2045128: c4 28 40 11 stb %g2, [ %g1 + %l1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 204512c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045130: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 2045134: c4 08 40 11 ldub [ %g1 + %l1 ], %g2 <== NOT EXECUTED 2045138: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED 204513c: f4 28 40 11 stb %i2, [ %g1 + %l1 ] <== NOT EXECUTED 2045140: 81 c7 e0 08 ret <== NOT EXECUTED 2045144: 81 e8 00 00 restore <== NOT EXECUTED 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); 2045148: 40 00 14 ce call 204a480 <__errno> <== NOT EXECUTED 204514c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045150: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2045154: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2045158: 81 c7 e0 08 ret <== NOT EXECUTED 204515c: 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, 2045160: 92 05 20 01 add %l4, 1, %o1 <== NOT EXECUTED 2045164: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED 2045168: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 204516c: 7f ff 91 30 call 202962c <== NOT EXECUTED 2045170: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &block0); if (rc != RC_OK) 2045174: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2045178: 12 bf ff 8c bne 2044fa8 <== NOT EXECUTED 204517c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 2045180: 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; 2045184: 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)) = 2045188: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 204518c: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2045190: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2045194: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2045198: 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)) = 204519c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20451a0: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED 20451a4: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 20451a8: e4 2c 20 84 stb %l2, [ %l0 + 0x84 ] <== NOT EXECUTED 20451ac: 81 c7 e0 08 ret <== NOT EXECUTED 20451b0: 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, 20451b4: 92 05 20 01 add %l4, 1, %o1 <== NOT EXECUTED 20451b8: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED 20451bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20451c0: 7f ff 91 1b call 202962c <== NOT EXECUTED 20451c4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &block0); if (rc != RC_OK) 20451c8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20451cc: 12 bf ff 77 bne 2044fa8 <== NOT EXECUTED 20451d0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 20451d4: 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; 20451d8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = 20451dc: 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; 20451e0: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 20451e4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 20451e8: 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)) = 20451ec: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20451f0: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 20451f4: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 20451f8: e4 2c 20 84 stb %l2, [ %l0 + 0x84 ] <== NOT EXECUTED 20451fc: 81 c7 e0 08 ret <== NOT EXECUTED 2045200: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020299c8 : * 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) { 20299c8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20299cc: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 20299d0: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 <== NOT EXECUTED 20299d4: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 20299d8: 12 80 00 3a bne 2029ac0 <== NOT EXECUTED 20299dc: a2 10 20 00 clr %l1 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 20299e0: 7f ff fe ac call 2029490 <== NOT EXECUTED 20299e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 20299e8: 7f ff 69 fc call 20041d8 <== NOT EXECUTED 20299ec: d0 1c 20 58 ldd [ %l0 + 0x58 ], %o0 <== NOT EXECUTED 20299f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20299f4: 32 80 00 3b bne,a 2029ae0 <== NOT EXECUTED 20299f8: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 20299fc: a6 10 20 00 clr %l3 <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 2029a00: e4 04 20 68 ld [ %l0 + 0x68 ], %l2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2029a04: 10 80 00 04 b 2029a14 <== NOT EXECUTED 2029a08: a4 04 80 13 add %l2, %l3, %l2 <== NOT EXECUTED free(node); 2029a0c: 7f ff 7b b4 call 20088dc <== NOT EXECUTED 2029a10: 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 ); 2029a14: 7f ff 92 74 call 200e3e4 <_Chain_Get> <== NOT EXECUTED 2029a18: 90 10 00 12 mov %l2, %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 ) 2029a1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029a20: 12 bf ff fb bne 2029a0c <== NOT EXECUTED 2029a24: 01 00 00 00 nop <== NOT EXECUTED 2029a28: a6 04 e0 0c add %l3, 0xc, %l3 <== 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++) 2029a2c: 80 a4 e0 18 cmp %l3, 0x18 <== NOT EXECUTED 2029a30: 32 bf ff f5 bne,a 2029a04 <== NOT EXECUTED 2029a34: e4 04 20 68 ld [ %l0 + 0x68 ], %l2 <== NOT EXECUTED 2029a38: a6 10 20 00 clr %l3 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 2029a3c: e4 04 20 6c ld [ %l0 + 0x6c ], %l2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2029a40: 10 80 00 04 b 2029a50 <== NOT EXECUTED 2029a44: a4 04 80 13 add %l2, %l3, %l2 <== NOT EXECUTED free(node); 2029a48: 7f ff 7b a5 call 20088dc <== NOT EXECUTED 2029a4c: 01 00 00 00 nop <== NOT EXECUTED 2029a50: 7f ff 92 65 call 200e3e4 <_Chain_Get> <== NOT EXECUTED 2029a54: 90 10 00 12 mov %l2, %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 ) 2029a58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029a5c: 12 bf ff fb bne 2029a48 <== NOT EXECUTED 2029a60: 01 00 00 00 nop <== NOT EXECUTED 2029a64: a6 04 e0 0c add %l3, 0xc, %l3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 2029a68: 80 a4 e0 18 cmp %l3, 0x18 <== NOT EXECUTED 2029a6c: 32 bf ff f5 bne,a 2029a40 <== NOT EXECUTED 2029a70: e4 04 20 6c ld [ %l0 + 0x6c ], %l2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2029a74: 7f ff 7b 9a call 20088dc <== NOT EXECUTED 2029a78: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2029a7c: 7f ff 7b 98 call 20088dc <== NOT EXECUTED 2029a80: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2029a84: 7f ff 7b 96 call 20088dc <== NOT EXECUTED 2029a88: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 2029a8c: 7f ff 7b 94 call 20088dc <== NOT EXECUTED 2029a90: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 2029a94: 7f ff 76 6a call 200743c <== NOT EXECUTED 2029a98: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 2029a9c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2029aa0: 02 80 00 06 be 2029ab8 <== NOT EXECUTED 2029aa4: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 2029aa8: 40 00 82 76 call 204a480 <__errno> <== NOT EXECUTED 2029aac: 01 00 00 00 nop <== NOT EXECUTED 2029ab0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2029ab4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2029ab8: 81 c7 e0 08 ret <== NOT EXECUTED 2029abc: 91 e8 00 11 restore %g0, %l1, %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, 2029ac0: d2 04 20 40 ld [ %l0 + 0x40 ], %o1 <== NOT EXECUTED 2029ac4: d4 04 20 44 ld [ %l0 + 0x44 ], %o2 <== NOT EXECUTED 2029ac8: 7f ff ff 90 call 2029908 <== NOT EXECUTED 2029acc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2029ad0: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 2029ad4: 32 bf ff c3 bne,a 20299e0 <== NOT EXECUTED 2029ad8: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 2029adc: 30 bf ff c1 b,a 20299e0 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 2029ae0: 10 bf ff c8 b 2029a00 <== NOT EXECUTED 2029ae4: a6 10 20 00 clr %l3 <== NOT EXECUTED =============================================================================== 02045afc : #include int fchdir( int fd ) { 2045afc: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 2045b00: 03 00 81 c2 sethi %hi(0x2070800), %g1 <== NOT EXECUTED 2045b04: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 <== NOT EXECUTED 2045b08: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 2045b0c: 1a 80 00 53 bcc 2045c58 <== NOT EXECUTED 2045b10: 03 00 81 d3 sethi %hi(0x2074c00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 2045b14: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 2074c64 <== NOT EXECUTED 2045b18: 85 2e 20 06 sll %i0, 6, %g2 <== NOT EXECUTED 2045b1c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 2045b20: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 2045b24: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2045b28: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 2045b2c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2045b30: 02 80 00 4a be 2045c58 <== NOT EXECUTED 2045b34: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 2045b38: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 2045b3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2045b40: 02 80 00 59 be 2045ca4 <== NOT EXECUTED 2045b44: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 2045b48: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 2045b4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2045b50: 02 80 00 55 be 2045ca4 <== NOT EXECUTED 2045b54: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 2045b58: 9f c0 40 00 call %g1 <== NOT EXECUTED 2045b5c: 90 06 20 1c add %i0, 0x1c, %o0 <== NOT EXECUTED 2045b60: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 2045b64: 12 80 00 37 bne 2045c40 <== NOT EXECUTED 2045b68: 21 00 81 c3 sethi %hi(0x2070c00), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045b6c: c2 04 22 24 ld [ %l0 + 0x224 ], %g1 ! 2070e24 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045b70: 11 00 81 bb sethi %hi(0x206ec00), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045b74: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045b78: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045b7c: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 2045b80: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045b84: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045b88: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED 2045b8c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045b90: 94 10 20 00 clr %o2 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045b94: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 2045b98: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045b9c: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045ba0: c4 27 bf e4 st %g2, [ %fp + -28 ] <== NOT EXECUTED 2045ba4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045ba8: 98 10 20 00 clr %o4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2045bac: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 2045bb0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED 2045bb4: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 2045bb8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 2045bbc: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 2045bc0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED 2045bc4: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 2045bc8: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 2045bcc: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 2045bd0: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2045bd4: 7f ff 0b 23 call 2008860 <== NOT EXECUTED 2045bd8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED 2045bdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2045be0: 12 80 00 24 bne 2045c70 <== NOT EXECUTED 2045be4: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 2045be8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2045bec: 02 80 00 09 be 2045c10 <== NOT EXECUTED 2045bf0: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 2045bf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2045bf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2045bfc: 22 80 00 06 be,a 2045c14 <== NOT EXECUTED 2045c00: c2 04 22 24 ld [ %l0 + 0x224 ], %g1 <== NOT EXECUTED 2045c04: 9f c0 40 00 call %g1 <== NOT EXECUTED 2045c08: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 2045c0c: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 2045c10: c2 04 22 24 ld [ %l0 + 0x224 ], %g1 <== NOT EXECUTED 2045c14: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 2045c18: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED 2045c1c: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 2045c20: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 2045c24: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 2045c28: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED 2045c2c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 2045c30: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 2045c34: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return 0; } 2045c38: 81 c7 e0 08 ret <== NOT EXECUTED 2045c3c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 2045c40: 40 00 12 10 call 204a480 <__errno> <== NOT EXECUTED 2045c44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045c48: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2045c4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2045c50: 81 c7 e0 08 ret <== NOT EXECUTED 2045c54: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2045c58: 40 00 12 0a call 204a480 <__errno> <== NOT EXECUTED 2045c5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045c60: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 2045c64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2045c68: 81 c7 e0 08 ret <== NOT EXECUTED 2045c6c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 2045c70: c4 07 bf d8 ld [ %fp + -40 ], %g2 <== NOT EXECUTED 2045c74: c2 04 22 24 ld [ %l0 + 0x224 ], %g1 <== NOT EXECUTED 2045c78: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED 2045c7c: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 2045c80: c4 20 60 08 st %g2, [ %g1 + 8 ] <== NOT EXECUTED 2045c84: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED 2045c88: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED 2045c8c: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 2045c90: c4 20 60 10 st %g2, [ %g1 + 0x10 ] <== NOT EXECUTED 2045c94: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 2045c98: c4 20 60 14 st %g2, [ %g1 + 0x14 ] <== NOT EXECUTED return -1; 2045c9c: 81 c7 e0 08 ret <== NOT EXECUTED 2045ca0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 2045ca4: 40 00 11 f7 call 204a480 <__errno> <== NOT EXECUTED 2045ca8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045cac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2045cb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2045cb4: 81 c7 e0 08 ret <== NOT EXECUTED 2045cb8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202c87c : int fchmod( int fd, mode_t mode ) { 202c87c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202c880: 03 00 81 c2 sethi %hi(0x2070800), %g1 <== NOT EXECUTED 202c884: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 <== NOT EXECUTED 202c888: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 202c88c: 1a 80 00 16 bcc 202c8e4 <== NOT EXECUTED 202c890: 03 00 81 d3 sethi %hi(0x2074c00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 202c894: d0 00 60 64 ld [ %g1 + 0x64 ], %o0 ! 2074c64 <== NOT EXECUTED 202c898: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 202c89c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 202c8a0: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 202c8a4: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 202c8a8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 202c8ac: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 202c8b0: 02 80 00 0d be 202c8e4 <== NOT EXECUTED 202c8b4: 01 00 00 00 nop <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 202c8b8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 <== NOT EXECUTED 202c8bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202c8c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202c8c4: 02 80 00 0e be 202c8fc <== NOT EXECUTED 202c8c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 202c8cc: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 202c8d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202c8d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 202c8d8: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 202c8dc: 81 c7 e0 08 ret <== NOT EXECUTED 202c8e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202c8e4: 40 00 76 e7 call 204a480 <__errno> <== NOT EXECUTED 202c8e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c8ec: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202c8f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c8f4: 81 c7 e0 08 ret <== NOT EXECUTED 202c8f8: 81 e8 00 00 restore <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 202c8fc: 40 00 76 e1 call 204a480 <__errno> <== NOT EXECUTED 202c900: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c904: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202c908: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c90c: 81 c7 e0 08 ret <== NOT EXECUTED 202c910: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202c914 : int fchown( int fd, uid_t owner, gid_t group ) { 202c914: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202c918: 03 00 81 c2 sethi %hi(0x2070800), %g1 <== NOT EXECUTED 202c91c: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 <== NOT EXECUTED 202c920: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 202c924: 1a 80 00 19 bcc 202c988 <== NOT EXECUTED 202c928: 03 00 81 d3 sethi %hi(0x2074c00), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 202c92c: d0 00 60 64 ld [ %g1 + 0x64 ], %o0 ! 2074c64 <== NOT EXECUTED 202c930: 83 2e 20 06 sll %i0, 6, %g1 <== NOT EXECUTED 202c934: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED 202c938: b0 06 00 01 add %i0, %g1, %i0 <== NOT EXECUTED 202c93c: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 202c940: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED 202c944: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 202c948: 02 80 00 10 be 202c988 <== NOT EXECUTED 202c94c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 202c950: 02 80 00 14 be 202c9a0 <== NOT EXECUTED 202c954: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 202c958: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED 202c95c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 202c960: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202c964: 02 80 00 15 be 202c9b8 <== NOT EXECUTED 202c968: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 202c96c: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 202c970: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 202c974: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED 202c978: 9f c0 40 00 call %g1 <== NOT EXECUTED 202c97c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED } 202c980: 81 c7 e0 08 ret <== NOT EXECUTED 202c984: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202c988: 40 00 76 be call 204a480 <__errno> <== NOT EXECUTED 202c98c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c990: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202c994: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c998: 81 c7 e0 08 ret <== NOT EXECUTED 202c99c: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 202c9a0: 40 00 76 b8 call 204a480 <__errno> <== NOT EXECUTED 202c9a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c9a8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202c9ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c9b0: 81 c7 e0 08 ret <== NOT EXECUTED 202c9b4: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 202c9b8: 40 00 76 b2 call 204a480 <__errno> <== NOT EXECUTED 202c9bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202c9c0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202c9c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202c9c8: 81 c7 e0 08 ret <== NOT EXECUTED 202c9cc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02045ce4 : int fcntl( int fd, int cmd, ... ) { 2045ce4: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2045ce8: 03 00 81 c2 sethi %hi(0x2070800), %g1 2045cec: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 ... ) { int ret; va_list ap; va_start( ap, cmd ); 2045cf0: 84 07 a0 4c add %fp, 0x4c, %g2 2045cf4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2045cf8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2045cfc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2045d00: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2045d04: 80 a6 00 01 cmp %i0, %g1 2045d08: 1a 80 00 7a bcc 2045ef0 <== NEVER TAKEN 2045d0c: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 2045d10: 21 00 81 d3 sethi %hi(0x2074c00), %l0 2045d14: c6 04 20 64 ld [ %l0 + 0x64 ], %g3 ! 2074c64 2045d18: 89 2e 20 06 sll %i0, 6, %g4 2045d1c: 93 2e 20 03 sll %i0, 3, %o1 2045d20: 92 02 40 04 add %o1, %g4, %o1 2045d24: 92 00 c0 09 add %g3, %o1, %o1 rtems_libio_check_is_open(iop); 2045d28: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 2045d2c: 80 8a 21 00 btst 0x100, %o0 2045d30: 02 80 00 70 be 2045ef0 <== NEVER TAKEN 2045d34: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2045d38: 08 80 00 08 bleu 2045d58 2045d3c: 89 2e 60 02 sll %i1, 2, %g4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2045d40: 40 00 11 d0 call 204a480 <__errno> 2045d44: b0 10 3f ff mov -1, %i0 2045d48: 82 10 20 16 mov 0x16, %g1 2045d4c: c2 22 00 00 st %g1, [ %o0 ] 2045d50: 81 c7 e0 08 ret 2045d54: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2045d58: 1b 00 81 17 sethi %hi(0x2045c00), %o5 2045d5c: 9a 13 60 bc or %o5, 0xbc, %o5 ! 2045cbc 2045d60: c8 03 40 04 ld [ %o5 + %g4 ], %g4 2045d64: 81 c1 00 00 jmp %g4 2045d68: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2045d6c: 40 00 11 c5 call 204a480 <__errno> 2045d70: b0 10 3f ff mov -1, %i0 ! ffffffff 2045d74: 82 10 20 86 mov 0x86, %g1 2045d78: c2 22 00 00 st %g1, [ %o0 ] 2045d7c: 81 c7 e0 08 ret 2045d80: 81 e8 00 00 restore case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2045d84: d0 00 80 00 ld [ %g2 ], %o0 2045d88: 7f ff 0c 3e call 2008e80 2045d8c: 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); 2045d90: d2 07 bf f4 ld [ %fp + -12 ], %o1 2045d94: 90 0a 22 01 and %o0, 0x201, %o0 2045d98: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 2045d9c: b0 10 20 00 clr %i0 2045da0: 82 08 7d fe and %g1, -514, %g1 2045da4: 82 12 00 01 or %o0, %g1, %g1 2045da8: 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) { if (iop->handlers->fcntl_h) { 2045dac: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 2045db0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2045db4: 80 a0 60 00 cmp %g1, 0 2045db8: 02 80 00 52 be 2045f00 <== NEVER TAKEN 2045dbc: 01 00 00 00 nop int err = (*iop->handlers->fcntl_h)( cmd, iop ); 2045dc0: 9f c0 40 00 call %g1 2045dc4: 90 10 00 19 mov %i1, %o0 if (err) { 2045dc8: b2 92 20 00 orcc %o0, 0, %i1 2045dcc: 12 80 00 04 bne 2045ddc <== NEVER TAKEN 2045dd0: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2045dd4: 81 c7 e0 08 ret 2045dd8: 81 e8 00 00 restore if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 2045ddc: 40 00 11 a9 call 204a480 <__errno> <== NOT EXECUTED 2045de0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045de4: 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; } 2045de8: 81 c7 e0 08 ret <== NOT EXECUTED 2045dec: 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 ); 2045df0: 7f ff 0b 74 call 2008bc0 2045df4: d2 27 bf f4 st %o1, [ %fp + -12 ] 2045df8: d2 07 bf f4 ld [ %fp + -12 ], %o1 2045dfc: 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) { 2045e00: 80 a6 20 00 cmp %i0, 0 2045e04: 36 bf ff eb bge,a 2045db0 <== ALWAYS TAKEN 2045e08: c2 02 60 40 ld [ %o1 + 0x40 ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2045e0c: 81 c7 e0 08 ret <== NOT EXECUTED 2045e10: 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 ) ) 2045e14: c2 00 80 00 ld [ %g2 ], %g1 2045e18: 80 a0 60 00 cmp %g1, 0 2045e1c: 22 80 00 2c be,a 2045ecc <== NEVER TAKEN 2045e20: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2045e24: 90 12 28 00 or %o0, 0x800, %o0 2045e28: b0 10 20 00 clr %i0 2045e2c: 10 bf ff e0 b 2045dac 2045e30: 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); 2045e34: b1 32 20 0b srl %o0, 0xb, %i0 2045e38: 10 bf ff dd b 2045dac 2045e3c: b0 0e 20 01 and %i0, 1, %i0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2045e40: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 2045e44: 80 a0 a0 00 cmp %g2, 0 2045e48: 02 80 00 30 be 2045f08 <== ALWAYS TAKEN 2045e4c: 80 a0 40 02 cmp %g1, %g2 diop = rtems_libio_iop( fd2 ); 2045e50: b0 10 20 00 clr %i0 <== NOT EXECUTED 2045e54: 18 80 00 21 bgu 2045ed8 <== NOT EXECUTED 2045e58: 82 10 20 00 clr %g1 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e5c: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 2045e60: da 02 60 40 ld [ %o1 + 0x40 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e64: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 2045e68: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 2045e6c: c8 02 60 3c ld [ %o1 + 0x3c ], %g4 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e70: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 2045e74: c4 02 60 24 ld [ %o1 + 0x24 ], %g2 ret = (int) (diop - rtems_libio_iops); 2045e78: 86 26 00 03 sub %i0, %g3, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e7c: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 2045e80: c4 02 60 28 ld [ %o1 + 0x28 ], %g2 ret = (int) (diop - rtems_libio_iops); 2045e84: 87 38 e0 03 sra %g3, 3, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e88: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 2045e8c: c4 02 60 2c ld [ %o1 + 0x2c ], %g2 ret = -1; break; } } diop->handlers = iop->handlers; 2045e90: da 20 60 40 st %o5, [ %g1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2045e94: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ret = (int) (diop - rtems_libio_iops); 2045e98: 85 28 e0 06 sll %g3, 6, %g2 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 2045e9c: c8 20 60 3c st %g4, [ %g1 + 0x3c ] diop->flags = iop->flags; 2045ea0: d0 20 60 18 st %o0, [ %g1 + 0x18 ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 2045ea4: 83 28 e0 03 sll %g3, 3, %g1 2045ea8: 82 20 80 01 sub %g2, %g1, %g1 2045eac: 85 28 60 06 sll %g1, 6, %g2 2045eb0: 82 00 40 02 add %g1, %g2, %g1 2045eb4: 82 00 40 03 add %g1, %g3, %g1 2045eb8: b1 28 60 0f sll %g1, 0xf, %i0 2045ebc: b0 26 00 01 sub %i0, %g1, %i0 2045ec0: b1 2e 20 03 sll %i0, 3, %i0 2045ec4: 10 bf ff cf b 2045e00 2045ec8: b0 06 00 03 add %i0, %g3, %i0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2045ecc: b0 10 20 00 clr %i0 <== NOT EXECUTED 2045ed0: 10 bf ff b7 b 2045dac <== NOT EXECUTED 2045ed4: d0 22 60 18 st %o0, [ %o1 + 0x18 ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 2045ed8: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 2045edc: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED 2045ee0: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 2045ee4: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 2045ee8: 10 bf ff dd b 2045e5c <== NOT EXECUTED 2045eec: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2045ef0: 40 00 11 64 call 204a480 <__errno> <== NOT EXECUTED 2045ef4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2045ef8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 2045efc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2045f00: 81 c7 e0 08 ret <== NOT EXECUTED 2045f04: 81 e8 00 00 restore <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2045f08: 7f ff 0b 9d call 2008d7c 2045f0c: d2 27 bf f4 st %o1, [ %fp + -12 ] if ( diop == 0 ) { 2045f10: b0 10 3f ff mov -1, %i0 2045f14: 82 92 20 00 orcc %o0, 0, %g1 2045f18: 02 bf ff 8e be 2045d50 <== NEVER TAKEN 2045f1c: d2 07 bf f4 ld [ %fp + -12 ], %o1 2045f20: c6 04 20 64 ld [ %l0 + 0x64 ], %g3 2045f24: d0 02 60 18 ld [ %o1 + 0x18 ], %o0 2045f28: 10 bf ff cd b 2045e5c 2045f2c: b0 10 00 01 mov %g1, %i0 =============================================================================== 0200399c : #include int fdatasync( int fd ) { 200399c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20039a0: 03 00 80 81 sethi %hi(0x2020400), %g1 20039a4: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 20207f4 20039a8: 80 a6 00 01 cmp %i0, %g1 20039ac: 1a 80 00 16 bcc 2003a04 <== NEVER TAKEN 20039b0: 03 00 80 84 sethi %hi(0x2021000), %g1 iop = rtems_libio_iop( fd ); 20039b4: d0 00 62 08 ld [ %g1 + 0x208 ], %o0 ! 2021208 20039b8: 83 2e 20 06 sll %i0, 6, %g1 20039bc: b1 2e 20 03 sll %i0, 3, %i0 20039c0: b0 06 00 01 add %i0, %g1, %i0 20039c4: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 20039c8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 20039cc: 80 88 61 00 btst 0x100, %g1 20039d0: 02 80 00 0d be 2003a04 <== NEVER TAKEN 20039d4: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 20039d8: 02 80 00 0b be 2003a04 20039dc: 01 00 00 00 nop /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 20039e0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 20039e4: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 20039e8: 80 a0 60 00 cmp %g1, 0 20039ec: 02 80 00 0c be 2003a1c <== ALWAYS TAKEN 20039f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 20039f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20039f8: 01 00 00 00 nop <== NOT EXECUTED } 20039fc: 81 c7 e0 08 ret <== NOT EXECUTED 2003a00: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 2003a04: 40 00 3d 62 call 2012f8c <__errno> 2003a08: b0 10 3f ff mov -1, %i0 2003a0c: 82 10 20 09 mov 9, %g1 2003a10: c2 22 00 00 st %g1, [ %o0 ] 2003a14: 81 c7 e0 08 ret 2003a18: 81 e8 00 00 restore /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2003a1c: 40 00 3d 5c call 2012f8c <__errno> 2003a20: b0 10 3f ff mov -1, %i0 2003a24: 82 10 20 86 mov 0x86, %g1 2003a28: c2 22 00 00 st %g1, [ %o0 ] 2003a2c: 81 c7 e0 08 ret 2003a30: 81 e8 00 00 restore =============================================================================== 0200b0f0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200b0f0: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 200b0f4: 21 00 80 7c sethi %hi(0x201f000), %l0 200b0f8: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 ! 201f048 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200b0fc: a2 10 00 18 mov %i0, %l1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 200b100: 92 10 20 00 clr %o1 200b104: 94 10 20 00 clr %o2 200b108: 7f ff ed f3 call 20068d4 200b10c: b0 10 3f fc mov -4, %i0 200b110: 80 a2 20 00 cmp %o0, 0 200b114: 12 80 00 f0 bne 200b4d4 <== ALWAYS TAKEN 200b118: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 200b11c: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED if (pipe == NULL) { 200b120: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 200b124: 02 80 00 4a be 200b24c <== NOT EXECUTED 200b128: 01 00 00 00 nop <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200b12c: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED 200b130: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b134: 7f ff ed e8 call 20068d4 <== NOT EXECUTED 200b138: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200b13c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200b140: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200b144: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200b148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200b14c: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200b150: 02 80 00 ce be 200b488 <== NOT EXECUTED 200b154: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 200b158: 7f ff ee 26 call 20069f0 <== NOT EXECUTED 200b15c: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200b160: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200b164: 12 80 00 dc bne 200b4d4 <== NOT EXECUTED 200b168: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200b16c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 200b170: 82 08 60 06 and %g1, 6, %g1 <== NOT EXECUTED 200b174: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 200b178: 02 80 00 9e be 200b3f0 <== NOT EXECUTED 200b17c: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED 200b180: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 200b184: 02 80 00 86 be 200b39c <== NOT EXECUTED 200b188: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200b18c: 22 80 00 07 be,a 200b1a8 <== NOT EXECUTED 200b190: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 200b194: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 200b198: 7f ff ee 16 call 20069f0 <== NOT EXECUTED 200b19c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 200b1a0: 81 c7 e0 08 ret <== NOT EXECUTED 200b1a4: 81 e8 00 00 restore <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200b1a8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200b1ac: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200b1b0: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200b1b4: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 200b1b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b1bc: 02 80 00 c8 be 200b4dc <== NOT EXECUTED 200b1c0: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 200b1c4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 200b1c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b1cc: 32 bf ff f3 bne,a 200b198 <== NOT EXECUTED 200b1d0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 200b1d4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 200b1d8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 200b1dc: 32 bf ff ef bne,a 200b198 <== NOT EXECUTED 200b1e0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 200b1e4: 10 80 00 0c b 200b214 <== NOT EXECUTED 200b1e8: e4 04 20 24 ld [ %l0 + 0x24 ], %l2 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200b1ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b1f0: 7f ff ed b9 call 20068d4 <== NOT EXECUTED 200b1f4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b1f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b1fc: 12 80 00 0f bne 200b238 <== NOT EXECUTED 200b200: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200b204: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 200b208: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 200b20c: 32 bf ff e3 bne,a 200b198 <== NOT EXECUTED 200b210: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200b214: 7f ff ed f7 call 20069f0 <== NOT EXECUTED 200b218: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 200b21c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200b220: 40 00 0a 9f call 200dc9c <== NOT EXECUTED 200b224: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b228: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b22c: 22 bf ff f0 be,a 200b1ec <== NOT EXECUTED 200b230: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 200b234: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 200b238: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200b23c: 7f ff ff 5c call 200afac <== NOT EXECUTED 200b240: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 200b244: 81 c7 e0 08 ret <== NOT EXECUTED 200b248: 81 e8 00 00 restore <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200b24c: 7f ff df 90 call 200308c <== NOT EXECUTED 200b250: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED if (pipe == NULL) 200b254: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 200b258: 02 80 00 bc be 200b548 <== NOT EXECUTED 200b25c: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 200b260: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 200b264: c0 24 80 00 clr [ %l2 ] <== NOT EXECUTED 200b268: c0 24 a0 08 clr [ %l2 + 8 ] <== NOT EXECUTED 200b26c: c0 24 a0 0c clr [ %l2 + 0xc ] <== NOT EXECUTED 200b270: c0 24 a0 10 clr [ %l2 + 0x10 ] <== NOT EXECUTED 200b274: c0 24 a0 14 clr [ %l2 + 0x14 ] <== NOT EXECUTED 200b278: c0 24 a0 18 clr [ %l2 + 0x18 ] <== NOT EXECUTED 200b27c: c0 24 a0 1c clr [ %l2 + 0x1c ] <== NOT EXECUTED 200b280: c0 24 a0 20 clr [ %l2 + 0x20 ] <== NOT EXECUTED 200b284: c0 24 a0 24 clr [ %l2 + 0x24 ] <== NOT EXECUTED 200b288: c0 24 a0 28 clr [ %l2 + 0x28 ] <== NOT EXECUTED 200b28c: c0 24 a0 2c clr [ %l2 + 0x2c ] <== NOT EXECUTED 200b290: c0 24 a0 30 clr [ %l2 + 0x30 ] <== NOT EXECUTED pipe->Size = PIPE_BUF; 200b294: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 200b298: 7f ff df 7d call 200308c <== NOT EXECUTED 200b29c: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (! pipe->Buffer) 200b2a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b2a4: 02 80 00 a7 be 200b540 <== NOT EXECUTED 200b2a8: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200b2ac: 27 00 80 7a sethi %hi(0x201e800), %l3 <== NOT EXECUTED 200b2b0: d0 4c e1 84 ldsb [ %l3 + 0x184 ], %o0 ! 201e984 <== NOT EXECUTED 200b2b4: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED 200b2b8: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <== NOT EXECUTED 200b2bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b2c0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 200b2c4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b2c8: 40 00 0a 0c call 200daf8 <== NOT EXECUTED 200b2cc: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 200b2d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b2d4: 12 80 00 99 bne 200b538 <== NOT EXECUTED 200b2d8: d0 4c e1 84 ldsb [ %l3 + 0x184 ], %o0 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200b2dc: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 200b2e0: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 200b2e4: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b2e8: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 200b2ec: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b2f0: 40 00 0a 02 call 200daf8 <== NOT EXECUTED 200b2f4: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 200b2f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b2fc: 12 80 00 8d bne 200b530 <== NOT EXECUTED 200b300: d0 4c e1 84 ldsb [ %l3 + 0x184 ], %o0 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200b304: aa 15 63 00 or %l5, 0x300, %l5 <== NOT EXECUTED 200b308: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 200b30c: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 200b310: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 200b314: 96 10 20 00 clr %o3 <== NOT EXECUTED 200b318: 7f ff ec ce call 2006650 <== NOT EXECUTED 200b31c: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 200b320: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b324: 12 80 00 81 bne 200b528 <== NOT EXECUTED 200b328: ac 07 bf f8 add %fp, -8, %l6 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200b32c: d2 04 a0 2c ld [ %l2 + 0x2c ], %o1 <== NOT EXECUTED 200b330: 2b 00 80 7f sethi %hi(0x201fc00), %l5 <== NOT EXECUTED 200b334: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 200b338: 7f ff f3 ed call 20082ec <_Objects_Get> <== NOT EXECUTED 200b33c: 90 15 60 c8 or %l5, 0xc8, %o0 <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 200b340: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 200b344: 29 04 00 00 sethi %hi(0x10000000), %l4 <== NOT EXECUTED 200b348: 82 10 40 14 or %g1, %l4, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 200b34c: 7f ff f6 95 call 2008da0 <_Thread_Enable_dispatch> <== NOT EXECUTED 200b350: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 200b354: d2 04 a0 30 ld [ %l2 + 0x30 ], %o1 <== NOT EXECUTED 200b358: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED 200b35c: 7f ff f3 e4 call 20082ec <_Objects_Get> <== NOT EXECUTED 200b360: 90 15 60 c8 or %l5, 0xc8, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 200b364: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 200b368: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 200b36c: 7f ff f6 8d call 2008da0 <_Thread_Enable_dispatch> <== NOT EXECUTED 200b370: e8 22 20 4c st %l4, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200b374: c2 0c e1 84 ldub [ %l3 + 0x184 ], %g1 <== NOT EXECUTED 200b378: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 200b37c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 200b380: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 200b384: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 200b388: 12 bf ff 69 bne 200b12c <== NOT EXECUTED 200b38c: c4 2c e1 84 stb %g2, [ %l3 + 0x184 ] <== NOT EXECUTED c = 'a'; 200b390: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 200b394: 10 bf ff 66 b 200b12c <== NOT EXECUTED 200b398: c2 2c e1 84 stb %g1, [ %l3 + 0x184 ] <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200b39c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200b3a0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200b3a4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200b3a8: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200b3ac: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED 200b3b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b3b4: 02 80 00 54 be 200b504 <== NOT EXECUTED 200b3b8: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200b3bc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200b3c0: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200b3c4: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200b3c8: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200b3cc: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 200b3d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b3d4: 12 bf ff 70 bne 200b194 <== NOT EXECUTED 200b3d8: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 200b3dc: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200b3e0: 40 00 0a 18 call 200dc40 <== NOT EXECUTED 200b3e4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 200b3e8: 10 bf ff 6c b 200b198 <== NOT EXECUTED 200b3ec: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200b3f0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200b3f4: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200b3f8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200b3fc: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200b400: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED 200b404: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b408: 02 80 00 3a be 200b4f0 <== NOT EXECUTED 200b40c: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200b410: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200b414: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b418: 32 bf ff 60 bne,a 200b198 <== NOT EXECUTED 200b41c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 200b420: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 200b424: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 200b428: 32 80 00 3c bne,a 200b518 <== NOT EXECUTED 200b42c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 200b430: 10 80 00 0c b 200b460 <== NOT EXECUTED 200b434: e4 04 20 20 ld [ %l0 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200b438: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b43c: 7f ff ed 26 call 20068d4 <== NOT EXECUTED 200b440: 94 10 20 00 clr %o2 <== NOT EXECUTED 200b444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b448: 12 bf ff 7c bne 200b238 <== NOT EXECUTED 200b44c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200b450: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 200b454: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 200b458: 32 bf ff 50 bne,a 200b198 <== NOT EXECUTED 200b45c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200b460: 7f ff ed 64 call 20069f0 <== NOT EXECUTED 200b464: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 200b468: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 200b46c: 40 00 0a 0c call 200dc9c <== NOT EXECUTED 200b470: 92 10 20 00 clr %o1 <== NOT EXECUTED 200b474: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200b478: 22 bf ff f0 be,a 200b438 <== NOT EXECUTED 200b47c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 200b480: 10 bf ff 6e b 200b238 <== NOT EXECUTED 200b484: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 200b488: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200b48c: 12 80 00 06 bne 200b4a4 <== NOT EXECUTED 200b490: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 200b494: 7f ff ed 57 call 20069f0 <== NOT EXECUTED 200b498: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200b49c: 10 bf ff 35 b 200b170 <== NOT EXECUTED 200b4a0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 200b4a4: 40 00 09 cd call 200dbd8 <== NOT EXECUTED 200b4a8: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 200b4ac: 40 00 09 cb call 200dbd8 <== NOT EXECUTED 200b4b0: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 200b4b4: 7f ff ec db call 2006820 <== NOT EXECUTED 200b4b8: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 200b4bc: 7f ff de 0c call 2002cec <== NOT EXECUTED 200b4c0: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED free(pipe); 200b4c4: 7f ff de 0a call 2002cec <== NOT EXECUTED 200b4c8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 200b4cc: 7f ff ed 49 call 20069f0 <== NOT EXECUTED 200b4d0: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 <== NOT EXECUTED 200b4d4: 81 c7 e0 08 ret 200b4d8: 81 e8 00 00 restore switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200b4dc: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 200b4e0: 40 00 09 d8 call 200dc40 <== NOT EXECUTED 200b4e4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 200b4e8: 10 bf ff 38 b 200b1c8 <== NOT EXECUTED 200b4ec: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 200b4f0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200b4f4: 40 00 09 d3 call 200dc40 <== NOT EXECUTED 200b4f8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200b4fc: 10 bf ff c6 b 200b414 <== NOT EXECUTED 200b500: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200b504: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 200b508: 40 00 09 ce call 200dc40 <== NOT EXECUTED 200b50c: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200b510: 10 bf ff ac b 200b3c0 <== NOT EXECUTED 200b514: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 200b518: 7f ff ed 36 call 20069f0 <== NOT EXECUTED 200b51c: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; 200b520: 10 bf ff 47 b 200b23c <== NOT EXECUTED 200b524: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200b528: 40 00 09 ac call 200dbd8 <== NOT EXECUTED 200b52c: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 200b530: 40 00 09 aa call 200dbd8 <== NOT EXECUTED 200b534: d0 05 20 2c ld [ %l4 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 200b538: 7f ff dd ed call 2002cec <== NOT EXECUTED 200b53c: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED err_buf: free(pipe); 200b540: 7f ff dd eb call 2002cec <== NOT EXECUTED 200b544: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 200b548: 10 bf ff e1 b 200b4cc <== NOT EXECUTED 200b54c: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED =============================================================================== 02003a64 : long fpathconf( int fd, int name ) { 2003a64: 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); 2003a68: 03 00 80 81 sethi %hi(0x2020400), %g1 2003a6c: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 20207f4 2003a70: 80 a6 00 01 cmp %i0, %g1 2003a74: 1a 80 00 3d bcc 2003b68 2003a78: 03 00 80 84 sethi %hi(0x2021000), %g1 iop = rtems_libio_iop(fd); 2003a7c: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 2021208 2003a80: 85 2e 20 06 sll %i0, 6, %g2 2003a84: b1 2e 20 03 sll %i0, 3, %i0 2003a88: b0 06 00 02 add %i0, %g2, %i0 2003a8c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 2003a90: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2003a94: 80 88 61 00 btst 0x100, %g1 2003a98: 02 80 00 34 be 2003b68 <== NEVER TAKEN 2003a9c: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2003aa0: 08 80 00 08 bleu 2003ac0 2003aa4: 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 ); 2003aa8: 40 00 3d 39 call 2012f8c <__errno> 2003aac: b0 10 3f ff mov -1, %i0 2003ab0: 82 10 20 16 mov 0x16, %g1 2003ab4: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2003ab8: 81 c7 e0 08 ret 2003abc: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2003ac0: b3 2e 60 02 sll %i1, 2, %i1 2003ac4: 05 00 80 0e sethi %hi(0x2003800), %g2 2003ac8: 84 10 a2 34 or %g2, 0x234, %g2 ! 2003a34 2003acc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 2003ad0: 81 c0 80 00 jmp %g2 2003ad4: 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; 2003ad8: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 2003adc: 81 c7 e0 08 ret 2003ae0: 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; 2003ae4: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 2003ae8: 81 c7 e0 08 ret 2003aec: 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; 2003af0: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 2003af4: 81 c7 e0 08 ret 2003af8: 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; 2003afc: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 2003b00: 81 c7 e0 08 ret 2003b04: 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; 2003b08: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 2003b0c: 81 c7 e0 08 ret 2003b10: 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; 2003b14: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 2003b18: 81 c7 e0 08 ret 2003b1c: 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; 2003b20: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 2003b24: 81 c7 e0 08 ret 2003b28: 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; 2003b2c: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 2003b30: 81 c7 e0 08 ret 2003b34: 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; 2003b38: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 2003b3c: 81 c7 e0 08 ret 2003b40: 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; 2003b44: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 2003b48: 81 c7 e0 08 ret 2003b4c: 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; 2003b50: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 2003b54: 81 c7 e0 08 ret 2003b58: 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; 2003b5c: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 2003b60: 81 c7 e0 08 ret 2003b64: 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); 2003b68: 40 00 3d 09 call 2012f8c <__errno> 2003b6c: b0 10 3f ff mov -1, %i0 2003b70: 82 10 20 09 mov 9, %g1 2003b74: c2 22 00 00 st %g1, [ %o0 ] 2003b78: 81 c7 e0 08 ret 2003b7c: 81 e8 00 00 restore =============================================================================== 02002cec : void free( void *ptr ) { MSBUMP(free_calls, 1); 2002cec: 9d e3 bf a0 save %sp, -96, %sp 2002cf0: 03 00 80 7c sethi %hi(0x201f000), %g1 2002cf4: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201f1e0 2002cf8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2002cfc: b2 10 00 18 mov %i0, %i1 2002d00: 84 00 a0 01 inc %g2 if ( !ptr ) 2002d04: 80 a6 20 00 cmp %i0, 0 2002d08: 02 80 00 15 be 2002d5c 2002d0c: c4 20 60 0c st %g2, [ %g1 + 0xc ] /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2002d10: 03 00 80 7d sethi %hi(0x201f400), %g1 2002d14: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 201f540 <_System_state_Current> 2002d18: 80 a0 60 03 cmp %g1, 3 2002d1c: 02 80 00 17 be 2002d78 <== ALWAYS TAKEN 2002d20: 03 00 80 7b sethi %hi(0x201ec00), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2002d24: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201eee8 2002d28: 80 a0 60 00 cmp %g1, 0 2002d2c: 02 80 00 06 be 2002d44 <== ALWAYS TAKEN 2002d30: 21 00 80 79 sethi %hi(0x201e400), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2002d34: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 2002d38: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002d3c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2002d40: 21 00 80 79 sethi %hi(0x201e400), %l0 <== NOT EXECUTED 2002d44: d0 04 23 c0 ld [ %l0 + 0x3c0 ], %o0 ! 201e7c0 2002d48: 40 00 16 53 call 2008694 <_Protected_heap_Free> 2002d4c: 92 10 00 19 mov %i1, %o1 2002d50: 80 8a 20 ff btst 0xff, %o0 2002d54: 02 80 00 04 be 2002d64 <== NEVER TAKEN 2002d58: c2 04 23 c0 ld [ %l0 + 0x3c0 ], %g1 2002d5c: 81 c7 e0 08 ret 2002d60: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2002d64: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED 2002d68: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 2002d6c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 2002d70: 40 00 03 f2 call 2003d38 <== NOT EXECUTED 2002d74: 91 ee 21 28 restore %i0, 0x128, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2002d78: 40 00 00 62 call 2002f00 2002d7c: 01 00 00 00 nop 2002d80: 80 8a 20 ff btst 0xff, %o0 2002d84: 12 bf ff e8 bne 2002d24 <== ALWAYS TAKEN 2002d88: 03 00 80 7b sethi %hi(0x201ec00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 2002d8c: 40 00 00 6f call 2002f48 <== NOT EXECUTED 2002d90: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202e0dc : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 202e0dc: 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 202e0e0: 03 00 81 d3 sethi %hi(0x2074c00), %g1 <== NOT EXECUTED 202e0e4: 82 10 60 bc or %g1, 0xbc, %g1 ! 2074cbc <== NOT EXECUTED 202e0e8: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 202e0ec: 02 80 00 18 be 202e14c <== NOT EXECUTED 202e0f0: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 202e0f4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 202e0f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202e0fc: 22 80 00 09 be,a 202e120 <== NOT EXECUTED 202e100: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 202e104: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202e108: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202e10c: 22 80 00 05 be,a 202e120 <== NOT EXECUTED 202e110: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 202e114: 9f c0 40 00 call %g1 <== NOT EXECUTED 202e118: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 202e11c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 202e120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202e124: 02 80 00 08 be 202e144 <== NOT EXECUTED 202e128: 01 00 00 00 nop <== NOT EXECUTED 202e12c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202e130: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202e134: 02 80 00 04 be 202e144 <== NOT EXECUTED 202e138: 01 00 00 00 nop <== NOT EXECUTED 202e13c: 9f c0 40 00 call %g1 <== NOT EXECUTED 202e140: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 202e144: 7f ff 69 e6 call 20088dc <== NOT EXECUTED 202e148: 81 e8 00 00 restore <== NOT EXECUTED 202e14c: 81 c7 e0 08 ret <== NOT EXECUTED 202e150: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201c3a0 : int fstat( int fd, struct stat *sbuf ) { 201c3a0: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 201c3a4: 80 a6 60 00 cmp %i1, 0 201c3a8: 02 80 00 3b be 201c494 201c3ac: 03 00 80 79 sethi %hi(0x201e400), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 201c3b0: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 201e7b4 201c3b4: 80 a6 00 01 cmp %i0, %g1 201c3b8: 1a 80 00 2b bcc 201c464 201c3bc: 03 00 80 7c sethi %hi(0x201f000), %g1 201c3c0: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 201f1c4 201c3c4: 83 2e 20 06 sll %i0, 6, %g1 201c3c8: b1 2e 20 03 sll %i0, 3, %i0 201c3cc: b0 06 00 01 add %i0, %g1, %i0 201c3d0: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201c3d4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 201c3d8: 80 88 61 00 btst 0x100, %g1 201c3dc: 02 80 00 22 be 201c464 <== NEVER TAKEN 201c3e0: 01 00 00 00 nop if ( !iop->handlers ) 201c3e4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 201c3e8: 80 a0 60 00 cmp %g1, 0 201c3ec: 02 80 00 1e be 201c464 <== NEVER TAKEN 201c3f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 201c3f4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201c3f8: 80 a0 60 00 cmp %g1, 0 201c3fc: 02 80 00 20 be 201c47c <== NEVER TAKEN 201c400: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 201c404: c0 26 40 00 clr [ %i1 ] 201c408: c0 26 60 04 clr [ %i1 + 4 ] 201c40c: c0 26 60 08 clr [ %i1 + 8 ] 201c410: c0 26 60 0c clr [ %i1 + 0xc ] 201c414: c0 26 60 10 clr [ %i1 + 0x10 ] 201c418: c0 26 60 14 clr [ %i1 + 0x14 ] 201c41c: c0 26 60 18 clr [ %i1 + 0x18 ] 201c420: c0 26 60 1c clr [ %i1 + 0x1c ] 201c424: c0 26 60 20 clr [ %i1 + 0x20 ] 201c428: c0 26 60 24 clr [ %i1 + 0x24 ] 201c42c: c0 26 60 28 clr [ %i1 + 0x28 ] 201c430: c0 26 60 2c clr [ %i1 + 0x2c ] 201c434: c0 26 60 30 clr [ %i1 + 0x30 ] 201c438: c0 26 60 34 clr [ %i1 + 0x34 ] 201c43c: c0 26 60 38 clr [ %i1 + 0x38 ] 201c440: c0 26 60 3c clr [ %i1 + 0x3c ] 201c444: c0 26 60 40 clr [ %i1 + 0x40 ] 201c448: c0 26 60 44 clr [ %i1 + 0x44 ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 201c44c: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 201c450: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201c454: 9f c0 40 00 call %g1 201c458: 90 02 20 1c add %o0, 0x1c, %o0 } 201c45c: 81 c7 e0 08 ret 201c460: 91 e8 00 08 restore %g0, %o0, %o0 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 201c464: 7f ff d5 66 call 20119fc <__errno> 201c468: b0 10 3f ff mov -1, %i0 201c46c: 82 10 20 09 mov 9, %g1 201c470: c2 22 00 00 st %g1, [ %o0 ] 201c474: 81 c7 e0 08 ret 201c478: 81 e8 00 00 restore if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 201c47c: 7f ff d5 60 call 20119fc <__errno> <== NOT EXECUTED 201c480: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201c484: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 201c488: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201c48c: 81 c7 e0 08 ret <== NOT EXECUTED 201c490: 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 ); 201c494: 7f ff d5 5a call 20119fc <__errno> 201c498: b0 10 3f ff mov -1, %i0 201c49c: 82 10 20 0e mov 0xe, %g1 201c4a0: c2 22 00 00 st %g1, [ %o0 ] 201c4a4: 81 c7 e0 08 ret 201c4a8: 81 e8 00 00 restore =============================================================================== 0202caf4 : #include int fsync( int fd ) { 202caf4: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202caf8: 03 00 81 c2 sethi %hi(0x2070800), %g1 202cafc: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 202cb00: 80 a6 00 01 cmp %i0, %g1 202cb04: 1a 80 00 17 bcc 202cb60 <== NEVER TAKEN 202cb08: 03 00 81 d3 sethi %hi(0x2074c00), %g1 iop = rtems_libio_iop( fd ); 202cb0c: d0 00 60 64 ld [ %g1 + 0x64 ], %o0 ! 2074c64 202cb10: 83 2e 20 06 sll %i0, 6, %g1 202cb14: b1 2e 20 03 sll %i0, 3, %i0 202cb18: b0 06 00 01 add %i0, %g1, %i0 202cb1c: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 202cb20: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 202cb24: 80 88 61 00 btst 0x100, %g1 202cb28: 02 80 00 0e be 202cb60 <== NEVER TAKEN 202cb2c: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 202cb30: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 202cb34: 80 a0 60 00 cmp %g1, 0 202cb38: 02 80 00 0a be 202cb60 <== NEVER TAKEN 202cb3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 202cb40: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 202cb44: 80 a0 60 00 cmp %g1, 0 202cb48: 02 80 00 0c be 202cb78 202cb4c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 202cb50: 9f c0 40 00 call %g1 202cb54: 01 00 00 00 nop } 202cb58: 81 c7 e0 08 ret 202cb5c: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 202cb60: 40 00 76 48 call 204a480 <__errno> <== NOT EXECUTED 202cb64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202cb68: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202cb6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202cb70: 81 c7 e0 08 ret <== NOT EXECUTED 202cb74: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 202cb78: 40 00 76 42 call 204a480 <__errno> 202cb7c: b0 10 3f ff mov -1, %i0 202cb80: 82 10 20 86 mov 0x86, %g1 202cb84: c2 22 00 00 st %g1, [ %o0 ] 202cb88: 81 c7 e0 08 ret 202cb8c: 81 e8 00 00 restore =============================================================================== 0200ca04 : int ftruncate( int fd, off_t length ) { 200ca04: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 200ca08: 03 00 80 79 sethi %hi(0x201e400), %g1 200ca0c: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 201e7b4 200ca10: 80 a6 00 01 cmp %i0, %g1 200ca14: 1a 80 00 2d bcc 200cac8 <== NEVER TAKEN 200ca18: 03 00 80 7c sethi %hi(0x201f000), %g1 iop = rtems_libio_iop( fd ); 200ca1c: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201f1c4 200ca20: 85 2e 20 06 sll %i0, 6, %g2 200ca24: b1 2e 20 03 sll %i0, 3, %i0 200ca28: b0 06 00 02 add %i0, %g2, %i0 200ca2c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 200ca30: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200ca34: 80 88 61 00 btst 0x100, %g1 200ca38: 02 80 00 24 be 200cac8 <== NEVER TAKEN 200ca3c: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200ca40: 02 80 00 28 be 200cae0 <== NEVER TAKEN 200ca44: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 200ca48: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200ca4c: c2 27 bf ec st %g1, [ %fp + -20 ] 200ca50: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200ca54: c2 27 bf f0 st %g1, [ %fp + -16 ] 200ca58: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200ca5c: c2 27 bf f4 st %g1, [ %fp + -12 ] 200ca60: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 200ca64: c2 27 bf f8 st %g1, [ %fp + -8 ] 200ca68: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 200ca6c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200ca70: 80 a0 60 00 cmp %g1, 0 200ca74: 02 80 00 21 be 200caf8 <== NEVER TAKEN 200ca78: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 200ca7c: 9f c0 40 00 call %g1 200ca80: 90 07 bf ec add %fp, -20, %o0 200ca84: 80 a2 20 01 cmp %o0, 1 200ca88: 02 80 00 22 be 200cb10 200ca8c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200ca90: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200ca94: 80 88 60 04 btst 4, %g1 200ca98: 02 80 00 12 be 200cae0 <== NEVER TAKEN 200ca9c: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 200caa0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200caa4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200caa8: 80 a0 60 00 cmp %g1, 0 200caac: 02 80 00 13 be 200caf8 <== NEVER TAKEN 200cab0: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 200cab4: 92 10 00 19 mov %i1, %o1 200cab8: 9f c0 40 00 call %g1 200cabc: 94 10 00 1a mov %i2, %o2 } 200cac0: 81 c7 e0 08 ret 200cac4: 91 e8 00 08 restore %g0, %o0, %o0 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 200cac8: 40 00 13 cd call 20119fc <__errno> <== NOT EXECUTED 200cacc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200cad0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 200cad4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200cad8: 81 c7 e0 08 ret <== NOT EXECUTED 200cadc: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200cae0: 40 00 13 c7 call 20119fc <__errno> <== NOT EXECUTED 200cae4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200cae8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200caec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200caf0: 81 c7 e0 08 ret <== NOT EXECUTED 200caf4: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 200caf8: 40 00 13 c1 call 20119fc <__errno> <== NOT EXECUTED 200cafc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200cb00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200cb04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200cb08: 81 c7 e0 08 ret <== NOT EXECUTED 200cb0c: 81 e8 00 00 restore <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 200cb10: 40 00 13 bb call 20119fc <__errno> 200cb14: b0 10 3f ff mov -1, %i0 200cb18: 82 10 20 15 mov 0x15, %g1 200cb1c: c2 22 00 00 st %g1, [ %o0 ] 200cb20: 81 c7 e0 08 ret 200cb24: 81 e8 00 00 restore =============================================================================== 020028a0 : rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 20028a0: 03 00 80 8b sethi %hi(0x2022c00), %g1 20028a4: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 2022e5c 20028a8: 80 a0 40 08 cmp %g1, %o0 20028ac: 18 80 00 05 bgu 20028c0 <== ALWAYS TAKEN 20028b0: 03 00 80 8b sethi %hi(0x2022c00), %g1 if (minor < dtab->size && dtab->minor != NULL) { rtems_disk_device *dd = dtab->minor [minor]; if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; 20028b4: 90 10 20 00 clr %o0 <== NOT EXECUTED return dd; } } return NULL; } 20028b8: 81 c3 e0 08 retl 20028bc: 01 00 00 00 nop rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 20028c0: c2 00 62 58 ld [ %g1 + 0x258 ], %g1 20028c4: 80 a0 60 00 cmp %g1, 0 20028c8: 22 bf ff fc be,a 20028b8 <== NEVER TAKEN 20028cc: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_disk_device_table *dtab = disktab + major; 20028d0: 91 2a 20 03 sll %o0, 3, %o0 20028d4: 84 00 40 08 add %g1, %o0, %g2 if (minor < dtab->size && dtab->minor != NULL) { 20028d8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 20028dc: 80 a0 80 09 cmp %g2, %o1 20028e0: 28 bf ff f6 bleu,a 20028b8 <== NEVER TAKEN 20028e4: 90 10 20 00 clr %o0 <== NOT EXECUTED 20028e8: c2 00 40 08 ld [ %g1 + %o0 ], %g1 20028ec: 80 a0 60 00 cmp %g1, 0 20028f0: 02 bf ff f2 be 20028b8 <== NEVER TAKEN 20028f4: 90 10 20 00 clr %o0 rtems_disk_device *dd = dtab->minor [minor]; 20028f8: 93 2a 60 02 sll %o1, 2, %o1 20028fc: d0 00 40 09 ld [ %g1 + %o1 ], %o0 if (dd != NULL && !lookup_only) { 2002900: 80 a2 20 00 cmp %o0, 0 2002904: 02 bf ff ed be 20028b8 2002908: 80 8a a0 ff btst 0xff, %o2 200290c: 12 bf ff eb bne 20028b8 2002910: 01 00 00 00 nop if (!dd->deleted) { 2002914: c2 0a 20 30 ldub [ %o0 + 0x30 ], %g1 2002918: 80 a0 60 00 cmp %g1, 0 200291c: 32 bf ff e7 bne,a 20028b8 2002920: 90 10 20 00 clr %o0 ++dd->uses; 2002924: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2002928: 82 00 60 01 inc %g1 200292c: 81 c3 e0 08 retl 2002930: c2 22 20 14 st %g1, [ %o0 + 0x14 ] =============================================================================== 02063f74 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2063f74: 9d e3 bf 88 save %sp, -120, %sp /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 2063f78: 03 00 81 c2 sethi %hi(0x2070800), %g1 2063f7c: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20709f4 2063f80: 80 a6 00 01 cmp %i0, %g1 2063f84: 1a 80 00 08 bcc 2063fa4 <== NEVER TAKEN 2063f88: a0 10 20 00 clr %l0 2063f8c: 03 00 81 d3 sethi %hi(0x2074c00), %g1 2063f90: e0 00 60 64 ld [ %g1 + 0x64 ], %l0 ! 2074c64 2063f94: 83 2e 20 06 sll %i0, 6, %g1 2063f98: b1 2e 20 03 sll %i0, 3, %i0 2063f9c: b0 06 00 01 add %i0, %g1, %i0 2063fa0: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 2063fa4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2063fa8: c2 27 bf ec st %g1, [ %fp + -20 ] 2063fac: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 2063fb0: c2 27 bf f0 st %g1, [ %fp + -16 ] 2063fb4: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 2063fb8: c2 27 bf f4 st %g1, [ %fp + -12 ] 2063fbc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2063fc0: c2 27 bf f8 st %g1, [ %fp + -8 ] 2063fc4: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 if ( !loc.ops->node_type_h ) 2063fc8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2063fcc: 80 a0 60 00 cmp %g1, 0 2063fd0: 02 80 00 17 be 206402c <== NEVER TAKEN 2063fd4: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 2063fd8: 9f c0 40 00 call %g1 2063fdc: 90 07 bf ec add %fp, -20, %o0 2063fe0: 80 a2 20 01 cmp %o0, 1 2063fe4: 12 80 00 0c bne 2064014 2063fe8: 01 00 00 00 nop /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 2063fec: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2063ff0: c2 00 60 08 ld [ %g1 + 8 ], %g1 2063ff4: 80 a0 60 00 cmp %g1, 0 2063ff8: 02 80 00 0d be 206402c <== NEVER TAKEN 2063ffc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 2064000: 92 10 00 19 mov %i1, %o1 2064004: 9f c0 40 00 call %g1 2064008: 94 10 00 1a mov %i2, %o2 } 206400c: 81 c7 e0 08 ret 2064010: 91 e8 00 08 restore %g0, %o0, %o0 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 2064014: 7f ff 99 1b call 204a480 <__errno> 2064018: b0 10 3f ff mov -1, %i0 206401c: 82 10 20 14 mov 0x14, %g1 2064020: c2 22 00 00 st %g1, [ %o0 ] 2064024: 81 c7 e0 08 ret 2064028: 81 e8 00 00 restore * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 206402c: 7f ff 99 15 call 204a480 <__errno> <== NOT EXECUTED 2064030: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2064034: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2064038: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 206403c: 81 c7 e0 08 ret <== NOT EXECUTED 2064040: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202ccd4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 202ccd4: 03 00 81 c3 sethi %hi(0x2070c00), %g1 <== NOT EXECUTED 202ccd8: c2 00 62 24 ld [ %g1 + 0x224 ], %g1 ! 2070e24 <== NOT EXECUTED return _POSIX_types_Gid; } 202ccdc: 81 c3 e0 08 retl <== NOT EXECUTED 202cce0: d0 10 60 34 lduh [ %g1 + 0x34 ], %o0 <== NOT EXECUTED =============================================================================== 0202d3d0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 202d3d0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 202d3d4: 7f ff ff b3 call 202d2a0 202d3d8: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 202d3dc: 11 00 81 ab sethi %hi(0x206ac00), %o0 202d3e0: 13 00 81 ab sethi %hi(0x206ac00), %o1 202d3e4: 90 12 22 90 or %o0, 0x290, %o0 202d3e8: 40 00 76 ce call 204af20 202d3ec: 92 12 62 18 or %o1, 0x218, %o1 202d3f0: a0 92 20 00 orcc %o0, 0, %l0 202d3f4: 12 80 00 0b bne 202d420 <== ALWAYS TAKEN 202d3f8: 92 10 00 1a mov %i2, %o1 202d3fc: 30 80 00 27 b,a 202d498 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 202d400: 40 00 8d db call 2050b6c 202d404: 92 10 00 18 mov %i0, %o1 202d408: 80 a0 00 08 cmp %g0, %o0 202d40c: 82 60 3f ff subx %g0, -1, %g1 } else { match = (grp->gr_gid == gid); } if (match) { 202d410: 80 a0 60 00 cmp %g1, 0 202d414: 12 80 00 14 bne 202d464 202d418: 90 10 00 10 mov %l0, %o0 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 202d41c: 92 10 00 1a mov %i2, %o1 202d420: 94 10 00 1b mov %i3, %o2 202d424: 96 10 00 1c mov %i4, %o3 202d428: 7f ff fe d1 call 202cf6c 202d42c: 90 10 00 10 mov %l0, %o0 202d430: 80 a2 20 00 cmp %o0, 0 202d434: 02 80 00 11 be 202d478 <== NEVER TAKEN 202d438: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 202d43c: 32 bf ff f1 bne,a 202d400 <== ALWAYS TAKEN 202d440: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 202d444: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 202d448: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 202d44c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 202d450: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 202d454: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d458: 02 bf ff f2 be 202d420 <== NOT EXECUTED 202d45c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 202d460: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 202d464: 40 00 74 5f call 204a5e0 202d468: b0 10 20 00 clr %i0 *result = grp; 202d46c: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 202d470: 81 c7 e0 08 ret 202d474: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 202d478: 40 00 74 02 call 204a480 <__errno> <== NOT EXECUTED 202d47c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202d480: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202d484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 202d488: 40 00 74 56 call 204a5e0 <== NOT EXECUTED 202d48c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 202d490: 81 c7 e0 08 ret <== NOT EXECUTED 202d494: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 202d498: 40 00 73 fa call 204a480 <__errno> <== NOT EXECUTED 202d49c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202d4a0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202d4a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 202d4a8: 81 c7 e0 08 ret <== NOT EXECUTED 202d4ac: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d0ec : return NULL; return p; } struct group *getgrent(void) { 202d0ec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 202d0f0: 03 00 81 d2 sethi %hi(0x2074800), %g1 <== NOT EXECUTED 202d0f4: d0 00 61 5c ld [ %g1 + 0x15c ], %o0 ! 207495c <== NOT EXECUTED 202d0f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d0fc: 32 80 00 04 bne,a 202d10c <== NOT EXECUTED 202d100: 31 00 81 d2 sethi %hi(0x2074800), %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 202d104: 81 c7 e0 08 ret <== NOT EXECUTED 202d108: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 202d10c: 15 00 81 d2 sethi %hi(0x2074800), %o2 <== NOT EXECUTED 202d110: 92 16 22 28 or %i0, 0x228, %o1 <== NOT EXECUTED 202d114: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 202d118: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202d11c: 7f ff ff 94 call 202cf6c <== NOT EXECUTED 202d120: b0 16 22 28 or %i0, 0x228, %i0 <== NOT EXECUTED 202d124: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d128: 02 bf ff f7 be 202d104 <== NOT EXECUTED 202d12c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 202d130: 81 c7 e0 08 ret <== NOT EXECUTED 202d134: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d4e4 : } struct group *getgrgid( gid_t gid ) { 202d4e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 202d4e8: 13 00 81 d2 sethi %hi(0x2074800), %o1 <== NOT EXECUTED 202d4ec: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 202d4f0: 92 12 62 28 or %o1, 0x228, %o1 <== NOT EXECUTED 202d4f4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 202d4f8: 15 00 81 d2 sethi %hi(0x2074800), %o2 <== NOT EXECUTED 202d4fc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202d500: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 202d504: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 202d508: 7f ff ff ea call 202d4b0 <== NOT EXECUTED 202d50c: b0 10 20 00 clr %i0 <== NOT EXECUTED 202d510: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d514: 22 80 00 02 be,a 202d51c <== NOT EXECUTED 202d518: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 202d51c: 81 c7 e0 08 ret <== NOT EXECUTED 202d520: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d4b0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 202d4b0: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 202d4b4: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 202d4b8: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 202d4bc: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 202d4c0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 202d4c4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 202d4c8: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 202d4cc: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 202d4d0: 90 10 20 00 clr %o0 <== NOT EXECUTED 202d4d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202d4d8: 7f ff ff be call 202d3d0 <== NOT EXECUTED 202d4dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202d550 : } struct group *getgrnam( const char *name ) { 202d550: 9d e3 bf 98 save %sp, -104, %sp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 202d554: 13 00 81 d2 sethi %hi(0x2074800), %o1 202d558: 90 10 00 18 mov %i0, %o0 202d55c: 92 12 62 28 or %o1, 0x228, %o1 202d560: 15 00 81 d2 sethi %hi(0x2074800), %o2 202d564: 96 10 20 c8 mov 0xc8, %o3 202d568: 94 12 a1 60 or %o2, 0x160, %o2 202d56c: 98 07 bf fc add %fp, -4, %o4 202d570: 7f ff ff ed call 202d524 202d574: b0 10 20 00 clr %i0 202d578: 80 a2 20 00 cmp %o0, 0 202d57c: 22 80 00 02 be,a 202d584 <== ALWAYS TAKEN 202d580: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 202d584: 81 c7 e0 08 ret 202d588: 81 e8 00 00 restore =============================================================================== 0202d5d0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 202d5d0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 202d5d4: 7f ff ff 33 call 202d2a0 202d5d8: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 202d5dc: 11 00 81 ab sethi %hi(0x206ac00), %o0 202d5e0: 13 00 81 ab sethi %hi(0x206ac00), %o1 202d5e4: 90 12 22 08 or %o0, 0x208, %o0 202d5e8: 40 00 76 4e call 204af20 202d5ec: 92 12 62 18 or %o1, 0x218, %o1 202d5f0: a0 92 20 00 orcc %o0, 0, %l0 202d5f4: 12 80 00 0b bne 202d620 <== ALWAYS TAKEN 202d5f8: 92 10 00 1a mov %i2, %o1 202d5fc: 30 80 00 27 b,a 202d698 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 202d600: 40 00 8d 5b call 2050b6c 202d604: 92 10 00 18 mov %i0, %o1 202d608: 80 a0 00 08 cmp %g0, %o0 202d60c: 82 60 3f ff subx %g0, -1, %g1 } else { match = (pwd->pw_uid == uid); } if (match) { 202d610: 80 a0 60 00 cmp %g1, 0 202d614: 12 80 00 14 bne 202d664 202d618: 90 10 00 10 mov %l0, %o0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 202d61c: 92 10 00 1a mov %i2, %o1 202d620: 94 10 00 1b mov %i3, %o2 202d624: 96 10 00 1c mov %i4, %o3 202d628: 7f ff fe c4 call 202d138 202d62c: 90 10 00 10 mov %l0, %o0 202d630: 80 a2 20 00 cmp %o0, 0 202d634: 02 80 00 11 be 202d678 <== NEVER TAKEN 202d638: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; fclose(fp); return -1; } if (name) { 202d63c: 32 bf ff f1 bne,a 202d600 <== ALWAYS TAKEN 202d640: d0 06 80 00 ld [ %i2 ], %o0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 202d644: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 202d648: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 202d64c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 202d650: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 202d654: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d658: 02 bf ff f2 be 202d620 <== NOT EXECUTED 202d65c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 202d660: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 202d664: 40 00 73 df call 204a5e0 202d668: b0 10 20 00 clr %i0 *result = pwd; 202d66c: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 202d670: 81 c7 e0 08 ret 202d674: 81 e8 00 00 restore errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 202d678: 40 00 73 82 call 204a480 <__errno> <== NOT EXECUTED 202d67c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202d680: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202d684: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 202d688: 40 00 73 d6 call 204a5e0 <== NOT EXECUTED 202d68c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 202d690: 81 c7 e0 08 ret <== NOT EXECUTED 202d694: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 202d698: 40 00 73 7a call 204a480 <__errno> <== NOT EXECUTED 202d69c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202d6a0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202d6a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 202d6a8: 81 c7 e0 08 ret <== NOT EXECUTED 202d6ac: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d254 : return NULL; return p; } struct passwd *getpwent(void) { 202d254: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 202d258: 03 00 81 d2 sethi %hi(0x2074800), %g1 <== NOT EXECUTED 202d25c: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 2074874 <== NOT EXECUTED 202d260: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d264: 32 80 00 04 bne,a 202d274 <== NOT EXECUTED 202d268: 31 00 81 d2 sethi %hi(0x2074800), %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 202d26c: 81 c7 e0 08 ret <== NOT EXECUTED 202d270: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 202d274: 15 00 81 d2 sethi %hi(0x2074800), %o2 <== NOT EXECUTED 202d278: 92 16 21 40 or %i0, 0x140, %o1 <== NOT EXECUTED 202d27c: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 202d280: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202d284: 7f ff ff ad call 202d138 <== NOT EXECUTED 202d288: b0 16 21 40 or %i0, 0x140, %i0 <== NOT EXECUTED 202d28c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d290: 02 bf ff f7 be 202d26c <== NOT EXECUTED 202d294: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 202d298: 81 c7 e0 08 ret <== NOT EXECUTED 202d29c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d750 : } struct passwd *getpwnam( const char *name ) { 202d750: 9d e3 bf 98 save %sp, -104, %sp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 202d754: 13 00 81 d2 sethi %hi(0x2074800), %o1 202d758: 90 10 00 18 mov %i0, %o0 202d75c: 92 12 61 40 or %o1, 0x140, %o1 202d760: 15 00 81 d2 sethi %hi(0x2074800), %o2 202d764: 96 10 20 c8 mov 0xc8, %o3 202d768: 94 12 a0 78 or %o2, 0x78, %o2 202d76c: 98 07 bf fc add %fp, -4, %o4 202d770: 7f ff ff ed call 202d724 202d774: b0 10 20 00 clr %i0 202d778: 80 a2 20 00 cmp %o0, 0 202d77c: 22 80 00 02 be,a 202d784 <== ALWAYS TAKEN 202d780: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 202d784: 81 c7 e0 08 ret 202d788: 81 e8 00 00 restore =============================================================================== 0202d6e4 : } struct passwd *getpwuid( uid_t uid ) { 202d6e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 202d6e8: 13 00 81 d2 sethi %hi(0x2074800), %o1 <== NOT EXECUTED 202d6ec: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 202d6f0: 92 12 61 40 or %o1, 0x140, %o1 <== NOT EXECUTED 202d6f4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 202d6f8: 15 00 81 d2 sethi %hi(0x2074800), %o2 <== NOT EXECUTED 202d6fc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202d700: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 202d704: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 202d708: 7f ff ff ea call 202d6b0 <== NOT EXECUTED 202d70c: b0 10 20 00 clr %i0 <== NOT EXECUTED 202d710: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202d714: 22 80 00 02 be,a 202d71c <== NOT EXECUTED 202d718: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 202d71c: 81 c7 e0 08 ret <== NOT EXECUTED 202d720: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0202d6b0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 202d6b0: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 202d6b4: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 202d6b8: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 202d6bc: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 202d6c0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 202d6c4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 202d6c8: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 202d6cc: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 202d6d0: 90 10 20 00 clr %o0 <== NOT EXECUTED 202d6d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202d6d8: 7f ff ff be call 202d5d0 <== NOT EXECUTED 202d6dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02002d98 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 2002d98: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 2002d9c: 80 a6 20 00 cmp %i0, 0 2002da0: 02 80 00 11 be 2002de4 <== NEVER TAKEN 2002da4: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 2002da8: 7f ff fc bf call 20020a4 2002dac: 01 00 00 00 nop 2002db0: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 2002db4: 40 00 12 8f call 20077f0 <_TOD_Get> 2002db8: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 2002dbc: 7f ff fc be call 20020b4 2002dc0: 90 10 00 10 mov %l0, %o0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2002dc4: d0 07 bf fc ld [ %fp + -4 ], %o0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 2002dc8: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 2002dcc: 92 10 23 e8 mov 0x3e8, %o1 2002dd0: 40 00 60 60 call 201af50 <.div> 2002dd4: c2 26 00 00 st %g1, [ %i0 ] 2002dd8: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 2002ddc: 81 c7 e0 08 ret 2002de0: 91 e8 20 00 restore %g0, 0, %o0 void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 2002de4: 40 00 3b 06 call 20119fc <__errno> <== NOT EXECUTED 2002de8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002dec: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2002df0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 2002df4: 81 c7 e0 08 ret <== NOT EXECUTED 2002df8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02008a14 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 2008a14: 03 00 81 c3 sethi %hi(0x2070c00), %g1 <== NOT EXECUTED 2008a18: c2 00 62 24 ld [ %g1 + 0x224 ], %g1 ! 2070e24 <== NOT EXECUTED return _POSIX_types_Uid; } 2008a1c: 81 c3 e0 08 retl <== NOT EXECUTED 2008a20: d0 10 60 32 lduh [ %g1 + 0x32 ], %o0 <== NOT EXECUTED =============================================================================== 02010108 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 2010108: c4 02 20 3c ld [ %o0 + 0x3c ], %g2 201010c: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 2010110: 80 a0 a0 01 cmp %g2, 1 2010114: 12 80 00 05 bne 2010128 <== NEVER TAKEN 2010118: 82 10 3f ff mov -1, %g1 if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 201011c: c0 22 20 10 clr [ %o0 + 0x10 ] 2010120: c0 22 20 14 clr [ %o0 + 0x14 ] 2010124: 82 10 20 00 clr %g1 return 0; } 2010128: 81 c3 e0 08 retl 201012c: 90 10 00 01 mov %g1, %o0 =============================================================================== 02010388 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2010388: 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->file_info; 201038c: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2010390: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2010394: e2 04 a0 50 ld [ %l2 + 0x50 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2010398: a4 04 a0 54 add %l2, 0x54, %l2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 201039c: 80 a4 40 12 cmp %l1, %l2 20103a0: 02 80 00 36 be 2010478 20103a4: b0 10 20 00 clr %i0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 20103a8: ea 04 20 14 ld [ %l0 + 0x14 ], %l5 /* 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); 20103ac: 90 10 00 1a mov %i2, %o0 20103b0: 40 00 2a e6 call 201af48 <.udiv> 20103b4: 92 10 21 18 mov 0x118, %o1 20103b8: 85 2a 20 05 sll %o0, 5, %g2 20103bc: 83 2a 20 03 sll %o0, 3, %g1 20103c0: 82 00 40 02 add %g1, %g2, %g1 20103c4: a9 28 60 03 sll %g1, 3, %l4 20103c8: a8 25 00 01 sub %l4, %g1, %l4 20103cc: a8 05 00 15 add %l4, %l5, %l4 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 20103d0: 80 a5 20 00 cmp %l4, 0 20103d4: 04 80 00 29 ble 2010478 <== NEVER TAKEN 20103d8: a6 10 20 00 clr %l3 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 20103dc: ba 10 21 18 mov 0x118, %i5 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 20103e0: ae 07 be e8 add %fp, -280, %l7 20103e4: 10 80 00 08 b 2010404 20103e8: ac 07 be fc add %fp, -260, %l6 /* 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 ( 20103ec: 80 a4 c0 14 cmp %l3, %l4 20103f0: 16 80 00 22 bge 2010478 <== NEVER TAKEN 20103f4: e2 04 40 00 ld [ %l1 ], %l1 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 20103f8: 80 a4 40 12 cmp %l1, %l2 20103fc: 02 80 00 21 be 2010480 2010400: 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 ) { 2010404: 80 a5 40 13 cmp %l5, %l3 2010408: 34 bf ff f9 bg,a 20103ec 201040c: a6 04 e1 18 add %l3, 0x118, %l3 /* 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; 2010410: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 tmp_dirent.d_namlen = strlen( the_jnode->name ); 2010414: b8 04 60 0c add %l1, 0xc, %i4 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 2010418: 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; 201041c: 83 3c e0 1f sra %l3, 0x1f, %g1 2010420: e6 27 be f4 st %l3, [ %fp + -268 ] 2010424: c2 27 be f0 st %g1, [ %fp + -272 ] tmp_dirent.d_reclen = sizeof( struct dirent ); 2010428: fa 37 be f8 sth %i5, [ %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 ); 201042c: 40 00 09 41 call 2012930 2010430: 90 10 00 1c mov %i4, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 2010434: 92 10 00 1c mov %i4, %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 ); 2010438: d0 37 be fa sth %o0, [ %fp + -262 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 201043c: 40 00 09 05 call 2012850 2010440: 90 10 00 16 mov %l6, %o0 memcpy( 2010444: 90 06 40 18 add %i1, %i0, %o0 2010448: 92 10 00 17 mov %l7, %o1 201044c: 40 00 07 a8 call 20122ec 2010450: 94 10 21 18 mov 0x118, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2010454: c4 1c 20 10 ldd [ %l0 + 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( 2010458: a6 04 e1 18 add %l3, 0x118, %l3 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 201045c: 86 80 e1 18 addcc %g3, 0x118, %g3 2010460: 84 40 a0 00 addx %g2, 0, %g2 2010464: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] bytes_transferred = bytes_transferred + sizeof( struct dirent ); 2010468: 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 ( 201046c: 80 a4 c0 14 cmp %l3, %l4 2010470: 06 bf ff e2 bl 20103f8 <== NEVER TAKEN 2010474: e2 04 40 00 ld [ %l1 ], %l1 the_node = the_node->next; } /* Success */ return bytes_transferred; } 2010478: 81 c7 e0 08 ret 201047c: 81 e8 00 00 restore 2010480: 81 c7 e0 08 ret 2010484: 81 e8 00 00 restore =============================================================================== 02010284 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 2010284: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 2010288: e0 06 40 00 ld [ %i1 ], %l0 201028c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 2010290: 82 04 20 54 add %l0, 0x54, %g1 2010294: 80 a0 80 01 cmp %g2, %g1 2010298: 12 80 00 30 bne 2010358 201029c: 01 00 00 00 nop /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 20102a0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 20102a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20102a8: 80 a4 00 01 cmp %l0, %g1 20102ac: 02 80 00 31 be 2010370 20102b0: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 20102b4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 20102b8: 80 a0 60 00 cmp %g1, 0 20102bc: 12 80 00 2d bne 2010370 <== NEVER TAKEN 20102c0: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 20102c4: c2 04 20 08 ld [ %l0 + 8 ], %g1 20102c8: 80 a0 60 00 cmp %g1, 0 20102cc: 22 80 00 06 be,a 20102e4 20102d0: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 20102d4: 7f ff dc 1c call 2007344 <_Chain_Extract> 20102d8: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 20102dc: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 20102e0: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 20102e4: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 20102e8: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 20102ec: 90 07 bf f8 add %fp, -8, %o0 20102f0: 7f ff ca aa call 2002d98 20102f4: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 20102f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 20102fc: 90 10 00 10 mov %l0, %o0 2010300: 7f ff f2 2c call 200cbb0 2010304: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 2010308: 80 a2 20 00 cmp %o0, 0 201030c: 12 80 00 11 bne 2010350 2010310: 01 00 00 00 nop 2010314: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 2010318: 80 a0 60 00 cmp %g1, 0 201031c: 12 80 00 0d bne 2010350 2010320: 03 00 80 7a sethi %hi(0x201e800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 2010324: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201e980 2010328: c4 06 40 00 ld [ %i1 ], %g2 201032c: c6 00 60 04 ld [ %g1 + 4 ], %g3 2010330: 80 a0 c0 02 cmp %g3, %g2 2010334: 22 80 00 02 be,a 201033c <== NEVER TAKEN 2010338: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 201033c: 90 10 00 10 mov %l0, %o0 2010340: 7f ff ca 6b call 2002cec 2010344: b0 10 20 00 clr %i0 2010348: 81 c7 e0 08 ret 201034c: 81 e8 00 00 restore } return 0; } 2010350: 81 c7 e0 08 ret 2010354: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 2010358: 40 00 05 a9 call 20119fc <__errno> 201035c: b0 10 3f ff mov -1, %i0 2010360: 82 10 20 5a mov 0x5a, %g1 2010364: c2 22 00 00 st %g1, [ %o0 ] 2010368: 81 c7 e0 08 ret 201036c: 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 ); 2010370: 40 00 05 a3 call 20119fc <__errno> 2010374: b0 10 3f ff mov -1, %i0 2010378: 82 10 20 10 mov 0x10, %g1 201037c: c2 22 00 00 st %g1, [ %o0 ] 2010380: 81 c7 e0 08 ret 2010384: 81 e8 00 00 restore =============================================================================== 0202d2a0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 202d2a0: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 202d2a4: 03 00 81 d2 sethi %hi(0x2074800), %g1 202d2a8: c4 48 60 70 ldsb [ %g1 + 0x70 ], %g2 ! 2074870 202d2ac: 80 a0 a0 00 cmp %g2, 0 202d2b0: 02 80 00 04 be 202d2c0 202d2b4: 84 10 20 01 mov 1, %g2 202d2b8: 81 c7 e0 08 ret 202d2bc: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 202d2c0: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 202d2c4: c4 28 60 70 stb %g2, [ %g1 + 0x70 ] mkdir("/etc", 0777); 202d2c8: 11 00 81 ab sethi %hi(0x206ac00), %o0 202d2cc: 7f ff 6f dd call 2009240 202d2d0: 90 12 22 00 or %o0, 0x200, %o0 ! 206ae00 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 202d2d4: 31 00 81 ab sethi %hi(0x206ac00), %i0 202d2d8: 21 00 81 ab sethi %hi(0x206ac00), %l0 202d2dc: 90 16 22 08 or %i0, 0x208, %o0 202d2e0: 40 00 77 10 call 204af20 202d2e4: 92 14 22 18 or %l0, 0x218, %o1 202d2e8: 80 a2 20 00 cmp %o0, 0 202d2ec: 22 80 00 0d be,a 202d320 <== ALWAYS TAKEN 202d2f0: 90 16 22 08 or %i0, 0x208, %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); 202d2f4: 40 00 74 bb call 204a5e0 202d2f8: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 202d2fc: 92 14 22 18 or %l0, 0x218, %o1 202d300: 21 00 81 ab sethi %hi(0x206ac00), %l0 202d304: 40 00 77 07 call 204af20 202d308: 90 14 22 90 or %l0, 0x290, %o0 ! 206ae90 202d30c: 80 a2 20 00 cmp %o0, 0 202d310: 22 80 00 11 be,a 202d354 <== ALWAYS TAKEN 202d314: 90 14 22 90 or %l0, 0x290, %o0 fclose(fp); 202d318: 40 00 74 b2 call 204a5e0 <== NOT EXECUTED 202d31c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 202d320: 13 00 81 ab sethi %hi(0x206ac00), %o1 202d324: 40 00 76 ff call 204af20 202d328: 92 12 62 20 or %o1, 0x220, %o1 ! 206ae20 202d32c: b0 92 20 00 orcc %o0, 0, %i0 202d330: 02 bf ff f3 be 202d2fc <== NEVER TAKEN 202d334: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 202d338: 94 10 20 66 mov 0x66, %o2 202d33c: 96 10 00 18 mov %i0, %o3 202d340: 11 00 81 ab sethi %hi(0x206ac00), %o0 202d344: 40 00 7b d7 call 204c2a0 202d348: 90 12 22 28 or %o0, 0x228, %o0 ! 206ae28 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202d34c: 10 bf ff ea b 202d2f4 202d350: 90 10 00 18 mov %i0, %o0 * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 202d354: 13 00 81 ab sethi %hi(0x206ac00), %o1 202d358: 40 00 76 f2 call 204af20 202d35c: 92 12 62 20 or %o1, 0x220, %o1 ! 206ae20 202d360: b0 92 20 00 orcc %o0, 0, %i0 202d364: 02 bf ff d5 be 202d2b8 <== NEVER TAKEN 202d368: 11 00 81 ab sethi %hi(0x206ac00), %o0 fprintf( fp, "root:x:0:root\n" 202d36c: 92 10 20 01 mov 1, %o1 202d370: 94 10 20 2a mov 0x2a, %o2 202d374: 96 10 00 18 mov %i0, %o3 202d378: 40 00 7b ca call 204c2a0 202d37c: 90 12 22 a0 or %o0, 0x2a0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 202d380: 40 00 74 98 call 204a5e0 202d384: 81 e8 00 00 restore =============================================================================== 02006794 : int ioctl( int fd, ioctl_command_t command, ... ) { 2006794: 9d e3 bf 98 save %sp, -104, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 2006798: 03 00 80 8a sethi %hi(0x2022800), %g1 200679c: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 2022b34 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 20067a0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20067a4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20067a8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 20067ac: 80 a6 00 01 cmp %i0, %g1 20067b0: 1a 80 00 18 bcc 2006810 20067b4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] iop = rtems_libio_iop( fd ); 20067b8: 03 00 80 8d sethi %hi(0x2023400), %g1 20067bc: d0 00 62 18 ld [ %g1 + 0x218 ], %o0 ! 2023618 20067c0: 83 2e 20 06 sll %i0, 6, %g1 20067c4: b1 2e 20 03 sll %i0, 3, %i0 20067c8: b0 06 00 01 add %i0, %g1, %i0 20067cc: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 20067d0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 20067d4: 80 88 61 00 btst 0x100, %g1 20067d8: 02 80 00 0e be 2006810 <== NEVER TAKEN 20067dc: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 20067e0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 20067e4: 80 a0 60 00 cmp %g1, 0 20067e8: 02 80 00 0a be 2006810 <== NEVER TAKEN 20067ec: c4 27 bf fc st %g2, [ %fp + -4 ] rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 20067f0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 20067f4: 80 a0 60 00 cmp %g1, 0 20067f8: 02 80 00 0c be 2006828 <== NEVER TAKEN 20067fc: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 2006800: 9f c0 40 00 call %g1 2006804: 94 10 00 1a mov %i2, %o2 return rc; } 2006808: 81 c7 e0 08 ret 200680c: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 2006810: 40 00 3e 03 call 201601c <__errno> 2006814: b0 10 3f ff mov -1, %i0 2006818: 82 10 20 09 mov 9, %g1 200681c: c2 22 00 00 st %g1, [ %o0 ] 2006820: 81 c7 e0 08 ret 2006824: 81 e8 00 00 restore if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006828: 40 00 3d fd call 201601c <__errno> <== NOT EXECUTED 200682c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2006830: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2006834: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2006838: 81 c7 e0 08 ret <== NOT EXECUTED 200683c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02004a18 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2004a18: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2004a1c: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 2004a20: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004a24: 02 80 00 03 be 2004a30 <== NOT EXECUTED 2004a28: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 2004a2c: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2004a30: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004a34: 02 80 00 0c be 2004a64 <== NOT EXECUTED 2004a38: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 2004a3c: 05 00 80 7a sethi %hi(0x201e800), %g2 <== NOT EXECUTED 2004a40: c4 00 a2 2c ld [ %g2 + 0x22c ], %g2 ! 201ea2c <__ctype_ptr__><== NOT EXECUTED 2004a44: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 2004a48: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 2004a4c: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 2004a50: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 2004a54: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2004a58: 22 80 00 02 be,a 2004a60 <== NOT EXECUTED 2004a5c: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 2004a60: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 2004a64: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 2004a68: 02 80 00 16 be 2004ac0 <== NOT EXECUTED 2004a6c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 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)) { 2004a70: 02 80 00 41 be 2004b74 <== NOT EXECUTED 2004a74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2004a78: 32 80 00 1a bne,a 2004ae0 <== NOT EXECUTED 2004a7c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2004a80: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2004a84: 05 00 80 7a sethi %hi(0x201e800), %g2 <== NOT EXECUTED 2004a88: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 ! 201e970 <== NOT EXECUTED 2004a8c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 2004a90: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004a94: 16 80 00 09 bge 2004ab8 <== NOT EXECUTED 2004a98: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2004a9c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 2004aa0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2004aa4: 12 80 00 39 bne 2004b88 <== NOT EXECUTED 2004aa8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2004aac: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2004ab0: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 2004ab4: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 2004ab8: 81 c7 e0 08 ret <== NOT EXECUTED 2004abc: 81 e8 00 00 restore <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 2004ac0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2004ac4: 02 80 00 04 be 2004ad4 <== NOT EXECUTED 2004ac8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 2004acc: 81 c7 e0 08 ret <== NOT EXECUTED 2004ad0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 2004ad4: 32 80 00 02 bne,a 2004adc <== NOT EXECUTED 2004ad8: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2004adc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2004ae0: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2004ae4: 22 bf ff e8 be,a 2004a84 <== NOT EXECUTED 2004ae8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2004aec: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 <== NOT EXECUTED 2004af0: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2004af4: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 2004af8: 22 80 00 43 be,a 2004c04 <== NOT EXECUTED 2004afc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2004b00: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 <== NOT EXECUTED 2004b04: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 2004b08: 22 80 00 2e be,a 2004bc0 <== NOT EXECUTED 2004b0c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2004b10: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 <== NOT EXECUTED 2004b14: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 2004b18: 02 bf ff e8 be 2004ab8 <== NOT EXECUTED 2004b1c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 2004b20: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 2004b24: 02 80 00 2c be 2004bd4 <== NOT EXECUTED 2004b28: 80 88 60 48 btst 0x48, %g1 <== NOT EXECUTED 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]) 2004b2c: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 <== NOT EXECUTED 2004b30: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 2004b34: 02 80 00 07 be 2004b50 <== NOT EXECUTED 2004b38: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 2004b3c: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 <== NOT EXECUTED 2004b40: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED 2004b44: 32 bf ff d0 bne,a 2004a84 <== NOT EXECUTED 2004b48: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2004b4c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2004b50: 12 80 00 18 bne 2004bb0 <== NOT EXECUTED 2004b54: 01 00 00 00 nop <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2004b58: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2004b5c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2004b60: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 2004b64: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 2004b68: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 2004b6c: 81 c7 e0 08 ret <== NOT EXECUTED 2004b70: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 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)) { 2004b74: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 2004b78: 32 bf ff d9 bne,a 2004adc <== NOT EXECUTED 2004b7c: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2004b80: 10 bf ff d8 b 2004ae0 <== NOT EXECUTED 2004b84: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2004b88: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2004b8c: 7f ff fe f6 call 2004764 <== NOT EXECUTED 2004b90: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2004b94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2004b98: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2004b9c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 2004ba0: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 2004ba4: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 2004ba8: 81 c7 e0 08 ret <== NOT EXECUTED 2004bac: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 2004bb0: 7f ff fe ed call 2004764 <== NOT EXECUTED 2004bb4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2004bb8: 10 bf ff e9 b 2004b5c <== NOT EXECUTED 2004bbc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 2004bc0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2004bc4: 7f ff ff 08 call 20047e4 <== NOT EXECUTED 2004bc8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 2004bcc: 81 c7 e0 08 ret <== NOT EXECUTED 2004bd0: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 2004bd4: 22 80 00 05 be,a 2004be8 <== NOT EXECUTED 2004bd8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2004bdc: 7f ff fe e2 call 2004764 <== NOT EXECUTED 2004be0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2004be4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2004be8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2004bec: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 2004bf0: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 2004bf4: 82 00 60 01 inc %g1 <== NOT EXECUTED 2004bf8: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 2004bfc: 81 c7 e0 08 ret <== NOT EXECUTED 2004c00: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 2004c04: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004c08: 7f ff fe f7 call 20047e4 <== NOT EXECUTED 2004c0c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; 2004c10: 81 c7 e0 08 ret <== NOT EXECUTED 2004c14: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020109f4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 20109f4: 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() ) 20109f8: 7f ff f0 54 call 200cb48 20109fc: 01 00 00 00 nop 2010a00: 80 a2 00 18 cmp %o0, %i0 2010a04: 12 80 00 b6 bne 2010cdc <== NEVER TAKEN 2010a08: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 2010a0c: 02 80 00 ba be 2010cf4 <== NEVER TAKEN 2010a10: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2010a14: 80 a0 60 1f cmp %g1, 0x1f 2010a18: 18 80 00 b7 bgu 2010cf4 <== NEVER TAKEN 2010a1c: 23 00 80 7e sethi %hi(0x201f800), %l1 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 ) 2010a20: a5 2e 60 02 sll %i1, 2, %l2 2010a24: a2 14 61 28 or %l1, 0x128, %l1 2010a28: a7 2e 60 04 sll %i1, 4, %l3 2010a2c: 84 24 c0 12 sub %l3, %l2, %g2 2010a30: 84 04 40 02 add %l1, %g2, %g2 2010a34: c4 00 a0 08 ld [ %g2 + 8 ], %g2 2010a38: 80 a0 a0 01 cmp %g2, 1 2010a3c: 02 80 00 45 be 2010b50 2010a40: 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 ) ) 2010a44: 80 a6 60 04 cmp %i1, 4 2010a48: 02 80 00 44 be 2010b58 2010a4c: 80 a6 60 08 cmp %i1, 8 2010a50: 02 80 00 42 be 2010b58 2010a54: 80 a6 60 0b cmp %i1, 0xb 2010a58: 02 80 00 40 be 2010b58 2010a5c: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 2010a60: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 2010a64: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 2010a68: 80 a6 a0 00 cmp %i2, 0 2010a6c: 02 80 00 41 be 2010b70 2010a70: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 2010a74: c2 06 80 00 ld [ %i2 ], %g1 2010a78: c2 27 bf fc st %g1, [ %fp + -4 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2010a7c: 03 00 80 7c sethi %hi(0x201f000), %g1 2010a80: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 201f3a0 <_Thread_Dispatch_disable_level> 2010a84: 84 00 a0 01 inc %g2 2010a88: c4 20 63 a0 st %g2, [ %g1 + 0x3a0 ] /* * 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; 2010a8c: 03 00 80 7d sethi %hi(0x201f400), %g1 2010a90: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f460 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2010a94: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 2010a98: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 2010a9c: 80 ac 00 02 andncc %l0, %g2, %g0 2010aa0: 12 80 00 1a bne 2010b08 2010aa4: 09 00 80 7e sethi %hi(0x201f800), %g4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 2010aa8: c4 01 22 b4 ld [ %g4 + 0x2b4 ], %g2 ! 201fab4 <_POSIX_signals_Wait_queue> 2010aac: 88 11 22 b4 or %g4, 0x2b4, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2010ab0: 88 01 20 04 add %g4, 4, %g4 2010ab4: 80 a0 80 04 cmp %g2, %g4 2010ab8: 02 80 00 30 be 2010b78 2010abc: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2010ac0: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 2010ac4: 80 8c 00 03 btst %l0, %g3 2010ac8: 02 80 00 0c be 2010af8 2010acc: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2010ad0: 10 80 00 0f b 2010b0c 2010ad4: 84 10 20 01 mov 1, %g2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 2010ad8: 80 a0 80 04 cmp %g2, %g4 2010adc: 22 80 00 28 be,a 2010b7c <== ALWAYS TAKEN 2010ae0: 03 00 80 7a sethi %hi(0x201e800), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2010ae4: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2010ae8: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2010aec: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 2010af0: 12 80 00 06 bne 2010b08 <== NOT EXECUTED 2010af4: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 2010af8: c6 00 e0 cc ld [ %g3 + 0xcc ], %g3 2010afc: 80 ac 00 03 andncc %l0, %g3, %g0 2010b00: 22 bf ff f6 be,a 2010ad8 2010b04: c4 00 80 00 ld [ %g2 ], %g2 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2010b08: 84 10 20 01 mov 1, %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 ) ) { 2010b0c: 90 10 00 01 mov %g1, %o0 2010b10: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2010b14: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * 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 ) ) { 2010b18: 40 00 01 10 call 2010f58 <_POSIX_signals_Unblock_thread> 2010b1c: 94 07 bf f4 add %fp, -12, %o2 2010b20: 80 8a 20 ff btst 0xff, %o0 2010b24: 12 80 00 5a bne 2010c8c 2010b28: 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 ); 2010b2c: 40 00 00 fb call 2010f18 <_POSIX_signals_Set_process_signals> 2010b30: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2010b34: a4 24 c0 12 sub %l3, %l2, %l2 2010b38: c2 04 40 12 ld [ %l1 + %l2 ], %g1 2010b3c: 80 a0 60 02 cmp %g1, 2 2010b40: 02 80 00 57 be 2010c9c 2010b44: 11 00 80 7e sethi %hi(0x201f800), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 2010b48: 7f ff e0 96 call 2008da0 <_Thread_Enable_dispatch> 2010b4c: b0 10 20 00 clr %i0 return 0; } 2010b50: 81 c7 e0 08 ret 2010b54: 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 ); 2010b58: 40 00 01 d8 call 20112b8 2010b5c: 01 00 00 00 nop 2010b60: 40 00 01 9b call 20111cc 2010b64: 92 10 00 19 mov %i1, %o1 2010b68: 81 c7 e0 08 ret 2010b6c: 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; 2010b70: 10 bf ff c3 b 2010a7c 2010b74: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 2010b78: 03 00 80 7a sethi %hi(0x201e800), %g1 2010b7c: da 08 60 64 ldub [ %g1 + 0x64 ], %o5 ! 201e864 2010b80: 13 00 80 7c sethi %hi(0x201f000), %o1 2010b84: 9a 03 60 01 inc %o5 2010b88: 92 12 63 08 or %o1, 0x308, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 2010b8c: 82 10 20 00 clr %g1 2010b90: 90 02 60 0c add %o1, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 2010b94: 35 04 00 00 sethi %hi(0x10000000), %i2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 2010b98: c4 02 40 00 ld [ %o1 ], %g2 2010b9c: 80 a0 a0 00 cmp %g2, 0 2010ba0: 22 80 00 2d be,a 2010c54 2010ba4: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2010ba8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 2010bac: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2010bb0: 80 a3 20 00 cmp %o4, 0 2010bb4: 02 80 00 27 be 2010c50 2010bb8: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 2010bbc: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 2010bc0: 87 28 a0 02 sll %g2, 2, %g3 2010bc4: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 2010bc8: 80 a0 e0 00 cmp %g3, 0 2010bcc: 02 80 00 1e be 2010c44 2010bd0: 84 00 a0 01 inc %g2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 2010bd4: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 2010bd8: 80 a1 00 0d cmp %g4, %o5 2010bdc: 18 80 00 1b bgu 2010c48 2010be0: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2010be4: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 2010be8: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 2010bec: 80 ac 00 0a andncc %l0, %o2, %g0 2010bf0: 02 80 00 16 be 2010c48 2010bf4: 80 a3 00 02 cmp %o4, %g2 * * 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 ) { 2010bf8: 80 a1 00 0d cmp %g4, %o5 2010bfc: 2a 80 00 11 bcs,a 2010c40 2010c00: 9a 10 00 04 mov %g4, %o5 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 2010c04: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 2010c08: 80 a2 a0 00 cmp %o2, 0 2010c0c: 02 80 00 0f be 2010c48 <== NEVER TAKEN 2010c10: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 2010c14: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 2010c18: 80 a3 e0 00 cmp %o7, 0 2010c1c: 22 80 00 09 be,a 2010c40 2010c20: 9a 10 00 04 mov %g4, %o5 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 2010c24: 80 8a 80 1a btst %o2, %i2 2010c28: 12 80 00 08 bne 2010c48 2010c2c: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 2010c30: 80 8b c0 1a btst %o7, %i2 2010c34: 02 80 00 05 be 2010c48 2010c38: 80 a3 00 02 cmp %o4, %g2 2010c3c: 9a 10 00 04 mov %g4, %o5 2010c40: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2010c44: 80 a3 00 02 cmp %o4, %g2 2010c48: 1a bf ff df bcc 2010bc4 2010c4c: 87 28 a0 02 sll %g2, 2, %g3 2010c50: 92 02 60 04 add %o1, 4, %o1 * + 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++) { 2010c54: 80 a2 40 08 cmp %o1, %o0 2010c58: 32 bf ff d1 bne,a 2010b9c 2010c5c: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 2010c60: 80 a0 60 00 cmp %g1, 0 2010c64: 02 bf ff b2 be 2010b2c 2010c68: 84 10 20 01 mov 1, %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 ) ) { 2010c6c: 90 10 00 01 mov %g1, %o0 2010c70: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2010c74: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * 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 ) ) { 2010c78: 40 00 00 b8 call 2010f58 <_POSIX_signals_Unblock_thread> 2010c7c: 94 07 bf f4 add %fp, -12, %o2 2010c80: 80 8a 20 ff btst 0xff, %o0 2010c84: 02 bf ff aa be 2010b2c <== ALWAYS TAKEN 2010c88: 01 00 00 00 nop _Thread_Enable_dispatch(); 2010c8c: 7f ff e0 45 call 2008da0 <_Thread_Enable_dispatch> 2010c90: b0 10 20 00 clr %i0 ! 0 return 0; 2010c94: 81 c7 e0 08 ret 2010c98: 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 *) 2010c9c: 7f ff d9 b4 call 200736c <_Chain_Get> 2010ca0: 90 12 22 a8 or %o0, 0x2a8, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2010ca4: 80 a2 20 00 cmp %o0, 0 2010ca8: 02 80 00 19 be 2010d0c 2010cac: 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 ); 2010cb0: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 2010cb4: c2 22 20 08 st %g1, [ %o0 + 8 ] 2010cb8: c2 07 bf f8 ld [ %fp + -8 ], %g1 2010cbc: c2 22 20 0c st %g1, [ %o0 + 0xc ] 2010cc0: c2 07 bf fc ld [ %fp + -4 ], %g1 2010cc4: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 2010cc8: 11 00 80 7e sethi %hi(0x201f800), %o0 2010ccc: 90 12 23 20 or %o0, 0x320, %o0 ! 201fb20 <_POSIX_signals_Siginfo> 2010cd0: 7f ff d9 91 call 2007314 <_Chain_Append> 2010cd4: 90 02 00 12 add %o0, %l2, %o0 2010cd8: 30 bf ff 9c b,a 2010b48 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 2010cdc: 40 00 03 48 call 20119fc <__errno> <== NOT EXECUTED 2010ce0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2010ce4: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 2010ce8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2010cec: 81 c7 e0 08 ret <== NOT EXECUTED 2010cf0: 81 e8 00 00 restore <== NOT EXECUTED */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2010cf4: 40 00 03 42 call 20119fc <__errno> <== NOT EXECUTED 2010cf8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2010cfc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2010d00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2010d04: 81 c7 e0 08 ret <== NOT EXECUTED 2010d08: 81 e8 00 00 restore <== NOT EXECUTED 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(); 2010d0c: 7f ff e0 25 call 2008da0 <_Thread_Enable_dispatch> 2010d10: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 2010d14: 40 00 03 3a call 20119fc <__errno> 2010d18: 01 00 00 00 nop 2010d1c: 82 10 20 0b mov 0xb, %g1 ! b 2010d20: c2 22 00 00 st %g1, [ %o0 ] 2010d24: 81 c7 e0 08 ret 2010d28: 81 e8 00 00 restore =============================================================================== 0201c67c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 201c67c: 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())) 201c680: 03 00 80 7d sethi %hi(0x201f400), %g1 201c684: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 201f540 <_System_state_Current> 201c688: 80 a0 60 03 cmp %g1, 3 201c68c: 02 80 00 04 be 201c69c <== ALWAYS TAKEN 201c690: 03 00 80 78 sethi %hi(0x201e000), %g1 201c694: 81 c7 e0 08 ret <== NOT EXECUTED 201c698: 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) { 201c69c: 21 00 80 7a sethi %hi(0x201e800), %l0 201c6a0: e2 00 62 d0 ld [ %g1 + 0x2d0 ], %l1 201c6a4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 201c6a8: 80 a0 40 11 cmp %g1, %l1 201c6ac: 02 80 00 05 be 201c6c0 201c6b0: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 201c6b4: 40 00 01 80 call 201ccb4 <_wrapup_reent> 201c6b8: 90 10 00 11 mov %l1, %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; 201c6bc: e2 24 22 30 st %l1, [ %l0 + 0x230 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 201c6c0: 7f ff d5 27 call 2011b5c 201c6c4: d0 04 60 04 ld [ %l1 + 4 ], %o0 fclose (stdout); 201c6c8: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 201c6cc: 7f ff d5 24 call 2011b5c 201c6d0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 201c6d4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 201c6d8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 201c6dc: 7f ff d5 20 call 2011b5c 201c6e0: 81 e8 00 00 restore =============================================================================== 0202d78c : int link( const char *existing, const char *new ) { 202d78c: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 202d790: 40 00 8e f8 call 2051370 202d794: 90 10 00 18 mov %i0, %o0 202d798: a0 07 bf e4 add %fp, -28, %l0 202d79c: 92 10 00 08 mov %o0, %o1 202d7a0: 94 10 20 00 clr %o2 202d7a4: 90 10 00 18 mov %i0, %o0 202d7a8: 96 10 00 10 mov %l0, %o3 202d7ac: 98 10 20 01 mov 1, %o4 202d7b0: 7f ff 6c 2c call 2008860 202d7b4: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 202d7b8: 80 a2 20 00 cmp %o0, 0 202d7bc: 12 80 00 31 bne 202d880 202d7c0: a2 07 bf d0 add %fp, -48, %l1 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 202d7c4: 90 10 00 19 mov %i1, %o0 202d7c8: 92 07 bf fc add %fp, -4, %o1 202d7cc: 7f ff 73 47 call 200a4e8 202d7d0: 94 10 00 11 mov %l1, %o2 if ( !parent_loc.ops->evalformake_h ) { 202d7d4: c2 07 bf dc ld [ %fp + -36 ], %g1 202d7d8: c2 00 60 04 ld [ %g1 + 4 ], %g1 202d7dc: 80 a0 60 00 cmp %g1, 0 202d7e0: 02 80 00 53 be 202d92c <== NEVER TAKEN 202d7e4: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 202d7e8: 92 10 00 11 mov %l1, %o1 202d7ec: 90 06 40 08 add %i1, %o0, %o0 202d7f0: 9f c0 40 00 call %g1 202d7f4: 94 07 bf f8 add %fp, -8, %o2 if ( result != 0 ) { 202d7f8: b2 92 20 00 orcc %o0, 0, %i1 202d7fc: 12 80 00 3d bne 202d8f0 202d800: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 202d804: c4 07 bf e0 ld [ %fp + -32 ], %g2 202d808: 80 a0 80 01 cmp %g2, %g1 202d80c: 12 80 00 1f bne 202d888 202d810: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 202d814: c2 00 a0 08 ld [ %g2 + 8 ], %g1 202d818: 80 a0 60 00 cmp %g1, 0 202d81c: 02 80 00 54 be 202d96c <== NEVER TAKEN 202d820: d4 07 bf f8 ld [ %fp + -8 ], %o2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 202d824: 90 10 00 10 mov %l0, %o0 202d828: 9f c0 40 00 call %g1 202d82c: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &existing_loc ); 202d830: c2 07 bf f0 ld [ %fp + -16 ], %g1 202d834: 80 a0 60 00 cmp %g1, 0 202d838: 02 80 00 08 be 202d858 <== NEVER TAKEN 202d83c: b0 10 00 08 mov %o0, %i0 202d840: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202d844: 80 a0 60 00 cmp %g1, 0 202d848: 22 80 00 05 be,a 202d85c <== NEVER TAKEN 202d84c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 202d850: 9f c0 40 00 call %g1 202d854: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 202d858: c2 07 bf dc ld [ %fp + -36 ], %g1 202d85c: 80 a0 60 00 cmp %g1, 0 202d860: 02 80 00 41 be 202d964 <== NEVER TAKEN 202d864: 01 00 00 00 nop 202d868: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202d86c: 80 a0 60 00 cmp %g1, 0 202d870: 02 80 00 3d be 202d964 <== NEVER TAKEN 202d874: 01 00 00 00 nop 202d878: 9f c0 40 00 call %g1 202d87c: 90 10 00 11 mov %l1, %o0 return result; } 202d880: 81 c7 e0 08 ret 202d884: 81 e8 00 00 restore * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 202d888: c2 07 bf f0 ld [ %fp + -16 ], %g1 202d88c: 80 a0 60 00 cmp %g1, 0 202d890: 22 80 00 09 be,a 202d8b4 <== NEVER TAKEN 202d894: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 202d898: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202d89c: 80 a0 60 00 cmp %g1, 0 202d8a0: 22 80 00 05 be,a 202d8b4 <== NEVER TAKEN 202d8a4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 202d8a8: 9f c0 40 00 call %g1 202d8ac: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 202d8b0: c2 07 bf dc ld [ %fp + -36 ], %g1 202d8b4: 80 a0 60 00 cmp %g1, 0 202d8b8: 02 80 00 08 be 202d8d8 <== NEVER TAKEN 202d8bc: 01 00 00 00 nop 202d8c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202d8c4: 80 a0 60 00 cmp %g1, 0 202d8c8: 02 80 00 04 be 202d8d8 <== NEVER TAKEN 202d8cc: 01 00 00 00 nop 202d8d0: 9f c0 40 00 call %g1 202d8d4: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 202d8d8: 40 00 72 ea call 204a480 <__errno> 202d8dc: b0 10 3f ff mov -1, %i0 202d8e0: 82 10 20 12 mov 0x12, %g1 202d8e4: c2 22 00 00 st %g1, [ %o0 ] 202d8e8: 81 c7 e0 08 ret 202d8ec: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 202d8f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 202d8f4: 80 a0 60 00 cmp %g1, 0 202d8f8: 02 80 00 08 be 202d918 <== NEVER TAKEN 202d8fc: 01 00 00 00 nop 202d900: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202d904: 80 a0 60 00 cmp %g1, 0 202d908: 02 80 00 04 be 202d918 <== NEVER TAKEN 202d90c: 01 00 00 00 nop 202d910: 9f c0 40 00 call %g1 202d914: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 202d918: 40 00 72 da call 204a480 <__errno> 202d91c: b0 10 3f ff mov -1, %i0 202d920: f2 22 00 00 st %i1, [ %o0 ] 202d924: 81 c7 e0 08 ret 202d928: 81 e8 00 00 restore */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 202d92c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 202d930: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d934: 02 80 00 08 be 202d954 <== NOT EXECUTED 202d938: 01 00 00 00 nop <== NOT EXECUTED 202d93c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202d940: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d944: 02 80 00 04 be 202d954 <== NOT EXECUTED 202d948: 01 00 00 00 nop <== NOT EXECUTED 202d94c: 9f c0 40 00 call %g1 <== NOT EXECUTED 202d950: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 202d954: 40 00 72 cb call 204a480 <__errno> <== NOT EXECUTED 202d958: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202d95c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202d960: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202d964: 81 c7 e0 08 ret <== NOT EXECUTED 202d968: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 202d96c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 202d970: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d974: 02 80 00 0a be 202d99c <== NOT EXECUTED 202d978: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202d97c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202d980: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d984: 02 80 00 06 be 202d99c <== NOT EXECUTED 202d988: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202d98c: 9f c0 40 00 call %g1 <== NOT EXECUTED 202d990: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 202d994: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 202d998: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202d99c: 02 bf ff ee be 202d954 <== NOT EXECUTED 202d9a0: 01 00 00 00 nop <== NOT EXECUTED 202d9a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 202d9a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202d9ac: 02 bf ff ea be 202d954 <== NOT EXECUTED 202d9b0: 01 00 00 00 nop <== NOT EXECUTED 202d9b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 202d9b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 202d9bc: 30 bf ff e6 b,a 202d954 <== NOT EXECUTED =============================================================================== 0201c4d8 : off_t lseek( int fd, off_t offset, int whence ) { 201c4d8: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 201c4dc: 03 00 80 79 sethi %hi(0x201e400), %g1 201c4e0: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 201e7b4 off_t lseek( int fd, off_t offset, int whence ) { 201c4e4: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 201c4e8: 80 a6 00 01 cmp %i0, %g1 201c4ec: 1a 80 00 46 bcc 201c604 <== NEVER TAKEN 201c4f0: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 201c4f4: 03 00 80 7c sethi %hi(0x201f000), %g1 201c4f8: e0 00 61 c4 ld [ %g1 + 0x1c4 ], %l0 ! 201f1c4 201c4fc: 83 2e 20 06 sll %i0, 6, %g1 201c500: b1 2e 20 03 sll %i0, 3, %i0 201c504: b0 06 00 01 add %i0, %g1, %i0 201c508: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 201c50c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 201c510: 80 88 61 00 btst 0x100, %g1 201c514: 02 80 00 3c be 201c604 <== NEVER TAKEN 201c518: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 201c51c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 201c520: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 201c524: 80 a1 20 00 cmp %g4, 0 201c528: 02 80 00 3f be 201c624 <== NEVER TAKEN 201c52c: 80 a6 e0 01 cmp %i3, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 201c530: 02 80 00 31 be 201c5f4 201c534: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 201c538: 80 a6 e0 02 cmp %i3, 2 201c53c: 02 80 00 11 be 201c580 201c540: 80 a6 e0 00 cmp %i3, 0 201c544: 12 80 00 22 bne 201c5cc 201c548: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 201c54c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 201c550: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 201c554: 92 10 00 02 mov %g2, %o1 201c558: 94 10 00 03 mov %g3, %o2 201c55c: 96 10 00 1b mov %i3, %o3 201c560: 9f c0 40 00 call %g1 201c564: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 201c568: 80 a2 3f ff cmp %o0, -1 201c56c: 02 80 00 13 be 201c5b8 <== NEVER TAKEN 201c570: 80 a2 7f ff cmp %o1, -1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 201c574: b2 10 00 09 mov %o1, %i1 201c578: 81 c7 e0 08 ret 201c57c: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 201c580: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 201c584: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 201c588: 9a 86 80 0d addcc %i2, %o5, %o5 201c58c: 98 46 40 0c addx %i1, %o4, %o4 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 201c590: 92 10 00 02 mov %g2, %o1 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 201c594: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 201c598: 94 10 00 03 mov %g3, %o2 201c59c: 96 10 00 1b mov %i3, %o3 201c5a0: 9f c0 40 00 call %g1 201c5a4: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 201c5a8: 80 a2 3f ff cmp %o0, -1 201c5ac: 12 bf ff f3 bne 201c578 201c5b0: b2 10 00 09 mov %o1, %i1 201c5b4: 80 a2 7f ff cmp %o1, -1 201c5b8: 12 bf ff f0 bne 201c578 <== NEVER TAKEN 201c5bc: b2 10 00 09 mov %o1, %i1 iop->offset = old_offset; 201c5c0: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 201c5c4: 81 c7 e0 08 ret 201c5c8: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 201c5cc: 7f ff d5 0c call 20119fc <__errno> 201c5d0: 01 00 00 00 nop 201c5d4: 82 10 20 16 mov 0x16, %g1 ! 16 201c5d8: c2 22 00 00 st %g1, [ %o0 ] 201c5dc: 11 3f ff ff sethi %hi(0xfffffc00), %o0 201c5e0: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 201c5e4: 92 10 00 08 mov %o0, %o1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 201c5e8: b0 10 00 08 mov %o0, %i0 201c5ec: 81 c7 e0 08 ret 201c5f0: 93 e8 00 09 restore %g0, %o1, %o1 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 201c5f4: 9a 86 80 13 addcc %i2, %l3, %o5 201c5f8: 98 46 40 12 addx %i1, %l2, %o4 break; 201c5fc: 10 bf ff d5 b 201c550 201c600: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201c604: 7f ff d4 fe call 20119fc <__errno> <== NOT EXECUTED 201c608: 01 00 00 00 nop <== NOT EXECUTED 201c60c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 201c610: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201c614: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 201c618: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 201c61c: 10 bf ff d6 b 201c574 <== NOT EXECUTED 201c620: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 201c624: 7f ff d4 f6 call 20119fc <__errno> <== NOT EXECUTED 201c628: 01 00 00 00 nop <== NOT EXECUTED 201c62c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 201c630: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201c634: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED 201c638: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <== NOT EXECUTED 201c63c: 10 bf ff ce b 201c574 <== NOT EXECUTED 201c640: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED =============================================================================== 0202db68 : int _STAT_NAME( const char *path, struct stat *buf ) { 202db68: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 202db6c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 202db70: 02 80 00 34 be 202dc40 <== NOT EXECUTED 202db74: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 202db78: 40 00 8d fe call 2051370 <== NOT EXECUTED 202db7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202db80: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 202db84: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 202db88: 94 10 20 00 clr %o2 <== NOT EXECUTED 202db8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202db90: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 202db94: 98 10 20 00 clr %o4 <== NOT EXECUTED 202db98: 7f ff 6b 32 call 2008860 <== NOT EXECUTED 202db9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 202dba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202dba4: 12 80 00 25 bne 202dc38 <== NOT EXECUTED 202dba8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 202dbac: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED 202dbb0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 202dbb4: 02 80 00 29 be 202dc58 <== NOT EXECUTED 202dbb8: 92 10 00 19 mov %i1, %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) ); 202dbbc: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 202dbc0: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 202dbc4: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 202dbc8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 202dbcc: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 202dbd0: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 202dbd4: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 202dbd8: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 202dbdc: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 202dbe0: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 202dbe4: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 202dbe8: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 202dbec: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 202dbf0: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 202dbf4: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 202dbf8: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 202dbfc: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 202dc00: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 202dc04: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 202dc08: 9f c0 40 00 call %g1 <== NOT EXECUTED 202dc0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 202dc10: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 202dc14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202dc18: 02 80 00 08 be 202dc38 <== NOT EXECUTED 202dc1c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 202dc20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202dc24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202dc28: 02 80 00 1a be 202dc90 <== NOT EXECUTED 202dc2c: 01 00 00 00 nop <== NOT EXECUTED 202dc30: 9f c0 40 00 call %g1 <== NOT EXECUTED 202dc34: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 202dc38: 81 c7 e0 08 ret <== NOT EXECUTED 202dc3c: 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 ); 202dc40: 40 00 72 10 call 204a480 <__errno> <== NOT EXECUTED 202dc44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202dc48: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 202dc4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202dc50: 81 c7 e0 08 ret <== NOT EXECUTED 202dc54: 81 e8 00 00 restore <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 202dc58: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 202dc5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202dc60: 02 80 00 08 be 202dc80 <== NOT EXECUTED 202dc64: 01 00 00 00 nop <== NOT EXECUTED 202dc68: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202dc6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202dc70: 02 80 00 04 be 202dc80 <== NOT EXECUTED 202dc74: 01 00 00 00 nop <== NOT EXECUTED 202dc78: 9f c0 40 00 call %g1 <== NOT EXECUTED 202dc7c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 202dc80: 40 00 72 00 call 204a480 <__errno> <== NOT EXECUTED 202dc84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202dc88: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202dc8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202dc90: 81 c7 e0 08 ret <== NOT EXECUTED 202dc94: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200308c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 200308c: 9d e3 bf a0 save %sp, -96, %sp 2003090: 03 00 80 7c sethi %hi(0x201f000), %g1 2003094: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201f1e0 2003098: c4 00 60 04 ld [ %g1 + 4 ], %g2 200309c: a0 10 00 18 mov %i0, %l0 20030a0: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 20030a4: 7f ff ff b0 call 2002f64 20030a8: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 20030ac: 80 a6 20 00 cmp %i0, 0 20030b0: 02 80 00 24 be 2003140 <== NEVER TAKEN 20030b4: 03 00 80 7d sethi %hi(0x201f400), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 20030b8: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 201f540 <_System_state_Current> 20030bc: 80 a0 60 03 cmp %g1, 3 20030c0: 02 80 00 1b be 200312c 20030c4: 03 00 80 79 sethi %hi(0x201e400), %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 ); 20030c8: d0 00 63 c0 ld [ %g1 + 0x3c0 ], %o0 ! 201e7c0 20030cc: 92 10 00 10 mov %l0, %o1 20030d0: 94 10 20 00 clr %o2 20030d4: 40 00 15 62 call 200865c <_Protected_heap_Allocate_aligned_with_boundary> 20030d8: 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 ) { 20030dc: b0 92 20 00 orcc %o0, 0, %i0 20030e0: 02 80 00 1a be 2003148 20030e4: a2 10 00 18 mov %i0, %l1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 20030e8: 03 00 80 7b sethi %hi(0x201ec00), %g1 20030ec: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 201eef0 20030f0: 80 a0 60 00 cmp %g1, 0 20030f4: 02 80 00 04 be 2003104 <== ALWAYS TAKEN 20030f8: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 20030fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003100: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003104: 03 00 80 7b sethi %hi(0x201ec00), %g1 2003108: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201eee8 200310c: 80 a0 60 00 cmp %g1, 0 2003110: 02 80 00 05 be 2003124 2003114: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003118: c2 00 60 04 ld [ %g1 + 4 ], %g1 200311c: 9f c0 40 00 call %g1 2003120: 90 10 00 11 mov %l1, %o0 2003124: 81 c7 e0 08 ret 2003128: 81 e8 00 00 restore return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 200312c: 7f ff ff 75 call 2002f00 2003130: 01 00 00 00 nop 2003134: 80 8a 20 ff btst 0xff, %o0 2003138: 12 bf ff e4 bne 20030c8 <== ALWAYS TAKEN 200313c: 03 00 80 79 sethi %hi(0x201e400), %g1 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 2003140: 81 c7 e0 08 ret <== NOT EXECUTED 2003144: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 2003148: 03 00 80 7b sethi %hi(0x201ec00), %g1 200314c: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 201eeec 2003150: 80 a0 60 00 cmp %g1, 0 2003154: 02 80 00 08 be 2003174 <== ALWAYS TAKEN 2003158: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 200315c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2003160: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003164: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 2003168: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 200316c: 12 bf ff e0 bne 20030ec <== NOT EXECUTED 2003170: 03 00 80 7b sethi %hi(0x201ec00), %g1 <== NOT EXECUTED errno = ENOMEM; 2003174: 40 00 3a 22 call 20119fc <__errno> 2003178: 01 00 00 00 nop 200317c: 82 10 20 0c mov 0xc, %g1 ! c 2003180: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2003184: 81 c7 e0 08 ret 2003188: 81 e8 00 00 restore =============================================================================== 02002f48 : RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2002f48: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 2002f4c: 11 00 80 7c sethi %hi(0x201f000), %o0 <== NOT EXECUTED 2002f50: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 201f1d0 <== NOT EXECUTED 2002f54: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002f58: 40 00 10 ef call 2007314 <_Chain_Append> <== NOT EXECUTED 2002f5c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02002f64 : void malloc_deferred_frees_process(void) { 2002f64: 9d e3 bf a0 save %sp, -96, %sp 2002f68: 21 00 80 7c sethi %hi(0x201f000), %l0 rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 2002f6c: 10 80 00 04 b 2002f7c 2002f70: a0 14 21 d0 or %l0, 0x1d0, %l0 ! 201f1d0 free(to_be_freed); 2002f74: 7f ff ff 5e call 2002cec <== NOT EXECUTED 2002f78: 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 ); 2002f7c: 40 00 10 fc call 200736c <_Chain_Get> 2002f80: 90 10 00 10 mov %l0, %o0 rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 2002f84: 80 a2 20 00 cmp %o0, 0 2002f88: 12 bf ff fb bne 2002f74 <== NEVER TAKEN 2002f8c: 01 00 00 00 nop free(to_be_freed); } 2002f90: 81 c7 e0 08 ret 2002f94: 81 e8 00 00 restore =============================================================================== 02002f00 : rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 2002f00: 03 00 80 7c sethi %hi(0x201f000), %g1 2002f04: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 201f3a0 <_Thread_Dispatch_disable_level> 2002f08: 80 a0 60 00 cmp %g1, 0 2002f0c: 12 80 00 06 bne 2002f24 <== NEVER TAKEN 2002f10: 90 10 20 00 clr %o0 return false; if ( _ISR_Nest_level > 0 ) 2002f14: 03 00 80 7d sethi %hi(0x201f400), %g1 2002f18: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 201f43c <_ISR_Nest_level> #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 2002f1c: 80 a0 00 01 cmp %g0, %g1 2002f20: 90 60 3f ff subx %g0, -1, %o0 if ( _ISR_Nest_level > 0 ) return false; return true; } 2002f24: 81 c3 e0 08 retl =============================================================================== 0200eccc : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 200eccc: 9d e3 bf a0 save %sp, -96, %sp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200ecd0: 03 00 80 7b sethi %hi(0x201ec00), %g1 200ecd4: d2 00 63 38 ld [ %g1 + 0x338 ], %o1 ! 201ef38 200ecd8: 7f ff cf 62 call 2002a60 200ecdc: 90 10 20 01 mov 1, %o0 if ( memory ) 200ece0: 80 a2 20 00 cmp %o0, 0 200ece4: 02 80 00 05 be 200ecf8 <== NEVER TAKEN 200ece8: 03 00 80 7c sethi %hi(0x201f000), %g1 memfile_blocks_allocated++; 200ecec: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 ! 201f04c 200ecf0: 84 00 a0 01 inc %g2 200ecf4: c4 20 60 4c st %g2, [ %g1 + 0x4c ] return memory; } 200ecf8: 81 c7 e0 08 ret 200ecfc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200f274 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 200f274: 9d e3 bf a0 save %sp, -96, %sp /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 200f278: 7f ff f6 4e call 200cbb0 200f27c: 90 10 00 18 mov %i0, %o0 200f280: 80 a2 20 00 cmp %o0, 0 200f284: 12 80 00 13 bne 200f2d0 200f288: 01 00 00 00 nop 200f28c: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 200f290: 80 a0 60 00 cmp %g1, 0 200f294: 12 80 00 0f bne 200f2d0 <== NEVER TAKEN 200f298: 03 00 80 7a sethi %hi(0x201e800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 200f29c: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201e980 200f2a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200f2a4: 80 a0 80 18 cmp %g2, %i0 200f2a8: 22 80 00 02 be,a 200f2b0 <== NEVER TAKEN 200f2ac: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 200f2b0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200f2b4: 80 a0 60 06 cmp %g1, 6 200f2b8: 02 80 00 04 be 200f2c8 <== NEVER TAKEN 200f2bc: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 200f2c0: 7f ff ff 7a call 200f0a8 200f2c4: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 200f2c8: 7f ff ce 89 call 2002cec 200f2cc: 90 10 00 18 mov %i0, %o0 } return 0; } 200f2d0: 81 c7 e0 08 ret 200f2d4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200efc8 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 200efc8: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 200efcc: 80 a6 20 00 cmp %i0, 0 200efd0: 02 80 00 16 be 200f028 <== NEVER TAKEN 200efd4: 80 a6 60 00 cmp %i1, 0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN 200efdc: d0 06 00 00 ld [ %i0 ], %o0 200efe0: a0 10 00 08 mov %o0, %l0 200efe4: a2 10 20 00 clr %l1 if ( b[i] ) { 200efe8: d0 04 00 00 ld [ %l0 ], %o0 200efec: 80 a2 20 00 cmp %o0, 0 200eff0: 02 80 00 05 be 200f004 200eff4: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 200eff8: 7f ff ff 2c call 200eca8 200effc: 01 00 00 00 nop b[i] = 0; 200f000: c0 24 00 00 clr [ %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 200f00c: a0 04 20 04 add %l0, 4, %l0 200f010: d0 06 00 00 ld [ %i0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 200f014: 7f ff ff 25 call 200eca8 200f018: 01 00 00 00 nop *block_table = 0; 200f01c: c0 26 00 00 clr [ %i0 ] } 200f020: 81 c7 e0 08 ret 200f024: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 200f028: 11 00 80 77 sethi %hi(0x201dc00), %o0 <== NOT EXECUTED 200f02c: 15 00 80 77 sethi %hi(0x201dc00), %o2 <== NOT EXECUTED 200f030: 17 00 80 77 sethi %hi(0x201dc00), %o3 <== NOT EXECUTED 200f034: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED 200f038: 94 12 a2 90 or %o2, 0x290, %o2 <== NOT EXECUTED 200f03c: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 200f040: 7f ff f6 2f call 200c8fc <__assert_func> <== NOT EXECUTED 200f044: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED =============================================================================== 0200f594 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200f594: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200f598: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 * 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 ) 200f59c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 200f5a0: 80 a0 40 19 cmp %g1, %i1 200f5a4: 06 80 00 13 bl 200f5f0 <== NEVER TAKEN 200f5a8: 90 10 00 10 mov %l0, %o0 200f5ac: 22 80 00 0d be,a 200f5e0 <== ALWAYS TAKEN 200f5b0: c2 04 20 54 ld [ %l0 + 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; 200f5b4: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED 200f5b8: f4 24 20 54 st %i2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 200f5bc: f4 26 20 0c st %i2, [ %i0 + 0xc ] 200f5c0: f2 26 20 08 st %i1, [ %i0 + 8 ] IMFS_update_atime( the_jnode ); 200f5c4: 90 07 bf f8 add %fp, -8, %o0 200f5c8: 7f ff cd f4 call 2002d98 200f5cc: 92 10 20 00 clr %o1 200f5d0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f5d4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return 0; } 200f5d8: 81 c7 e0 08 ret 200f5dc: 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 ) 200f5e0: 80 a0 40 1a cmp %g1, %i2 200f5e4: 3a bf ff f5 bcc,a 200f5b8 <== ALWAYS TAKEN 200f5e8: f2 24 20 50 st %i1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200f5ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200f5f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f5f4: 7f ff ff 83 call 200f400 <== NOT EXECUTED 200f5f8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 200f5fc: 81 c7 e0 08 ret <== NOT EXECUTED 200f600: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200f604 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200f604: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200f608: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 200f60c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200f610: 80 a0 60 06 cmp %g1, 6 200f614: 02 80 00 0f be 200f650 <== NEVER TAKEN 200f618: 90 10 00 10 mov %l0, %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 )) 200f61c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 200f620: 92 10 00 02 mov %g2, %o1 200f624: 7f ff ff 77 call 200f400 200f628: 94 10 00 03 mov %g3, %o2 200f62c: 80 a2 20 00 cmp %o0, 0 200f630: 12 80 00 1b bne 200f69c <== NEVER TAKEN 200f634: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 200f638: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 200f63c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 200f640: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 200f644: b2 10 00 03 mov %g3, %i1 200f648: 81 c7 e0 08 ret 200f64c: 91 e8 00 02 restore %g0, %g2, %o0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 200f650: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 200f654: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 200f658: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200f65c: 14 80 00 0c bg 200f68c <== NOT EXECUTED 200f660: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED 200f664: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200f668: 02 80 00 07 be 200f684 <== NOT EXECUTED 200f66c: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 200f670: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 200f674: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 200f678: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 200f67c: 81 c7 e0 08 ret <== NOT EXECUTED 200f680: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 200f684: 28 bf ff fc bleu,a 200f674 <== NOT EXECUTED 200f688: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 200f68c: c4 3e 20 10 std %g2, [ %i0 + 0x10 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 200f690: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 200f694: 81 c7 e0 08 ret <== NOT EXECUTED 200f698: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 200f69c: 40 00 08 d8 call 20119fc <__errno> <== NOT EXECUTED 200f6a0: 01 00 00 00 nop <== NOT EXECUTED 200f6a4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 200f6a8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 200f6ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f6b0: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 200f6b4: 10 bf ff e4 b 200f644 <== NOT EXECUTED 200f6b8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED =============================================================================== 0200f9b0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200f9b0: 9d e3 bf a0 save %sp, -96, %sp the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200f9b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200f9b8: a0 10 00 18 mov %i0, %l0 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200f9bc: 80 88 62 04 btst 0x204, %g1 200f9c0: 02 80 00 06 be 200f9d8 200f9c4: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200f9c8: c4 04 60 4c ld [ %l1 + 0x4c ], %g2 200f9cc: 80 a0 a0 06 cmp %g2, 6 200f9d0: 22 80 00 0c be,a 200fa00 <== NEVER TAKEN 200f9d4: d8 04 60 54 ld [ %l1 + 0x54 ], %o4 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) 200f9d8: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200f9dc: 80 88 62 00 btst 0x200, %g1 200f9e0: 22 80 00 05 be,a 200f9f4 200f9e4: c4 3c 20 08 std %g2, [ %l0 + 8 ] iop->offset = the_jnode->info.file.size; 200f9e8: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] 200f9ec: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 200f9f0: c4 3c 20 08 std %g2, [ %l0 + 8 ] 200f9f4: b0 10 20 00 clr %i0 return 0; } 200f9f8: 81 c7 e0 08 ret 200f9fc: 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; 200fa00: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200fa04: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 200fa08: c0 24 60 5c clr [ %l1 + 0x5c ] <== NOT EXECUTED && (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; the_jnode->info.file.size = 0; 200fa0c: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED 200fa10: c0 24 60 54 clr [ %l1 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 200fa14: c0 24 60 60 clr [ %l1 + 0x60 ] <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 200fa18: c0 24 60 58 clr [ %l1 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200fa1c: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200fa20: 12 80 00 06 bne 200fa38 <== NOT EXECUTED 200fa24: c2 24 60 4c st %g1, [ %l1 + 0x4c ] <== NOT EXECUTED 200fa28: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 200fa2c: 84 10 20 00 clr %g2 <== NOT EXECUTED 200fa30: 10 bf ff eb b 200f9dc <== NOT EXECUTED 200fa34: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200fa38: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200fa3c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200fa40: 94 10 20 00 clr %o2 <== NOT EXECUTED 200fa44: 7f ff ff 1e call 200f6bc <== NOT EXECUTED 200fa48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) 200fa4c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200fa50: 02 bf ff ea be 200f9f8 <== NOT EXECUTED 200fa54: 01 00 00 00 nop <== NOT EXECUTED 200fa58: 10 bf ff e0 b 200f9d8 <== NOT EXECUTED 200fa5c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED =============================================================================== 0200f2d8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200f2d8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200f2dc: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 200f2e0: c2 04 20 08 ld [ %l0 + 8 ], %g1 200f2e4: 80 a0 60 00 cmp %g1, 0 200f2e8: 22 80 00 06 be,a 200f300 <== NEVER TAKEN 200f2ec: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 200f2f0: 7f ff e0 15 call 2007344 <_Chain_Extract> 200f2f4: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 200f2f8: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200f2fc: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 200f300: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200f304: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 200f308: 90 07 bf f8 add %fp, -8, %o0 200f30c: 7f ff ce a3 call 2002d98 200f310: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 200f314: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 200f318: 90 10 00 10 mov %l0, %o0 200f31c: 7f ff ff d6 call 200f274 200f320: c2 24 20 48 st %g1, [ %l0 + 0x48 ] } 200f324: 81 c7 e0 08 ret 200f328: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020031ac : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 20031ac: 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) 20031b0: 03 00 00 3c sethi %hi(0xf000), %g1 20031b4: 05 00 00 10 sethi %hi(0x4000), %g2 20031b8: 82 0e 40 01 and %i1, %g1, %g1 20031bc: 80 a0 40 02 cmp %g1, %g2 20031c0: 02 80 00 18 be 2003220 20031c4: a0 07 bf e4 add %fp, -28, %l0 20031c8: 08 80 00 0f bleu 2003204 20031cc: 05 00 00 04 sethi %hi(0x1000), %g2 20031d0: 05 00 00 18 sethi %hi(0x6000), %g2 20031d4: 80 a0 40 02 cmp %g1, %g2 20031d8: 02 80 00 12 be 2003220 20031dc: 05 00 00 20 sethi %hi(0x8000), %g2 20031e0: 80 a0 40 02 cmp %g1, %g2 20031e4: 02 80 00 10 be 2003224 <== ALWAYS TAKEN 20031e8: 90 10 00 18 mov %i0, %o0 case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 20031ec: 40 00 3a 04 call 20119fc <__errno> <== NOT EXECUTED 20031f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20031f4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20031f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20031fc: 81 c7 e0 08 ret 2003200: 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) 2003204: 80 a0 40 02 cmp %g1, %g2 2003208: 02 80 00 05 be 200321c 200320c: 05 00 00 08 sethi %hi(0x2000), %g2 2003210: 80 a0 40 02 cmp %g1, %g2 2003214: 12 bf ff f6 bne 20031ec <== NEVER TAKEN 2003218: 01 00 00 00 nop break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 200321c: a0 07 bf e4 add %fp, -28, %l0 2003220: 90 10 00 18 mov %i0, %o0 2003224: 92 07 bf fc add %fp, -4, %o1 2003228: 40 00 02 d0 call 2003d68 200322c: 94 10 00 10 mov %l0, %o2 if ( !temp_loc.ops->evalformake_h ) { 2003230: c2 07 bf f0 ld [ %fp + -16 ], %g1 2003234: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003238: 80 a0 60 00 cmp %g1, 0 200323c: 02 80 00 25 be 20032d0 <== NEVER TAKEN 2003240: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 2003244: 92 10 00 10 mov %l0, %o1 2003248: 90 06 00 08 add %i0, %o0, %o0 200324c: 94 07 bf f8 add %fp, -8, %o2 2003250: 9f c0 40 00 call %g1 2003254: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 2003258: 80 a2 20 00 cmp %o0, 0 200325c: 12 bf ff e8 bne 20031fc 2003260: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 2003264: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2003268: 80 a0 60 00 cmp %g1, 0 200326c: 02 80 00 13 be 20032b8 <== NEVER TAKEN 2003270: d0 07 bf f8 ld [ %fp + -8 ], %o0 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 2003274: 92 10 00 19 mov %i1, %o1 2003278: 94 10 00 1a mov %i2, %o2 200327c: 96 10 00 1b mov %i3, %o3 2003280: 9f c0 40 00 call %g1 2003284: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 2003288: c2 07 bf f0 ld [ %fp + -16 ], %g1 200328c: 80 a0 60 00 cmp %g1, 0 2003290: 02 bf ff db be 20031fc <== NEVER TAKEN 2003294: b0 10 00 08 mov %o0, %i0 2003298: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200329c: 80 a0 60 00 cmp %g1, 0 20032a0: 02 80 00 10 be 20032e0 20032a4: 01 00 00 00 nop 20032a8: 9f c0 40 00 call %g1 20032ac: 90 10 00 10 mov %l0, %o0 return result; } 20032b0: 81 c7 e0 08 ret 20032b4: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 20032b8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 20032bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032c0: 02 80 00 04 be 20032d0 <== NOT EXECUTED 20032c4: 01 00 00 00 nop <== NOT EXECUTED 20032c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20032cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20032d0: 40 00 39 cb call 20119fc <__errno> <== NOT EXECUTED 20032d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20032d8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20032dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20032e0: 81 c7 e0 08 ret 20032e4: 81 e8 00 00 restore =============================================================================== 02003370 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003370: 9d e3 bf 88 save %sp, -120, %sp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2003374: 80 a6 e0 01 cmp %i3, 1 2003378: 18 80 00 a4 bgu 2003608 200337c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2003380: 40 00 27 24 call 200d010 2003384: 90 10 00 1a mov %i2, %o0 if ( !mount_h ) 2003388: a4 92 20 00 orcc %o0, 0, %l2 200338c: 02 80 00 9f be 2003608 2003390: 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 : "/"; 2003394: a2 40 20 00 addx %g0, 0, %l1 2003398: 80 a4 60 00 cmp %l1, 0 200339c: 02 80 00 97 be 20035f8 20033a0: 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( 20033a4: 40 00 3d 63 call 2012930 20033a8: ac 10 00 19 mov %i1, %l6 20033ac: a6 10 00 08 mov %o0, %l3 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 20033b0: 40 00 3d 60 call 2012930 20033b4: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 20033b8: 80 a6 20 00 cmp %i0, 0 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; 20033bc: aa 02 20 01 add %o0, 1, %l5 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 20033c0: 02 80 00 05 be 20033d4 20033c4: a8 10 20 00 clr %l4 20033c8: 40 00 3d 5a call 2012930 20033cc: 90 10 00 18 mov %i0, %o0 20033d0: a8 02 20 01 add %o0, 1, %l4 size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 20033d4: 92 04 e0 75 add %l3, 0x75, %o1 20033d8: 90 10 20 01 mov 1, %o0 20033dc: 92 02 40 15 add %o1, %l5, %o1 20033e0: 7f ff fd a0 call 2002a60 20033e4: 92 02 40 14 add %o1, %l4, %o1 if ( mt_entry != NULL ) { 20033e8: a0 92 20 00 orcc %o0, 0, %l0 20033ec: 02 80 00 7d be 20035e0 <== NEVER TAKEN 20033f0: 92 10 00 1a mov %i2, %o1 char *str = (char *) mt_entry + sizeof( *mt_entry ); 20033f4: b4 04 20 74 add %l0, 0x74, %i2 strcpy( str, filesystemtype ); 20033f8: 40 00 3d 16 call 2012850 20033fc: 90 10 00 1a mov %i2, %o0 mt_entry->type = str; 2003400: f4 24 20 6c st %i2, [ %l0 + 0x6c ] str += filesystemtype_size; if ( source_or_null != NULL ) { 2003404: 80 a6 20 00 cmp %i0, 0 2003408: 02 80 00 07 be 2003424 200340c: b4 06 80 15 add %i2, %l5, %i2 strcpy( str, source_or_null ); 2003410: 90 10 00 1a mov %i2, %o0 2003414: 40 00 3d 0f call 2012850 2003418: 92 10 00 18 mov %i0, %o1 mt_entry->dev = str; 200341c: f4 24 20 70 st %i2, [ %l0 + 0x70 ] str += source_size; 2003420: b4 06 80 14 add %i2, %l4, %i2 } strcpy( str, target ); 2003424: 92 10 00 16 mov %l6, %o1 2003428: 40 00 3d 0a call 2012850 200342c: 90 10 00 1a mov %i2, %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; 2003430: 13 00 80 75 sethi %hi(0x201d400), %o1 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 2003434: f4 24 20 68 st %i2, [ %l0 + 0x68 ] ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2003438: f6 24 20 30 st %i3, [ %l0 + 0x30 ] &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 200343c: e0 24 20 2c st %l0, [ %l0 + 0x2c ] mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003440: 92 12 61 68 or %o1, 0x168, %o1 2003444: 90 04 20 38 add %l0, 0x38, %o0 2003448: 40 00 3b a9 call 20122ec 200344c: 94 10 20 30 mov 0x30, %o2 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2003450: 80 a4 60 00 cmp %l1, 0 2003454: 12 80 00 2b bne 2003500 2003458: 03 00 80 7a sethi %hi(0x201e800), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200345c: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 201e960 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2003460: 82 10 61 60 or %g1, 0x160, %g1 2003464: 82 00 60 04 add %g1, 4, %g1 2003468: 80 a0 80 01 cmp %g2, %g1 200346c: 12 80 00 7b bne 2003658 <== NEVER TAKEN 2003470: a6 10 20 00 clr %l3 * 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 ) ) { 2003474: 92 10 00 1c mov %i4, %o1 2003478: 9f c4 80 00 call %l2 200347c: 90 10 00 10 mov %l0, %o0 2003480: 80 a2 20 00 cmp %o0, 0 2003484: 12 80 00 67 bne 2003620 <== NEVER TAKEN 2003488: 25 00 80 7c sethi %hi(0x201f000), %l2 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 ); 200348c: d0 04 a1 cc ld [ %l2 + 0x1cc ], %o0 ! 201f1cc 2003490: 94 10 20 00 clr %o2 2003494: 40 00 0d 10 call 20068d4 2003498: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 200349c: 92 10 00 10 mov %l0, %o1 20034a0: 11 00 80 7a sethi %hi(0x201e800), %o0 20034a4: 40 00 0f 9c call 2007314 <_Chain_Append> 20034a8: 90 12 21 60 or %o0, 0x160, %o0 ! 201e960 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 20034ac: d0 04 a1 cc ld [ %l2 + 0x1cc ], %o0 20034b0: 40 00 0d 50 call 20069f0 20034b4: b0 10 20 00 clr %i0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 20034b8: 80 a4 60 00 cmp %l1, 0 20034bc: 22 80 00 04 be,a 20034cc 20034c0: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 20034c4: 81 c7 e0 08 ret 20034c8: 81 e8 00 00 restore rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 20034cc: 03 00 80 7a sethi %hi(0x201e800), %g1 20034d0: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201e980 20034d4: c4 20 60 18 st %g2, [ %g1 + 0x18 ] 20034d8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 20034dc: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 20034e0: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 20034e4: c4 20 60 20 st %g2, [ %g1 + 0x20 ] 20034e8: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 20034ec: c4 20 60 24 st %g2, [ %g1 + 0x24 ] 20034f0: c4 04 20 2c ld [ %l0 + 0x2c ], %g2 20034f4: c4 20 60 28 st %g2, [ %g1 + 0x28 ] 20034f8: 81 c7 e0 08 ret 20034fc: 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( 2003500: 90 10 00 19 mov %i1, %o0 2003504: 92 10 00 13 mov %l3, %o1 2003508: b6 07 bf ec add %fp, -20, %i3 200350c: 94 10 20 07 mov 7, %o2 2003510: 96 10 00 1b mov %i3, %o3 2003514: 7f ff fd d7 call 2002c70 2003518: 98 10 20 01 mov 1, %o4 200351c: 80 a2 3f ff cmp %o0, -1 2003520: 02 80 00 52 be 2003668 <== NEVER TAKEN 2003524: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 2003528: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200352c: 80 a0 60 00 cmp %g1, 0 2003530: 02 80 00 5d be 20036a4 <== NEVER TAKEN 2003534: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2003538: 9f c0 40 00 call %g1 200353c: 90 10 00 1b mov %i3, %o0 2003540: 80 a2 20 01 cmp %o0, 1 2003544: 12 80 00 4e bne 200367c 2003548: d2 07 bf ec ld [ %fp + -20 ], %o1 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 200354c: 11 00 80 0c sethi %hi(0x2003000), %o0 2003550: 7f ff ff 6b call 20032fc 2003554: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 20032e8 2003558: 80 8a 20 ff btst 0xff, %o0 200355c: 12 80 00 4d bne 2003690 2003560: c6 07 bf ec ld [ %fp + -20 ], %g3 * 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; 2003564: 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; 2003568: c6 24 20 08 st %g3, [ %l0 + 8 ] mt_entry->mt_point_node.handlers = loc.handlers; 200356c: c6 07 bf f4 ld [ %fp + -12 ], %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 ){ 2003570: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 * 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; 2003574: c6 24 20 10 st %g3, [ %l0 + 0x10 ] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2003578: c6 07 bf fc ld [ %fp + -4 ], %g3 * 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; 200357c: c4 24 20 14 st %g2, [ %l0 + 0x14 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2003580: 80 a0 60 00 cmp %g1, 0 2003584: 02 80 00 48 be 20036a4 <== NEVER TAKEN 2003588: c6 24 20 18 st %g3, [ %l0 + 0x18 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 200358c: 90 10 00 10 mov %l0, %o0 2003590: 9f c0 40 00 call %g1 2003594: a6 10 00 1b mov %i3, %l3 2003598: 80 a2 20 00 cmp %o0, 0 200359c: 02 bf ff b7 be 2003478 <== ALWAYS TAKEN 20035a0: 92 10 00 1c mov %i4, %o1 return 0; cleanup_and_bail: free( mt_entry ); 20035a4: 90 10 00 10 mov %l0, %o0 20035a8: 7f ff fd d1 call 2002cec 20035ac: a6 10 00 1b mov %i3, %l3 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 20035b0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 20035b4: 80 a0 60 00 cmp %g1, 0 20035b8: 02 80 00 26 be 2003650 <== NEVER TAKEN 20035bc: 01 00 00 00 nop 20035c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20035c4: 80 a0 60 00 cmp %g1, 0 20035c8: 02 80 00 22 be 2003650 <== NEVER TAKEN 20035cc: 90 10 00 13 mov %l3, %o0 20035d0: 9f c0 40 00 call %g1 20035d4: b0 10 3f ff mov -1, %i0 20035d8: 81 c7 e0 08 ret 20035dc: 81 e8 00 00 restore target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 20035e0: 40 00 39 07 call 20119fc <__errno> <== NOT EXECUTED 20035e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20035e8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20035ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20035f0: 81 c7 e0 08 ret <== NOT EXECUTED 20035f4: 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 : "/"; 20035f8: 2d 00 80 75 sethi %hi(0x201d400), %l6 20035fc: a6 10 20 01 mov 1, %l3 2003600: 10 bf ff 6c b 20033b0 2003604: ac 15 a1 60 or %l6, 0x160, %l6 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 2003608: 40 00 38 fd call 20119fc <__errno> 200360c: b0 10 3f ff mov -1, %i0 2003610: 82 10 20 16 mov 0x16, %g1 2003614: c2 22 00 00 st %g1, [ %o0 ] 2003618: 81 c7 e0 08 ret 200361c: 81 e8 00 00 restore if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 2003620: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2003624: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 2003628: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200362c: 02 80 00 04 be 200363c <== NOT EXECUTED 2003630: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 2003634: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003638: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 200363c: 7f ff fd ac call 2002cec <== NOT EXECUTED 2003640: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( loc_to_free ) 2003644: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 2003648: 32 bf ff db bne,a 20035b4 <== NOT EXECUTED 200364c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); return -1; } 2003650: 81 c7 e0 08 ret <== NOT EXECUTED 2003654: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 2003658: 40 00 38 e9 call 20119fc <__errno> <== NOT EXECUTED 200365c: 01 00 00 00 nop <== NOT EXECUTED 2003660: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2003668: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200366c: 7f ff fd a0 call 2002cec <== NOT EXECUTED 2003670: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003674: 81 c7 e0 08 ret <== NOT EXECUTED 2003678: 81 e8 00 00 restore <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 200367c: 40 00 38 e0 call 20119fc <__errno> 2003680: 01 00 00 00 nop 2003684: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 2003688: 10 bf ff c7 b 20035a4 200368c: c2 22 00 00 st %g1, [ %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 ) ) { errno = EBUSY; 2003690: 40 00 38 db call 20119fc <__errno> 2003694: 01 00 00 00 nop 2003698: 82 10 20 10 mov 0x10, %g1 ! 10 goto cleanup_and_bail; 200369c: 10 bf ff c2 b 20035a4 20036a0: c2 22 00 00 st %g1, [ %o0 ] * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 20036a4: 40 00 38 d6 call 20119fc <__errno> <== NOT EXECUTED 20036a8: 01 00 00 00 nop <== NOT EXECUTED 20036ac: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; 20036b0: 10 bf ff bd b 20035a4 <== NOT EXECUTED 20036b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED =============================================================================== 0200b7f8 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 200b7f8: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b7fc: 03 00 80 a5 sethi %hi(0x2029400), %g1 200b800: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 2029660 <_Thread_Dispatch_disable_level> Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 200b804: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 200b808: 84 00 a0 01 inc %g2 200b80c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 200b810: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 200b814: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 200b818: c4 20 62 60 st %g2, [ %g1 + 0x260 ] POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 200b81c: a6 8e 62 00 andcc %i1, 0x200, %l3 200b820: 12 80 00 34 bne 200b8f0 200b824: 23 00 80 a6 sethi %hi(0x2029800), %l1 200b828: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 200b82c: 40 00 0c 69 call 200e9d0 <_Objects_Allocate> 200b830: 90 14 63 7c or %l1, 0x37c, %o0 attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200b834: a0 92 20 00 orcc %o0, 0, %l0 200b838: 02 80 00 36 be 200b910 <== NEVER TAKEN 200b83c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 200b840: f2 24 20 14 st %i1, [ %l0 + 0x14 ] status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 200b844: 90 10 00 18 mov %i0, %o0 200b848: 40 00 22 c3 call 2014354 <_POSIX_Message_queue_Name_to_id> 200b84c: 92 07 bf f8 add %fp, -8, %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 ) { 200b850: a4 92 20 00 orcc %o0, 0, %l2 200b854: 22 80 00 0f be,a 200b890 200b858: 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) ) ) { 200b85c: 80 a4 a0 02 cmp %l2, 2 200b860: 02 80 00 3f be 200b95c 200b864: 80 a4 e0 00 cmp %l3, 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 ); 200b868: 90 14 63 7c or %l1, 0x37c, %o0 200b86c: 40 00 0d 45 call 200ed80 <_Objects_Free> 200b870: 92 10 00 10 mov %l0, %o1 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 200b874: 40 00 10 3c call 200f964 <_Thread_Enable_dispatch> 200b878: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 200b87c: 40 00 34 88 call 2018a9c <__errno> 200b880: 01 00 00 00 nop 200b884: e4 22 00 00 st %l2, [ %o0 ] 200b888: 81 c7 e0 08 ret 200b88c: 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) ) { 200b890: 80 a6 6a 00 cmp %i1, 0xa00 200b894: 02 80 00 27 be 200b930 200b898: d2 07 bf f8 ld [ %fp + -8 ], %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 200b89c: 94 07 bf f0 add %fp, -16, %o2 200b8a0: 11 00 80 a6 sethi %hi(0x2029800), %o0 200b8a4: 40 00 0d 9f call 200ef20 <_Objects_Get> 200b8a8: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 20299f0 <_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; 200b8ac: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200b8b0: a2 14 63 7c or %l1, 0x37c, %l1 200b8b4: 82 00 60 01 inc %g1 200b8b8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200b8bc: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 200b8c0: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 /* * 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 ); 200b8c4: d0 27 bf f4 st %o0, [ %fp + -12 ] 200b8c8: 83 28 60 02 sll %g1, 2, %g1 200b8cc: e0 20 80 01 st %l0, [ %g2 + %g1 ] the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 200b8d0: d0 24 20 10 st %o0, [ %l0 + 0x10 ] _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200b8d4: 40 00 10 24 call 200f964 <_Thread_Enable_dispatch> 200b8d8: c0 24 20 0c clr [ %l0 + 0xc ] _Thread_Enable_dispatch(); 200b8dc: 40 00 10 22 call 200f964 <_Thread_Enable_dispatch> 200b8e0: 01 00 00 00 nop return (mqd_t)the_mq_fd->Object.id; 200b8e4: f0 04 20 08 ld [ %l0 + 8 ], %i0 200b8e8: 81 c7 e0 08 ret 200b8ec: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 200b8f0: 82 07 a0 54 add %fp, 0x54, %g1 200b8f4: e8 07 a0 50 ld [ %fp + 0x50 ], %l4 200b8f8: c2 27 bf fc st %g1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 200b8fc: 40 00 0c 35 call 200e9d0 <_Objects_Allocate> 200b900: 90 14 63 7c or %l1, 0x37c, %o0 va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200b904: a0 92 20 00 orcc %o0, 0, %l0 200b908: 32 bf ff cf bne,a 200b844 200b90c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 200b910: 40 00 10 15 call 200f964 <_Thread_Enable_dispatch> 200b914: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENFILE ); 200b918: 40 00 34 61 call 2018a9c <__errno> 200b91c: 01 00 00 00 nop 200b920: 82 10 20 17 mov 0x17, %g1 ! 17 200b924: c2 22 00 00 st %g1, [ %o0 ] 200b928: 81 c7 e0 08 ret 200b92c: 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 ); 200b930: 90 14 63 7c or %l1, 0x37c, %o0 200b934: 40 00 0d 13 call 200ed80 <_Objects_Free> 200b938: 92 10 00 10 mov %l0, %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(); 200b93c: 40 00 10 0a call 200f964 <_Thread_Enable_dispatch> 200b940: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 200b944: 40 00 34 56 call 2018a9c <__errno> 200b948: 01 00 00 00 nop 200b94c: 82 10 20 11 mov 0x11, %g1 ! 11 200b950: c2 22 00 00 st %g1, [ %o0 ] 200b954: 81 c7 e0 08 ret 200b958: 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) ) ) { 200b95c: 02 bf ff c4 be 200b86c 200b960: 90 14 63 7c or %l1, 0x37c, %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( 200b964: 90 10 00 18 mov %i0, %o0 200b968: 94 10 00 14 mov %l4, %o2 200b96c: 92 10 20 01 mov 1, %o1 200b970: 40 00 22 16 call 20141c8 <_POSIX_Message_queue_Create_support> 200b974: 96 07 bf f4 add %fp, -12, %o3 ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 200b978: 80 a2 3f ff cmp %o0, -1 200b97c: 02 80 00 0e be 200b9b4 200b980: 90 14 63 7c or %l1, 0x37c, %o0 200b984: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 200b988: a2 14 63 7c or %l1, 0x37c, %l1 200b98c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200b990: 83 28 60 02 sll %g1, 2, %g1 200b994: e0 20 80 01 st %l0, [ %g2 + %g1 ] _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 200b998: c2 07 bf f4 ld [ %fp + -12 ], %g1 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 200b99c: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200b9a0: 40 00 0f f1 call 200f964 <_Thread_Enable_dispatch> 200b9a4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] return (mqd_t) the_mq_fd->Object.id; 200b9a8: f0 04 20 08 ld [ %l0 + 8 ], %i0 } 200b9ac: 81 c7 e0 08 ret 200b9b0: 81 e8 00 00 restore 200b9b4: 92 10 00 10 mov %l0, %o1 200b9b8: 40 00 0c f2 call 200ed80 <_Objects_Free> 200b9bc: 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(); 200b9c0: 40 00 0f e9 call 200f964 <_Thread_Enable_dispatch> 200b9c4: 01 00 00 00 nop return (mqd_t) -1; 200b9c8: 81 c7 e0 08 ret 200b9cc: 81 e8 00 00 restore =============================================================================== 0203b878 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 203b878: 9d e3 bf 00 save %sp, -256, %sp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 203b87c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 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); 203b880: a6 07 bf 68 add %fp, -152, %l3 <== NOT EXECUTED 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; 203b884: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 203b888: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 203b88c: a4 07 bf c8 add %fp, -56, %l2 <== NOT EXECUTED 203b890: c0 27 bf c8 clr [ %fp + -56 ] <== NOT EXECUTED 203b894: c0 27 bf cc clr [ %fp + -52 ] <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 203b898: c0 27 bf 68 clr [ %fp + -152 ] <== NOT EXECUTED 203b89c: c0 27 bf 6c clr [ %fp + -148 ] <== NOT EXECUTED 203b8a0: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED 203b8a4: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED 203b8a8: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED 203b8ac: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED 203b8b0: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED 203b8b4: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED 203b8b8: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED 203b8bc: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED 203b8c0: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED 203b8c4: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED 203b8c8: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED 203b8cc: c0 24 e0 34 clr [ %l3 + 0x34 ] <== NOT EXECUTED 203b8d0: c0 24 e0 38 clr [ %l3 + 0x38 ] <== NOT EXECUTED 203b8d4: c0 24 e0 3c clr [ %l3 + 0x3c ] <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 203b8d8: c0 24 a0 08 clr [ %l2 + 8 ] <== NOT EXECUTED 203b8dc: c0 24 a0 0c clr [ %l2 + 0xc ] <== NOT EXECUTED 203b8e0: c0 24 a0 10 clr [ %l2 + 0x10 ] <== NOT EXECUTED 203b8e4: c0 24 a0 14 clr [ %l2 + 0x14 ] <== NOT EXECUTED 203b8e8: c0 24 a0 18 clr [ %l2 + 0x18 ] <== NOT EXECUTED 203b8ec: c0 24 a0 1c clr [ %l2 + 0x1c ] <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 203b8f0: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 203b8f4: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 203b8f8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 203b8fc: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 203b900: 96 10 20 0b mov 0xb, %o3 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 203b904: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 203b908: c0 37 bf fe clrh [ %fp + -2 ] <== NOT EXECUTED uint16_t date = 0; 203b90c: c0 37 bf fc clrh [ %fp + -4 ] <== NOT EXECUTED static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 203b910: c0 27 bf e8 clr [ %fp + -24 ] <== NOT EXECUTED dir_pos->sname.ofs = 0; 203b914: c0 27 bf ec clr [ %fp + -20 ] <== NOT EXECUTED 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; 203b918: e8 06 00 00 ld [ %i0 ], %l4 <== NOT EXECUTED 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, 203b91c: 40 00 08 c7 call 203dc38 <== NOT EXECUTED 203b920: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 203b924: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED 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, 203b928: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 203b92c: c0 2c a0 0c clrb [ %l2 + 0xc ] <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 203b930: 40 00 6b 8a call 2056758