Changeset 289 for soft/giet_vm/giet_boot


Ignore:
Timestamp:
Feb 4, 2014, 2:16:37 AM (11 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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");
Note: See TracChangeset for help on using the changeset viewer.