Commit Graph

4996 Commits

Author SHA1 Message Date
Manish Pandey 33b0c79205 Merge changes I25047322,Id476f815 into integration
* changes:
  fix(plat/rcar3): change stack size of BL31
  fix(plat/rcar3): fix SYSTEM_OFF processing for R-Car D3
2022-01-31 16:53:19 +01:00
Jayanth Dodderi Chidanand 1471475516 feat(cpu): add library support for Poseidon CPU
This patch adds the basic CPU library code to support the Poseidon CPU
in TF-A. Poseidon is derived from HunterELP core, an implementation of
v9.2 architecture. Currently, Hunter CPU the predecessor to HunterELP,
is supported in TF-A. Accordingly the Hunter CPU library code has been
as the base and adapted here.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I406b4de156a67132e6a5523370115aaac933f18d
2022-01-28 11:12:21 +00:00
Yann Gautier e1bfbf8ad3 refactor(stm32mp1): remove unused refcount helper functions
Remove stm32mp_incr_shrefcnt(), stm32mp_decr_shrefcnt(),
stm32mp_incr_refcnt() and stm32mp_decr_refcnt() that are unused.
The file is then just removed.

Change-Id: I09ee23c02317df5d8f71cbc355d3ed4a67ce2749
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-27 18:06:36 +01:00
Yann Gautier 356ed96118 fix(stm32mp1): add missing debug.h
Due to stm32mp_shres_helpers.h removal, the debug.h header is no more
included. It should then be added to stm32mp1_boot_device.c.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I397911ac05fdff464c010cf3b2e04320a781b4aa
2022-01-27 18:06:36 +01:00
Sughosh Ganu ad216c1066 feat(stm32mp1): add support for building the FWU feature
Add support for enabling the FWU multi bank boot feature on the
platform.

Currently, this feature is supported on the STM32MP157C-DK2 board,
which boots off a uSD card. Also, support has been enabled when
booting from a FIP image.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: Ia69e858461e2daf599d41d66d7ff2ccae0c341c2
2022-01-27 18:09:02 +05:30
Sughosh Ganu ba02add9ea feat(stm32mp1): add logic to pass the boot index to the Update Agent
With the FWU Multi Bank update feature, the platform can boot from one
of multiple banks(partitions). Pass the value of bank from which the
platform has booted as boot index to the Update Agent. The Update
Agent will match this boot index value against the active_index field
in the metadata, and update the metadata if there is a mismatch.

Fow now, the mechanism to pass the boot index is platform specific. On
the STM32MP1 platform, the boot index value is passed through a
memorey mapped TAMP register on the SoC.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: I0aa665ff9c1db95be8ae19ed8de6d866587d6850
2022-01-27 18:09:02 +05:30
Sughosh Ganu 0ca180f641 feat(stm32mp1): add support for reading the metadata partition
Add support for reading the FWU metadata partition. The metadata
partition stores information on the current active bank along with
information on all the FWU updatable images on the platform. This
information is then used to identify the image to be booted.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: I66bc5ac718c21a49c504e698b5b1f5c4daed2d08
2022-01-27 18:09:02 +05:30
Sughosh Ganu 8dd755314f feat(stm32mp1): add logic to select the images to be booted
With the FWU multi bank boot feature enabled, the platform can boot
from one of the multiple banks(partitions) containing the firmware
images. The bank whose firmware components are to be booted is read
from the FWU metadata structure -- the image to be booted is thus
derived by reading the metadata.

Read the metadata and set the image spec of the corresponding image
type to point to the partition from which the image is to be booted.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: I3dfdc7e9202859e917ec4e1f7d1855aad42c6b70
2022-01-27 18:09:02 +05:30
Sughosh Ganu 41bd8b9e2a feat(stm32mp1): add GUID's for identifying firmware images to be booted
Add GUID's for identifying the firmware image type. With the FWU
multi bank boot feature enabled, these GUID values are used to
identify the firmware image to be booted. This is done by matching
GUID values of images in the io policy table with the Image GUID value
that is read from the FWU metadata structure.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: Id9751f02f95fc48ef68e4e3f9f0ddbf6d6319d3c
2022-01-27 18:09:02 +05:30
Sughosh Ganu 8d6b4764f3 feat(stm32mp1): add GUID values for updatable images
With the FWU multi bank feature enabled, the identification of
firmware image type is done using the image type GUID instead of
binary_type field.

Add GUID values for the FIP image which can be updated through
the FWU firmware update feature. The GUID values are used in
identifying the firmware images.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: If7d9356aa8d2bb3fbcbc87100e6972f1a1862921
2022-01-27 18:09:02 +05:30
Sughosh Ganu 6aaf257de4 feat(fwu): pass a const metadata structure to platform routines
The metadata structure copy is passed to the platform routine to set
the image source to boot the platform from. This is done by reading
the metadata structure. Pass the metadata as a read-only copy to the
routine -- the routine only needs to consume the metadata values and
should not be able to update the metadata fields.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: I399cad99ab89c71483e5a32a1de0e22df304f8b0
2022-01-27 18:09:02 +05:30
Madhukar Pappireddy d6854cd1d9 Merge "refactor(stm32mp1): use a macro for header size" into integration 2022-01-27 01:58:50 +01:00
Jiafei Pan 40886d5ae0 refactor(ls1028a): fix header file group issue
ocram.h should be in platform includes group.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I43b6a279e48e1a173f8e7c601f2c8d48e6efc647
2022-01-26 10:13:14 +08:00
Sandrine Bailleux b19630037d Merge changes from topic "decouple-tb-mb" into integration
* changes:
  refactor(renesas): disable CRYPTO_SUPPORT option
  refactor(fvp): avoid Measured-Boot dependency on Trusted-Boot
  refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot
  build: introduce CRYPTO_SUPPORT build option
2022-01-25 08:10:58 +01:00
Madhukar Pappireddy 24dc0a2891 Merge changes from topic "st_syscfg_updates" into integration
* changes:
  feat(stm32mp1): add helper to enable high speed mode in low voltage
  refactor(stm32mp1): add helpers for IO compensation cells
  feat(stm32mp1): use clk_enable/disable functions
  feat(stm32mp1): add timeout in IO compensation
2022-01-24 23:07:01 +01:00
Takuya Sakata d544dfcc49 fix(plat/rcar3): change stack size of BL31
Increase the stack size to avoid stack overflow
when the LOG_LEVEL compile option is set high.

Signed-off-by: Hideyuki Nitta <hideyuki.nitta.jf@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I25047322763bff148dba13848a3a40f4c7cf90b7
2022-01-22 17:15:37 +01:00
Takuya Sakata 1b49ba0fde fix(plat/rcar3): fix SYSTEM_OFF processing for R-Car D3
Fixed an issue where the CPU and Cluster could not be turned OFF
when the SYSTEM_OFF has executed.

Signed-off-by: Hideyuki Nitta <hideyuki.nitta.jf@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Id476f815b58246ae0574c04ccb3eb201d09039b9
2022-01-22 17:14:50 +01:00
Manish Pandey b57d9d6f29 Merge changes from topic "new_ls1043a" into integration
* changes:
  docs(maintainers): update nxp layerscape maintainers
  docs(plat/nxp/layerscape): add ls1043a soc and board support
  feat(plat/nxp/ls1043ardb): add ls1043ardb board support
  feat(plat/nxp/ls1043a): add ls1043a soc support
  refactor(plat/ls1043): remove old implementation for platform ls1043
  feat(nxp/driver/dcfg): add some macro definition
  fix(nxp/common/setup): increase soc name maximum length
  feat(nxp/common/errata): add SoC erratum a008850
  feat(nxp/driver/tzc380): add tzc380 platform driver support
  feat(tzc380): add sub-region register definition
  feat(nxp/common/io): add ifc nor and nand as io devices
  feat(nxp/driver/ifc_nand): add IFC NAND flash driver
  feat(nxp/driver/ifc_nor): add IFC nor flash driver
  feat(nxp/driver/csu): add bypass bit mask definition
  feat(nxp/driver/dcfg): add gic address align register definition
  feat(nxp/common/rcpm): add RCPM2 registers definition
  fix(nxp/common/setup): fix total dram size checking
  feat(nxp/common): add CORTEX A53 helper functions
2022-01-20 17:29:00 +01:00
Jiafei Pan e4bd65fed8 feat(plat/nxp/ls1043ardb): add ls1043ardb board support
The LS1043A reference design board (RDB) is a computing, evaluation,
and development platform that supports the Layerscape LS1043A
architecture processor.

The old implementation in tf-a (plat/layerscape/board/ls1043/) is removed,
and this patch is adding it back, it is using the unified software
component and architecture with all the other Layerscape platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Change-Id: I83eee2f9254267b148960b05e25b6c9ba86cf07e
2022-01-20 23:38:03 +08:00
Jiafei Pan 3b0de91825 feat(plat/nxp/ls1043a): add ls1043a soc support
The LS1043A processor was NXP's first quad-core, 64-bit Arm based
processor for embedded networking.

The old implementation in tf-a (plat/layerscape/board/ls1043/) is removed,
and this patch is adding it back, it is using the unified software
component and architecture with all the other Layerscape platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: rocket <rod.dorris@nxp.com>
Change-Id: Ia3877530fae6479bd4a33bbe46b0c0d28ab43160
2022-01-20 23:38:03 +08:00
Jiafei Pan ff4ec0a036 refactor(plat/ls1043): remove old implementation for platform ls1043
Remove old implementation for Layerscape ls1043a platform, and
will added it back with unified software architecture of all
Layerscape platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: If038c19ab04d70050ec8e6ab2097b1c4f8324e87
2022-01-20 23:38:03 +08:00
Jiafei Pan 3ccd7e45a2 fix(nxp/common/setup): increase soc name maximum length
Increate SoC name length as it is not enough for some
SoC personalities.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I2142b4b5162dd3c9ab3afefcdc859063836d8bcc
2022-01-20 23:38:03 +08:00
Jiafei Pan 3d14a30b88 feat(nxp/common/errata): add SoC erratum a008850
Add SoC erratum a008850 support.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I1ef41c67737b7b5fdf1d892929a2d8040effc282
2022-01-20 23:38:03 +08:00
Jiafei Pan b759727f59 feat(nxp/common/io): add ifc nor and nand as io devices
Added IFC Nor and NAN flash as boot IO devices.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ie1b87174d9c08d4e32138066b007fef6f8e3c5dd
2022-01-20 23:38:03 +08:00
Olivier Deprez bc378a0d8b Merge "feat(tc): enable tracing" into integration 2022-01-20 10:03:47 +01:00
Yann Gautier 8be574bf66 refactor(stm32mp1): use a macro for header size
Use STM32MP_HEADER_RESERVED_SIZE macro instead of a fixed value 0x3000
in linker script.

Change-Id: I2702285c15aebaa1304a891c8aaabc949a912ba6
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-19 16:57:30 +01:00
Yann Gautier dea02f4eae feat(stm32mp1): add helper to enable high speed mode in low voltage
This new function is used to fill the register(s) responsible to enable
high speed mode for pad in low voltage (<2.7V).

Change-Id: Ib8abc6628bdf51bbe6a866bc6a9bcdeb4a84a8f4
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-19 15:28:10 +01:00
Yann Gautier 1f4513cb79 refactor(stm32mp1): add helpers for IO compensation cells
Add enable_io_comp_cell and disable_io_comp_cell local helpers
to enable or disable an IO compensation cell.

Change-Id: I65295298a7ece572ae939e2db93d10b188de0f9e
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-19 15:28:10 +01:00
Etienne Carriere c7a66e720a feat(stm32mp1): use clk_enable/disable functions
Use the clock framework functions in SYSCFG driver instead of dedicated
functions.

Change-Id: Ifb50a5207e8cecef1c80d86e2de4d70ab6bf8b8b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-19 15:19:58 +01:00
Nicolas Le Bayon de02e9b0ec feat(stm32mp1): add timeout in IO compensation
Use a timeout during IO compensation enable function, when
waiting for ready status. If timeout expires, print a warning
message, to indicate that the SoC recommendation is not followed.

Change-Id: I98c7dcb1364b832f4f4b5fc9a0b85a3741a8af4b
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-19 15:19:58 +01:00
Manish Pandey e1c018e807 Merge "fix(imx8mp): change the BL31 physical load address" into integration 2022-01-19 12:02:33 +01:00
Jiafei Pan d374060abe feat(nxp/common/rcpm): add RCPM2 registers definition
Added some RCPM2 register offset definiton for register: IPSTPCR,
IPSTPACKR and POWMGTDCR, also added OVRD bit definiton of register
POWMGTDCR.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I301bc1401e053c2089b5eb3672c6e649c805a2ab
2022-01-19 11:36:23 +08:00
Jiafei Pan 0259a3e828 fix(nxp/common/setup): fix total dram size checking
total_dram_size should be signed value because it is equal to return
value of init_ddr(), so if it is lower or equal zero, report
error as DDR is not initialized correctly.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Idbc40da103f60f10cb18c5306e97b764c1a9d372
2022-01-19 11:36:23 +08:00
Jiafei Pan 3ccc8ac3e5 feat(nxp/common): add CORTEX A53 helper functions
Add helper function to disable the load-store prefetch.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I36d7be37e0b800ab1e5842a56cfd04d779338868
2022-01-19 11:36:23 +08:00
Madhukar Pappireddy 97c9114787 Merge changes from topic "st_mapping_update" into integration
* changes:
  feat(stm32mp1): enable BL2_IN_XIP_MEM to remove relocation sections
  refactor(stm32mp1): reduce MMU memory regions and split XLAT by context
  feat(st): map 2MB for ROM code
  fix(stm32mp1): restrict DEVICE2 mapping in BL2
2022-01-13 23:10:48 +01:00
jason-ch chen 635e6b108e feat(mt8186): add Vcore DVFS driver
Add Vcore DVFS to SPM driver.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I52b241b2cdb792be74390cbaa09a728ddbe6593a
2022-01-13 10:11:39 +08:00
jason-ch chen 7ac6a76c47 feat(mt8186): add SPM suspend driver
Add SPM suspend driver for suspend/resume features.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I25b4b97cd3138a7b347385539e47ccfa884d64fc
2022-01-13 10:10:56 +08:00
Davidson K 59da207e2f feat(tc): enable tracing
Total Compute has ETE and TRBE tracing components and they have
to be enabled to capture the execution trace of the processor.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I3c86c11be2c655a61ecefa3eb2e4e3951577a113
2022-01-12 15:09:59 +05:30
Yann Gautier d958d10eb3 feat(stm32mp1): enable BL2_IN_XIP_MEM to remove relocation sections
Because the BL2 is not relocated, the usage of BL2_IN_XIP_MEM
can be used. It reduces the binary size by removing all relocation
sections. XIP will not be used when STM32MP_USE_STM32IMAGE is
defined. Introduce new definitions for SEPARATE_CODE_AND_RODATA.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Ifd76f14e5bc98990bf84e0bfd4ee0b4e49a9a293
2022-01-12 09:21:14 +01:00
Yann Gautier ac1b24d58a refactor(stm32mp1): reduce MMU memory regions and split XLAT by context
Simplify the BL2 MMU mapping and reduce the memory regions
number. Split the XLAT define between BL2 and BL32 as binaries
do not share the same tables anymore.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Iaf09e72b4cc29acbe376f6f1cd2a8116c793ba26
2022-01-12 09:21:14 +01:00
Yann Gautier 1697ad8cc8 feat(st): map 2MB for ROM code
This allows reducing MMU tables, and as there is nothing after ROM code
in memory mapping, this has no impact.

Change-Id: If51facb96a523770465cb06eb1ab400f75d26db3
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2022-01-12 09:21:14 +01:00
Yann Gautier db3e0ece71 fix(stm32mp1): restrict DEVICE2 mapping in BL2
Only NAND memory map area can be of interest for BL2 in the
DEVICE2 area. Map DEVICE2 under STM32MP_RAW_NAND flag.

Change-Id: I7e3b39579e4a2525b25cb1987d6ec38038d0de2b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-01-12 09:21:14 +01:00
Ying-Chun Liu (PaulLiu) 32d5042204 fix(imx8mp): change the BL31 physical load address
Change BL31 load address to 0x970000. This was done by Change-Id
I96d572fc. But then changed back to 0x960000 by Change-Id I8308c629.
However, 0x970000 is the correct value thus we change it back again.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Change-Id: Ia0db4877123b89072f723d18e2bcce25ef38f47d
2022-01-12 10:33:27 +08:00
Manish V Badarkhe d52ed0240f refactor(renesas): disable CRYPTO_SUPPORT option
Disabled CRYPTO_SUPPORT option for Renesas platform as it does not
follow the TF-A authentication mechanism where Trusted-Boot mandates
Crypto module support.

Change-Id: I3aa771e983e3dde083dd8a861f25c0714ffd707f
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-01-11 23:15:27 +00:00
Manish V Badarkhe 88c51c3f20 refactor(fvp): avoid Measured-Boot dependency on Trusted-Boot
As Measured-Boot and Trusted-Boot are orthogonal, removed
Trusted-Boot's dependency on Measured-Boot by allowing them
to apply the Crypto module changes independently using the
CRYPTO_SUPPORT build flag.

Change-Id: I5a420e5d84f3fefe0c0092d822dab981e6390bbf
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-01-11 23:14:06 +00:00
Madhukar Pappireddy e537bcdedb Merge "feat(mt8195): apply erratas of CA78 for MT8195" into integration 2022-01-11 00:25:01 +01:00
Manish Pandey f7a92518f6 Merge changes from topic "st_ddr_updates" into integration
* changes:
  refactor(st-ddr): move basic tests in a dedicated file
  refactor(st-ddr): reorganize generic and specific elements
  feat(stm32mp1): allow configuration of DDR AXI ports number
  refactor(st-ddr): update parameter array initialization
  feat(st-ddr): add read valid training support
  refactor(stm32mp1): remove the support of calibration result
  fix(st-ddr): correct DDR warnings
2022-01-07 17:24:54 +01:00
Manish Pandey 32de790f02 Merge "fix(st): manage UART clock and reset only in BL2" into integration 2022-01-07 17:09:53 +01:00
Manish Pandey cbbcf9b118 Merge changes Ifea8148e,I73559522 into integration
* changes:
  fix(morello): include errata workaround for 1868343
  fix(errata): workaround for Rainier erratum 1868343
2022-01-06 12:01:41 +01:00
Yann Gautier 9e52d45fdf fix(st): manage UART clock and reset only in BL2
As the UART is already initialized, no need to check for UART clock
or reset in next BL. An issue can appear if the next BL device tree
(e.g HW_CONFIG) doesn't use the same clocks or resets (like SCMI ones).

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I044ef2386abe2d3dba5a53c3685440d64ca50a4f
2022-01-05 18:54:59 +01:00