1. 28 5月, 2021 3 次提交
    • A
      efi_loader: Work-around build issue due to missing hash_calculate() · 464010b0
      Alexandru Gagniuc 提交于
      The hash_calculate() symbol is provided by hash-checksum.c. It depends
      on hash_progressive_lookup_algo(), provided when CONFIG_HASH=y.
      
      The issue is that hash_calculate() is used by the efi_loader,
      irregardless of CONFIG_FIT_SIGNATURE. As pointed out in
      commit 87316da0 ("lib: introduce HASH_CALCULATE option"),
      enabling hash_calculate() based on CONFIG_FIT_SIGNATURE is incorrect.
      
      To resolve this, use CONFIG_HASH as the compile switch for
      hash-checksum.c. This ensures that all dependencies are compiled, and
      is the most natural Kconfig to use.
      
      There is the issue of having to 'select HASH' in a couple of places
      that already 'select SHA256'. This is a deeper problem with how hashes
      are organized, and fixing it is beyonf the scope of this change.
      Signed-off-by: NAlexandru Gagniuc <mr.nuke.me@gmail.com>
      Acked-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
      464010b0
    • A
      Revert "lib: introduce HASH_CALCULATE option" · ec0512b1
      Alexandru Gagniuc 提交于
      When we think of Kconfig, we usually think of features that we like
      to enable or not. Ideally, we wouldn't use Kconfig to fix a build
      issue, although sometimes it might make sense. With Kconfig it's hard
      to guarantee that the fix is universal. We can only say that it works
      for the set of tested configurations. In the majority of cases, it's
      preferable to let the linker figure things out for us.
      
      The reverted commit attempted to fix a build issue by adding an
      invisible Kconfig option. This is wrong in several ways:
      
      It invents a new Kconfig variable when CONFIG_HASH already
      exists for the same purpose.
      Second, hash-checksum.c makes use of the hash_progressive_lookup_algo()
      symbol, which is only provided with CONFIG_HASH, but this dependency
      was not expressed in the reverted patch.
      
      It feels like Kconfig is turning into a listing of all available
      source files, and a buffet to 'select' which ones to compile. The
      purpose of this revert is to enable the next change to make use of
      CONFIG_HASH instead of adding to Kconfig.
      
      This reverts commit 87316da0.
      Signed-off-by: NAlexandru Gagniuc <mr.nuke.me@gmail.com>
      Acked-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
      ec0512b1
    • I
      efi_loader: Fix coverity warnings for efi tcg2 protocol · 38de680e
      Ilias Apalodimas 提交于
      Coverity reported 3 warnings on the current code.
      CID 331856, 331855, 331854 on the latest scan.
      
      Fix the rest of the warnings by initializing the variables before
      passing them to tpm2_get_pcr_info().
      In order to avoid future warnings and errors initialize them to 0 within
      the function as well, since the values are always OR'ed after querying the
      hardware.
      Signed-off-by: NIlias Apalodimas <ilias.apalodimas@linaro.org>
      38de680e
  2. 27 5月, 2021 17 次提交
    • T
      Merge tag 'ti-v2021.07-rc4' of https://source.denx.de/u-boot/custodians/u-boot-ti · aab8b17e
      Tom Rini 提交于
      - Fix reset for AM64 platforms
      - Enable networking PHY driver for AM64
      - Fix default R5F cluster setting in J7
      aab8b17e
    • T
      Merge branch '2021-05-26-assorted-bugfixes' · a0ecfa56
      Tom Rini 提交于
      a0ecfa56
    • F
      ARM: ti: Increase the allocated size for MLO.raw · fed603f8
      Faiz Abbas 提交于
      MLO has increased to a size greater than the allocated
      128 kB in dfu_alt_info_emmc and _mmc.
      
      Therefore, double the allocated size for MLO.raw in
      the default environment.
      Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
      Signed-off-by: NAswath Govindraju <a-govindraju@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      Link: https://lore.kernel.org/r/20210419065027.5834-1-a-govindraju@ti.com
      fed603f8
    • S
      arm: dts: k3-am642-sk: Add sysreset controller node · 7194a95d
      Suman Anna 提交于
      The AM64x SoC uses a central Device Management and Security Controller
      (DMSC) processor that manages all the low-level device controls
      including the system-wide SoC reset. The system-wide reset is managed
      through the system reset driver.
      
      Add a sysreset controller node as a child of the dmsc node to enable
      the "reset" command from U-Boot prompt for the K3 AM642 SK.
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      7194a95d
    • S
      arm: dts: k3-am642-evm: Add sysreset controller node · a97ee92e
      Suman Anna 提交于
      The AM64x SoC uses a central Device Management and Security Controller
      (DMSC) processor that manages all the low-level device controls
      including the system-wide SoC reset. The system-wide reset is managed
      through the system reset driver.
      
      Add a sysreset controller node as a child of the dmsc node to enable
      the "reset" command from U-Boot prompt for the K3 AM642 EVM.
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      a97ee92e
    • D
      firmware: ti_sci: Update ti_sci_msg_req_reboot to include domain · beed3058
      Dave Gerlach 提交于
      The ti_sci_msg_req_reboot message payload has been extended to include a
      domain field, but for the purposes of u-boot this should be zero to
      reset the entire SoC as it did before. Include domain for completeness
      and set to zero to ensure proper operation.
      Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      beed3058
    • S
      arm: dts: k3-j721e: Fix up MAIN R5FSS cluster mode back to Split-mode · 4ec04073
      Suman Anna 提交于
      The default U-Boot environment variables and design are all set up for
      both the MAIN R5FSS clusters to be in Split-mode. This is the setting
      in v2021.01 U-Boot and the dt nodes are synched with the kernel binding
      property names in commit 468ec2f3 ("remoteproc: k3_r5: Sync to
      upstreamed kernel DT property names") merged in v2021.04-rc2.
      
      The modes for both the clusters got switched back to LockStep mode by
      mistake in commit 70e16749 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6
      dts into U-Boot") also in v2021.04-rc2. This throws the following warning
      messages when early-booting the cores using default env variables,
      
        k3_r5f_rproc r5f at 5d00000: Invalid op: Trying to start secondary core 7 in lockstep mode
        Load Remote Processor 3 with data at addr=0x82000000 98484 bytes: Failed!
        k3_r5f_rproc r5f at 5f00000: Invalid op: Trying to start secondary core 9 in lockstep mode
        Load Remote Processor 5 with data at addr=0x82000000 98484 bytes: Failed!
      
      Fix this by switching back both the clusters to the expected Split-mode.
      Make this mode change in the u-boot specific dtsi file to avoid such
      sync overrides in the future until the kernel dts is also switched to
      Split-mode by default.
      
      Fixes: 70e16749 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6 dts into U-Boot")
      Reported-by: NMinas Hambardzumyan <minas@ti.com>
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      4ec04073
    • V
      configs: am64x_evm_a53_defconfig: Enable DP83867 PHY driver · df3fc620
      Vignesh Raghavendra 提交于
      AM64x GP and SK EVM have DP83867 PHY connected to CPSW external port0.
      Enable the driver in order to use ethernet at U-Boot prompt.
      CONFIG_PHY_TI is selected by CONFIG_PHY_TI_DP83867 and thus can be dropped.
      Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com>
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      df3fc620
    • S
      test: Remove duplicate macro · cb6c9c83
      Sean Anderson 提交于
      ut_asserteq_strn is defined twice. Remove one definition.
      
      Fixes: 33d7edfd ("test: Add a way to check part of a console line or skip it")
      Signed-off-by: NSean Anderson <seanga2@gmail.com>
      Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      cb6c9c83
    • H
      GitLab: Remove tags for sandbox_noinst tests · b725ed50
      Harm Berntsen 提交于
      Commit 712cc962 ("GitLab: Remove "tags" stanzas") removed the 'all'
      tag from all the jobs. The sandbox_noinst_test.py test was added in
      between the author date and commit date (commit 6c914e42
      ("azure/gitlab: Add tests for sandbox_noinst")) which is probably why it
      still contains the tags. This commit fixes that so all jobs now don't
      require tags on the GitLab runners.
      Signed-off-by: NHarm Berntsen <harm.berntsen@nedap.com>
      CC: Simon Glass <sjg@chromium.org>
      Acked-by: NPratyush Yadav <p.yadav@ti.com>
      b725ed50
    • A
      test: Fix filesystem tests always being skipped · 77bfaad0
      Alper Nebi Yasak 提交于
      Commit 1ba21bb0 ("test: Don't unmount not (yet) mounted system")
      fixes an issue in the filesystem tests where the test setup may fail
      to mount an image and still attempt to unmount it. However, the commit
      unintentionally breaks the test setups in two ways.
      
      The newly created unmounted filesystem images are being immediately
      deleted due to some cleanup steps being misplaced into finally blocks,
      which makes them always run instead of only on failures. The mount calls
      always fail since the images never exist, causing the tests to be always
      skipped. This patch moves these cleanup calls into the except blocks to
      fix this and makes the tests run again.
      
      There are also unmount calls misplaced into finally blocks, making them
      run after the tests instead of before the tests. These unmount calls
      make the filesystem image file consistent with the changes made to it as
      part of the test setup, and this misplacement is making a number of
      tests fail unexpectedly.
      
      The unmount calls must be run before the tests use the image, meaning
      before the yield call and not in the finally block. They must also be
      run as a cleanup step when the filesystem setup fails, so they can't be
      placed as the final call in the try blocks since they would be skipped
      on such failures. For these reasons, this patch places the unmount calls
      both in the except blocks and the else blocks of the final setup step.
      This makes the unexpectedly failing tests to succeed again.
      
      Furthermore, this isolates the mount calls to their own try-except
      statement to avoid reintroducing the original issue of unmounting a
      not-mounted image while fixing the unmount misplacement.
      
      After these fixes, running "make tests" with guestmount available results
      in two test failures not related to the mentioned commit. If the
      guestmount executables are unavailable, the mounts fallback to using
      sudo and result in no failures.
      
      Fixes: 1ba21bb0 ("test: Don't unmount not (yet) mounted system")
      Signed-off-by: NAlper Nebi Yasak <alpernebiyasak@gmail.com>
      Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      77bfaad0
    • M
      spl: Kconfig: Use tabs instead of space for alignment · ce869b55
      Michal Simek 提交于
      A lot of entries were using spaces instead of tab for alignment that's why
      it is good to fix it to use the same style everywhere.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      ce869b55
    • M
      fs: btrfs: Add missing cache aligned allocation · 9e8bb078
      Marek Vasut 提交于
      The superblock buffer must be cache aligned, since it might be used
      in DMA context, allocate it using ALLOC_CACHE_ALIGN_BUFFER() just
      like it was done in btrfs_read_superblock() and read_tree_node().
      
      This fixes this output on boot and non-working btrfs on iMX53:
      CACHE: Misaligned operation at range [ced299d0, ced2a9d0]
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Marek Behún <marek.behun@nic.cz>
      Cc: Qu Wenruo <wqu@suse.com>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      9e8bb078
    • H
      fs/squashfs: zero out unused fields in fs_dirent · 53ba2c21
      Heinrich Schuchardt 提交于
      When reading directories the UEFI sub-system must supply file attributes
      and timestamps. These fields will have to be added to struct fs_dirent.
      SquashFS should not fill these fields with random data. Ensure that they
      are zeroed out.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      53ba2c21
    • M
      powerpc: fix regression in arch_initr_trap() · f6c0d365
      Matt Merhar 提交于
      The assembly output of the arch_initr_trap() function differed by a
      single byte after common.h was removed from traps.c:
      
       fff49a18 <arch_initr_trap>:
       fff49a18:      94 21 ff f0     stwu    r1,-16(r1)
       fff49a1c:      7c 08 02 a6     mflr    r0
       fff49a20:      90 01 00 14     stw     r0,20(r1)
      -fff49a24:      80 62 00 44     lwz     r3,68(r2)
      +fff49a24:      80 62 00 38     lwz     r3,56(r2)
       fff49a28:      4b ff 76 19     bl      fff41040 <trap_init>
       fff49a2c:      80 01 00 14     lwz     r0,20(r1)
       fff49a30:      38 60 00 00     li      r3,0
       fff49a34:      38 21 00 10     addi    r1,r1,16
       fff49a38:      7c 08 03 a6     mtlr    r0
      
      This was causing a consistent hard lockup during the MMC read / loading
      of the QoriQ FMan firmware on a P2041RDB board.
      
      Re-adding the header causes identical assembly to be emitted and allows
      the firmware loading and subsequent boot to succeed.
      
      Fixes: 401d1c4f ("common: Drop asm/global_data.h from common header")
      Signed-off-by: NMatt Merhar <mattmerhar@protonmail.com>
      f6c0d365
    • S
      part: Add check for NULL dev_part_str · 26de4296
      Sean Anderson 提交于
      Some callers (e.g. cmd/fs.c) of fs_set_blk_dev may use a NULL dev_part_str.
      While blk_get_device_part_str handles this fine,
      part_get_info_by_dev_and_name does not. This fixes commands crashing when
      implicitly using bootdevice.
      
      The unit test has also been updated to set bootdevice to a known value and
      to restore it after we are done.
      
      Fixes: 7194527b ("cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions")
      Reported-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: NSean Anderson <seanga2@gmail.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      26de4296
    • V
      pinctrl: single: Fix probe failure getting register area size · 1e787904
      Vignesh Raghavendra 提交于
      If reg property of pinctrl-single node requires address translation then
      probe fails with following message:
      
      single-pinctrl pinctrl@4301c000: failed to get base register size
      
      This is because driver uses dev_read_addr_size() to get size which also
      tries to fetch untranslated addr and fails.
      Fix this by using dev_read_addr_size_index() which takes care of address
      translation and also makes following dev_read_addr() call redundant.
      
      This fixes Ethernet failures on TI's AM654 based EVMs due to lack of
      pinmux configuration.
      
      Fixes: 9fd8a430 ("pinctrl: single: get register area size by device API")
      Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com>
      1e787904
  3. 26 5月, 2021 2 次提交
  4. 25 5月, 2021 18 次提交