summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-06-23firmware: scmi: prepare uclass to pass channel referenceEtienne Carriere
Changes SCMI transport operator ::process_msg to pass the SCMI channel reference provided by caller SCMI protocol device. Signed-off-by: Etienne Carriere <[email protected]>
2022-06-23firmware: scmi: prepare scmi uclass API to multi-channelEtienne Carriere
Changes SCMI driver API function devm_scmi_process_msg() to add an SCMI channel reference argument for when SCMI agent supports SCMI protocol specific channels. First argument of devm_scmi_process_msg() is also change to point to the caller SCMI protocol device rather than its parent device (the SCMI agent device). The argument is a pointer to opaque struct scmi_channel known from the SCMI transport drivers. It is currently unused and caller a pass NULL value. A later change will enable such support once SCMI protocol drivers have means to get the channel reference during initialization. Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Jaehoon Chung <[email protected]> Signed-off-by: Etienne Carriere <[email protected]>
2022-06-23test: fuzz: Add framework for fuzzingAndrew Scull
Add the basic infrastructure for declaring fuzz tests and a command to invoke them. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-23fuzzing_engine: Add fuzzing engine uclassAndrew Scull
This new class of device will provide fuzzing inputs from a fuzzing engine. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-22corstone1000: Convert to text file environmentTom Rini
Convert this platform to using the text file environment rather than defining CONFIG_EXTRA_ENV_SETTINGS. Signed-off-by: Tom Rini <[email protected]>
2022-06-22gxp: Convert to text file environmentTom Rini
Convert this platform to using the text file environment rather than defining CONFIG_EXTRA_ENV_SETTINGS. Signed-off-by: Tom Rini <[email protected]>
2022-06-22configs: gxp: add core supportNick Hawkins
Add the include file for the gxp soc. Signed-off-by: Nick Hawkins <[email protected]>
2022-06-22arm: add support to corstone1000 platformRui Miguel Silva
Corstone1000 is a platform from arm, which includes pre verified Corstone SSE710 sub-system that combines Cortex-A and Cortex-M processors [0]. This code adds the support for the Cortex-A35 implementation at host side, it contains also the necessary bits to support the Corstone 1000 FVP (Fixed Virtual Platform) [1] and also the FPGA MPS3 board implementation of this platform. [2] 0: https://developer.arm.com/documentation/102360/0000 1: https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps 2: https://developer.arm.com/documentation/dai0550/c/ Signed-off-by: Rui Miguel Silva <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-06-22cmd: load: add load command for memory mappedRui Miguel Silva
cp.b is used a lot as a way to load binaries to memory and execute them, however we may need to integrate this with the efi subsystem to set it up as a bootdev. So, introduce a loadm command that will be consistent with the other loadX commands and will call the efi API's. ex: loadm $kernel_addr $kernel_addr_r $kernel_size with this a kernel with CONFIG_EFI_STUB enabled will be loaded and then subsequently booted with bootefi command. Signed-off-by: Rui Miguel Silva <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-06-22ARM: dts: omap3-devkit8000: Add support for Devkit8000Anthoine Bourgeois
This commit adds OMAP3 BeagleBoard devicetree files from Linux v5.16.0. This commit fixes CONFIG_DM_MMC warning. v3: patch clean-up Signed-off-by: Anthoine Bourgeois <[email protected]>
2022-06-20Merge branch 'master' into nextTom Rini
Merge in v2022.07-rc5.
2022-06-20Merge tag 'u-boot-stm32-20220620' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm into next - Add STM32MP13 SoCs support with associated board STM32M135F-DK - Correct livetree support in stm32mp1 boards - Activate livetree for stm32mp15 DHSOM boards
2022-06-20board: sl28: rename include guard macroMichael Walle
Avoid name clashes with an include file on board level. Signed-off-by: Michael Walle <[email protected]>
2022-06-20board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.hPali Rohár
Code for changing boot source is platform generic and can be used by any P1* and P2* compatible RDB board. Not only by boards which use config header file p1_p2_rdb_pc.h. So move this code from p1_p2_rdb_pc.h to p1_p2_bootsrc.h and cleanup macros for generating boot source env variables in CONFIG_EXTRA_ENV_SETTINGS. This allows to use code for resetting board and rebooting to other boot source also by other boards in future. Signed-off-by: Pali Rohár <[email protected]>
2022-06-19efi_loader: initialize console size lateHeinrich Schuchardt
If CONFIG_VIDEO_DM=n we query the display size from the serial console. Especially when using a remote console the response can be so late that it interferes with autoboot. Only query the console size when running an EFI binary. Add debug output showing the determined console size. Reported-by: Fabio Estevam <[email protected]> Fixes: a57ad20d07e8 ("efi_loader: split efi_init_obj_list() into two stages") Fixes: a9bf024b2933 ("efi_loader: disk: a helper function to create efi_disk objects from udevice") Signed-off-by: Heinrich Schuchardt <[email protected]> Tested-by: Fabio Estevam <[email protected]> Tested-by: Heiko Thiery <[email protected]>
2022-06-17Merge commit '32e0379143b433e29d76404f5f4c279067e48853' of ↵Tom Rini
https://github.com/tienfong/uboot_mainline
2022-06-17stm32mp1: fix reference for STMicroelectronicsPatrick Delaunay
Replace reference to the correct name STMicroelectronics Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-17configs: stm32mp: cleanup the stm32mp15 filePatrick Delaunay
Remove STM32_SYSRAM_END and clean the comments in stm32mp15_common.h file after moving some CONFIG to Kconfig: CONFIG_SYS_CBSIZE, CONFIG_SPL_MAX_FOOTPRINT, CONFIG_SYS_SPL_MALLOC_START and CONFIG_SYS_SPL_MALLOC_SIZE. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-17stm32mp: stpmic1: remove the debug unit request by debuggerPatrick Delaunay
Depending on backup register value, U-Boot SPL maintains the debug unit powered-on for debugging purpose; only BUCK1 is required for powering the debug unit, so revert the setting for all the other power lanes, except BUCK3 that has to be always on. To be functional this patch requires a modification in the debugger ,openocd for example, to update the STM32MP15 backup register when it is required to debug SPL after reset. After deeper analysis this behavior will be never supported in tools so the associated code, will be never used and the associated code can be removed. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-17arm: stm32mp: add support of STM32MP13xPatrick Delaunay
Introduce the code in mach-stm32mp and the configuration file stm32mp13_defconfig for the new STM32MP family. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-16fs/squashfs: sqfs_read: Prevent arbitrary code executionMiquel Raynal
Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent such an exploit from happening by capping directory name sizes to 255. Use a define for this purpose so that developers can link the limitation to its source and eventually kill it some day by dynamically allocating this array (if ever desired). Link: https://lore.kernel.org/all/CALO=DHFB+yBoXxVr5KcsK0iFdg+e7ywko4-e+72kjbcS8JBfPw@mail.gmail.com Reported-by: Jincheng Wang <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Tested-by: Jincheng Wang <[email protected]>
2022-06-16odroid_xu3: Fix board environment variableTom Rini
When migrating CONFIG_CONS_INDEX to Kconfig, on this platform we changed what "board" evaluated to in the environment. This in turn meant that we would no longer try and find the correct fdtfile via the normal distro boot logic. Fix this by overriding board in the default environment, as done on other platforms where CONFIG_SYS_BOARD is not what we want to be in the board environment variable. Fixes: f76750d11133 ("Convert CONFIG_CONS_INDEX et al to Kconfig") Reported-by: Gabriel Hojda <[email protected]> Tested-by: Gabriel Hojda <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2022-06-16Merge tag 'u-boot-imx-20220616' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220616 ------------------- Fixes for 2022.07 + Toradex apalis-imx8 (missed in last PR) CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/12322
2022-06-16arm: socfpga: vining: Unmount UBIFS and detach UBI in ubi_load scriptMarek Vasut
Clean up in ubiload script. Unmount UBIFS from which kernel image was loaded and detach UBI on which the UBIFS is located, otherwise message similar to the following is printed just before booting kernel: Removing MTD device #7 (rootfs) with use count 1 Error when deleting partition "rootfs" (-16) Signed-off-by: Marek Vasut <[email protected]> Cc: Siew Chin Lim <[email protected]> Cc: Simon Goldschmidt <[email protected]> Cc: Tien Fong Chee <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2022-06-15mmc: Add support for wait_dat0 callbackLoic Poulain
There is no wait_dat0 mmc ops, causing operations waiting for data line state change (e.g mmc_switch_voltage) to fallback to a 250ms active delay. mmc_ops still used when DM_MMC is not enabled, which is often the case for SPL. The result can be unexpectly long SPL boot time. This change adds support for wait_dat0() mmc operation. Signed-off-by: Loic Poulain <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2022-06-14configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGEPeng Fan
CONFIG_SPL_RAW_IMAGE_SUPPORT default y has been used to replace CONFIG_SPL_ABORT_ON_RAW_IMAGE for quite some time, so drop CONFIG_SPL_ABORT_ON_RAW_IMAGE. Signed-off-by: Peng Fan <[email protected]>
2022-06-14imx: kontron-sl-mx8mm: enable DM_SERIALPeng Fan
Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Acked-by: Frieder Schrempf <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Tested-by: Frieder Schrempf <[email protected]>
2022-06-14imx: imx8mn_var_som: enable DM_SERIALPeng Fan
Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Ariel D'Alessandro <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-06-14imx: imx8m[m/p]_phycore: Enable DM_SERIALPeng Fan
Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_early_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Tested-by: Teresa Remmet <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-06-14imx: imx8mm_icore: Enable SPL_DM_SERIALPeng Fan
Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_early_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-06-14imx: imx8mm-cl-iot-gate: Enable DM_SERIALPeng Fan
Enable CONFIG_DM_SERIAL. uart3 and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_early_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-06-14imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIALPeng Fan
Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl. Move preloader_console_init after spl_init to make sure driver model work. Signed-off-by: Peng Fan <[email protected]> Tested-by: Adam Ford <[email protected]> #imx8mm_beacon Reviewed-by: Fabio Estevam <[email protected]> Tested-by: Adam Ford <[email protected]> #imx8mn_beacon
2022-06-14imx: drop CONFIG_MXC_UART_BASEPeng Fan
Since these boards has CONFIG_DM_SERIAL and/or CONFIG_SPL_DM_SERIAL, the legacy macro no need to be defined. Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Peng Fan <[email protected]> Acked-by: Soeren Moch <[email protected]> Acked-by: Tim Harvey <[email protected]>
2022-06-14verdin-imx8mm, verdin-imx8mp: Fix default systemd console outputPhilippe Schenker
systemd prints its messages on the last console= statement that it finds in the kernel arguments. The current ordering sends the systemd messages to tty1, by default this is the display. Ensure that systemd sends its messages to the default UART, reorder the console= statements accordingly. Signed-off-by: Philippe Schenker <[email protected]> Reviewed-by: Stefano Babic <[email protected]> Acked-by: Marcel Ziswiler <[email protected]> Signed-off-by: Marcel Ziswiler <[email protected]>
2022-06-12efi_loader: correctly identify binary nameHeinrich Schuchardt
Only on the sandbox the default EFI binary name (e.g. BOOTX64.EFI) must match the host architecture. In all other cases we must use the target architecture. Use #elif where appropriate. Reported-by: Vagrant Cascadian <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-06-10configs: Add configs for AM62x SKVignesh Raghavendra
Add am62x_evm_r5_defconfig for R5 SPL and am62x_evm_a53_defconfig for A53 SPL and U-Boot support. To keep the changes to minimum. Only UART And SD boot related configs are included. This should serve as good starting point for new board bringup with AM62x. Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> [trini: Migrate a number of CONFIG symbols, have re-tested] Tested-by: Georgi Vlaev <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2022-06-10arm: mach-k3: am62: Introduce autogenerated SoC dataSuman Anna
Introduce autogenerated SoC data support clk and device data for the AM62. Hook it upto to power-domain and clk frameworks of U-Boot. Signed-off-by: Dave Gerlach <[email protected]> Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-06-10dt-bindings: pinctrl: k3: Introduce pinmux definitions for AM62Suman Anna
Add pinctrl macros for AM62x SoCs. These macro definitions are similar to that of previous platforms, but adding new definitions to avoid any naming confusions in the SoC dts files. checkpatch insists the following error exists: ERROR: Macros with complex values should be enclosed in parentheses However, we do not need parentheses enclosing the values for this macro as we do intend it to generate two separate values as has been done for other similar platforms. Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-06-10arm: bcmbca: introduce the bcmbca architecture and 47622 SOCWilliam Zhang
This is the initial support for Broadcom's ARM-based 47622 SOC. In this change, our first SOC is an armv7 platform called 47622. The initial support includes a bare-bone implementation and dts with ARM PL011 uart. The SOC-specific code resides in arch/arm/mach-bcmbca/<soc> and board related code is in board/broadcom/bcmba. The u-boot image can be loaded from flash or network to the entry point address in the memory and boot from there. Signed-off-by: William Zhang <[email protected]> Signed-off-by: Kursad Oney <[email protected]> Signed-off-by: Anand Gore <[email protected]> Reviewed-by: Philippe Reynes <[email protected]>
2022-06-10configs: j721e_evm.h: define CONFIG_SYS_FLASH_BASEVaishnav Achath
Define CONFIG_SYS_FLASH_BASE to indicate start address of Flash memory Signed-off-by: Vaishnav Achath <[email protected]>
2022-06-08misc: Add support for nvmem cellsSean Anderson
This adds support for "nvmem cells" as seen in Linux. The nvmem device class in Linux is used for various assorted ROMs and EEPROMs. In this sense, it is similar to UCLASS_MISC, but also includes UCLASS_I2C_EEPROM, UCLASS_RTC, and UCLASS_MTD. New drivers corresponding to a Linux-style nvmem device should be implemented as one of the previously-mentioned uclasses. The nvmem API acts as a compatibility layer to adapt the (slightly different) APIs of these uclasses. It also handles the lookup of nvmem cells. While nvmem devices can be accessed directly, they are most often used by reading/writing contiguous values called "cells". Cells typically hold information like calibration, versions, or configuration (such as mac addresses). nvmem devices can specify "cells" in their device tree: qfprom: eeprom@700000 { #address-cells = <1>; #size-cells = <1>; reg = <0x00700000 0x100000>; /* ... */ tsens_calibration: calib@404 { reg = <0x404 0x10>; }; }; which can then be referenced like: tsens { /* ... */ nvmem-cells = <&tsens_calibration>; nvmem-cell-names = "calibration"; }; The tsens driver could then read the calibration value like: struct nvmem_cell cal_cell; u8 cal[16]; nvmem_cell_get_by_name(dev, "calibration", &cal_cell); nvmem_cell_read(&cal_cell, cal, sizeof(cal)); Because nvmem devices are not all of the same uclass, supported uclasses must register a nvmem_interface struct. This allows CONFIG_NVMEM to be enabled without depending on specific uclasses. At the moment, nvmem_interface is very bare-bones, and assumes that no initialization is necessary. However, this could be amended in the future. Although I2C_EEPROM and MISC are quite similar (and could likely be unified), they present different read/write function signatures. To abstract over this, NVMEM uses the same read/write signature as Linux. In particular, short read/writes are not allowed, which is allowed by MISC. The functionality implemented by nvmem cells is very similar to that provided by i2c_eeprom_partition. "fixed-partition"s for eeproms does not seem to have made its way into Linux or into any device tree other than sandbox. It is possible that with the introduction of this API it would be possible to remove it. Signed-off-by: Sean Anderson <[email protected]>
2022-06-08misc: i2c_eeprom: Add fallbacksSean Anderson
Add some fallback functions for when i2c_eeprom is disabled. This allows code to reference i2c_eeprom_* functions without needing to check whether support has been compiled in. Signed-off-by: Sean Anderson <[email protected]>
2022-06-08misc: i2c_eeprom: Make i2c_eeprom_write use a const bufSean Anderson
i2c_eeprom_ops->write uses a const buf, so use one for the wrapper function as well. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Check used descriptors are chain headsAndrew Scull
When the device returns used buffers, it should refer to the descriptor that is the head of the descriptor chain for that buffer. Confirm this to be the case by tracking the head of descriptor chains that have been made available to the device. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Maintain a shadow copy of descriptorsAndrew Scull
The shared descriptors should only be written by the guest driver, however, the device is still able to overwrite and corrupt them. Maintain a private shadow copy of the descriptors for the driver to use for state tracking, removing the need to read from the shared descriptors. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-07watchdog: Fix SPL build with watchdog disabled in asm filesPali Rohár
Allow to compile assembler files in SPL build which calls WATCHDOG_RESET function when watchdog is disabled in SPL and enabled in U-Boot proper. This issue was fixed in past by commit 7fbd42f5afc4 ("watchdog: Handle SPL build with watchdog disabled") for C source files, but not for assembler source files. Currently the only assembler source file which calls WATCHDOG_RESET is arch/powerpc/lib/ticks.S, so this patch affects and fixes powerpc SPL builds. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-06-06include/configs: Remove rootwait=1 to all the affected boardsMichael Trimarchi
rootwait=1 is not a valid kernel boot parameters. According to the documenation is only rootwait rootwait [KNL] Wait (indefinitely) for root device to show up. Useful for devices that are detected asynchronously (e.g. USB and MMC devices). Fix: Unknown kernel command line parameters "rootwait=1", will be passed to user space. Signed-off-by: Michael Trimarchi <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2022-06-06common/board_r.c: drop legacy and unused bi_enetaddrRasmus Villemoes
The bi_enetaddr field in struct bd_info is write-only; nothing ever reads back the value. Moreover, the value we write is more or less random, and certainly not something one can rely on: If the board has a writable environment and the mac address has been stored there, we fetch that value. But if the board doesn't, this code runs before initr_net() -> eth_initialize(), and thus before the code in eth-uclass which fetches MAC addresses from eeprom, fuses or whatnot and populates the (run-time) environment with those values. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-06-06event: fix static events for CONFIG_NEEDS_MANUAL_RELOCOvidiu Panait
Static events do not currently work post-relocation for boards that enable CONFIG_NEEDS_MANUAL_RELOC. Relocate event handler pointers for all event spies to fix this. Tested on Microblaze. Signed-off-by: Ovidiu Panait <[email protected]>