summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-19Merge patch series "buildman: Add initial support for config fragments"Tom Rini
Simon Glass <sjg@chromium.org> says: This series updates buildman to process #include lines in defconfig files. With this, it is no-longer necessary to duplicate lines certain lines from the include-file in the defconfig, e.g. CONFIG_ARM and CONFIG_SOC_... Link: https://lore.kernel.org/r/20241108152350.3686274-1-sjg@chromium.org
2024-11-19buildman: Support a tilde to represent the home directorySimon Glass
It is convenient to use ~ to represent the home directory in the settings file. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19buildman: Correct logic for adding a toolchainSimon Glass
If the toolchain is bad, it should not be added. Correct the logic for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19buildman: Document the toolchain-prefix sectionSimon Glass
This is mentioned in examples but should have its own mention in the 'settings' documentation. Add it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19buildman: Correct the indentation in the setting-up sectionSimon Glass
The example settings file should be indented so that it shows correctly in the output. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19buildman: Support #include files in defconfigsSimon Glass
This is used by some boards in U-Boot and is a convenient way to deal with common settings where using a Kconfig files is not desirable. Detect #include files and process them as if they were part of the original file. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/30
2024-11-19buildman: Set up the tout librarySimon Glass
Use this to control info and debugging messages. Enable them if -v is given. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19buildman: Add a lower-level test for KconfigScannerSimon Glass
This code is tested by test_scan_defconfigs() but it is useful to have some specific tests for the KconfigScanner's operation in U-Boot. Add a test which checks that the values are obtained correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-18Merge tag 'efi-next-2024-11-18' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi into next CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/23430 - Prepare for implementing the EFI_HTTP_PROTOCOL: - Make wget functionality callable even if the wget command is not built (add CONFIG_WGET symbol). - Ensure that wget_with_dns() works the same with the old network stack and with lwIP. - Put server_name and port into wget_ctx. - Integrate struct wget_info into wget code. - Move ip_to_string to lib/net_utils.c
2024-11-18net: net_utils: Move ip_to_string to lib/net_utils.cAdriano Cordova
The function string_to_ip is already in net_utils, which is compiled unconditionally, but ip_to_string is currently only accessible if the legacy network stack is selected. This commit puts ip_to_string in net_utils.c and removes it from the legacy network code. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-17test/py: mmc: Add support for different mmc modesLove Kumar
Currently, MMC test runs on default mmc modes, adding a provision to support multiple mmc modes through user defined parameters. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-11-17test/py: usb: Distinguish b/w ext2/ext4 partitionsLove Kumar
'usb part' command shows the partition maps and shows the partition type by displaying number such as 0c, 83 etc. Observed that ext2 and ext4 partitions shows the same number, i.e, 83, so, using the fstype command to distiniguish between ext2 and ext4 partitions. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-11-17test/py: mmc: Distinguish b/w ext2/ext4 partitionsLove Kumar
'mmc part' command shows the partition maps and shows the partition type by displaying number such as 0c, 83 etc. Observed that ext2 and ext4 partitions shows the same number, i.e, 83, so, using the fstype command to distiniguish between ext2 and ext4 partitions. Signed-off-by: Love Kumar <love.kumar@amd.com>
2024-11-17console: Use printascii for lowlevel debug stringKever Yang
The lowlevel debug with CONFIG_DEBUG_UART has printascii for string print, and no need to convert to use printch now. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
2024-11-17armv8: cpu: Implement allow_unaligned()Sam Protsenko
Usually ARMv8 platforms allow unaligned access for Normal memory. But some chips might not allow it by default, having SCTLR.A bit set to 1 before U-Boot execution. One such example is Exynos850 SoC. As allow_unaligned() is not implemented for ARMv8 at the moment, its __weak implementation is used, which does nothing. That might lead to unaligned access abort, for example when running EFI selftest. Fix that by implementing allow_unaligned() for ARMv8. The issue was found when running EFI selftest on E850-96 board (Exynos850 based): => bootefi selftest $fdtcontroladdr ... Executing 'HII database protocols' "Synchronous Abort" handler, esr 0x96000021, far 0xbaac0991 ... resetting ... Unaligned abort happens in u16_strnlen(), which is called from efi_hii_sibt_string_ucs2_block_next(): u16_strlen(blk->string_text) where 'blk' type is struct efi_hii_sibt_string_ucs2_block. Because this struct is packed, doing "->string_text" makes 'blk' address incremented by 1 byte, which makes it unaligned. Although allow_unaligned() was called in efi_init_early() before EFI selftest execution, it wasn't implemented for ARMv8 CPUs, so data abort happened. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2024-11-17armv8: Fix get_sctlr() return typeSam Protsenko
SCTLR_EL2 is a 64-bit register [1]. Return its value as long (64 bit) instead of int (32 bit) in get_sctlr() to make sure it's not trimmed. [1] https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/SCTLR-EL2--System-Control-Register--EL2-?lang=en Fixes: 0ae7653128c8 ("arm64: core support") Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-11-17test: bootm: Ensure tests can be run twiceAndrew Goodbody
Some of the bootm tests rely on state that is assumed to be correct but is changed by the tests. This means that running 'ut bootm' twice will result in failures on the second run as the state left by the first run is not what the tests expect. Fix this by ensuring the state is as expected by explicitly setting that state. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-11-17dm: sysinfo: Shorten the SYSINFO_ID prefixSimon Glass
We are about to add a large number of new entries. Update the prefix to be a little shorter. For SMBIOS items, use SYSID_SM_ (for System Management) which is enough to distinguish it. For now at least, it seems that most items will be for SMBIOS. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Raymond Mao <raymond.mao@linaro.org>
2024-11-16bios_emulator: add missing includes to debug.cYuri Zaporozhets
When compiling with X86EMU_DEBUG, the compiler complains that debug.c misses two include files. Fix that. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-16bios_emulator: for non-x86, print warnings if PM_{inp, outp}* access is ↵Yuri Zaporozhets
attempted Currently the PM_{inp,outp}* macros are completely broken on non-x86 architectures, because they will essentially access random memory locations if called (and produce a lot of rightful compilation warnings too). For now, replace those macros with warnings (until the code is fixed), so the user at least knows that the emulator attempted to access some x86 I/O port. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-16global: Remove bi_sramstart/bi_sramsizeTom Rini
These fields are currently set on exactly two platforms today, and used by only one of them. Update pic32mzdask to use CFG_SYS_SRAM* in the one location it needs it and otherwise drop this field from the bd_info struct. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-16dm: button: support remapping phone keysCaleb Connolly
We don't have audio support in U-Boot, but we do have boot menus. Add an option to re-map the volume and power buttons to up/down/enter so that in situations where these are the only available buttons (such as on mobile phones) it's still possible to navigate menus built in U-Boot or an external EFI app like GRUB or systemd-boot. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Dragan Simic <dsimic@manjaro.org>
2024-11-16net/lwip: wget: integrate struct wget_info into wget codeAdriano Cordova
Each wget request now fills the struct wget_info. Also, the efi bootdevice is now set conditionally to the set_bootdevice variable in wget_info and a buffer size check is performed if check_buffer_size is set. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-11-16net/lwip: wget: put server_name and port into wget_ctxAdriano Cordova
Currently server_name and port are local variables in wget_loop. This commit puts them inside ctx, so that they are accessible from the http callbacks. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-11-16net: wget: make wget_with_dns return value compatible with its lwip versionAdriano Cordova
There are two wget_with_dns functions, one in the legacy network stack and one in lwip, but the return values are not compatible. This commit modifies the legacy version of wget_with_dns so that the return values are compatible: 0 on success, otherwise a negative error. This way wget_with_dns can be called in a network stack agnostic way. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-11-16net: wget: integrate struct wget_info into legacy wget codeAdriano Cordova
Each wget request now fills the struct wget_info. The efi bootdevice is now set conditionally to the set_bootdevice variable in wget_info, and the same holds for lmb memory check. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-11-16net: wget: Add interface to issue wget_requests using wget_http_infoAdriano Cordova
Declare and define a global default struct wget_http_info and an interface to issue wget requests providing a custom struct wget_http_info. This code is common to legacy wget and lwip wget. The idea is that the command wget should use the default wget_http_info and other internal u-boot code can call wget_request with their own wget_http_info struct. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-11-16net: wget: add definition of struct wget_http_infoAdriano Cordova
The struct wget_http_info exposes the HTTP information of the last HTTP request issued by wget, and it controls whether the efi bootdevice is set, and whether the buffer size needs to be checked (lwip stack only). This information is otherwise discarded. The wget_http_info struct can be used by HTTP drivers to have more control over HTTP requests. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-11-16net: Kconfig: add CONFIG_WGET symbolAdriano Cordova
Let net/wget.c and net/lwip/wget.c depend on CONFIG_WGET, and cmd/wget.c depend on CONFIG_CMD_WGET. This way, the wget code can be used regardless of whether the wget command is available. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-11-15Merge patch series "teach 'env default' to optionally keep runtime variables"Tom Rini
Rasmus Villemoes <ravi@prevas.dk> says: Doing bringup of a board, part of my bootstrap logic is in U-Boot. So when tweaking that logic, I was bitten by a previous completed bootstrap having left a copy of the environment on the device, which was imported and thus overrided the new logic. So I thought, "ok, I'll just make sure to put 'env default -a' as the first part of the bootstrap logic so I'm not bitten again". Alas, my logic also relies on certain variables that are set by C code (e.g. for detecting board variant), and doing 'env default -a' also eliminates those. Looking around, the hashtab code already supports a flag that does exactly what I need, and exposing that is (morally) a one-liner. Link: https://lore.kernel.org/r/20241030213404.2894247-1-ravi@prevas.dk
2024-11-15test: env: add some test cases for new "env default -k" flagRasmus Villemoes
Check that the new -k flag works as expected. This also adds a test of the -a flag, which was previously missing, and as the comment says, perhaps for a good reason. At least now we have a test for it in combination with -k (and -f, because the ethaddr variables otherwise cause complaining). Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2024-11-15test: env: check that non-mentioned variables to "env default" are preservedRasmus Villemoes
Instead of testing the same expected behaviour for both non_default_varX, test that when var1 is not in the default env but is mentioned in the "env default" cmdline, it is removed, while var2 is untouched. Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2024-11-15cmd/nvedit.c: teach 'env default' to optionally keep runtime variablesRasmus Villemoes
It can be useful to set all variables defined in the default environment to the value they have there, but without removing variables that are only defined at runtime. This can sort-of be done today, by using the "env default var1 var2 ..." variant, but that requires listing all variables defined in the default environment. It's much more convenient to be able to say env default -k -a The -k flag is also meaningful in the other case: If var1 is not defined in the default environment, but var2 is, env default var1 var2 would emit a warning about var1 not being in the default env and thus being deleted. With -k, there's no warning, and var1 is kept as-is. Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2024-11-14Merge tag 'u-boot-amlogic-next-20241113' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - khadas-vim3{l}: fix userdata size for android config - drop A1 dtsi and other bindings includes in favor of Upstream ones
2024-11-13dt-bindings: interrupt-controller: remove arm-gic.h from include/Alexey Romanov
We have exactly the same in upstream bindings. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Link: https://lore.kernel.org/r/20241112125836.3239832-5-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-11-13dt-bindings: remove axg bindings from include/Alexey Romanov
We have exactly the same in upstream bindings. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Link: https://lore.kernel.org/r/20241112125836.3239832-4-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-11-13dt-bindings: remove a1 bindings from include/Alexey Romanov
We have exactly the same in upstream bindings. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Link: https://lore.kernel.org/r/20241112125836.3239832-3-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-11-13arm: dts: meson: remove meson-a1.dtsiAlexey Romanov
For Amlogic A1, we have to use dtsi from dts/upstream folder. The only difference between this two files is the added cpu temperature node definition in upstream version and additional assigned-clock for USB. This patch is tested on a device with A113L SoC (AD401-like) and everything is okay. So, we can remove legacy arch/arm/dts/meson-a1.dtsi file. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Link: https://lore.kernel.org/r/20241112125836.3239832-2-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-11-11Prepare v2025.01-rc2v2025.01-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-11Merge patch series "Fix IOVA allocation in Apple dart iommu after global LMB ↵Tom Rini
mem map changes" Janne Grunau <j@jannau.net> says: The changes in "Make LMB memory map global and persistent" [1] break mapping DMA memory in the USB xHCI driver when using the apple_dart iommu present on Apple silicon systems. The IOVA space used by the u-boot driver (low 4GB) and physical memory do not overlap. The physical memory on this systems starts depending on the SoC either at 0x10_0000_0000 or 0x100_0000_0000. It make no sense to manage these distinct regions in a single LMB map. In addition every device has its own iommu and IO address space so sharing a single memory map between all iommu instances is not necessary. To fix this issue restore the used subset (add, alloc and free) of the previous pointer based LMB interface with "io_" as prefix. To ensure that low level lmb functions do not use the global LMB variable reorder lib/lmb.c so that the variable is not visible. Tested with patches from my "Fix device removal order for Apple dart iommu" series [2] to fix a separate issue. The cosmetic commit has two checkpatch warnings in existing code which I ignored. [1] https://lore.kernel.org/u-boot/20240826115940.3233167-1-sughosh.ganu@linaro.org/ [2] https://lore.kernel.org/u-boot/20241031-iommu_apple_dart_ordering-v1-0-8a6877946d6b@jannau.net/ Link: https://lore.kernel.org/r/20241111-io_lmb_apple_dart_iommu-v3-0-32c05da51d72@jannau.net Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-11iommu: apple: Manage IOVA separately from global LMB mem mapJanne Grunau
There is no overlap between the IOVA space managed by the iommu (here the 32-bit address space) and physical RAM on Apple silicon systems. The RAM starts at 0x10_0000_0000 or 0x100_0000_0000 so it's not possible to manage the IOVA with the global memory LMB and use 1:1 translation. In addition each device has its own iommu and does not need to share the address space with all other devices. This should not be problem for u-boot's limited use and hardware support. Restore the private per instance LMB IOVA map. Fixes: ed17a33fed2 ("lmb: make LMB memory map persistent and global") Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11lmb: Add basic io_lmb functionalityJanne Grunau
These functions can be used with struct lmb pointers and will be used to manage IOVA space in the apple_dart iommu driver. This restores part of the pointer base struct lmb API from before commit ed17a33fed29 ("lmb: make LMB memory map persistent and global"). io_lmb_add() and io_lmb_free() can trivially reuse exisiting lmb functions. io_lmb_setup() is separate for unique error log messages. io_lmb_alloc() is a simplified copy of _lmb_alloc_base() since the later has unused features and internal use of the global LMB memory map. Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11lmb: cosmetic: reorder functions and global LMB variableJanne Grunau
Low lovel LMB functionality will be used to manage IOVA space in the Apple dart iommu driver. This reordering ensures that those function can not access the global LMB memory map variable. Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11lmb: Do not use global LMB variable in _lmb_free()Janne Grunau
It will be re-used with a lmb list pointer as argument for IOVA allocations in the apple_dart iommu driver. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11Merge tag 'u-boot-rockchip-20241111' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/23280 - Add board: rk3328: FriendlyElec NanoPi R2S Plus rk3568: Qnap TS433 rk3588: Cool Pi CM5 GenBook - Move rk3399_force_power_on_reset to TPL for puma board;
2024-11-11rockchip: rk3399: move sysreset-gpio logic to TPLQuentin Schulz
If TPL_GPIO and TPL_PINCTRL_ROCKCHIP are enabled and a sysreset-gpio is provided in the TPL Device Tree, this will trigger a system reset similar to what's currently been done in SPL whenever the RK3399 "warm" boots. Because there's currently only one user of sysreset-gpio logic, and TPL is enabled on that board, so let's migrate the logic and that board to do it in TPL. There are three reasons for moving this earlier: - faster boot time as we don't need to reach SPL to be able to reset the system on a condition we know is already met in TPL, - have less code to be impacted by the issue this system reset works around (that is, "unclean" SoC registers after a reboot), - less confusion around the reason for restarting. Indeed when done from SPL, the following log can be observed: """ U-Boot TPL 2025.01-rc1-00165-gd79216ca9878-dirty (Nov 05 2024 - 15:31:45) Channel 0: DDR3, 666MHz BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB Channel 1: DDR3, 666MHz BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB 256B stride Trying to boot from BOOTROM Returning to boot ROM... U-Boot SPL 2025.01-rc1-00165-gd79216ca9878-dirty (Nov 05 2024 - 15:31:45 +0100) Trying to boot from MMC2 U-Boot TPL 2025.01-rc1-00165-gd79216ca9878-dirty (Nov 05 2024 - 15:31:45) """ possibly hinting at an issue within the SPL when loading the fitImage from MMC2 instead of the normal course of events (a system reset). Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-11-11rockchip: tpl: allow to call board/SoC-specific code before DRAM initQuentin Schulz
This defines a weak tpl_board_init function that can be used for running board/SoC-specific code before the DRAM init happens, similarly to spl_board_init() for SPL. Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-11-11rockchip: rk3399: merge CRU check within rk3399_force_power_on_resetQuentin Schulz
To prepare to support forcing power on reset from TPL which would have the exact same logic, just in an earlier stage, let's merge the CRU check that triggers the power on reset with the rest of the logic. Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-11-11pinctrl: rockchip: allow to build for TPLQuentin Schulz
A later commit will make use of the pinctrl driver in TPL so let's add the ability to build the Rockchip pinctrl driver in TPL. Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-11-11rockchip: rk35xx-generic: Disable late boardinfoJonas Karlman
Disable DISPLAY_BOARDINFO_LATE as the early boardinfo print of Model should be enough. U-Boot 2025.01-rc1 (Nov 02 2024 - 16:04:16 +0000) Model: Generic RK3566/RK3568 DRAM: 8 GiB (effective 7.7 GiB) Core: 250 devices, 24 uclasses, devicetree: separate MMC: mmc@fe2b0000: 1, mmc@fe310000: 0 Loading Environment from nowhere... OK In: serial@fe660000 Out: serial@fe660000 Err: serial@fe660000 Model: Generic RK3566/RK3568 Hit any key to stop autoboot: 0 => Enable CMD_MISC to make it easier to inspect data in OTP. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>