summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-11configs: add support of OPTEE RNG in stm32mp15 defconfigPatrick Delaunay
When the RNG device is secured with OP-TEE, it is only accessible with the HWRNG TA, the CONFIG_RNG_OPTEE is needed for STM32MP15 targets with OP-TEE support. The probe of this RNG driver fails when the TA is not available in OP-TEE and the previous driver can be used, as CONFIG_RNG_STM32MP1 is activated and when the associated node is activated in the device tree with: &rng1 { status = "okay"; }; When the RNG is used in OP-TEE, this node should be deactivated in the Linux and U-Boot device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-04-11tee: optee: bind rng optee driverPatrick Delaunay
In U-Boot, the discovery of TA based on its UUID on the TEE bus is not supported. This patch only binds the driver associated to the new supported OP-TEE TA = TA_HWRNG when this driver is enable. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-04-11rng: add OP-TEE based Random Number GeneratorPatrick Delaunay
Add driver for OP-TEE based Random Number Generator on ARM SoCs where hardware entropy sources are not accessible to normal world and the RNG service is provided by a HWRNG Trusted Application (TA). This driver is based on the linux driver: char/hw_random/optee-rng.c Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-04-11Merge branch '2022-04-11-initial-valgrind-support'Tom Rini
To quote the author: This series adds support for running valgrind against U-Boot's internal malloc. This allows for much more useful reports to be generated. Some example output of valgrind run against u-boot/master with this branch applied may be found at [1]. Note that valgrind gives up around acpi. This feature still needs a lot of work on suppressions/hints to filter out the noise properly. [1] https://gist.githubusercontent.com/Forty-Bot/199bf06f9cdd6871e54f8f484c16e111/raw/2a2f99108eef84b48e27a54332f3f71f4e2e5342/gistfile1.txt
2022-04-11doc: sandbox: Document how to run sandbox with valgrindSean Anderson
This documents how to get more detailed results from valgrind made possible by the last two commits. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-11malloc: Annotate allocator for valgrindSean Anderson
This annotates malloc and friends so that valgrind can track the heap. To do this, we need to follow a few rules: * Call VALGRIND_MALLOCLIKE_BLOCK whenever we malloc something * Call VALGRIND_FREELIKE_BLOCK whenever we free something (generally after we have done our bookkeeping) * Call VALGRIND_RESIZEINPLACE_BLOCK whenever we change the size of an allocation. We don't record the original request size of a block, and neither does valgrind. For this reason, we pretend that the old size of the allocation was for 0 bytes. This marks the whole allocaton as undefined, so in order to mark all bits correctly, we must make the whole new allocation defined with VALGRIND_MAKE_MEM_DEFINED. This may cause us to miss some invalid reads, but there is no way to detect these without recording the original size of the allocation. In addition to the above, dlmalloc itself tends to make a lot of accesses which we know are safe, but which would be unsafe outside of dlmalloc. For this reason, we provide a suppression file which ignores errors ocurring in dlmalloc.c Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-11Add valgrind headers to U-BootSean Anderson
Valgrind uses magic code sequences to define an ABI that the client may use to request behavior from the host. In particular, this may be used to inform valgrind about custom allocators, such as the one used in U-Boot. This adds headers defining these sequences to U-Boot. It also adds a config option to disable emission of these sequences entirely, in the (likely) event that the user does not wish to use valgrind. Note that this option is called NVALGRIND upstream, but was renamed (and inverted) to CONFIG_VALGRIND. Aside from this and the conversion of a few instances of VALGRIND_DO_CLIENT_REQUEST_EXPR to STMT, these headers are unmodified. These headers were copied from valgrind 3.16.1-4 as distributed in Arch Linux. They are licensed with the bzip2 1.16 license. This appears to be a BSD license with some clauses from Zlib. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-11Kconfig: Fix SYS_MALLOC_F_LEN for i.MX8MQPeng Fan
i.MX8MQ use SYS_MALLOC_F_LEN 0x2000, not 0x10000. The OCRAM_S only has 32KB memory, use 0x10000 will make SPL not bootable. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-04-10Merge tag 'efi-2022-07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-07-rc1 Documentation: * Describe how enable DM_SERIAL for a board UEFI * Preparatory patches for better integration of DM and UEFI * Use sysreset after capsule updates instead of do_reset * Allow to disable persisting non-volatile variables
2022-04-10Revert "env: Load env when ENV_IS_NOWHERE is only location selected"Marek Vasut
This reverts commit 8d61237edbf6314a701cf78da2c5893a73ff5438. This commit broke environment on literally every board I have access to, with this revert in place, environment works as it should again. The problem I observe with this patch is that saved environment in either SPI NOR or eMMC is never used, the system always falls back to default environment. The 'saveenv' command does succeed, but then after reset, the default env is again used. Furthermore, the commit introduced duplicate code in env_init(), this: " if (!prio) { gd->env_addr = (ulong)&default_environment[0]; gd->env_valid = ENV_INVALID; return 0; } if (ret == -ENOENT) { gd->env_addr = (ulong)&default_environment[0]; gd->env_valid = ENV_INVALID; return 0; } " Furthermore, the commit is missing DCO SoB line. Also note that upstream does not support UltraZed EG board, so this might have been a patch pulled from downstream which did depend on some other downstream behavior. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Felix.Vietmeyer@jila.colorado.edu <felix.vietmeyer@jila.colorado.edu> Cc: Tom Rini <trini@konsulko.com>
2022-04-10Merge branch '2022-04-08-gpio-updates'Tom Rini
- Add PCA957X GPIO support, enable GPIO hogging in SPL, add gpio_request_by_line_name() for later use and add some pytests for 'gpio'
2022-04-09dm: add tag supportAKASHI Takahiro
With dm-tag feature, any U-Boot subsystem is allowed to associate arbitrary number of data with a particular udevice. This can been see as expanding "struct udevice" without modifying the definition. As a first user, UEFI subsystem makes use of tags to associate an efi_disk object with a block device. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09virtio: call device_probe() in scanningAKASHI Takahiro
virtio_init() enumerates all the peripherals that are to be materialised with udevices(UCLASS_VIRIO) and creates particular device instances (UCLASS_BlK or whatever else) as children. On the other hand, device_probe() won't be invoked against those resultant udevices unlike other ordinary device drivers do in the driver model. This is particularly inconvenient when we want to add "event notification" callback so that we will be able to automatically create all efi_disk objects in a later patch. With this patch applied, "virtio scan" will work in a similar way to "scsi rescan", "usb start" or others in term of 'probe' semantics. I didn't add this change to virtio_init() itself because this function may be called in board_init_r() (indirectly in board_late_init()) before UEFI subsustem is initialized. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09block: ide: call device_probe() after scanningAKASHI Takahiro
Every time an ide bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09sata: call device_probe() after scanningAKASHI Takahiro
Every time a sata bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09nvme: call device_probe() after scanningAKASHI Takahiro
Every time a nvme bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09mmc: call device_probe() after scanningAKASHI Takahiro
Every time a mmc bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-04-09usb: storage: call device_probe() after scanningAKASHI Takahiro
Every time a usb bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09scsi: call device_probe() after scanningAKASHI Takahiro
Every time a scsi bus/port is scanned and a new block device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09efi_loader: Use sysreset instead of reset commandMasami Hiramatsu
Use sysreset_walk_halt() directly from reset-after-capsule-on-disk feature to reboot (cold reset) machine instead of using reset command interface, since this is not a command. Note that this will make CONFIG_EFI_CAPSULE_ON_DISK depending on the CONFIG_SYSRESET. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-09efi_loader: Make efi_load_capsule_drivers() available even if ↵Masami Hiramatsu
EFI_CAPSULE_ON_DISK=n Make efi_load_capsule_drivers() available even if EFI_CAPSULE_ON_DISK is disabled because the caller (efi_init_obj_list()) expects it only relays on EFI_HAVE_CAPSULE_SUPPORT. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2022-04-09cmd: efidebug: Disable 'capsule disk-update' when CONFIG_EFI_CAPSULE_ON_DISK=nMasami Hiramatsu
Disable 'capsule disk-update' option for the efidebug command when CONFIC_EFI_CAPSULE_ON_DISK is disabled, because this option is available only when the EFI capsule update on disk is enabled. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-04-09efi_loader: optional persistence of variablesTom Saeger
Since be66b89da306 ("efi_loader: configuration of variables store") the choice of EFI_VARIABLE_FILE_STORE or EFI_MM_COMM_TEE is mutually-exclusive, however efi_var_to_file also allows for "neither". Provide an additional Kconfig option. Signed-off-by: Tom Saeger <tom.saeger@oracle.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-09doc: distro: Update list of all support boot typesPali Rohár
Add HOST, UBIFS. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-09doc: debug UART for RISC-V QEMU virt machineHeinrich Schuchardt
Provide settings for enabling the debug UART of the virt machine on RISC-V QEMU. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-09doc: correct bootefi.rstHeinrich Schuchardt
* add link to booti man-page * correct link description for efidebug command * correct punctuation Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-09dm: Add docs to explain how to enable DM_SERIAL for a boardSimon Glass
This is an attempt to cover the common cases found when enabling driver model for serial on a new board. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-08gpio: pca953x_gpio: add PCA957X supportLuca Ellero
Take as reference Linux kernel code: drivers/gpio/gpio-pca953x.c Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-08gpio: Enable hogging support in SPLEddie James
Use the CONFIG macros to conditionally build the GPIO hogging support in either the SPL or U-Boot, or both, depending on the configuration. Also call the GPIO hog probe function in the common SPL board initialization as an equivalent to adding it to the U-Boot init sequence functions. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-08gpio: Add gpio_request_by_line_name()Andrew Jeffery
Add support for the upstream gpio-line-names property already described in the common GPIO binding document[1]. The ability to search for a line name allows boards to lift the implementation of common GPIO behaviours away from specific line indexes on a GPIO controller. [1] https://github.com/devicetree-org/dt-schema/blob/3c35bfee83c2e38e2ae7af5f83eb89ca94a521e8/dtschema/schemas/gpio/gpio.yaml#L17 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2022-04-08test/py:Update python tests for ‘gpio’ cmdAdarsh Babu Kalepalli
Generic Python Test cases are developed to verfiy 'gpio' command. Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com>
2022-04-08configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08Merge branch '2022-04-08-Kconfig-updates-and-dead-code-removal'Tom Rini
- Migration of more symbols from board config.h files to defconfig - Remove unused network drivers
2022-04-08arm: Remove unused ep93xx codeTom Rini
There are no platforms for this architecture anymore, remove unused code. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove uli526x driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove ns8382x driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove natsemi driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove lan91c96 driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove ftmac110 driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove dnet driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove cs8900 driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove ax88180 driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08net: Remove armada100_fec driverTom Rini
This driver is not enabled by any board and not converted to DM_ETH. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08arm: fsl-layerscape: Migrate more DP-DDR options to KconfigTom Rini
Based on current usage, migrate a number of DP-DDR related options to Kconfig. Cc: Priyanka Jain <priyanka.jain@nxp.com> Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08siemens-am33x-common: Drop CONFIG_DMA_COHERENT*Tom Rini
These values are not used in the code, remove them. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08m53menlo: Drop CONFIG_DISCOVER_PHYTom Rini
This is not used in code, drop. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08Convert CONFIG_FSL_QIXIS et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_FSL_QIXIS CONFIG_QIXIS_I2C_ACCESS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08Convert CONFIG_DIMM_SLOTS_PER_CTLR to KconfigTom Rini
This converts the following to Kconfig: CONFIG_DIMM_SLOTS_PER_CTLR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08galileo: Remove CONFIG_DESIGNWARE_ETH referenceTom Rini
This platform has CONFIG_ETH_DESIGNWARE set already, which is the correct value for the driver in question. Remove this incorrect line. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08powerpc: mpc83xx: Migrate DEFAULT_IMMR to KconfigTom Rini
As no platforms override this value, set it for all mpc83xx platforms. Cc: Mario Six <mario.six@gdsys.cc> Cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>