summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-30rpi: Add identifier for the new RPi Zero 2 WPeter Robinson
The Raspberry Pi Foundation released the new Zero 2 W which we want to detect, so we can detect the correct device tree file name. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-11-30rpi: Update the Raspberry Pi doucmentation URLPeter Robinson
The Raspberry Pi Foundation has updated their documentation so update the URL to the latest place to find the HW device revision codes. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-11-30Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- turris_omnia: enable A385 watchdog before disabling MCU watchdog (Pali) - a37xx: Reset whole UART when changing parent clock from TBG to XTAL (Pali)
2021-11-30Merge tag 'tpm-30112021' of https://source.denx.de/u-boot/custodians/u-boot-tpmTom Rini
TPM2 API fixes Signed-off-by: Tom Rini <[email protected]>
2021-11-30Merge tag 'efi-2022-01-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-01-rc4 Documentation: * describe how to enable Virtio RNG on QEMU ARM UEFI: * enable testing the TCG2 protocol * support TPM event log passed from firmware
2021-11-30tis: fix tpm_tis_remove()Heinrich Schuchardt
tpm_tis_remove() leads to calling tpm_tis_ready() with the IO region unmapped and chip->locality == -1 (locality released). This leads to a crash in mmio_write_bytes(). The patch implements these changes: tpm_tis_remove(): Unmap the IO region after calling tpm_tis_cleanup(). tpm_tis_cleanup(): Request locality before IO output and releasing locality. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
2021-11-30pinctrl: stmfx: define LOG_CATEGORYPatrick Delaunay
Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32429i-eval-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32f746g-eval-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32f429-disco-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32f469-disco-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32f7-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32746-disco-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32f769-disco-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: dts: stm32: Use lower-case hex for address for stm32mp15-u-boot.dtsiPatrice Chotard
Replace upper-case hex with lower-case hex for address. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30efi_loader: Extend PCR's for firmware measurementsRuchika Gupta
Firmwares before U-Boot may be capable of doing tpm measurements and passing them to U-Boot in the form of eventlog. However there may be scenarios where the firmwares don't have TPM driver and are not capable of extending the measurements in the PCRs. Based on TCG spec, if previous firnware has extended PCR's, PCR0 would not be 0. So, read the PCR0 to determine if the PCR's need to be extended as eventlog is parsed or not. Signed-off-by: Ruchika Gupta <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Tested-by: Ilias Apalodimas <[email protected]>
2021-11-30tpm: use more algorithms than sha256 on pcr_readRuchika Gupta
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-11-30efi_loader: Add check for event log passed from firmwareRuchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added to check if even log has been passed to u-boot from earlier firmware components. If available, the eventlog is parsed to check for its correctness and further event logs are appended to the passed log. Signed-off-by: Ruchika Gupta <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Tested-by: Ilias Apalodimas <[email protected]>
2021-11-30test: unit test for the EFI_TCG2_PROTOCOLHeinrich Schuchardt
Encapsulate the UEFI EFI_TCG2_PROTOCOL unit test in an Python test. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-11-30configs: enable CMD_TPM on QEMU ARMHeinrich Schuchardt
With TPM emulation enabled in u-boot-test-hooks we should also provide the tpm2 command used for the test/py/tests/test_tpm2.py test. One of the Python TPMv2 tests expects sandbox specific values. So disable it on other platforms. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-11-30doc: qemu-arm peripherialsHeinrich Schuchardt
* add description how to add RNG device * for a disk specify format=raw to avoid a warning * fix a typo Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-11-30serial: a37xx: Reset whole UART when changing parent clock from TBG to XTALPali Rohár
Sometimes UART stops transmitting characters after UART clock is changed back to XTAL. In this state UART fifo is always full. Kernel during early boot wants to print output on UART and is waiting for non-empty UART fifo. Which leads to CPU hangup without any (debug) output on UART. Marvell Armada 3700 Functional Specifications says that for programming fractional divisor registers it is required to disable UART, enable loopback mode, reset fifos, program registers, disable loopback mode, release reset of fifos and enable UART. But these steps do not fix above mentioned issue that UART hangup. Also gating UART clock does not help. And even resetting UART state machines do not help. Experiments showed that UART fifo is unblocked after board is being reset (during board reset UART HW transmit UART fifo even CPU is not executing kernel/bootloader anymore). And another experiments showed that same workaround can be achieved also by external reset of UART HW (without need to reset board). So do not implement any of "Marvell recommended" steps from Functional Specifications as they do not work. And rather prior changing parent clock back to XTAL, do external reset of UART HW. This operation also resets all UART registers, so basically it also sets UART clock to default, which is XTAL. It is unknown why UART hangups and enters such broken state. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-11-30arm: mvebu: turris_omnia: enable A385 watchdog before disabling MCU watchdogPali Rohár
Commit aeb0ca64dbb5 ("arm: mvebu: turris_omnia: disable MCU watchdog in SPL when booting over UART") disabled MCU watchdog when booting over UART to ensure that watchdog does not reboot the board before UART transfer finishes. But if UART transfer fails for some reason, or if U-Boot binary crashes, then board hangs forever as there is no watchdog running which could reset it. To fix this issue, enable A385 watchdog with very high timeout before disabling MCU watchdog to ensure that even slow transfer can finish successfully before watchdog timer expires and also to ensure that if board hangs for some reason, watchdog will reset it. Omnia's MCU watchdog has fixed 120 seconds timer and it cannot be changed (without updating MCU firmware). A385 watchdog by default uses 25 MHz input clock and so the largest timeout value (2^32-1) can be just 171 seconds. But A385 watchdog can be switched to use NBCLK (L2) as input clock (on Turris Omnia it is 800 MHz clock) and in this case final watchdog clock frequency is calculated as: freq = NBCLK / 2 / (2 ^ R) So A385 watchdog on Turris Omnia can be configured to at most 1374 seconds (about 22 minutes). We set it to 10 minutes, which should be enough even for bigger U-Boot binaries or slower UART transfers. Both U-Boot and Linux kernel, when initializing A385 watchdog, switch watchdog timer to 25 MHz input clock, so usage of NBCLK input clock in U-Boot SPL does not cause any issues. Fixes: aeb0ca64dbb5 ("arm: mvebu: turris_omnia: disable MCU watchdog in SPL when booting over UART") Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Marek Behún <[email protected]>
2021-11-29Merge tag 'v2022.01-rc3' into nextTom Rini
Prepare v2022.01-rc3 Signed-off-by: Tom Rini <[email protected]>
2021-11-29Prepare v2022.01-rc3v2022.01-rc3Tom Rini
Signed-off-by: Tom Rini <[email protected]>
2021-11-29board: iot2050: update build documentation for OP-TEEIvan Mikhaylov
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 <[email protected]> Reviewed-by: Jan Kiszka <[email protected]>
2021-11-29qemu: common: Fix build with update capsuleVincent Stehlé
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é <[email protected]> Cc: Simon Glass <[email protected]>
2021-11-29fastboot: Add maintainers entrySean Anderson
Add an entry in maintainers for fastboot. It is starting off orphaned, but hopefully someone can pick it up. Signed-off-by: Sean Anderson <[email protected]>
2021-11-29clk: Add myself as a maintainer for the clock subsystemSean Anderson
Lukasz has not been very responsive in reviewing clock patches. Add myself as a maintainer. Signed-off-by: Sean Anderson <[email protected]> Acked-by: Lukasz Majewski <[email protected]>
2021-11-28Merge tag 'dm-pull-28nov21' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm into next SPI flash documentation and tidy-ups Various driver model enhancements Fix up some missing unit tests with pytest
2021-11-28test/py: Raise a ValueError if a command failsSimon Glass
At present an Exception is raised if a command fails. This is a very broad class and makes it difficult for callers to catch the error without also catching other things, like programming bugs. Change it to ValueError to make this easier. Signed-off-by: Simon Glass <[email protected]>
2021-11-28test/py: Relax the naming rules for unit testsSimon Glass
At present the collection function used by pytest is quite strict on the naming of the functions it detects. In particular it requires the name of the test to be repeated in the function name. This is not enforced anywhere else, but instead the tests are silently omitted from the pytest run. This affects a few dozen tests. The rule does not seem to have any particular purpose. Relax it, so that all tests that use the UNIT_TEST() macro will run, regardless of the name of the test function. Signed-off-by: Simon Glass <[email protected]>
2021-11-28sandbox: Enable HEXDUMP for sandbox_flattreeSimon Glass
At present the hexdump tests are disabled in sandbox_flattree. This is good, because they do not pass. Enable the required Kconfig so that they will, when enabled. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Add a way to count the devices in a uclassSimon Glass
Add a function that returns the number of devices in a uclass. This can be helpful in sizing an array that needs to hold a list of them. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Allow finding children / uclasses by partial nameSimon Glass
In some cases it is useful to search just by a partial name, such as when looking for a sibling device that has a common name substring. Add helper functions to handle these requirements. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Add a way to obtain a string listSimon Glass
At present we support reading a string list a string at a time. Apart from being inefficient, this makes it impossible to separate reading of the devicetree into the of_to_plat() method where it belongs, since any code which needs access to the string must read it from the devicetree. Add a function which returns the string property as an array of pointers to the strings, which is easily used by clients. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Fix up string-function documentationSimon Glass
The details for of_property_read_string_helper() and ofnode_read_string_index() are a little inaccurate. Fix up the comments to avoid confusion. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Fix handling of uclass pre_unbind methodSimon Glass
This method is currently called after the platform data has been freed. But the pre_unbind() method may wish to access this, e.g. to free some data structures stored there. Split the unbinding of devices into two pieces, as is done with removal. This corrects the problem. Also tidy a code-style issue in device_remove() while we are here. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Add tests for stringlist functionsSimon Glass
These functions currently lack tests so add some. The error handling differs betwee livetree and flattree at present, so only check the error codes with livetree. Signed-off-by: Simon Glass <[email protected]>
2021-11-28common: Allow a smaller console-recording pre-relocSimon Glass
Before relocation there is generally not as much available memory and not that much console output. At present the console-output buffer is the same side before and after relocation. Add a separate Kconfig option to remove this limitation. Signed-off-by: Simon Glass <[email protected]>
2021-11-28disk: part_dos: Fix a NULL pointer errorSimon Glass
When ext is NULL we cannot dereference it. Update the code flow to avoid this, so that layout_mbr_partitions() can be used with partition tables that do not include an extended partition. Signed-off-by: Simon Glass <[email protected]>
2021-11-28mbr: Correct verification checkSimon Glass
At present this command considers the partitions to be identical if the start and size are smaller than expected. It should check that they are the same. Fix this and tidy up the code style a little. Signed-off-by: Simon Glass <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-11-28mmc: Allow for children other than the block deviceSimon Glass
At present the MMC uclass assumes that the only child it can have is a block device. Update this so we can add a bootmethod too. Signed-off-by: Simon Glass <[email protected]>
2021-11-28sandbox: mmc: Support a backing fileSimon Glass
Provide a way for sandbox MMC to present data from a backing file. This allows a filesystem to be created on the host and easily served via an emulated mmc device. Signed-off-by: Simon Glass <[email protected]>
2021-11-28sandbox: Support unmapping a fileSimon Glass
Add the opposite of mapping, so that we can unmap and avoid running out of address space. Signed-off-by: Simon Glass <[email protected]>
2021-11-28test/py: Allow passing input to a programSimon Glass
When running a program on the host, allow input to be passed in as stdin. This is needed for running sfdisk, for example. Signed-off-by: Simon Glass <[email protected]>
2021-11-28binman: Fix extract command for using non-absolute image pathsJan Kiszka
Otherwise the updated image will end up in the temporary folder that is purged after completion. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-11-28sf: doc: Add documentation for the 'sf' commandSimon Glass
This command is fairly complicated so documentation is useful. Unfortunately I an not sure how the MTD side of things works and cannot find information about that. Signed-off-by: Simon Glass <[email protected]> Acked-by: Pratyush Yadav <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]>
2021-11-28sf: Tidy up code to avoid #ifdefSimon Glass
Update this code to use IS_ENABLED() instead. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]> Reviewed-by: Jagan Teki <[email protected]>
2021-11-28sf: Use const for the stage nameSimon Glass
This is not updated at runtime so should be marked const. Update the code accordingly. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>