Skip to content
Snippets Groups Projects
  1. Apr 13, 2011
  2. Feb 12, 2011
  3. Oct 07, 2010
  4. Jul 04, 2010
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  5. Apr 13, 2010
  6. Dec 05, 2009
  7. Mar 20, 2009
    • Graeme Russ's avatar
      Rewrite i386 interrupt handling · abf0cd3d
      Graeme Russ authored
      Rewrite interrupt handling functionality for the i386 port. Separated
      functionality into separate CPU and Architecture components.
      
      It appears as if the i386 interrupt handler functionality was intended
      to allow multiple handlers to be installed for a given interrupt.
      Unfortunately, this functionality was not fully implemented and also
      had the problem that irq_free_handler() does not allow the passing
      of the handler function pointer and therefore could never be used to
      free specific handlers that had been installed for a given IRQ.
      
      There were also various issues with array bounds not being fully
      tested.
      
      I had two objectives in mind for the new implementation:
      
      1) Keep the implementation as similar as possible to existing
         implementations. To that end, I have used the leon2/3
         implementations as the reference
      
      2) Seperate CPU and Architecture specific elements. All specific i386
         interrupt functionality is now in cpu/i386/ with the high level
         API and architecture specific code in lib_i386. Functionality
         specific to the PC/AT architecture (i.e. cascaded i8259 PICs) has
         been further split out into an individual file to allow for the
         implementation of the PIC architecture of the SC520 CPU (supports
         more IRQs)
      
      Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
      abf0cd3d
  8. Jan 24, 2009
    • Graeme Russ's avatar
      Moved generic (triple fault) reset code · 3f5f18d1
      Graeme Russ authored
      
      Moved from interrupts.c to cpu.c and made into a weak function to
      allow vendor specific override
      
      Vendor specific CPU reset (like the AMD SC520 MMCR reset) can now be
      added to the vendor specific code without the need to remember to
      #undef usage of the generic method and if you forget to include your
      custom reset method, you will always get the default.
      
      Signed-off-by: default avatarGraeme Russ <graeme.russ@gmail.com>
      3f5f18d1
  9. Apr 03, 2005
  10. Jun 27, 2003
    • Wolfgang Denk's avatar
      * Code cleanup: · 8bde7f77
      Wolfgang Denk authored
        - remove trailing white space, trailing empty lines, C++ comments, etc.
        - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
      
      * Patches by Kenneth Johansson, 25 Jun 2003:
        - major rework of command structure
          (work done mostly by Michal Cendrowski and Joakim Kristiansen)
      8bde7f77
  11. May 31, 2003
    • Wolfgang Denk's avatar
      * Patch by Marc Singer, 29 May 2003: · 7a8e9bed
      Wolfgang Denk authored
        Fixed rarp boot method for IA32 and other little-endian CPUs.
      
      * Patch by Marc Singer, 28 May 2003:
        Added port I/O commands.
      
      * Patch by Matthew McClintock, 28 May 2003
        - cpu/mpc824x/start.S: fix relocation code when booting from RAM
        - minor patches for utx8245
      
      * Patch by Daniel Engström, 28 May 2003:
        x86 update
      
      * Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
        add nand flash support to SXNI855T configuration
        fix/extend nand flash support:
        - fix 'nand erase' command so does not erase bad blocks
        - fix 'nand write' command so does not write to bad blocks
        - fix nand_probe() so handles no flash detected properly
        - add doc/README.nand
        - add .jffs2 and .oob options to nand read/write
        - add 'nand bad' command to list bad blocks
        - add 'clean' option to 'nand erase' to write JFFS2 clean markers
        - make NAND read/write faster
      
      * Patch by Rune Torgersen, 23 May 2003:
        Update for MPC8266ADS board
      7a8e9bed
  12. Nov 18, 2002
  13. Nov 03, 2002
  14. Sep 09, 2002
  15. Sep 08, 2002
  16. Aug 27, 2002
  17. Dec 28, 2000
  18. Dec 14, 2000
  19. Nov 12, 2000
Loading