summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-22x86: Support jumping to a UPL imageSimon Glass
Add a function to allow x86 boards to jump to a UPL images. Currently only 32-bit entry is supported. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Show an error if video failsSimon Glass
If video is enabled we expect it to work. Avoid silent failure by adding a panic if things go wrong. Expand the SPL malloc-area for qemu-x86_64 to avoid a panic. Signed-off-by: Simon Glass <[email protected]>
2025-01-22pci: video: Set up the pixel-format fieldSimon Glass
Add this information to the handoff structure so that it is available to U-Boot proper. Update bochs and the video handoff. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Create more space for SPL with qemu-x86_64Simon Glass
The space here is quite tight and there is plenty of room in the ROM. Move SPL earlier to allow for expansion. Signed-off-by: Simon Glass <[email protected]>
2025-01-22emulation: Use bloblist to hold tablesSimon Glass
QEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot copies out the SMBIOS tables but points directly to the ACPI ones. The ACPI tables are not aligned on a 4KB boundary, which means that UPL cannot use them directly, since it uses a reserved-memory node for the tables and that it assumed (by EDK2) to be 4KB-aligned. On x86, QEMU provides the tables in a mapped memory region and U-Boot makes use of these directly, thus making it difficult to use any common code. Adjust the logic to fit within the existing table-generation code. Use a bloblist always and ensure that the ACPI tables is placed in an aligned region. Set a size of 8K for QEMU. This does not actually put all the tables in one place, for QEMU, since it currently adds a pointer to the tables in QFW. On ARM, enable bloblist so that SMBIOS tables can be added to the bloblist. Signed-off-by: Simon Glass <[email protected]>
2025-01-22emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGESimon Glass
QEMU always gets its devicetree from the OF_BOARD mechanism so we should not depend on !BLOBLIST here. It's not clear why we need to have any relationship with BLOBLIST so let's remove the entire condition. Signed-off-by: Simon Glass <[email protected]> Fixes: 2b71470628c dts: OF_HAS_PRIOR_STAGE should depend on !BLOBLIST Reviewed-by: Tom Rini <[email protected]>
2025-01-22sunxi: switch Allwinner A10s/A13 boards to OF_UPSTREAMAndre Przywara
In contrast to some other Allwinner SoCs, there is no difference between the DTs for the Allwinner A10s/A13 SoCs (sun5i) between the U-Boot and the Linux kernel repository. Remove the old copies of the A10s/A13 related .dts and .dtsi files, and switch most of sun5i boards over to use OF_UPSTREAM. There are two boards for which we don't have DTs in the kernel tree. Keep those two .dts files in the legacy U-Boot DT directory, and let their defconfig opt out of OF_UPSTREAM. Signed-off-by: Andre Przywara <[email protected]> Acked-by: Sumit Garg <[email protected]>
2025-01-22sunxi: switch Allwinner A10 boards to OF_UPSTREAMAndre Przywara
In contrast to some other Allwinner SoCs, there is no difference between the DTs for the Allwinner A10 SoCs (sun4i) between the U-Boot and the Linux kernel repository. Remove the old copies of the A10 related .dts and .dtsi files, and switch most of sun4i boards over to use OF_UPSTREAM. There are two boards for which we don't have DTs in the kernel tree. Keep those two .dts files in the legacy U-Boot DT directory, and let their defconfig opt out of OF_UPSTREAM. Signed-off-by: Andre Przywara <[email protected]> Acked-by: Sumit Garg <[email protected]>
2025-01-22suniv: switch Allwinner F1Cx00 boards to OF_UPSTREAMAndre Przywara
In contrast to some other Allwinner SoCs, there is no difference between the DTs for the Allwinner F1C100/F1C200 SoCs (sunvi) between the U-Boot and the Linux kernel repository. Remove the old copies of the F1Cx00 related .dts and .dtsi files, and switch the whole suniv SoC over to use OF_UPSTREAM. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2025-01-22sunxi: pinephone: detect existed magnetometer and fixup dtbAndrey Skvortsov
In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by AF8133J. They use the same PB1 pin in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time. AF8133J has reset pin (PB1) connected to the SoC. By default AF8133J is in a reset state and don't respond to probe request on I2C bus. Extra code would be needed to handle reset signal. Therefore this code uses LIS3MDL magnetometer instead of AF8133J. Introducing new dts 1.2b with AF8133J sensor would require probing in SPL. That would lead to pulling in into SPL I2C controller driver, RSB controller driver, introducing new AXP803 driver to power-up sensors for probe. It's working, but SPL is pretty size-constrained on A64 and doesn't have much space. Therefore fdt fixup is done in U-Boot proper without introducing new board revision and new dts. Signed-off-by: Andrey Skvortsov <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Link: https://lists.denx.de/pipermail/u-boot/2024-February/545700.html Reviewed-by: Andre Przywara <[email protected]> [Andre: fix formatting] Signed-off-by: Andre Przywara <[email protected]>
2025-01-22sunxi: defconfig: Add pstore support for pinephoneAndrey Skvortsov
pstore will allow users to catch kernel crashes and report them to developers. Modern (Android) phones have pstore usually enabled to get information about kernel crash, since it's the simplest way to get kernel backtrace on mobile device without serial console. Usually it's enabled by default in distribution kernels like Debian. CONFIG_PSTORE=y CONFIG_PSTORE_RAM=m systemd has service that automatically handles pstore and saves them in /var/lib/pstore for later usage. In general any DRAM address, that isn't overwritten during a boot is suitable for pstore. Range from 0x40000000 - 0x50000000 is heavily used by u-boot for internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk later in the boot process. Ramdisk start address is 0x4FF00000, initramfs for kernel with some hacking features and debug info enabled can take more than 100Mb and final address will be around 0x58000000. Address 0x61000000 will most likely not overlap with that. Signed-off-by: Andrey Skvortsov <[email protected]> Reviewed-by: Andre Przywara <[email protected]>
2025-01-22power: pmic: sunxi: guard DCDC5 separatelyAndre Przywara
So far all sunxi boards programming the DCDC1 power rail on the AXP PMIC also set the DCDC5 rail, so we could handle both with the same DCDC1 guard. Some boards using the AXP313 will need to set DCDC1 now as well, and since the AXP313 only has three buck converters, there will be no DCDC5, so this trick is not going to work anymore. Don't try to be too clever, and just protect programming the two DCDC rails with two separate guards. This has the interesting side effect of fixing operation on A80 boards, using the AXP809 PMIC. Apparently programming DCDC5 right after DCDC1, but before the other three rails caused some glitch, which made the board hang during Linux boot, during the PSCI handler in U-Boot. Just keeping the old setup order (DCDC1,2,3,4,5) will make those boards boot to the Linux prompt again. Fixes: ffb02942fab024d4a9b6a ("sunxi: board: simplify early PMIC setup conditions") Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]>
2025-01-22sunxi: H616: DRAM: rename Kconfig parameters to be more genericAndre Przywara
The H616 DRAM controller requires some board specific parameters, which we declare in Kconfig, let each board specify in their defconfig, and then use in the DRAM init code. Other DRAM controllers now require a very similar, if not identical parameter set, with so far the same parameter names used. To help keep the Kconfig file at bay, rename the existing parameter names to drop the H616_ part in there, to make them more naturally reusable for other SoCs. No functional change, just a rename. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2025-01-22sunxi: clock: improve grouping of default clock register valuesAndre Przywara
With each new SoC added to the clock_sun50i_h6.h header file, we add a list of default values for the bus clock registers. This list gets a bit hard to read, as the spacing between the lines looks confusing. Tighten the lines by removing empty lines, to make it more obvious which values belong together. Also remove those comments that were more or less duplicating the next code line, and didn't add any information. This makes it easier to find existing values and to add support for new SoCs. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2025-01-22test: Fix inpected typo in upl testSimon Glass
Fix a typo in the test comment. Signed-off-by: Simon Glass <[email protected]>
2025-01-22boot: Use fit_image_get_data() to get dataSimon Glass
Use this function instead of fit_image_get_emb_data() data, since it works will FITs that use external data. Signed-off-by: Simon Glass <[email protected]>
2025-01-22boot: Rename fit_image_get_data_and_size()Simon Glass
This function is really just getting the data. The size comes along for the ride. In fact this function is only reliable way to obtain the data for an image in a FIT, since the FIT may use external data. Rename it to fit_image_get_data() Signed-off-by: Simon Glass <[email protected]>
2025-01-22boot: Rename fit_image_get_data()Simon Glass
This function can only be used with FITs that use embedded data. Rename it so this is clear. Signed-off-by: Simon Glass <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]>
2025-01-22ofnode: Update of_add_subnode() to indicate name is allocedSimon Glass
This function allocates memory for the node name, so mention this in the function comment. Signed-off-by: Simon Glass <[email protected]>
2025-01-22ofnode: Indicate when out of space in a few placesSimon Glass
Update ofnode_add_subnode() and ofnode_add_prop() to return a suitable error when space is exhausted in the FDT. This makes it easier to see what is going wrong. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-01-22ofnode: Use 4K for a default tree-sizeSimon Glass
At some point it would be nice to have the ofnode API automatically expand the tree as required, to accommodate new nodes. For now, expand the default size so that UPL can be supported. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Show the timestamp counter with bdinfoSimon Glass
Add a line to the 'bdinfo' command which shows the current value of the TSC. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Enable meminfo commandSimon Glass
Enable this command for x86 boards as it is quite useful for seeing where memory is. Signed-off-by: Simon Glass <[email protected]>
2025-01-22mkimage: Update map_to_sysmem() to match its prototypeSimon Glass
Update the version of this function in mkimage so that it uses a const pointer, as is done in the mapmem.h header file. Signed-off-by: Simon Glass <[email protected]>
2025-01-22serial: Support info() method in ns16550 xPL with UPLSimon Glass
UPL needs to pass the serial details onto the next stage, so adjust the condition to support this. Signed-off-by: Simon Glass <[email protected]>
2025-01-22cpu: Provide a way to get the physical-address sizeSimon Glass
This concept exists on x86. Declare it as a generic function so that the value can be accessed by UPL. Signed-off-by: Simon Glass <[email protected]>
2025-01-22abuf: Provide a constant bufferSimon Glass
Add a new initialiser which can accept a constant pointer. Signed-off-by: Simon Glass <[email protected]>
2025-01-22abuf: Allow use in host toolsSimon Glass
Some header files included on the host are moving to use abuf, so adjust the header-inclusion to bring in size_t correctly. Signed-off-by: Simon Glass <[email protected]>
2025-01-22abuf: Provide a way to get the buffer addressSimon Glass
In many cases it is useful to get the address of a buffer, e.g. when booting from it. Add a function to handle this. Signed-off-by: Simon Glass <[email protected]>
2025-01-22bloblist: Make BLOBLIST_ALLOC the defaultSimon Glass
We want to encourage people to use an allocated bloblist since it is more flexible than a fixed one. Make this the default, being sure not to change existing users. The unit tests require BLOBLIST_FIXED so add a dependency in the Makefile to avoid build errors. All sandbox builds require BLOBLIST_FIXED so make that the default for sandbox. Signed-off-by: Simon Glass <[email protected]>
2025-01-22Merge https://source.denx.de/u-boot/custodians/u-boot-snapdragonTom Rini
The highlights are: * Fixed boot regression due to broken memory parsing * Enable HW RNG and KASLR on all platforms * Add support for Snapdragon X1 Elite hardware (clk/pinctrl) * Add support for QCS9100 ride automotive development platform (clk/ufs) * Add support for PCIe on SM8550, SM8650 and X1E * Implement software debounce for PMIC buttons Additionally, some minor improvements to "ufetch" have been pulled in: * Show CPU architecture (arm/mips/etc) * Make CONFIG_BLK optional * Fix 32-bit support
2025-01-22Merge patch series "spi: Collected fixes"Tom Rini
Alexander Dahl <[email protected]> says: Hello, two patches for header issues I came across when working on (Q)SPI drivers for atmel boards. Link: https://lore.kernel.org/r/[email protected]
2025-01-22Merge patch series "Update my email address"Tom Rini
Christopher Obbard <[email protected]> says: Update my email address for various locations in the U-Boot project. This will (hopefully) stop any mails from going to /dev/null. Link: https://lore.kernel.org/r/[email protected]
2025-01-22Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=381&view=results - cyclic: Fix rollover every 72 min on 32 bits platforms (Patrice)
2025-01-22Merge patch series "vbe: Series part F"Tom Rini
Simon Glass <[email protected]> says: This includes various patches towards implementing the VBE abrec bootmeth in U-Boot. It mostly focuses on introducing a relocating SPL-loader so that VBE can run in the limited amount of SRAM available on many devices. Another minor new feature is support in VBE for specifying the image phase when loading from a FIT. This allows a single FIT to include images for several boot phases, thus simplifying image-creation. One lingering niggle in this series is that it has a different code path for sandbox, since it does not support the relocating jump. It should be possible to resolve this with additional work, but I have not attempted this so far. For v2, I have split the first patch into 5 pieces, to make it easier to see the code-size impact, plus added a few tweaks to reduce code size. Again, only MMC is supported so far. Looking ahead, series G will have some more plumbing and H some rk3399 pieces. That should be enough to complete these feature. Here is a run in my lab, with the VBE ABrec bootmeth. You can see that VPL runs before memory is set up. SPL sets up memory and can be upgraded in the field reliably. $ ub-int vbe Building U-Boot in sourcedir for rk3399-generic Bootstrapping U-Boot from dir /tmp/b/rk3399-generic Writing U-Boot using method rockchip U-Boot TPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58) Trying to boot from vbe_abrec load: Firefly-RK3399 Board Using 'config-3' configuration Trying 'image-vpl' firmware subimage Using 'config-3' configuration Trying 'fdt-3' fdt subimage U-Boot VPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58) Trying to boot from vbe_abrec load: Firefly-RK3399 Board Starting with empty state VBE: Firmware pick A at 800000 Using 'config-3' configuration Trying 'spl' firmware subimage Using 'config-3' configuration Trying 'fdt-3' fdt subimage Channel 0: DDR3, 800MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: DDR3, 800MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride U-Boot SPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700) Trying to boot from vbe_abrec load: Firefly-RK3399 Board VBE: Firmware pick A at 900000 load_simple_fit: Skip load 'atf-5': image size is 0! Relocating bloblist ff8eff00 to 100000: done ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700) SoC: Rockchip rk3399 Reset cause: POR Model: Firefly-RK3399 Board DRAM: 4 GiB (effective 3.9 GiB) Core: 314 devices, 33 uclasses, devicetree: separate MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0 Loading Environment from SPIFlash... Invalid bus 0 (err=-19) *** Warning - spi_flash_probe_bus_cs() failed, using default environment In: serial,usbkbd Out: serial,vidconsole Err: serial,vidconsole Model: Firefly-RK3399 Board Net: PMIC: RK808 eth0: ethernet@fe300000 starting USB... Bus usb@fe380000: USB EHCI 1.00 Bus usb@fe3a0000: USB OHCI 1.0 Bus usb@fe3c0000: USB EHCI 1.00 Bus usb@fe3e0000: USB OHCI 1.0 Bus usb@fe900000: Register 2000140 NbrPorts 2 Starting the controller USB XHCI 1.10 scanning bus usb@fe380000 for devices... 1 USB Device(s) found scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found scanning bus usb@fe900000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 Link: https://lore.kernel.org/r/[email protected]
2025-01-22vexpress64: Fix bootargs when building without NETChanho Park
When building without DHCP/PXE configurations (NET disabled), compilation errors may occur due to mismatched bootargs. Ensure bootargs related to DHCP/PXE are not enabled if the corresponding commands are disabled. include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’ 443 | BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Chanho Park <[email protected]> Acked-by: Linus Walleij <[email protected]>
2025-01-22spi: cadence-quadspi: fix potential malfunction after ~49 days uptimeRonald Wahl
The get_timer function returns an unsigned long which may be calculated from the ARM system counter. This counter is reset only on a cold reset. U-boot divides this counter down to a 1000 Hz counter that will cross the 32bit barrier after a bit more than 49 days. Assigning the value to an unsigned int will truncate it on 64bit systems. Passing this truncated value back to the get_timer function will return a very large value that is certainly larger than the timeout and so will go down the error path and besides stopping U-Boot will lead to messages like "SPI: QSPI is still busy after poll for 5000 ms." Signed-off-by: Ronald Wahl <[email protected]> Cc: Vignesh R <[email protected]> Cc: Pratyush Yadav <[email protected]> Reviewed-by: Vignesh Raghavendra <[email protected]>
2025-01-22MAINTAINERS: maintain qcs9100_defconfigCaleb Connolly
Add this to ARM SNAPDRAGON maintainers entry. Signed-off-by: Caleb Connolly <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]
2025-01-22Revert "mem: spi-mem: add declaration for spi_mem_default_supports_op"Alexander Dahl
We have a duplicate declaration of spi_mem_default_supports_op() which was added twice, first with commit af6266c1c27a ("mem: spi-mem: add declaration for spi_mem_default_supports_op") for v2021.04, and again with commit 2299076e34f8 ("spi: spi-mem: export spi_mem_default_supports_op()") for v2021.07. The first commit is reverted here, because the second better matches the definition and has a better place in the declaration order. Note: Linux declares this in a different section of spi-mem.h which is disabled in U-Boot through `#ifndef __UBOOT__`. This reverts commit af6266c1c27add8beac7f3365c00b3525a9012c4. Signed-off-by: Alexander Dahl <[email protected]>
2025-01-22spi: atmel: Really drop atmel_spi.hAlexander Dahl
First try dropping this was with commit 37434db29be4 ("spi: atmel: Drop atmel_spi.h") back in 2018 which was reverted not much later with commit 5270df283676 ("Revert "spi: atmel: Drop atmel_spi.h""). Second try dropping this was in 2020 with commit beeb34ac0cc6 ("spi: atmel: Drop atmel_spi.h"), but that only moved all the definitions into the source file and did not remove the header file. Currently all of the definitions in the header file are (still) contained in the source file, and the header file is include nowhere. Fixes: beeb34ac0cc6 ("spi: atmel: Drop atmel_spi.h") Signed-off-by: Alexander Dahl <[email protected]>
2025-01-22board: rockpi4-rk3399: update email address for Christopher ObbardChristopher Obbard
Update my email address. Signed-off-by: Christopher Obbard <[email protected]>
2025-01-22.mailmap: update email address for Christopher ObbardChristopher Obbard
Update my email address. Signed-off-by: Christopher Obbard <[email protected]>
2025-01-22vbe: Update simple-fw to support using the SPL loaderSimon Glass
For a sandbox implementation, where code size is no object, it makes sense to use the full bootstd drivers to load images. For real boards, running from SRAM, this adds quite a bit of overhead. Add a way to load the next phase using just the underlying storage driver, to reduce code size. For now, only MMC is supported. Change the log_debug() to show the load address and size in a more neutral way, rather than suggesting that the load has already happened. Signed-off-by: Simon Glass <[email protected]>
2025-01-22vbe: Support loading SPL imagesSimon Glass
VBE needs to load different images from a FIT depending on the xPL phase in use. The IH_PHASE value is used to select the image to load. Add the required logic to handle this. For compatibility with the SPL-loader driver, fill out a struct spl_image_info with the details needed to boot the next phase. This is good enough for VBE-simple but ABrec will need the full set of bootstd features. So add a USE_BOOTMETH define to control this. Signed-off-by: Simon Glass <[email protected]>
2025-01-22vbe: Support loading an FDT with the relocating loaderSimon Glass
Add FDT support so that this can be copied down in memory after loading and made available to the new image. Signed-off-by: Simon Glass <[email protected]>
2025-01-22spl: Plumb in the relocating loaderSimon Glass
This is fairly easy to use. The SPL loader sets up some fields in the spl_image_info struct and calls spl_reloc_prepare(). When SPL is ready to do the jump it must call spl_reloc_jump() instead of jump_to_image(). Add this logic. Signed-off-by: Simon Glass <[email protected]>
2025-01-22spl: Add support for a relocating jump to the next phaseSimon Glass
When one xPL phase wants to jump to the next, the next phase must be loaded into its required address. This means that the TEXT_BASE for the two phases must be different and there cannot be any memory overlap between the code used by the two phases. It also can mean that phases need to be moved around to accommodate any size growth. Having two xPL phases in SRAM at the same time can be tricky if SRAM is limited, which it often is. It would be better if the second phase could be loaded somewhere else, then decompressed into place over the top of the first phase. Introduce a relocating jump for xPL to support this. This selects a suitable place to load the (typically compressed) next phase, copies some decompression code out of the first phase, then jumps to this code to decompress and start the next phase. This feature makes it much easier to support Verified Boot for Embedded (VBE) on RK3399 boards, which have 192KB of SRAM. Signed-off-by: Simon Glass <[email protected]>
2025-01-22spl: Add a type for the jumper functionSimon Glass
This function will be used by the relocating jumper too, so add a typedef to the header file to avoid mismatches. Signed-off-by: Simon Glass <[email protected]>
2025-01-22spl: Add fields for VBESimon Glass
Add some fields to track the VBE state in SPL. Signed-off-by: Simon Glass <[email protected]>
2025-01-22vbe: Support loading an FDT from the FITSimon Glass
In many cases the FIT includes a devicetree. Add support for loading this into a suitable place in memory. Signed-off-by: Simon Glass <[email protected]>