summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-02-11tools: fix NULL_AFTER_DEREF in image-host.cAnton Moryakov
Report of the static analyzer: 1. NULL_AFTER_DEREF Pointer 'str', which is dereferenced at image-host.c:688 by calling function 'strdup', is compared to a NULL value at image-host.c:691. 2. NULL_AFTER_DEREF Pointer 'list', which is dereferenced at image-host.c:689, is compared to a NULL value at image-host.c:691. Corrections explained: 1. Checking for NULL before using pointers: The if (!list || !str) check is now performed before calling strdup and realloc, which prevents null pointer dereferences. 2. Checking the result of strdup: strdup can return NULL if memory allocation fails. This also needs to be checked. 3. Checking the result of realloc: If realloc returns NULL, then memory has not been allocated and dup must be freed to avoid memory leaks. Triggers found by static analyzer Svace. Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
2025-02-10arm: Remove redundant loading of image copy start offseLiya Huang
Because the beginning is already computed Signed-off-by: Liya Huang <1425075683@qq.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-02-10Prepare v2025.04-rc2v2025.04-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-02-10CI: Drop extra condition for sjg labSimon Glass
The rules part of the template makes sure that this doesn't run until specifically requested. Drop the check in the script itself, so it is possible to trigger a run manually without re-pushing the tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-02-10Merge patch series "Enable MCU ESM reset"Tom Rini
Judith Mendez <jm@ti.com> says: This patch series enables ESM reset configuration in board_init_f for am62x and am62px devices. This is necessary in order for error events to reset the system. This patches are tested using watchdog to reset the system via ESM. Link: https://lore.kernel.org/r/20250129234403.574766-1-jm@ti.com
2025-02-10configs: am62*_evm_r5: Enable ESM and MISC configsSanthosh Kumar K
Enable CONFIG_SPL_DRIVERS_MISC, CONFIG_SPL_MISC, CONFIG_ESM_K3 to probe the Main ESM and MCU ESM nodes. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Signed-off-by: Judith Mendez <jm@ti.com>
2025-02-10arm: mach-k3: am62*_init: Probe ESM nodesSanthosh Kumar K
On AM62A and AM62P devices, it is possible to route Main ESM error events to MCU ESM. MCU ESM high error output can trigger the reset logic to reset the device. So, for these devices we have Main ESM and MCU ESM nodes in the device tree. Add functions to probe these nodes if CONFIG_ESM_K3 is enabled. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Signed-off-by: Judith Mendez <jm@ti.com>
2025-02-10include: env: phytec: Add optargs to K3 filesNathan Morrisson
Add the optargs variable so that we can set optional arguments while booting. Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2025-02-10env: fat: Avoid writing to read-only locationAndre Przywara
The env_fat_get_dev_part() function mostly returns a fixed string, set via some Kconfig variable. However when the first character is a colon, that means that the boot device number is determined at runtime, and patched in. This requires altering the string. So far this was done via some ugly and actually illegal direct write to the .rodata string storage. We got away with this because U-Boot maps everything as read/write/execute so far. A proposed patch set actually enforces read-only (and no-execute) permissions in the page tables, so this routine now causes an exception: ======================= Loading Environment from FAT... "Synchronous Abort" handler, esr 0x9600004f, far 0xfffb7d4c elr: 000000004a054228 lr : 000000004a05421c (reloc) elr: 00000000fff7c228 lr : 00000000fff7c21c ..... ======================= Rewrite the routine to do away with the dodgy string manipulation, instead allocate the string in the r/w .data section, where we can safely manipulate it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-02-10Merge patch series "FIX: Re-enable MUX_MMIO on J721E/J7200"Tom Rini
Siddharth Vadapalli <s-vadapalli@ti.com> says: Hello, This series re-enables MUX_MMIO at U-Boot proper on J721E and J7200 SoCs. The commits which introduced support for Hyperflash boot on both of these SoCs disabled MUX_MMIO functionality at U-Boot proper, thereby introducing a regression. Series is based on commit 2b1c8d3b2d cmd: Fix Kconfig coding style of the master branch of U-Boot. Link: https://lore.kernel.org/r/20250201091809.1894892-1-s-vadapalli@ti.com
2025-02-10configs: j7200_evm_a72_defconfig: Re-enable MUX_MMIO at U-Boot properSiddharth Vadapalli
Commit under Fixes introduced support for Hyperflash boot but also disabled MUX_MMIO support at U-Boot proper. MUX_MMIO is required at U-Boot proper to setup the SERDES Lane Mapping as described by the device-tree. On J7200 SoC, PCIe functionality is broken since commit under fixes. Fix this regression by re-enabling MUX_MMIO. Fixes: 038f6faea9f0 ("configs: j7200_evm_*_defconfig: Add configs for Hyperflash boot") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Anurag Dutta <a-dutta@ti.com>
2025-02-10configs: j721e_evm_a72_defconfig: Re-enable MUX_MMIO at U-Boot properSiddharth Vadapalli
Commit under Fixes introduced support for Hyperflash boot but also disabled MUX_MMIO support at U-Boot proper. MUX_MMIO is required at U-Boot proper to setup the SERDES Lane Mapping as described by the device-tree. Fix this regression by re-enabling MUX_MMIO. Fixes: fd7fcd4098d5 ("configs: j721e_evm_*_defconfig: Add configs for Hyperflash boot") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2025-02-10rtc: emul_rtc: Make emul_rtc_probe() staticMichal Simek
emul_rtc_probe() is not called from anywhere else that's why make it static. Issue is reported by build with W=1. Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-10net: designware: support phy io micro voltage setting.Michael Chang
Support phy io micro voltage setting for NPCM8XX rgmii interface. Signed-off-by: Michael Chang <zhang971090220@gmail.com>
2025-02-10mediatek: mt7981: enable ethernet switch auto-detctionWeijie Gao
This patch enables switch auto-detction for mt7981 as some new mt7981 boards will use AN8855 ethernet switch. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-02-10configs: phycore_am64x_r5_defconfig: Enable PHYTEC_SOM_DETECTIONWadim Egorov
Enable configs required for detecting and fixing up for different RAM variants. Also resync after savedefconfig. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Tested-by: Daniel Schultz <d.schultz@phytec.de>
2025-02-10board: phytec: phycore_am64x: Add support for 1 GB RAM variant and ECCWadim Egorov
Detect RAM size via EEPROM and adjust DDR size and banks accordingly. Include necessary fixups to handle ECC-enabled configurations. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Tested-by: Daniel Schultz <d.schultz@phytec.de>
2025-02-10arch: arm: dts: phyboard-electra-uboot.dtsi: Add bootph props to i2cWadim Egorov
Add bootph-all properties to I2C0 nodes to ensure the bus and EEPROM are accessible across all stages. This enables reading the SoM configuration at any point during the boot process. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Tested-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2025-02-10test/py: usb: Fix format string for fstype commandAndrew Goodbody
USB tests on ext partitions can fail with the following output test/py/tests/test_usb.py:245: in test_usb_part 'fstype usb %d:%d' % i, part_id E TypeError: not enough arguments for format string So add brackets around the format string arguments to prevent the error. Fixes: a730947974e3 ("test/py: usb: Distinguish b/w ext2/ext4 partitions") Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Love Kumar <love.kumar@amd.com>
2025-02-10tools: mkenvimage: List -V parameter in help textMarek Vasut
The -V version parameter is missing in the optional list of parameters in help text. Add it. Signed-off-by: Marek Vasut <marex@denx.de>
2025-02-10mediatek: mt7986: rename pinctrl to pio in mt7986-u-boot.dtsiWeijie Gao
The change from pinctrl to pio was missing in mt7986-u-boot.dtsi and will cause build failure. Now fix it. Fixes: f1775996ba9 (mediatek: mt7986: move gpio-controller up and rename pinctrl to pio) Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-02-10pinctrl: mediatek: support reading register base address by nameWeijie Gao
This patch add support to read register base address by name if provided. Also devfdt_get_addr_* is changed to dev_read_addr_* to support DT live tree. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-02-10pinctrl: mediatek: mt7988: remove _base from reg-namesWeijie Gao
The reg-names in mt7988.dtsi have no _base suffix. Remove the suffix will also make it match upstream linux format. Fixes: 8c2cb748ef5 (pinctrl: mediatek: mt7988: rename reg-names to upstream linux format) Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-02-10Azure: Add missing "set -e" to docs jobTom Rini
Without setting the shell flag to exit immediately when a command exists with a non-zero status we can have the situation where the htmldocs target fails with an error but the job will succeed due to infodocs passing and being the last build target. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-02-10Merge https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini
- e850-96 platform updates
2025-02-07Merge patch series "cmd/setexpr: support concatenation of direct strings"Tom Rini
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says: The setexpr.s command allows to concatenate two strings. According to the description in doc/usage/cmd/setexpr.rst the parameters value1 and value2 can be either direct values or pointers to a memory location holding the values. Unfortunately `setexpr.s <value1> + <value2>` fails if any of the values is a direct value. $? is set to false. * Add support for direct values in setexpr.s. * Correct the unit test for "setexpr.s fred 0". * Add a new unit test for "setexpr.s fred '1' + '3'" giving '13'. * Remove invalid memory leak tests Link: https://lore.kernel.org/r/20250203151029.60265-1-heinrich.schuchardt@canonical.com
2025-02-07cmd/setexpr: support concatenation of direct stringsHeinrich Schuchardt
The setexpr.s command allows to concatenate two strings. According to the description in doc/usage/cmd/setexpr.rst the parameters value1 and value2 can be either direct values or pointers to a memory location holding the values. Unfortunately `setexpr.s <value1> + <value2>` fails if any of the values is a direct value. $? is set to false. * Add support for direct values in setexpr.s. * Correct the unit test for "setexpr.s fred 0". * Add a new unit test for "setexpr.s fred '1' + '3'" giving '13'. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-02-07test: remove available memory check in setexpr_test_str_oper()Heinrich Schuchardt
env_set() frees the previous value after allocating the new value. As the free() may merge memory chunks the available memory is not expected to stay constant. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-02-07test: remove available memory check in setexpr_test_str()Heinrich Schuchardt
env_set() frees the previous value after allocating the new value. As the free() may merge memory chunks the available memory is not expected to stay constant. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-02-07test: clean up setexpr_test_str()Heinrich Schuchardt
Assign variable buf in the sub-test where it is used. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-02-07Merge patch series "led: add function naming option from linux"Tom Rini
Heiko Schocher <hs@denx.de> says: In linux we have the option to create the name of a led optionally through the following properties: - function - color - function-enumerator This series adds support for parsing this properties if there is no label property. Link: https://lore.kernel.org/r/20250128135246.74838-1-hs@denx.de [trini: Document name parameter in led.h]
2025-02-07led: add function naming option from linuxHeiko Schocher
in linux we have the option to create the name of a led optionally through the following properties: - function - color - function-enumerator This patch adds support for parsing this properties if there is no label property. The led name is created in led_post_bind() and we need some storage place for it. Currently this patch prevents to use malloc() instead it stores the name in new member : char name[LED_MAX_NAME_SIZE]; of struct led_uc_plat. While at it append led tests for the new feature. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-07doc: remove redundant leds bindingsHeiko Schocher
remove file doc/device-tree-bindings/leds/common.txt as we have this now already in dts/upstream/include/dt-bindings/leds/common.h which is imported from linux. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-06Merge tag 'xilinx-for-v2025.04-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx changes for v2025.04-rc2 fpga: - Cleanup help - Show xilinx only options on Xilinx devices ospi-versal: - Fix alignment issue - Fix cadence_qspi_flash_reset() prototype zynqmp: - Define usb_pgood_delay - Fix bootseq number versal: - Fix mini_ospi configuration versal2: - Enable OPTEE xilinx: - Enable some flashes - Clean up SYS_MALLOC_F_LEN Kconfig - Some binman fixes - DT updates - Enable mkfwumdata compilation - Enable meminfo command - Switch to LWIP and enable HTTPS
2025-02-05arm64: configs: Remove SYS_BOOTM_LEN for TI devicesAashvij Shenai
AM62x BOOTM_LEN is too small to contain OS images. Removing this sets the size to a default 0x4000000 (for all arm64 devices). It is unnecessary to specifically call the default size for the other configs. Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com> Signed-off-by: Aashvij Shenai <a-shenai@ti.com>
2025-02-05arm: Correct dependency for STATIC_MACH_TYPELiya Huang
Kconfig should not display the STATIC_MACH_TYPE option when SUPPORT_PASSING_ATAGS is not selected. For example, when using most platforms with menuconfig, it shows the STATIC_MACH_TYPE option causing confusion. As we know, this should not occur when SUPPORT_PASSING_ATAGS is not selected [trini: Reword commit message] Signed-off-by: Liya Huang <1425075683@qq.com>
2025-02-05armv7m: kconfig adds the NVIC option and masks the GIC option when NVIC is ↵Liya Huang
selected ARMv7-M architecture uses NVIC instead of GIC. NVIC is an interrupt controller specially designed for ARM Cortex-M series processors. Signed-off-by: Liya Huang <1425075683@qq.com>
2025-02-05Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
2025-02-05zynqmp: Save "bootseq" environment variable in decimal formatBenjamin Szőke
In U-Boot, most of mmc releated commands uses decimal value in arguments, like "mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to improve compatibilities, export "bootseq" number to environment variable in decimal format instead of hex. Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu> Link: https://lore.kernel.org/r/20250204205617.1238-1-egyszeregy@freemail.hu Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05arm64: zynqmp: Describe images without TF-AMichal Simek
U-Boot can run out of EL3, NS-EL2 and NS-EL1. Currently default configuration is NS-EL2 with TF-A but when TF-A is not passed and configured images can still boot just fine. That's why support this configuration and describe it via binman. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/9b3dad80138e97005df3d033b4611c9d7e05a177.1738659214.git.michal.simek@amd.com
2025-02-05arm64: zynqmp: Use DTB address base from .configMichal Simek
CONFIG_XILINX_OF_BOARD_DTB_ADDR holds DTB address which U-Boot is checking. Currently address in binman match default value but macro can be used directly. Also sync node name (s/hash-1/hash/) and sync location to have the same order load/hash/image. All binman DTSes are compiled that's why also guard CONFIG_XILINX_OF_BOARD_DTB_ADDR which depends on OF_BOARD || OF_SEPARATE which is a problem for mini configurations which are using OF_EMBED. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/a22c9671b965b222bfd419f5bfaee012929f3d88.1738659214.git.michal.simek@amd.com
2025-02-05arm64: zynqmp: Fix TEE loading address and add hashMichal Simek
There is incorrect loading address listed for TEE. CONFIG_BL32_LOAD_ADDR should be used. Also there is missing hash for this entry which is present for other nodes. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/4e7e3a7110acc050ea7c06ac661e5b5be46e8602.1738659214.git.michal.simek@amd.com
2025-02-05fpga: Make do_fpga_loads() staticMichal Simek
do_fpga_loads() is not called from anywhere else that's why make it static. Reviewed-by: Alexander Dahl <ada@thorsis.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/cbe93e4eb33752aaddc943b15fd04731d4f75b68.1738574893.git.michal.simek@amd.com
2025-02-05configs: versal: update initial stack pointerPadmarao Begari
The mini u-boot is hanging because of an initial stack pointer address is used at half of the memory, when mini u-boot is called reloc_fdt() function and doing memcpy() for the fdt before relocation, and there is no sufficient memory for the stack pointer. To fix, set an initial stack pointer address to near the top of memory. The new stack pointer address is assigned before calling the relocate of u-boot based on the stack relocate calculation and this new stack pointer is used while executing u-boot from the relocated memory. Signed-off-by: Padmarao Begari <padmarao.begari@amd.com> Link: https://lore.kernel.org/r/20250203090409.844403-1-padmarao.begari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05xilinx: Enable MBEDTLS/LWIP/WGET and WGET_HTTPSMichal Simek
Enable lwip and https on our platforms to be able to use it in a boot. Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/cb05adaf0758c2c4f1361f8665169897493638e7.1738164681.git.michal.simek@amd.com
2025-02-05xilinx: Enable meminfo command with mappingMichal Simek
Enable meminfo command to be able to see where things are mapped. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/b7f9f5e18e16a945277d4b8cfde5a7f057e77676.1737976295.git.michal.simek@amd.com
2025-02-05xilinx: Enable mkfwumdata tool for a/b updateMichal Simek
Build mkfwumdata tool by default for building ab mdata structure. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/6d82c9a2db30e12ea17fa125c68a555d7f070851.1737723845.git.michal.simek@amd.com
2025-02-05fpga: add new symbol for fpga_loadbIbai Erkiaga
Adding new symbol for the fpga loadb command which is exclusive to Xilinx. Default value is y for backward compatibility. Clarify the type of file used for fpga programming commands Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com> Link: https://lore.kernel.org/r/20250121130138.1999916-6-ibai.erkiaga-elorza@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05fpga: xilinx exclusive commandsIbai Erkiaga
Ensure all Xilinx exclusive fpga commands have a KConfig symbol and dependency to FPGA_XILINX listed. Remove (Xilinx only) text from the help command. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com> Link: https://lore.kernel.org/r/20250121130138.1999916-5-ibai.erkiaga-elorza@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-02-05fpga: resort fpga commandsIbai Erkiaga
Resort the fpga commands both in the Kconfig and in the source code to list Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com> Link: https://lore.kernel.org/r/20250121130138.1999916-4-ibai.erkiaga-elorza@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>