Changeset 460


Ignore:
Timestamp:
Dec 5, 2014, 3:53:36 PM (9 years ago)
Author:
alain
Message:

Introducing an explicit FAT initialisation in boot.c.

File:
1 edited

Legend:

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

    r452 r460  
    7070#include <xcu_driver.h>
    7171#include <bdv_driver.h>
     72#include <hba_driver.h>
    7273#include <dma_driver.h>
    7374#include <cma_driver.h>
     
    8283#include <pmem.h>
    8384#include <utils.h>
     85#include <tty0.h>
    8486#include <elf-types.h>
    8587
     
    13381340                    _exit();
    13391341                }
    1340             }
     1342            } // end while
    13411343
    13421344            unsigned int type    = irq[irq_id].srctype;
     
    13601362            unsigned int index            = alloc_wti_channel[cluster_id];
    13611363            psched->wti_vector[index]     = isr | channel | 0x80000000;
     1364
     1365            // increment pointers
    13621366            alloc_wti_channel[cluster_id] = index + 1;
    13631367            lpid                          = lpid + 1;
     
    16701674    if ( fat.fd[fd_id].file_size > GIET_ELF_BUFFER_SIZE )
    16711675    {
    1672         _puts("\n[BOOT ERROR] load_one_elf_file() : ");
     1676        _puts("\n[BOOT ERROR] in load_one_elf_file() : ");
    16731677        _puts( pathname );
    1674         _puts(" exceeds the GIET_ELF_BUFFERSIZE defined in giet_config.h\n");
     1678        _puts(" size = ");
     1679        _putx( fat.fd[fd_id].file_size );
     1680        _puts("\n exceeds the GIET_ELF_BUFFERSIZE = ");
     1681        _putx( GIET_ELF_BUFFER_SIZE );
     1682        _puts("\n");
    16751683        _exit();
    16761684    }
     
    19861994                    if ( subtype == PERIPH_SUBTYPE_BDV )
    19871995                    {
    1988                         _bdv_lock.value = 0;
    1989 #if BOOT_DEBUG_PERI
    1990 _puts("- BDV : channels = ");
    1991 _putd(channels);
    1992 _puts("\n");
    1993 #endif
     1996                        _bdv_init();
    19941997                    }
    1995                     else if ( subtype == PERIPH_SUBTYPE_HBA )
     1998                    else if ( subtype == PERIPH_SUBTYPE_HBA ) 
    19961999                    {
    1997                         // TODO
     2000                        for (channel_id = 0; channel_id < channels; channel_id++)
     2001                            _hba_init( channel_id );
    19982002                    }
    1999                     else if ( subtype == PERIPH_SUBTYPE_SPI )
     2003                    else if ( subtype == PERIPH_SUBTYPE_SPI ) 
    20002004                    {
    2001                         // TODO
     2005                        //TODO
    20022006                    }
    2003                     break;
    2004                 }
    2005                 case PERIPH_TYPE_CMA:    // vci_chbuf_dma component
    2006                 {
    2007                     for (channel_id = 0; channel_id < channels; channel_id++)
    2008                     {
    2009                         // TODO
    2010                     }
    2011 #if BOOT_DEBUG_PERI
    2012 _puts("- CMA : channels = ");
    2013 _putd(channels);
    2014 _puts("\n");
    2015 #endif
    2016                     break;
    2017                 }
    2018                 case PERIPH_TYPE_NIC:    // vci_multi_nic component
    2019                 {
    2020                     for (channel_id = 0; channel_id < channels; channel_id++)
    2021                     {
    2022                         // TODO
    2023                     }
    2024 #if BOOT_DEBUG_PERI
    2025 _puts("- NIC : channels = ");
    2026 _putd(channels);
    2027 _puts("\n");
    2028 #endif
    20292007                    break;
    20302008                }
     
    20332011                    for (channel_id = 0; channel_id < channels; channel_id++)
    20342012                    {
    2035                         _tty_lock[channel_id].value = 0;
    2036                         _tty_rx_full[channel_id]    = 0;
     2013                        _tty_init( channel_id );
    20372014                    }
    2038 #if BOOT_DEBUG_PERI
    2039 _puts("- TTY : channels = ");
    2040 _putd(channels);
    2041 _puts("\n");
    2042 #endif
     2015                    break;
     2016                }
     2017                case PERIPH_TYPE_NIC:    // vci_multi_nic component
     2018                {
     2019                    _nic_global_init( 1,      // broadcast accepted
     2020                                      1,      // bypass activated
     2021                                      0,      // tdm non activated
     2022                                      0 );    // tdm period
    20432023                    break;
    20442024                }
     
    20582038                case PERIPH_TYPE_PIC:    // vci_iopic component
    20592039                {
    2060 #if BOOT_DEBUG_PERI
    2061 _puts("- PIC : channels = ");
    2062 _putd(channels);
    2063 _puts("\n");
    2064 #endif
    20652040                    // scan all IRQs defined in mapping for PIC component,
    20662041                    // and initialises addresses for WTI IRQs
     
    22242199        _puts("\n");
    22252200
     2201        // initialises the FAT
     2202        _fat_init( IOC_BOOT_MODE );
     2203
     2204        _puts("\n[BOOT] Fat initialised at cycle ");
     2205        _putd(_get_proctime());
     2206        _puts("\n");
     2207
    22262208        // Load the map.bin file into memory and check it
    22272209        boot_mapping_init();
Note: See TracChangeset for help on using the changeset viewer.