aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-27Merge branch 'master' into nextTom Rini
2023-03-27Prepare v2023.04-rc5Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-27configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-27Merge branch '2023-03-27-rockchip-rk3399-fixes'Tom Rini
- A series of minor cleanups to DISTRO_DEFAULTS and BOOTSTD so that the rk3399 bootstd migration can be complete and functional now, and make future migrations easier.
2023-03-27rockchip: rk3399: Drop altbootcmdTom Rini
The defined altbootcmd was specific to distro_bootcmd which is not longer in use on these platforms, so drop it. Tested-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-27rockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTSTom Rini
When we do not enable DISTRO_DEFAULTS (generally, to get distro_bootcmd) we instea do want to imply BOOTSTD_DEFAULTS so that when using bootstd the general distro boot functionality will still work. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-27rockchip: Disable DISTRO_DEFAULTS for rk3399 boardsSimon Glass
These board have moved to standard boot but the old 'distro_bootcmd' command is still active. Disable DISTRO_DEFAULTS to fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Vagrant Cascadian <vagrant@debian.org>
2023-03-27boot: Create a common BOOT_DEFAULTS for distro and bootstdSimon Glass
These two features use a lot of common options. Move them into a common CONFIG to reduce duplication. Use 'select' for most options since these are things that boards aren't supposed to override. For now it is not possible to disable BOOT_DEFAULTS but we may take another look later. Note that five options use 'imply' to match existing behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Rework a bit so we don't grow so many platforms unintentionally] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-27lmb: Enable LMB if SYS_BOOT_RAMDISK_HIGHSimon Glass
Ramdisk relocation requires LMB, so enable it automatically to avoid build errors. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-27Move DISTRO_DEFAULTS into boot/Simon Glass
This relates to booting so move it in to that Kconfig file, before changing it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-27rockchip: Drop bootstage stash in TPL and SPL for rockpro64Simon Glass
Unfortunately the IRAM used to stash the bootstage records in TPL becomes inaccessible after SPL runs. Presumably this is because of ATF taking it over. We could move the stash to another address in SPL, before passing it to U-Boot proper. But it seems easier to wait until we have support for standard passage[1] which should not be too far away. For now, disable it in TPL and SPL. [1] https://patchwork.ozlabs.org/project/uboot/cover/ 20220117150428.1580273-1-sjg@chromium.org/ Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Vagrant Cascadian <vagrant@debian.org>
2023-03-27Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini
- x86: Bug fixes of previous BayTrail platform CONFIG_TEXT_BASE changes
2023-03-27x86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: e23cae30801f ("x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-03-27x86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: 5d1c8342aeaa ("x86: dfi-bt700: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-03-27x86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: 388f93f96354 ("x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-27x86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Fixes: f38be3086837 ("x86: bayleybay: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-03-27x86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASESimon Glass
With recent CONFIG_TEXT_BASE changes, there are inconsistencies between several settings. Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC cache out of the way too. Add documentation on how to make this change safely. Fixes: 66e2c665f3b6 ("x86: minnowmax: Adjust CONFIG_TEXT_BASE") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-03-25Merge tag 'efi-next-20230325' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request for efi-next-20230325 Documenation: * add man-page for efi command UEFI: * Let EFI app call ExitBootServices() before legacy booting kernel * Support zboot and bootm in the EFI app * Let efi command show configuration tables * Support booting a 64-bit kernel from 64-bit EFI app * Allocate device-tree copy from high memory * simplify efi_str_to_u16()
2023-03-25Merge tag 'efi-2023.04-rc5' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023.04-rc5 UEFI: * Create unique device paths for USB devices with the same vendor and product id.
2023-03-25cmd: bootefi: allocate device-tree copy from high memoryHeinrich Schuchardt
The bootefi command creates a copy of the device-tree within the first 127 MiB of memory. This may lead to overwriting previously loaded binaries (e.g. kernel, initrd). Linux EFI stub itself copies U-Boot's copy of the device-tree. This means there is not restriction for U-Boot to place the device-tree copy to any address. (Restrictions existed for 32bit ARM before Linux commit 7a1be318f579 ("ARM: 9012/1: move device tree mapping out of linear region") for legacy booting. Reported-by: Alexandre Ghiti <alexghiti@rivosinc.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
2023-03-25efI: Allow packaging a kernel in the debugging scriptSimon Glass
Add an option to package a kernel into the debugging script used for EFI. The name of the kernel must be added to the script. By default it is assumed that the kernel is built in the /tmp/kernel directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Support showing tablesSimon Glass
Add a command (for the app and payload) to display the tables provided by EFI. Note that for the payload the tables should always be present, so an error message is unnecessary and would bloat the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Split out table-listing code into a new fileSimon Glass
This code is used with EFI_LOADER but is also useful (with some modifications) for the EFI app and payload. Move it into a shared file. Show the address of the table so it can be examined if needed. Also show the table name as unknown if necessary. Our list of GUIDs is fairly small. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25doc: Add help for the efi commandSimon Glass
This command currently has no help. Add some. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Include GUID names with EFI app and payloadSimon Glass
These are currently only available when running with EFI_LOADER. Expand this to include the app and payload, since it is useful to be able to decode things there. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Add another tranch of GUIDsSimon Glass
Provide information about the GUIDs supplied by QEMU, so far as it is known. These values are used in the 'efi table' command as well as the printf format string %sU Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25x86: Support zboot and bootm in the EFI appSimon Glass
These have been disabled due to the rudimentary support available. It is a little better now, so enable these options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-03-25x86: Exit EFI boot services before starting kernelSimon Glass
When running the EFI app, we need to exit boot services before jumping to Linux. At some point it may be possible to jump to Linux and pass on the system table, and: * install the device-tree as configuration table * use LoadImage() to load the kernel image (e.g. from memory) * start the image with StartImage() This should allow the Linux efistub to be used. For now, this is not implemented. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25x86: Support booting a 64-bit kernel from 64-bit U-BootSimon Glass
Add the missing code to handle this. For a 64-bit kernel the entry address is 0x200 bytes after the normal entry. Rename the parameter to boot_linux_kernel() accordingly. Update the comments to indicate that these are addresses, not pointers. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25x86: Add return-value comment to cpu_jump_to_64bit()Simon Glass
This does not mention what it returns. Add the missing documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25x86: Adjust bootparam.h to be more like linuxSimon Glass
This likely came from Linux originally, so update it to match v6.2 more. This has no functional change. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Set RUN_64BIT correctly for the EFI appSimon Glass
The U-Boot EFI app can run as a 64-bit program, so set the Kconfig correctly in that case. Make sure it doesn't build SPL, since there is no need to switch from 32 to 64 bit when running. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi_loader: simplify efi_str_to_u16()Heinrich Schuchardt
Use efi_alloc() to allocate memory. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-25efi_loader: move dp_alloc() to efi_alloc()Heinrich Schuchardt
The incumbent function efi_alloc() is unused. Replace dp_alloc() by a new function efi_alloc() that we can use more widely. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-25efi_loader: move struct efi_device_path to efi.hHeinrich Schuchardt
Avoid forward declaration of struct efi_device_path. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-25efi_loader: fix device-path for USB devicesHeinrich Schuchardt
EFI device paths for block devices must be unique. If a non-unique device path is discovered, probing of the block device fails. Currently we use UsbClass() device path nodes. As multiple devices may have the same vendor and product id these are non-unique. Instead we should use Usb() device path nodes. They include the USB port on the parent hub. Hence they are unique. A USB storage device may contain multiple logical units. These can be modeled as Ctrl() nodes. Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-25efi_loader: support for Ctrl() device path nodeHeinrich Schuchardt
* Add the definitions for Ctrl() device path nodes. * Implement Ctrl() nodes in the device path to text protocol. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-25efi_loader: fix device-path for USB devicesHeinrich Schuchardt
EFI device paths for block devices must be unique. If a non-unique device path is discovered, probing of the block device fails. Currently we use UsbClass() device path nodes. As multiple devices may have the same vendor and product id these are non-unique. Instead we should use Usb() device path nodes. They include the USB port on the parent hub. Hence they are unique. A USB storage device may contain multiple logical units. These can be modeled as Ctrl() nodes. Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-25efi_loader: support for Ctrl() device path nodeHeinrich Schuchardt
* Add the definitions for Ctrl() device path nodes. * Implement Ctrl() nodes in the device path to text protocol. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-24Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-marvell into next - mvebu: kwboot: Fix UART booting (Pali) - mvebu: doc: Misc updates / fixes (Pali) - kirkwood: Early init enhancements, e.g. for DEBUG UART (Pali & Tony) - mvebu: Enable NAND flash for Thecus N2350 board (Tony) - mvebu: Set common SPI flash default speed and mode (Tony)
2023-03-24Merge branch 'rpi-2023.04' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi - Fixes for booting newer revs of the SoC in the Raspberry Pi 4 - Propagate some firmware DT properties to the loaded DT - Update the Zero2W upstream DT name
2023-03-24mmc: bcm2835-host: let firmware manage the clock divisorVincent Fazio
Newer firmware can manage the SDCDIV clock divisor register, allowing the divisor to scale with the core as necessary. Leverage this ability if the firmware supports it. Adapted from the following raspberrypi Linux kernel commit: bcm2835-sdhost: Firmware manages the clock divisor https://github.com/raspberrypi/linux/commit/08532d242d7702ae0add95096aa49c5e96e066e2 Signed-off-by: Vincent Fazio <vfazio@xes-inc.com> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2023-03-24arm: rpi: fallback to max clock rate for MMC clockVincent Fazio
In rpi-firmware 25e2b597ebfb2495eab4816a276758dcc6ea21f1, the GET_CLOCK_RATE mailbox property was changed to return the last value set by SET_CLOCK_RATE. https://github.com/raspberrypi/firmware/issues/1619#issuecomment-917025502 Due to this change in firmware behavior, bcm2835_get_mmc_clock now returns a clock rate of zero since we do not issue SET_CLOCK_RATE. This results in degraded MMC performance. SET_CLOCK_RATE fixes the clock to a specific value and disables scaling so is not an ideal solution. Instead, fallback to GET_MAX_CLOCK_RATE in bcm2835_get_mmc_clock if GET_CLOCK_RATE returns zero. Signed-off-by: Vincent Fazio <vfazio@xes-inc.com> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2023-03-24tools: kwboot: Document information about NOR XIPPali Rohár
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24tools: kwboot: Workaround A38x BootROM bug for images with a gapPali Rohár
A38x BootROM has a bug which cause that BootROM loads data part of UART image into RAM target address increased by one byte when source address and header size stored in the image header are not same. Workaround this bug by completely removing a gap between header and data part of the UART image. Without gap, this BootROM bug is not triggered. This gap can be present in SDIO or SATA image types which have aligned start of the data part to the media sector size. With this workaround kwboot should be able to convert and send SDIO or SATA images for UART booting. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24tools: kwboot: Fix sending very small imagesPali Rohár
Sending of very small images (smaller than 128 bytes = xmodem block size) cause out-of-bound memory read access. Fix this issue by ensuring that hdrsz when sending image is not larger than total size of the image. Issue was introduced in commit f8017c37799c ("tools: kwboot: Fix sending Kirkwood v0 images"). Special case when total image is smaller than header size aligned to multiply of xmodem size is already handled since that commit. Fixes: f8017c37799c ("tools: kwboot: Fix sending Kirkwood v0 images") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24tools: kwboot: Fix inserting UART data checksum without -B optionPali Rohár
Commit 7665ed2fa04e ("tools: kwboot: Fix parsing UART image without data checksum") added fixup code to insert place for data checksum if UART image does not have it. Together with option -B (change baudrate), kwboot calculates this checksum. Without option -B, it inserts only place for checksum but does not calculate it. This commit fix above logic and calculate data checksum also when kwboot is used without -B option. Fixes: 7665ed2fa04e ("tools: kwboot: Fix parsing UART image without data checksum") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24tools: kwboot: Fix invalid UART kwbimage v1 headerszPali Rohár
Ensure that UART aligned header size is always stored into kwbimage v1 header. It is needed for proper UART booting. Calculation of headersz field was broken in commit d656f5a0ee22 ("tools: kwboot: Calculate real used space in kwbimage header when calling kwboot_img_grow_hdr()") which introduced optimization of kwboot_img_grow_hdr() function. Fixes: d656f5a0ee22 ("tools: kwboot: Calculate real used space in kwbimage header when calling kwboot_img_grow_hdr()") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24tools: kwbimage: Fix invalid UART kwbimage v1 headerszPali Rohár
Armada 385 BootROM ignores low 7 bits of headersz when parsing kwbimage header of UART type, which effectively means that headersz is rounded down to multiply of 128 bytes. For all other image types BootROM reads and use all bits of headersz. Therefore fill into UART type of kwbimage v1 headersz aligned to 128 bytes. Fixes: 2b0980c24027 ("tools: kwbimage: Fill the real header size into the main header") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-03-24ddr: marvell: a38x: Remove unused file seq_exec.hPali Rohár
DDR code does not use seq_exec.h, so remove it. Signed-off-by: Pali Rohár <pali@kernel.org>