aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp
Commit message (Collapse)AuthorAgeFilesLines
* stm32mp2: Fix CONFIG_STM32MP25X flag usagePatrice Chotard2024-01-191-1/+1
| | | | | | | | "#if" was used instead of "#ifdef" Fixes: 01a701994b05 ("stm32mp2: initial support") Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32mp: Add dependencies on CMDLINE for command stm32keyPatrick Delaunay2024-01-191-0/+1
| | | | | | | | We cannot use stm32key commands without CONFIG_CMDLINE so add the required condition. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* arm: Rename STM32MP15xPatrick Delaunay2024-01-198-24/+24
| | | | | | | | | CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass <sjg@chromium.org Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* arm: Rename STM32MP13xPatrick Delaunay2024-01-198-18/+18
| | | | | | | | | CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
* stm32mp: activate the command stboard for stm32mp25 boardsPatrick Delaunay2024-01-191-0/+1
| | | | | | | | | | Activate the command stboard for stm32mp25 STMicroelectronics boards, add the default used OTP identifier and the associated board identifier: - stm32mp25xx-ev1 = MB1936 - stm32mp25xx-dk = MB1605 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: add support of stm32mp25Patrick Delaunay2024-01-191-1/+9
| | | | | | | Change OTP number to 364 for STM32MP25 as it is done in bsec driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* smt32mp: add setup_mac_address for stm32mp25Patrick Delaunay2024-01-193-57/+72
| | | | | | | | | | | | | | | | | Add a function setup_mac_address() to update the MAC address from the default location in OTP for stm32mp2 platform. The max number of OTP for MAC address is increased to 8 for STM32MP25, defined with get_eth_nb() and checked in setup_mac_address. The MAC address FF:FF:FF:FF:FF:FF, the broadcast ethaddr, is a invalid value used for unused MAC address slot in OTP, for example for board with STM32MP25x part number allows up to 5 ethernet ports but it is not supported by the hardware, without switch; the associated variable "enetaddr%d" is not created. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32mp: add setup_serial_number for stm32mp25Patrice Chotard2024-01-194-27/+32
| | | | | | | | | Add support of serial number for stm32mp25, gets from OTP with BSEC driver. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
* stm32mp: add soc.c filePatrick Delaunay2024-01-194-22/+20
| | | | | | | | | Add a new file soc.c for common functions between stm32mp1 and stm32mp2 family and move print_cpuinfo() in this new file. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
* stm32mp: bsec: add support of stm32mp25Patrick Delaunay2024-01-192-1/+9
| | | | | | | Add support of BSEC for STM32MP25x family to access OTP. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32mp: bsec: add driver dataPatrick Delaunay2024-01-191-8/+30
| | | | | | | | | Add driver data in BSEC driver to test presence of OP-TEE TA, mandatory for STM32MP13 family and prepare the support of new device with more OTP than 95. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* arm: stm32mp: add Rev.B support for STM32MP25Yann Gautier2024-01-191-0/+3
| | | | | | | | Add chip revision B support for STM32MP25, for displaying it in trace. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32: Use bootm_run() and bootz_run()Simon Glass2023-12-211-9/+11
| | | | | | | | Use the new bootm/z_run() functions to avoid having to create an argument list for the stm32prog code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32: Use local vars in stm32prog for initrd and fdtSimon Glass2023-12-211-9/+14
| | | | | | | | | | | | | Rather than assigning to the bootm_argv[] array multiple times, use local variables for the two things that can change and assign them at the end. This makes it easier to drop the array eventually. Tidu up an overly short line while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* Merge tag 'v2024.01-rc3' into nextTom Rini2023-11-203-3/+32
|\ | | | | | | Prepare v2024.01-rc3
| * stm32mp1: read auth stats and boot_partition from tampIgor Opaniuk2023-11-103-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtain from TAMP backup register information about image authorization status and partition id used for booting. Store this info in environmental variables ("boot_auth" and "boot_part" correspondingly). Image authorization supported values: 0x0 - No authentication done 0x1 - Authentication done and failed 0x2 - Authentication done and succeeded These values are stored to TAMP backup register by Trusted Firmware-A [1]. Testing: STM32MP> print boot_part boot_part=1 STM32MP> print boot_auth boot_auth=2 [1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?h=refs/heads/integration&id=ab2b325c1ab895e626d4e11a9f26b9e7c968f8d8 Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * arm: stm32mp: Really fix compilation issue when SYS_DCACHE_OFF and/or ↵Bhupesh Sharma2023-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYS_DCACHE_SYS are enabled While 23e20b2fa6 ("arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled") tried fixing this issue, fix it really by adding #if checks for SYS_ICACHE_OFF and SYS_DCACHE_OFF. Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* | Merge tag 'u-boot-stm32-20231113' of ↵Tom Rini2023-11-1322-88/+627
|\ \ | |/ |/| | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-stm into next Introduce STM32MP2 SoCs family support Add STM32MP257F-EV1 board [trini: Adjust some includes] Signed-off-by: Tom Rini <trini@konsulko.com>
| * stm32mp2: initial supportPatrice Chotard2023-11-1320-70/+600
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add initial support for STM32MP2 SoCs family. SoCs information are available here : https://www.st.com/content/st_com/en/campaigns/microprocessor-stm32mp2.html Migrate all MP1 related code into stm32mp1/ directory Create stm32mp2 directory dedicated for STM32MP2 SoCs. Common code to MP1, MP13 and MP25 is kept into arch/arm/mach-stm32/mach-stm32mp directory : - boot_params.c - bsec - cmd_stm32key - cmd_stm32prog - dram_init.c - syscon.c - ecdsa_romapi.c For STM32MP2, it also : - adds memory region description needed for ARMv8 MMU. - enables early data cache before relocation. During the transition before/after relocation, the MMU, initially setup at the beginning of DDR, must be setup again at a correct address after relocation. This is done in enables_caches() by disabling cache, force arch.tlb_fillptr to NULL which will force the MMU to be setup again but with a new value for gd->arch.tlb_addr. gd->arch.tlb_addr has been updated after relocation in arm_reserve_mmu(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * stm32mp: bsec: Fix AARCH64 compilation warningsPatrice Chotard2023-11-131-14/+15
| | | | | | | | | | | | | | When building with AARCH64 defconfig, we got warnings, fix them. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * stm32mp: dram_init: Limit DDR usage under 4GB boundary for STM32MPPatrice Chotard2023-11-131-1/+7
| | | | | | | | | | | | | | | | Limit DDR usage under 4GB boundary on STM32MP regardless of memory size declared in device tree. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * stm32mp: dram_init: Fix AARCH64 compilation warningsPatrick Delaunay2023-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with AARCH64 defconfig, we got warnings for debug message - format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'}). - format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * stm32mp: dram_init: Get RAM size from DT if no RAM driver foundPatrice Chotard2023-11-131-2/+5
|/ | | | | | | In case there is no RAM driver retrieve RAM size from DT as fallback. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* common: Drop linux/printk.h from common headerSimon Glass2023-09-249-1/+11
| | | | | | | | | This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'v2023.10-rc3' into nextTom Rini2023-08-212-2/+2
|\ | | | | | | | | | | Prepare v2023.10-rc3 Signed-off-by: Tom Rini <trini@konsulko.com>
| * ARM: stm32: Inhibit PDDS because CSTBYDIS is setMarek Vasut2023-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PWR_MPUCR CSTBYDIS bit is set, therefore the CA cores can never enter CStandby state and would always end up in CStop state. Clear the PDDS bit, which indicates the CA cores can enter CStandby state as it makes little sense to keep it set with CSTBYDIS also set. This does however fix a problem too. When both PWR_MPUCR and PWR_MCUCR PDDS bits are set, then the chip enters CStandby state even though the PWR_MCUCR CSTBYDIS is set. Clearing the PWR_MPUCR PDDS prevents that from happening. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * common: return type board_get_usable_ram_topHeinrich Schuchardt2023-08-151-1/+1
| | | | | | | | | | | | | | | | board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* | treewide: unify the linker symbol reference formatShiji Yang2023-08-091-2/+2
|/ | | | | | | | | | | Now all linker symbols are declared as type char[]. Though we can reference the address via both the array name 'var' and its address '&var'. It's better to unify them to avoid confusing developers. This patch converts all '&var' linker symbol refrences to the most commonly used format 'var'. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* stm32mp: stm32prog: use the decimal format by default for offset parsingPatrick Delaunay2023-06-161-1/+1
| | | | | | | | | | | | | | | | | | Change the default base for offset parsing with simple_strtoull(), so offset in flashlayout is coded in base 10 by default, even if string start with '0'. The Octal encoding is not supported. The base 16 is still supported when the '0x' header is detected. This patch solves an unexpected parsing result when the address, provided by decimal value is starting by 0, for example 0x4400 = 00017408 is a invalid with current code. ... P 0x04 fsbl1 Binary mmc0 00017408 tf-a.stm32 .... Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: fix OTP read/write error managementPatrick Delaunay2023-06-161-1/+8
| | | | | | | | | | | | | Avoid to ignore the OTP read/write error and transmits the error to STM32CubeProgrammer. Today the error is only displayed in log error: so the user on HOST thinks the OTP operation is performed. Reported-by: Mickael GARDET <m.gardet@overkiz.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Fixes: 75ea9e75931c ("stm32mp: stm32prog: add TEE support in stm32prog command") Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: bsec: add check on null size in misc opsPatrick Delaunay2023-06-161-2/+2
| | | | | | | | | | Add a protection in misc bsec ops for request with null size. For example OP-TEE error occurs when get_eth_nb() return 0 in setup_mac_address() for unknown part number because U-Boot read 0 OTPs. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: add support of STM32MP15x Rev.YPatrick Delaunay2023-06-162-1/+5
| | | | | | | Add support of STM32MP15x Rev.Y for the Silicon revision REV_ID = 0x2003. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* ARM: stm32: Add missing header for save_boot_paramsMarek Vasut2023-06-161-0/+1
| | | | | | | | | | The get_stm32mp_rom_api_table() function is defined in sys_params.h , add the missing header to avoid compiler warning. Fixes: dbeaca79b79 ("ARM: stm32: Factor out save_boot_params") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* ARM: stm32: Add IWDG handling into PSCI suspend codeMarek Vasut2023-06-162-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | In case the IWDG is enabled by either U-Boot or Linux, the IWDG can never be disabled again. That includes low power states, which means that if the IWDG is enabled, the SoC would reset itself after a while in suspend via the IWDG. This is not desired behavior. It is possible to enable IWDG pre-timeout IRQ which is routed into the EXTI, and use that IRQ to wake the CPU up before the IWDG timeout is reached and reset is triggered. This pre-timeout IRQ can be used to reload the WDT and then suspend the CPU again every once in a while. Implement this functionality for both IWDG1 and IWDG2 by reading out all the unmasked IRQs, comparing the list with currently pending IRQs in GICv3: - If any IRQ is pending and it is NOT IWDG1 or IWDG2 pre-timeout IRQ, wake up and let OS handle the IRQs - If IWDG1 or IWDG2 IRQ is pending and no other IRQ is pending, ping the respective IWDG and suspend again This does not seem to have any adverse impact on power consumption in suspend. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* stm32mp: stm32prog: Add support of FWU_MDATA partition typePatrick Delaunay2023-06-162-0/+12
| | | | | | | | | | | | | | | | | | | Add support of "FWU_MDATA" partition type in flashlayout to select the TF-A firmware update metadata partition type guid, associated to U-Boot "system" partition type guid, FWU_MDATA_GUID introduced by commit 2eaedc95164f ("FWU: Add FWU metadata structure and driver for accessing metadata") and used in gpt_get_mdata_partitions() for commit 554b38f7a532 ("FWU: Add FWU metadata access driver for GPT partitioned block devices") See also recommendation in FWU-PSA-A_DEN0118_1.0ALP3.pdf 4.1.2 Metadata integration with GPT When embedded in a GPT, each metadata replica occupies a single partition with PartitionTypeGUID = metadata_uuid. UUID = 8a7a84a0-8387-40f6-ab41-a8b9a5a60d23 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Add support of ESP partition typePatrick Delaunay2023-06-162-2/+14
| | | | | | | | | | | | Add support of "ESP" partition type in flashlayout to select the "EFI System Partition", associated to U-Boot "system" partition type guid, PARTITION_SYSTEM_GUID = C12A7328-F81F-11d2-BA4B-00A0C93EC93B. This partition is the bootable partition for efi boot. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Add support of ENV partition typePatrick Delaunay2023-06-162-0/+6
| | | | | | | | | | | | Add support of "ENV" partition type in flashlayout to select the "u-boot-env" GUID, with PARTITION_U_BOOT_ENVIRONMENT = 3de21764-95bd-54bd-a5c3-4abe786f38a8, that mean a partition holding a U-Boot environment introduced by commit c0364ce1c695 ("doc/README.gpt: define partition type GUID for U-Boot environment")' Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Remove tee_detected from stm32prog_data structPatrice Chotard2023-06-164-27/+0
| | | | | | | | | As stm32prog_get_tee_partitions() is no more used, remove tee_detected boolean from stm32prog_data struct and all code using it. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Remove usage of "mtdparts" functionPatrice Chotard2023-06-161-23/+19
| | | | | | | | | | | | | | | Motivation for this patch is to remove usage of function define in cmd/mtdparts.c interface, based on env variables mtdids and mtdparts: mtdparts_init() and find_dev_and_part(). See commit 938db6fe5da3 ("cmd: mtdparts: describe as legacy") Now, all MTD devices are populated with their partition's information found in DT, accessible in MTD devices. Use these information to find the wanted partitions, no more need of find_dev_and_part() usage. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* arm: stm32mp: spl: fix function with fdt_addr_t inputJohan Jonker2023-05-061-1/+1
| | | | | | | | | | The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so fix ofnode_get_addr_size function with fdt_addr_t input to be able to handle both sizes for stm32mp SoC in spl.c file. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* stm32mp: fix various array bounds checksRasmus Villemoes2023-04-191-2/+2
| | | | | | | | | | | In all these cases, the index on the LHS is immediately afterwards used to access the array appearing in the ARRAY_SIZE() on the RHS - so if that index is equal to the array size, we'll access one-past-the-end of the array. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* Correct SPL use of STM32MP15X_STM32IMAGESimon Glass2023-02-101-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_STM32MP15X_STM32IMAGE defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL uses of PMIC_STPMIC1Simon Glass2023-02-101-2/+2
| | | | | | | This converts 2 usages of this option to the non-SPL form, since there is no SPL_PMIC_STPMIC1 defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL uses of MTDSimon Glass2023-02-101-1/+1
| | | | | | | This converts 2 usages of this option to the non-SPL form, since there is no SPL_MTD defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL use of CMD_BOOTZSimon Glass2023-02-091-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_CMD_BOOTZ defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Move common image code to image_board and commandSimon Glass2023-01-161-1/+1
| | | | | | | | | | | We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org>
* ARM: stm32: Make ECDSA authentication available to U-BootMarek Vasut2023-01-131-1/+1
| | | | | | | | | | | With U-Boot having access to ROM API call table, it is possible to use the ROM API call it authenticate e.g. signed kernel fitImages using the BootROM ECDSA support. Make this available by pulling the ECDSA BootROM call support from SPL-only guard. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
* ARM: stm32: Pass ROM API table pointer to U-Boot properMarek Vasut2023-01-131-0/+15
| | | | | | | | | | | The ROM API table pointer is no longer accessible from U-Boot, fix this by passing the ROM API pointer through. This makes it possible for U-Boot to call ROM API functions to authenticate payload like signed fitImages. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
* ARM: stm32: Factor out save_boot_paramsMarek Vasut2023-01-134-36/+43
| | | | | | | | | | | | The STM32MP15xx platform currently comes with two incompatible implementations of save_boot_params() weak function override. Factor the save_boot_params() implementation into common cpu.c code and provide accessors to read out both ROM API table address and DT address from any place in the code instead. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
* ARM: stm32: Fix ECDSA authentication with Dcache enabledMarek Vasut2023-01-131-0/+4
| | | | | | | | | | | | In case Dcache is enabled while the ECDSA authentication function is called via BootROM ROM API, the MMU tables are set up and the BootROM region is not marked as executable, so an attempt to run code from it results in a hang. Mark the BootROM region as executable as suggested by Patrick to prevent the hang. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>