Ignore:
Timestamp:
Jun 29, 2017, 4:44:52 PM (7 years ago)
Author:
alain
Message:

euh...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/kernel_init.c

    r77 r101  
    5656#include <devfs.h>
    5757#include <mapper.h>
    58 
     58#include <soclib_tty.h>
    5959
    6060#define KERNEL_INIT_SYNCHRO  0xA5A5B5B5
     
    189189            remote_spinlock_init( XPTR( local_cxy , &txt0_chdev.wait_lock ) );
    190190
    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            }
    193200
    194201            // initialize the replicated chdev_dir[x][y] structures
     
    206213                       " / paddr = %l at cycle %d\n",
    207214                       __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() );
    209216        }
    210217
     
    295302
    296303    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() );
    298305
    299306    /////////// MMC internal chdev /////////// 
     
    337344
    338345        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() );
    340347    }
    341348
     
    372379
    373380            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() );
    375382        }
    376383    }
     
    530537                            kinit_dmsg("\n[INFO] %s : core[%x][0] create chdev %s[%d] at cycle %d\n",
    531538                               __FUNCTION__ , local_cxy , chdev_func_str( func ),
    532                                channel , hal_time_stamp() );
     539                               channel , hal_get_cycles() );
    533540
    534541                }  // end if match
     
    677684
    678685    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() );
    680687
    681688    // all cores check core identifiers
     
    709716
    710717    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() );
    712719
    713720    // all cores get pointer on local cluster manager and on core descriptor
     
    716723
    717724    // 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 );
    719726
    720727    // CP0 allocates and initialises the internal peripheral chdev descriptors.
     
    727734    // external devices initialisation to enforce the rule :
    728735    // "The WTI index for the IPI routed to core[lid] is lid"
    729     if( core_lid == 0 )
     736    if( core_lid == 1 )
    730737    {
    731738        uint32_t  wti_id;
     
    760767
    761768    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() );
    763770
    764771
     
    783790
    784791        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());
    786793    }
    787794
     
    809816        }
    810817
     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
    811822        // mount the DEVFS File system
    812823            devfs_mount( root_inode_xp , "dev" );
    813824    }
    814825
    815     // CP0 in I/O cluster print banner
     826
     827    // CP0 in I/O cluster creates the process_init and print banner
    816828    if( (core_lid ==  0) && (local_cxy == info->io_cxy) )
    817829    {
     830        process_init_create();
     831
    818832        print_banner( (info->x_size * info->y_size) , info->cores_nr );
    819833
     
    869883
    870884    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() );
    872886
    873887    // each core activates its private PTI IRQ
     
    875889    dev_icu_enable_irq( core_lid , PTI_TYPE , core_lid , NULL );
    876890
    877     // each core get its private IRQ masks values and
     891    // each core get its private IRQ masks values
    878892    uint32_t hwi_mask;
    879893    uint32_t wti_mask;
     
    883897    thread_dmsg("\n[INFO] %s : core[%x][%d] activates scheduler at cycle %d\n"
    884898                "   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() ,
    886900                    hwi_mask , wti_mask , pti_mask );
    887901
Note: See TracChangeset for help on using the changeset viewer.