1. 10 Apr, 2016 2 commits
  2. 01 Apr, 2016 5 commits
    • Eric Nelson's avatar
      sata: use block layer for sata command · 96baf368
      Eric Nelson authored
      Call blk_dread, blk_dwrite, blk_derase to ensure that the block cache is
      used if enabled and to remove build breakage when CONFIG_BLK is enabled.
      Signed-off-by: default avatarEric Nelson <eric@nelint.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
    • Eric Nelson's avatar
      mmc: use block layer in mmc command · bcfde7ff
      Eric Nelson authored
      Call blk_dread, blk_dwrite, blk_derase to ensure that the block cache is
      used if enabled and to remove build breakage when CONFIG_BLK is enabled.
      Signed-off-by: default avatarEric Nelson <eric@nelint.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
    • Eric Nelson's avatar
      drivers: block: add block device cache · e40cf34a
      Eric Nelson authored
      Add a block device cache to speed up repeated reads of block devices by
      various filesystems.
      This small amount of cache can dramatically speed up filesystem
      operations by skipping repeated reads of common areas of a block
      device (typically directory structures).
      This has shown to have some benefit on FAT filesystem operations of
      loading a kernel and RAM disk, but more dramatic benefits on ext4
      filesystems when the kernel and/or RAM disk are spread across
      multiple extent header structures as described in commit fc0fc50f.
      The cache is implemented through a minimal list (block_cache) maintained
      in most-recently-used order and count of the current number of entries
      (cache_count). It uses a maximum block count setting to prevent copies
      of large block reads and an upper bound on the number of cached areas.
      The maximum number of entries in the cache defaults to 32 and the maximum
      number of blocks per cache entry has a default of 2, which has shown to
      produce the best results on testing of ext4 and FAT filesystems.
      The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows
      changing these values and can be used to tune for a particular filesystem
      Signed-off-by: default avatarEric Nelson <eric@nelint.com>
    • Masahiro Yamada's avatar
      arm64: booti: add missing unmap_sysmem() · 62022d52
      Masahiro Yamada authored
      Make sure to call unmap_sysmem() for address allocated by map_sysmem()
      before leaving the function; however this patch gives no impact on
      the behavior because map_sysmem()/unmap_sysmem() does nothing except
      on Sandbox.  Sandbox never runs this code because "booti" is a command
      for booting ARM64 kernel image.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
    • Simon Glass's avatar
      Drop command-processing code when CONFIG_CMDLINE is disabled · f8bb6964
      Simon Glass authored
      Command parsing and processing code is not needed when the command line is
      disabled. Remove this code in that case.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
  3. 27 Mar, 2016 2 commits
    • Peng Fan's avatar
      cmd: spi: check return value of strdup · 9caeb26c
      Peng Fan authored
      Check return value of strdup.
      Signed-off-by: default avatarPeng Fan <van.freenix@gmail.com>
      Cc: Przemyslaw Marczak <p.marczak@samsung.com>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
    • Alexander Graf's avatar
      efi_loader: Add GOP support · be8d3241
      Alexander Graf authored
      The EFI standard defines a simple boot protocol that an EFI payload can use
      to access video output.
      This patch adds support to expose exactly that one (and the mode already in
      use) as possible graphical configuration to an EFI payload.
      With this, I can successfully run grub2 with graphical output.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
  4. 22 Mar, 2016 4 commits
  5. 18 Mar, 2016 1 commit
  6. 17 Mar, 2016 1 commit
  7. 16 Mar, 2016 4 commits
    • Tom Rini's avatar
      cmd: scsi: Group the command portion together, guard with !CONFIG_SPL_BUILD · ba524269
      Tom Rini authored
      When we switch to including all linker lists in SPL it is important
      to not include commands as that may lead to link errors due to other
      things we have already discarded.  In this case, the SCSI code needs a lot
      of attention so for now just guard the command portions.
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
    • Alexander Graf's avatar
      efi_loader: Pass proper device path in on boot · 0f4060eb
      Alexander Graf authored
      EFI payloads can query for the device they were booted from. Because
      we have a disconnect between loading binaries and running binaries,
      we passed in a dummy device path so far.
      Unfortunately that breaks grub2's logic to find its configuration
      file from the same device it was booted from.
      This patch adds logic to have the "load" command call into our efi
      code to set the device path to the one we last loaded a binary from.
      With this grub2 properly detects where we got booted from and can
      find its configuration file, even when searching by-partition.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    • Alexander Graf's avatar
      efi_loader: Call fdt preparation functions · dea2174d
      Alexander Graf authored
      We have a nice framework around image fils to prepare a device tree
      for OS execution. That one patches in missing device tree nodes and
      fixes up the memory range bits.
      We need to call that one from the EFI boot path too to get all those
      nice fixups. This patch adds the call.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    • Alexander Graf's avatar
      efi_loader: Add "bootefi" command · b9939336
      Alexander Graf authored
      In order to execute an EFI application, we need to bridge the gap between
      U-Boot's notion of executing images and EFI's notion of doing the same.
      The best path forward IMHO here is to stick completely to the way U-Boot
      deals with payloads. You manually load them using whatever method to RAM
      and then have a simple boot command to execute them. So in our case, you
      would do
        # load mmc 0:1 $loadaddr grub.efi
        # bootefi $loadaddr
      which then gets you into a grub shell. Fdt information known to U-boot
      via the fdt addr command is also passed to the EFI payload.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Guard help text with CONFIG_SYS_LONGHELP]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
  8. 14 Mar, 2016 13 commits
  9. 26 Feb, 2016 1 commit
  10. 24 Feb, 2016 3 commits
    • Michal Simek's avatar
      cmd: mem: Show 64bit addresses which are tested · dfe461d6
      Michal Simek authored
      Fix print message to show full 64bit addresses.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Karsten Merker's avatar
      booti: Help text rework. · 6f6051fa
      Karsten Merker authored
      Fix spelling errors in the "booti" help text and bring it more
      in line with the bootm/bootz help texts.
      Signed-off-by: default avatarKarsten Merker <merker@debian.org>
    • Lukasz Majewski's avatar
      dfu: usb: f_dfu: Set deferred call for dfu_flush() function · fc18f8d1
      Lukasz Majewski authored
      This patch fixes situation when one would like to write large file into
      medium with the file system (fat, ext4, etc).
      This change sets file size limitation to the DFU internal buffer size.
      Since u-boot is not supporting interrupts and seek on file systems, it
      becomes challenging to store large file appropriately.
      To reproduce this error - create large file (around 26 MiB) and sent it
      to the target board.
      Lets examine the flow of USB transactions:
      0. DFU uses EP0 with 64B MPS [Max Packet Size]
      1. Send file - OUT (PC->target) - dat_26MiB.img is sent with 4096 B transactions
      2. Get status - OUT (PC->target) - wait for DFU_STATE_dfuDNLOAD_IDLE (0x05) sent
      				   from target board - IN transaction
      3. The whole file content is sent to target - OUT (PC->target) with ZLP [Zero
      					      Length Packet]
      Now the interesting part starts:
      4. OUT (PC->target) Setup transaction (request to share DFU state)
      5. IN (target->PC) - reply the current DFU state
      	- In the UDC driver the req->completion (with dfu_flush) is called
      	  after successful IN transfer.
      	- The dfu_flush() (called from req->completion callback) saves the
      	  whole file at once (u-boot doesn't support seek on fs).
      	  Such operation takes considerable time. When the file
      	  is large - e.g. 26MiB - this time may be more than 5 seconds.
      6. OUT (PC->target) - ZLP, is send in the same time when dfu_flush()
       writes data to eMMC memory.
       The dfu-util application has hard coded timeout on USB transaction
       completion set to 5 seconds (it uses libusb calls).
      When the file to store is large (e.g. 26 MiB) the time needed to write it
      may excess the dfu-util timeout and following error message will be displayed:
      "unable to read DFU status" on the HOST PC console.
      This change is supposed to leverage DFU's part responsible for storing files
      on file systems. Other DFU operations - i.e. raw/partition write to NAND and
      eMMC should work as before.
      The only functional change is the error reporting. When dfu_flush() fails
      the u-boot prompt will exit with error information and dfu-util application
      exits afterwards as well.
      Test HW:
      - Odroid XU3 (Exynos5433) - test with large file
      - Trats (Exynos4210) - test for regression - eMMC, raw,
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Reported-by: default avatarAlex Gdalevich <agdalevich@axion-biosystems.com>
      Tested-by: default avatarStephen Warren <swarren@nvidia.com>
      Tested-by: default avatarHeiko Schocher <hs@denx.de>
  11. 22 Feb, 2016 1 commit
  12. 15 Feb, 2016 1 commit
  13. 09 Feb, 2016 1 commit
    • Stephen Warren's avatar
      itest: allow map_physmem to return 0 in limited cases · 986fe378
      Stephen Warren authored
      On some systems, RAM starts at address 0. If the user executes itest
      against address 0 on such a system, it will call map_physmem(0, ...)
      which will return 0 back; mapping only changes the address on sandbox.
      This causes itest to believe map_physmem() has failed, and hence fails
      the comparison.
      Fix itest so that it allows map_physmem() to return 0 /if/ the orignal
      address passed to it was also 0.
      This fixes "tegra-uboot-flasher flash" on Tegra20.
      This has the disadvantage that on sandbox, failed mapping attempts for
      address 0 are not detected. Instead, should the code only call
      map_physmem() on sandbox? Or, should map_physmem() return its error status
      some other way. Or, should the special case only be allowed on systems
      where the base of RAM is 0 somehow?
      Fixes: 7861204c ("itest: make memory access work under sandbox")
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
  14. 08 Feb, 2016 1 commit