Changeset 492 for trunk/kernel/kern/kernel_init.c
- Timestamp:
- Aug 22, 2018, 11:55:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r490 r492 231 231 if (func == DEV_FUNC_TXT ) 232 232 { 233 assert( (channels > 0) , __FUNCTION__ ,"number of TXT channels cannot be 0\n");233 assert( (channels > 0) , "number of TXT channels cannot be 0\n"); 234 234 235 235 // initializes TXT_TX[0] chdev … … 298 298 if( func == DEV_FUNC_MMC ) 299 299 { 300 assert( (channels == 1) , __FUNCTION__ , 301 "MMC device must be single channel\n" ); 300 assert( (channels == 1) , "MMC device must be single channel\n" ); 302 301 303 302 // create chdev in local cluster … … 308 307 base ); 309 308 310 assert( (chdev_ptr != NULL) , __FUNCTION__ ,309 assert( (chdev_ptr != NULL) , 311 310 "cannot allocate memory for MMC chdev\n" ); 312 311 … … 344 343 base ); 345 344 346 assert( (chdev_ptr != NULL) , __FUNCTION__ , 347 "cannot allocate memory for DMA chdev" ); 345 assert( (chdev_ptr != NULL) , "cannot allocate memory for DMA chdev" ); 348 346 349 347 // make DMA specific initialisation … … 420 418 421 419 // check PIC device initialized 422 assert( (chdev_dir.pic != XPTR_NULL ) , __FUNCTION__ ,420 assert( (chdev_dir.pic != XPTR_NULL ) , 423 421 "PIC device must be initialized before other devices\n" ); 424 422 … … 428 426 (func == DEV_FUNC_TXT) || 429 427 (func == DEV_FUNC_NIC) || 430 (func == DEV_FUNC_FBF) ) , __FUNCTION__ ,428 (func == DEV_FUNC_FBF) ) , 431 429 "undefined external peripheral type\n" ); 432 430 … … 456 454 base ); 457 455 458 assert( (chdev != NULL), __FUNCTION__ ,456 assert( (chdev != NULL), 459 457 "cannot allocate external device" ); 460 458 … … 544 542 } 545 543 546 assert( found , __FUNCTION__ ,"PIC device not found\n" );544 assert( found , "PIC device not found\n" ); 547 545 548 546 // allocate and initialize the PIC chdev in cluster 0 … … 553 551 base ); 554 552 555 assert( (chdev != NULL), __FUNCTION__ ,"no memory for PIC chdev\n" );553 assert( (chdev != NULL), "no memory for PIC chdev\n" ); 556 554 557 555 // make PIC device type specific initialisation … … 607 605 else if((func == DEV_FUNC_TXT) && (is_rx == 0)) ptr = &iopic_input.txt_tx[channel]; 608 606 else if((func == DEV_FUNC_TXT) && (is_rx != 0)) ptr = &iopic_input.txt_rx[channel]; 609 else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel]; 610 else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 611 else if( func == DEV_FUNC_IOB ) ptr = &iopic_input.iob; 612 else assert( false , __FUNCTION__ ,"illegal source device for IOPIC input" );607 else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel]; 608 else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 609 else if( func == DEV_FUNC_IOB ) ptr = &iopic_input.iob; 610 else assert( false , "illegal source device for IOPIC input" ); 613 611 614 612 // set one entry in all "iopic_input" structures … … 697 695 if ( func == DEV_FUNC_MMC ) lapic_input.mmc = id; 698 696 else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id; 699 else assert( false , __FUNCTION__ ,"illegal source device for LAPIC input" );697 else assert( false , "illegal source device for LAPIC input" ); 700 698 } 701 699 } … … 818 816 if( error ) 819 817 { 820 assert( false , __FUNCTION__ ,818 assert( false , 821 819 "illegal core identifiers gid = %x / cxy = %x / lid = %d", 822 820 core_lid , core_cxy , core_lid ); … … 830 828 if( error ) 831 829 { 832 assert( false , __FUNCTION__ ,830 assert( false , 833 831 "cannot initialise cluster %x", local_cxy ); 834 832 } … … 950 948 fatfs_ctx_t * fatfs_ctx = fatfs_ctx_alloc(); 951 949 952 assert( (fatfs_ctx != NULL) , __FUNCTION__ ,950 assert( (fatfs_ctx != NULL) , 953 951 "cannot create FATFS context in cluster 0\n" ); 954 952 … … 973 971 &vfs_root_inode_xp ); // return 974 972 975 assert( (error == 0) , __FUNCTION__ ,973 assert( (error == 0) , 976 974 "cannot create VFS root inode\n" ); 977 975 … … 987 985 vfs_ctx_t * vfs_ctx = &fs_context[FS_TYPE_FATFS]; 988 986 assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8), 989 __FUNCTION__ ,"illegal value for FATFS context in cluster %x\n", local_cxy );987 "illegal value for FATFS context in cluster %x\n", local_cxy ); 990 988 } 991 989 else 992 990 { 993 assert( false , __FUNCTION__ ,991 assert( false , 994 992 "root FS must be FATFS" ); 995 993 } … … 1028 1026 fatfs_ctx_t * local_fatfs_ctx = fatfs_ctx_alloc(); 1029 1027 1030 assert( (local_fatfs_ctx != NULL) , __FUNCTION__ ,1028 assert( (local_fatfs_ctx != NULL) , 1031 1029 "cannot create FATFS context in cluster %x\n", local_cxy ); 1032 1030 … … 1050 1048 // 7. check initialisation 1051 1049 assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8), 1052 __FUNCTION__ ,"illegal value for FATFS context in cluster %x\n", local_cxy );1050 "illegal value for FATFS context in cluster %x\n", local_cxy ); 1053 1051 } 1054 1052 … … 1089 1087 devfs_ctx_t * devfs_ctx = devfs_ctx_alloc(); 1090 1088 1091 assert( (devfs_ctx != NULL) , __FUNCTION__ ,1089 assert( (devfs_ctx != NULL) , 1092 1090 "cannot create DEVFS context in cluster IO\n"); 1093 1091
Note: See TracChangeset
for help on using the changeset viewer.