Changeset 580 for trunk/kernel/kern/kernel_init.c
- Timestamp:
- Oct 8, 2018, 11:31:42 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r577 r580 375 375 // check channels 376 376 if( channels != 1 ) 377 printk("\n[PANIC] in %s : MMC device must be single channel\n", __FUNCTION__ ); 377 { 378 printk("\n[PANIC] in %s : MMC device must be single channel\n", 379 __FUNCTION__ ); 380 hal_core_sleep(); 381 } 378 382 379 383 // create chdev in local cluster … … 386 390 // check memory 387 391 if( chdev_ptr == NULL ) 388 printk("\n[PANIC] in %s : cannot create MMC chdev\n", __FUNCTION__ ); 392 { 393 printk("\n[PANIC] in %s : cannot create MMC chdev\n", 394 __FUNCTION__ ); 395 hal_core_sleep(); 396 } 389 397 390 398 // make MMC specific initialisation … … 427 435 // check memory 428 436 if( chdev_ptr == NULL ) 429 printk("\n[PANIC] in %s : cannot create DMA chdev\n", __FUNCTION__ ); 437 { 438 printk("\n[PANIC] in %s : cannot create DMA chdev\n", 439 __FUNCTION__ ); 440 hal_core_sleep(); 441 } 430 442 431 443 // make DMA specific initialisation … … 503 515 // check PIC device initialized 504 516 if( chdev_dir.pic == XPTR_NULL ) 505 printk("\n[PANIC] in %s : PIC device must be initialized first\n", __FUNCTION__ ); 517 { 518 printk("\n[PANIC] in %s : PIC device must be initialized first\n", 519 __FUNCTION__ ); 520 hal_core_sleep(); 521 } 506 522 507 523 // check external device functionnal type 508 524 if( (func != DEV_FUNC_IOB) && (func != DEV_FUNC_IOC) && (func != DEV_FUNC_TXT) && 509 525 (func != DEV_FUNC_NIC) && (func != DEV_FUNC_FBF) ) 510 printk("\n[PANIC] in %s : undefined peripheral type\n", __FUNCTION__ ); 526 { 527 printk("\n[PANIC] in %s : undefined peripheral type\n", 528 __FUNCTION__ ); 529 hal_core_sleep(); 530 } 511 531 512 532 // loops on channels … … 548 568 549 569 if( chdev == NULL ) 550 printk("\n[PANIC] in %s : cannot allocate chdev for external device\n", 551 __FUNCTION__ ); 570 { 571 printk("\n[PANIC] in %s : cannot allocate chdev\n", 572 __FUNCTION__ ); 573 hal_core_sleep(); 574 } 552 575 553 576 // make device type specific initialisation … … 646 669 // check PIC existence 647 670 if( found == false ) 648 printk("\n[PANIC] in %s : PIC device not found\n", __FUNCTION__ ); 671 { 672 printk("\n[PANIC] in %s : PIC device not found\n", 673 __FUNCTION__ ); 674 hal_core_sleep(); 675 } 649 676 650 677 // allocate and initialize the PIC chdev in cluster 0 … … 657 684 // check memory 658 685 if( chdev == NULL ) 659 printk("\n[PANIC] in %s : no memory for PIC chdev\n", __FUNCTION__ ); 686 { 687 printk("\n[PANIC] in %s : no memory for PIC chdev\n", 688 __FUNCTION__ ); 689 hal_core_sleep(); 690 } 660 691 661 692 // make PIC device type specific initialisation … … 723 754 else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 724 755 else if( func == DEV_FUNC_IOB ) ptr = &iopic_input.iob; 725 else printk("\n[PANIC] in %s : illegal source device for IOPIC input" ); 756 else 757 { 758 printk("\n[PANIC] in %s : illegal source device for IOPIC input\n", 759 __FUNCTION__ ); 760 hal_core_sleep(); 761 } 726 762 727 763 // set one entry in all "iopic_input" structures … … 814 850 if ( func == DEV_FUNC_MMC ) lapic_input.mmc = id; 815 851 else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id; 816 else printk("\n[PANIC] in %s : illegal source device for LAPIC input" ); 852 else 853 { 854 printk("\n[PANIC] in %s : illegal source device for LAPIC input\n", 855 __FUNCTION__ ); 856 hal_core_sleep(); 857 } 817 858 } 818 859 } … … 939 980 // all cores check identifiers 940 981 if( error ) 941 printk("\n[PANIC] in %s : illegal core : gid %x / cxy %x / lid %d", 942 __FUNCTION__, core_lid, core_cxy, core_lid ); 982 { 983 printk("\n[PANIC] in %s : illegal core : gid %x / cxy %x / lid %d", 984 __FUNCTION__, core_lid, core_cxy, core_lid ); 985 hal_core_sleep(); 986 } 943 987 944 988 // CP0 initializes cluster manager complex structures … … 948 992 949 993 if( error ) 950 printk("\n[PANIC] in %s : cannot initialize cluster manager in cluster %x\n", 951 __FUNCTION__, local_cxy ); 994 { 995 printk("\n[PANIC] in %s : cannot initialize cluster manager in cluster %x\n", 996 __FUNCTION__, local_cxy ); 997 hal_core_sleep(); 998 } 952 999 } 953 1000 … … 1068 1115 1069 1116 if( fatfs_ctx == NULL ) 1070 printk("\n[PANIC] in %s : cannot create FATFS context in cluster 0\n", 1071 __FUNCTION__ ); 1117 { 1118 printk("\n[PANIC] in %s : cannot create FATFS context in cluster 0\n", 1119 __FUNCTION__ ); 1120 hal_core_sleep(); 1121 } 1072 1122 1073 1123 // 2. access boot device to initialize FATFS context … … 1099 1149 &vfs_root_inode_xp ); // return 1100 1150 if( error ) 1101 printk("\n[PANIC] in %s : cannot create VFS root inode in cluster 0\n", 1102 __FUNCTION__ ); 1151 { 1152 printk("\n[PANIC] in %s : cannot create VFS root inode in cluster 0\n", 1153 __FUNCTION__ ); 1154 hal_core_sleep(); 1155 } 1103 1156 1104 1157 // 6. update the FATFS entry in vfs_context[] array … … 1109 1162 1110 1163 if( ((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster != 8 ) 1111 printk("\n[PANIC] in %s : illegal FATFS context in cluster 0\n", 1112 __FUNCTION__ ); 1164 { 1165 printk("\n[PANIC] in %s : illegal FATFS context in cluster 0\n", 1166 __FUNCTION__ ); 1167 hal_core_sleep(); 1168 } 1169 1113 1170 } 1114 1171 else … … 1116 1173 printk("\n[PANIC] in %s : unsupported VFS type in cluster 0\n", 1117 1174 __FUNCTION__ ); 1175 hal_core_sleep(); 1118 1176 } 1119 1177 … … 1153 1211 // check memory 1154 1212 if( local_fatfs_ctx == NULL ) 1155 printk("\n[PANIC] in %s : cannot create FATFS context in cluster %x\n", 1156 __FUNCTION__ , local_cxy ); 1213 { 1214 printk("\n[PANIC] in %s : cannot create FATFS context in cluster %x\n", 1215 __FUNCTION__ , local_cxy ); 1216 hal_core_sleep(); 1217 } 1157 1218 1158 1219 // 2. get local pointer on VFS context for FATFS … … 1174 1235 1175 1236 if( ((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster != 8 ) 1176 printk("\n[PANIC] in %s : illegal FATFS context in cluster %x\n", 1177 __FUNCTION__ , local_cxy ); 1237 { 1238 printk("\n[PANIC] in %s : illegal FATFS context in cluster %x\n", 1239 __FUNCTION__ , local_cxy ); 1240 hal_core_sleep(); 1241 } 1178 1242 } 1179 1243 … … 1210 1274 1211 1275 if( devfs_ctx == NULL ) 1212 printk("\n[PANIC] in %s : cannot create DEVFS context in cluster 0\n", 1213 __FUNCTION__ , local_cxy ); 1276 { 1277 printk("\n[PANIC] in %s : cannot create DEVFS context in cluster 0\n", 1278 __FUNCTION__ , local_cxy ); 1279 hal_core_sleep(); 1280 } 1214 1281 1215 1282 // 2. initialize the DEVFS entry in the vfs_context[] array
Note: See TracChangeset
for help on using the changeset viewer.