1. 20 Oct, 2010 1 commit
    • Stefano Babic's avatar
      FAT: buffer overflow with FAT12/16 · 11c8dd36
      Stefano Babic authored
      Last commit 3831530da was intended
      "explicitly specify FAT12/16 root directory parsing buffer size, instead
      of relying on cluster size". Howver, the underlying function requires
      the size of the buffer in blocks, not in bytes, and instead of passing
      a double sector size a request for 1024 blocks is sent. This generates
      a buffer overflow with overwriting of other structure (in the case seen,
      USB structures were overwritten).
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      CC: Mikhail Zolotaryov <lebon@lebon.org.ua>
  2. 12 Oct, 2010 1 commit
    • Mikhail Zolotaryov's avatar
      VFAT: fix processing of scattered long file name entries · 3831530d
      Mikhail Zolotaryov authored
      The U-Boot code has the following bugs related to the processing of Long File
      Name (LFN) entries scattered across several clusters/sectors :
      1) get_vfatname() function is designed to gather scattered LFN entries by
      cluster chain processing - that doesn't work for FAT12/16 root directory.
      In other words, the function expects the following input data:
       1.1) FAT32 directory (which is cluster chain based);
       1.2) FAT12/16 non-root directory (which is also cluster chain based);
       1.3) FAT12/16 root directory (allocated as contiguous sectors area), but
       all necessary information MUST be within the input buffer of filesystem cluster
       size (thus cluster-chain jump is never initiated).
      In order to accomplish the last condition, root directory parsing code in
      do_fat_read() uses the following trick: read-out cluster-size block, process
      only first sector (512 bytes), then shift 512 forward, read-out cluster-size
      block and so on. This works great unless cluster size is equal to 512 bytes
      (in a case you have a small partition), or long file name entries are scattered
      across three sectors, see 4) for details.
      2) Despite of the fact that get_vfatname() supports FAT32 root directory
      browsing, do_fat_read() function doesn't send current cluster number correctly,
      so root directory look-up doesn't work correctly.
      3) get_vfatname() doesn't gather scattered entries correctly also is the case
      when all LFN entries are located at the end of the source cluster, but real
      directory entry (which must be returned) is at the only beginning of the
      next one. No error detected, the resulting directory entry returned contains
      a semi-random information (wrong size, wrong start cluster number and so on)
      i.e. the entry is not accessible.
      4) LFN (VFAT) allows up to 20 entries (slots) each containing 26 bytes (13
      UTF-16 code units) to represent a single long file name i.e. up to 520 bytes.
      U-Boot allocates 256 bytes buffer instead, i.e. 10 or more LFN slots record
      may cause buffer overflow / memory corruption.
      Also, it's worth to mention that 20+1 slots occupy 672 bytes space which may
      take more than one cluster of 512 bytes (medium-size FAT32 or small FAT16
      partition) - get_vfatname() function doesn't support such case as well.
      The patch attached fixes these problems in the following way:
      - keep using 256 bytes buffer for a long file name, but safely prevent a
      possible buffer overflow (skip LFN processing, if it contains 10 or more
      - explicitly specify FAT12/16 root directory parsing buffer size, instead
      of relying on cluster size. The value used is a double sector size (to store
      current sector and the next one). This fixes the first problem and increases
      performance on big FAT12/16 partitions;
      - send current cluster number (FAT32) to get_vfatname() during root
      directory processing;
      - use LFN counter to seek the real directory entry in get_vfatname() - fixes the
      third problem;
      - skip deleted entries in the root directory (to prevent bogus buffer
      overflow detection and LFN counter steps).
      Note: it's not advised to split up the patch, because a separate part may
      operate incorrectly.
      Signed-off-by: default avatarMikhail Zolotaryov <lebon@lebon.org.ua>
  3. 24 Jul, 2010 3 commits
    • Wolfgang Denk's avatar
      fs/fat: Big code cleanup. · 7385c28e
      Wolfgang Denk authored
      - reformat
      - throw out macros like FAT_DPRINT and FAT_DPRINT
      - remove dead code
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
    • Wolfgang Denk's avatar
      FAT32: fix broken root directory handling. · 2aa98c66
      Wolfgang Denk authored
      On FAT32, instead of fetching the cluster numbers from the FAT, the
      code assumed (incorrectly) that the clusters for the root directory
      were allocated contiguously. In the result, only the first cluster
      could be accessed. At the typical cluster size of 8 sectors this
      caused all accesses to files after the first 128 entries to fail -
      "fatls" would terminate after 128 files (usually displaying a bogus
      file name, occasionally even crashing the system), and "fatload"
      would fail to find any files that were not in the first directory
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
    • Wolfgang Denk's avatar
      FAT32: fix support for superfloppy-format (PBR) · 66c2d73c
      Wolfgang Denk authored
      "Superfloppy" format (in U-Boot called PBR) did not work for FAT32 as
      the file system type string is at a different location. Add support
      for FAT32.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
  4. 28 May, 2010 1 commit
  5. 12 Jun, 2009 1 commit
    • Tom Rix's avatar
      FAT replace compare_sign with strncmp. · 651351fe
      Tom Rix authored
      The static function compare_sign is only used to compare the fs_type string
      and does not do anything more than what strncmp does.
      The addition of the trailing '\0' to fs_type, while legal, is not needed
      because the it is never printed out and strncmp does not depend on NULL
      terminated strings.
      Signed-off-by: default avatarTom Rix <Tom.Rix@windriver.com>
  6. 03 Apr, 2009 1 commit
    • unsik Kim's avatar
      mflash: Initial mflash support · 75eb82ec
      unsik Kim authored
      Mflash is fusion memory device mainly targeted consumer eletronic and
      mobile phone.
      Internally, it have nand flash and other hardware logics and supports
      some different operation (ATA, IO, XIP) modes.
      IO mode is custom mode for the host that doesn't have IDE interface.
      (Many mobile targeted SoC doesn't have IDE bus)
      This driver support mflash IO mode.
      Followings are brief descriptions about IO mode.
      1. IO mode based on ATA protocol and uses some custom command. (read
         confirm, write confirm)
      2. IO mode uses SRAM bus interface.
      Signed-off-by: default avatarunsik Kim <donari75@gmail.com>
  7. 27 Jan, 2009 1 commit
  8. 24 Jan, 2009 1 commit
  9. 10 Dec, 2008 1 commit
  10. 04 Dec, 2008 1 commit
    • Remy Bohmer's avatar
      Remove non-ascii characters from fat code · 3c2c2f42
      Remy Bohmer authored
      This code contains some non-ascii characters in comment lines and code.
      Most editors do not display those characters properly and editing those
      files results always in diffs at these places which are usually not required
      to be changed at all. This is error prone.
      So, remove those weird characters and replace them by normal C-style
      equivalents for which the proper defines were already in the header.
      Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
  11. 31 Aug, 2008 1 commit
  12. 02 Mar, 2008 1 commit
  13. 14 Feb, 2008 1 commit
  14. 09 Jan, 2008 1 commit
  15. 07 Aug, 2007 1 commit
  16. 09 Jul, 2007 1 commit
  17. 03 Jul, 2007 1 commit
  18. 22 Jun, 2007 1 commit
    • Heiko Schocher's avatar
      [PCS440EP] upgrade the PCS440EP board: · 566a494f
      Heiko Schocher authored
                      - Show on the Status LEDs, some States of the board.
                      - Get the MAC addresses from the EEProm
                      - use PREBOOT
                      - use the CF on the board.
                      - check the U-Boot image in the Flash with a SHA1
                      - use dynamic TLB entries generation for the SDRAM
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
  19. 18 May, 2007 1 commit
  20. 09 May, 2007 1 commit
  21. 08 Oct, 2006 1 commit
  22. 01 Sep, 2006 1 commit
    • Marian Balakowicz's avatar
      Add support for a saving build objects in a separate directory. · f9328639
      Marian Balakowicz authored
      Modifications are based on the linux kernel approach and
      support two use cases:
        1) Add O= to the make command line
        'make O=/tmp/build all'
        2) Set environement variable BUILD_DIR to point to the desired location
        'export BUILD_DIR=/tmp/build'
      The second approach can also be used with a MAKEALL script
      'export BUILD_DIR=/tmp/build'
      Command line 'O=' setting overrides BUILD_DIR environent variable.
      When none of the above methods is used the local build is performed and
      the object files are placed in the source directory.
  23. 13 Oct, 2005 1 commit
  24. 05 Aug, 2005 1 commit
  25. 16 Dec, 2004 1 commit
  26. 29 Sep, 2004 1 commit
    • wdenk's avatar
      * Patches by Sean Chang, 09 Aug 2004: · a5bbcc3c
      wdenk authored
        - Added support for both 8 and 16 bit mode access to System ACE CF
          through MPU.
        - Fixed missing System ACE CF device during get FAT partition info
          in fat_register_device function.
        - Enabled System ACE CF support on ML300.
      * Patch by Sean Chang, 09 Aug 2004:
        Synch defines for saveenv and do_saveenv functions so they get
        compiled under the same statement.
  27. 14 Mar, 2004 1 commit
    • wdenk's avatar
      * Patches by Travis Sawyer, 12 Mar 2004: · 855a496f
      wdenk authored
        - Fix Gigabit Ethernet support for 440GX
        - Add Gigabit Ethernet Support to MII PHY utilities
      * Patch by Brad Kemp, 12 Mar 2004:
        Fixes for drivers/cfi_flash.c:
        - Better support for x8/x16 implementations
        - Added failure for AMD chips attempting to use CFG_FLASH_USE_BUFFER_WRITE
        - Added defines for AMD command and address constants
      * Patch by Leon Kukovec, 12 Mar 2004:
        Fix get_dentfromdir() to correctly handle deleted dentries
      * Patch by George G. Davis, 11 Mar 2004:
        Remove hard coded network settings in TI OMAP1610 H2
        default board config
      * Patch by George G. Davis, 11 Mar 2004:
        add support for ADS GraphicsClient+ board.
  28. 26 Feb, 2004 1 commit
    • wdenk's avatar
      * Patch by Markus Pietrek, 24 Feb 2004: · 80885a9d
      wdenk authored
        NS9750 DevBoard added
      * Patch by Pierre AUBERT, 24 Feb 2004
        add USB support for MPC5200
      * Patch by Steven Scholz, 24 Feb 2004:
        - fix MII commands to use values from last command
      * Patch by Torsten Demke, 24 Feb 2004:
        Add support for the eXalion platform (SPSW-8240, F-30, F-300)
  29. 23 Feb, 2004 1 commit
    • wdenk's avatar
      * Patch by Thomas Elste, 10 Feb 2004: · 2d1a537d
      wdenk authored
        Add support for NET+50 CPU and ModNET50 board
      * Patch by Sam Song, 10 Feb 2004:
        Fix typos in cfi_flash.c
      * Patch by Leon Kukovec, 10 Feb 2004
        Fixed long dir entry slot id calculation in get_vfatname
      * Patch by Robin Gilks, 10 Feb 2004:
        add "itest" command (operators: -eq, -ne, -lt, -gt, -le, -ge, ==,
        !=, <>, <, >, <=, >=)
  30. 07 Dec, 2003 1 commit
    • wdenk's avatar
      * Patches by David Mller, 14 Nov 2003: · a2663ea4
      wdenk authored
        - board/mpl/common/common_util.c
          * implement support for BZIP2 compressed images
          * various cleanups (printf -> puts, ...)
        - board/mpl/common/flash.c
          * report correct errors to upper layers
          * check the erase fail and VPP low bits in status reg
        - board/mpl/vcma9/cmd_vcma9.c
        - board/mpl/vcma9/flash.c
          * various cleanups (printf -> puts, ...)
        - common/cmd_usb.c
          * fix typo in comment
        - cpu/arm920t/usb_ohci.c
          * support for S3C2410 is missing in #if line
        - drivers/cs8900.c
          * reinit some registers in case of error (cable missing, ...)
        - fs/fat/fat.c
          * support for USB/MMC devices is missing in #if line
        - include/configs/MIP405.h
        - include/configs/PIP405.h
          * enable BZIP2 support
          * enlarge malloc space to 1MiB because of BZIP2 support
        - include/configs/VCMA9.h
          * enable BZIP2 support
          * enlarge malloc space to 1MiB because of BZIP2 support
          * enable USB support
        - lib_arm/armlinux.c
          * change calling convention of ARM Linux kernel as
            described on http://www.arm.linux.org.uk/developer/booting.php
      * Patch by Thomas Lange, 14 Nov 2003:
        Split dbau1x00 into dbau1000, dbau1100 and dbau1500 configs to
        support all these AMD boards.
      * Patch by Thomas Lange, 14 Nov 2003:
        Workaround for mips au1x00 physical memory accesses (the au1x00
        uses a 36 bit bus internally and cannot access physical memory
        directly. Use the uncached SDRAM address instead of the physical
  31. 29 Oct, 2003 1 commit
    • wdenk's avatar
      * Prepare for release · 5fa66df6
      wdenk authored
      * Fix problems in memory test on some boards (which was not
        non-destructive as intended)
      * Patch by Gary Jennejohn, 28 Oct 2003:
        Change fs/fat/fat.c to put I/O buffers in BSS instead on the stack
        to prevent stack overflow on ARM systems
  32. 09 Oct, 2003 1 commit
    • wdenk's avatar
      * Patch by Martin Krause, 09 Oct 2003: · a0ff7f2e
      wdenk authored
        Fixes for TRAB board
        - /board/trab/rs485.c: correct baudrate
        - /board/trab/cmd_trab.c: bug fix for problem with timer overflow in
          udelay(); fix some timing problems with adc controller
        - /board/trab/trab_fkt.c: add new commands: gain, eeprom and power;
          modify commands: touch and buzzer
      * Disable CONFIG_SUPPORT_VFAT when used with CONFIG_AUTO_UPDATE
        (quick & dirty workaround for rogue pointer problem in get_vfatname());
        Use direct function calls for auto_update instead of hush commands
  33. 11 Sep, 2003 1 commit
    • wdenk's avatar
      * Patch by Gary Jennejohn, 11 Sep 2003: · a43278a4
      wdenk authored
        - allow for longer timeouts for USB mass storage devices
      * Patch by Denis Peter, 11 Sep 2003:
        - fix USB data pointer assignment for bulk only transfer.
        - prevent to display erased directories in FAT filesystem.
      * Change output format for NAND flash - make it look like for other
        memory, too
  34. 10 Sep, 2003 1 commit
    • wdenk's avatar
      * Patches by Denis Peter, 9 Sep 2003: · 7205e407
      wdenk authored
        add FAT support for IDE, SCSI and USB
      * Patches by Gleb Natapov, 2 Sep 2003:
        - cleanup of POST code for unsupported architectures
        - MPC824x locks way0 of data cache for use as initial RAM;
          this patch unlocks it after relocation to RAM and invalidates
          the locked entries.
      * Patch by Gleb Natapov, 30 Aug 2003:
        new I2C driver for mpc107 bridge. Now works from flash.
      * Patch by Dave Ellis, 11 Aug 2003:
        - JFFS2: fix typo in common/cmd_jffs2.c
        - JFFS2: fix CFG_JFFS2_SORT_FRAGMENTS option
        - JFFS2: remove node version 0 warning
        - JFFS2: accept JFFS2 PADDING nodes
        - SXNI855T: add AM29LV800 support
        - SXNI855T: move environment from EEPROM to flash
        - SXNI855T: boot from JFFS2 in NOR or NAND flash
      * Patch by Bill Hargen, 11 Aug 2003:
        fixes for I2C on MPC8240
        - fix i2c_write routine
        - fix iprobe command
        - eliminates use of global variables, plus dead code, cleanup.
  35. 27 Jun, 2003 1 commit
    • wdenk's avatar
      * Code cleanup: · 8bde7f77
      wdenk 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)
  36. 15 Jun, 2003 1 commit
    • wdenk's avatar
      * Fix CONFIG_NET_MULTI support in include/net.h · 71f95118
      wdenk authored
      * Patches by Kyle Harris, 13 Mar 2003:
        - Add FAT partition support
        - Add command support for FAT
        - Add command support for MMC
        - Add Intel PXA support for video
        - Add Intel PXA support for MMC
        - Enable MMC and FAT for lubbock board
        - Other misc changes for lubbock board