summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-06-28use fdt_kaslrseed function to de-duplicate codeTim Harvey
Use the fdt_kaslrseed function to deduplicate code doing the same thing. Note that the kalsrseed command (CMD_KASLRSEED) is likely pointless now but left in place in case boot scripts exist that rely on this command existing and returning success. An informational message is printed to alert users of this command that it is likely no longer needed. Note that the Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization and completely ignores the kaslr-seed for its own randomness needs (i.e the randomization of the physical placement of the kernel). It gets weeded out from the DTB that gets handed over via efi_install_fdt() as it would also mess up the measured boot DTB TPM measurements as well. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Michal Simek <[email protected]> Cc: Andy Yan <[email protected]> Cc: Akash Gajjar <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Simon Glass <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Devarsh Thakkar <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Hugo Villeneuve <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Tom Rini <[email protected]> Cc: Chris Morgan <[email protected]> Acked-by: Michal Simek <[email protected]>
2024-06-28fdt: automatically add /chosen/kaslr-seed if DM_RNG is enabledTim Harvey
If RANDOMIZE_BASE is enabled in the Linux kernel instructing it to randomize the virtual address at which the kernel image is loaded, it expects entropy to be provided by the bootloader by populating /chosen/kaslr-seed with a 64-bit value from source of entropy at boot. If we have DM_RNG enabled populate this value automatically when fdt_chosen is called. We skip this if ARMV8_SEC_FIRMWARE_SUPPORT is enabled as its implementation uses a different source of entropy that is not yet implemented as DM_RNG. We also skip this if MEASURED_BOOT is enabled as in that case any modifications to the dt will cause measured boot to fail (although there are many other places the dt is altered). Note that the Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization and completely ignores the kaslr-seed for its own randomness needs (i.e the randomization of the physical placement of the kernel). It gets weeded out from the DTB that gets handed over via efi_install_fdt() as it would also mess up the measured boot DTB TPM measurements as well. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Michal Simek <[email protected]> Cc: Andy Yan <[email protected]> Cc: Akash Gajjar <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Simon Glass <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Devarsh Thakkar <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Hugo Villeneuve <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Tom Rini <[email protected]> Cc: Chris Morgan <[email protected]>
2024-06-28Add fdt_kaslrseed function to add kaslr-seed to chosen nodeTim Harvey
If RANDOMIZE_BASE is enabled in the Linux kernel instructing it to randomize the virtual address at which the kernel image is loaded, it expects entropy to be provided by the bootloader by populating /chosen/kaslr-seed with a 64-bit value from source of entropy at boot. Add a fdt_kaslrseed function to accommodate this allowing an existing node to be overwritten if present. For now use the first rng device but it would be good to enhance this in the future to allow some sort of selection or policy in choosing the rng device used. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Michal Simek <[email protected]> Cc: Andy Yan <[email protected]> Cc: Akash Gajjar <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Simon Glass <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Devarsh Thakkar <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Hugo Villeneuve <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Tom Rini <[email protected]> Cc: Chris Morgan <[email protected]> Reviewed-by: Caleb Connolly <[email protected]>
2024-06-28Merge patch series "Bug-fixes for a few boards (reduced series)"Tom Rini
Simon Glass <[email protected]> says: This series includes fixes to get some rockchip and nvidia boards working again. It also drops the broken Beaglebone Black config and provides a devicetree fix for coral (x86).
2024-06-28Drop the special am335x_boneblack_vboot targetSimon Glass
Now that am335x_evm boots OK on the Beaglebone black, drop the latter and update the docs to cover the change. Also add a few updates about 'make fit' and drop the note about the security review, as U-Boot's verified boot has had quite extensive review now. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-06-28rockchip: bob: kevin: Disable dcache in SPLSimon Glass
This causes a hang, so disable it. Unfortunately the RAM-size fix does not resolve the problem and I am unsure what is wrong. As soon as the cache is enabled the board appears to hang. Fixes: 6d8cdfd1536 ("rockchip: spl: Enable caches to speed up checksum validation") Signed-off-by: Simon Glass <[email protected]>
2024-06-28spl: Allow ATF to work when dcache is disabledSimon Glass
The dcache may not be enabled in SPL. Add a check to avoid trying to use an undefined function. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-06-28power: regulator: Handle autoset in regulators_enable_boot_on()Simon Glass
With a recent change, regulators_enable_boot_on() returns an error if a regulator is already set. Check for and handle this situation. Fixes: d99fb64a98a power: regulator: Only run autoset once for each regulator Reviewed-by: Jonas Karlman <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Jonas Karlman <[email protected]>
2024-06-28rockchip: veyron: Add logging for power initSimon Glass
Add better logging for power init so that CONFIG_LOG_ERROR_RETURN can be enabled. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2024-06-28x86: Set a board-size limit for chromebook_linkSimon Glass
Set a size limit for this board so that we get a build error if it grows too much. Note that the limit is approximately, since it does not include the FDT, microcode and fdtmap, which can change in size. However this board is fairly stable, so overflowing this limit will likely result in the image not fitting in the ROM space available for U-Boot. Signed-off-by: Simon Glass <[email protected]>
2024-06-28tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOLSimon Glass
It does not make sense to enable all SHA algorithms unless they are needed. It bloats the code and in this case, causes chromebook_link to fail to build. That board does use the TPM, but not with measured boot, nor EFI. Since EFI_TCG2_PROTOCOL already selects these options, we just need to add them to MEASURED_BOOT as well. Note that the original commit combines refactoring and new features, which makes it hard to see what is going on. Fixes: 97707f12fda tpm: Support boot measurements Reviewed-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2024-06-28nvidia: nyan-big: Disable debug UARTSimon Glass
This cannot be enabled early in boot since some other init is needed. At this point it is unclear exactly what init is needed, so disable the debug UART to avoid a hang. Signed-off-by: Simon Glass <[email protected]>
2024-06-27arm: mediatek: fix ram init for mt7622 (decrease to 1G)Frank Wunderlich
RAM init on mt7622 based bananapi R64 is broken since v2023.10. Increasing the mem-map does not help here, so i reduced the maximum available ram in get_ram_size call from 2G to 1G (board has only 1G). Fixes: 5fd6d4c7b3ad ("arm: mediatek: retrieve ram_base from dts node for armv8 platform") Signed-off-by: Frank Wunderlich <[email protected]>
2024-06-27board: mpfs_icicle: change maintainer to ConorConor Dooley
Padmarao is leaving Microchip soon, and suggested that I should take over maintaining the Icicle in U-Boot in his stead. Suggested-by: Padmarao Begari <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2024-06-26Merge patch series "pxe: Add debugging for booting"Tom Rini
2024-06-26zboot: Correct use of state_mask argumentSimon Glass
There is confusion in this function between the flag and state_mask parameters, which prevents the boot from actually happening. Correct this by using state_mask instead of flag for deciding which states to go through. This fixes booting of some 32-bit Debian kernels. Note: Some sort of CI for this is in the works. Fixes: 228c6722d44 ("x86: zboot: Avoid iteration in do_zboot_states()") Signed-off-by: Simon Glass <[email protected]>
2024-06-26zboot: Add debugging for bootingSimon Glass
Show the boot arguments and the state mask, to aid debugging. Signed-off-by: Simon Glass <[email protected]>
2024-06-26cmd: gpt: Fix freeing gpt_pte in gpt_verify()Sam Protsenko
In case when either gpt_verify_headers() or gpt_verify_partitions() fails, the memory allocated for gpt_pte will be freed in those functions internally, but gpt_pte will still contain non-NULL dangling pointer. The attempt to free it in those cases in gpt_verify() leads to "use after free" error, which leads to a "Synchronous abort" exception. This issue was found by running the next command on the device with incorrect partition table: => gpt verify mmc 0 $partitions which results to: No partition list provided - only basic check "Synchronous Abort" handler, esr 0x96000021, far 0xba247bff .... Fix the issue by only freeing gpt_pte if none of those functions failed. Fixes: bbb9ffac6066 ("gpt: command: Extend gpt command to support GPT table verification") Signed-off-by: Sam Protsenko <[email protected]>
2024-06-26pxe: Add debugging for bootingSimon Glass
Show which boot protocol is being used. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Michael Trimarchi <[email protected]>
2024-06-26cmd: Make use of U_BOOT_LONGHELP when missingTom Rini
After adding the U_BOOT_LONGHELP macro some new commands came in still that were not making use if it. Switch these cases over and in a few places add missing newlines as well. Signed-off-by: Tom Rini <[email protected]>
2024-06-26scripts/Makefile.lib: remove bootph-some-ram property from VPL/TPL/SPLQuentin Schulz
The property isn't useful in VPL/SPL/TPL as it is only for U-Boot proper pre-reloc, which has its own DTB. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-06-26arm: davinci: remove unused definesEmil Kronborg
The last usage of the DV_TIMER_ and DV_WDT_ definitions were removed in commits 8d7757637138 ("ARM: davinci: remove support for cam_enc_4xx") and cef443c1666c ("arm: davinci: remove leftover code for dm* SoCs"), respectively. Signed-off-by: Emil Kronborg <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-06-26arm: davinci: remove unused watchdog functionsEmil Kronborg
The davinci_hw_watchdog_ functions are defined but never called from anywhere. Commit 881ae794b93b ("calimain: remove board") eliminated the last call to these functions. Signed-off-by: Emil Kronborg <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-06-26fs: btrfs: fix out of bounds writeAlex Shumsky
Fix btrfs_read/read_and_truncate_page write out of bounds of destination buffer. Old behavior break bootstd malloc'd buffers of exact file size. Previously this OOB write have not been noticed because distroboot usually read files into huge static memory areas. Signed-off-by: Alex Shumsky <[email protected]> Fixes: e342718 ("fs: btrfs: Implement btrfs_file_read()") Reviewed-by: Qu Wenruo <[email protected]>
2024-06-26Merge patch series "k3-am625-beagleplay: Add symlinks for tiboot3 and tispl"Tom Rini
Dhruva Gole <[email protected]> says: Add symlinks for both tiboot3.bin and tispl.bin because a user has to anyway rename these files to get the platform to boot up. Also update the documentation to reflect above change.
2024-06-26doc: beagle: am62x_beagleplay: Rename the boot binsDhruva Gole
Rename the boot bins as the _unsigned postfixes are not longer required. We have symlinks in place for having generic names for all the boot bins now. Signed-off-by: Dhruva Gole <[email protected]>
2024-06-26arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tisplDhruva Gole
Add symlinks for both tiboot3.bin and tispl.bin because a user has to anyway rename these files to get the platform to boot up. This just makes it more intuitive and convenient. Reviewed-by: Manorit Chawdhry <[email protected]> Signed-off-by: Dhruva Gole <[email protected]>
2024-06-26board: beagleplay: Fix the bootpart to pick from root partitionDhruva Gole
The Kernel Image and DTB files are supposed to be picked from the rootfs of the SD Card, this fails in legacy boot flow because bootpart is set to 1:1. Fix it. Fixes: a200f428b5b21 ("board: ti: am62x: Add am62x_beagleplay_* defconfigs and env file") Reviewed-by: Nishanth Menon <[email protected]> Acked-by: Chirag Shilwant <[email protected]> Signed-off-by: Dhruva Gole <[email protected]>
2024-06-26arm: mach-k3: j784s4: Fix MCU_CLKOUT0 parent clock muxEmanuele Ghidoli
MCU_CLKOUT0 output can be driven by two different clock inputs: one at 25 MHz and another at 50 MHz. Currently, the 25 MHz input clock is not selectable due to a duplication of the 50 MHz clock input in the mux configuration. This commit corrects the parent clock mux configuration, making the 25 MHz input clock selectable. Signed-off-by: Emanuele Ghidoli <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2024-06-26Merge patch series "Azure: Correct comment about the strategy in the world ↵Tom Rini
matrix build" Tom Rini <[email protected]> says: This fixes a number of small issues with the structure of the Azure jobs and then ensures that we will build all of the possible boards that we know about, in this CI run.
2024-06-26Azure: Count all of the machines we would buildTom Rini
Now that we have each stage of the world build using variables to define what it will attempt to build, and that we have added in missing machines, add a job to make sure that we would always be building everything. Signed-off-by: Tom Rini <[email protected]>
2024-06-26Azure: Update some job breakdowns so we build the world againTom Rini
As part of commit 9aeac898da66 ("Azure: Rework build the world jobs") I made a few mistakes. An errant '_' meant that we built neither at91 nor kirkwood platforms. Further, the non-freescale (NXP) "LS1xxx" platforms were also not being built. Adjust some jobs to have these be built again. Fixes: 9aeac898da66 ("Azure: Rework build the world jobs") Signed-off-by: Tom Rini <[email protected]>
2024-06-26Azure: Spell out the "everything" jobTom Rini
In order to get the list of boards that will be done in a "dry run" build we need to have something listed and not just an exclude list. Populate the job with all architecture directories except arm and powerpc. Signed-off-by: Tom Rini <[email protected]>
2024-06-26Azure: Rework how we define what to build in the world buildTom Rini
Instead of defining BUILDMAN to the value we'll build in each part of the matrix job, define a variable with that name and have it list what to build. This will allow us to reference these multiple times consistently later on. Signed-off-by: Tom Rini <[email protected]>
2024-06-26Azure: Correct comment about the strategy in the world matrix buildTom Rini
At this point noting that we have a split in our job similar to TravisCI (which we have not used in years) isn't helpful, and is also not true anymore either. Instead, explain that we split the world up in to 10 jobs as that's the maximum we can have going in parallel on the free tier of Azure. Signed-off-by: Tom Rini <[email protected]>
2024-06-26Merge patch series "arm64: add a software pagetable walker"Tom Rini
Caleb Connolly <[email protected]> says: MMU issues are some of the most frustrating to debug. To make this slightly less unbearable, introduce a software pagetable walker for ARMv8. This can be called to dump a pagetable with the default formatter, or a custom callback can be provided to implement more complicated parsing. This can also be useful to dump the pagetable used by a previous bootloader stage (by reading out the ttbr register). Here is an example of the output when walking U-Boot's own memory map on a Qualcomm RB3 board: Walking pagetable at 000000017df90000, va_bits: 36. Using 3 levels [0x17df91000] | Table | | [0x17df92000] | Table | | [0x000001000 - 0x000200000] | Pages | Device-nGnRnE | Non-shareable [0x000200000 - 0x040000000] | Block | Device-nGnRnE | Non-shareable [0x040000000 - 0x080000000] | Block | Device-nGnRnE | Non-shareable [0x080000000 - 0x140000000] | Block | Normal | Inner-shareable [0x17df93000] | Table | | [0x140000000 - 0x17de00000] | Block | Normal | Inner-shareable [0x17df94000] | Table | | [0x17de00000 - 0x17dfa0000] | Pages | Normal | Inner-shareable
2024-06-26meson: Correct driver declaration for meson_axg_gpioSimon Glass
This should use the driver macros so that the driver appears in the linker list. Fix this. Fixes: 8587839f19d ("pinctrl: meson: add axg support") Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2024-06-25doc: arch: arm64: describe pagetable debuggingCaleb Connolly
Add some brief documentation on using dump_pagetables() to print out U-Boot's pagetables during boot. Signed-off-by: Caleb Connolly <[email protected]>
2024-06-25arm64: add software pagetable walkerCaleb Connolly
Add a basic software implementation of the ARM64 pagetable walker. This can be used for debugging U-Boot's pagetable, as well as dumping the pagetable from the previous bootloader stage if it used one (by reading out the ttbr address). One can either call dump_pagetable() to print the pagetable to the console with the default formatter, or implement their own pagetable handler using walke_pagetable() with a custom pte_walker_cb_t callback. All of the added code is discarded when unused, hence there is no need to add an additional Kconfig option for this. Signed-off-by: Caleb Connolly <[email protected]>
2024-06-25arm64: mmu.h: fix PTE_TABLE_APCaleb Connolly
The APTable attribute is two bits wide according to the ARMv8-A architecture reference manual. Fix the macro accordingly. Signed-off-by: Caleb Connolly <[email protected]>
2024-06-25usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode staticNeil Armstrong
Drop this useless usb.h and now make dwc3_meson_g12a_force_mode static since only used in the dwc3-meson-g12a.c file. Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-5-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2024-06-25usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode staticNeil Armstrong
Drop this useless usb-gx.h and now make dwc3_meson_gxl_force_mode static since only used in the dwc3-meson-gxl.c file. Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-4-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2024-06-25phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_modeNeil Armstrong
Remove the public phy_meson_gxl_usb2_set_mode and move the implementation in the the set_mode callback. Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-3-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2024-06-25usb: dwc3: meson-gxl: switch to generic_phy_set_modeNeil Armstrong
Use the PHY set_mode call instead of calling directly in the PHY shared function. Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-2-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2024-06-25phy: meson-gxl-usb2: add set_mode callbackNeil Armstrong
Implement set_mode callback by calling the current public function, use a temporary function name that will be removed when the public phy_meson_gxl_usb2_set_mode is finally removed in a following change. Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-1-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2024-06-24board: beagle: beagleplay: enable OF_SYSTEM_SETUPBryan Brattlof
Unfortunately when enabling FDT fixups for the AM62x family of SoCs and moving TF-A to the bottom of RAM we missed the BeaglePlay. This is causing Linux's memory allocator to clobber TF-A and break its boot. Enable OF_SYSTEM_SETUP to fixup the kernel's FDT to inform it of the actual location of the firmware CC: Andrew Davis <[email protected]> CC: Nishanth Menon <[email protected]> CC: Robert Nelson <[email protected]> Reported-by: Dhruva Gole <[email protected]> Signed-off-by: Bryan Brattlof <[email protected]> Acked-by: Andrew Davis <[email protected]> Tested-by: Robert Nelson <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Acked-by: Chirag Shilwant <[email protected]> Tested-by: Dhruva Gole <[email protected]>
2024-06-24Merge tag 'v2024.07-rc5' into nextTom Rini
Prepare v2024.07-rc5
2024-06-24Prepare v2024.07-rc5v2024.07-rc5Tom Rini
Signed-off-by: Tom Rini <[email protected]>
2024-06-24Merge tag 'u-boot-imx-next-20240624' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/21310 - Enable SPL DTO application support for i.MX8MP DHCOM PDK2. - Migrate imx8mn_bsh_smm_s2 and imx6ulz_bsh_smm_m2 to OF_UPSTREAM. - Drop redundant imports with dts/upstream. - Miscellaneous improvements for Gateworks i.MX8M boards.
2024-06-24configs: j784s4_evm_r5_defconfig: Enable CONFIG_K3_QOSJayesh Choudhary
Enable CONFIG_K3_QOS to set QoS registers in R5 boot stage. Signed-off-by: Jayesh Choudhary <[email protected]>