aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-04ram: rk3399: Conduct memory training at 400MHzLee Jones
Currently the default initialisation frequency is 50MHz. Although this does appear to be suitable for some LPDDR4 RAM chips, training at this low frequency has been seen to cause Column errors, leading to Capacity check errors on others. Here we force RAM initialisation to happen at 400MHz before ramping up to the final value running value of 800MHz after everything has been successfully configured. Link: https://lore.kernel.org/u-boot/Yo4v3jUeHXTovjOH@google.com/ Suggested-by: YouMin Chen <cym@rock-chips.com> Signed-off-by: Lee Jones <lee@kernel.org> Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Michal Suchánek <msuchanek@suse.de>
2022-09-04ram: rk3399: Fix faulty frequency change reportsLee Jones
Frequency changes to 400MHz are presently reported as: lpddr4_set_rate_0: change freq to 400000000 mhz 0, 1 This is obviously wrong by 6 orders of magnitude. Ensure frequency changes are reported accurately. Signed-off-by: Lee Jones <lee@kernel.org> Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-09-04ram: rk3399: Fix .set_rate_index() error handlingLee Jones
Functions pointed to by this op pointer can return non-zero values indicating an error. Ensure any error value is propagated back up the call-chain. Signed-off-by: Lee Jones <lee@kernel.org> Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-09-04drivers: ram: rockchip: Fix dram channels calculation for rk3399Han Pengfei
Only add the dram channel when we finally setup it successfully at the last step. Signed-off-by: Han Pengfei <pengphei@foxmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-09-04arm: dts: rockchip: rk3288: rename mmc nodenamesJohan Jonker
The boot_devices constants for rk3288 were changed to match the binding, but the dtsi file was not synced. Fix by renaming the rk3288 mmc node names. Also correct the clock name for "ciu-drive". Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-09-03Merge tag 'efi-2022-10-rc4-2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request of efi-2022-10-rc4-2 UEFI: * provide EFI Conformance Profile Table * fix display of NVMe EUI-64 * fixes for Simple Text Input Ex Protocol * fix exception unit-test on non-x86 sandbox
2022-09-03efi_loader: fix display of NVMe EUI-64Heinrich Schuchardt
UEFI specification 2.9A requires to display the EUI-64 "in hexadecimal format with byte 7 first (i.e., on the left) and byte 0 last". This is in contrast to what the NVMe specification wants. But it is what EDK II has been implementing. Here is an example with the patch applied: qemu-system-aarch64 -machine virt -cpu cortex-a72 -nographic \ -bios denx/u-boot.bin \ -device nvme,id=nvme1,serial=9ff81223 \ -device nvme-ns,bus=nvme1,drive=nvme1n0,eui64=0x123456789ABCDEF0 \ -drive file=arm64.img,if=none,format=raw,id=nvme1n0 => nvme scan => efidebug devices Device Path ==================== /VenHw(…)/NVMe(0x1,f0-de-bc-9a-78-56-34-12) Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-09-03efi: ECPT add EBBRv2.0 conformance profileJose Marinho
Display the EBBRv2.0 conformance in the ECPT table. The EBBRv2.0 conformance profile is set in the ECPT if CONFIG_EFI_EBBR_2_0_CONFORMANCE=y. Signed-off-by: Jose Marinho <jose.marinho@arm.com> Add dependencies for CONFIG_EFI_EBBR_2_0_CONFORMANCE. Enable the setting by default. Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-09-03efi: Create ECPT tableJose Marinho
The ECPT table will be included in the UEFI specification 2.9+. The ECPT table was introduced in UEFI following the code-first path. The acceptance ticket can be viewed at: https://bugzilla.tianocore.org/show_bug.cgi?id=3591 The Conformance Profiles table is a UEFI configuration table that contains GUID of the UEFI profiles that the UEFI implementation conforms with. The ECPT table is created when CONFIG_EFI_ECPT=y. The config is set by default. Signed-off-by: Jose Marinho <jose.marinho@arm.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-09-03efi_selftest: on sandbox use host specific assemblyHeinrich Schuchardt
The selftest checking the handling of exceptions in UEFI binaries is using assembly to provide an undefined instruction. On the sandbox the correct form of the instruction depends on the host architecture. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-09-03efi_loader: support CTRL+\ - CTRL+_Heinrich Schuchardt
In the extended text input protocol support input of control letters 0x1c - 0x1f. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-09-03efi_loader: compliance Simple Text Input Ex ProtocolHeinrich Schuchardt
We cannot expect the buffers passed to the input protocols to be zero filled. If only modifier keys are pressed, we have to return EFI_NOT_READY but we still have to fill the key structure. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-09-03efi_loader: printing UEFI revision in helloworld.efiHeinrich Schuchardt
We need to support multiple digits in the parts of the UEFI verision number. E.g. EFI_SPECIFICATION_VERSION = (123 << 16) | 456 must be printed as 123.45.6 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-02Merge tag 'efi-2022-10-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-10-rc4 Documentation: * add a page on sending patches * bindings for FWU Metadata mtd storage * fpio status output fields description UEFI: * ensure all block devices are probed
2022-09-01dt/bindings: Add bindings for FWU Metadata mtd storageSughosh Ganu
Add bindings needed for accessing the FWU metadata regions. These include the compatible string which point to the access method, the actual device which stores the FWU metadata and the offsets for both metadata regions. The current patch adds basic bindings needed for accessing the metadata structure on non-GPT mtd regions. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-09-01github: Update PR template for new "Patches" contentTom Rini
The old "Patches" wiki page is not available anymore. Now that the content has been integrated with the submitting_patches document, reference that instead. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-01doc: process, sending_patches: Update and correct the old "Patches" contentTom Rini
- Use gender-neutral language to refer to the user, consistently. - Reference the checkpatch document. - Move the section on commit message tags to the process document and reference this in sending_patches.rst. - Reword the custodian workflow process section to refer to this new section, integrate some of the wording from there in this new section. - Update the comment about GPLv2 applying to August 2022, to be clear this still is correct. - Reword the section about MAKEALL to talk about local build testing and link to the CI document. - Reference the system_configuration document for the note about modifying existing code. - Reword the patchwork flow section. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-01doc: sending_patches.rst: Incorporate the old "Patches" wiki contentTom Rini
Import as-is much of the old "Patches" wiki page to the current sending_patches.rst file. This means we need to move patman to being included in the higher level ToC and add a reference for "Custodians" in the process document. A very minimal amount of content changing and rewording is done here as part of the import, in order to make the conversion easier. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-01doc: Add gpio status output fields descriptionPatrice Chotard
Add gpio status output fields description and one output example. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tweak the formatting. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-09-01efi_loader: ensure all block devices are probedHeinrich Schuchardt
Only probed block devices are available in the UEFI sub-system. Multiple block devices may be involved in the boot process. So we have to make sure that all block devices are probed. Another reason is that we store UEFI variables on the ESP which may be on any block device. On the sandbox before the patch: => efidebug devices No EFI system partition Device Device Path ================ ==================== 000000001b027c70 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b) 000055d078bc1ae0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Uart(0,0,D,D) 000000001b22e0b0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/MAC(020011223344,1) After the patch: => efidebug devices No EFI system partition Device Device Path ================ ==================== 000000001b027c70 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b) 000055bdac8ddae0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Uart(0,0,D,D) 000000001b230920 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0) 000000001b233ac0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1) 000000001b233b80 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(1,GPT,d0a914ee-a71c-fc1e-73f0-7e302b0e6c20,0x30,0x1) 000000001b234110 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(2,GPT,9330a0ea-8aff-f67a-294c-fa05d60896c3,0x31,0x1) 000000001b22f0e0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(2) 000000001b238df0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/MAC(020011223344,1) Fixes: a9bf024b2933 ("efi_loader: disk: a helper function to create efi_disk objects from udevice") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-08-31Merge branch '2022-08-31-assorted-fixes'Tom Rini
- Assorted bugfixes including re-working the i2c command CVE and fixing some TI reference platforms with different EEPROMs.
2022-08-31arm: smh: Fix uninitialized parameters with newer GCCsSean Anderson
Newer versions of GCC won't initialize parts of structures which don't appear to be used. This results in uninitialized semihosting parameters passed via R1. Fix this by marking the inline assembly as clobbering memory. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-08-31tools: mkimage: fix build with recent LibreSSLMark Kettenis
LibreSSL 3.5.0 and later (also shipped as part of OpenBSD 7.1 and and later) have an opaque RSA object and do provide the RSA_get0_* functions that OpenSSL provides. Fixes: 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL") Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
2022-08-31bootm: Fix upper bound of FDT overlap checksPali Rohár
FTD blob can be put immediately after the OS image. So use strict inequality for start address check. Fixes: fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31image-fit: don't set compression if it can't be readDaniel Golle
fit_image_get_comp() should not set value -1 in case it can't read the compression node. Instead, leave the value untouched in that case as it can be absent and a default value previously defined by the caller of fit_image_get_comp() should be used. As a result the warning message WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file! no longer shows if the compression node is actually absent. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31bootm: fix typo imape_comp -> image_compDaniel Golle
Change variable name 'imape_comp' to the supposedly intended name 'image_comp'. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31corenet_ds.h: RemoveTom Rini
This was missed when removing the platform. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31i2c: fix stack buffer overflow vulnerability in i2c md commandMarek Vasut
This reinstates fix from commit 8f8c04bf1ebb ("i2c: fix stack buffer overflow vulnerability in i2c md command") without the changes unrelated to the actual fix. Avoid the underflow by setting only nbytes and linebytes as unsigned integers. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Nicolas Iooss <nicolas.iooss+uboot@ledger.fr> Cc: Simon Glass <sjg@chromium.org> Cc: Tim Harvey <tharvey@gateworks.com> Acked-by: Tim Harvey <tharvey@gateworks.com>
2022-08-31Revert "i2c: fix stack buffer overflow vulnerability in i2c md command"Marek Vasut
This reverts commit 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409. The commit is largely wrong and breaks most of i2c command functionality. The problem described in the aforementioned commit commit message is valid, however the commit itself does many more changes unrelated to fixing that one problem it describes. Those extra changes, namely the handling of i2c device address length as unsigned instead of signed integer, breaks the expectation that address length may be negative value. The negative value is used by DM to indicate that address length of device does not change. The actual bug documented in commit 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409 can be fixed by extra sanitization in separate patch. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Nicolas Iooss <nicolas.iooss+uboot@ledger.fr> Cc: Simon Glass <sjg@chromium.org> Cc: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31spl: ahci: Fix dependency for SPL_AHCI_PCIOleksandr Suvorov
The option SPL_SATA_SUPPORT is renamed to SPL_SATA. Fix the option name. Fixes: 73059529b20 ("ata: ahci-pci: Add new option CONFIG_SPL_AHCI_PCI") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Acked-by: Pali Rohár <pali@kernel.org>
2022-08-31fs: fix comment typoRoger Knecht
Fix typo in include/fs.h Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-08-31kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingleHeiko Thiery
When compiling executables from a single.c file, the linker is also invoked. Pass the flags like the other linker commands. cherry-pick kbuild change from Linux: 63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables) Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31board: ti: common: board_detect: Fix EEPROM read quirkMatwey V. Kornilov
There are three different kinds of EEPROM possibly present on boards. 1. 1byte address. For those we should avoid 2byte address in order not to rewrite the data. Second byte of the address can potentially be interpreted as the data to write. 2. 2byte address with defined behaviour. When we try to use 1byte address they just return "FF FF FF FF ... FF" 3. 2byte address with undefined behaviour (for instance, 24LC32AI). When we try to use 1byte address, then their internal read pointer is changed to some value. Subsequential reads may be broken. To gracefully handle both case #1 and case #3 we read all required data from EEPROM at once (about 80 bytes). So either all the data is valid or we fallback to 2byte address. Cc: Nishanth Menon <nm@ti.com> Fixes: a58147c2dbbf ("board: ti: common: board_detect: Do 1byte address checks first.") Reference: https://lore.kernel.org/all/CAJs94Ebdd4foOjhGFu9Bop0v=B1US9neDLxfhgcY23ukgLzFOQ@mail.gmail.com/ Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> Acked-by: Nishanth Menon <nm@ti.com>
2022-08-31gitlab-ci: Update comment about the DockerfileJoel Stanley
It's found in the u-boot tree now. Signed-off-by: Joel Stanley <joel@jms.id.au>
2022-08-31common/console.c: prevent pre-console buffer contents from being added to itselfRasmus Villemoes
I do not have any non-serial output devices, so a print_pre_console_buffer(PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL) does nothing for me. However, I was manually inspected the pre-console buffer using md.b, and I noticed that the early part of it was repeated. The reason is that the first call of print_pre_console_buffer(), from console_init_f(), ends up invoking puts() with the contents of the buffer at that point, and puts() at that point ends up in the else branch of if (gd->flags & GD_FLG_DEVINIT) { /* Send to the standard output */ fputs(stdout, s); } else { /* Send directly to the handler */ pre_console_puts(s); serial_puts(s); } so indeed the contents is added again. That can be somewhat confusing (both when reading the buffer manually, but also if it did actually come out on some device). So disable all use of the pre-console buffer while print_pre_console_buffer() is emitting it. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-27Merge tag 'dm-pull-26aug22' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm binman/patman documentation improvements other minor fixes
2022-08-27Merge branch '2022-08-26-assorted-fixes'Tom Rini
- PCIe, NVMe and 2 UBIFS related fixes
2022-08-26distroboot: ubifs: Add support for specifying UBI header offsetPali Rohár
Some UBI partitions may use non-standard UBI header offset. For attaching these UBI partitions it is required to pass second argument with offset to "ubi part" command. Therefore extend distroboot to allow specifying additional optional 6th argument with UBI header offset. This offset is set in new distroboot variable ${bootubioff} which may be used by distroboot script to e.g. properly pass this value to linux kernel command line for proper mounting of rootfs by kernel. This variable is set to empty string (cleared) when UBI header offset is not specified into distroboot BOOT_TARGET_DEVICES macro. Usage of helper macro BOOTENV_DEV_UBIFS_BOOTUBIOFF in this change is there as a type check. It ensures that in BOOT_TARGET_DEVICES macro was specified UBIFS func with either 5 or 6 arguments. If not then cpp throws compile error. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-08-26Rename disto_[pxe_]getfile to distro_[pxe_]getfileDario Binacchi
Replace 'disto' with 'distro' since they are all functions about distro booting. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-08-26vbe: Enable command only with BOOTSTD_FULLSimon Glass
Avoid enabling this command by default. This saves about 1KB of code space. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-08-26binman: Sort tests and rework test-file numbersStefan Herbrechtsmeier
Tests should be in order of the test-file numbers. Sort the tests according to the test-file numbers and rework the test-file numbers to eliminate duplicate numbers. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-26binman: Document how to handle dependent imagesSimon Glass
Binman does not support this properly at present. Add documentation about it including a work-around. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-26binman: Mention split-elf in the main docsSimon Glass
Since we are talking about ATF, add mention of this new feature too. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-26patman: Tidy up unnecessary blank lines and numbersSimon Glass
Quite a few blank lines are not needed here. Drop these and use the # mechanism to number paragraphs. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-26patman: Fix version tableSimon Glass
One of the changes to the version table was made by mistake. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-26boot: simplify bootmeth_vbe_simple_ft_fixup()Heinrich Schuchardt
Don't assign a value to a variable if it is not used afterwards. Move variables to the code fragment where they are used. Addresses-Coverity: CID 356243 ("Code maintainability issues (UNUSED_VALUE)") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-26boot: fix vbe_find_first_device()Heinrich Schuchardt
uclass_find_first_device() may return NULL if no device for the uclass exists. Handle this case gracefully. Addresses-Coverity: CID 356244 ("Null pointer dereferences (FORWARD_NULL)") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-26dm: core: fix a typo in help textSergei Antonov
Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-26doc: Build documentation in parallelSimon Glass
With the addition of the revision stats this now takes over a minute. Use a parallel build to reduce it a bit (24 seconds for me). Series-changes; 2 - Use '-j auto' instead Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-26disk: part: remove dependency to ubifs for splStefan Herbrechtsmeier
The spl doesn't support ubifs and thereby doesn't provide the ubifs_is_mounted function. Remove the dependency to ubifs for the spl. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>