1. 15 May, 2012 1 commit
  2. 06 Mar, 2012 1 commit
  3. 26 Jul, 2011 1 commit
  4. 24 Jul, 2010 1 commit
  5. 04 Jul, 2010 1 commit
    • 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
  6. 17 Jul, 2009 1 commit
    • Mike Frysinger's avatar
      sata: namespace curr_device variable · 569460eb
      Mike Frysinger authored
      The curr_device variable really should be namespaced with a "sata_" prefix
      since it is only used by the sata code.  It also avoids random conflicts
      with other pieces of code (like cmd_mmc):
      common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
      	multiple definition of `curr_device'
      common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      569460eb
  7. 12 Jun, 2009 1 commit
    • Wolfgang Denk's avatar
      General help message cleanup · a89c33db
      Wolfgang Denk authored
      Many of the help messages were not really helpful; for example, many
      commands that take no arguments would not print a correct synopsis
      line, but "No additional help available." which is not exactly wrong,
      but not helpful either.
      
      Commit ``Make "usage" messages more helpful.'' changed this
      partially. But it also became clear that lots of "Usage" and "Help"
      messages (fields "usage" and "help" in struct cmd_tbl_s respective)
      were actually redundant.
      
      This patch cleans this up - for example:
      
      Before:
      	=> help dtt
      	dtt - Digital Thermometer and Thermostat
      
      	Usage:
      	dtt         - Read temperature from digital thermometer and thermostat.
      
      After:
      	=> help dtt
      	dtt - Read temperature from Digital Thermometer and Thermostat
      
      	Usage:
      	dtt
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      a89c33db
  8. 28 Jan, 2009 2 commits
  9. 27 Jan, 2009 1 commit
    • Mike Frysinger's avatar
      SATA: do not auto-initialize during boot · cf7e399f
      Mike Frysinger authored
      Rather than have the board code initialize SATA automatically during boot,
      make the user manually run "sata init".  This brings the SATA subsystem in
      line with common U-Boot policy.
      
      Rather than having a dedicated weak function "is_sata_supported", people
      can override sata_initialize() to do their weird board stuff.  Then they
      can call the actual __sata_initialize().
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      cf7e399f
  10. 18 Oct, 2008 1 commit
  11. 26 Mar, 2008 2 commits
  12. 30 Jun, 2007 1 commit
  13. 15 May, 2007 2 commits
    • Wolfgang Denk's avatar
      Minor coding style cleanup. · 3162eb83
      Wolfgang Denk authored
      3162eb83
    • mushtaq khan's avatar
      Add driver for S-ATA-controller on Intel processors with South · 66d9dbec
      mushtaq khan authored
      Bridge, ICH-5, ICH-6 and ICH-7. 
      
      Implementation:
      
      1. Code is divided in to two files. All functions, which are
         controller specific are kept in "drivers/ata_piix.c" file and
         functions, which are not controller specific, are kept in
         "common/cmd_sata.c" file.
      
      2. Reading and Writing from the S-ATA drive is done using PIO method.
      
      3. Driver can be configured for 48-bit addressing by defining macro
         CONFIG_LBA48, if this macro is not defined driver uses the 28-bit
         addressing.
      
      4. S-ATA read function is hooked to the File system, commands like
         ext2ls and ext2load file can be used. This has been tested.
      
      5. U-Boot command "SATA_init" is added, which initializes the S-ATA
         controller and identifies the S-ATA drives connected to it.
      
      6. U-Boot command "sata" is added, which is used to read/write, print
         partition table and get info about the drives present. This I have
         implemented in same way as "ide" command is implemented in U-Boot.
      
      7. This driver is for S-ATA in native mode.
      
      8. This driver does not support the Native command queuing and
         Hot-plugging.
      Signed-off-by: default avatarMushtaq Khan <mushtaq_k@procsys.com>
      66d9dbec