1. 05 Dec, 2019 8 commits
    • Giulio Benetti's avatar
      spl: fix entry_point equal to load_addr · d3e97b53
      Giulio Benetti authored
      At the moment entry_point is set to image_get_load(header) that sets it
      to "load address" instead of "entry point", assuming entry_point is
      equal to load_addr, but it's not true. Then load_addr is set to
      "entry_point - header_size", but this is wrong too since load_addr is
      not an entry point.
      
      So use image_get_ep() for entry_point assignment and image_get_load()
      for load_addr assignment.
      Signed-off-by: default avatarGiulio Benetti <giulio.benetti@benettiengineering.com>
      d3e97b53
    • AKASHI Takahiro's avatar
      test/py: test_fs: add tests for creating/deleting many files · 995237b0
      AKASHI Takahiro authored
      # This is actually a resent patch of
      # [1] https://lists.denx.de/pipermail/u-boot/2019-May/369170.html
      
      Two test cases are added under test_fs_ext:
          test case 10: for root directory
          test case 11: for non-root directory
      
      Those will verify a behavior fixed by the commits related to
      root directory
      ("fs: fat: allocate a new cluster for root directory of fat32" and
      "fs: fat: flush a directory cluster properly"), and focus on
      handling long-file-name directory entries under a directory.
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      995237b0
    • AKASHI Takahiro's avatar
      fs: fat: handle deleted directory entries correctly · 39606d46
      AKASHI Takahiro authored
      Unlink test for FAT file system seems to fail at test_unlink2.
      (When I added this test, I haven't seen any errors though.)
      for example,
      ===8<===
      fs_obj_unlink = ['fat', '/home/akashi/tmp/uboot_sandbox_test/128MB.fat32.img']
      
          def test_unlink2(self, u_boot_console, fs_obj_unlink):
              """
              Test Case 2 - delete many files
              """
              fs_type,fs_img = fs_obj_unlink
              with u_boot_console.log.section('Test Case 2 - unlink (many)'):
                  output = u_boot_console.run_command('host bind 0 %s' % fs_img)
      
                  for i in range(0, 20):
                      output = u_boot_console.run_command_list([
                          '%srm host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i),
                          '%sls host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i)])
                      assert('' == ''.join(output))
      
                  output = u_boot_console.run_command(
                      '%sls host 0:0 dir2' % fs_type)
      >           assert('0 file(s), 2 dir(s)' in output)
      E           AssertionError: assert '0 file(s), 2 dir(s)' in '            ./\r\r\n            ../\r\r\n        0   0123456789abcdef11\r\r\n\r\r\n1 file(s), 2 dir(s)'
      
      test/py/tests/test_fs/test_unlink.py:52: AssertionError
      ===>8===
      
      This can happen when fat_itr_next() wrongly detects an already-
      deleted directory entry.
      
      File deletion, which was added in the commit f8240ce9 ("fs: fat:
      support unlink"), is implemented by marking its entry for a short name
      with DELETED_FLAG, but related entry slots for a long file name are kept
      unmodified. (So entries will never be actually deleted from media.)
      
      To handle this case correctly, an additional check for a directory slot
      will be needed in fat_itr_next().
      
      In addition, I added extra comments about long file name and short file
      name format in FAT file system. Although they are not directly related
      to the issue, I hope it will be helpful for better understandings
      in general.
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      39606d46
    • Jorge Ramirez-Ortiz's avatar
      drivers: optee: rpmb: fix returning CID to TEE · 2464b229
      Jorge Ramirez-Ortiz authored
      The mmc CID value is one of the input parameters used to provision the
      RPMB key. The trusted execution environment expects this value to be
      specified in big endian format.
      
      Before this fix, on little endian systems, the value returned by the
      linux kernel mmc driver differed from the one returned by u-boot.
      This meant that if linux provisioned the RPMB key, u-boot would not
      have access to the partition (and the other way around).
      Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge@foundries.io>
      Reviewed-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      2464b229
    • Philippe Reynes's avatar
      cmd: cp: add missing map_sysmem · 787f10a9
      Philippe Reynes authored
      The command cp fails on sandbox because the address is used
      directly. To fix this issue, we call the function map_sysmem
      to translate the address.
      Signed-off-by: default avatarPhilippe Reynes <philippe.reynes@softathome.com>
      787f10a9
    • Philippe Reynes's avatar
      iminfo: add missing map_sysmem · ae0d12f8
      Philippe Reynes authored
      The command iminfo fails on sandbox because the address
      is used directly. To fix this issue, we call the function
      map_sysmem to translate the address.
      Signed-off-by: default avatarPhilippe Reynes <philippe.reynes@softathome.com>
      ae0d12f8
    • Lukasz Majewski's avatar
      spl: Introduce SPL_DM_GPIO Kconfig define · d4d65e11
      Lukasz Majewski authored
      This define indicates if DM_GPIO shall be supported in SPL. This allows
      proper operation of DM converted GPIO drivers in SPL, which use
      boards.
      Signed-off-by: Lukasz Majewski's avatarLukasz Majewski <lukma@denx.de>
      d4d65e11
    • Michael Walle's avatar
      drivers: pci: ignore disabled devices · a6cd597a
      Michael Walle authored
      PCI devices may be disabled in the device tree. Devices which are probed
      by the device tree handle the "status" property and are skipped if
      disabled. Devices which are probed by the PCI enumeration don't check
      that property. Fix it.
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Reviewed-by: default avatarAlex Marginean <alexandru.marginean@nxp.com>
      Tested-by: default avatarAlex Marginean <alexandru.marginean@nxp.com>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      a6cd597a
  2. 04 Dec, 2019 28 commits
  3. 03 Dec, 2019 4 commits