summaryrefslogtreecommitdiff
path: root/board/xilinx
AgeCommit message (Collapse)Author
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-12board: zynqmp: allow env in fat/ext when booting out of qspiNeal Frager
Allow saving the environment in fat and in ext4 when bootmode is qspi. Signed-off-by: Ricardo Salveti <[email protected]> Signed-off-by: Neal Frager <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2026-01-02kbuild: Bump the build system to 6.1Sughosh Ganu
Our last sync with the kernel was 5.1. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefiles to 6.1. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call for the bump to 5.1, so we are following the same guidelines here. Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>a #rebased on -next
2025-12-19board: xilinx: add SPL boot device supportPadmarao Begari
Add board_boot_order() function and remove spl_boot_device() function because it is called from weak board_boot_order(). Add support to U-Boot SPL for booting from RAM or SPI, as configured in defconfig. Signed-off-by: Padmarao Begari <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/a1f26a9392128309a1affed28b14809845714c21.1764747417.git.michal.simek@amd.com
2025-12-19board: xilinx: Retry FRU EEPROM read on timeoutPadmarao Begari
Wrap the dm_i2c_read() call is used for FRU EEPROM reads in a retry loop, attempting up to EEPROM_FRU_READ_RETRY times if a -ETIMEDOUT error is returned. The loop exits immediately on success or any error other than -ETIMEDOUT. This improves robustness against transient I2C timeouts during FRU detection and decoding. Signed-off-by: Padmarao Begari <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/9556d204c351d2dc40176a31dab11f789fd1cc7f.1763542221.git.michal.simek@amd.com
2025-12-19board: xilinx: Update ESRT after copying GUIDPadmarao Begari
The EFI System Resource Table (ESRT) is updated after the firmware image GUID is copied to the fw_images structure. This ensures that the ESRT accurately reflects the current firmware resources. Signed-off-by: Padmarao Begari <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2025-10-09board: xilinx: update guid based on metadataPadmarao Begari
The generated GUID applies to all Xilinx platforms but is not specific to any individual board. For FWU multi bank update, use the image UUID (GUID) from the FWU metadata structure rather than embedding a generated GUID into the U-Boot build. Signed-off-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-10-09drivers: firmware: update xilinx_pm_request to support max payloadNaman Trivedi
Currently xilinx_pm_request API supports four u32 payloads. However the legacy SMC format supports five u32 request payloads and extended SMC format supports six u32 request payloads. Add support for the same in xilinx_pm_request API. Also add two dummy arguments to all the callers of xilinx_pm_request. The TF-A always fills seven u32 return payload so add support for the same in xilinx_pm_request API. Signed-off-by: Naman Trivedi <[email protected]> Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]> Acked-by: Senthil Nathan Thangaraj <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/5ae6b560741f3ca8b89059c4ebb87acf75b4718e.1756388537.git.michal.simek@amd.com
2025-08-26xilinx: Make XILINX_OF_BOARD_DTB_ADDR depending on OF_BOARD onlyMichal Simek
board_fdt_blob_setup() is guarded by OF_BOARD already that's why make no sense to depend also on OF_SEPARATE. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/063b2e618afb05a32d66218f3631a5f23b30ea3e.1753172103.git.michal.simek@amd.com
2025-08-14xilinx: mbv: Disable OF_HAS_PRIOR_STAGEMichal Simek
There is no reason to use OF_BOARD for MBV because reduced DT is used by SPL and full DT is passed via u-boot.img or u-boot.itb. There is no reason to pick up DTB from certain address. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2025-07-24treewide: Remove empty board_init() function from all boardsSam Protsenko
Commit 86acdce2ba88 ("common: add config for board_init() call") introduced CONFIG_BOARD_INIT option. This option can be disabled for the boards where board_init() function is not needed. Remove empty board_init() calls for all boards where it's possible, and disable CONFIG_BOARD_INIT in all related defconfigs. This cleanup was made semi-automatically using these scripts: [1]. No functional change, but the binary size for the modified boards is reduced a bit. [1] https://github.com/joe-skb7/uboot-convert-scripts/tree/master/remove-board-init Signed-off-by: Sam Protsenko <[email protected]> Tested-by: Adam Ford <[email protected]> #imx8mm_beacon Tested-by: Bryan Brattlof <[email protected]> Acked-by: Peng Fan <[email protected]> #NXP boards
2025-07-08arm64: zynqmp: Enable rng-seed generationMichal Simek
SOM has TPM with RNG in it that's why enable rng-seed generation. Acked-by: Ilias Apalodimas <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/0e55eb3eade94e9cd0ffe04da0618aa6b1589f01.1751442246.git.michal.simek@amd.com
2025-06-02include/mtd.h: Cleanup usageTom Rini
There are only a few things found in <mtd.h> today. Go through and audit the C files which include <mtd.h> and remove it when not required. Then, add it to the files which had either missed it or had an indirect inclusion of it. Signed-off-by: Tom Rini <[email protected]>
2025-04-16board: xilinx: Store board info data in data sectionPadmarao Begari
Line 171 in README is describing that before relocation no code should use global variable because global variables are placed to BSS section which is initialized to 0 after relocation. In the case of ZynqMP, where DTB reselection is enabled, the EEPROM is read again after relocation. This prevents the issue from being observed. However, in Versal Gen 2, where DTB reselection is also enabled, the EEPROM is not read after relocation because it is not yet wired in board_init(). This leads to a situation where the code accesses an incorrect memory location, because none is really checking the board_info is valid or not. To fix, move the board_info into the data section and also check whether it is valid or not. Signed-off-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-04-16arm64: zynqmp: Start usb automatically via preboot on KriaVenkatesh Yadav Abbarapu
U-Boot configures the USB config object which enables power for the IP, without this the linux usb driver won't work. So add "usb start" as part of preboot command. Fixes: dd4a82201694 ("arm64: zynqmp: Introduce kria SOM defconfig") Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/180c9776b03d57d8218d161924363906ef354394.1744272843.git.michal.simek@amd.com
2025-04-16xilinx: Free memory when variable is saved in boot_targets_setup()Michal Simek
When boot_targets variable is saved there is no reason to keep string in malloc area that's why free it. This change is already done in ZynqMP code. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/fa10fc22193a1a23258466056b3d02f7496fccfe.1744270729.git.michal.simek@amd.com
2025-04-16xilinx: versal: remove versal loadpdi commandPrasad Kummari
The source code for the versal loadpdi command and the CONFIG_CMD_VERSAL configuration has been removed. It now utilizes the fpga load <dev> <address> <length> command to load secure & non-secure pdi images. Signed-off-by: Prasad Kummari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-04-16arm64: versal-net: Add PL bit stream load supportPrasad Kummari
Add support for loading the secure & non-secure pdi images and PL bitstream on the Versal NET platform. The FPGA driver is enabled to load the bitstream in PDI format on the AMD Versal NET device. PDI is the new programmable device image format for Versal NET, and the bitstream for the Versal NET platform is generated exclusively in this format. The source code for the versalnet loadpdi command and the CONFIG_CMD_VERSAL_NET configuration has been removed. It now utilizes the fpga load <dev> <address> <length> command to load secure & non-secure pdi images. Signed-off-by: Prasad Kummari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-04-16arm64: zynqmp: fix dfu alt buffer clearingVincent Stehlé
The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER() macro to declare a `buf' variable pointer into an array allocated on the stack. It then calls the memset() function to clear the useable portion of the array using the idiomatic expression `sizeof(buf)'. While this would indeed work fine for an array, in the present case we end up clearing only the size of a pointer. Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead. Fixes: b86f43de0be0 ("xilinx: zynqmp: Add support for runtime dfu_alt_info setup") Signed-off-by: Vincent Stehlé <[email protected]> Cc: Michal Simek <[email protected]> Cc: Tom Rini <[email protected]> Acked-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2025-04-16xilinx: zynq: fix dfu alt buffer clearingVincent Stehlé
The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER() macro to declare a `buf' variable pointer into an array allocated on the stack. It then calls the memset() function to clear the useable portion of the array using the idiomatic expression `sizeof(buf)'. While this would indeed work fine for an array, in the present case we end up clearing only the size of a pointer. Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead. Fixes: c67fecd2125b ("ARM: zynq: Enable capsule update for qspi and mmc") Signed-off-by: Vincent Stehlé <[email protected]> Cc: Michal Simek <[email protected]> Cc: Tom Rini <[email protected]> Acked-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2025-04-16arm64: versal: fix dfu alt buffer clearingVincent Stehlé
The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER() macro to declare a `buf' variable pointer into an array allocated on the stack. It then calls the memset() function to clear the useable portion of the array using the idiomatic expression `sizeof(buf)'. While this would indeed work fine for an array, in the present case we end up clearing only the size of a pointer. Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead. Fixes: 064c8978b44f ("arm64: versal: Enable capsule update (SD)") Signed-off-by: Vincent Stehlé <[email protected]> Cc: Michal Simek <[email protected]> Cc: Tom Rini <[email protected]> Acked-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2025-04-16xilinx: versal: add firmware access to PMC multi Boot mode registerPrasad Kummari
Added extended support for retrieving the PMC muti boot mode register via the firmware interface, which is preferred when U-Boot runs in EL2 and cannot directly access PMC registers via raw reads. Ideally, all secure registers should be accessed via xilinx_pm_request(). Introduced the secure zynqmp_pm_get_pmc_multi_boot_reg() call, which uses xilinx_pm_request() to read the PMC multi boot mode register. BootROM increments the MultiBoot register (PMC_MULTI_BOOT) read address offset by 32 KB and retries. For SD and eMMC boot modes, it can search up to 8191 FAT files for the identification string. A 13-bit mask (0x1FFF) is applied to PMC_MULTI_BOOT_MASK to obtain the correct values in BootROM. Signed-off-by: Prasad Kummari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-04-16xilinx: versal: add firmware access to CRP Boot mode registerPrasad Kummari
Added extended support for retrieving the boot mode register via the firmware interface, which is preferred when U-Boot runs in EL2 and cannot directly access CRP registers via raw reads. Ideally, all secure registers should be accessed via xilinx_pm_request(). Introduced the secure zynqmp_pm_get_bootmode_reg() call, which uses xilinx_pm_request() to read the boot mode register. When CONFIG_ZYNQMP_FIRMWARE is enabled, the secure zynqmp_pm_get_bootmode_reg() call is used; otherwise, direct raw reads are performed in the case of mini U-Boot. Signed-off-by: Prasad Kummari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-04-11Merge patch series "Switch to using $(PHASE_) in Makefiles"Tom Rini
Tom Rini <[email protected]> says: This series switches to always using $(PHASE_) in Makefiles when building rather than $(PHASE_) or $(XPL_). It also starts on documenting this part of the build, but as a follow-up we need to rename doc/develop/spl.rst and expand on explaining things a bit. Link: https://lore.kernel.org/r/[email protected]
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <[email protected]>
2025-04-11board: remove capsule update support in set_dfu_alt_info()Jonathan Humphreys
Now that capsule update sets the dfu_alt_info environment variable explicitly, there is no need to support it in the set_dfu_alt_info() function. Decouple SET_DFU_ALT_INFO from EFI_CAPSULE_FIRMWARE_FIT and EFI_CAPSULE_FIRMWARE_RAW. For many boards, this was the only use of set_dfu_alt_info() so remove the function entirely. Fixes: a9e6f01a941f ("efi: Define set_dfu_alt_info() for boards with UEFI capsule update enabled") Signed-off-by: Jonathan Humphreys <[email protected]> Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> # for board/libre-computer/* Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Wadim Egorov <[email protected]> # for
2025-04-11xilinx: dfu: Fill directly update_info.dfu_stringMichal Simek
Directly fill update_info.dfu_string to prepare platforms to switch from using dfu_alt_info variable to dfu_string which contains description for capsule update when switch is done. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2025-03-03xilinx: zynq: Guard code around SPL_FS_LOAD_PAYLOAD_NAMEMichal Simek
Guard code around CONFIG_SPL_FS_LOAD_PAYLOAD_NAME usage to avoid compilation failure. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/f15a9762494945814b06a71db90ee4db59dd17ed.1738910601.git.michal.simek@amd.com
2025-02-05zynqmp: Save "bootseq" environment variable in decimal formatBenjamin Szőke
In U-Boot, most of mmc releated commands uses decimal value in arguments, like "mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to improve compatibilities, export "bootseq" number to environment variable in decimal format instead of hex. Signed-off-by: Benjamin Szőke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-02-05configs: zynqmp: Add usb_pgood_delay for SOM boardsPrasad Kummari
Add usb_pgood_delay to ensure proper detection of USB devices. Increase the USB power good delay on the SOM boards, as this is required for certain USB sticks otherwise, they may not be detected. Signed-off-by: Prasad Kummari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-01-14board: xilinx: Add missing prototype for set_dfu_alt_infoVenkatesh Yadav Abbarapu
Add missing prototype to fix the sparse warning, warning: no previous prototype for 'set_dfu_alt_info' [-Wmissing-prototypes]. Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-01-14board: zynqmp: zynqmp-sm-k26-revA: release DP from resetNeal Frager
This releases the DP configuration from reset early on during the boot process for K26 SOM. It will also avoid the boot hang situation should any attempt be made to configure the DP registers while it is still in reset. Fixes the same issue as described by the commit 8b81010a2fe3 ("video: zynqmp: Add support for reset"). Signed-off-by: Neal Frager <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-01-14zynqmp: Remove usb init initialization for KriaMichal Simek
USB hub initialization is done by driver introduced by commit 09f557e106ef ("usb: onboard-hub: Add i2c initialization for usb5744 hub") that's why there is no need to do initialization via variables. Reported-by: Love Kumar <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/96e9c80aeeed4e9664858bf236476997d17a9914.1734522042.git.michal.simek@amd.com
2025-01-14arm64: versal: RO multi_boot register in non JTAG bootmodeMichal Simek
The main reason for this change is that upstream QEMU has no multiboot register implemented that's why access to it fails which ends up in CI failure for our target. That's why in JTAG bootmode returns 0 which is correct behaviour because multiboot register is not used in this mode and value should be ignored and as a side effect it is also fixing CI/Qemu issue. Also move versal_get_bootmode() to avoid function declaration. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/484b9cafc45e72308a1a29a3ab772020f96784cc.1736155238.git.michal.simek@amd.com
2025-01-14arm64: versal: Support operations around multiboot registerMichal Simek
Read multiboot register and show it's value by default. Also extend logic in dfu_alt_info string generation to support capsule update for different offsets. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/72ba2efd0fb7b66a86b409a1521fe288a4dd3453.1733395093.git.michal.simek@amd.com
2025-01-14arm64: versal: Wire SPIs for dfu_alt_info variable generationMichal Simek
Enable automatic dfu_alt_info variable generation based on MTD partition. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/67ff88c8c7186138353c0b74ed37a318fb4b199e.1733395093.git.michal.simek@amd.com
2024-12-18fdt: Swap the signature for board_fdt_blob_setup()Simon Glass
This returns a devicetree and updates a parameter with an error code. Swap it, since this fits better with the way U-Boot normally works. It also (more easily) allows leaving the existing pointer unchanged. No yaks were harmed in this change, but there is a very small code-size reduction. For sifive, the OF_BOARD option must be set for the function to be called, so there is no point in checking it again. Also OF_SEPARATE is defined always. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> [trini: Update total_compute] Signed-off-by: Tom Rini <[email protected]>
2024-11-19xilinx: Introduce XILINX_MINI configurationMichal Simek
There is no common symbol which mini configurations are using and recent get_mem_top() changes adding 1.3kB without having a way to remove it. That's why introduce new symbol which can be used for removing features which are not requested by these configurations. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/aa27b72e17057fa8cbdd92a2bbb863a31c8c1226.1731681053.git.michal.simek@amd.com
2024-11-19arm64: zynqmp: Set default RTC device at startMichal Simek
For RTC to start to operate there is a need to call the driver. The simple way to do it is to set default RTC instance which will call the probe and do basic initialization. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/01155f1555dbd42adc618906629f5fb45754d5a4.1731419926.git.michal.simek@amd.com
2024-11-15arm64: versal: Enable capsule update (SD)Michal Simek
Enable capsule update in SD boot mode. For getting it work there is a need to generate or setup dfu_alt_info and enable sysreset with DFU_MMC. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/cede513de764b99560dc3737457dbc8a5cc71d21.1729857366.git.michal.simek@amd.com
2024-11-15arm64: versal: Do not define do_reset() if sysreset is enabledMichal Simek
If sysreset is enabled reset_cpu is defined in sysreset uclass that's why it can't be in platform/board code. The same change was done by commit f1bc214b0024 ("arm64: zynqmp: Do not define do_reset() if sysreset is enabled"). Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/8c1a5d6148c5e6c46790b725e8148a4e12d393ba.1729857366.git.michal.simek@amd.com
2024-11-15xilinx: use get_mem_top() to compute ram_topSughosh Ganu
Use the get_mem_top function to compute the value of ram_top. This was earlier done through LMB API's, which are no longer available till after relocation. Use get_mem_top() instead to compute the ram_top value. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Michal Simek <[email protected]> Tested-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2024-11-06xilinx: mbv: Place DTB by default to DDR locationMichal Simek
DTB should be also placed to DDR. It should be the part of commit 9d688e6da5c9 ("riscv: mbv: Align DT with QEMU"). Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2024-10-29riscv: mbv: Align DT with QEMUMichal Simek
Align U-Boot with QEMU amd-microblaze-v-virt platform to be able to wire it with CI. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Padmarao Begari <[email protected]>
2024-10-25xilinx: zynqmp: Remove conditional check for bootmenu_default variableJohn Vicky Vykuntapu
As per bootmenu support added default boot options to CC on AMD CCs and default to SOM on others. However, if no secondary boot device is enabled in the design,it should be the default boot option for SOM when combined with AMD CCs because it only contains SOM peripherals. To address this issue, The conditional check for the bootmenu_default variable was removed, and it has always been set to SOM as the default boot option. In this way, users can choose preferred boot options from the bootmenu based on the boot devices configured in the design for AMD CCs. Fixes: 61bf0fa8663d ("xilinx: zynqmp: Add bootmenu support") Signed-off-by: John Vicky Vykuntapu <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/0e30b44ce3b478fdec21edad8d896f4d438ce331.1727867715.git.michal.simek@amd.com
2024-10-25xilinx: common: fix script address for MicroblazePadmarao Begari
Fix the issue introduced by commit 067e0294806e ("board: xilinx: Remove conditional check for Microblaze"). The scriptaddr should be physical location not really offset from start of DDR. When U-Boot is not found boot.scr script address in device tree, then it is assigned based on script address and ram base address for Microblaze and i.e exceeding DDR memory. To fix this, the script address is assigned initially with offset instead of address. Later it is added with ram base address and gets the physical address. Signed-off-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2024-10-16net: lwip: add DHCP support and dhcp commmandJerome Forissier
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 <[email protected]> Tested-by: Ilias Apalodimas <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2024-10-14Merge patch series "Integrate MbedTLS v3.6 LTS with U-Boot"Tom Rini
Raymond Mao <[email protected]> says: Integrate MbedTLS v3.6 LTS (currently v3.6.0) with U-Boot. Motivations: ------------ 1. MbedTLS is well maintained with LTS versions. 2. LWIP is integrated with MbedTLS and easily to enable HTTPS. 3. MbedTLS recently switched license back to GPLv2. Prerequisite: ------------- This patch series requires mbedtls git repo to be added as a subtree to the main U-Boot repo via: $ git subtree add --prefix lib/mbedtls/external/mbedtls \ https://github.com/Mbed-TLS/mbedtls.git \ v3.6.0 --squash Moreover, due to the Windows-style files from mbedtls git repo, we need to convert the CRLF endings to LF and do a commit manually: $ git add --renormalize . $ git commit New Kconfig options: -------------------- `MBEDTLS_LIB` is for MbedTLS general switch. `MBEDTLS_LIB_CRYPTO` is for replacing original digest and crypto libs with MbedTLS. `MBEDTLS_LIB_CRYPTO_ALT` is for using original U-Boot crypto libs as MbedTLS crypto alternatives. `MBEDTLS_LIB_X509` is for replacing original X509, PKCS7, MSCode, ASN1, and Pubkey parser with MbedTLS. By default `MBEDTLS_LIB_CRYPTO_ALT` and `MBEDTLS_LIB_X509` are selected when `MBEDTLS_LIB` is enabled. `LEGACY_CRYPTO` is introduced as a main switch for legacy crypto library. `LEGACY_CRYPTO_BASIC` is for the basic crypto functionalities and `LEGACY_CRYPTO_CERT` is for the certificate related functionalities. For each of the algorithm, a pair of `<alg>_LEGACY` and `<alg>_MBEDTLS` Kconfig options are introduced. Meanwhile, `SPL_` Kconfig options are introduced. In this patch set, MBEDTLS_LIB, MBEDTLS_LIB_CRYPTO and MBEDTLS_LIB_X509 are by default enabled in qemu_arm64_defconfig and sandbox_defconfig for testing purpose. Patches for external MbedTLS project: ------------------------------------- Since U-Boot uses Microsoft Authentication Code to verify PE/COFFs executables which is not supported by MbedTLS at the moment, addtional patches for MbedTLS are created to adapt with the EFI loader: 1. Decoding of Microsoft Authentication Code. 2. Decoding of PKCS#9 Authenticate Attributes. 3. Extending MbedTLS PKCS#7 lib to support multiple signer's certificates. 4. MbedTLS native test suites for PKCS#7 signer's info. All above 4 patches (tagged with `mbedtls/external`) are submitted to MbedTLS project and being reviewed, eventually they should be part of MbedTLS LTS release. But before that, please merge them into U-Boot, otherwise the building will be broken when MBEDTLS_LIB_X509 is enabled. See below PR link for the reference: https://github.com/Mbed-TLS/mbedtls/pull/9001 Miscellaneous: -------------- Optimized MbedTLS library size by tailoring the config file and disabling all unnecessary features for EFI loader. From v2, original libs (rsa, asn1_decoder, rsa_helper, md5, sha1, sha256, sha512) are completely replaced when MbedTLS is enabled. From v3, the size-growth is slightly reduced by refactoring Hash functions. From v6, smaller implementations for SHA256 and SHA512 are enabled and target size reduce significantly. Target(QEMU arm64) size-growth when enabling MbedTLS: v1: 6.03% v2: 4.66% v3 - v5: 4.55% v6: 2.90% Tests done: ----------- EFI Secure Boot test (EFI variables loading and verifying, EFI signed image verifying and booting) via U-Boot console. EFI Secure Boot and Capsule sandbox test passed. Known issues: ------------- None. Link: https://lore.kernel.org/u-boot/[email protected]/
2024-10-14md5: Remove md5 non-watchdog APIRaymond Mao
We don't need an API specially for non-watchdog since md5_wd supports it by disabling CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG. Set 0x10000 as default chunk size for MD5. Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Michal Simek <[email protected]>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <[email protected]> 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.