aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'u-boot-dfu-20241017' of ↵Tom Rini2024-10-171-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20241017 CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/22742 Usb Gadget: - Fix cdns3 endpoint configuration by setting maxpacket - Fix dwc3 cache handling when using DMA Fastboot: - Make AVB_VERIFY depends on FASTBOOT
| * Make AVB_VERIFY depend on FASTBOOTJerome Forissier2024-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | AVB_BUF_ADDR, which is under "if AVB_VERIFY", defaults to FASTBOOT_BUF_ADDR. Therefore AVB_VERIFY should depend on FASTBOOT. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Tom Rini <trini@konsulko.com> # Raspberry Pi 3 (32b, 64b, Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20241002144845.1439316-1-jerome.forissier@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
* | net: lwip: add DHCP support and dhcp commmandJerome Forissier2024-10-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb(). Note that PXE is likely non-fonctional with NET_LWIP (or at least not 100% functional) because DHCP option 209 is not supported by the lwIP library. Therefore, BOOTP_PXE_DHCP_OPTION cannot be enabled. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* | net: introduce alternative implementation as net/lwip/Jerome Forissier2024-10-162-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare the introduction of the lwIP (lightweight IP) TCP/IP stack by adding a new net/lwip/ directory and the NET_LWIP symbol. Network support is either NO_NET, NET (legacy stack) or NET_LWIP. Subsequent commits will introduce the lwIP code, re-work the NETDEVICE integration and port some of the NET commands and features to lwIP. SPL_NET cannot be enabled when NET_LWIP=y. SPL_NET pulls some symbols that are part of NET (such as arp_init(), arp_timeout_check(), arp_receive(), net_arp_wait_packet_ip()). lwIP support in SPL may be added later. Similarly, DFU_TFTP and FASTBOOT are not compatible with NET_LWIP because of dependencies on net_loop(), tftp_timeout_ms, tftp_timeout_count_max and other NET things. Let's add a dependency on !NET_LWIP for now. SANDBOX can select NET_LWIP but doing so will currently disable the eth dm tests as well as the wget tests which have strong dependencies on the NET code. Other adjustments to Kconfig files are made to fix "unmet direct dependencies detected" for USB_FUNCTION_SDP and CMD_FASTBOOT when the default networking stack is set to NET_LWIP ("default NET_LWIP" instead of "default NET" in Kconfig). The networking stack is now a choice between NO_NET, NET and NET_LWIP. Therefore '# CONFIG_NET is not set' should be 'CONFIG_NO_NET=y'. Adjust the defconfigs accordingly. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* | Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"WIP/11Oct2024Tom Rini2024-10-1113-99/+90
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Glass <sjg@chromium.org> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
| * | spl: Rename SPL_TPL_NAME and SPL_TPL_PROMPTSimon Glass2024-10-113-20/+20
| | | | | | | | | | | | | | | | | | Rename these to use the word PHASE instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | global: Rename SPL_TPL_ to PHASE_Simon Glass2024-10-114-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use PHASE_ as the symbol to select a particular XPL build. This means that SPL_TPL_ is no-longer set. Update the comment in bootstage to refer to this symbol, instead of SPL_ Signed-off-by: Simon Glass <sjg@chromium.org>
| * | global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass2024-10-116-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Complete this rename for all directories outside arch/ board/ drivers/ and include/ Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
| * | xpl: Rename spl_phase_prefix() and spl_phase_name()Simon Glass2024-10-111-3/+2
| | | | | | | | | | | | | | | | | | Use simpler names for these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | xpl: Rename spl_next_phase() and spl_prev_phase()Simon Glass2024-10-112-8/+8
| | | | | | | | | | | | | | | | | | Rename this to use the xpl prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | xpl: Rename spl_phase() to xpl_phase()Simon Glass2024-10-113-5/+5
| | | | | | | | | | | | | | | | | | Rename this function to indicate that it refers to any xPL phase. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | xpl: Rename spl_phase to xpl_phase_tSimon Glass2024-10-111-1/+1
| | | | | | | | | | | | | | | | | | This name fits better with the new naming scheme, so update it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | xpl: Rename u_boot_first_phase to xpl_is_first_phase()Simon Glass2024-10-112-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is a better name for this function, so update it. Tidy up the function comment to mention VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | serial: Make use of the SERIAL defineSimon Glass2024-10-111-9/+1
| | | | | | | | | | | | | | | | | | | | | This is always enabled for U-Boot proper, so simplify the condition in the common Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | Merge patch series "led: introduce LED boot and activity function"WIP/10Oct2024Tom Rini2024-10-101-8/+20
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christian Marangi <ansuelsmth@gmail.com> says: This series is a reworked version of the previous seried: misc: introduce STATUS LED activity function This series port and expand the legacy concept of LED boot from the legacy Status LED API to new LED API. One thing that many device need is a way to communicate to the user that the device is actually doing something. This is especially useful for recovery steps where an user (for example) insert an USB drive, keep a button pressed and the device autorecover. There is currently no way to signal the user externally that the bootloader is processing/recoverying aside from setting a LED on. A solid LED on is not enough and won't actually signal any kind of progress. Solution is the good old blinking LED but uboot doesn't suggest (and support) interrupts and almost all the LED are usually GPIO LED that doesn't support HW blink. Additional Kconfg are also introduced to set the LED boot and activity. Those are referenced by label. A documentation for old and these new LED API is created.
| * | common: board_r: rework BOOT LED handlingChristian Marangi2024-10-101-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework BOOT LED handling. There is currently one legacy implementation for BOOT LED from Status Led API. This work on ancient implementation used by BOOTP by setting the LED to Blink on boot and to turn it OFF when the firmware was correctly received by network. Now that we new LED implementation have support for LED boot, rework this by also set the new BOOT LED to blink and also set it to ON before entering main loop to confirm successful boot. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge branch 'next'Tom Rini2024-10-0732-388/+644
|\ \ \
| * \ \ Merge patch series "vbe: Series part D"Tom Rini2024-10-031-0/+12
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Glass <sjg@chromium.org> says: This includes various patches towards implementing the VBE abrec bootmeth in U-Boot.
| | * | | mmc: Add more debugging for SPLSimon Glass2024-10-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MMC booting fails it is sometimes hard to figure out what went wrong as there is no error code. It isn't even clear which MMC device was chosen, since SPL can have its own numbering. Add some debugging to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | | Merge patch series "arm: Initial support for Analog Devices SC5xx boards"Tom Rini2024-10-031-2/+15
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oliver Gaskell <Oliver.Gaskell@analog.com> says: ADSP-SC5xx is a series of ARM-based DSPs. This comprises the armv7 based SC57x, SC58x and SC594 series, and the armv8 based SC598. This patch series includes configurations, init code, and minimal DTs to enable Analog Devices' evaluation boards for these SoCs to boot through SPL and into U-Boot Proper, as well as devicetree schemas for the added DTs. This patch series depends on ("arm: Add Analog Devices SC5xx Machine Type") (https://lists.denx.de/pipermail/u-boot/2024-April/552043.html)
| | * | | arm: SC573-EZKIT initial supportOliver Gaskell2024-10-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Analog Devices' SC573-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
| | * | | arm: SC584-EZKIT initial supportOliver Gaskell2024-10-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Analog Devices' SC584-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Trevor Woerner <twoerner@gmail.com> Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
| | * | | arm: SC594-SOM-EZLITE initial supportOliver Gaskell2024-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Analog Devices' SC594-SOM-EZLITE board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
| | * | | arm: SC594-SOM-EZKIT initial supportOliver Gaskell2024-10-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Analog Devices' SC594-SOM-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Trevor Woerner <twoerner@gmail.com> Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Co-developed-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
| | * | | arm: SC598-SOM-EZKIT initial supportOliver Gaskell2024-10-031-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Analog Devices' SC598-SOM-EZKIT board. Includes: - CONFIG options common to all SC5xx SoCs - SoC specific configs in mach-sc5xx/Kconfig - SPL config options in common/spl/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Co-developed-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
| * | | | Merge patch series "Miscellaneous fixes"WIP/24Sep2024-nextTom Rini2024-09-242-22/+23
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jerome Forissier <jerome.forissier@linaro.org> says: Miscellaneous fixes made when developing the lwIP series [1]. They are posted separately since they make sense on their own. Subsequent versions of the lwIP series will contain a squashed version of this one. [1] http://patchwork.ozlabs.org/project/uboot/list/?series=420712&state=%2A&archive=both
| | * | | | common: update: UPDATE_COMMON implies CMD_TFTPBOOTJerome Forissier2024-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common/update.c (UPDATE_COMMON) depends on tftp_timeout_ms which is defined in cmd/tftp.c (CMD_TFTPBOOT). Therefore add the appropriate imply statement to Kconfig. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
| | * | | | flash: prefix error codes with FL_Jerome Forissier2024-09-241-22/+22
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
| * | | | spl: ram: hide SPL_RAM_SUPPORTJerome Forissier2024-09-241-6/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning: common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function] 19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
| * | | Merge patch series "Fix various bugs"WIP/18Sep2024-nextTom Rini2024-09-183-68/+43
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Glass <sjg@chromium.org> says: This series includes the patches needed to make make the EFI 'boot' test work. That test has now been split off into a separate series along with the EFI patches. This series fixes these problems: - sandbox memory-mapping conflict with PCI - the fix for that causes the mbr test to crash as it sets up pointers instead of addresses for its 'mmc' commands - the mmc and read commands which cast addresses to pointers - a tricky bug to do with USB keyboard and stdio - a few other minor things
| | * | | dm: usb: Deal with USB keyboard persisting across testsSimon Glass2024-09-182-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear any USB-keyboard devices before running a unit test, to avoid using a stale udevice pointer in stdio. Add a long comment to explain this situation and why this solution seems best, at least for now. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | usb: Add DEV_FLAGS_DM to stdio for USB keyboardSimon Glass2024-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device contains a pointer to struct udevice so set the flag indicating that, just to be tidy. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | log: Add a new log category for the consoleSimon Glass2024-09-182-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new category which covers the console, including the stdio drivers. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | usb: Drop old non-DM codeSimon Glass2024-09-181-67/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver model deadline for USB was in 2019, so drop the old USB keyboard code, to avoid needing to deal with the extra code path. Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | | Merge tag 'v2024.10-rc5' into nextTom Rini2024-09-161-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Prepare v2024.10-rc5
| * \ \ \ \ Merge patch series "Bump new hush commits and fix old hush test behavior"WIP/13Sep2024-nextTom Rini2024-09-132-54/+98
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Francis Laniel <francis.laniel@amarulasolutions.com> says: Hi! With this series, I bumped the new hush to get the latest commits from upstream. Also, I added back a reverted commit which goal was to fix a bad behavior in old hush test. I had to tweak a bit this commit, but everything worked both locally and in the CI.
| | * | | | | cli: modern_hush: Add upstream commits up to 13 July 2024Francis Laniel2024-09-132-54/+98
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the following hush busybox upstream commits: 23da5c4b716b ("hush: do not exit interactive shell on some redirection errors") 14e28c18ca1a ("hush: fix "exec 3>FILE" aborting if 3 is exactly the next free fd") 6c38d0e9da2d ("hush: avoid duplicate fcntl(F_SETFD, FD_CLOEXEC) during init") 758b21402abc ("hush: detect when terminating "done"/"fi" is missing") 2639f3bc72ac ("hush: set G.ifs sooner (prevents segfault)") Adding specific ifdef and endif guard was needed for 2639f3bc72ac. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
| * | | | | include: export uuid.hCaleb Connolly2024-09-121-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move this header to include/u-boot/ so that it can be used by external tools. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
| * | | | Merge patch series "provide names for emmc hardware partitions"Tom Rini2024-09-051-2/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tim Harvey <tharvey@gateworks.com> says: Modern eMMC v4+ devices have multiple hardware partitions per the JEDEC specification described as: Boot Area Partition 1 Boot Area Partition 2 RPMB Partition General Purpose Partition 1 General Purpose Partition 2 General Purpose Partition 3 General Purpose Partition 4 User Data Area These are referenced by fields in the PARTITION_CONFIG register (Extended CSD Register 179) which is defined as: bit 7: reserved bit 6: BOOT_ACK 0x0: No boot acknowledge sent (default 0x1: Boot acknowledge sent during boot operation Bit bit 5:3: BOOT_PARTITION_ENABLE 0x0: Device not boot enabled (default) 0x1: Boot Area partition 1 enabled for boot 0x2: Boot Area partition 2 enabled for boot 0x3-0x6: Reserved 0x7: User area enabled for boot bit 2:0 PARTITION_ACCESS 0x0: No access to boot partition (default) 0x1: Boot Area partition 1 0x2: Boot Area partition 2 0x3: Replay Protected Memory Block (RPMB) 0x4: Access to General Purpose partition 1 0x5: Access to General Purpose partition 2 0x6: Access to General Purpose partition 3 0x7: Access to General Purpose partition 4 Note that setting PARTITION_ACCESS to 0x0 results in selecting the User Data Area partition. You can see above that the two fields BOOT_PARTITION_ENABLE and PARTITION_ACCESS do not use the same enumerated values. U-Boot uses a set of macros to access fields of the PARTITION_CONFIG register: EXT_CSD_BOOT_ACK_ENABLE (1 << 6) EXT_CSD_BOOT_PARTITION_ENABLE (1 << 3) EXT_CSD_PARTITION_ACCESS_ENABLE (1 << 0) EXT_CSD_PARTITION_ACCESS_DISABLE (0 << 0) EXT_CSD_BOOT_ACK(x) (x << 6) EXT_CSD_BOOT_PART_NUM(x) (x << 3) EXT_CSD_PARTITION_ACCESS(x) (x << 0) EXT_CSD_EXTRACT_BOOT_ACK(x) (((x) >> 6) & 0x1) EXT_CSD_EXTRACT_BOOT_PART(x) (((x) >> 3) & 0x7) EXT_CSD_EXTRACT_PARTITION_ACCESS(x) ((x) & 0x7) There are various places in U-Boot where the BOOT_PARTITION_ENABLE field is accessed via EXT_CSD_EXTRACT_PARTITION_ACCESS and converted to a hardware partition consistent with the definition of the PARTITION_ACCESS field used by the various mmc_switch incarnations. To add some sanity to the distinction between BOOT_PARTITION_ENABLE (used to specify the active device on power-cycle) and PARTITION_ACCESS (used to switch between hardware partitions) create two enumerated types and use them wherever struct mmc * part_config is used or the above macros are used. Additionally provide arrays of the field names and allow those to be used in the 'mmc partconf' command and in board support files. The first patch adds enumerated types and makes use of them which represents no compiled code change. The 2nd patch adds the array of names and uses them in the 'mmc partconf' command. The 3rd patch uses the array of hardware partition names in a board support file to show what emmc hardware partition U-Boot is being loaded from.
| | * | | | mmc: use an enumerated type to represent PARTITION_CONFIG fieldsTim Harvey2024-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern eMMC v4+ devices have multiple hardware partitions per the JEDEC specification described as: Boot Area Partition 1 Boot Area Partition 2 RPMB Partition General Purpose Partition 1 General Purpose Partition 2 General Purpose Partition 3 General Purpose Partition 4 User Data Area These are referenced by fields in the PARTITION_CONFIG register (Extended CSD Register 179) which is defined as: bit 7: reserved bit 6: BOOT_ACK 0x0: No boot acknowledge sent (default 0x1: Boot acknowledge sent during boot operation Bit bit 5:3: BOOT_PARTITION_ENABLE 0x0: Device not boot enabled (default) 0x1: Boot Area partition 1 enabled for boot 0x2: Boot Area partition 2 enabled for boot 0x3-0x6: Reserved 0x7: User area enabled for boot bit 2:0 PARTITION_ACCESS 0x0: No access to boot partition (default) 0x1: Boot Area partition 1 0x2: Boot Area partition 2 0x3: Replay Protected Memory Block (RPMB) 0x4: Access to General Purpose partition 1 0x5: Access to General Purpose partition 2 0x6: Access to General Purpose partition 3 0x7: Access to General Purpose partition 4 Note that setting PARTITION_ACCESS to 0x0 results in selecting the User Data Area partition. You can see above that the two fields BOOT_PARTITION_ENABLE and PARTITION_ACCESS do not use the same enumerated values. U-Boot uses a set of macros to access fields of the PARTITION_CONFIG register: There are various places in U-Boot where the BOOT_PARTITION_ENABLE field is accessed via EXT_CSD_EXTRACT_PARTITION_ACCESS and converted to a hardware partition consistent with the definition of the PARTITION_ACCESS field which is also the value used to specify the hardware partition of the various mmc_switch incarnations. To add some sanity to the distinction between BOOT_PARTITION_ENABLE (used to specify the active device on power-cycle) and PARTITION_ACCESS (used to switch between hardware partitions) create two enumerated types and use them wherever struct mmc * part_config is used or the above macros are used. This represents no code changes. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
| * | | | | Merge patch series "Make LMB memory map global and persistent"Tom Rini2024-09-032-3/+16
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sughosh Ganu <sughosh.ganu@linaro.org> says: This is a follow-up from an earlier RFC series [1] for making the LMB and EFI memory allocations work together. This is a non-rfc version with only the LMB part of the patches, for making the LMB memory map global and persistent. This is part one of a set of patches which aim to have the LMB and EFI memory allocations work together. This requires making the LMB memory map global and persistent, instead of having local, caller specific maps. This is being done keeping in mind the usage of LMB memory by platforms where the same memory region can be used to load multiple different images. What is not allowed is to overwrite memory that has been allocated by the other module, currently the EFI memory module. This is being achieved by introducing a new flag, LMB_NOOVERWRITE, which represents memory which cannot be re-requested once allocated. The data structures (alloced lists) required for maintaining the LMB map are initialised during board init. The LMB module is enabled by default for the main U-Boot image, while it needs to be enabled for SPL. This version also uses a stack implementation, as suggested by Simon Glass to temporarily store the lmb structure instance which is used during normal operation when running lmb tests. This does away with the need to run the lmb tests separately. The tests have been tweaked where needed because of these changes. The second part of the patches, to be sent subsequently, would work on having the EFI allocations work with the LMB API's. [1] - https://lore.kernel.org/u-boot/20240704073544.670249-1-sughosh.ganu@linaro.org/T/#t Notes: 1) These patches are on next, as the alist patches have been applied to that branch. 2) I have tested the boot on the ST DK2 board, but it would be good to get a T-b/R-b from the ST maintainers. 3) It will be good to test these changes on a PowerPC platform (ideally an 85xx, as I do not have one).
| | * | | | | spl: call spl_board_init() at the end of the spl init sequenceSughosh Ganu2024-09-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spl_board_init() function on sandbox invokes the unit tests. Invoking the tests should be done once the rest of the system has been initialised. Call the spl_board_init() function at the very end, once the rest of the initilisation functions have been called, including the setting up of the LMB memory map. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| | * | | | | lmb: init: initialise the lmb data structures during board initSughosh Ganu2024-09-032-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory map maintained by the LMB module is now persistent and global. This memory map is being maintained through the alloced list structure which can be extended at runtime -- there is one list for the available memory, and one for the used memory. Allocate and initialise these lists during the board init. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | | | | | Merge patch series "Add support for Ethernet Boot on SK-AM62"WIP/30Aug2024-nextTom Rini2024-08-301-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chintan Vankar <c-vankar@ti.com> says: This series enables Ethernet Boot on SK-AM62 device. This series is based on commit 'f4f845b85926' of origin/next branch of U-Boot. Logs for Ethernet Boot for AM625-SK: https://gist.github.com/chintanv133/464782796a9a60b9f5a49e674c5fc31a
| | * | | | | | common: spl: spl: Init DRAM size in R5/A53 SPLChintan Vankar2024-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize DRAM size in SPL stage since networking requires DDR to be initialized. Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
| * | | | | | | bootstage: Fix unstash of records from SPLJonas Karlman2024-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit b81e31a1e6c5 ("bootstash: Do not provide a default address for all") changed a bootstage unstash call to bootstage stash, this has resulted in bootstage records stashed in SPL no longer get unstaged in U-Boot proper. Fix this by changing back to a unstage call. Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | | | | | | Merge patch series "Tidy up console recording in tests"WIP/26Aug2024-nextTom Rini2024-08-261-0/+2
| |\ \ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Glass <sjg@chromium.org> says: This series started as a small fix for checking for an empty line, but in the process several other problems were found and fixed: - fix tests which use console recording but don't set the flag - drop unnecessary resetting of the console in tests - drop unnecessary blank line before MMC output - update the docs a little - fix buildman test failure on newer Pythons - a few other minor things This series also renames the confusing flag names, so that they are easier to remember - just a UTF_ (unit-test flags) prefix.
| | * | | | | | test: Fail when an empty line is expected but not presentSimon Glass2024-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementation of ut_assert_nextline_empty() cannot distinguish between an empty line and no line at all. It can in fact be called at the end of the recorded output and will happily return success. Adjust the logic so that this condition is detected. Show a failure message in this case. Fix the one test which falls foul of this fix. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 400175b0a7d ("test: Add a way to check each line of console...") Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
| * | | | | | | global_data: Remove environment members if not usedSimon Glass2024-08-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | | | | | global_data: Remove jump table in SPLSimon Glass2024-08-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPL builds don't use the jump table since they cannot run apps. Drop it, moving it together with boardf. Signed-off-by: Simon Glass <sjg@chromium.org>