aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-01-14Merge tag 'efi-2024-04-rc1' of ↵WIP/14Jan2024Tom Rini19-324/+356
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2024-04-rc1 Documentation: * update coreboot graphics documentation * fix '---' rendering UEFI: * add missing pointer check after memory allocation in efidebug * replace duplicate functions efi_dp_append and efi_dp_concat * support fmp versioning for multi bank update * avoid using dm_scan_other() in EFI app
2024-01-13cmd: efidebug: check pointer after memory allocationHeinrich Schuchardt1-0/+4
After calling efi_alloc() we must check that the return value is not NULL. Fixes: f01c961ee34c ("cmd: efidebug: add uri device path") Addresses-Coverity-ID: 477185 Dereference null return value Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13efi_loader: support fmp versioning for multi bank updateMasahisa Kojima1-15/+60
This commit stores the firmware version into the array of fmp_state structure to support the fmp versioning for multi bank update. The index of the array is identified by the bank index. This modification keeps the backward compatibility with the existing versioning feature. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13fwu: fix fwu_get_image_index interfaceMasahisa Kojima3-30/+26
The capsule update uses the DFU framework for updating storage. fwu_get_image_index() currently returns the image_index calculated by (dfu_alt_num + 1), but this is different from the image_index in UEFI terminology. Since capsule update implementation calls dfu_write_by_alt function, it is better that FWU returns the dfu_alt_num. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13efi_loader: Clean up efi_dp_append and efi_dp_concatIlias Apalodimas7-63/+35
Looking back at the initrd storing functionality, we introduced three functions, efi_dp_append_or_concatenate(), efi_dp_append/concat(). In hindsight we could have simplified that by a lot. First of all none of the functions append anything. They all allocate a new device path and concatenate the contents of two device paths in one. A boolean parameter controls the final device path -- if that's true an end node is injected between the two device paths. So let's rewrite this and make it a bit easier to read. Get rid of efi_dp_append(), efi_dp_concat() and rename efi_dp_append_or_concatenate() to efi_dp_concat(). This is far more intuitive and the only adjustment that is needed is an extra boolean argument on all callsites. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13doc: fix three-dash references in reStructuredTextGrzegorz Szymaszek2-3/+3
The "Sending patches" and "Patman patch manager" documents refer to the three-dash, "---", that separates patch parts. The symbol is written in the documentation in the same form as it is in actual patches: as three U+002D HYPHEN-MINUS characters. When building the documentation, Sphinx converts this symbol to a U+2014 EM DASH, that is invalid in this case. Make the three-dash symbol a reStructuredText inline literal to prevent its conversion; that is, enclose it in a pair of double backquotes (`). Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-13doc: coreboot: Update stale graphics enabling instructionsBin Meng1-7/+6
With latest coreboot (e.g.: v4.22.01), the instructions to enable graphics support has changed. Refresh the doc. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2024-01-13efi_loader: remove unused members from struct efi_disk_objMasahisa Kojima1-12/+3
part and dev_index in struct efi_disk_obj are not used, let's remove it. This commit also removes the invalid structure comment for @dev, it does not exist. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-13efi: Avoid using dm_scan_other()Simon Glass4-188/+207
This function is defined by bootstd so using it precludes using that feature. Use the board_early_init_r() feature instead. Nove the affected code into a new file, so that it is clear that this relates to board init. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-13efi_loader: fix iteration of FMP protocolsMasahisa Kojima1-6/+12
If one of the FMP protocols fails when calling GetImageInfo(), populating the ESRT ends up with failure and other FMP protocols are not added to the ESRT. We should still add all other FMP protocols to the ESRT. With this commit, iteration of all FMP protocols continues even though one of the FMP protocols fails. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-12Merge branch '2024-01-12-assorted-fixes'Tom Rini20-237/+193
- Allow defconfigs to #include files (so we can construct a defconfig from fragments), update phy-mtk-tphy binding, assorted test fixes, allow building host tools without cryptographic libraries again, android_ab bugfix, and make some SPL debugging cases easier.
2024-01-12Makefile: Run defconfig files through the C preprocessorAndrew Davis1-1/+2
This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-11android_ab: don't ignore ab_control_store return codeAlexey Romanov1-3/+15
ab_control_store() can return an error if writing to disk fails. In this case, we have to pass the error code to the caller. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-11tools: fix build without LIBCRYPTO supportPaul-Erwan Rio5-4/+10
Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") introduced a target-independent configuration to build crypto features in host tools. But since commit 2c21256b27d7 ("hash: Use Kconfig to enable hashing in host tools and SPL") the build without OpenSSL is broken, due to FIT signature/encryption features. Add missing conditional compilation tokens to fix this. Signed-off-by: Paul-Erwan Rio <paulerwan.rio@gmail.com> Tested-by: Alexander Dahl <ada@thorsis.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11tools: kwbimage: Allow disabling build on non-mvebu platformsAlexander Dahl3-1/+9
Some users want to build with CONFIG_TOOLS_LIBCRYPTO disabled, which in general is possible for at least some boards. 32-bit mvebu however requires kwbimage for building SPL, and kwbimage has a hard dependency to host OpenSSL. The new symbol CONFIG_TOOLS_KWBIMAGE allows disabling kwbimage build on non-mvebu platforms, and thus building without host libcrypto from OpenSSL. Based on previous work and discussions, see links below. Link: https://lore.kernel.org/u-boot/20211021093304.25399-1-pali@kernel.org/ Link: https://lore.kernel.org/u-boot/20220111153120.1276641-1-marex@denx.de/ Link: https://lore.kernel.org/u-boot/20230121154743.667253-2-paulerwan.rio@gmail.com/ Cc: Marek Vasut <marex@denx.de> Cc: Paul-Erwan Rio <paulerwan.rio@gmail.com> Signed-off-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11test: fs: fs-test: Move the tests to use sha256sumPeter Robinson1-59/+59
Move the use of md5s for recording filesystem file integrity checks to sha256 hashes as they're preferred due to being less likely to produce clashing hashes. In the process generalise some of the wording to use the more generic hash term. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2024-01-11ti: am335x: Remove unused linker scriptTom Rini1-164/+0
The board specific linker script has not been used in a long time here, remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-11arm: spl: Use separate fault handlers instead of a single common oneCsókás Bence2-0/+27
It may be necessary to set breakpoints etc. on a specific fault handler in SPL. Add a Kconfig option to separate the different handlers into their own individual infinite loops. Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
2024-01-11test: CONFIG_UT_BOOTSTD must depend on CONFIG_BOOTSTDHeinrich Schuchardt1-1/+1
Building sandbox_defconfig with CONFIG_BOOTSTD=n CONFIG_UT_BOOTSTD=y leads to an error /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0xc0): undefined reference to `do_ut_bootstd' Add the missing dependency. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11boot: CONFIG_CEDIT must depend on CONFIG_EXPOHeinrich Schuchardt2-2/+2
Building sandbox_defconfig with CONFIG_CMD_CEDIT=y CONFIG_EXPO=n fails with cmd/cedit.c:258:(.text.do_cedit_run+0x4c): undefined reference to `expo_apply_theme Fix the dependencies. Fixes: a0874dc4ac71 ("expo: Add a configuration editor") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11test: build test/boot for CONFIG_UT_BOOTSTD=nHeinrich Schuchardt1-1/+1
Building sandbox_defconfig with CONFIG_UT_BOOTSTD=n CONFIG_MEASURMENT=y results in an error: /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0x408): undefined reference to `do_ut_measurement' Fixes: 5999ea20fa42 ("test: Add sandbox TPM boot measurement") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-11boot: Support decompressing non-kernel OS imagesSimon Glass1-0/+1
Sometimes the kernel is built as an EFI application rather than a binary. We still want to support compression for this case. For arm64 the entry point is set later in the bootm_load_os() function, since these images are typically relocated due to the 2MB-alignment requirement of arm64 images. But since the EFI image is not in the same format, we need to update the entry point earlier. Set the entry point always, for kernel_noload to resolve this problem. It should be harmless to do this always. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-01-11phy: phy-mtk-tphy: add properties for phy tuningChunfeng Yun1-1/+57
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
2024-01-11dt-bindings: phy-mtk-tphy: add properties for phy tuningChunfeng Yun1-0/+9
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
2024-01-11Merge patch series "net fixes prior lwip"WIP/11Jan2024Tom Rini12-19/+26
Maxim Uvarov <maxim.uvarov@linaro.org> says: Add small net fixes prior lwip patches.
2024-01-11Makefile: add dtbs to cleanMaxim Uvarov1-0/+2
CI test checks that generated dtb has to be cleaned up. Use the same clean procedure as Linux top level Makefile has. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-11omap3: use device specific naming for mem_initMaxim Uvarov4-7/+7
Use device specific naming for functions so as to not overlap with common function names. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-11bcm_ns3: use device specific naming for variablesMaxim Uvarov1-3/+3
Use device specific naming for variables so as to not overlap with common function names. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2024-01-11mach-socfpga: do not overlap defines with lwipMaxim Uvarov2-6/+9
Fix compilation issue with overlapping lwip and march defines. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11driver/net/rtl8139: remove debug printMaxim Uvarov1-1/+1
debug print delays reset of the driver. Finally I see bunch of "rx error FFFF" errors in the screen. CI can not handle many prints. While network works fine there Reproduced with: make CROSS_COMPILE=sh2-linux- r2dplus_defconfig all qemu-system-sh4 -M r2d -nographic -serial null \ -serial mon:stdio -net user,tftp=`pwd` \ -net nic,model=rtl8139 -kernel ./u-boot.bin Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11sandbox: eth-raw-os: successful return code is 0Maxim Uvarov1-1/+1
all network drivers return 0 on the successful transmission. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11net/smc911x: fix return from smc911x_sendMaxim Uvarov1-1/+1
return value of smc911x_send is ignored, but on sucesseful send we need return 0 and or error -ETIMEOUT, not opposite. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11test_net: print out net listMaxim Uvarov1-0/+2
Printing net list is useful in CI log files. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11Merge tag 'u-boot-dfu-20240111' of ↵Tom Rini15-45/+236
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20240111 - Implement fastboot multi-response. This allows multi-line response and most importantly, finally adds support for fastboot getvar all command. - New 'fastboot oem console' command. Useful for debugging to send data the u-boot shell via fastboot - Console recording fixes
2024-01-10configs: Resync with savedefconfigTom Rini3-35/+15
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-10Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini5-30/+256
- AC5: Use finer grained memory map (Chris) - Espressobin: Misc improvements (Robert) - eDPU: Support new board revision (Robert)
2024-01-10arm: mvebu: eDPU: support new board revisionRobert Marko4-5/+184
There is a new eDPU revision that uses Marvell 88E6361 switch onboard. We can rely on detecting the switch to enable and fixup the Linux DTS so a single DTS can be used. There is currently no support for the 88E6361 switch and thus no working networking in U-Boot, so we disable both ports. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2024-01-10arm: mvebu: Espressobin: move network setup into a separate functionRobert Marko1-5/+12
Currently, Esspresobin switch is being setup directly in last_stage_init() which makes it hard to add support for any other board to be setup. So, lets just move the switch setup code to a separate function and call it if compatible matches, there should be no functional change. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2024-01-10arm: mvebu: Espressobin: move FDT fixup into a separate functionRobert Marko1-5/+9
Currently, Esspresobin FDT is being fixed up directly in ft_board_setup() which makes it hard to add support for any other board to be fixed up. So, lets just move the FDT fixup code to a separate function and call it if compatible matches, there should be no functional change. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2024-01-10arm: mvebu: AC5: Use finer grained memory mapChris Packham1-15/+51
The ATF implementation for AC5/AC5X ends up with bl31 living in some internal SRAM. This is in the middle of the large MMIO region that we were using. Adjust this to be finer grained blocks based on the address map from the AC5X Family Control and Management Subsystem Functional Datasheet. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2024-01-09Merge tag 'smbios-2024-04-rc1' of ↵Tom Rini9-26/+647
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request smbios-2024-04-rc1 * make table_compute_checksum() arguments const * remove duplicate function verify_checksum() * enable setting processor family > 0xff * set correct SMBIOS processor family value for RISC-V * avoid importing ofnode.h in smbios.h * provide a UEFI tool to dump SMBIOS table
2024-01-09Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsungTom Rini3-55/+108
2024-01-09pinctrl: exynos: Convert to use livetree API for fdt accessSam Protsenko1-12/+8
Use counterpart dev_read_* functions instead of fdt* ones. It fixes checkpatch warnings like this: WARNING: Use the livetree API (dev_read_...) #54: FILE: drivers/pinctrl/exynos/pinctrl-exynos.c:137: pinvals[idx] = fdtdec_get_int(fdt, node, and also makes it possible to avoid using the global data pointer in the driver. No functional change. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Reduce variables scopeSam Protsenko1-3/+4
Pull some variables declared in exynos_pinctrl_set_state() into its loop, to reduce their scope. Style commit, no functional change. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Refactor handling the pin related dt propertiesSam Protsenko1-16/+19
All pin related dt properties (pin-function, pin-pud and pin-drv) are handled in a very similar way. Get rid of that code duplication by extracting the corresponding data knowledge into an actual data structure (array), and then just iterating over it. No functional change, it's a refactoring commit. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Support different register types in pin banksSam Protsenko3-17/+61
Get rid of hard-coded register offsets and widths. Instead provide a way for pinctrl drivers to specify different pin bank register offsets and widths. This in turn makes it possible to add support for new SoCs that have registers with offset/width values different than generic ones already available in pinctrl-exynos driver. Offset constants (now unused in pinctrl-exynos.c) are moved to pinctrl-exynos7420 driver, which is the single user of those constants. The design of this patch follows Linux kernel pinctrl-exynos driver design, in terms of added data structures and types. This patch doesn't add support for any new SoCs and shouldn't introduce any functional changes. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Rework pin_to_bank_base() to obtain data by nameSam Protsenko1-13/+14
Rework pin_to_bank_base() function to obtain bank data structure by bank name instead of getting bank base address by pin name, and rename it to get_bank() to reflect this change. This in turn leads to the extraction of parse_pin(), so the caller has to use it before calling get_bank(). No functional change. This is a refactoring commit which prepares pinctrl driver code for handling different sizes of register fields, which will be added next. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Extract pin parsing code into a separate functionSam Protsenko1-10/+17
Next commits are going to re-design the pin_to_bank_base() function and its usage in a way that the pin parsing code will be called separately. Extract it into a separate function first, as a refactoring commit. No functional change. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09pinctrl: exynos: Improve coding styleSam Protsenko2-2/+3
Style commit, no functional change. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09test: hush: dollar: fix bugous behaviorIon Agorria1-20/+3
The dollar test was merged with bugous console behavior, and instead of fixing it, this behavior was just workarounded. It seems like without the fix the ut_assert_skipline(); didn't clear console and running ut_assert_skipline(); many times would give always OK. With lib: membuff: fix readline not returning line in case of overflow the line is cleared correctly and next assert fails because now there is nothing to clean which is correct if we look the this a bit above the failing assert: if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) { /* * For some strange reasons, the console is not empty after * running above command. * So, we reset it to not have side effects for other tests. */ console_record_reset_enable(); } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) { ut_assert_console_end(); } Which further confirms that tests workaround the old problem and now that problem is fixed we can remove the whole if blocks and simply place ut_assert_console_end() right after ut_assert_skipline() without any conditional and will pass green. So this part of code goes from: ut_assert_skipline(); ut_assert_skipline(); if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) { /* See above comments. */ console_record_reset_enable(); } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) { ut_assert_console_end(); } to become: ut_assert_skipline(); ut_assert_console_end(); Same thing should be done with the if block mentioned above that calls console_record_reset_enable(). Signed-off-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240105072212.6615-8-clamor95@gmail.com [mkorpershoek: reworded commit title] Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>