Changeset 289 for soft


Ignore:
Timestamp:
Feb 4, 2014, 2:16:37 AM (10 years ago)
Author:
cfuguet
Message:

Modifications on GIET-VM IOC driver:

  • Introducing new layer on the IOC driver. Every call to ioc_read, ioc_write, ioc_get_block_size or ioc_init

functions will call the specific driver of the used IOC
controller. Supported IOC controllers are (for now) :

  1. BDV (Soclib Block Device)
  2. HBA
  3. SPI (SDCARD - SPI controller)
  • All functions of IOC controllers drivers respect the same interface.
  • To specify the used IOC controller of the platform, a subtype field has been introduced on the map.xml file. This subtype field must be declared on the IOC periph instantiation. Available subtypes (for now) : BDV, HBA or SPI.
Location:
soft/giet_vm
Files:
18 edited
7 copied

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/Makefile

    r272 r289  
    1414
    1515### Objects to be linked for kernel.elf
    16 KERNEL_OBJS  = build/common/utils.o        \
    17                build/common/vmem.o          \
     16KERNEL_OBJS  = build/common/utils.o       \
     17               build/common/vmem.o        \
    1818               build/fat32/fat32.o        \
    1919               build/drivers/dma_driver.o \
     
    2222               build/drivers/icu_driver.o \
    2323               build/drivers/ioc_driver.o \
     24               build/drivers/bdv_driver.o \
     25               build/drivers/hba_driver.o \
     26               build/drivers/sdc_driver.o \
     27               build/drivers/spi_driver.o \
    2428               build/drivers/iob_driver.o \
    2529               build/drivers/mmc_driver.o \
     
    3741
    3842### Objects to be linked for boot.elf
    39 BOOT_OBJS    = build/common/utils.o        \
    40                build/common/vmem.o          \
     43BOOT_OBJS    = build/common/utils.o       \
     44               build/common/vmem.o        \
    4145               build/fat32/fat32.o        \
    4246               build/drivers/tty_driver.o \
     
    4549               build/drivers/mwr_driver.o \
    4650               build/drivers/ioc_driver.o \
     51               build/drivers/bdv_driver.o \
     52               build/drivers/hba_driver.o \
     53               build/drivers/sdc_driver.o \
     54               build/drivers/spi_driver.o \
    4755               build/drivers/nic_driver.o \
    4856               build/drivers/mmc_driver.o \
     
    9098
    9199CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32
     100
    92101
    93102GIET_INCLUDE = -Igiet_boot    \
     
    183192        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
    184193
     194build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c  \
     195                            giet_drivers/bdv_driver.h  \
     196                            giet_config.h              \
     197                            $(MAP_XML)
     198        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
     199
     200build/drivers/hba_driver.o: giet_drivers/hba_driver.c  \
     201                            giet_drivers/hba_driver.h  \
     202                            giet_config.h              \
     203                            $(MAP_XML)
     204        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
     205
     206build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c  \
     207                            giet_drivers/sdc_driver.h  \
     208                            giet_config.h              \
     209                            $(MAP_XML)
     210        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
     211
     212build/drivers/spi_driver.o: giet_drivers/spi_driver.c  \
     213                            giet_drivers/spi_driver.h  \
     214                            giet_config.h              \
     215                            $(MAP_XML)
     216        $(CC) $(GIET_INCLUDE) $(CFLAGS)  -c -o $@ $<
     217
    185218build/drivers/iob_driver.o: giet_drivers/iob_driver.c  \
    186219                            giet_drivers/iob_driver.h  \
     
    248281                   giet_common/utils.h       \
    249282                   giet_fat32/fat32.h        \
    250                    giet_common/vmem.h          \
     283                   giet_common/vmem.h        \
    251284                   giet_drivers/tty_driver.h \
    252285                   giet_drivers/ioc_driver.h \
  • soft/giet_vm/giet_boot/boot.c

    r276 r289  
    11691169    unsigned int alloc_tim_channel[X_SIZE*Y_SIZE]; // user TIMER allocators
    11701170
    1171     if (!GIET_MONO_TTY) alloc_tty_channel++;
     1171    if (NB_TTY_CHANNELS > 1) alloc_tty_channel++;
    11721172
    11731173    /////////////////////////////////////////////////////////////////////////
     
    13721372                }
    13731373                ctx_tty = alloc_tty_channel;
    1374                 if (!GIET_MONO_TTY) alloc_tty_channel++;
     1374                if (NB_TTY_CHANNELS > 1) alloc_tty_channel++;
    13751375            }
    13761376            // ctx_nic : NIC channel global index provided by the global allocator
     
    15611561void boot_mapping_init()
    15621562{
    1563     // Initializing the FAT descriptor and files descriptor array
    1564     if ( _fat_init( IOC_BOOT_PA_MODE ) )   
    1565     {
    1566         _puts("[BOOT ERROR] Cannot initialize FAT descriptor fom Boot Sector\n");
    1567         _exit();
    1568     }
    1569 
    1570 #if BOOT_DEBUG_MAPPING
    1571 _puts("\n[BOOT] FAT initialisation completed at cycle ");
    1572 _putd(_get_proctime());
    1573 _puts("\n");
    1574 _fat_print();
    1575 #endif
     1563    _ioc_init( 0 );
    15761564
    15771565    int fd_id = _fat_open( IOC_BOOT_PA_MODE,
     
    17461734            {
    17471735                unsigned int i;
    1748                 for( i = seg_filesz ; i < seg_memsz; i++ ) boot_buffer[i] = 0;
     1736                for( i = seg_filesz ; i < seg_memsz ; i++ ) boot_buffer[i+seg_offset] = 0;
    17491737            }
    17501738
     
    19271915                case PERIPH_TYPE_IOC:    // vci_block_device component
    19281916                {
    1929                     _ioc_init();
     1917                    // initialize all channels except channel 0 because it has been
     1918                    // initialize during mapping_info loading
     1919                    for (channel_id = 1; channel_id < channels; channel_id++)
     1920                    {
     1921                        _ioc_init( channel_id );
     1922                    }
    19301923#if BOOT_DEBUG_PERI
    19311924_puts("- IOC / channels = ");
     
    19531946#if BOOT_DEBUG_PERI
    19541947_puts("- FBF / channels = ");
    1955 _putd(channels);
    1956 _puts("\n");
    1957 #endif
    1958                     break;
    1959                 }
    1960                 case PERIPH_TYPE_HBA:    // vci_multi_ahci component
    1961                 {
    1962                     for (channel_id = 0; channel_id < channels; channel_id++)
    1963                     {
    1964                         // TODO
    1965                     }
    1966 #if BOOT_DEBUG_PERI
    1967 _puts("- HBA / channels = ");
    19681948_putd(channels);
    19691949_puts("\n");
  • soft/giet_vm/giet_common/io.h

    r288 r289  
    1 /**
    2  * \file        io.h
    3  * \date        5 September 2012
    4  * \author      Cesar Fuguet
    5  *
    6  * Utility functions to write or read memory mapped hardware registers
    7  */
     1///////////////////////////////////////////////////////////////////////////////////
     2// File     : io.h
     3// Date     : 05/09/2012
     4// Author   : cesar fuguet
     5// Copyright (c) UPMC-LIP6
     6///////////////////////////////////////////////////////////////////////////////////
     7// Utility functions to write or read memory mapped hardware registers
     8///////////////////////////////////////////////////////////////////////////////////
    89#ifndef IO_H
    910#define IO_H
    1011
    11 /**
    12  * Read an 32 bits memory mapped hardware register
    13  */
     12///////////////////////////////////////////////////////////////////////////////////
     13// Read an 32 bits memory mapped hardware register
     14///////////////////////////////////////////////////////////////////////////////////
    1415static inline unsigned int ioread32(void * addr)
    1516{
     
    1718}
    1819
    19 /**
    20  * Read an 16 bits memory mapped hardware register
    21  */
     20///////////////////////////////////////////////////////////////////////////////////
     21// Read an 16 bits memory mapped hardware register
     22///////////////////////////////////////////////////////////////////////////////////
    2223static inline unsigned short ioread16(void * addr)
    2324{
     
    2526}
    2627
    27 /**
    28  * Read an 8 bits memory mapped hardware register
    29  */
     28///////////////////////////////////////////////////////////////////////////////////
     29// Read an 8 bits memory mapped hardware register
     30///////////////////////////////////////////////////////////////////////////////////
    3031static inline unsigned char ioread8(void * addr)
    3132{
     
    3334}
    3435
    35 /**
    36  * Write an 32 bits memory mapped hardware register
    37  */
     36///////////////////////////////////////////////////////////////////////////////////
     37// Write an 32 bits memory mapped hardware register
     38///////////////////////////////////////////////////////////////////////////////////
    3839static inline void iowrite32(void * addr, unsigned int value)
    3940{
     
    4243}
    4344
    44 /**
    45  * Write an 16 bits memory mapped hardware register
    46  */
     45///////////////////////////////////////////////////////////////////////////////////
     46// Write an 16 bits memory mapped hardware register
     47///////////////////////////////////////////////////////////////////////////////////
    4748static inline void iowrite16(void * addr, unsigned short value)
    4849{
     
    5152}
    5253
    53 /**
    54  * Write an 8 bits memory mapped hardware register
    55  */
     54///////////////////////////////////////////////////////////////////////////////////
     55// Write an 8 bits memory mapped hardware register
     56///////////////////////////////////////////////////////////////////////////////////
    5657static inline void iowrite8(void * addr, unsigned char value)
    5758{
  • soft/giet_vm/giet_config.h

    r267 r289  
    3737#define GIET_IDLE_TASK_VERBOSITY 1
    3838
    39 #define GIET_MONO_TTY            0          /* Only one terminal is used */
    40 
    4139#define GIET_MAX_ELF_FILES       20         /* max .elf files loaded by boot-loader */
    4240#define GIET_OPEN_FILES_MAX      16         /* max simultaneously open files */
  • soft/giet_vm/giet_drivers/bdv_driver.c

    r288 r289  
    6464// Arguments are:
    6565// - to_mem     : from external storage to memory when non 0.
    66 // - kernel     : kernel buffer with identity mapping when non 0.
     66// - mode       : BOOT / KERNEL / USER
    6767// - lba        : first block index on the external storage.
    68 // - buf_vaddr  : virtual base address of the memory buffer.
     68// - buf_paddr  : physical base address of the memory buffer.
    6969// - count      : number of blocks to be transfered.
    7070// Returns 0 if success, > 0 if error.
     
    109109    ioc_address[BLOCK_DEVICE_LBA]        = lba;
    110110
    111     // There is two policies for transfer completion
     111    // There are two policies for transfer completion
    112112        // detection, depending on the mode argument:
    113113
     
    120120
    121121        unsigned int status;
    122         if ( _bdv_get_status(0, &status) ) return 1;
    123 
    124         while( (status != BLOCK_DEVICE_READ_SUCCESS)  &&
    125                (status != BLOCK_DEVICE_READ_ERROR)    &&
    126                (status != BLOCK_DEVICE_WRITE_SUCCESS) &&
    127                (status != BLOCK_DEVICE_WRITE_ERROR) )
     122        do
    128123        {
    129             if ( _bdv_get_status(0, &status) ) return 1;
     124            if ( _bdv_get_status( 0, &status ) ) return 1;
    130125
    131126#if GIET_DEBUG_IOC_DRIVER
     
    134129_tty_release_lock( 0 );
    135130#endif
    136 
    137131        }
     132        while( (status != BLOCK_DEVICE_READ_SUCCESS)  &&
     133               (status != BLOCK_DEVICE_READ_ERROR)    &&
     134               (status != BLOCK_DEVICE_WRITE_SUCCESS) &&
     135               (status != BLOCK_DEVICE_WRITE_ERROR)   );
     136
    138137        // analyse status
    139138        error = ( (status == BLOCK_DEVICE_READ_ERROR) ||
  • soft/giet_vm/giet_drivers/hba_driver.c

    r258 r289  
    7777#include <ctx_handler.h>
    7878#include <mmc_driver.h>
     79#include <hba_driver.h>
    7980#include <vmem.h>
    8081
     
    124125{
    125126    volatile unsigned int* hba_address;
    126     hba_address = (unsigned int*)(&seg_hba_base) + (HBA_SPAN*channel);
     127    hba_address = (unsigned int*)(&seg_ioc_base) + (HBA_SPAN*channel);
    127128
    128129    if( channel >= NB_HBA_CHANNELS )
    129130    {
    130         _get_lock(&_tty_put_lock);
     131        _tty_get_lock( 0 );
    131132        _puts("\n[GIET ERROR] in _hba_get_status() : illegal channel\n");
    132         _release_lock(&_tty_put_lock);
     133        _tty_release_lock( 0 );
    133134        return 1;
    134135    }
     
    146147{
    147148    volatile unsigned int* hba_address;
    148     hba_address = (unsigned int*)(&seg_hba_base) + (HBA_SPAN*channel);
     149    hba_address = (unsigned int*)(&seg_ioc_base) + (HBA_SPAN*channel);
    149150
    150151    if( channel >= NB_HBA_CHANNELS )
    151152    {   
    152         _get_lock(&_tty_put_lock);
     153        _tty_get_lock( 0 );
    153154        _puts("\n[GIET ERROR] in _hba_reset_status() : illegal channel\n");
    154         _release_lock(&_tty_put_lock);
     155        _tty_release_lock( 0 );
    155156        return 1;
    156157    }
     
    191192    hba_cmd_table_t*   cmd_table;      // command table pointer
    192193
    193     // TODO The block size must be obtained from the hardware...
    194     block_size = 512;
     194    block_size = _hba_get_block_size();
    195195
    196196    // check buffer alignment
    197197    if( buf_vaddr & (block_size-1) )
    198198    {
    199         _get_lock(&_tty_put_lock);
     199        _tty_get_lock( 0 );
    200200        _puts("\n[GIET ERROR] in _hba_set_cmd() : user buffer not block aligned\n");
    201         _release_lock(&_tty_put_lock);
     201        _tty_release_lock( 0 );
    202202        return 1;
    203203    }
     
    207207    if ( channel_id == 0xFFFFFFFF )
    208208    {
    209         _get_lock(&_tty_put_lock);
     209        _tty_get_lock( 0 );
    210210        _puts("\n[GIET ERROR] in _hba_set_cmd() : no HBA channel allocated\n");
    211         _release_lock(&_tty_put_lock);
     211        _tty_release_lock( 0 );
    212212        return 1;
    213213    }
    214214
    215215    // get hba device address
    216     hba_address = (unsigned int*)(&seg_hba_base) + (HBA_SPAN * channel_id);
     216    hba_address = (unsigned int*)(&seg_ioc_base) + (HBA_SPAN * channel_id);
    217217
    218218    // get command list status
     
    223223    if( pxci & (1<<cmd_id ) )
    224224    {
    225         _get_lock(&_tty_put_lock);
     225        _tty_get_lock( 0 );
    226226        _puts("\n[GIET ERROR] in _hba_set_cmd() : command list full in channel \n");
    227227        _putd( channel_id );
    228228        _puts("\n");
    229         _release_lock(&_tty_put_lock);
     229        _tty_release_lock( 0 );
    230230        return 1;
    231231    }
     
    262262        if ( ko )
    263263        {
    264             _get_lock(&_tty_put_lock);
     264            _tty_get_lock( 0 );
    265265            _puts("[GIET ERROR] in _hba_set_cmd() : user buffer unmapped\n");
    266             _release_lock(&_tty_put_lock);
     266            _tty_release_lock( 0 );
    267267            return 1;
    268268        }
    269269        if ((flags & PTE_U) == 0)
    270270        {
    271             _get_lock(&_tty_put_lock);
     271            _tty_get_lock( 0 );
    272272            _puts("[GIET ERROR] in _hba_set_cmd() : user buffer not in user space\n");
    273             _release_lock(&_tty_put_lock);
     273            _tty_release_lock( 0 );
    274274            return 1;
    275275        }
    276276        if (((flags & PTE_W) == 0 ) && (is_read == 0) )
    277277        {
    278             _get_lock(&_tty_put_lock);
     278            _tty_get_lock( 0 );
    279279            _puts("[GIET ERROR] in _hba_set_cmd() : user buffer not writable\n");
    280             _release_lock(&_tty_put_lock);
     280            _tty_release_lock( 0 );
    281281            return 1;
    282282        }
     
    285285        if( buf_id > 245 )
    286286        {
    287             _get_lock(&_tty_put_lock);
     287            _tty_get_lock( 0 );
    288288            _puts("[GIET ERROR] in _hba_set_cmd() : max number of buffers is 248\n");
    289             _release_lock(&_tty_put_lock);
     289            _tty_release_lock( 0 );
    290290            return 1;
    291291        }
     
    415415// Returns 0 if success, > 0 if error.
    416416///////////////////////////////////////////////////////////////////
    417 unsigned int _hba_write( unsigned int  lba,
     417unsigned int _hba_write( unsigned int  mode,
     418                         unsigned int  lba,
    418419                         void*         buffer,
    419420                         unsigned int  count )
     
    427428// Returns 0 if success, > 0 if error.
    428429///////////////////////////////////////////////////////////////////
    429 unsigned int _hba_read( unsigned int  lba,
     430unsigned int _hba_read( unsigned int  mode,
     431                        unsigned int  lba,
    430432                        void*         buffer,
    431433                        unsigned int  count )
     
    434436}
    435437//////////////////////////////////////////////////////////////////
    436 // This function initializes for a given channel (k)
     438// This function initializes for a given channel
    437439// - the HBA hardware registers,
    438440// - the command list pointer,
     
    440442// - the command tables physical addresses array,
    441443//////////////////////////////////////////////////////////////////
    442 void _hba_init( unsigned int k )  // k == channel_index
     444unsigned int _hba_init( unsigned int channel )
    443445{
    444446    unsigned int ppn;
     
    452454
    453455    // HBA registers
    454     unsigned int*  hba_address = (unsigned int*)(&seg_hba_base) + (HBA_SPAN*k);
    455     hba_address = (unsigned int*)&seg_hba_base + HBA_SPAN * k;
    456 
    457     hba_address[HBA_PXCLB]  = (unsigned int)(&hba_cmd_list[k]);
     456    unsigned int*  hba_address;
     457    hba_address = (unsigned int*)&seg_ioc_base + HBA_SPAN * channel;
     458
     459    hba_address[HBA_PXCLB]  = (unsigned int)(&hba_cmd_list[channel]);
    458460    hba_address[HBA_PXCLBU] = 0;
    459461    hba_address[HBA_PXIE]   = 0x40000001;
     
    463465
    464466    // command list pointer       
    465     hba_cmd_slot[k] = 0;
     467    hba_cmd_slot[channel] = 0;
    466468
    467469    // Command list physical addresse
    468     vbase = (unsigned int)(&hba_cmd_list[k]);
     470    vbase = (unsigned int)(&hba_cmd_list[channel]);
    469471    fail = _v2p_translate( (page_table_t*)pt,
    470472                           vbase>>12,
     
    473475    if ( fail )
    474476    {
    475         _get_lock(&_tty_put_lock);
     477        _tty_get_lock( 0 );
    476478        _puts("[GIET ERROR] in _hba_init() : command list unmapped\n");
    477         _release_lock(&_tty_put_lock);
    478         _exit();
    479     }
    480     hba_cmd_list_paddr[k] = ((paddr_t)ppn) | (vbase & 0xFFF);
     479        _tty_release_lock( 0 );
     480        return 1;
     481    }
     482    hba_cmd_list_paddr[channel] = ((paddr_t)ppn) | (vbase & 0xFFF);
    481483
    482484    // Command tables physical addresses
    483485    for( c=0 ; c<32 ; c++ )
    484486    {
    485         vbase = (unsigned int)(&hba_cmd_table[k][c]);
     487        vbase = (unsigned int)(&hba_cmd_table[channel][c]);
    486488        fail = _v2p_translate( (page_table_t*)pt,
    487489                               vbase>>12,
     
    490492        if ( fail )
    491493        {
    492             _get_lock(&_tty_put_lock);
     494            _tty_get_lock( 0 );
    493495            _puts("[GIET ERROR] in _hba_init() : command table unmapped\n");
    494             _release_lock(&_tty_put_lock);
    495             _exit();
    496         }
    497         hba_cmd_table_paddr[k][c] = ((paddr_t)ppn) | (vbase & 0xFFF);
    498     }
     496            _tty_release_lock( 0 );
     497            return 1;
     498        }
     499        hba_cmd_table_paddr[channel][c] = ((paddr_t)ppn) | (vbase & 0xFFF);
     500    }
     501
     502    return 0;
    499503}
    500504
     505///////////////////////////////////////////////////////////////////////////////
     506//     _hba_get_block_size()
     507// This function returns the block_size of HBA controller
     508///////////////////////////////////////////////////////////////////////////////
     509unsigned int _hba_get_block_size()
     510{
     511    // TODO The block size must be obtained from the hardware...
     512    return 512;
     513}
    501514
    502515
  • soft/giet_vm/giet_drivers/hba_driver.h

    r258 r289  
    9494
    9595///////////////////////////////////////////////////////////////////////////////////
    96 // HBA device access functions  (vci_multi_nic)
     96// HBA device access functions  (vci_hba)
    9797///////////////////////////////////////////////////////////////////////////////////
    9898
    99 unsigned int _hba_write( unsigned int lba,       // logic bloc address on device
     99unsigned int _hba_write( unsigned int mode,
     100                         unsigned int lba,       // logic bloc address on device
    100101                         void*        buffer,    // memory buffer base address
    101102                         unsigned int count );   // number of blocs
    102103
    103 unsigned int _hba_read ( unsigned int lba,       // logic bloc address on device
     104unsigned int _hba_read ( unsigned int mode,
     105                         unsigned int lba,       // logic bloc address on device
    104106                         void*        buffer,    // memory buffer base address
    105107                         unsigned int count );   // number of blocks
    106108
    107 void _hba_init();
     109unsigned int _hba_init ( unsigned int channel );
    108110
    109111unsigned int _hba_get_status( unsigned int   channel,
     
    111113
    112114unsigned int _hba_reset_status( unsigned int channel );
     115
     116unsigned int _hba_get_block_size ();
    113117
    114118
  • soft/giet_vm/giet_drivers/ioc_driver.c

    r279 r289  
    11///////////////////////////////////////////////////////////////////////////////////
    2 // File     : ioc_driver.c
    3 // Date     : 23/05/2013
    4 // Author   : alain greiner
     2// File       : ioc_driver.c
     3// Date       : 23/05/2013
     4// Author     : alain greiner
     5// Maintainer : cesar fuguet
    56// Copyright (c) UPMC-LIP6
    67///////////////////////////////////////////////////////////////////////////////////
     
    1213//
    1314// The _ioc_read() and _ioc_write() functions use the _ioc_access() function,
    14 // that is always blocking, but can be called in 4 modes:
    15 //
    16 // - In BOOT_PA mode, the _ioc_access() function use the buffer virtual address
    17 //   as a physical address (as the page tables are not build) and use a polling
    18 //   policy on the IOC_STATUS register to detect transfer completion, as
    19 //   hardware interrupts are not activated. This mode is used by the
    20 //   boot code to load the map.bin file into memory.
     15// that is always blocking. The _ioc_access function will call the read or
     16// write function in the driver of the choosen IOC peripheral, which can be for
     17// now: BDV, HBA and SPI. This function can be called in 4 modes:
     18//
     19// - In BOOT_PA mode, the _ioc_access() function use the buffer virtual address
     20//   as a physical address (as the page tables are not build). This mode is
     21//   used by the boot code to load the map.bin file into memory.
    2122//
    2223// - In BOOT_VA mode, the _ioc_access() function makes a V2P translation to
    23 //   compute the buffer physical address, and use a polling policy on IOC_STATUS
    24 //   register to detect transfer completion. This mode is used by the boot code
    25 //   to load the various .elf files into memory.
     24//   compute the buffer physical address. This mode is used by the boot code to
     25//   load the various .elf files into memory.
    2626//
    2727// - In KERNEL mode, the _ioc_access() function makes a V2P translation to
    28 //   compute the buffer physical address, and use a descheduling strategy:
    29 //   The ISR executed when transfer completes should restart the calling task.
    30 //   There is no checking of user access right to the memory buffer.
    31 //   This mode must be used to access IOC, for an "open" system call.
     28//   compute the buffer physical address. There is no checking of user access
     29//   right to the memory buffer.  This mode must be used to access IOC, for an
     30//   "open" system call.
    3231//
    3332// - In USER mode, the _ioc_access() function makes a V2P translation to
    34 //   compute the buffer physical address, and use a descheduling strategy:
    35 //   The ISR executed when transfer completes should restart the calling task,
    36 //   The user access right to the memory buffer must be checked.
    37 //   This mode must be used to access IOC, for a "read/write" system call.
    38 //
    39 // As the IOC component can be used by several programs running in parallel,
    40 // the _ioc_lock variable guaranties exclusive access to the device.  The
    41 // _ioc_read() and _ioc_write() functions use atomic LL/SC to get the lock.
     33//   compute the buffer physical address. The user access right to the memory
     34//   buffer must be checked.  This mode must be used to access IOC, for a
     35//   "read/write" system call.
    4236//
    4337// The IOMMU can be activated or not:
     
    8781#endif
    8882
     83#if (USE_BDV + USE_SPI + USE_HBA) != 1
     84# error: You must use only one IOC controller (BDV or SPI or HBA)
     85#endif
     86
     87#if USE_BDV
     88# include <bdv_driver.h>
     89#endif
     90
     91#if USE_SPI
     92# include <sdc_driver.h>
     93#endif
     94
     95#if USE_HBA
     96# include <hba_driver.h>
     97#endif
     98
     99
    89100#define in_unckdata __attribute__((section (".unckdata")))
    90101
    91102///////////////////// IOC global variables
    92103
    93 in_unckdata unsigned int          _ioc_lock = 0;
    94 in_unckdata volatile unsigned int _ioc_status = 0;
     104in_unckdata unsigned int _ioc_lock = 0;
     105in_unckdata unsigned int _ioc_status = 0;
    95106in_unckdata volatile unsigned int _ioc_gtid;
    96107in_unckdata volatile unsigned int _ioc_iommu_ix1 = 0;
     
    155166    }
    156167
    157     volatile unsigned int * ioc_address = (unsigned int *) &seg_ioc_base ;
    158 
    159168    unsigned int length = count << 9;  // count * 512 bytes
    160169
     
    269278    }
    270279
    271     // get the lock protecting IOC
    272     _get_lock(&_ioc_lock);
    273 
    274     // set the _ioc_status polling variable
    275     _ioc_status = BLOCK_DEVICE_BUSY;
    276 
    277 #if GIET_DEBUG_IOC_DRIVER
    278 _tty_get_lock( 0 );
    279 _puts("\n[IOC DEBUG] _ioc_access() : configure IOC\n");
    280 _puts(" - buf_paddr = ");
    281 _putl( buf_paddr );
    282 _puts("\n");
    283 _puts(" - count     = ");
    284 _putd( count );
    285 _puts("\n");
    286 _puts(" - lba       = ");
    287 _putx( lba );
    288 _puts("\n");
    289 _tty_release_lock( 0 );
    290 #endif
    291 
    292     // send command to IOC   
    293     if ( GIET_USE_IOMMU )
    294     {
    295         ioc_address[BLOCK_DEVICE_BUFFER] = buf_xaddr;
    296         ioc_address[BLOCK_DEVICE_COUNT]  = count;
    297         ioc_address[BLOCK_DEVICE_LBA]    = lba;
    298     }
    299     else
    300     {
    301         ioc_address[BLOCK_DEVICE_BUFFER]     = (unsigned int)buf_paddr;
    302         ioc_address[BLOCK_DEVICE_BUFFER_EXT] = (unsigned int)(buf_paddr>>32);
    303         ioc_address[BLOCK_DEVICE_COUNT]      = count;
    304         ioc_address[BLOCK_DEVICE_LBA]        = lba;
    305     }
    306 
    307     // There is two policies for transfer completion
    308         // detection, depending on the mode argument:
    309 
    310     if ( (mode == IOC_BOOT_PA_MODE) ||    // We poll directly the IOC_STATUS register
    311          (mode == IOC_BOOT_VA_MODE) )     // as IRQs are masked.
    312     {
    313         // Launch transfert
    314         if (to_mem == 0) ioc_address[BLOCK_DEVICE_OP] = BLOCK_DEVICE_WRITE;
    315         else             ioc_address[BLOCK_DEVICE_OP] = BLOCK_DEVICE_READ;
    316 
    317         unsigned int status;
    318         if ( _ioc_get_status(0, &status) ) return 1;
    319 
    320         while( (status != BLOCK_DEVICE_READ_SUCCESS)  &&
    321                (status != BLOCK_DEVICE_READ_ERROR)    &&
    322                (status != BLOCK_DEVICE_WRITE_SUCCESS) &&
    323                (status != BLOCK_DEVICE_WRITE_ERROR) )
    324         {
    325             if ( _ioc_get_status(0, &status) ) return 1;
    326 
    327 #if GIET_DEBUG_IOC_DRIVER
    328 _tty_get_lock( 0 );
    329 _puts("\n[IOC DEBUG] _ioc_access() : ... waiting on IOC_STATUS register ...\n");
    330 _tty_release_lock( 0 );
    331 #endif
    332 
    333         }
    334         // analyse status
    335         error = ( (status == BLOCK_DEVICE_READ_ERROR) ||
    336                   (status == BLOCK_DEVICE_WRITE_ERROR) );
    337 
    338         // release lock
    339         _release_lock(&_ioc_lock);     
    340     }
    341     else                           // in USER or KERNEL mode, we deschedule the task.
    342                                    // When the task is rescheduled by the ISR, we reset
    343                                    // the _ioc_status variable, and release the lock
    344     {
    345         // We need a critical section, because we must reset the RUN bit
    346                 // before to launch the transfer, and we want to avoid to be descheduled
    347                 // between these two operations.
    348 
    349         // Enter critical section
    350         _it_disable();
    351        
    352         // set _ioc_gtid and reset runnable
    353         unsigned int ltid = _get_proc_task_id();
    354         unsigned int pid = _get_procid();
    355         _ioc_gtid = (pid<<16) + ltid;
    356         _set_task_slot( pid, ltid, CTX_RUN_ID, 0 ); 
    357        
    358         // Launch transfert
    359         if (to_mem == 0) ioc_address[BLOCK_DEVICE_OP] = BLOCK_DEVICE_WRITE;
    360         else             ioc_address[BLOCK_DEVICE_OP] = BLOCK_DEVICE_READ;
    361 
    362         // deschedule task
    363         _ctx_switch();                     
    364 
    365         // analyse status
    366         error = ( (_ioc_status == BLOCK_DEVICE_READ_ERROR) ||
    367                   (_ioc_status == BLOCK_DEVICE_WRITE_ERROR) );
    368 
    369         // reset _ioc_status and release lock
    370         _ioc_status = BLOCK_DEVICE_IDLE;
    371         _release_lock(&_ioc_lock);     
    372     }
    373 
    374 #if GIET_DEBUG_IOC_DRIVER
    375 _tty_get_lock( 0 );
    376 _puts("\n[IOC DEBUG] _ioc_access completed at cycle ");
    377 _putd( _get_proctime() );
    378 _puts(" for processor ");
    379 _putd( _get_procid() );
    380 _puts(" : error = ");
    381 _putd( (unsigned int)error );
    382 _puts("\n");
    383 _tty_release_lock( 0 );
     280    if ( GIET_USE_IOMMU ) buf_paddr = (paddr_t) buf_xaddr;
     281
     282#if   USE_BDV
     283    if (to_mem) error = _bdv_read (mode, lba, buf_paddr, count);
     284    else        error = _bdv_write(mode, lba, buf_paddr, count);
     285#elif USE_SPI
     286    if (to_mem) error = _sdc_read (mode, lba, buf_paddr, count);
     287    else        error = _sdc_write(mode, lba, buf_paddr, count);
     288#elif USE_HBA
     289    if (to_mem) error = _hba_read (mode, lba, buf_paddr, count);
     290    else        error = _hba_write(mode, lba, buf_paddr, count);
    384291#endif
    385292
     
    392299// Return 0 for success.
    393300///////////////////////////////////////////////////////////////////////////////
    394 unsigned int _ioc_init()
    395 {
    396     volatile unsigned int * ioc_address = (unsigned int *) &seg_ioc_base ;
    397    
    398     if ( ioc_address[BLOCK_DEVICE_BLOCK_SIZE] != 512 )
    399     {
    400         _puts("\n[GIET ERROR] in _ioc_init() : block size must be 512 bytes\n");
    401         _exit();
    402     }
    403 
    404     ioc_address[BLOCK_DEVICE_IRQ_ENABLE] = 1;
    405     return 0;
     301unsigned int _ioc_init( unsigned int channel )
     302{
     303#if   USE_BDV
     304    return _bdv_init( channel );
     305#elif USE_SPI
     306    return _sdc_init( channel );
     307#elif USE_HBA
     308    return _hba_init( channel );
     309#endif
    406310}
    407311
     
    457361                              unsigned int* status )
    458362{
    459     if ( channel != 0 )
    460     {
    461         _tty_get_lock( 0 );
    462         _puts("\n[GIET ERROR] in _ioc_get_status : illegal channel\n");
    463         _tty_release_lock( 0 );
    464 
    465         return 1;
    466     }
    467 
    468     // get IOC base address
    469     volatile unsigned int * ioc_address = (unsigned int *) &seg_ioc_base;
    470     *status = ioc_address[BLOCK_DEVICE_STATUS];
    471 
    472     return 0;
     363#if   USE_BDV
     364    return _bdv_get_status(channel, status);
     365#elif USE_SPI
     366    return _sdc_get_status(channel, status);
     367#elif USE_HBA
     368    return _hba_get_status(channel, status);
     369#endif
    473370}
    474371
     
    479376unsigned int _ioc_get_block_size()
    480377{
    481     // get IOC base address
    482     volatile unsigned int * ioc_address = (unsigned int *) &seg_ioc_base;
    483    
    484     return  ioc_address[BLOCK_DEVICE_BLOCK_SIZE];
     378#if   USE_BDV
     379    return _bdv_get_block_size();
     380#elif USE_SPI
     381    return _sdc_get_block_size();
     382#elif USE_HBA
     383    return _hba_get_block_size();
     384#endif
    485385}
    486386
  • soft/giet_vm/giet_drivers/ioc_driver.h

    r279 r289  
    66///////////////////////////////////////////////////////////////////////////////////
    77
    8 #ifndef _GIET_IOC_DRIVERS_H_
    9 #define _GIET_IOC_DRIVERS_H_
     8#ifndef _GIET_IOC_DRIVER_H_
     9#define _GIET_IOC_DRIVER_H_
    1010
    1111///////////////////////////////////////////////////////////////////////////////////
     
    5353///////////////////////////////////////////////////////////////////////////////////
    5454
    55 extern unsigned int          _ioc_lock;
    56 extern volatile unsigned int _ioc_status;
     55extern unsigned int _ioc_lock;
     56extern unsigned int _ioc_status;
    5757extern volatile unsigned int _ioc_gtid;
    5858extern volatile unsigned int _ioc_iommu_ix1;
    5959extern volatile unsigned int _ioc_iommu_npages;
    6060
    61 extern unsigned int _ioc_init();
     61extern unsigned int _ioc_init( unsigned int channel );
    6262
    6363extern unsigned int _ioc_write( unsigned int mode,
  • soft/giet_vm/giet_fat32/fat32.c

    r273 r289  
    871871    if( fat.initialised != FAT_INITIALISED )
    872872    {
    873           _fat_init( mode );
     873        if ( _fat_init( mode ) )
     874        {
     875            _puts("[FAT ERROR] Cannot initialize FAT descriptor fom Boot Sector\n");
     876            _exit();
     877        }
     878
     879#if GIET_DEBUG_FAT
     880_tty_get_lock( 0 );
     881_puts("\n[FAT DEBUG] FAT initialisation completed at cycle ");
     882_putd(_get_proctime());
     883_puts("\n");
     884_fat_print();
     885_tty_release_lock( 0 );
     886#endif
    874887    }
    875888 
  • soft/giet_vm/giet_kernel/kernel_init.c

    r281 r289  
    6464
    6565////////////////////////////////////////////////////////////////////////////////////
    66 // staks for the "idle" tasks (256 bytes for each processor)
     66// staks for the "idle" tasks (512 bytes for each processor)
    6767////////////////////////////////////////////////////////////////////////////////////
    6868
    6969__attribute__((section (".kdata")))
    70 unsigned int _idle_stack[X_SIZE*Y_SIZE * NB_PROCS_MAX * 128];
     70unsigned int _idle_stack[X_SIZE * Y_SIZE * NB_PROCS_MAX * 128 ];
    7171
    7272////////////////////////////////////////////////////////////////////////////////////
     
    343343    // step 5 : each processor updates the idle_task context:
    344344    //          (only CTX_SP, CTX_RA, CTX_EPC).
    345     //          The stack size is 256 bytes, reserved in seg_kdata.
     345    //          The stack size is 512 bytes, reserved in seg_kdata.
    346346    //          The PTPR register, the CTX_PTPR and CTX_PTAB slots
    347347    //          have been initialised in boot code.
    348348
    349     unsigned int stack = (unsigned int)_idle_stack + ((global_pid + 1)<<9);
     349    unsigned int x = cluster_xy >> Y_WIDTH;
     350    unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1);
     351    unsigned int p = ((x * Y_SIZE) + y) * NB_PROCS_MAX + local_pid;
     352
     353    unsigned int stack = (unsigned int)_idle_stack + ((p + 1)<<9);
    350354
    351355    _set_task_slot( global_pid, IDLE_TASK_INDEX, CTX_SP_ID,  stack);
  • soft/giet_vm/giet_libs/stdio.c

    r271 r289  
    298298    unsigned int ret;
    299299
    300     if (GIET_MONO_TTY)
     300    if (NB_TTY_CHANNELS == 1)
    301301    {
    302302        ret = sys_call(SYSCALL_TTY_LOCK, 0, 0, 0, 0); // Get TTY lock
     
    328328    }
    329329
    330     if (GIET_MONO_TTY)
     330    if (NB_TTY_CHANNELS == 1)
    331331    {
    332332        ret = sys_call(SYSCALL_TTY_LOCK, 1, 0, 0, 0); // Release TTY lock
     
    412412
    413413return_error:
    414     if (GIET_MONO_TTY)
     414    if (NB_TTY_CHANNELS == 1)
    415415    {
    416416        ret = sys_call(SYSCALL_TTY_LOCK, 1, 0, 0, 0); // Release TTY lock
  • soft/giet_vm/giet_xml/mapping_info.h

    r287 r289  
    104104    PERIPH_TYPE_DMA       = 1,
    105105    PERIPH_TYPE_FBF       = 2,
    106     PERIPH_TYPE_HBA       = 3,
    107     PERIPH_TYPE_ICU       = 4,
    108     PERIPH_TYPE_IOB       = 5,
    109     PERIPH_TYPE_IOC       = 6,
    110     PERIPH_TYPE_MMC       = 7,
    111     PERIPH_TYPE_MWR       = 8,
    112     PERIPH_TYPE_NIC       = 9,
    113     PERIPH_TYPE_ROM       = 10,
    114     PERIPH_TYPE_SIM       = 11,
    115     PERIPH_TYPE_TIM       = 12,
    116     PERIPH_TYPE_TTY       = 13,
    117     PERIPH_TYPE_XCU       = 14,
    118 
    119     PERIPH_TYPE_MAX_VALUE = 15,
    120 };
    121 
     106    PERIPH_TYPE_ICU       = 3,
     107    PERIPH_TYPE_IOB       = 4,
     108    PERIPH_TYPE_IOC       = 5,
     109    PERIPH_TYPE_MMC       = 6,
     110    PERIPH_TYPE_MWR       = 7,
     111    PERIPH_TYPE_NIC       = 8,
     112    PERIPH_TYPE_ROM       = 9,
     113    PERIPH_TYPE_SIM       = 10,
     114    PERIPH_TYPE_TIM       = 11,
     115    PERIPH_TYPE_TTY       = 12,
     116    PERIPH_TYPE_XCU       = 13,
     117
     118    PERIPH_TYPE_MAX_VALUE = 14,
     119};
     120
     121enum periphSubtype
     122{
     123    PERIPH_SUBTYPE_BDV       = 0,
     124    PERIPH_SUBTYPE_HBA       = 1,
     125    PERIPH_SUBTYPE_SPI       = 2,
     126
     127    PERIPH_SUBTYPE_MAX_VALUE = 3,
     128};
    122129
    123130enum mwmrPortDirection
     
    146153    unsigned int fbf_cluster;        // index of cluster containing FBF controler
    147154    unsigned int fbf_cluster_bis;    // index of cluster containing second FBF controler
    148 
    149     unsigned int hba_cluster;        // index of cluster containing HBA controler
    150     unsigned int hba_cluster_bis;    // index of cluster containing second HBA controler
    151155
    152156    unsigned int iob_cluster;        // index of cluster containing IOB controler
     
    320324{
    321325    unsigned int    type;         
     326    unsigned int    subtype;         // periph specialization
    322327    unsigned int    psegid;          // pseg index in cluster
    323328    unsigned int    channels;        // number of channels
  • soft/giet_vm/giet_xml/xml_driver.c

    r287 r289  
    6363        "DMA",
    6464        "FBF",
    65         "HBA",
    6665        "ICU",
    6766        "IOB",
     
    7574        "TTY",
    7675        "XCU",
     76    };
     77
     78    const char * periph_subtype[] =
     79    {
     80        "BDV",
     81        "HBA",
     82        "SPI",
    7783    };
    7884
     
    308314        {
    309315            fprintf(fpout, "            <periph type = \"%s\" ", periph_type[periph[periph_id].type]);
     316
     317            if (periph[periph_id].subtype < PERIPH_SUBTYPE_MAX_VALUE)
     318                fprintf(fpout, " subtype = \"%s\" ", periph_subtype[periph[periph_id].subtype]);
     319
    310320            fprintf(fpout, " psegname = \"%s\" ", pseg[periph[periph_id].psegid].name);
    311321            fprintf(fpout, " channels = \"%d\" />\n",  periph[periph_id].channels);
  • soft/giet_vm/giet_xml/xml_parser.c

    r287 r289  
    123123unsigned int use_iob          = 0; // using IOB component
    124124unsigned int use_xcu          = 0; // using XCU (not ICU)
     125
     126// These variables define the IOC peripheral subtype
    125127unsigned int use_hba          = 0; // using HBA
     128unsigned int use_bdv          = 0; // using SoCLIB block device
     129unsigned int use_spi          = 0; // using SD Card-SPI
    126130
    127131////////////////////////////////////////////////////////////////
     
    12521256        unsigned int error = 0;
    12531257
     1258        // initialize peripheral subtype
     1259        periph[periph_index]->subtype = 0xFFFFFFFF;
     1260
    12541261        // The CMA, FBF, HBA, IOB, IOC, NIC, ROM, SIM, TTY, peripherals are not
    12551262        // replicated in all clusters but can be replicated in two clusters (fault tolerance)
     
    12941301        }
    12951302        /////////////////////////////////
    1296         else if (strcmp(str, "HBA") == 0)
    1297         {
    1298             periph[periph_index]->type = PERIPH_TYPE_HBA;
    1299             use_hba = 1;
    1300             if (header->hba_cluster == 0xFFFFFFFF)
    1301             {
    1302                 header->hba_cluster  = cluster_index;
    1303                 hba_channels = periph[periph_index]->channels;
    1304             }
    1305             else if (header->hba_cluster_bis == 0xFFFFFFFF)
    1306             {
    1307                 header->hba_cluster_bis = cluster_index;
    1308                 assert( (hba_channels == periph[periph_index]->channels) &&
    1309                 "[XML ERROR] unconsistent non replicated peripheral");
    1310             }
    1311             else
    1312             {
    1313                 error = 1;
    1314             }
    1315         }
    1316         /////////////////////////////////
    13171303        else if (strcmp(str, "IOB") == 0)
    13181304        {
     
    13461332            else
    13471333            {
    1348                 error = 1;
     1334                printf("[XML ERROR] At most two copies for non replicated "
     1335                        "peripheral\n");
     1336                exit(1);
     1337            }
     1338
     1339            str = getStringValue(reader, "subtype", &ok);
     1340   
     1341            if (!ok)
     1342            {
     1343                printf("[XML ERROR] IOC peripheral needs a subtype parameter: "
     1344                       "BDV, HBA or SPI\n");
     1345                exit(1);
     1346            }
     1347
     1348            if (strcmp(str, "BDV") == 0)
     1349            {
     1350                periph[periph_index]->subtype = PERIPH_SUBTYPE_BDV;
     1351                use_bdv = 1;
     1352            }
     1353            else if (strcmp(str, "HBA") == 0)
     1354            {
     1355                periph[periph_index]->subtype = PERIPH_SUBTYPE_HBA;
     1356
     1357                if (use_hba == 0)
     1358                {
     1359                    use_hba      = 1;
     1360                    hba_channels = periph[periph_index]->channels;
     1361                }
     1362                else
     1363                {
     1364                    assert( (hba_channels == periph[periph_index]->channels) &&
     1365                    "[XML ERROR] unconsistent non replicated peripheral");
     1366                }
     1367            }
     1368            else if (strcmp(str, "SPI") == 0)
     1369            {
     1370                periph[periph_index]->subtype = PERIPH_SUBTYPE_SPI;
     1371                use_spi = 1;
     1372            }
     1373            else
     1374            {
     1375                printf("[XML ERROR] illegal subtype for IOC peripheral\n");
     1376                exit(1);
    13491377            }
    13501378        }
     
    23252353    header->fbf_cluster     = 0xFFFFFFFF;
    23262354    header->fbf_cluster_bis = 0xFFFFFFFF;
    2327 
    2328     header->hba_cluster     = 0xFFFFFFFF;
    2329     header->hba_cluster_bis = 0xFFFFFFFF;
    23302355
    23312356    header->iob_cluster     = 0xFFFFFFFF;
     
    25892614    def_int_write(fdout, "USE_IOB           ", use_iob);
    25902615    def_int_write(fdout, "USE_HBA           ", use_hba);
     2616    def_int_write(fdout, "USE_BDV           ", use_bdv);
     2617    def_int_write(fdout, "USE_SPI           ", use_spi);
    25912618
    25922619    file_write(fdout, "\n");
     
    27202747    ld_write(fdout, "seg_cma_base            ",   periph_vbase_array[PERIPH_TYPE_CMA]);
    27212748    ld_write(fdout, "seg_fbf_base            ",   periph_vbase_array[PERIPH_TYPE_FBF]);
    2722     ld_write(fdout, "seg_hba_base            ",   periph_vbase_array[PERIPH_TYPE_HBA]);
    27232749    ld_write(fdout, "seg_iob_base            ",   periph_vbase_array[PERIPH_TYPE_IOB]);
    27242750    ld_write(fdout, "seg_ioc_base            ",   periph_vbase_array[PERIPH_TYPE_IOC]);
  • soft/giet_vm/mappings/4c_1p_four.xml

    r287 r289  
    5353            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4"  />
    5454            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    55             <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" />
     55            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" subtype = "BDV" />
    5656            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "8"  />
    5757            <periph type = "NIC"  psegname = "PSEG_NIC"  channels = "2"  />
  • soft/giet_vm/mappings/4c_1p_iob_four.xml

    r287 r289  
    7272            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1"  />
    7373            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    74             <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" />
     74            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" subtype = "BDV" />
    7575            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "8"  />
    7676            <periph type = "NIC"  psegname = "PSEG_NIC"  channels = "2"  />
  • soft/giet_vm/mappings/4c_1p_iob_sort.xml

    r287 r289  
    7272            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1"  />
    7373            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    74             <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  />
    75             <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "5" />
     74            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  subtype = "BDV" />
     75            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "5"  />
    7676            <periph type = "NIC"  psegname = "PSEG_NIC"  channels = "2"  />
    7777            <periph type = "CMA"  psegname = "PSEG_CMA"  channels = "4"  />
  • soft/giet_vm/mappings/4c_1p_sort.xml

    r287 r289  
    5050            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1"  />
    5151            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    52             <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  />
    53             <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "5" />
     52            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  subtype = "BDV" />
     53            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "9" />
    5454            <periph type = "NIC"  psegname = "PSEG_NIC"  channels = "2"  />
    5555            <periph type = "CMA"  psegname = "PSEG_CMA"  channels = "4"  />
     
    126126        </vseg>
    127127        <vseg name = "seg_boot_buffer"    vbase = "0x00040000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
    128             <vobj name = "boot_buffer"    type = "BUFFER" length = "0x00020000" />
    129         </vseg>
    130         <vseg name = "seg_boot_stack"     vbase = "0x00060000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
     128            <vobj name = "boot_buffer"    type = "BUFFER" length = "0x00080000" />
     129        </vseg>
     130        <vseg name = "seg_boot_stack"     vbase = "0x000C0000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
    131131            <vobj name = "boot_stack"     type = "BUFFER" length = "0x00090000" />
    132132        </vseg>
  • soft/giet_vm/mappings/4c_1p_sort_chiplet.xml

    r287 r289  
    3838            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4"  />
    3939            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    40             <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" />
     40            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1" subtype = "SPI" />
    4141            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "1" />
    4242            <periph type = "ROM"  psegname = "PSEG_ROM"  channels = "1"  />
Note: See TracChangeset for help on using the changeset viewer.