aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"WIP/20May2024-nextTom Rini80-87/+30
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini80-30/+87
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06global: Make <asm/global_data.h> include <asm/u-boot.h>Tom Rini8-8/+0
This follows the example of RISC-V where <asm/global_data.h> includes <asm/u-boot.h> directly as "gd" includes a reference to bd_info already and so the first must include the second anyhow. We then remove <asm/u-boot.h> from all of the places which include references to "gd" an so have <asm/global_data.h> already. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06common: Remove <common.h> and add needed includesTom Rini80-80/+31
Remove <common.h> from all "commmon/" files and when needed add missing include files directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-21rockchip: Enable preconsole for rk3328Jagan Teki1-1/+1
Enable and set the start address of pre-console buffer for RK3328. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2024-04-14Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini2-3/+126
2024-04-12Merge patch series "mcheck implementation for U-Boot"Tom Rini3-25/+437
Eugene Uriev <eugeneuriev@gmail.com> says: There was no "mcheck" for U-Boot before. Since U-Boot has only 1 thread, and normally makes 4000+ - 6000+ mallocs, it's better to use havier canaries to protect heap-chunks. My variant uses 2x8 = 16byte-long protector. And the multiplier could be changed to tune speed/protection tradeoff. This protects not only against memset()-s, but against "near" wild pointers too, and makes more probable to catch "distant" ones. The core file of the set is included into the C-file, not complied separately in order to enable (potential) coexisting of mcheck-protectors, e.g. malloc_simple(.) and dlmalloc simultaneously. My tests were for ARM SoC, 64bit, so the patch is aware of alignment. Primary this patch is for using by developers: to verify, if a change doesn't break the heap integrity. By default the mcheck is disabled and wouldn't affect the boot. I used pedantic mode, canary=16byte, registry-size=6608. For my system the overhead was 230ms.
2024-04-12mcheck: let mcheck_abortfunc_t print the pointerEugene Uriev1-8/+8
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: add stats, add a comment with test resultsEugene Uriev1-1/+17
My tests have been run on an U-Boot (of older version) for ARM (64bits). Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: introduce mcheck_on_ramrelocation(.)Eugene Uriev2-0/+15
The using of pre-reloc/malloc_simple heap is too hard to follow after the relocation. So lets drop it from the pedantic registry and switch to dlmalloc, when moved. The offset is ignored, but kept in the API for the probable case, when that early heap is relocated too. Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: add pedantic mode supportEugene Uriev2-0/+53
The pedantic mode is run-time contolled, so appropriate registry take place everytime. Maybe it's worth to use compile-time control only. So, the registry could be optimized out by an #ifdef. Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: support memalignEugene Uriev2-3/+24
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: integrate mcheck into dlmalloc.cEugene Uriev1-0/+67
This changes are probable worth to be generalized in a separate .h-file so, making it able to cover libc-mallocs and others, without too much copy-paste. But the malloc<=>mALLOc substitutions interfere with an elegant way to do this. Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: introduce essentials of mcheckEugene Uriev1-0/+220
The core part of mcheck, but without memalign. memalign - to be added in ensuing commits. Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: Use memset/memcpy instead of MALLOC_ZERO/MALLOC_COPY for mcheck.Eugene Uriev1-0/+4
These fast helpers sometimes breach mem-chunk boundaries. Thus they trigger mcheck alarm. Standard ones are accurate though. Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12mcheck: prepare +1 tier for mcheck-wrappers, in dl-*alloc commandsEugene Uriev1-25/+41
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
2024-04-12cli: always show cursorHeinrich Schuchardt1-0/+4
We may enter the command line interface in a state where on the remote console the cursor is not shown. Send an escape sequence to enable it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-12usb: kbd: Add probe quirk for Apple and Keychron keyboardsJanne Grunau1-0/+22
Those keyboards do not return the current device state. Polling will timeout unless there are key presses. This is not a problem during operation but the initial device state query during probing will fail. Skip this step in usb_kbd_probe_dev() to make these devices useable. Not all Apple keyboards behave like this. A keyboard with USB vendor/product ID 05ac:0221 is reported to work with the current code. Unfortunately some Keychron keyboards "re-use" Apple's vendor ID and show the same behavior (Keychron C2, 05ac:024f for example). Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net>
2024-04-12usb: kbd: support Apple Magic Keyboards (2021)Janne Grunau1-3/+34
Apple USB keyboards (Magic Keyboard from 2021 (product id 0x029c)) carry the HID keyboard boot protocol on the second interface descriptor. Probe via vendor and product IDs since the class/subclass/protocol match uses the first interface descriptor. Probe the two first interface descriptors for the HID keyboard boot protocol. USB configuration descriptor for reference: | Bus 003 Device 002: ID 05ac:029c Apple, Inc. Magic Keyboard | Device Descriptor: | bLength 18 | bDescriptorType 1 | bcdUSB 2.00 | bDeviceClass 0 [unknown] | bDeviceSubClass 0 [unknown] | bDeviceProtocol 0 | bMaxPacketSize0 64 | idVendor 0x05ac Apple, Inc. | idProduct 0x029c Magic Keyboard | bcdDevice 3.90 | iManufacturer 1 Apple Inc. | iProduct 2 Magic Keyboard | iSerial 3 ... | bNumConfigurations 1 | Configuration Descriptor: | bLength 9 | bDescriptorType 2 | wTotalLength 0x003b | bNumInterfaces 2 | bConfigurationValue 1 | iConfiguration 4 Keyboard | bmAttributes 0xa0 | (Bus Powered) | Remote Wakeup | MaxPower 500mA | Interface Descriptor: | bLength 9 | bDescriptorType 4 | bInterfaceNumber 0 | bAlternateSetting 0 | bNumEndpoints 1 | bInterfaceClass 3 Human Interface Device | bInterfaceSubClass 0 [unknown] | bInterfaceProtocol 0 | iInterface 5 Device Management | HID Device Descriptor: | bLength 9 | bDescriptorType 33 | bcdHID 1.10 | bCountryCode 0 Not supported | bNumDescriptors 1 | bDescriptorType 34 Report | wDescriptorLength 83 | Report Descriptors: | ** UNAVAILABLE ** | Endpoint Descriptor: | bLength 7 | bDescriptorType 5 | bEndpointAddress 0x81 EP 1 IN | bmAttributes 3 | Transfer Type Interrupt | Synch Type None | Usage Type Data | wMaxPacketSize 0x0010 1x 16 bytes | bInterval 8 | Interface Descriptor: | bLength 9 | bDescriptorType 4 | bInterfaceNumber 1 | bAlternateSetting 0 | bNumEndpoints 1 | bInterfaceClass 3 Human Interface Device | bInterfaceSubClass 1 Boot Interface Subclass | bInterfaceProtocol 1 Keyboard | iInterface 6 Keyboard / Boot | HID Device Descriptor: | bLength 9 | bDescriptorType 33 | bcdHID 1.10 | bCountryCode 13 International (ISO) | bNumDescriptors 1 | bDescriptorType 34 Report | wDescriptorLength 207 | Report Descriptors: | ** UNAVAILABLE ** | Endpoint Descriptor: | bLength 7 | bDescriptorType 5 | bEndpointAddress 0x82 EP 2 IN | bmAttributes 3 | Transfer Type Interrupt | Synch Type None | Usage Type Data | wMaxPacketSize 0x0010 1x 16 bytes | bInterval 8 Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net>
2024-04-12usb: Add environment based device ignorelistJanne Grunau1-0/+70
Add the environment variable "usb_ignorelist" to prevent USB devices listed in it from being bound to drivers. This allows to ignore devices which are undesirable or trigger bugs in u-boot's USB stack. Devices emulating keyboards are one example of undesirable devices as u-boot currently supports only a single USB keyboard device. Most commonly, people run into this with Yubikeys, so let's ignore those in the default environment. Based on previous USB keyboard specific patches for the same purpose. Link: https://lore.kernel.org/u-boot/7ab604fb-0fec-4f5e-8708-7a3a7e2cb568@denx.de/ Reviewed-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Janne Grunau <j@jannau.net>
2024-04-02Merge branch 'next'Tom Rini9-45/+119
Merge in all changes from the next branch now that the release is out.
2024-03-26spl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDRRandolph1-1/+1
When Falcon Mode is enabled on RISC-V, use CONFIG_VAL to check PAYLOAD_ARGS_ADDR, not CONFIG_IS_ENABLED. Fixes: 10c4ab898c25 ("spl: riscv: falcon: move fdt blob to specified address") Signed-off-by: Randolph <randolph@andestech.com> Tested-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-03-20test: dm: add button_cmd testWIP/20Mar2024-nextCaleb Connolly1-1/+1
Add a test for the button_cmd feature. This validates that commands can be mapped to two buttons, that the correct command runs based on which button is pressed, that only 1 command is run, and that no command runs if button_cmd_0_name is wrong or unset. Additionally, fix a potential uninitialised variable use caught by these tests, the btn variable in get_button_cmd() is assumed to be null if button_get_by_label() fails, but it's actually used uninitialised in that case. CONFIG_BUTTON is now enabled automatically and was removed when running save_defconfig. Fixes: e761035b6423 ("boot: add support for button commands") Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-03-20spl: Improve error message for SPL memory allocationLeo Yu-Chi Liang1-1/+6
There could be two memory allocation scheme in SPL phase. Explicitly print the corresponding error message. Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-03-13cli: allow users to determine history buffer allocation methodHanyuan Zhao1-11/+25
This commit allows users to choose the appropriate memory allocation method between static allocated and dynamically calloc. The previous static-array way will not obviously contribute to the final binary size since it is uninitialized, and might have better performance than the dynamical one. Now we provide the users with both the two options. Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>
2024-03-13cli: panic when failed to allocate memory for the history bufferHanyuan Zhao1-1/+1
This commit simply modifies the history initialize function, replacing the return value by panic with reasons. The calling chains of hist_init don't have steps explicitly throwing or dealing with the ENOMEM error, and once the init fails, the whole system is died. Using panic here to provide error information instead. Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>
2024-03-07cmd: md5sum: use hash_commandIgor Opaniuk1-3/+5
Drop old implementation and use hash_command() instead, as how it's currently done for crc32 and sha1sum cmds. Test: => md5sum 0x60000000 0x200 md5 for 60000000 ... 600001ff ==> e6bbbe95f5b41996f4a9b9af7bbd4050 Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2024-03-07autoboot: Add check for result of malloc_cache_aligned()Maks Mishin1-0/+3
Return value of a function 'malloc_cache_aligned' is dereferenced at autoboot.c:207 without checking for NULL, but it is usually checked for this function. Found by RASU JSC. Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
2024-03-02log: fixup log_head after relocating global dataThomas Weißschuh2-0/+8
When `gd` is relocated during `spl_relocate_stack_gd()` the doubly-linked circular list in the `log_head` member is broken. The last element of the list should point back to the initial `list_head`, but as the initial `list_head` is moved the pointer becomes stale. As a result the loop in `log_dispatch` would never finish. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
2024-03-01common: board_f: change calculation of gd->mon_len to fix s5p4418 relocStefan Bosch1-1/+3
ARCH_NEXELL: Change calculation of monitor length (gd->mon_len) to fix relocation at boards with s5p4418-SoC (ARCH_NEXELL). At s5p4418, _start is after the header (NSIH). Therefore the monitor length has to be calculated using __image_copy_start instead of _start in order the whole monitor code is relocated. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
2024-02-29Merge patch series "Handoff bloblist from previous boot stage"Tom Rini2-27/+67
Raymond Mao <raymond.mao@linaro.org> says: This patch set adds/adapts a few bloblist APIs and implements Arm arch custom function to retrieve the bloblist (aka. Transfer List) from previous loader via boot arguments when BLOBLIST option is enabled and all boot arguments are compliant to the register conventions defined in the Firmware Handoff spec v0.9. If an arch wishes to have different behaviors for loading bloblist from the previous boot stage, it is required to implement the custom function xferlist_from_boot_arg().
2024-02-29bloblist: Load the bloblist from the previous loaderRaymond Mao1-18/+44
During bloblist initialization, load the bloblist via boot arguments from the previous loader. If a valid bloblist exists in boot arguments, relocate it into the fixed bloblist memory region. If not, fallback to support BLOBLIST_ADDR or BLOBLIST_ALLOC. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-02-29bloblist: refactor of bloblist_reloc()Raymond Mao2-8/+11
The current bloblist pointer and size can be retrieved from global data, so we don't need to pass them from the function arguments. This change also help to remove all external access of gd->bloblist outside of bloblist module. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-29bloblist: check bloblist with specified buffer sizeRaymond Mao1-1/+1
Instead of expecting the bloblist total size to be the same as the pre-allocated buffer size, practically we are more interested in whether the pre-allocated buffer size is bigger than the bloblist total size. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-29bloblist: add API to check the register conventionsRaymond Mao1-0/+11
Add bloblist_check_reg_conv() to check whether the bloblist is compliant to the register conventions defined in Firmware Handoff specification. This API can be used for all Arm platforms. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-02-19common: usb-hub: Reset USB 3.0 hubs onlyShantur Rathore1-2/+4
Additional testing of the changes introduced in commit 33e06dcbe57a "common: usb-hub: Reset hub port before scanning") revealed that some USB 2.0 and 3.0 flash drives didn't work in U-Boot on some Allwinner SoCs that support USB 2.0 interfaces only. More precisely, some of the tested USB 2.0 and 3.0 flash drives failed to be detected and work on an OrangePi Zero 3, based on the Allwinner H616 SoC that supports USB 2.0 only, while the same USB flash drives worked just fine on a Pine64 H64, based on the Allwinner H6 SoC that supports both USB 2.0 and USB 3.0 interfaces. The USB ID of the above-mentioned USB 3.0 flash drive that failed to work is 1f75:0917 (Innostor Technology Corporation IS917 Mass storage), it is 32 GB in size and sold under the PNY brand. The mentioned USB 2.0 drive is some inexpensive no-name drive with an invalid USB ID. Resetting USB 3.0 hubs only, which this patch introduces to the USB hub resets, has been tested to work as expected, resolving the identified issues on the Allwinner H616, while not introducing any new issues on other tested Allwinner SoCs. Thus, let's fix it that way. According to the USB 3.0 specification, resetting a USB 3.0 port is required when an attached USB device transitions between different states, such as when it resumes from suspend. Though, the Linux kernel performs additional USB 3.0 port resets upon initial USB device attachment, as visible in commit 07194ab7be63 ("USB: Reset USB 3.0 devices on (re)discovery") in the kernel source, to ensure proper state of the USB 3.0 hub port and proper USB mode negotiation during the initial USB device attachment and enumeration. These additional types of USB port resets don't exist for USB 2.0 hubs, according the USB 2.0 specification. The resets seem to be added to the USB 3.0 specification as part of the port and device mode negotiation. The Linux kernel resets USB 3.0 (i.e. SuperSpeed) hubs only, as visible in commit 10d674a82e55 ("USB: When hot reset for USB3 fails, try warm reset.") in the kernel source. The check for SuperSpeed hubs is performed in a way that also applies to newer SuperSpeed Plus (USB 3.1 or 3.2) hubs as well, which hopefully makes it future proof. Fixes: 33e06dcbe57a ("common: usb-hub: Reset hub port before scanning") Link: https://lore.kernel.org/u-boot/20240207102327.35125-1-i@shantur.com/T/#u Link: https://lore.kernel.org/u-boot/20240201164604.13315fa6@donnerap.manchester.arm.com/T/#u Signed-off-by: Shantur Rathore <i@shantur.com> Helped-by: Dragan Simic <dsimic@manjaro.org> Tested-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Marek Vasut <marex@denx.de>
2024-02-15common: avb_verify: add str_avb_io_error/str_avb_slot_errorIgor Opaniuk1-0/+49
Introduce str_avb_io_error() and str_avb_slot_error() functions, that provide a pointer to AVB runtime error message. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Link: https://lore.kernel.org/r/20240209192045.3961832-6-igor.opaniuk@foundries.io Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-02-15common: avb_verify: rework error/debug printsIgor Opaniuk1-13/+18
Make error prints more verbose with additional context. Also s/print/debug/g for prints, which might be relevant only for debugging purposes. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Link: https://lore.kernel.org/r/20240209192045.3961832-4-igor.opaniuk@foundries.io Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-02-15avb: move SPDX license identifiers to the first lineIgor Opaniuk1-2/+1
Move SPDX license identifiers to the first line, so it conforms to license placement rule [1]: Placement: The SPDX license identifier in kernel files shall be added at the first possible line in a file which can contain a comment. For the majority of files this is the first line, except for scripts which require the '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX identifier goes into the second line. [1] https://www.kernel.org/doc/Documentation/process/license-rules.rst Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Link: https://lore.kernel.org/r/20240209192045.3961832-3-igor.opaniuk@foundries.io Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-02-15common: avb_verify: don't call mmc_switch_part for SDIgor Opaniuk1-3/+5
mmc_switch_part() is used for switching between hw partitions on eMMC (boot0, boot1, user, rpmb). There is no need to do that for SD card. This fixes the avb command usage on SD cards. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/20240209192045.3961832-2-igor.opaniuk@foundries.io Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-02-13boot: add support for button commandsCaleb Connolly3-0/+87
With the relatively new button API in U-Boot, it's now much easier to model the common usecase of mapping arbitrary actions to different buttons during boot - for example entering fastboot mode, setting some additional kernel cmdline arguments, or booting with a custom recovery ramdisk, to name a few. Historically, this functionality has been implemented in board code, making it fixed for a given U-Boot binary and requiring the code be duplicated and modified for every board. Implement a generic abstraction to run an arbitrary command during boot when a specific button is pressed. The button -> command mapping is configured via environment variables with the following format: button_cmd_N_name=<button label> button_cmd_N=<command to run> Where N is the mapping number starting from 0. For example: button_cmd_0_name=vol_down button_cmd_0=fastboot usb 0 This will cause the device to enter fastboot mode if volume down is held during boot. After we enter the cli loop the button commands are no longer valid, this allows the buttons to additionally be used for navigating a boot menu. Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Tegra30 Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-02-07Merge branch '2024-02-06-assorted-fixes'Tom Rini1-1/+4
A number of assorted fixes
2024-02-06common: event: check event_type_name() argumentHeinrich Schuchardt1-1/+4
In event_type_name() we should avoid possible buffer overruns by checking the type argument. Addresses-Coverity-ID: 478862 Out-of-bounds access Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-04spl: Make SPL_STACK available for ROCKCHIP_RK3036 without spl frameworkKever Yang1-1/+2
rk3036 soc has limit internal sram, and not able to support spl framework. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-31spl: riscv: falcon: move fdt blob to specified addressRandolph2-1/+16
In Falcon Boot mode, the fdt blob should be move to the RAM from kernel BSS section. To avoid being cleared by BSS initialisation. SPL_PAYLOAD_ARGS_ADDR is the address where SPL copies. Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-29common: splash_source: Don't compile ubifs splash cmd for SPL buildDevarsh Thakkar1-1/+1
Don't compile ubifs splash mount command for SPL build as this command is not supported (and also not enabled) during SPL stage. This fixes below compilation error, when CONFIG_CMD_UBIFS is enabled in defconfig along with splash screen enabled at SPL stage: "aarch64-none-linux-gnu-ld.bfd: common/cli.o: in function `run_command': u-boot-next/u-boot/common/cli.c:51: undefined reference to `parse_string_outer' u-boot-next/u-boot/common/cli.c:51:(.text.run_command+0x10): relocation truncated to fit: R_AARCH64_JUMP26 against undefined symbol `parse_string_outer' make[2]: *** [u-boot-next/u-boot/scripts/Makefile.spl:527: spl/u-boot-spl] Error 1 make[1]: *** [u-boot-next/u-boot/Makefile:2053: spl/u-boot-spl] Error 2 make[1]: Leaving directory 'u-boot-next/u-boot/out/a53' make: *** [Makefile:177: sub-make] Error 2" Fixes: eb9217dc03 ("common: Enable splash functions at SPL") Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
2024-01-29Merge patch series "Move framebuffer reservation for SPL to RAM end"Tom Rini2-5/+55
Devarsh Thakkar <devarsht@ti.com> says: Move video memory reservation for SPL at end of RAM so that it does not interefere with reservations for next stage so that the next stage need not have holes in between for passed regions and instead it can maintain continuity in reservations. Also catch the bloblist before starting reservations to avoid the same problem. While at it, also fill missing fields in video handoff struct before passing it to next stage. This is as per discussions at : For moving SPL framebuffer reservation at end of RAM: https://lore.kernel.org/all/CAPnjgZ3xSoe_G3yrqwuAvoiVjUfZ+YQgkOR0ZTVXGT9VK8TwJg@mail.gmail.com/ For filling missing video handoff fields : https://lore.kernel.org/all/CAPnjgZ1Hs0rNf0JDirp6YPsOQ5=QqQSP9g9qRwLoOASUV8a4cw@mail.gmail.com/
2024-01-29video: Skip framebuffer reservation if already reservedDevarsh Thakkar1-2/+6
Skip framebufer reservation if it was already reserved from previous stage and whose information was passed using a bloblist. Return error in case framebuffer information received from bloblist is invalid i.e NULL or empty. While at it, improve the debug message to make it more clear that address in discussion is of framebuffer and not bloblist and also match it with printing scheme followed in video_reserve function. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-29common/board_f: Catch bloblist before starting reservationsDevarsh Thakkar1-3/+30
Start reservations needed for init sequence only after catching bloblists from previous stage. This is to avoid catching bloblists in the middle causing gaps while u-boot is reserving. Adjust the relocaddr as per video hand-off information received from previous stage so that further reservations start only after regions reserved for previous stages Skip reservation for video memory if it was already filled by a bloblist. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-29spl: Enforce framebuffer reservation from end of RAMDevarsh Thakkar1-0/+19
Add an API which enforces framebuffer reservation from end of RAM. This is done so that next stage can directly skip this region before carrying out further reservations. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>