Changeset 437 for trunk/kernel/kern/kernel_init.c
- Timestamp:
- Mar 28, 2018, 2:40:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r436 r437 324 324 } 325 325 326 #if( CONFIG_ KINIT_DEBUG& 0x1 )327 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)326 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 327 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 328 328 printk("\n[DBG] %s : created MMC in cluster %x / chdev = %x\n", 329 329 __FUNCTION__ , local_cxy , chdev_ptr ); … … 353 353 chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr ); 354 354 355 #if( CONFIG_ KINIT_DEBUG& 0x1 )356 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)355 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 356 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 357 357 printk("\n[DBG] %s : created DMA[%d] in cluster %x / chdev = %x\n", 358 358 __FUNCTION__ , channel , local_cxy , chdev_ptr ); … … 488 488 } 489 489 490 #if( CONFIG_ KINIT_DEBUG& 0x1 )491 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)490 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 491 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 492 492 printk("\n[DBG] %s : create chdev %s / channel = %d / rx = %d / cluster %x / chdev = %x\n", 493 493 __FUNCTION__ , chdev_func_str( func ), channel , rx , local_cxy , chdev ); … … 623 623 } 624 624 625 #if( CONFIG_ KINIT_DEBUG& 0x1 )626 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)625 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 626 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 627 627 { 628 628 printk("\n[DBG] %s created PIC chdev in cluster %x at cycle %d\n", … … 792 792 thread->core = &LOCAL_CLUSTER->core_tbl[core_lid]; 793 793 794 #if CONFIG_LOCKS_DEBUG 794 // each core initializes the idle thread lists of locks 795 795 list_root_init( &thread->locks_root ); 796 796 xlist_root_init( XPTR( local_cxy , &thread->xlocks_root ) ); 797 #endif 797 thread->local_locks = 0; 798 thread->remote_locks = 0; 798 799 799 800 // CP0 in I/O cluster initialises TXT0 chdev descriptor … … 804 805 (info->x_size * info->y_size) ); 805 806 barrier_wait( &local_barrier , info->cores_nr ); 806 807 if( (core_lid == 0) && (local_cxy == 0) ) 808 kinit_dmsg("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n", 809 __FUNCTION__, hal_time_stamp() ); 807 ///////////////////////////////////////////////////////////////////////////////// 808 809 #if CONFIG_DEBUG_KERNEL_INIT 810 if( (core_lid == 0) && (local_cxy == 0) ) 811 printk("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n", 812 __FUNCTION__, (uint32_t)hal_get_cycles() ); 813 #endif 810 814 811 815 ///////////////////////////////////////////////////////////////////////////// … … 841 845 ///////////////////////////////////////////////////////////////////////////////// 842 846 843 if( (core_lid == 0) && (local_cxy == 0) ) 844 kinit_dmsg("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n", 845 __FUNCTION__, hal_time_stamp() ); 847 #if CONFIG_DEBUG_KERNEL_INIT 848 if( (core_lid == 0) && (local_cxy == 0) ) 849 printk("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n", 850 __FUNCTION__, (uint32_t)hal_get_cycles() ); 851 #endif 846 852 847 853 ///////////////////////////////////////////////////////////////////////////////// … … 866 872 //////////////////////////////////////////////////////////////////////////////// 867 873 868 if( (core_lid == 0) && (local_cxy == 0) ) 869 kinit_dmsg("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n", 870 __FUNCTION__, hal_time_stamp() ); 874 #if CONFIG_DEBUG_KERNEL_INIT 875 if( (core_lid == 0) && (local_cxy == 0) ) 876 printk("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n", 877 __FUNCTION__, (uint32_t)hal_get_cycles() ); 878 #endif 871 879 872 880 //////////////////////////////////////////////////////////////////////////////// … … 897 905 ///////////////////////////////////////////////////////////////////////////////// 898 906 899 if( (core_lid == 0) && (local_cxy == 0) ) 900 kinit_dmsg("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n", 901 __FUNCTION__, hal_time_stamp()); 902 907 #if CONFIG_DEBUG_KERNEL_INIT 908 if( (core_lid == 0) && (local_cxy == 0) ) 909 printk("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n", 910 __FUNCTION__, (uint32_t)hal_get_cycles() ); 911 #endif 912 913 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 914 chdev_dir_display(); 915 #endif 916 903 917 ///////////////////////////////////////////////////////////////////////////////// 904 918 // STEP 4 : All cores enable IPI (Inter Procesor Interrupt), … … 908 922 ///////////////////////////////////////////////////////////////////////////////// 909 923 910 #if CONFIG_KINIT_DEBUG911 chdev_dir_display();912 #endif913 914 924 // All cores enable the shared IPI channel 915 925 dev_pic_enable_ipi(); … … 932 942 core->scheduler.idle = thread; 933 943 934 #if CONFIG_KINIT_DEBUG944 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 935 945 sched_display( core_lid ); 936 946 #endif … … 1004 1014 ///////////////////////////////////////////////////////////////////////////////// 1005 1015 1006 if( (core_lid == 0) && (local_cxy == 0) ) 1007 kinit_dmsg("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n", 1008 __FUNCTION__, vfs_root_inode_xp , hal_time_stamp()); 1016 #if CONFIG_DEBUG_KERNEL_INIT 1017 if( (core_lid == 0) && (local_cxy == 0) ) 1018 printk("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n", 1019 __FUNCTION__, vfs_root_inode_xp , (uint32_t)hal_get_cycles()); 1020 #endif 1009 1021 1010 1022 ///////////////////////////////////////////////////////////////////////////////// … … 1063 1075 ///////////////////////////////////////////////////////////////////////////////// 1064 1076 1065 if( (core_lid == 0) && (local_cxy == 0) ) 1066 kinit_dmsg("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster IO / cycle %d\n", 1067 __FUNCTION__, vfs_root_inode_xp , hal_time_stamp() ); 1077 #if CONFIG_DEBUG_KERNEL_INIT 1078 if( (core_lid == 0) && (local_cxy == io_cxy) ) 1079 printk("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster %x / cycle %d\n", 1080 __FUNCTION__, vfs_root_inode_xp , io_cxy , (uint32_t)hal_get_cycles()); 1081 #endif 1068 1082 1069 1083 ///////////////////////////////////////////////////////////////////////////////// … … 1096 1110 ///////////////////////////////////////////////////////////////////////////////// 1097 1111 1098 if( (core_lid == 0) && (local_cxy == 0) ) 1099 kinit_dmsg("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster IO / cycle %d\n", 1100 __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() ); 1112 #if CONFIG_DEBUG_KERNEL_INIT 1113 if( (core_lid == 0) && (local_cxy == io_cxy) ) 1114 printk("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster %x / cycle %d\n", 1115 __FUNCTION__, devfs_dev_inode_xp , io_cxy , (uint32_t)hal_get_cycles() ); 1116 #endif 1101 1117 1102 1118 ///////////////////////////////////////////////////////////////////////////////// … … 1133 1149 ///////////////////////////////////////////////////////////////////////////////// 1134 1150 1151 #if CONFIG_DEBUG_KERNEL_INIT 1152 if( (core_lid == 0) && (local_cxy == 0) ) 1153 printk("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n", 1154 __FUNCTION__, devfs_dev_inode_xp , (uint32_t)hal_get_cycles() ); 1155 #endif 1156 1157 ///////////////////////////////////////////////////////////////////////////////// 1158 // STEP 8 : CP0 in cluster 0 creates the first user process (process_init) 1159 ///////////////////////////////////////////////////////////////////////////////// 1160 1135 1161 if( (core_lid == 0) && (local_cxy == 0) ) 1136 kinit_dmsg("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n", 1137 __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() ); 1138 1139 ///////////////////////////////////////////////////////////////////////////////// 1140 // STEP 8 : CP0 in cluster 0 creates the first user process (process_init) 1141 ///////////////////////////////////////////////////////////////////////////////// 1142 1143 if( (core_lid == 0) && (local_cxy == 0) ) 1144 { 1145 1146 #if CONFIG_KINIT_DEBUG 1162 { 1163 1164 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 1147 1165 vfs_display( vfs_root_inode_xp ); 1148 1166 #endif … … 1157 1175 ///////////////////////////////////////////////////////////////////////////////// 1158 1176 1159 if( (core_lid == 0) && (local_cxy == 0) ) 1160 kinit_dmsg("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n", 1161 __FUNCTION__ , hal_time_stamp() ); 1177 #if CONFIG_DEBUG_KERNEL_INIT 1178 if( (core_lid == 0) && (local_cxy == 0) ) 1179 printk("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n", 1180 __FUNCTION__ , (uint32_t)hal_get_cycles() ); 1181 #endif 1162 1182 1163 1183 ///////////////////////////////////////////////////////////////////////////////// … … 1169 1189 print_banner( (info->x_size * info->y_size) , info->cores_nr ); 1170 1190 1171 #if CONFIG_KINIT_DEBUG 1172 1173 printk("\n\n***** memory fooprint for main kernel objects\n\n" 1191 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 1192 printk("\n\n***** memory fooprint for main kernel objects\n\n" 1174 1193 " - thread descriptor : %d bytes\n" 1175 1194 " - process descriptor : %d bytes\n"
Note: See TracChangeset
for help on using the changeset viewer.