Changeset 460 for soft/giet_vm
- Timestamp:
- Dec 5, 2014, 3:53:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_boot/boot.c
r452 r460 70 70 #include <xcu_driver.h> 71 71 #include <bdv_driver.h> 72 #include <hba_driver.h> 72 73 #include <dma_driver.h> 73 74 #include <cma_driver.h> … … 82 83 #include <pmem.h> 83 84 #include <utils.h> 85 #include <tty0.h> 84 86 #include <elf-types.h> 85 87 … … 1338 1340 _exit(); 1339 1341 } 1340 } 1342 } // end while 1341 1343 1342 1344 unsigned int type = irq[irq_id].srctype; … … 1360 1362 unsigned int index = alloc_wti_channel[cluster_id]; 1361 1363 psched->wti_vector[index] = isr | channel | 0x80000000; 1364 1365 // increment pointers 1362 1366 alloc_wti_channel[cluster_id] = index + 1; 1363 1367 lpid = lpid + 1; … … 1670 1674 if ( fat.fd[fd_id].file_size > GIET_ELF_BUFFER_SIZE ) 1671 1675 { 1672 _puts("\n[BOOT ERROR] load_one_elf_file() : ");1676 _puts("\n[BOOT ERROR] in load_one_elf_file() : "); 1673 1677 _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"); 1675 1683 _exit(); 1676 1684 } … … 1986 1994 if ( subtype == PERIPH_SUBTYPE_BDV ) 1987 1995 { 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(); 1994 1997 } 1995 else if ( subtype == PERIPH_SUBTYPE_HBA ) 1998 else if ( subtype == PERIPH_SUBTYPE_HBA ) 1996 1999 { 1997 // TODO 2000 for (channel_id = 0; channel_id < channels; channel_id++) 2001 _hba_init( channel_id ); 1998 2002 } 1999 else if ( subtype == PERIPH_SUBTYPE_SPI ) 2003 else if ( subtype == PERIPH_SUBTYPE_SPI ) 2000 2004 { 2001 // 2005 //TODO 2002 2006 } 2003 break;2004 }2005 case PERIPH_TYPE_CMA: // vci_chbuf_dma component2006 {2007 for (channel_id = 0; channel_id < channels; channel_id++)2008 {2009 // TODO2010 }2011 #if BOOT_DEBUG_PERI2012 _puts("- CMA : channels = ");2013 _putd(channels);2014 _puts("\n");2015 #endif2016 break;2017 }2018 case PERIPH_TYPE_NIC: // vci_multi_nic component2019 {2020 for (channel_id = 0; channel_id < channels; channel_id++)2021 {2022 // TODO2023 }2024 #if BOOT_DEBUG_PERI2025 _puts("- NIC : channels = ");2026 _putd(channels);2027 _puts("\n");2028 #endif2029 2007 break; 2030 2008 } … … 2033 2011 for (channel_id = 0; channel_id < channels; channel_id++) 2034 2012 { 2035 _tty_lock[channel_id].value = 0; 2036 _tty_rx_full[channel_id] = 0; 2013 _tty_init( channel_id ); 2037 2014 } 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 2043 2023 break; 2044 2024 } … … 2058 2038 case PERIPH_TYPE_PIC: // vci_iopic component 2059 2039 { 2060 #if BOOT_DEBUG_PERI2061 _puts("- PIC : channels = ");2062 _putd(channels);2063 _puts("\n");2064 #endif2065 2040 // scan all IRQs defined in mapping for PIC component, 2066 2041 // and initialises addresses for WTI IRQs … … 2224 2199 _puts("\n"); 2225 2200 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 2226 2208 // Load the map.bin file into memory and check it 2227 2209 boot_mapping_init();
Note: See TracChangeset
for help on using the changeset viewer.