Ignore:
Timestamp:
May 16, 2013, 3:01:37 PM (11 years ago)
Author:
cfuguet
Message:

Modifications in tsar/trunk/softs/tsar_boot:

  • Improving the boot_ioc_read when using a SD card in FPGA platform.
  • Adding some instrumentation on the SD card driver (under preprocessor conditional directives).
  • Including Doxyfile for generate documentation using doxygen.
  • Improving the Makefile to include doc generation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/src/boot_elf_loader.c

    r292 r388  
    7373            {
    7474                boot_puts (
    75                                         "ERROR: "
    76                                         "IOC_FAILED"
    77                                         "\n"
    78                                 );
     75                    "ERROR: "
     76                    "IOC_FAILED"
     77                    "\n"
     78                );
    7979
    8080                boot_exit();
    8181            }
    82            
     82
    8383            nb_block    += 1;
    8484            nb_available = 512;
     
    102102                    nb_rest = elf_header_ptr->e_phnum * elf_header_ptr->e_phentsize;
    103103
    104                                         /* Verification of ELF Magic Number */
    105                                         if (
    106                                                 (elf_header_ptr->e_ident[EI_MAG0] != ELFMAG0) ||
    107                                                 (elf_header_ptr->e_ident[EI_MAG1] != ELFMAG1) ||
    108                                                 (elf_header_ptr->e_ident[EI_MAG2] != ELFMAG2) ||
    109                                                 (elf_header_ptr->e_ident[EI_MAG3] != ELFMAG3) )
    110                                         {
    111                                                 boot_puts(
    112                                                         "ERROR: "
    113                                                         "Input file does not use ELF format"
    114                                                         "\n"
    115                                                 );     
    116 
    117                                                 boot_exit();
    118                                         }
    119 
    120                                         /*
    121                                         * Verification of Program Headers table size. It must be
    122                                         * smaller than the work size allocated for the
    123                                         * elf_pht[PHDR_ARRAY_SIZE] array
    124                                         **/
     104                    /* Verification of ELF Magic Number */
     105                    if (
     106                        (elf_header_ptr->e_ident[EI_MAG0] != ELFMAG0) ||
     107                        (elf_header_ptr->e_ident[EI_MAG1] != ELFMAG1) ||
     108                        (elf_header_ptr->e_ident[EI_MAG2] != ELFMAG2) ||
     109                        (elf_header_ptr->e_ident[EI_MAG3] != ELFMAG3) )
     110                    {
     111                        boot_puts(
     112                            "ERROR: "
     113                            "Input file does not use ELF format"
     114                            "\n"
     115                        ); 
     116
     117                        boot_exit();
     118                    }
     119
     120                    /*
     121                    * Verification of Program Headers table size. It must be
     122                    * smaller than the work size allocated for the
     123                    * elf_pht[PHDR_ARRAY_SIZE] array
     124                    **/
    125125                    if (elf_header_ptr->e_phnum > PHDR_ARRAY_SIZE)
    126126                    {
    127127                        boot_puts(
    128                                                         "ERROR: "
    129                                                         "ELF PHDR table size is bigger than "
    130                                                         "the allocated work space"
    131                                                         "\n"
    132                                                 );
     128                            "ERROR: "
     129                            "ELF PHDR table size is bigger than "
     130                            "the allocated work space"
     131                            "\n"
     132                        );
    133133
    134134                        boot_exit();
     
    257257
    258258    boot_puts (
    259                 "Finishing boot_elf_loader function.\n"
    260                 "Entry point address: "
    261         );
     259        "Finishing boot_elf_loader function.\n"
     260        "Entry point address: "
     261    );
    262262    boot_putx(elf_header_ptr->e_entry);
    263263    boot_puts("\n");
Note: See TracChangeset for help on using the changeset viewer.