Changeset 610 for trunk/kernel/kern/kernel_init.c
- Timestamp:
- Dec 27, 2018, 7:38:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r601 r610 146 146 147 147 "THREAD_JOIN", // 10 148 " VFS_MAIN",// 11148 "XHTAB_STATE", // 11 149 149 "CHDEV_QUEUE", // 12 150 150 "CHDEV_TXT0", // 13 … … 154 154 "CONDVAR_STATE", // 17 155 155 "SEM_STATE", // 18 156 " XHTAB_STATE", // 19156 "RPOCESS_CWD", // 19 157 157 158 158 "unused_20", // 20 … … 171 171 172 172 "MAPPER_STATE", // 30 173 " PROCESS_CWD",// 31174 "VFS_ INODE",// 32175 "V FS_FILE",// 33176 "VMM_ VSL", // 34177 "V MM_GPT",// 35173 "VFS_SIZE", // 31 174 "VFS_FILE", // 32 175 "VMM_VSL", // 33 176 "VMM_GPT", // 34 177 "VFS_MAIN", // 35 178 178 }; 179 179 … … 970 970 #if DEBUG_KERNEL_INIT 971 971 if( (core_lid == 0) & (local_cxy == 0) ) 972 printk("\n[%s] : exit barrier 0 : TXT0 initialized / sr %x /cycle %d\n",973 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );972 printk("\n[%s] : exit barrier 0 : TXT0 initialized / cycle %d\n", 973 __FUNCTION__, (uint32_t)hal_get_cycles() ); 974 974 #endif 975 975 … … 1012 1012 #if DEBUG_KERNEL_INIT 1013 1013 if( (core_lid == 0) & (local_cxy == 0) ) 1014 printk("\n[%s] : exit barrier 1 : clusters initialised / sr %x /cycle %d\n",1015 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1014 printk("\n[%s] : exit barrier 1 : clusters initialised / cycle %d\n", 1015 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1016 1016 #endif 1017 1017 … … 1039 1039 #if DEBUG_KERNEL_INIT 1040 1040 if( (core_lid == 0) & (local_cxy == 0) ) 1041 printk("\n[%s] : exit barrier 2 : PIC initialised / sr %x /cycle %d\n",1042 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1041 printk("\n[%s] : exit barrier 2 : PIC initialised / cycle %d\n", 1042 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1043 1043 #endif 1044 1044 … … 1072 1072 #if DEBUG_KERNEL_INIT 1073 1073 if( (core_lid == 0) & (local_cxy == 0) ) 1074 printk("\n[%s] : exit barrier 3 : all chdevs initialised / sr %x /cycle %d\n",1075 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1074 printk("\n[%s] : exit barrier 3 : all chdevs initialised / cycle %d\n", 1075 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1076 1076 #endif 1077 1077 … … 1136 1136 1137 1137 // 4. create VFS root inode in cluster 0 1138 error = vfs_inode_create( XPTR_NULL, // dentry_xp 1139 FS_TYPE_FATFS, // fs_type 1138 error = vfs_inode_create( FS_TYPE_FATFS, // fs_type 1140 1139 INODE_TYPE_DIR, // inode_type 1141 1140 0, // attr … … 1174 1173 // register VFS root inode in process_zero descriptor of cluster 0 1175 1174 process_zero.vfs_root_xp = vfs_root_inode_xp; 1176 process_zero. vfs_cwd_xp= vfs_root_inode_xp;1175 process_zero.cwd_xp = vfs_root_inode_xp; 1177 1176 } 1178 1177 … … 1185 1184 #if DEBUG_KERNEL_INIT 1186 1185 if( (core_lid == 0) & (local_cxy == 0) ) 1187 printk("\n[%s] : exit barrier 4 : VFS root initialized in cluster 0 / sr %x / cycle %d\n", 1188 __FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() ); 1186 printk("\n[%s] : exit barrier 4 : VFS root (%x,%x) in cluster 0 / cycle %d\n", 1187 __FUNCTION__, GET_CXY(process_zero.vfs_root_xp), 1188 GET_PTR(process_zero.vfs_root_xp), (uint32_t)hal_get_cycles() ); 1189 1189 #endif 1190 1190 … … 1243 1243 // update local process_zero descriptor 1244 1244 process_zero.vfs_root_xp = vfs_root_inode_xp; 1245 process_zero. vfs_cwd_xp= vfs_root_inode_xp;1245 process_zero.cwd_xp = vfs_root_inode_xp; 1246 1246 } 1247 1247 … … 1254 1254 #if DEBUG_KERNEL_INIT 1255 1255 if( (core_lid == 0) & (local_cxy == 1) ) 1256 printk("\n[%s] : exit barrier 5 : VFS root initialized in cluster 1 / sr %x / cycle %d\n", 1257 __FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() ); 1256 printk("\n[%s] : exit barrier 4 : VFS root (%x,%x) in cluster 1 / cycle %d\n", 1257 __FUNCTION__, GET_CXY(process_zero.vfs_root_xp), 1258 GET_PTR(process_zero.vfs_root_xp), (uint32_t)hal_get_cycles() ); 1258 1259 #endif 1259 1260 … … 1303 1304 #if DEBUG_KERNEL_INIT 1304 1305 if( (core_lid == 0) & (local_cxy == 0) ) 1305 printk("\n[%s] : exit barrier 6 : DEVFS root initialized in cluster 0 / sr %x /cycle %d\n",1306 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1306 printk("\n[%s] : exit barrier 6 : DEVFS root initialized in cluster 0 / cycle %d\n", 1307 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1307 1308 #endif 1308 1309 … … 1340 1341 #if DEBUG_KERNEL_INIT 1341 1342 if( (core_lid == 0) & (local_cxy == 0) ) 1342 printk("\n[%s] : exit barrier 7 : DEV initialized in cluster 0 / sr %x /cycle %d\n",1343 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1343 printk("\n[%s] : exit barrier 7 : DEV initialized in cluster 0 / cycle %d\n", 1344 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1344 1345 #endif 1345 1346 … … 1366 1367 #if DEBUG_KERNEL_INIT 1367 1368 if( (core_lid == 0) & (local_cxy == 0) ) 1368 printk("\n[%s] : exit barrier 8 : process init created / sr %x /cycle %d\n",1369 __FUNCTION__, (uint32_t)hal_get_ sr(), (uint32_t)hal_get_cycles() );1369 printk("\n[%s] : exit barrier 8 : process init created / cycle %d\n", 1370 __FUNCTION__, (uint32_t)hal_get_cycles() ); 1370 1371 #endif 1371 1372 … … 1436 1437 dev_pic_enable_timer( CONFIG_SCHED_TICK_MS_PERIOD ); 1437 1438 1439 ///////////////////////////////////////////////////////////////////////////////// 1440 if( core_lid == 0 ) xbarrier_wait( XPTR( 0 , &global_barrier ), 1441 (info->x_size * info->y_size) ); 1442 barrier_wait( &local_barrier , info->cores_nr ); 1443 ///////////////////////////////////////////////////////////////////////////////// 1444 1438 1445 #if DEBUG_KERNEL_INIT 1439 printk("\n[%s] : thread %x on core[%x,%d] jumps to thread_idle_func() / cycle %d\n", 1440 __FUNCTION__ , CURRENT_THREAD , local_cxy , core_lid , (uint32_t)hal_get_cycles() ); 1446 thread_t * this = CURRENT_THREAD; 1447 printk("\n[%s] : thread[%x,%x] on core[%x,%d] jumps to thread_idle_func() / cycle %d\n", 1448 __FUNCTION__ , this->process->pid, this->trdid, 1449 local_cxy, core_lid, (uint32_t)hal_get_cycles() ); 1441 1450 #endif 1442 1451 1443 1452 // each core jump to thread_idle_func 1444 1453 thread_idle_func(); 1445 } 1446 1454 1455 } // end kernel_init() 1456
Note: See TracChangeset
for help on using the changeset viewer.