summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-23clk: mediatek: fix uninitialized fields issue in INFRA_MUX structWeijie Gao
This patch adds missing initialization of fields in INFRA_MUX struct which caused uart broken after any other infra mux being enabled by 'clk_prepare_enable' Signed-off-by: Sam Shih <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2025-01-23board: mediatek: mt7622: remove board_late_initWeijie Gao
The function board_late_init defined for mt7622 is useless now. Just remove it. Signed-off-by: Weijie Gao <[email protected]>
2025-01-23bootstd: android: Allow boot with AVB failures when unlockedMattijs Korpershoek
When the bootloader is UNLOCKED, it should be possible to boot Android even if AVB reports verification errors [1]. This allows developers to flash modified partitions on userdebug/engineering builds. Developers can do so on unlocked devices with: $ fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img In such case, bootmeth_android refuses to boot. Allow the boot to continue when the device is UNLOCKED and AVB reports verification errors. [1] https://source.android.com/docs/security/features/verifiedboot/boot-flow#unlocked-devices Fixes: 125d9f3306ea ("bootstd: Add a bootmeth for Android") Reviewed-by: Julien Masson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-01-23bootstd: android: Add missing NULL in the avb partition listMattijs Korpershoek
When booting an Android build with AVB enabled, it's still possible to deactivate the check for development purposes if the bootloader state is UNLOCKED. This is very useful for development and can be done at flashing time via: $ fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img However, with bootmeth_android, we cannot boot this way: Scanning bootdev '[email protected]': 0 android ready mmc 0 [email protected] ** Booting bootflow '[email protected]' with android avb_vbmeta_image.c:188: ERROR: Hash does not match! avb_slot_verify.c:732: ERROR: vbmeta_a: Error verifying vbmeta image: HASH_MISMATCH get_partition: can't find partition '_a' avb_slot_verify.c:496: ERROR: _a: Error determining partition size. Verification failed, reason: I/O error occurred while trying to load data Boot failed (err=-5) No more bootdevs From the logs we can see that avb tries to read a partition named '_a'. It's doing so because the last element of requested_partitions implicitly is '\0', but the doc explicitly request it to be NULL instead. Add NULL as last element to requested_partitions to avoid this problem. Fixes: 125d9f3306ea ("bootstd: Add a bootmeth for Android") Reviewed-by: Julien Masson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-01-23MAINTAINERS: move myself to reviewers for avb/abIgor Opaniuk
As Mattijs Korpershoek is in fact doing overall maintenance of AVB/AB code, move myself to reviewers. CC: Mattijs Korpershoek <[email protected]> Signed-off-by: Igor Opaniuk <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-01-23boot: android: Check kcmdline's for NULL in android_image_get_kernel()Aaron Kling
kcmdline and kcmdline_extra strings can be NULL. In that case, we still read the content from 0x00000 and pass that to the kernel, which is completely wrong. Fix android_image_get_kernel() to check for NULL before checking if they are empty strings. Fixes: 53a0ddb6d3be ("boot: android: fix extra command line support") Signed-off-by: Aaron Kling <[email protected]> Reviewed-by: Nicolas Belin <[email protected]> Reviewed-by: Julien Masson <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-01-23Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
Following the move of the H616 family to OF_UPSTREAM in the last cycle, now some older SoCs with identical DTs follow the lead: the F1C100s, A10, A10s, A13. The remaining SoCs suffer from that IRQ cells incompatiblity, breaking support for Linux < v5.13, so I am holding their move back still. Otherwise we get proper support for the PinePhone v1.2, and PSTORE support for all revisions of that device. This is rounded up by a PMIC related fix for some A80 boards, and two cleanup patches that are preparations for two new SoCs families, being worked on as we speak. But they have to wait for the next cycle. Gitlab CI passed, and I booted that briefly on some boards.
2025-01-22Merge patch series "upl: Prerequite patches for updated spec"Tom Rini
Simon Glass <[email protected]> says: The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written. This series includes some prerequisite patches needed for the real UPL patches. It is split from [2] [1] https://github.com/UniversalPayload/spec/tree/3f1450d [2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=* Link: https://lore.kernel.org/r/[email protected]
2025-01-22dm: core: Provide ofnode_find_subnode_unit()Simon Glass
The ofnode_find_subnode() function currently processes things two different ways, so the treatment of unit addresses differs depending on whether OF_LIVE is enabled or not. Add a new version which uses the ofnode API and add a test to check that unit addresses can be matched correctly. Leave the old function in place for the !OF_LIVE case, to avoid a code-size increase, e.g. on firefly-rk3288 Signed-off-by: Simon Glass <[email protected]>
2025-01-22dm: core: Provide ofnode_name_eq_unit() to accept a unit addressSimon Glass
When a unit-address is provided, use it to match against the node name. Since this increases code size, put it into a separate function. Signed-off-by: Simon Glass <[email protected]>
2025-01-22dm: core: Clarify behaviour of ofnode_name_eq()Simon Glass
This function is somewhat ambiguous, so expand the comments and add a test for the undefined behaviour. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: emulation: Enable bloblistSimon Glass
Add bloblist support so that tables can be generated and placed in a bloblist, then passed to a payload using UPL Signed-off-by: Simon Glass <[email protected]>
2025-01-22efi_loader: Avoid mapping the ACPI tables twiceSimon Glass
The add_u_boot_and_runtime() function paints with a broad brush, considering all of the memory from the top of U-Boot stack to gd->ram_top as EFI_RUNTIME_SERVICES_CODE This is fine, but we need to make sure we don't add a separate entry for any ACPI tables in this region (which happens when bloblist is used for tables). Otherwise the memory map looks strange and we get a test failure on qemu-x86 (only) for the 'virtual address map' test. Good map: Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB RUNTIME DATA 00000000000f0000-00000000000f2000 WB|RT RESERVED 00000000000f2000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005cc7000 WB BOOT DATA 0000000005cc7000-0000000005ccc000 WB RUNTIME DATA 0000000005ccc000-0000000005ccd000 WB|RT BOOT DATA 0000000005ccd000-0000000005cce000 WB RUNTIME DATA 0000000005cce000-0000000005cf0000 WB|RT BOOT DATA 0000000005cf0000-0000000006cf5000 WB RESERVED 0000000006cf5000-0000000006cfa000 WB ACPI RECLAIM MEM 0000000006cfa000-0000000006d1c000 WB RESERVED 0000000006d1c000-0000000006f35000 WB RUNTIME CODE 0000000006f35000-0000000006f37000 WB|RT RESERVED 0000000006f37000-0000000008000000 WB RESERVED 00000000e0000000-00000000f0000000 WB Bad map: (with BLOBLIST_TABLES but without this patch): Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB ACPI RECLAIM MEM 00000000000f0000-00000000000f1000 WB RESERVED 00000000000f1000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005ca5000 WB BOOT DATA 0000000005ca5000-0000000005caa000 WB RUNTIME DATA 0000000005caa000-0000000005cab000 WB|RT BOOT DATA 0000000005cab000-0000000005cac000 WB RUNTIME DATA 0000000005cac000-0000000005cce000 WB|RT BOOT DATA 0000000005cce000-0000000006cd3000 WB RUNTIME DATA 0000000006cd3000-0000000006cd5000 WB|RT BOOT DATA 0000000006cd5000-0000000006cf4000 WB RESERVED 0000000006cf4000-0000000006cf9000 WB ACPI RECLAIM MEM 0000000006cf9000-0000000006ce6000 WB Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Align the SMBIOS table to a 4K boundarySimon Glass
This isn't strictly needed, but with UPL we use the reserved-memory nodes to indicate where the SMBIOS table is. Tianocore requires 4KB alignment on these regions, so it is easier to adjust the alignment to match. Signed-off-by: Simon Glass <[email protected]>
2025-01-22x86: Move tables to use SZ macrosSimon Glass
Update the tables to use linux/sizes rather than open-coped values. Signed-off-by: Simon Glass <[email protected]> Suggested-by: Heinrich Schuchardt <[email protected]>
2025-01-22x86: Enable UPL handoff for SPLSimon Glass
Add the GD_FLG_UPL so that a UPL-handoff is created. Signed-off-by: Simon Glass <[email protected]>
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)