Commit graph

12202 commits

Author SHA1 Message Date
Wing Li
e706d7ff26 docs(psci): add design proposal for OS-initiated mode
Change-Id: Ia3662e08d98d01a93951309835816969e1602624
Signed-off-by: Wing Li <wingers@google.com>
2023-03-20 22:20:35 -07:00
Manish Pandey
c41b8e90f7 Merge "feat(tcr2): support FEAT_TCR2" into integration 2023-03-17 14:44:41 +01:00
Madhukar Pappireddy
2519ee5ffe Merge "feat(ufs): adds timeout and error handling" into integration 2023-03-17 14:34:41 +01:00
Joanna Farley
2a9da687a0 Merge "docs: disable PDF output for documentation generation" into integration 2023-03-16 20:22:27 +01:00
Mark Brown
d333160366 feat(tcr2): support FEAT_TCR2
Arm v8.9 introduces FEAT_TCR2, adding extended translation control
registers. Support this, context switching TCR2_EL2 and disabling
traps so lower ELs can access the new registers.

Change the FVP platform to default to handling this as a dynamic option so
the right decision can be made by the code at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I297452acd8646d58bac64fc15e05b06a543e5148
2023-03-16 16:45:31 +00:00
Sandrine Bailleux
279e28ed35 docs: disable PDF output for documentation generation
Change-Id: I827deeb8008f0bf5f44c1f9d4afcce21ef102bba
2023-03-16 16:55:26 +01:00
Madhukar Pappireddy
13a6f2501a Merge "fix(nxp-drivers): use semicolon instead of comma" into integration 2023-03-16 15:55:06 +01:00
Sandrine Bailleux
579ea67d99 Merge changes from topic "mb/secure-evlog-cpy" into integration
* changes:
  feat(fvp): copy the Event Log to TZC secured DRAM area
  feat(arm): carveout DRAM1 area for Event Log
2023-03-16 09:37:18 +01:00
Elyes Haouas
50b8ea115f fix(nxp-drivers): use semicolon instead of comma
Use semicolon insted of comma at the end of line.

Change-Id: Id820f4419fdd7cf522fd8bb07395789d25f40c2e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-03-16 07:43:11 +02:00
Manish V Badarkhe
d632452c20 Merge "fix(tc): unify TC ROM start addresses" into integration 2023-03-15 21:06:19 +01:00
Manish V Badarkhe
40858762d4 Merge "test(tc): test for AP/RSS NV counter interface" into integration 2023-03-15 18:49:35 +01:00
Manish V Badarkhe
bde9280dcc Merge "style(hooks): adds Arm copyright style fix" into integration 2023-03-15 17:51:42 +01:00
Maksims Svecovs
6bb49c876c style(hooks): adds Arm copyright style fix
Adds a check to pre-commit hook that makes sure "Arm" is written in a
correct case and not "arm" or "ARM". Same as a copyright-year check, the
hook will fix the issue and prompt user to stage the fix.

Change-Id: I39db148d6621d542193f3ee703bddc23c7e8dc27
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-03-15 13:32:00 +00:00
Manish V Badarkhe
3e8b6f4327 Merge "feat(morello): implement methods to retrieve soc-id information" into integration 2023-03-15 14:27:47 +01:00
Joanna Farley
3e833f8363 Merge "fix(versal_net): fix irq for IPI0" into integration 2023-03-15 13:14:26 +01:00
Manish Pandey
a4c69581ae Merge "refactor(build): distinguish BL2 as TF-A entry point and BL2 running at EL3" into integration 2023-03-15 12:45:26 +01:00
Arvind Ram Prakash
42d4d3baac refactor(build): distinguish BL2 as TF-A entry point and BL2 running at EL3
BL2_AT_EL3 is an overloaded macro which has two uses:
	1. When BL2 is entry point into TF-A(no BL1)
	2. When BL2 is running at EL3 exception level
These two scenarios are not exactly same even though first implicitly
means second to be true. To distinguish between these two use cases we
introduce new macros.
BL2_AT_EL3 is renamed to RESET_TO_BL2 to better convey both 1. and 2.
Additional macro BL2_RUNS_AT_EL3 is added to cover all scenarious where
BL2 runs at EL3 (including four world systems).

BREAKING CHANGE: BL2_AT_EL3 renamed to RESET_TO_BL2 across the
repository.

Change-Id: I477e1d0f843b44b799c216670e028fcb3509fb72
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-03-15 11:43:14 +00:00
Anand Saminathan
2c5bce3833 feat(ufs): adds timeout and error handling
Adds a common function to poll for interrupt status which reports errors
and returns error codes

Signed-off-by: Anand Saminathan <anans@google.com>
Change-Id: Ie5df036dc979e984871de4ae7e974b994296ca4c
2023-03-15 09:53:12 +00:00
Chandni Cherukuri
cc266bcd8c feat(morello): implement methods to retrieve soc-id information
Added silicon revision in the platform information SDS structure.

Implemented platform functions to retrieve the soc-id information
for the morello SoC platform. SoC revision, which is same as
silicon revision, is fetched from the morello_plat_info structure
and SoC version is populated with the part number from SSC_VERSION
register, and is reflected in bits[0:15] of soc-id.

Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
Change-Id: I8e0c5b2bc21e393e6d638858cc2ea9f4638f04b9
2023-03-15 10:33:08 +05:30
Trung Tran
95bbfbc6e0 fix(versal_net): fix irq for IPI0
Currently isr is not called when IPI0 interrupt occurs.
fix irq number and enable GIC interrupt properly to invoke
registered isr on IPI0 interrupt.

Signed-off-by: Trung Tran <trung.tran@amd.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Change-Id: Id0408b3a560b25234886a9fa01c4ed248d1d1532
2023-03-14 12:25:03 -07:00
Bipin Ravi
4c985e8674 Merge "fix(cpus): workaround for Neoverse V1 errata 2743233" into integration 2023-03-14 19:53:19 +01:00
Manish V Badarkhe
17628eb585 Merge "fix(rss): fix msg deserialization bugs in comms" into integration 2023-03-14 15:19:21 +01:00
Manish V Badarkhe
b742b6089b Merge "fix(pmu): switch FVP PMUv3 SPIs to PPI" into integration 2023-03-14 14:25:10 +01:00
Varun Wadekar
7683c2a7c7 Merge "fix(tegra): append major revision to the chip_id value" into integration 2023-03-13 17:52:15 +01:00
Madhukar Pappireddy
7a23f0538e Merge "fix(ti): do not take system power reference in bl31_platform_setup()" into integration 2023-03-13 17:01:08 +01:00
Madhukar Pappireddy
7b25a5a515 Merge "style: fix functions definitions" into integration 2023-03-13 15:20:26 +01:00
Manish Pandey
23b74991e3 Merge changes I9430f5fa,I23680085 into integration
* changes:
  feat(build): add support for new binutils versions
  build(makefile): add helper to detect linker options
2023-03-13 14:17:57 +01:00
Elyes Haouas
2535e2047f style: fix functions definitions
This is to fix old style functions definitions.

Change-Id: I094b1497dcf948d4d8de4d57d93878aa092ea053
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-03-13 12:34:40 +01:00
Manish Pandey
521d4fe676 Merge "style: remove useless trailing semicolon and line continuations" into integration 2023-03-13 12:34:21 +01:00
Marco Felsch
1f49db5f25 feat(build): add support for new binutils versions
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
of a new warning when linking the bl*.elf in the form:

  ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
  ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
  ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
  ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions

These new warnings are enbaled by default to secure elf binaries:
 - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
 - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774

Fix it in a similar way to what the Linux kernel does, see:
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/

Following the reasoning there, we set "-z noexecstack" for all linkers
(although LLVM's LLD defaults to it) and optional add
--no-warn-rwx-segments since this a ld.bfd related.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
2023-03-13 10:55:50 +01:00
Marco Felsch
a5f09cf705 build(makefile): add helper to detect linker options
This is a small helper to check for possible linker options. If the
linker supports the requested option it is returned and if not nothing
will be returned, e.g.:

  TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)

can be called unconditional.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: I236800852ece49948ff53a0b91fddba53c8f0f95
2023-03-13 10:55:50 +01:00
Joanna Farley
404e835c33 Merge "docs(zynqmp): add ddr address usage" into integration 2023-03-13 09:51:19 +01:00
Varun Wadekar
ff65ac2440 Merge "fix(tegra210): support legacy SMC_ID 0xC2FEFE00" into integration 2023-03-10 17:28:10 +01:00
Manish V Badarkhe
77844a8df1 Merge "docs: add guidelines for thirdparty includes" into integration 2023-03-10 12:35:05 +01:00
Joanna Farley
3dff98ab40 Merge changes from topic "xlnx_ipi_fix" into integration
* changes:
  fix(xilinx): handle CRC failure in IPI callback
  fix(xilinx): handle CRC failure in IPI
2023-03-10 10:11:24 +01:00
Sona Mathew
f1c3eae9e0 fix(cpus): workaround for Neoverse V1 errata 2743233
Neoverse V1 erratum 2743233 is a Cat B erratum that applies to
all revisions <= r1p2 and is still open.

The workaround sets CPUACTLR5_EL1[56:55] to 2'b01.

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

Change-Id: If51a6f4293fa8b5b35c44edd564ebb715ba309a1
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-03-09 14:09:37 -06:00
Kalyani Chidambaram Vaidyanathan
40a4e2d84c fix(tegra210): support legacy SMC_ID 0xC2FEFE00
This patch introduces a workaround to support the legacy SMC FID
0xC2FEFE00 to maintain compatibility with older software components.

Change-Id: Icf2ef9cfa6b28c09bbab325a642d0b3b20b23535
Signed-off-by: Kalyani Chidambaram Vaidyanathan <kalyanic@nvidia.com>
2023-03-09 21:59:52 +02:00
Varun Wadekar
33c476601c fix(tegra): append major revision to the chip_id value
This patch appends the chip's major revision to the chip id value
to form the SoC version value expected by the SMCCC_GET_SOC_VERSION
function ID.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I09118f446f6b8198588826d4a161bd97dcb6a581
2023-03-09 19:58:05 +00:00
Olivier Deprez
4121a2c320 Merge "feat(spmd): fail safe if SPM fails to initialize" into integration 2023-03-09 17:44:24 +01:00
Madhukar Pappireddy
5864b58afc Merge changes from topic "imx8m_misc_changes" into integration
* changes:
  feat(imx8mq): enable dram dvfs support on imx8mq
  feat(imx8m): use non-fast wakeup stop mode for system suspend
  feat(imx8mq): correct the slot ack setting for STOP mode
  feat(imx8mq): add anamix pll override setting for DSM mode
  feat(imx8mq): add workaround code for ERR11171 on imx8mq
  feat(imx8mq): add the dram retention support for imx8mq
  feat(imx8mq): add version for B2
  fix(imx8m): backup mr12/14 value from lpddr4 chip
  fix(imx8m): add ddr4 dvfs sw workaround for ERR050712
  fix(imx8m): fix coverity out of bound access issue
  fix(imx8m): fix the dram retention random hang on some imx8mq Rev2.0
  feat(imx8m): add more dram pll setting
  fix(imx8m): fix the current fsp init
  fix(imx8m): fix the rank to rank space issue
  fix(imx8m): fix the dfiphymaster setting after dvfs
  feat(imx8m): update the ddr4 dvfs flow to include ddr3l support
  fix(imx8m): correct the rank info get fro mstr
  feat(imx8m): fix the ddr4 dvfs random hang on imx8m
2023-03-09 15:46:36 +01:00
Madhukar Pappireddy
7ca8b585a9 Merge changes from topic "errata" into integration
* changes:
  fix(cpus): workaround for Cortex-A78C erratum 2779484
  fix(cpus): workaround for Cortex-A78 erratum 2742426
2023-03-09 15:44:06 +01:00
Elyes Haouas
9a90d720b8 style: remove useless trailing semicolon and line continuations
found using checkpatch.pl[1]

[1]: https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/util/lint/checkpatch.pl

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I7957c9694300fefb85d11f7819c43af95271f14c
2023-03-09 14:59:08 +01:00
Manish V Badarkhe
1fc7106ce1 Merge "docs(drtm): mention DRTM_SUPPORT as an experimental build option" into integration 2023-03-09 11:55:04 +01:00
Naman Trivedi Manojbhai
6173d914d6 fix(xilinx): handle CRC failure in IPI callback
Currently, if CRC validation fails during IPI communication,
pm_ipi_buff_read_callb() logs error message but don't return
error code to upper layers.

Added CRC failure specific error code which will be returned by
pm_ipi_buff_read_callb() if CRC validation fails.

Signed-off-by: Naman Trivedi Manojbhai <naman.trivedimanojbhai@amd.com>
Change-Id: I2eaca073e2bf325a8c86b1820bdd7cca487b783e
2023-03-09 15:05:37 +05:30
Naman Trivedi Manojbhai
5e92be5121 fix(xilinx): handle CRC failure in IPI
Currently, if CRC validation fails during IPI communication,
pm_ipi_buff_read() logs error message but don't return error
code to upper layers.

Added CRC failure specific error code which will be returned by
pm_ipi_buff_read() if CRC validation fails.

Signed-off-by: Naman Trivedi Manojbhai <naman.trivedimanojbhai@amd.com>
Change-Id: I33be330f276973471f4ce4115d1e1609ed8fb754
2023-03-09 15:03:50 +05:30
Olivier Deprez
0d33649e3e feat(spmd): fail safe if SPM fails to initialize
The spmd_setup function is made fail safe in that a failure in the
SPMC manifest parsing, SPMD or SPMC initialization returns a success
code to the standard services initialization routine (std_svc_setup).
This permits continuing the boot process and initialize services
beyond the SPMD to succeed for the system to operate in the normal
world. It operates in a degraded mode for the secure world.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ida0ac91c17925279a79f112d190f9ad038f518e7
2023-03-09 09:33:28 +01:00
Bipin Ravi
66bf3ba482 fix(cpus): workaround for Cortex-A78C erratum 2779484
Cortex-A78C erratum 2779484 is a Cat B erratum that applies to
revisions r0p1 and r0p2 and is still open.

The workaround is to set the CPUACTLR3_EL1[47] bit to 1. Setting this
bit might have a small impact on power and negligible impact on
performance.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I9a8c16a845c3ba6eb2f17a5119aa6ca09a0d27ed
2023-03-08 22:00:14 +01:00
Bipin Ravi
a63332c517 fix(cpus): workaround for Cortex-A78 erratum 2742426
Cortex-A78 erratum 2742426 is a Cat B erratum that applies to
all revisions <= r1p2 and is still open.

The workaround is to set the CPUACTLR5_EL1[56:55] to 2'b01.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I42506a87d41c9e2b30bc78c08d22f36e1f9635c1
2023-03-08 14:58:05 -06:00
Manish V Badarkhe
191aa5d3fc feat(fvp): copy the Event Log to TZC secured DRAM area
Copied the Event Log from internal SRAM to the TZC secured DRAM
reserved area. Also passed this Trusted DRAM address to OPTEE via
NT FW configuration, and to SPMC via TOS FW configuration,
which is eventually used to extend PCR via fTPM application running
on top of OPTEE/SPMC.

Furthermore, this patch makes it easier to access Event Log in RME
enabled systems where Secure World firmware does not have access to
internal(Root) SRAM.

Change-Id: I005e9da1e6075511f412bdf4d8b541fa543df9ab
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-03-08 20:17:24 +00:00
Manish V Badarkhe
6b2e961fb1 feat(arm): carveout DRAM1 area for Event Log
Reserved 4KB area for Event Log in DRAM1. This area is used by BL2
to copy Event Log from internal SRAM to this carved out DRAM region
in the subsequent patch.

Change-Id: I7b405775c66d249e31edf7688d95770e6c05c175
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-03-08 19:51:17 +00:00