Ovidiu Panait [Tue, 30 Nov 2021 16:33:49 +0000 (18:33 +0200)]
microblaze: u-boot.lds: replace __end symbol with _end
board_fdt_blob_setup() uses the _end symbol to find the dtb in the non-spl
case. In order to allow microblaze builds to compile successfully with
CONFIG_OF_SEPARATE, the _end symbol must be defined. Align microblaze with
the other architectures and use _end symbol rather than __end to mark the
end of the u-boot binary.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Link: https://lore.kernel.org/r/20211130163358.2531677-2-ovidiu.panait@windriver.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 18 Nov 2021 12:00:02 +0000 (13:00 +0100)]
xilinx: firmware: Move dcache handling directly to pmufw load config
Core function should make sure that data is stored properly that's why move
cache operations directly to zynqmp_pmufw_load_config_object() to be able
to call it from other functions.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/8c92edd3650ce34a3cfd1c1e4e9103980830b1fa.1637236800.git.michal.simek@xilinx.com
Michal Simek [Thu, 18 Nov 2021 11:58:15 +0000 (12:58 +0100)]
arm64: zynqmp: Switch SOM to shared psu configuration
Previous psu init was targeting SOM + KV260 carrier card and also contain
configurations for other devices on carrier card. This config is removing
all expected configurations for CC and let U-Boot to handle all of it self.
This configuration is designed for SOM itself (and I would bet without
eMMC).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/5782131058dc372befd3fdb4dceabeea5ba56606.1637236693.git.michal.simek@xilinx.com
T Karthik Reddy [Thu, 18 Nov 2021 11:57:20 +0000 (12:57 +0100)]
xilinx: versal: Fix sdhci node name as per DT
Fix the sdhci node name in versal board file as per the name in
device tree and also check for sdhci node as part of backward
compatibility.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/9110ecdabcabcef63fffd4719095acf4326a26e4.1637236638.git.michal.simek@xilinx.com
Michal Simek [Thu, 18 Nov 2021 12:42:28 +0000 (13:42 +0100)]
arm64: zynqmp: Remove clock-names from GEM in zynqmp-clk-ccf.dtsi
Remove clock-names from GEM nodes from clk-ccf because they should be only
present in zynqmp.dtsi. And as is visible both clock-names defined didn't
really match.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/d6045d81b3e7e97df0ba3eeacb9f3f75ed7cff18.1637239345.git.michal.simek@xilinx.com
Michal Simek [Thu, 18 Nov 2021 12:42:27 +0000 (13:42 +0100)]
arm64: zynqmp: Add resets to all GEMs
There is a need to get IP out of reset to operate properly.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/041362197e8de8e9c696da64429107505bdc0c73.1637239345.git.michal.simek@xilinx.com
Michal Simek [Thu, 18 Nov 2021 12:40:31 +0000 (13:40 +0100)]
arm64: zynqmp: Add u-boot,dm-pre-reloc to dpsub node
u-boot,dm-pre-reloc is necessary for DP driver to allocate enough space for
framebuffer before relocation.
Power domain driver is called when video console is used for example by
loading BMP image.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/5e93acee1746913a6e42741e5e797f0b4ab98d44.1637239230.git.michal.simek@xilinx.com
Michal Simek [Fri, 29 Oct 2021 11:13:38 +0000 (13:13 +0200)]
clk: zynqmp: Fix gem tx/rx/ref clock handling
gemX_ref clock IDs starts at number 104. Till now it was at gemX_tx
location which wasn't correct.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/d073e159b6316707306092a62bccb876cd89a602.1635506016.git.michal.simek@xilinx.com
Michal Simek [Fri, 29 Oct 2021 11:13:37 +0000 (13:13 +0200)]
clk: zynqmp: Add support for setting up clock for USB
USB range is not enabled but for setting up frequency it is needed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/c55c423f48ca8f953a2dfbdcb25068278d8e5ad6.1635506016.git.michal.simek@xilinx.com
T Karthik Reddy [Fri, 29 Oct 2021 11:11:43 +0000 (13:11 +0200)]
zynqmp: gpio: Add support for zynqmp gpio modepin driver
ZynqMP modepin driver has capability to get/set/check status of modepin
gpios. These modepins are accessed using xilinx firmware. In modepin
register, [3:0] bits set direction, [7:4] bits read IO, [11:8] bits
set/clear IO.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/2d802d98fd56d95d764532a33e844d935e0cebb3.1635505900.git.michal.simek@xilinx.com
Tom Rini [Mon, 29 Nov 2021 16:16:03 +0000 (11:16 -0500)]
Prepare v2022.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Ivan Mikhaylov [Sun, 28 Nov 2021 21:57:01 +0000 (21:57 +0000)]
board: iot2050: update build documentation for OP-TEE
Set ta-target explicitly to correspond with OP-TEE recipe in
siemens/meta-iot2050.
Errors without explicit set of ta-target:
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mthumb’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-unaligned-access’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
make: *** [mk/compile.mk:159: out/arm-plat-k3/ta_arm32-lib/libdl/dlfcn.o] Error 1
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Vincent Stehlé [Wed, 24 Nov 2021 14:54:20 +0000 (15:54 +0100)]
qemu: common: Fix build with update capsule
The common emulation Makefile has a dependency on a non-existent
qemu_capsule.o when building with support for capsule update enabled
(CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y).
The code which was in qemu_capsule.c has been completely moved to
lib/efi_loader/efi_capsule.c by commit
7a6fb28c8e4b ("efi_loader: capsule:
add back efi_get_public_key_data()").
Remove the false dependency.
This fixes the following build error:
make[1]: *** No rule to make target 'board/emulation/common/qemu_capsule.o', needed by 'board/emulation/common/built-in.o'. Stop.
Fixes: commit
47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to .rodata"")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Simon Glass <sjg@chromium.org>
Sean Anderson [Wed, 24 Nov 2021 04:33:11 +0000 (23:33 -0500)]
fastboot: Add maintainers entry
Add an entry in maintainers for fastboot. It is starting off orphaned, but
hopefully someone can pick it up.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Sean Anderson [Wed, 24 Nov 2021 04:23:40 +0000 (23:23 -0500)]
clk: Add myself as a maintainer for the clock subsystem
Lukasz has not been very responsive in reviewing clock patches. Add
myself as a maintainer.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
Tom Rini [Fri, 26 Nov 2021 22:10:53 +0000 (17:10 -0500)]
Merge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc3-2
Test:
* fix pylint warnings
UEFI:
* disable interrupts before removing devices in ExitBootServices()
* implement poweroff in efi_system_reset() on sandbox
* allow booting via EFI even if some block device fails
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:49 +0000 (00:01 +0100)]
test: fix pylint error in u_boot_console_exec_attach.py
* provide module docstring
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:48 +0000 (00:01 +0100)]
test: fix pylint error in u_boot_console_sandbox.py
* provide module docstring
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:47 +0000 (00:01 +0100)]
test: fix pylint errors in u_boot_utils.py
* there is no os.path.unlink() method
* don't inherit from object
* add module docstring
* move imports to the top
* avoid unused variable
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:46 +0000 (00:01 +0100)]
test: fix pylint errors in u_boot_spawn.py
* don't inherit from object
* imports should be on the top level
* avoid unused variable names
* avoid unnecessary else after raise
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:45 +0000 (00:01 +0100)]
test: fix pylint errors in multiplexed_log.py
* don't inherit from object
* remove superfluous comprehension
* add module docstring
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Thu, 25 Nov 2021 17:55:09 +0000 (18:55 +0100)]
efi_selftest: simplify endian conversion for FDT test
UEFI code is always little-endian. Remove a superfluous test.
Remove a superfluous type conversion.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 20 Nov 2021 10:53:12 +0000 (11:53 +0100)]
efi_loader: segfault in efi_clear_os_indications()
If we call efi_clear_os_indications() before initializing the memory store
for UEFI variables a NULL pointer dereference occurs.
The error was observed on the sandbox with:
usb start
host bind 0 sandbox.img
load host 0:1 $kernel_addr_r helloworld.efi
bootefi $kernel_addr_r
Here efi_resister_disk() failed due to an error in the BTRFS implementation.
Move the logic to clear EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED
to the rest of the capsule code.
If CONFIG_EFI_IGNORE_OSINDICATIONS=y, we should still clear the flag.
If OsIndications does not exist, we should not create it as it is owned by
the operating system.
Fixes:
149108a3eb59 ("efi_loader: clear OsIndications")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Mon, 22 Nov 2021 07:24:08 +0000 (08:24 +0100)]
test: address some pylint warnings
* remove unused variables
* module description must precede import statements
* fix inconsistent return values
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 20 Nov 2021 13:49:18 +0000 (14:49 +0100)]
sandbox: poweroff in efi_system_reset()
efi_system_reset() should exit if called with EFI_RESET_SHUTDOWN.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sat, 20 Nov 2021 12:56:02 +0000 (13:56 +0100)]
efi_loader: efi_disk_register() should not fail
Our algorithm for creating USB device paths may lead to duplicate device
paths which result in efi_disk_register() failing. Instead we should just
skip devices that cannot be registered as EFI block devices.
Fix a memory leak in efi_disk_add_dev() caused by the duplicate device
path.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Fri, 19 Nov 2021 21:33:04 +0000 (16:33 -0500)]
efi: Call bootm_disable_interrupts earlier in efi_exit_boot_services
If we look at the path that bootm/booti take when preparing to boot the
OS, we see that as part of (or prior to calling do_bootm_states,
explicitly) the process, bootm_disable_interrupts() is called prior to
announce_and_cleanup() which is where udc_disconnect() /
board_quiesce_devices() / dm_remove_devices_flags() are called from. In
the EFI path, these are called afterwards. In efi_exit_boot_services()
however we have been calling bootm_disable_interrupts() after the above
functions, as part of ensuring that we disable interrupts as required
by the spec. However, bootm_disable_interrupts() is also where we go
and call usb_stop(). While this has been fine before, on the TI J721E
platform this leads us to an exception. This exception seems likely to
be the case that we're trying to stop devices that we have already
disabled clocks for. The most direct way to handle this particular
problem is to make EFI behave like the do_bootm_states() process and
ensure we call bootm_disable_interrupts() prior to ending up in
usb_stop().
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Sat, 20 Nov 2021 14:36:37 +0000 (09:36 -0500)]
Merge branch 'efi-2022-01' of https://source.denx.de/u-boot/custodians/u-boot-efi
Scripts:
* Update spelling.txt
LMB:
* remove extern keyword in lmb.h
* drop unused lmb_size_bytes()
Test:
* test truncation in snprintf()
Documentation:
* add include/lmb.h to HTML documentation
UEFI:
* reduce non-debug logging output for measured boot
* fix use after free in measured boot
* startup the tpm device when installing the protocol
* implement EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
* record capsule result only if capsule is read
Ilias Apalodimas [Thu, 18 Nov 2021 08:13:42 +0000 (10:13 +0200)]
efi_loader: startup the tpm device when installing the protocol
Due to U-Boot's lazy binding mentality the TPM is probed but not properly
initialized. The user can startup the device from the command line
e.g 'tpm2 startup TPM2_SU_CLEAR'. However we can initialize the TPM during
the TCG protocol installation, which is easier to use overall.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Ilias Apalodimas [Thu, 18 Nov 2021 07:03:39 +0000 (09:03 +0200)]
efi_loader: fix FinalEvents table if an EFI app invoked GetEventLog
As described in the TCG spec [1] in sections 7.1.1 and 7.1.2 the FinalEvent
table should include events after GetEventLog has been called. This
currently works for us as long as the kernel is the only EFI application
calling that. Specifically we only implement what's described in 7.1.1.
So refactor the code a bit and support EFI application(s) calling
GetEventLog. Events will now be logged in both the EventLog and FinalEvent
table as long as ExitBootServices haven't been invoked.
[1] https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Wed, 17 Nov 2021 17:55:59 +0000 (18:55 +0100)]
efi_loader: bump EFI_SPECIFICATION_VERSION to 2.9
We have implemented all what is new in UEFI specification 2.9 and relevant
for U-Boot.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Wed, 17 Nov 2021 17:52:35 +0000 (18:52 +0100)]
efi_selftest: unit test for EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE
Add a test for the EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE event group.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 16 Nov 2021 17:46:27 +0000 (18:46 +0100)]
efi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
Implement the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group
handling.
Add the definition of EFI_EVENT_GROUP_AFTER_READY_TO_BOOT.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Masami Hiramatsu [Fri, 12 Nov 2021 13:05:15 +0000 (22:05 +0900)]
efi_loader: capsule: Record capsule result only if capsule is read
Record capsule update result only if the capsule file is
successfully read, because the capsule GUID is not sure when
the file can not be read or the file is not a capsule.
Without this fix, if user puts a dummy (non-capsule) file
under (ESP)EFI/UpdateCapsule, U-Boot causes a synchronous
abort.
This also fixes use-after-free bug of the 'capsule' variable.
Fixes:
c74cd8bd08d1 ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Masahisa Kojima [Tue, 9 Nov 2021 11:35:53 +0000 (20:35 +0900)]
efi_loader: Reduce efi_tcg2 logging statement
log_info() is used for the debug level logging statement
which should use log_debug() instead. Convert it to reduce the
log output.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 20 Nov 2021 08:28:54 +0000 (09:28 +0100)]
efi_loader: Sphinx comments in efi_api.h
Fix incorrect Sphinx comments in efi_api.h:
* add missing 'struct'
* correct indentation
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Masahisa Kojima [Fri, 12 Nov 2021 07:24:27 +0000 (16:24 +0900)]
efi: add comment for efi_system_table and efi_configuration_table
This commit adds the comment for efi_system_table and
efi_configuration_table structure.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Tue, 16 Nov 2021 17:38:47 +0000 (18:38 +0100)]
doc: fix typos in trace.rst
Fix obvious typos. Use US spelling consistently.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 16 Nov 2021 17:56:43 +0000 (18:56 +0100)]
scripts: update spelling.txt from upstream Linux
This list is used by checkpatch.pl. The Linux v5.15 version has several
words that where mispelled in U-Boot too.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 15 Nov 2021 18:06:55 +0000 (19:06 +0100)]
test: test truncation in snprintf()
Test that the return value of snprintf() is correct in the case of
truncation.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sun, 14 Nov 2021 08:38:53 +0000 (09:38 +0100)]
lmb: fix typo 'commun'
%s/commun/common/
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Sun, 14 Nov 2021 08:03:27 +0000 (09:03 +0100)]
lmb: drop unused lmb_size_bytes()
lmb_size_bytes() is unused.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Sun, 14 Nov 2021 07:52:48 +0000 (08:52 +0100)]
lmb: remove extern keyword in lmb.h
The extern keyword is not needed in include/lmb.h to declare functions.
Remove it.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Sun, 14 Nov 2021 07:43:07 +0000 (08:43 +0100)]
doc: add include/lmb.h to the HTML documentation
Correct Sphinx style comments in include/lmb.h
Add the logical memory block API to the HTML documentation.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Sun, 14 Nov 2021 07:41:07 +0000 (08:41 +0100)]
lmb: remove lmb_is_nomap() from include
Defining static functions in includes should be avoided.
Function lmb_is_nomap() is only used in the unit test.
So move it to the unit test.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Fri, 19 Nov 2021 21:33:33 +0000 (16:33 -0500)]
Merge tag 'u-boot-amlogic-
20211119' of https://source.denx.de/u-boot/custodians/u-boot-amlogic
- pinctrl: Correct the driver GPIO declaration
- meson64_android: handle errors on boot and run fastboot on boot failure
Tom Rini [Fri, 19 Nov 2021 21:33:23 +0000 (16:33 -0500)]
Merge tag 'tpm-
19112021' of https://source.denx.de/u-boot/custodians/u-boot-tpm
TPM1.2 and Atmel fixes
# gpg verification failed.
Neil Armstrong [Wed, 17 Nov 2021 11:04:11 +0000 (12:04 +0100)]
configs: meson64_android: add PANIC stage for SYSTEM fails
If bootloader was updated without running oem format, reboot will cause
boot loop because the SYSTEM stage fails.
Add a final PANIC stage running fastboot to permit recovery.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Neil Armstrong [Wed, 17 Nov 2021 11:04:10 +0000 (12:04 +0100)]
configs: meson64_android: bypass other checks on run_fastboot=1
This can lead to GPT and BCB errors even if fastboot was selected early
by usb rom boot and the eMMC is blank/invalid.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Simon Glass [Sat, 13 Nov 2021 14:07:15 +0000 (07:07 -0700)]
pinctrl: meson: Correct the driver GPIO declaration
This should use the provided U_BOOT_DRIVER() macro so that the driver gets
added to the appropriate linker list. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
7c9dcfed50f ("pinctrl: meson: rework gx pmx function")
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com> on libretech-cc
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tom Rini [Thu, 18 Nov 2021 23:25:19 +0000 (18:25 -0500)]
Merge branch '2021-11-18-regression-fixes'
- An assortment of fixes related to GD, GD_FLG_SKIP_RELOC, and the lmb
- Environment fix on synquacer developmentbox
- Fix for get_info is not valid in partition code
Marek Vasut [Sat, 13 Nov 2021 17:34:59 +0000 (18:34 +0100)]
arm64: Add missing GD_FLG_SKIP_RELOC handling
In case U-Boot enters relocation with GD_FLG_SKIP_RELOC, skip the
relocation. The code still has to set up new_gd pointer and new
stack pointer.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Marek Vasut [Sat, 13 Nov 2021 17:34:37 +0000 (18:34 +0100)]
lmb: Reserve U-Boot separately if relocation is disabled
In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is
not relocated, however the stack and heap is at the end of DRAM
after relocation. Reserve a LMB area for the non-relocated U-Boot
code so it won't be overwritten.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Marek Vasut [Sat, 13 Nov 2021 17:34:04 +0000 (18:34 +0100)]
board_f: Copy GD to new GD even if relocation disabled
Even if U-Boot has relocation disabled via GD_FLG_SKIP_RELOC , the
relocated stage of U-Boot still picks GD from new_gd location. The
U-Boot itself is not relocated, but GD might be, so copy the GD to
new GD location even if relocation is disabled.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Peng Fan <peng.fan@oss.nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
schspa [Wed, 20 Oct 2021 12:15:55 +0000 (20:15 +0800)]
part: return -ENOSYS when get_info not valid.
In some case, get_info() interface can be NULL, add this check to stop
from crash.
Signed-off-by: schspa <schspa@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Masami Hiramatsu [Thu, 18 Nov 2021 05:45:25 +0000 (14:45 +0900)]
Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"
Without default setting of gd->env_addr, U-Boot will cause
a synchronous abort if the env-variables on the SPI flash is
broken or not saved corectly. Set gd->env_addr correctly.
This reverts commit
535870f3b0fb09ee9b2885409f05304111464643.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Mathew McBride [Thu, 11 Nov 2021 04:06:31 +0000 (04:06 +0000)]
drivers: tpm: atmel_twi: fix printf specifier compile warning
%d was being used as the specifier for size_t, leading to a
compiler warning
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Mathew McBride [Thu, 11 Nov 2021 04:06:30 +0000 (04:06 +0000)]
drivers: tpm: atmel_twi: implement get_desc operation
Without get_desc, the tpm command will not provide a
description of the device in 'tpm device' or 'tpm info'.
Due to the characteristics of the Atmel TPM it isn't
possible to determine certain attributes (e.g open/close
status) without using the TPM stack (compare Infineon
and ST TPM drivers), so just print out the chip model
and udevice name as the identifier.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Mathew McBride [Thu, 11 Nov 2021 04:06:29 +0000 (04:06 +0000)]
drivers: tpm: atmel_twi: do not use an offset byte
This driver was broken due to an empty offset byte being prepended
at the start of every transmission.
The hardware does not mimic an EEPROM device with registers so
an offset byte is not required.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Mathew McBride [Thu, 11 Nov 2021 04:06:28 +0000 (04:06 +0000)]
drivers: tpm: atmel_twi: drop non-DM_I2C compatibility
There are no users of this driver without DM_I2C
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Mathew McBride [Thu, 11 Nov 2021 04:06:27 +0000 (04:06 +0000)]
cmd: tpm-v1: fix load_key_by_sha1 compile errors
This command is not compiled by default and has not been updated alongside
changes to the tpmv1 API, such as passing the TPM udevice to the relevant
functions.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Mathew McBride [Thu, 11 Nov 2021 04:06:26 +0000 (04:06 +0000)]
cmd: tpm-v1: fix compile error in TPMv1 list resources command
This command is not compiled by default and was not
updated to pass the udevice to tpm_get_capability.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Tue, 16 Nov 2021 19:23:30 +0000 (14:23 -0500)]
Merge branch '2021-11-15-assorted-fixes'
- Rename "tqc" to "tq" and related updates
- Assorted minor ARM updates, build updates and documentation updates
Tom Rini [Tue, 16 Nov 2021 14:51:04 +0000 (09:51 -0500)]
Merge tag 'xilinx-for-v2022.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2022.01-rc3
sdhci:
- Fix emmc mini case with missing firmware interface
zynqmp:
- Restore JTAG interface if required
- Allow overriding board name
- Add support for DLC21
- Fix one fallthrought statement description
- Use config macro instead of name duplication
- Save multiboot to variable
firmware:
- Handle ipi_req errors better
- Use local buffer in case user doesn't need it instead of NULL/0 location
spi:
- gqsi: Fix write issue at low frequencies
net:
- gem: Disable broadcasts
Andy Shevchenko [Mon, 8 Nov 2021 18:03:38 +0000 (21:03 +0300)]
image: Explicitly declare do_bdinfo()
Compiler is not happy:
common/image-board.c: In function ‘boot_get_kbd’:
common/image-board.c:902:17: warning: implicit declaration of function ‘do_bdinfo’ [-Wimplicit-function-declaration]
902 | do_bdinfo(NULL, 0, 0, NULL);
| ^~~~~~~~~
Move the forward declaration to a header.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Andy Shevchenko [Fri, 12 Nov 2021 15:37:47 +0000 (18:37 +0300)]
usb: doc: Fix spelling issues in README.usb
Fix spelling issues in README.usb.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Pierre-Clément Tosi [Wed, 10 Nov 2021 14:04:40 +0000 (15:04 +0100)]
arm: Fix bad memcpy.S str8w macro argument count
Remove the extra (empty) argument passed to str8w, causing the following
error:
<instantiation>:40:47: error: too many positional arguments
str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f
^
u-boot/arch/arm/lib/memcpy.S:240:5: note: while in macro instantiation
17: forward_copy_shift pull=16 push=16
^
Note: no functional change intended.
Fixes:
d8834a1323af ("arm: Use optimized memcpy and memset from linux")
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Masami Hiramatsu [Wed, 10 Nov 2021 00:40:07 +0000 (09:40 +0900)]
configs: synquacer: Fix dfu_alt_info to use nor1
Fix dfu_alt_info to use nor1 instead of the device name.
This reverts a part of commit
59bd18d4c4d7 ("configs: synquacer:
Remove mtdparts settings and update DFU setting") because the
commit
a4f2d8341455 ("mtd: spi: nor: force mtd name to "nor%d"")
changed the mtd device naming scheme to nor%d.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Angelo Dureghello [Fri, 5 Nov 2021 15:20:24 +0000 (16:20 +0100)]
makefile: add missing semicolons
On some distributions, as Debian GNU 11, this targets fails
with errors.
Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Matthias Schiffer [Tue, 2 Nov 2021 10:36:46 +0000 (11:36 +0100)]
board: tq: fix spelling of "TQ-Systems"
"TQ-Systems" is written with a dash.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Matthias Schiffer [Tue, 2 Nov 2021 10:36:45 +0000 (11:36 +0100)]
board: rename "tqc" vendor to "tq"
The subdivision name "TQ Components" hasn't been in use for a long time.
Rename the vendor directory to "tq", which also matches our Device Tree
vendor prefix.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Alistair Delva [Wed, 20 Oct 2021 21:31:32 +0000 (21:31 +0000)]
arm64: relocate-rela: Add support for ld.lld
Cap end of relocations by the binary size.
Linkers like to insert some auxiliary sections between .rela.dyn and
.bss_start. These sections don't make their way to the final binary, but
reloc_rela still tries to relocate them, resulting in attempted read
past the end of file.
When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by
default on arm64) breaks the build. After this patch, U-Boot can be
linked successfully with and without CONFIG_STATIC_RELA.
Originally-from: Elena Petrova <lenaptr@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
Cc: David Brazdil <dbrazdil@google.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 15 Nov 2021 16:58:37 +0000 (11:58 -0500)]
Prepare v2022.01-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
Samuel Dionne-Riel [Wed, 27 Nov 2019 19:56:02 +0000 (14:56 -0500)]
usb: Make USB_MUSB_PIO_ONLY selected by USB_MUSB_SUNXI
This ensures the USB_MUSB_PIO_ONLY config is set to an apppropriate
value from the changes enabling USB_MUSB_GADGET does.
Namely, USB_MUSB_PIO_ONLY default to =y on USB_MUSB_SUNXI being y.
Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Ricardo Salveti [Thu, 4 Nov 2021 19:28:02 +0000 (16:28 -0300)]
xilinx: zynqmp: fix ZYNQMP_RESTORE_JTAG check
Config check should be done without the SPL_ prefix.
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/20211104192802.3093811-1-ricardo@foundries.io
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Sat, 13 Nov 2021 23:37:00 +0000 (18:37 -0500)]
Dockerfile, CI: Update to latest "focal" tag
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Tue, 9 Nov 2021 18:51:20 +0000 (19:51 +0100)]
Dockerfile: build swtpm
For testing the TPM drivers and the EFI_TCG2_PROTOCOL we need the tool
swtpm.
Once we move to Ubuntu Impish we can take libtpms from package libtpms-dev.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Sun, 14 Nov 2021 02:14:51 +0000 (21:14 -0500)]
Merge tag 'dm-pull-13nov21' of https://source.denx.de/u-boot/custodians/u-boot-dm
env tidy-ups
test fixes
binman fixes and ELF enhancements
Tom Rini [Sat, 13 Nov 2021 23:13:35 +0000 (18:13 -0500)]
Merge tag 'efi-2022-01-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc2-2
UEFI:
* fix measurement of BootOrder variable for TCG2 protocol
TPM:
* TIS mmio driver. This driver supports QEMU's emulated TPM.
Jan Kiszka [Thu, 11 Nov 2021 07:13:30 +0000 (08:13 +0100)]
binman: Fix replace subcommand help and comments
Fix some copy&paste artifacts.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Jan Kiszka [Wed, 3 Nov 2021 14:09:36 +0000 (15:09 +0100)]
bootstage: Differentiate boot progress kconfig entries
Both U-Boot proper and SPL entries were using the same description.
Fixes:
b55881dd ("bootstage: Add SPL support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Tue, 2 Nov 2021 18:44:30 +0000 (19:44 +0100)]
sandbox: fix sandbox_wdt_expire_now()
With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
reset.
To make this work calling sandbox_wdt_expire_now() must lead to a reset.
With this change we can test the development suggested in
[PATCH 0/4] Improved sysreset/watchdog uclass integration
https://lists.denx.de/pipermail/u-boot/2021-August/458656.html
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Tue, 2 Nov 2021 18:44:29 +0000 (19:44 +0100)]
test/dm: fix watchdog test
For successful execution of the watchdog test we need both the GPIO as well
as the SANDBOX watchdog.
Avoid a build failure for CONFIG_WDT_GPIO=n.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Nov 2021 01:17:03 +0000 (19:17 -0600)]
Makefile: Correct TPL rule for OF_REAL
Correct an error in the tpl-dtb parameter to binman. At present the TPL
rule follows SPL but this is not correct, if TPL uses of-platdata, for
example.
Fixes:
f99cbe4e867 ("fdt: Update Makefile rules with the new OF_REAL Kconfig")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Marek Behún [Wed, 3 Nov 2021 23:23:23 +0000 (00:23 +0100)]
env: Simplify env_get_default()
Instead of pretending that we don't have environment to force searching
default environment in env_get_default(), get the data from the
default_environment[] buffer directly.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Marek Behún [Wed, 3 Nov 2021 23:23:22 +0000 (00:23 +0100)]
env: Fix env_get() when returning empty string using env_get_f()
The env_get_f() function returns -1 on failure. Returning 0 means that
the variable exists, and is empty string.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Marek Behún [Wed, 3 Nov 2021 23:23:21 +0000 (00:23 +0100)]
env: Don't set ready flag if import failed in env_set_default()
Do not set GD_FLG_ENV_READY nor GD_FLG_ENV_DEFAULT if failed importing
in env_set_default().
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 4 Nov 2021 03:09:18 +0000 (21:09 -0600)]
binman: Support updating the dtb in an ELF file
WIth EFI we must embed the devicetree in an ELF image so that it is loaded
as part of the executable file. We want it to include the binman
definition in there also, which in some cases cannot be created until the
ELF (u-boot) is built. Add an option to binman to support writing the
updated dtb to the ELF file u-boot.out
This is useful with the EFI app, which is always packaged as an ELF file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 4 Nov 2021 03:09:17 +0000 (21:09 -0600)]
binman: Tidy up comments on _DoTestFile()
The comment for this function is missing an argument and the return value.
Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 4 Nov 2021 03:09:16 +0000 (21:09 -0600)]
binman: Support reading the offset of an ELF-file symbol
Binman needs to be able to update the contents of an ELF file after it has
been build. To support this, add a function to locate the position of a
symbol's contents within the file.
Fix the comments on bss_data.c and Symbol while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 4 Nov 2021 03:09:15 +0000 (21:09 -0600)]
binman: Report an error if test files fail to compile
At present any error from the 'make' command is silently swallowed by the
test system. Fix this by showing it when detected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 4 Nov 2021 03:09:14 +0000 (21:09 -0600)]
patman: Use a ValueError exception if tools.Run() fails
The Exception base class is a very vague and could be confusing to the
test system. Use the more specific ValueError exception instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 12 Nov 2021 23:37:42 +0000 (23:37 +0000)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 12 Nov 2021 23:33:12 +0000 (18:33 -0500)]
Merge branch '2021-11-12-Kconfig-migrations'
- An assortment of "finish migrating .." symbol patches. This will help
make it harder for migrated symbols to end up again in board config.h
files.
Tom Rini [Mon, 8 Nov 2021 03:59:51 +0000 (22:59 -0500)]
Convert CONFIG_LAST_STAGE_INIT to Kconfig
This converts the following to Kconfig:
CONFIG_LAST_STAGE_INIT
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 8 Nov 2021 03:59:50 +0000 (22:59 -0500)]
Remove CONFIG_SERIAL_MULTI
This symbol has been functionally dead for a long time. Remove the last
and recent re-introductions of setting it, and update the whitelist so
it will not be re-introduced again.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 8 Nov 2021 03:59:49 +0000 (22:59 -0500)]
Convert CONFIG_PL011_SERIAL et al to Kconfig
This converts the following to Kconfig:
CONFIG_PL011_SERIAL
CONFIG_PL01X_SERIAL
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 8 Nov 2021 03:59:48 +0000 (22:59 -0500)]
Convert CONFIG_MACB to Kconfig
This converts the following to Kconfig:
CONFIG_MACB
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 8 Nov 2021 03:59:47 +0000 (22:59 -0500)]
Convert CONFIG_MD5 to Kconfig
This converts the following to Kconfig:
CONFIG_MD5
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 8 Nov 2021 03:59:46 +0000 (22:59 -0500)]
Convert CONFIG_MX6 et al to Kconfig
This converts the following to Kconfig:
CONFIG_MX6
CONFIG_MX7
Signed-off-by: Tom Rini <trini@konsulko.com>