Ignore:
Timestamp:
Jun 26, 2017, 3:15:11 PM (7 years ago)
Author:
alain
Message:

bloup

File:
1 edited

Legend:

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

    r23 r50  
    2828#include <hal_atomic.h>
    2929#include <hal_special.h>
     30#include <hal_ppm.h>
    3031#include <printk.h>
    3132#include <errno.h>
     
    4344#include <dqdt.h>
    4445
    45 // TODO #include <sysfs.h>
    46 
    4746///////////////////////////////////////////////////////////////////////////////////////////
    4847// Extern global variables
     
    6261error_t cluster_init( struct boot_info_s * info )
    6362{
     63    error_t     error;
    6464    lpid_t      lpid;     // local process_index
    6565    lid_t       lid;      // local core index
     
    8282        spinlock_init( &cluster->kcm_lock );
    8383
     84    cluster_dmsg("\n[INFO] %s for cluster %x enters\n",
     85                 __FUNCTION__ , local_cxy );
     86
    8487    // initialises DQDT
    8588    cluster->dqdt_root_level = dqdt_init( info->x_size,
     
    9093
    9194    // initialises embedded PPM
    92         ppm_init( &cluster->ppm,
    93               info->pages_nr,
    94               info->pages_offset );
     95        error = hal_ppm_init( info );
     96
     97    if( error )
     98    {
     99        printk("\n[ERROR] in %s : cannot initialize PPM in cluster %x\n",
     100               __FUNCTION__ , local_cxy );
     101        return ENOMEM;
     102    }
     103
     104    cluster_dmsg("\n[INFO] %s : PPM initialized in cluster %x at cycle %d\n",
     105                 __FUNCTION__ , local_cxy , hal_time_stamp() );
    95106
    96107    // initialises embedded KHM
    97108        khm_init( &cluster->khm );
    98109
     110    cluster_dmsg("\n[INFO] %s : KHM initialized in cluster %x at cycle %d\n",
     111                 __FUNCTION__ , local_cxy , hal_time_stamp() );
     112
    99113    // initialises embedded KCM
    100114        kcm_init( &cluster->kcm , KMEM_KCM );
     115
     116    cluster_dmsg("\n[INFO] %s : KCM initialized in cluster %x at cycle %d\n",
     117                 __FUNCTION__ , local_cxy , hal_time_stamp() );
    101118
    102119    // initialises all cores descriptors
     
    108125        }
    109126
     127    cluster_dmsg("\n[INFO] %s : cores initialized in cluster %x at cycle %d\n",
     128                 __FUNCTION__ , local_cxy , hal_time_stamp() );
     129
    110130    // initialises RPC fifo
    111131        rpc_fifo_init( &cluster->rpc_fifo );
     132
     133    cluster_dmsg("\n[INFO] %s : RPC fifo inialized in cluster %x at cycle %d\n",
     134                 __FUNCTION__ , local_cxy , hal_time_stamp() );
    112135
    113136    // initialise pref_tbl[] in process manager
     
    132155        xlist_root_init( XPTR( local_cxy , &cluster->pmgr.copies_root[lpid] ) );
    133156    }
     157
     158    cluster_dmsg("\n[INFO] %s Process Manager initialized in cluster %x at cycle %d\n",
     159                 __FUNCTION__ , local_cxy , hal_time_stamp() );
    134160
    135161    hal_wbflush();
Note: See TracChangeset for help on using the changeset viewer.