Changeset 101 for trunk/kernel/kern/kernel_init.c
- Timestamp:
- Jun 29, 2017, 4:44:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r77 r101 56 56 #include <devfs.h> 57 57 #include <mapper.h> 58 58 #include <soclib_tty.h> 59 59 60 60 #define KERNEL_INIT_SYNCHRO 0xA5A5B5B5 … … 189 189 remote_spinlock_init( XPTR( local_cxy , &txt0_chdev.wait_lock ) ); 190 190 191 // complete TXT-specific initialization 192 hal_drivers_txt_init( &txt0_chdev ); 191 // TODO use generic device initialisation 192 // hal_drivers_txt_init( &txt0_chdev ); 193 194 if( impl == IMPL_TXT_TTY ) 195 { 196 txt0_chdev.cmd = &soclib_tty_cmd; 197 txt0_chdev.isr = &soclib_tty_isr; 198 soclib_tty_init( &txt0_chdev ); 199 } 193 200 194 201 // initialize the replicated chdev_dir[x][y] structures … … 206 213 " / paddr = %l at cycle %d\n", 207 214 __FUNCTION__ , local_cxy , chdev_func_str( func ), 208 XPTR(local_cxy , &txt0_chdev) , hal_ time_stamp() );215 XPTR(local_cxy , &txt0_chdev) , hal_get_cycles() ); 209 216 } 210 217 … … 295 302 296 303 kinit_dmsg("\n[INFO] %s : core[%x][0] created ICU chdev at cycle %d\n", 297 __FUNCTION__ , local_cxy , hal_ time_stamp() );304 __FUNCTION__ , local_cxy , hal_get_cycles() ); 298 305 299 306 /////////// MMC internal chdev /////////// … … 337 344 338 345 kinit_dmsg("\n[INFO] %s : core[%x][0] created MMC chdev at cycle %d\n", 339 __FUNCTION__ , local_cxy , hal_ time_stamp() );346 __FUNCTION__ , local_cxy , hal_get_cycles() ); 340 347 } 341 348 … … 372 379 373 380 kinit_dmsg("\n[INFO] %s : core[%x][0] created DMA[%d] chdev at cycle %d\n", 374 __FUNCTION__ , local_cxy , channel , hal_ time_stamp() );381 __FUNCTION__ , local_cxy , channel , hal_get_cycles() ); 375 382 } 376 383 } … … 530 537 kinit_dmsg("\n[INFO] %s : core[%x][0] create chdev %s[%d] at cycle %d\n", 531 538 __FUNCTION__ , local_cxy , chdev_func_str( func ), 532 channel , hal_ time_stamp() );539 channel , hal_get_cycles() ); 533 540 534 541 } // end if match … … 677 684 678 685 kinit_dmsg("\n[INFO] %s : core[%x][%d] exit barrier 0 at cycle %d\n", 679 __FUNCTION__ , core_cxy , core_lid , hal_ time_stamp() );686 __FUNCTION__ , core_cxy , core_lid , hal_get_cycles() ); 680 687 681 688 // all cores check core identifiers … … 709 716 710 717 kinit_dmsg("\n[INFO] %s : core[%x][%d] exit barrier 1 at cycle %d\n", 711 __FUNCTION__ , core_cxy , core_lid , hal_ time_stamp() );718 __FUNCTION__ , core_cxy , core_lid , hal_get_cycles() ); 712 719 713 720 // all cores get pointer on local cluster manager and on core descriptor … … 716 723 717 724 // CP0 initializes the process_zero descriptor 718 if( core_lid == 0 ) process_ zero_init( info);725 if( core_lid == 0 ) process_reference_init( &process_zero , 0 , XPTR_NULL ); 719 726 720 727 // CP0 allocates and initialises the internal peripheral chdev descriptors. … … 727 734 // external devices initialisation to enforce the rule : 728 735 // "The WTI index for the IPI routed to core[lid] is lid" 729 if( core_lid == 0)736 if( core_lid == 1 ) 730 737 { 731 738 uint32_t wti_id; … … 760 767 761 768 kinit_dmsg("\n[INFO] %s : core[%x][%d] exit barrier 2 at cycle %d\n", 762 __FUNCTION__ , core_cxy , core_lid , hal_ time_stamp() );769 __FUNCTION__ , core_cxy , core_lid , hal_get_cycles() ); 763 770 764 771 … … 783 790 784 791 kinit_dmsg("\n[INFO] %s : core[%x][%d] created idle thread %x at cycle %d\n", 785 __FUNCTION__ , core_cxy , core_lid , thread , hal_ time_stamp());792 __FUNCTION__ , core_cxy , core_lid , thread , hal_get_cycles()); 786 793 } 787 794 … … 809 816 } 810 817 818 // register VFS root inode in process_zero 819 process_zero.vfs_root_xp = root_inode_xp; 820 process_zero.vfs_cwd_xp = root_inode_xp; 821 811 822 // mount the DEVFS File system 812 823 devfs_mount( root_inode_xp , "dev" ); 813 824 } 814 825 815 // CP0 in I/O cluster print banner 826 827 // CP0 in I/O cluster creates the process_init and print banner 816 828 if( (core_lid == 0) && (local_cxy == info->io_cxy) ) 817 829 { 830 process_init_create(); 831 818 832 print_banner( (info->x_size * info->y_size) , info->cores_nr ); 819 833 … … 869 883 870 884 kinit_dmsg("\n[INFO] %s : core[%x][%d] exit barrier 3 at cycle %d\n", 871 __FUNCTION__ , core_cxy , core_lid , hal_ time_stamp() );885 __FUNCTION__ , core_cxy , core_lid , hal_get_cycles() ); 872 886 873 887 // each core activates its private PTI IRQ … … 875 889 dev_icu_enable_irq( core_lid , PTI_TYPE , core_lid , NULL ); 876 890 877 // each core get its private IRQ masks values and891 // each core get its private IRQ masks values 878 892 uint32_t hwi_mask; 879 893 uint32_t wti_mask; … … 883 897 thread_dmsg("\n[INFO] %s : core[%x][%d] activates scheduler at cycle %d\n" 884 898 " hwi_mask = %x / wti_mask = %x / pti_mask = %x\n", 885 __FUNCTION__ , local_cxy , core_lid , hal_ time_stamp() ,899 __FUNCTION__ , local_cxy , core_lid , hal_get_cycles() , 886 900 hwi_mask , wti_mask , pti_mask ); 887 901
Note: See TracChangeset
for help on using the changeset viewer.