Commit graph

10836 commits

Author SHA1 Message Date
Jassi Brar
a19382521c feat(synquacer): add FWU Multi Bank Update support
Add FWU Multi Bank Update support. This reads the platform metadata
and update the FIP base address so that BL2 can load correct BL3X
based on the boot index.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I5d96972bc4b3b9a12a8157117e53a05da5ce89f6
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-06-27 13:12:24 -05:00
Jassi Brar
19aaeea00b feat(synquacer): add TBBR support
enable Trusted-Boot for Synquacer platform.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I2608b4d573d95d55da1fc5544333e0dbf3f763f2
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-06-27 13:12:24 -05:00
Jassi Brar
48ab390444 feat(synquacer): add BL2 support
Add BL2 support by default. Move the legacy mode behind the
RESET_TO_BL31 define.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: Ic490745a7e8f6114172733428ebd6bd6adfcc1ec
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-06-27 13:12:24 -05:00
Jassi Brar
3ba82d5ff1 refactor(synquacer): move common source files
Prepare for introduction of BL2 support by moving
reusable files from BL31_SOURCES into PLAT_BL_COMMON_SOURCES

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I21137cdd40d027cfa77f1dec3598ee85d4873581
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-06-27 13:12:24 -05:00
Madhukar Pappireddy
3f261a564e Merge changes from topic "ns/cpu_info" into integration
* changes:
  feat(plat/arm/sgi): increase memory reserved for bl31 image
  feat(plat/arm/sgi): read isolated cpu mpid list from sds
2022-06-22 17:45:45 +02:00
Madhukar Pappireddy
0f93168c01 Merge "feat(board/rdn2): add a new 'isolated-cpu-list' property" into integration 2022-06-22 17:45:40 +02:00
Madhukar Pappireddy
daa4df63c6 Merge changes from topic "st_clk_fixes" into integration
* changes:
  fix(st-clock): correct MISRA C2012 15.6
  fix(st-clock): correctly check ready bit
2022-06-21 17:19:58 +02:00
Yann Gautier
56f895ede3 fix(st-clock): correct MISRA C2012 15.6
Add braces to correct MISRA C2012 15.6 warning:
The body of an iteration-statement or a selection-statement shall be a
compound-statement.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If26f3732d31df11bf389a16298ec9e9d8a4a2279
2022-06-21 16:01:10 +02:00
Yann Gautier
3b06a53044 fix(st-clock): correctly check ready bit
The function clk_oscillator_wait_ready() was wrongly checking the set
bit and not the ready bit. Correct that by using osc_data->gate_rdy_id
when calling _clk_stm32_gate_wait_ready().

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ida58f14d7f0f326b580ae24b98d6b9f592d2d711
2022-06-21 16:01:06 +02:00
Nishant Sharma
a62cc91aee feat(plat/arm/sgi): increase memory reserved for bl31 image
Increase the size of bl31 image by 52K to accomodate increased size of
xlat table.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Ic3a8d8be1104adf48d22aa829e2197f710b6b666
2022-06-21 13:59:53 +01:00
Nishant Sharma
4243ef41d4 feat(plat/arm/sgi): read isolated cpu mpid list from sds
Add support to read the list of isolated CPUs from SDS and publish this
list via the non-trusted firmware configuration file for the next stages
of boot software to use.

Isolated CPUs are those that are not to be used on the platform for
various reasons. The isolated CPU list is an array of MPID values of the
CPUs that have to be isolated.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I4313cf025f4c9e9feffebca2d35b259f5bafce69
2022-06-21 13:59:39 +01:00
Manish Pandey
84adb0519e Merge changes from topic "mb/gic600-errata" into integration
* changes:
  refactor(arm): update BL2 base address
  refactor(nxp): use DPG0 mask from Arm GICv3 header
  fix(gic600): implement workaround to forward highest priority interrupt
2022-06-21 14:11:47 +02:00
Nishant Sharma
afa41571b8 feat(board/rdn2): add a new 'isolated-cpu-list' property
Add a new property named 'isolated-cpu-list' to list the CPUs that are
to be isolated and not used by the platform. The data represented by
this property is formatted as below.

  strutct isolated_cpu_mpid_list {
          uint64_t count;
          uint64_t mpid_list[MAX Number of PE];
  }

Also, the property is pre-initialized to 0 to reserve space for the
property in the dtb. The data for this property is read from SDS and
updated during boot. The number of entries in this list is equal to the
maximum number of PEs present on the platform.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I4119f899a273ccbf8259e0d711d3a25501c7ec64
2022-06-21 12:41:54 +01:00
Manish Pandey
4e898483de Merge changes from topic "uart_segregation_v2" into integration
* changes:
  feat(sgi): add page table translation entry for secure uart
  feat(sgi): route TF-A logs via secure uart
  feat(sgi): deviate from arm css common uart related definitions
2022-06-21 12:42:08 +02:00
Rohit Mathew
2a7e080cc5 feat(sgi): add page table translation entry for secure uart
Add page table translation entry for secure uart so that logs from
secure partition can be routed via the same.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I3416d114bcee13824a7d0861ee54fb799e154897
2022-06-17 15:27:45 +01:00
Rohit Mathew
0601083f0c feat(sgi): route TF-A logs via secure uart
Route the boot, runtime and crash stage logs via secure UART port
instead of the existing use of non-secure UART. This aligns with the
security state the PE is in when logs are put out. In addition to this,
this allows consolidation of the UART related macros across all the
variants of the Neoverse reference design platforms.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I417f5d16457b602c94da4c74b4d88bba03da7462
2022-06-17 15:27:18 +01:00
Rohit Mathew
173674ae42 feat(sgi): deviate from arm css common uart related definitions
The Neoverse reference design platforms will migrate to use different
set of secure and non-secure UART ports. This implies that the board
specific macros defined in the common Arm platform code will no longer
be usable for Neoverse reference design platforms.

In preparation for migrating to a different set of UART ports, add a
Neoverse reference design platform specific copy of the board
definitions. The value of these definitions will be changed in
subsequent patches.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I1ab17a3f02c8180b63be24e9266f7129beee819f
2022-06-17 15:26:39 +01:00
Manish Pandey
0938847fc7 Merge "docs(security): update security advisory for CVE-2022-23960" into integration 2022-06-17 11:10:35 +02:00
Bipin Ravi
37200ae08b docs(security): update security advisory for CVE-2022-23960
Update advisory document following Spectre-BHB mitigation support for
additional CPUs.

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I4492397f18882f514beff4da06afe973acecf1f0
2022-06-16 17:04:09 -05:00
Madhukar Pappireddy
ffa3f9423b Merge "fix(errata): workaround for Neoverse-V1 erratum 2372203" into integration 2022-06-16 23:30:22 +02:00
Madhukar Pappireddy
75fb34d5f8 Merge "fix(errata): workaround for Cortex-A77 erratum 2356587" into integration 2022-06-16 22:06:40 +02:00
Bipin Ravi
7bf1a7aaaa fix(errata): workaround for Cortex-A77 erratum 2356587
Cortex-A77 erratum 2356587 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[0] of
CPUACTLR2_EL1 to force PLDW/PFRM ST to behave like PLD/PRFM LD and not
cause invalidations to other PE caches.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1152370/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I243cfd587bca06ffd2a7be5bce28f8d2c5e68230
2022-06-16 12:23:53 -05:00
Bipin Ravi
57b73d5533 fix(errata): workaround for Neoverse-V1 erratum 2372203
Neoverse-V1 erratum 2372203 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[40] of
CPUACTLR2_EL1 to disable folding of demand requests into older
prefetches with L2 miss requests outstanding.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1401781/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ice8c2e5a0152972a35219c8245a2e07e646d0557
2022-06-16 12:09:01 -05:00
Manish V Badarkhe
69a131d894 refactor(arm): update BL2 base address
BL2 base address updated to provide enough space for BL31 in
Trusted SRAM when building with BL2_AT_EL3 and ENABLE_PIE options.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ieaba00d841648add855feb99b7923a4b0cccfb08
2022-06-15 22:02:18 +01:00
Manish V Badarkhe
76398c02a6 refactor(nxp): use DPG0 mask from Arm GICv3 header
Removed GICR_CTLR_DPG0_MASK definition from platform GIC header file
as Arm GICv3 header file added its definition.

Change-Id: Ieec43aeef96b9b6c8a7f955a8d145be6e4b183c5
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-06-15 22:02:18 +01:00
Manish V Badarkhe
e1b15b09a5 fix(gic600): implement workaround to forward highest priority interrupt
If the interrupt being targeted is released from the CPU before the
CLEAR command is sent to the CPU then a subsequent SET command may not
be delivered in a finite time. To workaround this, issue an unblocking
event by toggling GICR_CTLR.DPG* bits after clearing the cpu group
enable (EnableGrp* bits of GIC CPU interface register)
This fix is implemented as per the errata 2384374-part 2 workaround
mentioned here:
https://developer.arm.com/documentation/sden892601/latest/

Change-Id: I13926ceeb7740fa4c05cc5b43170e7ce49598f70
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-06-15 22:02:13 +01:00
Madhukar Pappireddy
100da90ca8 Merge "build(changelog): add stm32mp13 and stm32mp15 scopes" into integration 2022-06-15 17:15:47 +02:00
Madhukar Pappireddy
299d38100a Merge "fix(errata): workaround for Neoverse-V1 erratum 2294912" into integration 2022-06-13 22:55:09 +02:00
Bipin Ravi
39eb5ddbbf fix(errata): workaround for Neoverse-V1 erratum 2294912
Neoverse-V1 erratum 2294912 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[0] of
CPUACTLR2_EL1 to force PLDW/PFRM ST to behave like PLD/PRFM LD and not
cause invalidations to other PE caches.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1401781/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ia7afb4c42fe66b36fdf38a7d4281a0d168f68354
2022-06-13 21:15:41 +02:00
Madhukar Pappireddy
bc779e1629 Merge "feat(zynqmp): add support for xck24 silicon" into integration 2022-06-13 20:12:31 +02:00
Manish Pandey
cadd6afcc1 Merge "refactor(context mgmt): refactor EL2 context save and restore functions" into integration 2022-06-13 14:18:57 +02:00
Manish Pandey
aaf1d8df0d Merge changes from topic "jc/detect_feat" into integration
* changes:
  feat(trbe): add trbe under feature detection mechanism
  feat(brbe): add brbe under feature detection mechanism
2022-06-10 11:57:12 +02:00
Madhukar Pappireddy
7460c41d27 Merge "fix(mmc): remove broken, unsecure, unused eMMC RPMB handling" into integration 2022-06-09 16:23:04 +02:00
Zelalem Aweke
d20052f33a refactor(context mgmt): refactor EL2 context save and restore functions
This patch splits the el2_sysregs_context_save/restore functions
into multiple functions based on features. This will allow us to
selectively save and restore EL2 context registers based on
features enabled for a particular configuration.

For now feature build flags are used to decide which registers
to save and restore. The long term plan is to dynamically check
for features that are enabled and then save/restore registers
accordingly. Splitting el2_sysregs_context_save/restore functions
into smaller assembly functions makes that task easier. For more
information please take a look at:
https://trustedfirmware-a.readthedocs.io/en/latest/design_documents/context_mgmt_rework.html

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I1819a9de8b70fa35c8f45568908025f790c4808c
2022-06-08 12:48:41 +01:00
Soby Mathew
65841e6660 Merge "fix(rme/fid): refactor RME fid macros" into integration 2022-06-08 13:37:33 +02:00
Ahmad Fatoum
86b015eb1b fix(mmc): remove broken, unsecure, unused eMMC RPMB handling
Replay-protected memory block access is enabled by writing 0x3
to PARTITION_ACCESS (bit[2:0]). Instead the driver is using the
first boot partition, which does not provide any playback protection.
Additionally, it unconditionally activates the first boot partition,
potentially breaking boot for SoCs that consult boot partitions,
require boot ack or downgrading to an old bootloader if the first
partition happens to be the inactive one.

Also, neither enabling or disabling the RPMB observes the
PARTITION_SWITCH_TIME. As there are no in-tree users for these
functions, drop them for now until a properly functional implementation
is added. That one will likely share most code with the existing boot
partition switch, which doesn't suffer from the described issues.

Change-Id: Ia4a3f738f60a0dbcc33782f868cfbb1e1c5b664a
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2022-06-08 08:57:05 +02:00
Madhukar Pappireddy
925ce79136 Merge changes from topic "stm32mp-emmc-boot-fip" into integration
* changes:
  feat(stm32mp1): extend STM32MP_EMMC_BOOT support to FIP format
  refactor(mmc): replace magic value with new PART_CFG_BOOT_PARTITION_NO_ACCESS
  refactor(mmc): export user/boot partition switch functions
2022-06-08 00:14:59 +02:00
Madhukar Pappireddy
60942bc9d5 Merge changes from topic "st-pinctrl" into integration
* changes:
  feat(stm32mp1-fdts): change pin-controller to pinctrl
  feat(st): search pinctrl node by compatible
2022-06-07 16:47:12 +02:00
Yann Gautier
44fea93bf7 feat(stm32mp1-fdts): change pin-controller to pinctrl
Due to commit updating kernel yaml file [1], we need to align TF-A DT
files to what is done in kernel.

[1] c09acbc499e8 ("dt-bindings: pinctrl: use pinctrl.yaml")

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Id717162e42d3959339d6c01883e87a9d4399f5d9
2022-06-07 15:36:37 +02:00
Yann Gautier
b14d3e22b4 feat(st): search pinctrl node by compatible
Instead of searching pinctrl node with its name, search with its
compatible. This will be necessary before pin-controller name changes
to pinctrl due to kernel yaml changes.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I00590414fa65e193c6a72941a372bcecac673f60
2022-06-07 15:36:24 +02:00
Manish Pandey
65a5e1c04d Merge "fix(changelog): fix the broken link to commitlintrc.js" into integration 2022-06-07 14:05:42 +02:00
Jayanth Dodderi Chidanand
c1284a7f93 fix(changelog): fix the broken link to commitlintrc.js
The link to commitlintrc.js file in the v2.7 changelog
is updated.

Change-Id: I24ee736180d8df72b2d831e110a9a3a80a6d9862
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-06-07 12:06:18 +01:00
Venkatesh Yadav Abbarapu
86869f99d0 feat(zynqmp): add support for xck24 silicon
Add support for new xck24 device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I913a34d5a48ea665aaa4348f573fc59566dd5a9b
2022-06-07 10:03:34 +05:30
Subhasish Ghosh
fb00dc4a7b fix(rme/fid): refactor RME fid macros
Refactored RME FID macros to simplify usage.

Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I68f51f43d6c100d90069577412c2e495fe7b7e40
2022-06-06 17:15:15 +02:00
Madhukar Pappireddy
938dfa2968 Merge "feat(imx8mq): add 100us delay after USB OTG SRC bit 0 clear" into integration 2022-06-06 16:18:20 +02:00
Madhukar Pappireddy
8634793e97 Merge "fix(imx8mq): correct architected counter frequency" into integration 2022-06-06 16:17:00 +02:00
Jayanth Dodderi Chidanand
47c681b7d7 feat(trbe): add trbe under feature detection mechanism
This change adds "FEAT_TRBE" to be part of feature detection mechanism.

Previously feature enablement flags were of boolean type, containing
either 0 or 1. With the introduction of feature detection procedure
we now support three states for feature enablement build flags(0 to 2).

Accordingly, "ENABLE_TRBE_FOR_NS" flag is now modified from boolean
to numeric type to align with the feature detection.

Change-Id: I53d3bc8dc2f6eac63feef22dfd627f3a48480afc
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-06-06 11:43:14 +01:00
Jayanth Dodderi Chidanand
1298f2f13d feat(brbe): add brbe under feature detection mechanism
This change adds "FEAT_BRBE" to be part of feature detection mechanism.

Previously feature enablement flags were of boolean type, possessing
either 0 or 1. With the introduction of feature detection procedure
we now support three states for feature enablement build flags(0 to 2).

Accordingly, "ENABLE_BRBE_FOR_NS" flag is now modified from boolean
to numeric type to align with the feature detection.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I1eb52863b4afb10b808e2f0b6584a8a210d0f38c
2022-06-06 11:43:03 +01:00
Madhukar Pappireddy
5e529e32ee Merge "fix(plat/zynqmp): fix coverity scan warnings" into integration 2022-06-03 19:44:00 +02:00
Madhukar Pappireddy
950dc3a191 Merge "feat(plat/xilinx/zynqmp): optimization on pinctrl_functions" into integration 2022-06-02 19:33:24 +02:00