aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-22board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evmNishanth Menon1-0/+1
Enable SOC_K3_J721E_J7200 when board is J7200 EVM - this allows us to differentiate J7200 platform cleanly in board independent codebase. Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200Nishanth Menon1-0/+5
J7200 shares quite a few characteristics with J721E. However a few sets are different. Introduce a Kconfig to differentiate the two to allow for new boards to be introduced in a seamless manner. Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22configs: j721e_evm_a72_defconfig: Switch to bootstdNishanth Menon1-2/+3
Switch to using bootstd. Note with this change, we will stop using distro_bootcmd and instead depend entirely on bootflow method of starting the system up. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22board: ti: j721e: j721e.env: Add explicit boot_targetsNishanth Menon1-0/+1
Add explicit boot_targets to indicate the specific boot sequence to follow. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22board: ti: j721e: evm: Switch to using IS_ENABLEDNishanth Menon1-41/+42
Switch to using IS_ENABLED() for inline function usage. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22board: ti: j721e: evm: Drop board check for ESMNishanth Menon1-8/+2
When config is enabled, the esm dt probe makes sense. Simplify by dropping board specific checks. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22board: ti: j721e: evm: Drop unused headersNishanth Menon1-8/+0
Drop headers that are no longer necessary for build Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22arm: mach-k3: Move TI dummy keys out of board folderNishanth Menon5-5/+1
This file is used to emulate customer keys on TI development board ecosystems, move it out of board/ directory and into mach-k3. And change the relative paths to absolute paths in the binman paths. While at it, drop the reference in verdin-binman file which is redundant. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-11-22arm: mach-k3: Move K3 degenerate keys out of board folderNishanth Menon3-5/+1
This file is common for all of K3, move it out of board/ directory and into mach-k3. And change the relative paths to absolute paths in the binman paths. While at it, drop the reference in verdin-binman file which is redundant. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: Move sysfw-loader into R5 directoryAndrew Davis5-49/+54
SYSFW is only ever loaded by the R5 core, move the code into that directory. While here also move the related Kconfig symbols. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: Remove incorrect checks for SPL buildAndrew Davis1-3/+3
The kconfig option SPL means this build supports SPL but not that this build is SPL, nor that this build is the SPL running on R5. For options that are for R5 SPL use CPU_V7R. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: Move R5 specific code into new r5/ directoryAndrew Davis20-6/+16
This makes it clear these are only to be used by the R5 builds of SPL. And this will be used to later more cleanly split the two builds. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: j721s2: Move board selection to mach-k3Andrew Davis3-28/+37
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: am62ax: Move board selection to mach-k3Andrew Davis3-28/+37
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: am62x: Move board selection to mach-k3Andrew Davis4-48/+51
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: am64x: Move board selection to mach-k3Andrew Davis3-28/+37
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: am65x: Move board selection to mach-k3Andrew Davis4-37/+46
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22arm: mach-k3: j721e: Move board selection to mach-k3Andrew Davis3-48/+57
Currently each set of board targets from a vendor is selected inside the board directory for that vendor. This has the problem of multiple targets, one from each vendor, being selectable at the same time. For instance you can select both TARGET_AM654_A53_EVM and TARGET_IOT2050_A53 in the same build. To fix this we need to move the target board choice to a common location for each parent SoC selection. Do this in arch/arm/mach-k3. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-22board: ti: Add dependency from TARGET selection to SOCAndrew Davis8-1/+8
Currently the K3 selection for TARGET boards does not depend on the SoC for which it is based. This leds to the odd ability to select for instance both SOC_K3_AM625 and TARGET_J721E_A72_EVM. To fix this the target choice should depend on the matching SOC config. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-22Merge tag 'tpm-next-22112023' of ↵Tom Rini1-3/+0
https://source.denx.de/u-boot/custodians/u-boot-tpm into next tpm_tis_send-cleanup
2023-11-22tpm: remove superfluous check in tpm_tis_send()Heinrich Schuchardt1-3/+0
Checking if variable chip is NULL after dereferencing it makes no sense. As discribed in [1] it is not expected that the variable can ever be NULL. [1] Re: [PATCH] tpm: avoid NULL pointer dereference in tpm_tis_send() https://lore.kernel.org/u-boot/YaFwDtKKYRr7qzWc@apalos.home/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-21usb: udc: Try to clarify an error messageMiquel Raynal1-1/+12
At some point when trying to use USB gadgets, two situations may arise and lead to a failure. Either the UDC (USB Device Controller) is not available at all (not described or not probed) or the UDC is already in use. For instance, as the USB Ethernet gadget remains bound to the UDC, the use of any other USB gadget (fastboot, dfu, etc) *after* will always fail with the "couldn't find an available UDC" error. Let's give a more helpful message by making a difference between the two cases. Let's also hint people who would get this error and grep it into the sources a better explanation of what's wrong with their workflow. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20231010090304.49335-4-miquel.raynal@bootlin.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-21cmd: bind: Try to improve the (un)bind helpMiquel Raynal2-0/+5
While it may sound totally obvious for the regular U-Boot developer to get the parameters of the bind/unbind commands from the output of 'dm tree', it did not felt straightforward to me until I was explicitly told to look there. And even when I knew the command, I did not make a direct link between the arguments of this command and the columns returned by 'dm tree'. Several of us lost a lot of time because of that, I would like to kindly help other users by slightly improving this textual line. Unfortunately, because of how this string is used (like within the 'help' command) I cannot detail much more, but at least the pointer is there. While we add this message, we can also imply CMD_DM when we enable CMD_BIND so the debug message does not lead to an unknown command. This way the 'dm' command will likely be there unless explicitly disabled. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-21cmd: Change the dependencies between CMD_BIND and USB_GADGETMiquel Raynal2-1/+1
Today CMD_BIND defaults to 'y' when USB_ETHER is enabled. In practice, CMD_BIND should default to 'y' when any USB gadget is enabled not only USB_ETHER. Let's invert the logic of the dependency and use the weak 'imply' keyword to enforce this. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3 Link: https://lore.kernel.org/r/20231010090304.49335-2-miquel.raynal@bootlin.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-21usb: gadget: f_mass_storage: Stop ums on START-STOP UNIT SCSI commandMarek Vasut1-0/+7
Exit the UMS handler loop in case START-STOP UNIT SCSI command is received. This is sent e.g. by the util-linux eject(1) command and indicates to the device that it is supposed to spin down the media and enter low power state. This effectively adds support for exitting the 'ums' command from host using 'eject /dev/sdN' that is on par with 'dfu-util -e' . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20231107001018.55640-1-marex@denx.de Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-21dfu: add CONFIG_DFU_NAME_MAX_SIZE configurationJaehoon Chung2-0/+14
Add CONFIG_DFU_NAME_MAX_SIZE to change the proper size. If name is longer than default size, it can do wrong behavior during updating image. So it need to change the proper maximum size. This patch is proviced the solution to change value with configuration. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Link: https://lore.kernel.org/r/20220620111354.448512-1-jh80.chung@samsung.com [mkorpershoek: fixed build errors for dfu.h includes] Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-20Merge tag 'v2024.01-rc3' into nextTom Rini595-1415/+4655
Prepare v2024.01-rc3
2023-11-20Prepare v2024.01-rc3v2024.01-rc3Tom Rini2-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-20configs: Resync with savedefconfigTom Rini29-29/+4
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-20scsi: set dma direction to NONE for TEST UNIT READYNikita Yushchenko1-0/+2
SCSI device scan code was executing TEST UNIT READY command without explicitly setting dma direction in struct scsi_cmd to NONE, so command was passed to driver with dma direction set to DMA_FROM_DEVICE, inherited from older usage. With WDC SDINDDH6-64G ufs device, that caused TEST UNIT READY to return error. Fix that, by explicitly setting dma direction to NONE for TEST UNIT READY, and restoring it back DMA_FROM_DEVICE for the following READ CAPACITY. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Marek Vasut <marex@denx.de>
2023-11-18Merge tag 'efi-next-18112023' of ↵WIP/18Nov2023-nextTom Rini21-62/+908
https://source.denx.de/u-boot/custodians/u-boot-tpm into next EFI HTTP Boot is currently supported by using a combination of wget, blkmap and bootefi commands. The user has to download the image, mount it using blkmap and then execute the efi installer using bootefi. This series simplifies the user experience. Instead of doing all the steps manually, users can now enable a new Kconfig (EFI_HTTP_BOOT) which will select wget, blkmap and dns options. They can then use efidebug command to add a boot option for the EFI Bootmanager using => efidebug boot add -u 3 netinst http://<path> => efidebug boot order 3 => bootefi bootmgr The boot manager will automatically download and mount the image. Once it's mounted it will locate and launch the installer. It's worth noting that this rarely fails, but the reason is irrelevant to the current patchset. More information can be found here https://lore.kernel.org/u-boot/CAOMZO5CoduEgwgdQiybmoKh6qQZOezUtRRQO4ecaGdZBBz5dDw@mail.gmail.c om/ The tl;dr is that wget sometimes fails to download the file correctly or set the size env variables. We expect all these to be solved once LWIP is stable and pulled
2023-11-18Merge branch 'master-mmc-clock' of ↵Tom Rini1-4/+10
https://source.denx.de/u-boot/custodians/u-boot-sh
2023-11-18doc: uefi: add HTTP Boot supportMasahisa Kojima1-0/+34
This adds the description about HTTP Boot. [Ilias add the new EFI_HTTP_BOOT option in docs] Lore: https://lore.kernel.org/u-boot/20231110042542.3797301-1-masahisa.kojima@linaro.org/T/#m36acf922a888cc14f74e823ec57bacd9f977194e Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18cmd: efidebug: add uri device pathMasahisa Kojima3-0/+157
This adds the URI device path option for 'boot add' subcommand. User can add the URI load option for downloading ISO image file or EFI application through network. Currently HTTP is only supported. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18efi_loader: support boot from URI device pathMasahisa Kojima2-0/+395
This supports to boot from the URI device path. When user selects the URI device path, bootmgr downloads the file using wget into the address specified by loadaddr env variable. If the file is .iso or .img file, mount the image with blkmap then try to boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI). Since boot option indicating the default file is automatically created when new disk is detected, system can boot by selecting the automatically created blkmap boot option. If the file is PE-COFF file, load and start the downloaded file. The buffer used to download the ISO image file must be reserved to avoid the unintended access to the image and expose the ramdisk to the OS. For PE-COFF file case, this memory reservation is done in LoadImage Boot Service. [Ilias fix a few memory leaks by replacing returns with gotos] Lore: https://lore.kernel.org/u-boot/20231110042542.3797301-1-masahisa.kojima@linaro.org/T/#mbac31da301ff465b60894b38f3a587b2868cf817 Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18efi_loader: add return to efibootmgr event groupMasahisa Kojima4-0/+20
When the image loaded by efibootmgr returns, efibootmgr needs to clean the resources. Adding the event of returning to efibootmgr is useful to simplify the implementation. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18efi_loader: add missing const classifier for event serviceMasahisa Kojima3-4/+4
const classifier is missing in EventGroup parameter of CreateEventEx(). Fix it to remove the compiler warning. NotifyContext parameter of CreateEventEx() is also defined with const in UEFI specification, but NotifyContext parameter of CreateEvent() is defined without const. Since current implementation calls the common efi_create_event() function from both CreateEventEx() and CreateEvent() services, NotifyContext parameter leaves as is. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18efi_loader: Boot var automatic managementRaymond Mao7-35/+78
Changes for complying to EFI spec §3.5.1.1 'Removable Media Boot Behavior'. Boot variables can be automatically generated during a removable media is probed. At the same time, unused boot variables will be detected and removed. Please note that currently the function 'efi_disk_remove' has no ability to distinguish below two scenarios a) Unplugging of a removable media under U-Boot b) U-Boot exiting and booting an OS Thus currently the boot variables management is not added into 'efi_disk_remove' to avoid boot options being added/erased repeatedly under scenario b) during power cycles See TODO comments under function 'efi_disk_remove' for more details The original efi_secboot tests expect that BootOrder EFI variable is not defined. With this commit, the BootOrder EFI variable is automatically added when the disk is detected. The original efi_secboot tests end up with unexpected failure. The efi_secboot tests need to be modified to explicitly set the BootOrder EFI variable. squashfs and erofs ls tests are also affected by this modification, need to clear the previous state before squashfs ls test starts. Co-developed-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18blk: blkmap: add ramdisk creation utility functionMasahisa Kojima4-16/+84
User needs to call several functions to create the ramdisk with blkmap. This adds the utility function to create blkmap device and mount the ramdisk. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18net: wget: add wget with dns utility functionMasahisa Kojima2-0/+63
Current wget takes the target uri in this format: "<http server ip>:<file path>" e.g.) 192.168.1.1:/bar The http server ip address must be resolved before calling wget. This commit adds the utility function runs wget with dhs. User can call wget with the uri like "http://foo/bar". Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18net: wget: prevent overwriting reserved memoryMasahisa Kojima1-7/+73
This introduces the valid range check to store the received blocks using lmb. The same logic is implemented in tftp. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-17Merge branch '2023-11-17-assorted-important-fixes'Tom Rini9-53/+25
- Revert HAFDBS changes, correct spl_imx_romapi for eMMC, fix the virtio rng in one case, fix bootstd in one case, and correct a Kconfig description.
2023-11-17Revert "arm64: Use FEAT_HAFDBS to track dirty pages when available"WIP/2023-11-17-assorted-important-fixesChris Packham3-26/+5
This reverts commit 6cdf6b7a340db4ddd008516181de7e08e3f8c213. This is part of a series trying to make use of the arm64 hardware features for tracking dirty pages. Unfortunately this series causes problems for the AC5/AC5X SoCs. Having exhausted other options the consensus seems to be reverting this series is the best course of action. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17Revert "arm64: Use level-2 for largest block mappings when FEAT_HAFDBS is ↵Chris Packham2-11/+4
present" This reverts commit 836b8d4b205d2175b57cb9ef271e638b0c116e89. This is part of a series trying to make use of the arm64 hardware features for tracking dirty pages. Unfortunately this series causes problems for the AC5/AC5X SoCs. Having exhausted other options the consensus seems to be reverting this series is the best course of action. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17Revert "armv8: enable HAFDBS for other ELx when FEAT_HAFDBS is present"Chris Packham2-13/+3
This reverts commit c1da6fdb5c239b432440721772d993e63cfdeb20. This is part of a series trying to make use of the arm64 hardware features for tracking dirty pages. Unfortunately this series causes problems for the AC5/AC5X SoCs. Having exhausted other options the consensus seems to be reverting this series is the best course of action. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17imx: spl_imx_romapi: fix emmc fast boot mode caseMarcel Ziswiler1-1/+1
This fixes a regression in the eMMC fast boot mode case where the buffer was missing 464 bytes. The code figures out how many bytes must at least be fetched to honor the current read, rounds that up to the ss->pagesize [which is a no-op in the USB download case because that has ->pagesize==1], fetches that many bytes, but then recorded the original upper bound as the new end of the valid data. However, this did not take into account the rounding up to the ss->pagesize. Fix this by recording the actual bytes downloaded. Fixes: 4b4472438f5a ("imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full FIT size") Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-11-17imx: spl_imx_romapi: fix comment about stream(usb) download failureMarcel Ziswiler1-2/+2
Fix comment about Stream(USB) download failure. Fixes: 1cbebc786276 ("imx: add rom api support") Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-11-17spl: fix TPL_SYS_MALLOC_F descriptionJohn Keeping1-1/+1
This config option enables the malloc() pool in TPL not the SPL. Fix the description to accurately reflect this. Fixes: fd8497dae54 (spl: Create proper symbols for enabling the malloc() pool) Signed-off-by: John Keeping <jkeeping@inmusicbrands.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-17virtio: rng: gracefully handle 0 byte returnsAndre Przywara1-2/+7
According to the virtio v1.x "entropy device" specification, a virtio-rng device is supposed to always return at least one byte of entropy. However the virtio v0.9 spec does not mention such a requirement. The Arm Fixed Virtual Platform (FVP) implementation of virtio-rng always returns 8 bytes less of entropy than requested. If 8 bytes or less are requested, it will return 0 bytes. This behaviour makes U-Boot's virtio_rng_read() implementation go into an endless loop, hanging the system. Work around this problem by always requesting 8 bytes more than needed, but only if a previous call to virtqueue_get_buf() returned 0 bytes. This should never trigger on a v1.x spec compliant implementation, but fixes the hang on the Arm FVP. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reported-by: Peter Hoyes <peter.hoyes@arm.com>
2023-11-17bootstd: Avoid freeing a non-allocated bufferSimon Glass3-2/+7
EFI applications can be very large and thus used to cause boot failures when malloc() space was exhausted. A recent changed fixed this by using the kernel_addr_r environment var as the address of the buffer. However, it still frees the buffer when the bootflow is discarded. Fix this by introducing a flag to indicate whether the buffer was allocated, or not. Note that kernel_addr_r is not the last word here. It might be better to use lmb to place images. But there is a lot of refactoring to do before we can remove the environment variables. The distro scripts rely on them so it is safe for bootstd to do so too. Fixes: 6a8c2f9781c bootstd: Avoid allocating memory for the EFI file Signed-off-by: Simon Glass <sjg@chromium.org> Reported by: Simon Glass <sjg@chromium.org> Reported by: Shantur Rathore <i@shantur.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Shantur Rathore <i@shantur.com>