Commit graph

13355 commits

Author SHA1 Message Date
Govindraj Raja
f5211420b5 refactor(cpufeat): refactor arch feature build options
Current build infra defaults all cpufeats in defaults.mk and some
mandatory features are enabled in arch_features.mk and optional
arch features are enabled in platform specific makefile.
This fragmentation is sometime confusing to figure out which feature
is tied to which ARCH_MAJOR.ARCH_MINOR.

So, consolidating and grouping them for tracking and enabling makes
more sense. With this change we consolidate all ARCH feature handling
within arch_features.mk and disable all optional features that need
to be enabled to platform makefile.

This is an ongoing series of effort to consolidate and going forward
platform makefile should just specify ARCH_MAJOR and ARCH MINOR and
all mandatory feature should be selected based on arch_features.mk
any optional feature needed by the platform support can be enabled
by platform makefile.

It also makes it easier for platform ports to look upto arch_features.mk
and enable any optional feature that platform may need which are
supported from TF-A.

Change-Id: I18764008856d81414256b6cbabdfa42a16b8040d
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-09-15 14:53:08 +02:00
Manish V Badarkhe
cc933e1d12 Merge changes from topic "stm32mp2" into integration
* changes:
  feat(stm32mp2): generate stm32 file
  feat(stm32mp2-fdts): add stm32mp257f-ev1 board
  feat(stm32mp2-fdts): introduce stm32mp25 pinctrl files
  feat(stm32mp2-fdts): introduce stm32mp25 SoCs family
  feat(stm32mp2): add console configuration
  feat(st): add RCC registers list
  feat(st-uart): add AARCH64 stm32_console driver
  feat(st): introduce new platform STM32MP2
  feat(dt-bindings): add the STM32MP2 clock and reset bindings
  docs(changelog): add scopes for STM32MP2
  feat(docs): introduce STM32MP2 doc
  refactor(docs): add a sub-menu for ST platforms
  refactor(st): move plat_image_load.c
  refactor(st): rename PLAT_NB_FIXED_REGS
  refactor(st): move some storage definitions to common part
  refactor(st): move SDMMC definitions to driver
  feat(st-clock): stub fdt_get_rcc_secure_state
  feat(st-clock): allow aarch64 compilation of STGEN functions
  feat(st): allow AARCH64 compilation for common code
  refactor(st): rename QSPI macros
2023-09-15 09:41:44 +02:00
Manish V Badarkhe
44a267b59e Merge changes from topic "xlnx_mmap_dynamic_dtb" into integration
* changes:
  fix(xilinx): dcache flush for dtb region
  fix(xilinx): dynamic mmap region for dtb
2023-09-15 08:44:42 +02:00
Sandrine Bailleux
d4635e9998 Merge "feat(qemu): add A55 cpu support for virt" into integration 2023-09-15 08:20:15 +02:00
Olivier Deprez
4bb6bd1e5b Merge "fix(plat/arm): do not program DSU CLUSTERPWRDN register" into integration 2023-09-14 18:10:29 +02:00
Madhukar Pappireddy
75bfc18d6c Merge "fix: bl2 start address for RESET_TO_BL2+ENABLE_PIE" into integration 2023-09-14 17:49:54 +02:00
Manish Pandey
3209b35d2a fix(plat/arm): do not program DSU CLUSTERPWRDN register
This reverts commit 9cf7f355ce.

Above mentioned commit was writing to cluster power required bit of
CLUSTERPWRDN register, which provides an advisory status to the power
controller.
Bit definition indication:
0 : Cluster power is not required when all cores are powered down
1 : Cluster power is required even when all cores are powered down
RESET value of this bit is 0

The current implementation in TF-A just programs this bit to 0 when
cluster power down is done but it never sets it to 1. Which actully
does not change any behaviour as the value of this bit always remains 0.

Ideally this bit has to be set to 1 when a core powers up (as RESET
value is 0) and set it to 0 for any core power down except if its last
man standing, in that case we need to ensure the target power level
from OS is cluster then we can do set it to 0.
There also are some investigation needs to be done to find that whether
we need a explicit message to power controller for turning cluster OFF
or it will happen automatically.

Considering this needs a bit of analysis as well as a platform to test
it on, revert the changes which impact the programming during cluster
power down and just keep register defnition.

Change-Id: I4c4ebedae7ca9cd081fb1e0605b9d906d77614d9
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2023-09-14 11:42:14 +01:00
Olivier Deprez
61412f799f Merge "fix(fvp): conditionally increase XLAT and MMAP table entries" into integration 2023-09-14 09:15:45 +02:00
Amit Nagal
93ed138006 fix(xilinx): dcache flush for dtb region
flush dcache region for dtb so that dtb cache entries are first written
to disk and are invalidated afterwards to avoid presence of any stale
dtb related entry in the dcache.

Change-Id: Ide0ed58f799b35b690ed790c7498ecdc334e02f5
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
2023-09-13 18:37:39 +02:00
Amit Nagal
7ca7fb1bf0 fix(xilinx): dynamic mmap region for dtb
mmap dtb region before usage and unmap it after usage.
overall size(text,data,bss) of dtb gets reduced by
16 bytes in normal flow and 80 bytes in ddr flow.

Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Change-Id: I411deff57ab141fc2978a2e916aec2d988cb8f9c
2023-09-13 18:36:00 +02:00
Sandrine Bailleux
512e0be0d4 Merge "feat(qemu): add "cortex-a710" cpu support" into integration 2023-09-13 16:03:26 +02:00
Manish V Badarkhe
03cf4e9aad fix(fvp): conditionally increase XLAT and MMAP table entries
The XLAT and MMAP table entries are increased as a part of this
patch: 12fe591 , but this is causing failures for some builds,
so conditionally increased the XLAT and MMAP table entries

Change-Id: I31e8c811bebc767d7187e045a35c9db0eef13ae0
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-09-13 15:02:18 +01:00
Mark-PK Tsai
409c20c84d feat(qemu): add A55 cpu support for virt
Add support to "cortex-a55" cpu for "qemu" ('virt') platform.

Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Change-Id: I2693892be735eda91494b767322935ddb63c9f48
2023-09-13 20:08:32 +08:00
Marcin Juszkiewicz
4734a62d2c feat(qemu): add "cortex-a710" cpu support
Add support to qemu "cortex-a710" cpu for "qemu" platform.

CPU is supported by qemu/virt only as qemu/sbsa-ref memory starts at
2^40 which is limit for Cortex-A710.

Switched 'qemu' platform to be built as armv8.5 to cover features of
new cpu core.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: I035790eac41b2caf7f13167e53f48c16f0827754
2023-09-13 10:18:15 +01:00
Olivier Deprez
d478ac16c9 fix: bl2 start address for RESET_TO_BL2+ENABLE_PIE
BL31 image has grown with feature addition over time. In particular the
RESET_TO_BL2 + ENABLE_PIE + DEBUG combination of options lead to BL31
image overlap head of BL2 image. In this configuration BL2 is meant to
stay resident as PE reset occurs from BL2. Apply changes similar to [1]
such that BL2 start address is pushed forward and leaves more room for
BL31 end of image.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/15486/9/include/plat/arm/common/arm_def.h#530

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I027e23780fb77ca9fe81aa47231da649c7a030ee
2023-09-12 18:01:37 +02:00
Manish Pandey
55e37408d5 Merge "refactor(arm): avoid setting HASH_PREREQUISITES for a build without ROT_KEY" into integration 2023-09-12 16:32:49 +02:00
Manish V Badarkhe
f1ed218a9f Merge "feat(mbedtls): update to 3.4.1" into integration 2023-09-12 16:20:10 +02:00
Olivier Deprez
2e20069b2b Merge "docs(maintainers): add maintainers for i.MX9 SoCs" into integration 2023-09-12 14:10:39 +02:00
Sandrine Bailleux
e686cdb450 feat(mbedtls): update to 3.4.1
Update TF-A documentation to recommend using the latest and greatest
release of mbedTLS library to this date, i.e. version 3.4.1. The
upgrade was successfully tested by the OpenCI running all existing
test configs, in particular trusted boot and measured boot related
ones.

The reason for this upgrade is simply to obey TF-A's guideline to
always use up-to-date security libraries. mbedTLS 3.4.1 release
notes [1] do not list any changes that should affect TF-A.

[1] https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.4.1

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ifc31c2fc825a2fc9ca318ea8baadd51b670e7a4e
2023-09-12 11:38:56 +02:00
Manish V Badarkhe
bc6bd65bf0 Merge changes from topic "mb/spm+rme-tb-mb-support" into integration
* changes:
  fix(fvp): increase the maximum size of Event Log
  fix(fvp): increase maximum MMAP and XLAT entries count
  fix(arm): add Event Log area behind Trustzone Controller
  fix(tbbr): unrecognised 'tos-fw-key-cert' option
2023-09-12 10:12:51 +02:00
Manish V Badarkhe
e29693d9c1 Merge "feat(fvp): capture timestamps in bl stages" into integration 2023-09-11 14:57:18 +02:00
Bipin Ravi
e99df5c295 Merge changes from topic "sm/errata_X3" into integration
* changes:
  fix(cpus): workaround for Cortex-X3 erratum 2742421
  feat(errata_abi): add support for Cortex-X3
2023-09-08 22:18:32 +02:00
Madhukar Pappireddy
77fc89fd22 Merge "fix(docs): replace deprecated urls under tfa/docs" into integration 2023-09-08 18:32:26 +02:00
Yann Gautier
e5839ed79e feat(stm32mp2): generate stm32 file
To be able to boot, STM32MPU platforms require the BL2 binary (together
with its DT) to be preceded with an STM32 header. Add the required
files and macro to properly generate this header.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I675de2c5cb733fe9d9e9baf76a941741a06dfac8
2023-09-08 10:56:49 +02:00
Alexandre Torgue
9aa5371f2f feat(stm32mp2-fdts): add stm32mp257f-ev1 board
Add STM32MP257F Evaluation board support. It embeds a STM32MP257FAI
SoC, with 4GB of DDR4, TSN switch (2+1 ports), 2*USB typeA, 1*USB2
typeC, SNOR OctoSPI, mini PCIe, STPMIC2 for power distribution ...

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I92da3a7085a4d2f2d606777c4215aed55f77c589
2023-09-08 10:56:49 +02:00
Alexandre Torgue
2c62cc4a87 feat(stm32mp2-fdts): introduce stm32mp25 pinctrl files
Three packages exist for stm32mp25 dies. As ball-out is different
between them, this patch covers those differences by introducing
dedicated pinctrl dtsi files. Each dtsi pinctrl package file
describes the package ball-out through gpio-ranges.

Available packages are:

STM32MP25xAI: 18*18/FCBGA 172 ios
STM32MP25xAK: 14*14/FCBGA 144 ios
STM32MP25xAL: 10*10/TFBGA 144 ios

It includes also the common file used for pin groups definition.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I8500ccccb7a96748f36ffc80edc91da8595f4da8
2023-09-08 10:56:49 +02:00
Alexandre Torgue
0dc283d29e feat(stm32mp2-fdts): introduce stm32mp25 SoCs family
STM32MP25 family is composed of 4 SoCs defined as following:

-STM32MP251: common part composed of 1*Cortex-A35, common peripherals
like SDMMC, UART, SPI, I2C, PCIe, USB3, parallel and DSI display,
1*ETH ...

-STM32MP253: STM32MP251 + 1*Cortex-A35 (dual CPU), a second ETH,
CAN-FD and LVDS display.

-STM32MP255: STM32MP253 + GPU/AI and video encode/decode.
-STM32MP257: STM32MP255 + ETH TSN switch (2+1 ports).

A second diversity layer exists for security features/ A35 frequency:
-STM32MP25xY, "Y" gives information:
 -Y = A means A35@1.2GHz + no cryp IP and no secure boot.
 -Y = C means A35@1.2GHz + cryp IP and secure boot.
 -Y = D means A35@1.5GHz + no cryp IP and no secure boot.
 -Y = F means A35@1.5GHz + cryp IP and secure boot.

Change-Id: Icd1351e20b862675d257dede55df190a90acbd59
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
Yann Gautier
87a940e027 feat(stm32mp2): add console configuration
Use UART driver and fill helpers for crash console.
Add early console setup in bl2_el3_early_platform_setup().

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ifb39554214dec05dafe4e306f8754e1454cdab61
2023-09-08 10:56:49 +02:00
Yann Gautier
4cfbb84aeb feat(st): add RCC registers list
Add a header file listing the registers of Reset and Clock Control
peripheral.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Icc90132d5782eba7e343868b932a399c1d47c18a
2023-09-08 10:56:49 +02:00
Yann Gautier
c6d070cdba feat(st-uart): add AARCH64 stm32_console driver
It is an adaptation for AARCH64 of the already existing AARCH32 driver.

Change-Id: Ifabf716a6bd188d2249650a34bbec1a602bcb017
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
Yann Gautier
35527fb418 feat(st): introduce new platform STM32MP2
This new STMicroelectronics SoC is based on a dual Cortex-A35.
For the moment, only BL2 is compiled with the common parts for ST
platforms.

Change-Id: I1bc4e6835dba4230359ea9b26d736791e27258aa
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
Gabriel Fernandez
3ccb708ece feat(dt-bindings): add the STM32MP2 clock and reset bindings
Add the associated bindings for device tree and drivers.

Change-Id: I6847df691d4b00f48d2d87a33fbf4ccd62ae5dcf
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
2023-09-08 10:56:49 +02:00
Yann Gautier
3f6c16f027 docs(changelog): add scopes for STM32MP2
Add stm32mp2 and stm32mp2-fdts scopes.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4d1918cf40d44244675f58e6967119515edba943
2023-09-08 10:56:49 +02:00
Yann Gautier
ee5076f971 feat(docs): introduce STM32MP2 doc
STM32MP2x is a new family of microprocessors designed by
STMicroelectronics and based on Arm Cortex-A35.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I741ed0a701a614817a4d0b65d3d6f4e6a79da6a9
2023-09-08 10:56:49 +02:00
Yann Gautier
ce7f8044c7 refactor(docs): add a sub-menu for ST platforms
In order to ease introduction of new STM32 MPUs platforms, a dedicated
ST sub-menu (and directory) is created.
The old page is kept, but with an orphan parameter to avoid build
issues with the docs, and to avoid listing it in the menu. It is
updated to just have links with the new pages.
A new page STM32 MPUs is created to group common options for all STM32
MPUs.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I799b57967d76a985835c7a3d9d6ab21beb44ba40
2023-09-08 10:56:49 +02:00
Yann Gautier
954048f436 refactor(st): move plat_image_load.c
This file is common for ST platforms, move it to plat/st/common/.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I7cefbc7f857d4ea63320042988c86d28e8a3cc09
2023-09-08 10:56:49 +02:00
Pascal Paillet
cff2b1145d refactor(st): rename PLAT_NB_FIXED_REGS
Rename PLAT_NB_FIXED_REGS to PLAT_NB_FIXED_REGUS.
This avoids confusion with regulators and registers.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Change-Id: Idb2de7204fe978ffcdd729e6cbe453e85fd089b5
2023-09-08 10:56:49 +02:00
Yann Gautier
b4939bef12 refactor(st): move some storage definitions to common part
Those storage macros are common to all STM32MPU chips, move them to
plat/st/common/include/stm32mp_io_storage.h

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Id20ec00ba65edf9ec7a3a89adfda307c954c3cb6
2023-09-08 10:56:49 +02:00
Yann Gautier
136f632fbc refactor(st): move SDMMC definitions to driver
Those specific SDMMC definitions are only used in stm32_sdmmc2.c driver.
Move them there.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Iac7e505e9421aa7630bee8ce6fc2277b98581995
2023-09-08 10:56:49 +02:00
Yann Gautier
19c38081d3 feat(st-clock): stub fdt_get_rcc_secure_state
The function fdt_get_rcc_secure_state() is only used in BL32.
Put it under flag to avoid compilation errors.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: If57c65bef0b1a3f7349527720f94fde26edbb73c
2023-09-08 10:56:49 +02:00
Yann Gautier
b1718c6382 feat(st-clock): allow aarch64 compilation of STGEN functions
A new local function is created to set STGEN counter value,
that will deal with __aarch64__ flag. And the function
stm32mp_stgen_get_counter is adapted for __aarch64__.

Change-Id: I53c21ad11ba5085611a028790e1decbe5994ae50
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
Yann Gautier
dad7181698 feat(st): allow AARCH64 compilation for common code
Use read_sctlr_el3() for aarch64 code instead of read_sctlr().

Change-Id: I17b5d1f8cb2918de6ab1d2d56c15cabca0ed43fd
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
Yann Gautier
b0ce402457 refactor(st): rename QSPI macros
To have a more generic code, remove the Q from the *QSPI macros.

Change-Id: I2fa94b54054036c2175df3dfddcb76eec1119ad2
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2023-09-08 10:56:49 +02:00
thagon01-arm
ed8f06ddda feat(fvp): capture timestamps in bl stages
When ENABLE_RUNTIME_INSTRUMENTATION flag is set timestamps are captured
and output to the fvp console at various boot stages using the PMF
library (which are based on aarch timers).

Timestamps are captured at entry and exit points for Bl1, Bl2
and, Bl3 respectively.

Change-Id: I7c0c502e5dbf73d711700b2fe0085ca3eb9346d2
Signed-off-by: Thaddeus Serna <Thaddeus.Gonzalez-Serna@arm.com>
2023-09-07 23:38:43 +02:00
Sona Mathew
5b0e4438d0 fix(cpus): workaround for Cortex-X3 erratum 2742421
Cortex-X3 erratum 2742421 is a Cat B erratum that applies to
all revisions <= r1p1 and is fixed in r1p2. The workaround is to
set CPUACTLR5_EL1[56:55] to 2'b01.

SDEN documentation:
https://developer.arm.com/documentation/2055130/latest

Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
Change-Id: Idadd323e419739fe909b9b68ea2dbe857846666b
2023-09-07 16:31:47 -05:00
Thaddeus Serna
5fdf198c11 fix(docs): replace deprecated urls under tfa/docs
Fixed internal links refrenced inside tfa/docs.
Followed https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role
for instrustion on how to link sections within other documents.

Signed-off-by: Thaddeus Serna <thaddeus.gonzalez-serna@arm.com>
Change-Id: I8e7c090d98951b1e3d393ab5b1d6bcdaa1865c6f
2023-09-07 16:29:11 -05:00
Sona Mathew
9c16521606 feat(errata_abi): add support for Cortex-X3
Add errata ABI support for Cortex-X3 CPU.

Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
Change-Id: Ifb68178948860cafe25b351f20c480c847608a1b
2023-09-07 16:27:04 -05:00
Mark Dykes
d2b66cc87e Merge "fix(cpus): workaround for Neoverse N2 erratum 2009478" into integration 2023-09-07 23:05:48 +02:00
Manish V Badarkhe
8e790490e3 Merge "feat(qemu): add dummy plat_mboot_measure_key() BL1 function" into integration 2023-09-07 17:47:53 +02:00
Manish V Badarkhe
f1dfaa42cf fix(fvp): increase the maximum size of Event Log
To make room for all image measurements using the
RME+SPM+TBB+MEASURED_BOOT test configuration, the Event Log's maximum
size has been significantly increased.

Change-Id: I0b9948dab893e14677bca0afa07167648a6c2729
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-09-07 15:55:59 +01:00