1. 05 9月, 2021 2 次提交
    • S
      serial: Add a SERIAL config · 52510486
      Simon Glass 提交于
      At present we have SPL_SERIAL and TPL_SERIAL but not piain SERIAL. This
      works because there is a special build rule in Makefile that always
      includes the drivers/serial directory.
      
      It is better to have all driver directories included by drivers/Makefile
      and there is already a rule in there for this purpose. It just needs a
      Kconfig for U-Boot proper, so add one.
      
      It is always enabled, for now, since that mimics the current behaviour.
      It should be possible to drop the strange 'SERIAL_PRESENT' option at some
      point and use SERIAL instead.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      52510486
    • S
      serial: Rename SERIAL_SUPPORT to SERIAL · 2a736066
      Simon Glass 提交于
      Rename these options so that CONFIG_IS_ENABLED can be used with them.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      2a736066
  2. 04 9月, 2021 11 次提交
  3. 03 9月, 2021 2 次提交
  4. 02 9月, 2021 25 次提交
    • T
      tools: env: Handle shorter read calls · 6628813f
      Thibault Ferrante 提交于
      On some cases, the actual number of bytes read can be shorter
      than what was requested. This can be handled gracefully by
      taking this difference into account instead of exiting.
      Signed-off-by: NThibault Ferrante <thibault.ferrante@gmail.com>
      6628813f
    • O
      psci: fix double declaration · 7befc849
      Oleksandr Suvorov 提交于
      The prototype of psci_features() duplicated. Remove extra declaration.
      
      Fixed: e21e3ffd ("psci: Fix warnings when compiling with W=1")
      Reported-by: NMichael Scott <mike@foundries.io>
      Signed-off-by: NOleksandr Suvorov <oleksandr.suvorov@foundries.io>
      7befc849
    • B
      2cb32607
    • J
      mailmap: Update e-mail for Jernej Skrabec · 210985b5
      Jernej Skrabec 提交于
      Old address doesn't exist anymore. Map it to new one.
      Signed-off-by: NJernej Skrabec <jernej.skrabec@gmail.com>
      Acked-by: NAndre Przywara <andre.przywara@arm.com>
      210985b5
    • S
      ARM: Prevent the compiler from using NEON registers · f43312c9
      Samuel Holland 提交于
      For ARMv8-A, NEON is standard, so the compiler can use it even when no
      special target flags are provided. For example, it can use stores from
      NEON registers to zero-initialize large structures. GCC 11 decides to
      do this inside the DRAM init code for the Allwinner H6.
      
      However, GCC 11 has a bug where it generates misaligned NEON register
      stores even with -mstrict-align. Since the MMU is not enabled this early
      in SPL, the misaligned store causes an exception and breaks booting.
      
      Work around this issue by restricting the compiler to using GPRs only,
      not vector registers. This prevents any future surprises relating to
      NEON use as well.
      Signed-off-by: NSamuel Holland <samuel@sholland.org>
      Acked-by: NAndre Przywara <andre.przywara@arm.com>
      f43312c9
    • P
      doc: Add documentation for the Arm vexpress board configs · e0bd6f31
      Peter Hoyes 提交于
      Create a new documentation section for Arm Ltd boards with a sub-page
      for the vexpress board (FVP-A, FVP-R and Juno).
      
      Document how the armv8_switch_to_el1 environment variable can be used
      to switch between booting from S-EL2/S-EL1 at runtime on the BASER_FVP.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      e0bd6f31
    • P
      arm: Use armv8_switch_to_el1 env to switch to EL1 · 30e5a449
      Peter Hoyes 提交于
      Use the environment variable armv8_switch_to_el1 to determine whether
      to switch to EL1 at runtime. This is an alternative to the
      CONFIG_ARMV8_SWITCH_TO_EL1 compile-time option.
      
      The environment variable will be ineffective if the ARMV8_MULTIENTRY
      config is used.
      
      This is required by the Armv8r64 architecture, which must be able to
      boot at S-EL1 for Linux but may need to boot at other ELs for other
      systems.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      30e5a449
    • P
      vexpress64: Add BASER_FVP vexpress board variant · b53bbca6
      Peter Hoyes 提交于
      The BASER_FVP board variant is implemented on top of the BASE_FVP board
      config (which, in turn, is based on the Juno Versatile Express board
      config). They all share a similar memory map - for BASER_FVP the map is
      inverted from the BASE_FVP
      (https://developer.arm.com/documentation/100964/1114/Base-Platform/Base---memory/BaseR-Platform-memory-map)
      
       * Create new TARGET_VEXPRESS64_BASER_FVP target, which uses the same
         board config as BASE_FVP and JUNO
       * Adapt vexpress_aemv8a.h header file to support BASER_FVP (and rename
         to vexpress_aemv8.h)
       * Enable config to switch to EL1 for the BASER_FVP
       * Create vexpress_aemv8r defconfig
       * Provide an MPU memory map for the BASER_FVP
      
      For now, only single core boot is supported.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      [trini: Add MAINTAINERS, move BOOTCOMMAND to defconfig]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      b53bbca6
    • P
      armv8: Add ARMv8 MPU configuration logic · 2f5b7b74
      Peter Hoyes 提交于
      Armv8r64 is the first Armv8 platform that only has a PMSA at the
      current exception level. The architecture supplement for Armv8r64
      describes new fields in ID_AA64MMFR0_EL1 which can be used to detect
      whether a VMSA or PMSA is present. These fields are RES0 on Armv8a.
      
      Add logic to read these fields and, for the protection of the memory
      used by U-Boot, initialize the MPU instead of the MMU during init, then
      clear the MPU regions before transition to the next stage.
      
      Provide a default (blank) MPU memory map, which can be overridden by
      board configurations.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      2f5b7b74
    • P
      armv8: Ensure EL1&0 VMSA is enabled · 37a757e2
      Peter Hoyes 提交于
      On Armv8-R, the EL1&0 memory system architecture is configurable as a
      VMSA or PMSA, and resets to an "architecturally unknown" value.
      
      Add code to armv8_switch_to_el1_m which detects whether the MSA at
      EL1&0 is configurable using the id_aa64mmfr0_el1 register MSA fields.
      If it is we must ensure the VMSA is enabled so that a rich OS can boot.
      
      The MSA and MSA_FRAC fields are described in the Armv8-R architecture
      profile supplement (section G1.3.7):
      https://developer.arm.com/documentation/ddi0600/latest/Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      37a757e2
    • P
      armv8: Disable pointer authentication traps for EL1 · 53b40e8d
      Peter Hoyes 提交于
      The use of ARMv8.3 pointer authentication (PAuth) is governed by fields
      in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset
      value of these fields is 'architecturally unknown' so we must ensure
      that the fields are enabled (to disable the traps) if we are entering
      the kernel at EL1.
      
      The APK field disables PAuth instruction traps and the API field
      disables PAuth register traps
      
      Add code to disable the traps in armv8_switch_to_el1_m. Prior to doing
      so, it checks fields in the ID_AA64ISAR1_EL1 register to ensure pointer
      authentication is supported by the hardware.
      
      The runtime checks require a second temporary register, so add this to
      the EL1 transition macro signature and update 2 call sites.
      Signed-off-by: NPeter Hoyes <Peter.Hoyes@arm.com>
      53b40e8d
    • M
      Revert "configs: synquacer: Make U-Boot binary position independent" · 99a2bd65
      Masami Hiramatsu 提交于
      This reverts commit f7e16bb0, since
      the U-Boot doesn't boot if it is booted directly from SPI-NOR with
      CONFIG_POSITION_INDEPENDENT=y. Unless fixing this issue, it is better
      to revert this change.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu@linaro.org>
      99a2bd65
    • A
      lib: add crc16.o if CONFIG_MMC_SPI_CRC_ON for SPL build · c8291f53
      Andreas Schwab 提交于
      CONFIG_MMC_SPI_CRC_ON needs the crc16 functions, but it was not included
      in an SPL build.  For non-SPL builds, crc16.o is already added
      unconditionally.  This also removes CONFIG_SPL_YMODEM_SUPPORT from the
      sifive board configs, which is only relevant for some ARM boards and was
      only set for its side effect of adding crc16.o.
      c8291f53
    • H
      cmd/part: correct alignment of partition list · d9d88491
      Heinrich Schuchardt 提交于
      When running 'part list' for an ISO partition the numbers are not under the
      labels.
      
      Correct the alignment of the ISO partition list. With the patch the
      output looks like:
      
          Part   Start     Sect x Size Type
            1     3720     5024    512 U-Boot
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      d9d88491
    • S
      arm: mach-snapdrgon: misc: Simplify msm_generate_mac_addr() · 15dd9412
      Stephan Gerhold 提交于
      The logic in msm_generate_mac_addr() was originally taken from the LK
      bootloader where the serial number is a string and must be parsed first.
      However, in U-Boot msm_board_serial() returns an u32 and
      msm_generate_mac_addr() has quite complicated code that will first
      print it as a hex string and then immediately parse it again.
      
      What this function actually does at the end is to put the serial number
      encoded as big endian (the order used for the hex string) into the u8 *mac.
      Use put_unaligned_be32() to do that with bit shifts instead of going
      through the string format.
      
      This should be slightly more efficient and cleaner but does not result
      in any functional difference.
      
      Cc: Ramon Fried <rfried.dev@gmail.com>
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: NRamon Fried <rfried.dev@gmail.com>
      15dd9412
    • S
      arm: mach-snapdragon: misc: Initialize eMMC if necessary · 1eb00624
      Stephan Gerhold 提交于
      At the moment U-Boot produces an empty MAC address (02:00:00:00:00:00)
      if the eMMC is not used by anything in U-Boot (e.g. with
      CONFIG_ENV_IS_NOWHERE=y instead of having the environment on eMMC).
      This happens because then there is nothing that actually initializes
      the eMMC and reads the "cid" that is later accessed.
      
      To fix this, call mmc_init() to ensure the eMMC is initialized.
      There is no functional difference if the eMMC is already initialized
      since then mmc_init() will just return without doing anything.
      Reviewed-by: NRamon Fried <rfried.dev@gmail.com>
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      1eb00624
    • C
      armv7: Add Position Independent Execution support · cd82f199
      Chia-Wei Wang 提交于
      A U-Boot image could be loaded and executed at a different
      location than it was linked at.
      
      For example, Aspeed takes a stable release version of U-Boot image
      as the golden one for recovery purposes. When the primary storage
      such as flash is corrupted, the golden image would be loaded to any
      SRAM/DRAM address on demands through ethernet/UART/etc and run for
      rescue.
      
      To deal with this condition, the PIE is needed as there is only one
      signed, golden image, which could be however executed at different
      places.
      
      This patch adds the PIE support for ARMv7 platform.
      Signed-off-by: NChia-Wei Wang <chiawei_wang@aspeedtech.com>
      cd82f199
    • C
      arm: Fix option dependency with Kconfig language · aa29b21d
      Chia-Wei Wang 提交于
      Use Kconfig 'depends on' instead of #if macro to
      express the option depdencies.
      Signed-off-by: NChia-Wei Wang <chiawei_wang@aspeedtech.com>
      aa29b21d
    • T
      Merge branch '2021-09-02-assorted-fixes' into next · 4bb7de1b
      Tom Rini 提交于
      - Drop old OpenSSL support
      - Add DM_HASH support, use it.
      - Assorted "stemmy" platform updates
      - Various bugfixes
      4bb7de1b
    • P
      ata: ahci-pci: Add new option CONFIG_SPL_AHCI_PCI · 73059529
      Pali Rohár 提交于
      This new option allows to disable ahci-pci driver in SPL. Disabling it is
      needed when SPL_PCI is not enabled as ahci-pci depends on PCI.
      
      This change fixes following compile error when CONFIG_SPL_SATA_SUPPORT is
      enabled and SPL_PCI is disabled.
      
          LD      spl/u-boot-spl
        arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.o: in function `ahci_probe_scsi_pci':
        drivers/ata/ahci.c:1205: undefined reference to `dm_pci_map_bar'
        arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1215: undefined reference to `dm_pci_read_config16'
        arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1216: undefined reference to `dm_pci_read_config16'
        arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci.c:1220: undefined reference to `dm_pci_map_bar'
        make[1]: *** [scripts/Makefile.spl:512: spl/u-boot-spl] Error 1
        make: *** [Makefile:1977: spl/u-boot-spl] Error 2
      
          LD      spl/u-boot-spl
        arm-linux-gnueabihf-ld.bfd: drivers/ata/ahci-pci.o: in function `ahci_pci_probe':
        drivers/ata/ahci-pci.c:21: undefined reference to `ahci_probe_scsi_pci'
        make[1]: *** [scripts/Makefile.spl:512: spl/u-boot-spl] Error 1
        make: *** [Makefile:1977: spl/u-boot-spl] Error 2
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      73059529
    • P
      ata: ahci-pci: Fix dependency on DM_PCI · 20aa320a
      Pali Rohár 提交于
      File drivers/ata/ahci-pci.c calls function ahci_probe_scsi_pci() which is
      compiled only when DM_PCI is enabled. So add missing dependency into
      Kconfig.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      20aa320a
    • C
      rtc: ds1307: Fix incorrect clock reset for DS13xx · 223c4490
      Callum Sinclair 提交于
      The ds1307 driver also supports the DS1339 and DS1340.
      However, in ds1307_rtc_reset the register writes assume that the chip
      is a DS1307. This is evident in the writing of bits SQWE, RS1, RS0 to
      the control register. While this applies correctly to the DS1307, on a
      DS1340 the control register doesn't contain those bits (instead, the
      register is used for clock calibration). By writing these bits the
      clock calibration will be changed and the chip can become
      non-functional after a reset call.
      Signed-off-by: NCallum Sinclair <callum.sinclair@alliedtelesis.co.nz>
      223c4490
    • S
      arm: u8500: Prefer building in thumb mode by default · 8956854d
      Stephan Gerhold 提交于
      Enabling CONFIG_SYS_THUMB_BUILD produces a significantly smaller
      U-Boot binary (250 KiB vs 320 KiB) that still seems to be fully
      functional. Make use of that by default but keep it as "imply" so it
      can be disabled for testing in case this causes trouble for someone.
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      8956854d
    • S
      board: stemmy: Update documentation · f629895f
      Stephan Gerhold 提交于
      Over the time, the "stemmy" U-Boot board was tested on several other
      Samsung smartphones based on ST-Ericsson NovaThor Ux500. Convert the
      documentation to reStructuredText at doc/board/ste/stemmy.rst and
      make the device list complete. Also note that the board now boots
      into USB Fastboot instead of just ending up at the U-Boot prompt.
      
      The device table is mostly taken from the postmarketOS wiki article
      (https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500).
      All the newly added devices were tested by Linus Walleij.
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      f629895f
    • S
      board: stemmy: Add basic Fastboot support · f64011e1
      Stephan Gerhold 提交于
      Make use of the new drivers for ARM U8500 introduced in the U-Boot
      2021.10 merge window by adding basic support for USB Fastboot with
      the "stemmy" board. As a first step this will always boot directly
      into USB Fastboot for now with the console displayed on the screen
      to make that obvious.
      
      Samsung uses quite strange GPT partition labels on these boards,
      so also add a bunch of fastboot_partition_alias_* to make this more
      easy to use.
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      f64011e1