Changeset 205


Ignore:
Timestamp:
Aug 15, 2012, 10:22:29 AM (12 years ago)
Author:
karaoui
Message:

adding the possibilité of having 0 DMA.

Location:
soft/giet_vm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/boot/boot_init.c

    r204 r205  
    13451345#if BOOT_DEBUG_PERI
    13461346boot_puts("[BOOT] mwmr coproc initialisation of ");
    1347 boot_putx((unsigned int) coproc[coproc_id].name);
     1347boot_puts((unsigned int) coproc[coproc_id].name);
    13481348boot_puts(", nb ports");
    13491349boot_putd((unsigned int)coproc[coproc_id].ports);
     
    13551355                  cp_port_id++ )
    13561356            {
    1357                 //FIXME: should the same for all ports: put it in the coproc
     1357                //FIXME: the vspace_id should be the same for all ports: put it in the coproc?
    13581358                unsigned int vspace_id  = cp_port[cp_port_id].vspaceid;
    13591359                unsigned int vobj_id    = cp_port[cp_port_id].vobjlocid + vspace[vspace_id].vobj_offset;
  • soft/giet_vm/sys/drivers.c

    r204 r205  
    7272
    7373#if !defined(NB_DMAS_MAX)
    74 # error: You must define NB_DMAS_MAX in 'giet_config.h' file
    75 #endif
    76 
    77 #if (NB_DMAS_MAX < 1)
    78 # error: NB_DMAS_MAX cannot be 0!
     74#define NB_DMAS_MAX 0
    7975#endif
    8076
    8177#if !defined(NB_TIMERS_MAX)
    82 # error: You must define NB_TIMERS_MAX in 'giet_config.h' file
     78#define NB_TIMERS_MAX 0
    8379#endif
    8480
     
    718714//////////////////////////////////////////////////////////////////////////////////
    719715
    720 #if  (NB_DMAS_MAX > 0)
    721 in_unckdata unsigned int                        _dma_lock[NB_DMAS_MAX * NB_CLUSTERS]
    722                                        = { [0 ... (NB_DMAS_MAX * NB_CLUSTERS)-1] = 0 };
    723 
    724 in_unckdata volatile unsigned int       _dma_done[NB_DMAS_MAX * NB_CLUSTERS]
    725                                        = { [0 ... (NB_DMAS_MAX * NB_CLUSTERS)-1] = 0 };
    726 
    727 in_unckdata volatile unsigned int       _dma_status[NB_DMAS_MAX * NB_CLUSTERS];
     716//+1: for the case where the NB_DMAS_MAX == 0
     717in_unckdata unsigned int                        _dma_lock[(NB_DMAS_MAX+1) * NB_CLUSTERS]
     718                                       = { [0 ... ((NB_DMAS_MAX+1) * NB_CLUSTERS)-1] = 0 };
     719
     720in_unckdata volatile unsigned int       _dma_done[(NB_DMAS_MAX+1) * NB_CLUSTERS]
     721                                       = { [0 ... ((NB_DMAS_MAX+1) * NB_CLUSTERS)-1] = 0 };
     722
     723in_unckdata volatile unsigned int       _dma_status[(NB_DMAS_MAX+1) * NB_CLUSTERS];
    728724
    729725in_unckdata unsigned int                        _dma_iommu_ix1 = 1;
    730726
    731 in_unckdata unsigned int            _dma_iommu_npages[NB_DMAS_MAX * NB_CLUSTERS];
    732 #endif
     727in_unckdata unsigned int            _dma_iommu_npages[(NB_DMAS_MAX+1) * NB_CLUSTERS];
    733728
    734729//////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.