Changeset 962 for trunk/softs/tsar_boot/src
- Timestamp:
- Apr 1, 2015, 3:42:03 PM (10 years ago)
- Location:
- trunk/softs/tsar_boot/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/src/reset_elf_loader.c
r949 r962 43 43 goto error; 44 44 } 45 46 #if (RESET_DEBUG == 1) 47 reset_display_block( (char*)&elf_header ); 48 #endif 49 45 50 check_elf_header(&elf_header); 46 51 -
trunk/softs/tsar_boot/src/reset_ioc.c
r796 r962 7 7 * 8 8 * \note These functions call the specific disk controller driver depending 9 * on the USE_IOC_BDV, USE_IOC_S PIor USE_IOC_RDK constants9 * on the USE_IOC_BDV, USE_IOC_SDC or USE_IOC_RDK constants 10 10 */ 11 11 … … 13 13 #include <defs.h> 14 14 15 #if !defined(USE_IOC_BDV) && !defined(USE_IOC_SPI) && !defined(USE_IOC_RDK)16 # error " One of the USE_IOC_* constants must be defined in thehard_config.h"15 #if (USE_IOC_BDV + USE_IOC_SDC + USE_IOC_RDK + USE_IOC_HBA) != 1 16 # error "in reset_ioc.c : undefined disk controller in hard_config.h" 17 17 #endif 18 18 19 #if (USE_IOC_BDV + USE_IOC_SPI + USE_IOC_RDK) != 1 20 # error "Only one disk controller must be used" 21 #endif 22 23 #if USE_IOC_SPI 19 #if USE_IOC_SDC 24 20 #include <reset_sdc.h> 25 21 #endif … … 33 29 #endif 34 30 31 #if USE_IOC_HBA 32 #include <reset_hba.h> 33 #endif 34 35 35 36 /** 36 37 * \brief Initialize the disk controller … … 40 41 #if USE_IOC_BDV 41 42 return reset_bdv_init(); 42 #elif USE_IOC_S PI43 #elif USE_IOC_SDC 43 44 return reset_sdc_init(); 44 45 #elif USE_IOC_RDK 45 46 return reset_rdk_init(); 47 #elif USE_IOC_HBA 48 return reset_hba_init(); 46 49 #else 47 # error " reset_ioc_init() : Not supported disk controller chosen"50 # error "in reset_ioc_init.c : undefined disk controller in hard_config.h" 48 51 #endif 49 52 } … … 63 66 #if USE_IOC_BDV 64 67 return reset_bdv_read(lba, buffer, count); 65 #elif USE_IOC_S PI68 #elif USE_IOC_SDC 66 69 return reset_sdc_read(lba, buffer, count); 67 70 #elif USE_IOC_RDK 68 71 return reset_rdk_read(lba, buffer, count); 72 #elif USE_IOC_HBA 73 return reset_hba_read(lba, buffer, count); 69 74 #else 70 # error " reset_ioc_read() : Not supported disk controller chosen"75 # error "in reset_ioc_read.c : undefined disk controller in hard_config.h" 71 76 #endif 72 77 } -
trunk/softs/tsar_boot/src/reset_utils.c
r930 r962 178 178 (ehdr->e_ident[EI_MAG3] != ELFMAG3)) 179 179 { 180 reset_puts(" [RESET ERROR] Unrecognized file format (not an ELF format)\n");180 reset_puts("\n[RESET ERROR] Unrecognized file format (not an ELF format)\n"); 181 181 reset_exit(); 182 182 } … … 220 220 } 221 221 222 /** 223 * \param buffer : Pointer to the char buffer 224 * 225 * \brief Print a 512 bytes buffer 226 */ 227 #if (RESET_DEBUG == 1 ) 228 void reset_display_block( char* buffer ) 229 { 230 unsigned int line; 231 unsigned int word; 232 233 reset_puts("***********************************************************************\n"); 234 for ( line = 0 ; line < 32 ; line++ ) 235 { 236 // display line index 237 reset_putx( line ); 238 reset_puts(" : "); 239 240 // display 8*4 bytes hexa 241 for ( word=0 ; word<4 ; word++ ) 242 { 243 unsigned int byte = (line<<5) + (word<<2); 244 unsigned int hexa = (buffer[byte ]<<24) | 245 (buffer[byte+1]<<16) | 246 (buffer[byte+2]<< 8) | 247 (buffer[byte+3]); 248 reset_putx( hexa ); 249 reset_puts(" | "); 250 } 251 reset_puts("\n"); 252 } 253 reset_puts("***********************************************************************\n"); 254 } 255 #endif 256 222 257 /* 223 258 * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab
Note: See TracChangeset
for help on using the changeset viewer.