Ignore:
Timestamp:
Jun 26, 2019, 11:42:37 AM (5 years ago)
Author:
alain
Message:

This version is a major evolution: The physical memory allocators,
defined in the kmem.c, ppm.c, and kcm.c files have been modified
to support remote accesses. The RPCs that were previously user
to allocate physical memory in a remote cluster have been removed.
This has been done to cure a dead-lock in case of concurrent page-faults.

This version 2.2 has been tested on a (4 clusters / 2 cores per cluster)
TSAR architecture, for both the "sort" and the "fft" applications.

Location:
trunk/hal/tsar_mips32/drivers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_nic.c

    r570 r635  
    22 * soclib_nic.c - SOCLIB_NIC (Network Interface Controler) driver implementation.
    33 *
    4  * Author     Alain Greiner (2016)
     4 * Author     Alain Greiner (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    5555            "chbuf descriptor exceeds one page" );
    5656
    57     req.type   = KMEM_PAGE;
    58     req.size   = 0;
     57    req.type   = KMEM_PPM;
     58    req.order  = 0;
    5959    req.flags  = AF_KERNEL;
    6060
    61     nic_chbuf_t * chbuf = (nic_chbuf_t *)kmem_alloc( &req );
    62 
    63     assert( (chbuf != NULL) ,
    64              "cannot allocate chbuf descriptor" );
     61    nic_chbuf_t * chbuf = kmem_alloc( &req );
     62
     63    if( chbuf == NULL )
     64    {
     65        printk("\n[PANIC] in %s : cannot allocate chbuf descriptor\n",
     66        __FUNCTION__ );
     67    }
    6568
    6669    // initialise chbuf state
     
    7679    for( i = 0 ; i < CONFIG_NIC_CHBUF_DEPTH ; i++ )
    7780    {
    78         uint32_t * container = (uint32_t *)kmem_alloc( &req );   
     81        uint32_t * container = kmem_alloc( &req );   
    7982
    8083        assert( (container != NULL) ,
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r629 r635  
    22 * soclib_pic.c - soclib PIC driver implementation.
    33 *
    4  * Author  Alain Greiner (2016,2017)
     4 * Author  Alain Greiner (2016,2017,2018,2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    2727#include <errno.h>
    2828#include <string.h>
     29#include <bits.h>
    2930#include <vfs.h>
    3031#include <rpc.h>
     
    287288    {
    288289        // allocate memory for core extension
    289         req.type     = KMEM_GENERIC;
    290         req.size     = sizeof(soclib_pic_core_t);
     290        req.type     = KMEM_KCM;
     291        req.order    = bits_log2( sizeof(soclib_pic_core_t) );
    291292        req.flags    = AF_KERNEL;
    292293        core_ext_ptr = kmem_alloc( &req );
    293294
    294         assert( (core_ext_ptr != NULL) ,
    295                 "cannot allocate memory for core extension\n");
     295        if( core_ext_ptr == NULL )
     296        {
     297            printk("\n[PANIC] in %s : cannot allocate memory for core extension\n",
     298            __FUNCTION__ );
     299        }
    296300   
    297301        // reset the HWI / WTI  interrupt vectors
     
    304308
    305309    // allocate memory for cluster extension
    306     req.type        = KMEM_GENERIC;
    307     req.size        = sizeof(soclib_pic_cluster_t);
     310    req.type        = KMEM_KCM;
     311    req.order       = bits_log2( sizeof(soclib_pic_cluster_t) );
    308312    req.flags       = AF_KERNEL;
    309313    cluster_ext_ptr = kmem_alloc( &req );
    310314
    311     assert( (cluster_ext_ptr != NULL) ,
    312             "cannot allocate memory for cluster extension\n");
     315    if( cluster_ext_ptr == NULL )
     316    {
     317        printk("\n[PANIC] in %s : cannot allocate memory for cluster extension\n",
     318        __FUNCTION__ );
     319    }
     320   
     321assert( (cluster_ext_ptr != NULL) , "cannot allocate memory for cluster extension");
    313322
    314323    // get XCU characteristics from the XCU config register
Note: See TracChangeset for help on using the changeset viewer.