summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-11arm: dts: k3: Remove unneeded ti, sci-sysreset binding and nodesAndrew Davis
This extra binding is non-standard and now unneeded as we bind the sysreset driver automatically. This matches what is done in Linux and allows us to more closely match the DTBs. Remove the binding and all users. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Tested-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-11firmware: ti_sci: Bind sysreset driver when enabledAndrew Davis
The sysreset TI-SCI API is available with TI-SCI always, there is no need for a DT node to describe the availability of this. If the sysreset driver is available then bind it during ti-sci probe. Remove the unneeded device tree matching. Signed-off-by: Andrew Davis <afd@ti.com> Tested-by: Jonathan Humphreys <j-humphreys@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-04-11net: ti: am65-cpsw: Fix buffer overflowMichael Walle
The device name is a concatenation of the device node name of the cpsw device and of the device node name of the port. In my case that is ethernet@8000000 port@1 First the buffer is really too small, but more importantly, there is no boundary check. Use snprintf() and increase the buffer size. Fixes: 38922b1f4acc ("net: ti: am65-cpsw: Add support for multi port independent MAC mode") Signed-off-by: Michael Walle <mwalle@kernel.org>
2024-04-11arm: mach-k3: common: EFI loader map memory below ram topVitor Soares
During the boot, the EFI loader maps the memory from ram_top to ram_end as EFI_BOOT_SERVICES_DATA. When LMB does boot_fdt_add_mem_rsv_regions() to OPTEE, TFA, R5, and M4F DMA/memory "no-map" for the kernel it produces the following error message: ERROR: reserving fdt memory region failed (addr=9cb00000 size=100000 flags=4) ERROR: reserving fdt memory region failed (addr=9cc00000 size=e00000 flags=4) ERROR: reserving fdt memory region failed (addr=9da00000 size=100000 flags=4) ERROR: reserving fdt memory region failed (addr=9db00000 size=c00000 flags=4) ERROR: reserving fdt memory region failed (addr=9e780000 size=80000 flags=4) ERROR: reserving fdt memory region failed (addr=9e800000 size=1800000 flags=4) To avoid this, don't flag with EFI_BOOT_SERVICES_DATA the memory from ram_top to ram_end by the EFI loader. Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
2024-04-11am625x_evm_a53: Tweak boot command to set fdtMartyn Welch
With the current config for tha SK-AM62, fdtfile isn't set in the U-Boot environment. When using bootflow to boot from a block device, where the extlinux.conf file specifies `fdtdir`, a fallback device tree is being constructed from the `soc` (`k3`) and `board` (`am62x`) environment variables, resulting in u-Boot trying to retrieve `/dtbs/6.8.1+/k3-am62x.dtb`. This file doesn't exist. The environment variables `default_device_tree` and `default_device_tree_arch` are set in the config, the `findfdt` script can be called to construct `fdtfile` from the environment variables set by these config options, however this script currently isn't being run. Calling this script results in the correct device tree being retrieved: Retrieving file: /dtbs/6.8.1+/ti/k3-am625-sk.dtb Many boards are calling this script as part of their boot command. The am62x currently isn't. Rectify this so that booting works correctly. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
2024-04-11tools: binman: ti_board_cfg: improve error messageMichael Walle
When there is a lint error the user gets the following cryptic message: binman: Node '/path/to/some/node': Yamllint error: 18: comments This isn't very helpful. Improve the message to tell the user that the number is actually a line number and also tell the user in which file they have to look. Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-04-11binman: ti-secure: Enable debug extension for combined bootManorit Chawdhry
To debug using jtag, ROM needs to unlock jtag debugging on HS devices and it does that looking at this debug extension. Add the debug extension and enable it by default. Link: https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/sec_cert_format.html?highlight=debug#sysfw-debug-ext Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-04-11arm: mach-k3: am625: Fixup a53 cpu frequency by speed gradeJoao Paulo Goncalves
The maximum frequency of the A53 CPU on the AM62 depends on the speed grade of the SoC. However, this value is hardcoded in the DT for all AM62 variants, potentially causing specifications to be exceeded. Moreover, setting a common lower frequency for all variants increases boot time. To prevent these issues, modify the DT at runtime from the R5 core to adjust the A53 CPU frequency based on its speed grade. Suggested-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-04-11arm: mach-k3: am62: Get a53 max cpu frequency by speed gradeJoao Paulo Goncalves
AM62 SoC has multiple speed grades. Add function to return max A53 CPU frequency based on grade. Fastest grade's max frequency also depends on PMIC voltage, to simplify implementation use the smaller value. Suggested-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2024-04-11configs: am6*_evm_a53_defconfig: Enable config to support mmc rescanJudith Mendez
Enable MMC_SPEED_MODE_SET config option in defconfig to enable mmc rescan for various Sitara devices. Signed-off-by: Judith Mendez <jm@ti.com>
2024-04-11Merge patch series "boot: fdt: Change type of env_get_bootm_low() to ↵Tom Rini
phys_addr_t"
2024-04-11boot: fdt: Move usable variable below updated commentMarek Vasut
Move the variable below comment which explains what the variable means. Update the comment. No functional change. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Drop lmb_alloc*() typecastsMarek Vasut
The lmb_alloc_base() returns phys_addr_t , map_sysmem() accepts phys_addr_t as first parameter. Declare 'addr' as phys_addr_t and get rid of the casts. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Clean up env_get_bootm_mapsize()Marek Vasut
Reduce tmp variable use and remove unnecessary type cast in env_get_bootm_mapsize(). This aligns the env variable parsing with env_get_bootm_low(). No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Fix tmp type in env_get_bootm_size() and rename to lowMarek Vasut
Change type of 'tmp' variable from phys_size_t to phys_addr_t and rename it to 'low' to better describe what the variable represents, which is either the bootm_low address from environment or start of DRAM address. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Clean up env_get_bootm_size()Marek Vasut
Reduce tmp variable use and remove unnecessary type cast in env_get_bootm_size(). This aligns the env variable parsing with env_get_bootm_low(). No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Change type of env_get_bootm_low() to phys_addr_tMarek Vasut
Change type of ulong env_get_bootm_low() to phys_addr_t env_get_bootm_low(). The PPC/LS systems already treat env_get_bootm_low() result as phys_addr_t, while the function itself still returns ulong. This is potentially dangerous on 64bit systems, where ulong might not be large enough to hold the content of "bootm_low" environment variable. Fix it by using phys_addr_t, similar to what env_get_bootm_size() does, which returns phys_size_t . Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-10Merge patch series "Resolve issues with booting distros on x86"Tom Rini
Simon Glass <sjg@chromium.org> says: This little series reprises the EFI-video fix, fixes a USB problem and enables a boot script for coreboot. It also moves to truetype fonts for coreboot and qemu-x86, since the menus look much better and there are no strong size constraints. With these changes it is possible to boot a Linux distro automatically with U-Boot on x86, including when U-Boot is the second-stage bootloader.
2024-04-10x86: qemu: Enable truetype fontsSimon Glass
Enable this feature to provide a larger font choice and more attractive menus. Expand the ROM for x86_64 to 2MB to make space for the font. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: qemu: Expand ROM sizeSimon Glass
Expand the ROM for x86_64 to 2MB to make space for the font, as it is already on the edge. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: coreboot: Enable truetype fontsSimon Glass
Truetype fonts look better in the menu, so enable them. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: Enable SSE in 64-bit modeSimon Glass
This is needed to support Truetype fonts. In any case, the compiler expects SSE to be available in 64-bit mode. Provide an option to enable SSE so that hardware floating-point arithmetic works. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Suggested-by: Bin Meng <bmeng.cn@gmail.com>
2024-04-10video: Drop unnecessary truetype operations from SPLSimon Glass
Saving and restoring entries is used for expo and for the command line, which we don't use in SPL. Drop these methods. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2024-04-10video: Correct setting of cursor positionSimon Glass
The ANSI codes are not correctly handled at present, in that the requested X position is added to the current one. Correct this and also call vidconsole_entry_start() to start a new text line. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2024-04-10x86: coreboot: Add a boot scriptSimon Glass
Provide the user with a list of available boot options. Selecting one causes it to be booted. Pressing <ESC> causes U-Boot to return to the command-line prompt. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2024-04-10fastboot: Update help text with respect to CMDLINETom Rini
This hunk of the patch was missed when using "b4" to apply the series. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-10Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"Tom Rini
Simon Glass <sjg@chromium.org> says: This series is the culmanation of the current line of refactoring series. It adjusts pxe to call the booting functionality directly rather than going through the command-line interface. With this is is possible to boot using the extlinux bootmeth without the command line enabled. It also updates fastboot to do a similar thing.
2024-04-10x86: Drop message about features being missing with 64-bitSimon Glass
At this point most things work, including booting a distro, so drop this message. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Allow booting without CMDLINE for the zboot methodSimon Glass
Use zboot_run() to boot rather than the command line. This allows extlinux to be used (on x86) without CMDLINE being enabled. Collect any error but do not return it, to match the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Allow booting without CMDLINE for bootm methodsSimon Glass
Use bootm_run() and booti_run() to boot rather than the command line. This allows extlinux to be used without CMDLINE being enabled. Collect any error but do not return it, to match the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Move calculation of FDT file into a functionSimon Glass
This code undertakes a separate task from the main logic of label_run_boot() so move it into its own function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Refactor to avoid over-using bootm_argvSimon Glass
The bootm_argv[3] expression is used in many places. It is the FDT address, so use that name throughout. Assign it to bootm_argv[3] only at the end, when all the conditions are resolved. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Refactor to reduce the size of label_boot()Simon Glass
This function is far too long and complicated. Split out the part which actually calls the boot commands into a separate function. Change a strncpy() to strlcpy() to keep checkpatch happy. No functional change is intended. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Use strlcpy() instead of strcpy() in label_boot()Simon Glass
The intention here is to nul-terminate the result string, so use the correct function for that. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10doc: Mention fastboot dependency on CMDLINESimon Glass
The fastboot 'boot' command only supports running a U-Boot command if CONFIG_CMDLINE is enabled. Mention this in the documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2024-04-10fastboot: Remove dependencies on CMDLINESimon Glass
It is possible to boot a kernel without CMDLINE being enabled. Update the implementation to handle this, and drop the condition from the FASTBOOT config. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-04-10bootm: Make cmdline optional with bootm_boot_start()Simon Glass
Allow the default command line to be used when booting the OS. This is needed by fastboot. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10fastboot: Change fastboot_buf_addr to an addressSimon Glass
Given the name of this variable, it should be an address, not a pointer. Update this, to make it easier to use with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Dmitrii Merkurev <dimorinny@google.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
2024-04-10boot: Update SYS_BOOTM_LEN to depend on BOOTMSimon Glass
Use the new CONFIG_BOOTM symbol to determine whether SYS_BOOT_LEN is visible or not, since we want to support decompression when CMDLINE is disabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10treewide: Make arch-specific bootm code depend on BOOTMSimon Glass
Allow these functions to be compiled in when CONFIG_BOOTM is enabled, even if CONFIG_CMD_BOOTM is not. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Angelo Dureghello <angelo@kernel-space.org>
2024-04-10bootm: Make OS booting dependent on BOOTMSimon Glass
Booting an OS does not require the 'bootm' command, so change the condition for these options. Move them into boot/ so they don't depend on CMDLINE Note that CMD_BOOTM_PRE_LOAD has been put directly into the bootm code so will need some additional refactoring (and a test!) to allow it to change over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10bootm: Add a Kconfig option for bootm functionalitySimon Glass
Create a separate Kconfig option which enables the bootm logic, separate from the 'bootm' command. This will eventually allow booting without CMDLINE enabled. Update boards which disable CMD_BOOTM to disable BOOTM instead, since CMD_BOOTM now depends on BOOTM Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10boot: Reorder FIT and BOOTSTD to be firstSimon Glass
The boot menu shows Android first and then a timestamp option. Move these later since they are less commonly used. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10Merge patch series "Complete decoupling of zboot logic from commands"Tom Rini
Simon Glass <sjg@chromium.org> says: This series refactors the zboot code to allow it to be used with CONFIG_COMMAND disabled. A new zboot_run() function is used to boot a zimage.
2024-04-10x86: zboot: Tidy up the comment for zboot_run()Simon Glass
The current use case (ChromeOS) is the uncommon case. Document how this function is more normally used, where base is 0 and cmdline is NULL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Use zboot_start() in zboot_run()Simon Glass
Now that we have a function to start the process of booting a zimage, use it in zboot_run() to avoid duplicated logic. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Separate logic functions from commandsSimon Glass
Move zboot_start() and zboot_info() in with the other logic functions. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10x86: zboot: Rename zboot_start() to zboot_run()Simon Glass
The term 'start' is used withint bootm and zboot to indicate the first phase of booting an image. Since zboot_start() does the whole boot, rename it to zboot_run() to align with bootm_run() etc. Fix a log message while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Move argument processing outside zboot_start()Simon Glass
Process the arguments before calling zboot_start() so that we can separate the command line from the internal logic. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Drop intermediate zboot_go() functionSimon Glass
This function only calls zboot_go() so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>