Ignore:
Timestamp:
Nov 3, 2014, 10:53:00 AM (10 years ago)
Author:
alain
Message:

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/mmc_driver.c

    r426 r437  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
    7 // The mmc_driver.c and mmc_driver.h files are part ot the GIET-VM nano-kernel.
    8 // This driver supports the vci_mem_cache component used in the TSAR architecture.
    9 //
    10 // This component is replicated in all clusters, and can be accessed through
    11 // a configuration interface as a set of uncached, memory mapped registers.
    12 //
    13 // The (virtual) base address of the associated segment is:
    14 //       SEG_MMC_BASE + cluster_id * PERI_CLUSTER_INCREMENT
    15 //
    16 // SEG_MMC_BASE and PERI_CLUSTER_INCREMENT must be defined in hard_config.h.
    17 ////////////////////////////////////////////////////////////////////////////////
    187
    198#include <giet_config.h>
     
    8271}
    8372
    84 ///////////////////////////////////////////////////////////////////////////////////
    85 // This function invalidates all cache lines covering a memory buffer defined
    86 // by the physical base address, and the length.
    87 // The buffer address MSB are used to compute the cluster index.
    88 ///////////////////////////////////////////////////////////////////////////////////
     73/////////////////////////////////////////
    8974void _mmc_inval( paddr_t      buf_paddr,
    9075                 unsigned int buf_length )
     
    9883    if ( (x >= X_SIZE) || (y >= Y_SIZE) )
    9984    {
    100         _printf("\n[GIET ERROR] in _memc_inval() : illegal cluster_xy for paddr %l\n",
    101                  buf_paddr );
     85        _puts("\n[GIET ERROR] in _memc_inval() : illegal cluster coordinates\n");
    10286        _exit();
    10387    }
     
    11599    _mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0);
    116100}
    117 ///////////////////////////////////////////////////////////////////////////////////
    118 // This function copies to external RAM all cache lines covering a memory buffer
    119 // defined by the physical base address, and the length, if they are dirty.
    120 // The buffer address MSB are used to compute the cluster index.
    121 ///////////////////////////////////////////////////////////////////////////////////
     101
     102///////////////////////////////////////
    122103void _mmc_sync( paddr_t      buf_paddr,
    123104                unsigned int buf_length )
     
    131112    if ( (x >= X_SIZE) || (y >= Y_SIZE) )
    132113    {
    133         _printf( "\n[GIET ERROR] in _memc_sync() : illegal cluster_xy for paddr %l\n",
    134                  buf_paddr );
     114        _puts( "\n[GIET ERROR] in _memc_sync() : illegal cluster coordinates");
    135115        _exit();
    136116    }
     
    149129}
    150130
    151 //////////////////////////////////////////////////////////////////////////////////
    152 // This ISR access the vci_mem_cache component to get the faulty physical
    153 // address and the associated SRCID. It must also acknowledge the IRQ.
    154 //
    155 // TODO implement...
    156 //////////////////////////////////////////////////////////////////////////////////
     131///////////////////////////////////////////////////////
    157132void _mmc_isr( unsigned int irq_type,  // should be HWI
    158133               unsigned int irq_id,    // index returned by ICU
     
    163138    unsigned int x          = cluster_xy >> Y_WIDTH;
    164139    unsigned int y          = cluster_xy & ((1<<Y_WIDTH)-1);
    165     unsigned int lpid       = gpid & ((1<<P_WIDTH)-1);
     140    unsigned int p          = gpid & ((1<<P_WIDTH)-1);
    166141
    167     _printf("[GIET ERROR] MMC IRQ received by processor[%d,%d,%d]"
    168             " but _mmc_isr() not implemented...\n", x, y, lpid );
     142    _puts("[GIET ERROR] MMC IRQ received by processor[");
     143    _putd( x );
     144    _puts(",");
     145    _putd( y );
     146    _puts(",");
     147    _putd( p );
     148    _puts("] but _mmc_isr() not implemented\n");
    169149}
    170150
Note: See TracChangeset for help on using the changeset viewer.