]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
20 months agostyle(hooks): adds Arm copyright style fix
Maksims Svecovs [Wed, 15 Mar 2023 13:24:44 +0000 (13:24 +0000)]
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>
20 months agoMerge "fix(cpus): workaround for Neoverse V1 errata 2743233" into integration
Bipin Ravi [Tue, 14 Mar 2023 18:53:19 +0000 (19:53 +0100)]
Merge "fix(cpus): workaround for Neoverse V1 errata 2743233" into integration

20 months agoMerge "fix(rss): fix msg deserialization bugs in comms" into integration
Manish V Badarkhe [Tue, 14 Mar 2023 14:19:21 +0000 (15:19 +0100)]
Merge "fix(rss): fix msg deserialization bugs in comms" into integration

20 months agoMerge "fix(pmu): switch FVP PMUv3 SPIs to PPI" into integration
Manish V Badarkhe [Tue, 14 Mar 2023 13:25:10 +0000 (14:25 +0100)]
Merge "fix(pmu): switch FVP PMUv3 SPIs to PPI" into integration

20 months agoMerge "fix(tegra): append major revision to the chip_id value" into integration
Varun Wadekar [Mon, 13 Mar 2023 16:52:15 +0000 (17:52 +0100)]
Merge "fix(tegra): append major revision to the chip_id value" into integration

20 months agoMerge "fix(ti): do not take system power reference in bl31_platform_setup()" into...
Madhukar Pappireddy [Mon, 13 Mar 2023 16:01:08 +0000 (17:01 +0100)]
Merge "fix(ti): do not take system power reference in bl31_platform_setup()" into integration

20 months agoMerge "style: fix functions definitions" into integration
Madhukar Pappireddy [Mon, 13 Mar 2023 14:20:26 +0000 (15:20 +0100)]
Merge "style: fix functions definitions" into integration

20 months agoMerge changes I9430f5fa,I23680085 into integration
Manish Pandey [Mon, 13 Mar 2023 13:17:57 +0000 (14:17 +0100)]
Merge changes I9430f5fa,I23680085 into integration

* changes:
  feat(build): add support for new binutils versions
  build(makefile): add helper to detect linker options

20 months agostyle: fix functions definitions
Elyes Haouas [Mon, 13 Feb 2023 09:38:45 +0000 (10:38 +0100)]
style: fix functions definitions

This is to fix old style functions definitions.

Change-Id: I094b1497dcf948d4d8de4d57d93878aa092ea053
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
20 months agoMerge "style: remove useless trailing semicolon and line continuations" into integration
Manish Pandey [Mon, 13 Mar 2023 11:34:21 +0000 (12:34 +0100)]
Merge "style: remove useless trailing semicolon and line continuations" into integration

20 months agofeat(build): add support for new binutils versions
Marco Felsch [Wed, 9 Nov 2022 11:59:09 +0000 (12:59 +0100)]
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

20 months agobuild(makefile): add helper to detect linker options
Marco Felsch [Thu, 24 Nov 2022 10:02:05 +0000 (11:02 +0100)]
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

20 months agoMerge "docs(zynqmp): add ddr address usage" into integration
Joanna Farley [Mon, 13 Mar 2023 08:51:19 +0000 (09:51 +0100)]
Merge "docs(zynqmp): add ddr address usage" into integration

20 months agoMerge "fix(tegra210): support legacy SMC_ID 0xC2FEFE00" into integration
Varun Wadekar [Fri, 10 Mar 2023 16:28:10 +0000 (17:28 +0100)]
Merge "fix(tegra210): support legacy SMC_ID 0xC2FEFE00" into integration

20 months agoMerge "docs: add guidelines for thirdparty includes" into integration
Manish V Badarkhe [Fri, 10 Mar 2023 11:35:05 +0000 (12:35 +0100)]
Merge "docs: add guidelines for thirdparty includes" into integration

20 months agoMerge changes from topic "xlnx_ipi_fix" into integration
Joanna Farley [Fri, 10 Mar 2023 09:11:24 +0000 (10:11 +0100)]
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

20 months agofix(cpus): workaround for Neoverse V1 errata 2743233
Sona Mathew [Thu, 2 Mar 2023 21:07:55 +0000 (15:07 -0600)]
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>
20 months agofix(tegra210): support legacy SMC_ID 0xC2FEFE00
Kalyani Chidambaram Vaidyanathan [Tue, 31 Jan 2023 01:44:26 +0000 (17:44 -0800)]
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>
20 months agofix(tegra): append major revision to the chip_id value
Varun Wadekar [Tue, 7 Mar 2023 19:20:13 +0000 (19:20 +0000)]
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

20 months agoMerge "feat(spmd): fail safe if SPM fails to initialize" into integration
Olivier Deprez [Thu, 9 Mar 2023 16:44:24 +0000 (17:44 +0100)]
Merge "feat(spmd): fail safe if SPM fails to initialize" into integration

20 months agoMerge changes from topic "imx8m_misc_changes" into integration
Madhukar Pappireddy [Thu, 9 Mar 2023 14:46:36 +0000 (15:46 +0100)]
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

20 months agoMerge changes from topic "errata" into integration
Madhukar Pappireddy [Thu, 9 Mar 2023 14:44:06 +0000 (15:44 +0100)]
Merge changes from topic "errata" into integration

* changes:
  fix(cpus): workaround for Cortex-A78C erratum 2779484
  fix(cpus): workaround for Cortex-A78 erratum 2742426

20 months agostyle: remove useless trailing semicolon and line continuations
Elyes Haouas [Mon, 13 Feb 2023 09:05:41 +0000 (10:05 +0100)]
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

20 months agoMerge "docs(drtm): mention DRTM_SUPPORT as an experimental build option" into integration
Manish V Badarkhe [Thu, 9 Mar 2023 10:55:04 +0000 (11:55 +0100)]
Merge "docs(drtm): mention DRTM_SUPPORT as an experimental build option" into integration

20 months agofix(xilinx): handle CRC failure in IPI callback
Naman Trivedi Manojbhai [Tue, 7 Mar 2023 07:11:12 +0000 (12:41 +0530)]
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

20 months agofix(xilinx): handle CRC failure in IPI
Naman Trivedi Manojbhai [Tue, 7 Mar 2023 07:11:11 +0000 (12:41 +0530)]
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

20 months agofeat(spmd): fail safe if SPM fails to initialize
Olivier Deprez [Wed, 16 Nov 2022 15:46:23 +0000 (16:46 +0100)]
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

20 months agofix(cpus): workaround for Cortex-A78C erratum 2779484
Bipin Ravi [Tue, 28 Feb 2023 22:21:51 +0000 (16:21 -0600)]
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

20 months agofix(cpus): workaround for Cortex-A78 erratum 2742426
Bipin Ravi [Tue, 28 Feb 2023 20:51:28 +0000 (14:51 -0600)]
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

20 months agodocs: add guidelines for thirdparty includes
Govindraj Raja [Thu, 2 Mar 2023 13:56:32 +0000 (13:56 +0000)]
docs: add guidelines for thirdparty includes

Currently there is no guidelines in docs for including thirdparty
includes, trying to address that with a proposed method to use third
party includes.

Change-Id: Ieec7a5c88a60b66ca72228741ba1894545130a06
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
20 months agoMerge "fix(tc): change the FIP offset to 8 KiB boundary" into integration
Manish V Badarkhe [Wed, 8 Mar 2023 13:57:00 +0000 (14:57 +0100)]
Merge "fix(tc): change the FIP offset to 8 KiB boundary" into integration

20 months agofix(tc): change the FIP offset to 8 KiB boundary
Tintu Thomas [Tue, 21 Feb 2023 17:51:24 +0000 (17:51 +0000)]
fix(tc): change the FIP offset to 8 KiB boundary

* This change overrides the default PLAT_ARM_FIP_OFFSET_IN_GPT

* This aligns the FIP base in GPT image to the RSS ATU page size
  boundary (8 KiB). RSS XIP feature requires the FIP to be aligned to
  the page size boundary. TC platform will require the XIP feature.

* The aligned FIP_A is starting at sector 48. Hence the offset will be
  48*512 = 0x6000.

Signed-off-by: Tintu Thomas <tintu.thomas@arm.com>
Change-Id: I8135ecd4168231847c80151c33ef8353a1586b9a

20 months agofix(ti): do not take system power reference in bl31_platform_setup()
Andrew Davis [Tue, 7 Mar 2023 15:22:32 +0000 (09:22 -0600)]
fix(ti): do not take system power reference in bl31_platform_setup()

Taking a reference at this early stage can cause boot failure if the DM
firmware is not fully initialized. Remove this early call until the
fix in DM firmware is widely available.

Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: Ic9c47ccf1e9a1b9faeb1c7d2665d54cf55ef5396

20 months agofix(pmu): switch FVP PMUv3 SPIs to PPI
AlexeiFedorov [Tue, 7 Mar 2023 13:34:45 +0000 (13:34 +0000)]
fix(pmu): switch FVP PMUv3 SPIs to PPI

FVP PMUv3 SPIs legacy interrupts are only listed for
cluster #0 and are missing for cluster #1.
This patch changes FVP SPIs to PMUv3 PPI as in
arm_fpga.dtsi, morello.dtsi and n1sdp.dtsi.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ic624cec09ba932666c746ae1a6a4b78b6decde96

20 months agodocs(zynqmp): add ddr address usage
Belsare, Akshay [Mon, 6 Mar 2023 09:38:54 +0000 (15:08 +0530)]
docs(zynqmp): add ddr address usage

Update documentation for TF-A DDR address range usage when the FSBL is
run on RPU instead of APU.

Change-Id: I223d67c35ac9ce3384820531a7453d3b32a1eb58
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
20 months agoMerge "docs: discourage usage of weak functions" into integration
Sandrine Bailleux [Mon, 6 Mar 2023 19:38:28 +0000 (20:38 +0100)]
Merge "docs: discourage usage of weak functions" into integration

20 months agodocs: discourage usage of weak functions
Sandrine Bailleux [Wed, 8 Feb 2023 12:55:51 +0000 (13:55 +0100)]
docs: discourage usage of weak functions

As a coding guideline, we now discourage introducing new weak
functions in platform-agnostic code going forward and provide the
rationale for this.

This was already enforced most of the time in code reviews but this
patch makes it explicit in the project's documentation.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I88f4a55788899fb4146c4d26afb3a7418376b30c

20 months agofix(rss): fix msg deserialization bugs in comms
David Vincze [Mon, 6 Mar 2023 14:02:08 +0000 (15:02 +0100)]
fix(rss): fix msg deserialization bugs in comms

-fix1: size of struct instead of pointer during reply_size check
-fix2: update the out_vec length with the actual length from reply
       message (e.g. in case of an output buffer, the returned output
       data length remained the size of the buffer and was not updated
       with the size of the actual data in it)

Change-Id: Ibed5520ca1fb05df358de4bdf85ace219183866c
Signed-off-by: David Vincze <david.vincze@arm.com>
20 months agoMerge "docs(spm): add other-s-interrupts-action field to sp manifest" into integration
Madhukar Pappireddy [Mon, 6 Mar 2023 14:09:27 +0000 (15:09 +0100)]
Merge "docs(spm): add other-s-interrupts-action field to sp manifest" into integration

20 months agoMerge "fix(zynqmp): conditional reservation of memory in DTB" into integration
Joanna Farley [Mon, 6 Mar 2023 12:33:39 +0000 (13:33 +0100)]
Merge "fix(zynqmp): conditional reservation of memory in DTB" into integration

20 months agofix(zynqmp): conditional reservation of memory in DTB
Akshay Belsare [Mon, 27 Feb 2023 06:34:26 +0000 (12:04 +0530)]
fix(zynqmp): conditional reservation of memory in DTB

When the TF-A is placed in DDR memory range, the DDR memory range is
getting explicitly reserved in the default device tree by TF-A.
This creates an error condition in the use case where Device tree is
not present or it is present at a different location.

To fix this, a new build time parameter, XILINX_OF_BOARD_DTB_ADDR, is
introduced. The TF-A will reserve the DDR memory only when a valid
DTB address is provided to XILINX_OF_BOARD_DTB_ADDR during build.

Now the user has options, either manually reserve the desired
DDR address range for TF-A in device tree or let TF-A access and modify
the device tree, to reserve the DDR address range, in runtime using
the build parameter.

Change-Id: I846fa373ba9f7c984eda3a55ccaaa622082cad81
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
20 months agoMerge "fix(mbedtls): fix mbedtls coverity issues" into integration
Manish V Badarkhe [Fri, 3 Mar 2023 09:54:43 +0000 (10:54 +0100)]
Merge "fix(mbedtls): fix mbedtls coverity issues" into integration

20 months agoMerge "refactor(auth): use a single function for parsing extensions" into integration
Sandrine Bailleux [Fri, 3 Mar 2023 07:39:16 +0000 (08:39 +0100)]
Merge "refactor(auth): use a single function for parsing extensions" into integration

20 months agorefactor(auth): use a single function for parsing extensions
Demi Marie Obenour [Sat, 28 Jan 2023 20:15:37 +0000 (15:15 -0500)]
refactor(auth): use a single function for parsing extensions

Previously, extensions were parsed twice: once with error checking for
validation, and a second time without error checking to extract the
extension data.  This is error prone and caused TFV-10 (CVE-2022-47630).

A simpler approach is to have get_ext() be responsible for all extension
parsing, and to treat a NULL OID as an indicator that get_ext() is only
being called for validation.  cert_parse() checks that get_ext() returns
IMG_PARSER_OK and fails otherwise.

Change-Id: I65a2ff053a188351ba54799827a2b7bd833bb037
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
20 months agoMerge "fix(docs): add plantuml as a dependency" into integration
Joanna Farley [Thu, 2 Mar 2023 15:48:28 +0000 (16:48 +0100)]
Merge "fix(docs): add plantuml as a dependency" into integration

20 months agoMerge "fix(cpufeat): resolve build errors due to compiler optimization" into integration
Manish Pandey [Thu, 2 Mar 2023 10:37:12 +0000 (11:37 +0100)]
Merge "fix(cpufeat): resolve build errors due to compiler optimization" into integration

20 months agofix(cpufeat): resolve build errors due to compiler optimization
Jayanth Dodderi Chidanand [Wed, 1 Mar 2023 15:35:28 +0000 (15:35 +0000)]
fix(cpufeat): resolve build errors due to compiler optimization

Currently most of the architectural feature build flags are set
to 2(FEATURE_STATE_CHECK) for fvp platform only.

However other platforms still configure them by default to 0, which
would lead to build failures in cases when compiler configured
to build TF-A  with zero optimization (CFLAGS='-O0').

This patch addresses such build issues and thereby resolves the failures
seen under CI-l3 test_configurations.

Change-Id: I45b82b821951bba6b9df08177f7d286e624a4239
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
20 months agofix(mbedtls): fix mbedtls coverity issues
Govindraj Raja [Tue, 28 Feb 2023 11:37:02 +0000 (11:37 +0000)]
fix(mbedtls): fix mbedtls coverity issues

commit (a8eadc51a refactor(mbedtls): avoid including
MBEDTLS_CONFIG_FILE) avoids using config file directly and relies on
config file usage from mbedtls version.h

But we could build trusted boot without mbedtls dir so guard version.h
include in cot_def.h with availability of config file.

Also we refactored in same commit to break dependencies between
auth_mod.h and cot_def.h, So add cot_def.h include in nxp tbbr
cot file.

Change-Id: I4779e90c18f04c73d2121c88df6420b4b1109c8b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
20 months agofeat(imx8mq): enable dram dvfs support on imx8mq
Jacky Bai [Tue, 14 Jan 2020 06:19:05 +0000 (14:19 +0800)]
feat(imx8mq): enable dram dvfs support on imx8mq

Enable DRAM DVFS support on i.MX8MQ.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id72c5eb9625936052ec51e5a52d9d31175ed1b1b

20 months agofeat(imx8m): use non-fast wakeup stop mode for system suspend
Jacky Bai [Fri, 10 Jan 2020 01:24:46 +0000 (09:24 +0800)]
feat(imx8m): use non-fast wakeup stop mode for system suspend

Use non-fast wakeup stop mode for system suspend support, so
the SOC can enter DSM mode by default.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I37828d4e66ee2ebd48e7adca054b93c520cb2c82

20 months agofeat(imx8mq): correct the slot ack setting for STOP mode
Jacky Bai [Fri, 10 Jan 2020 09:46:31 +0000 (17:46 +0800)]
feat(imx8mq): correct the slot ack setting for STOP mode

A53 core's power up ack need to be used when system resume
from DSM mode.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I47fb33c0582ae5f483ffaa887f95e27bd47875f7

20 months agofeat(imx8mq): add anamix pll override setting for DSM mode
Jacky Bai [Fri, 10 Jan 2020 07:31:52 +0000 (15:31 +0800)]
feat(imx8mq): add anamix pll override setting for DSM mode

Add the anamix PLL override setting for DSM mode support,
so that the PLL can be power down in DSM mode to save power.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ibe954bc7c4a7b453ace13f8e4b6a335e6d4856c3

20 months agofeat(imx8mq): add workaround code for ERR11171 on imx8mq
Jacky Bai [Wed, 8 Jan 2020 08:56:01 +0000 (16:56 +0800)]
feat(imx8mq): add workaround code for ERR11171 on imx8mq

This new workaround takes advantage of the per core IMR
registers in GPC in order to unmask the IRQ0, still generated
by the 12bit in IOMUX_GPR register (which now remains always set),
so it can only wake up one core at the time.Also, this entire
workaround has now been moved here in TF-A, allowing the kernel
side to be minimal.

Another advantage this workaround brings is the removal of the
50us delay (which was necessary before in gic_raise_softirq in
kernel) by allowing the core that is waking up to mask his own
IRQ0 in the suspend finish callback.

One important change here is the way the cores are woken up in
dram_dvfs_handler. Since the wake up mechanism has changed from
asserting the 12th bit in IOMUX_GPR and leaving the IMR1 1st bit
on for each core to exactly the reverse, that is, leaving the
IOMUX_GPR 12th bit always set and then masking/unmasking the IMR1
1st bit for each independent core, we need to use the imx_gpc_core_wake
to wake up the cores.

Also, the 50us udelay is moved to TF-A (inside imx_pwr_domain_off)
from kernel(gic_raise_softirq), since the new cpuidle workaround
does not need it in order to clean the IOMUX_GPC 12bit. For now,
the udelay seems to be still needed in order to delay the affinity
info OFF for the dying core. This is something that needs further
investigation.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I9f17ff6fc3452b8225a50b232964712aafeab78a

20 months agofeat(imx8mq): add the dram retention support for imx8mq
Jacky Bai [Tue, 7 Jan 2020 08:44:46 +0000 (16:44 +0800)]
feat(imx8mq): add the dram retention support for imx8mq

Add the dram retention support for i.MX8MQ. As there is
no enough ocram space available before entering TF-A,
so the timing info need to be copied from dram into ocram.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id8264c342fd62e297b1969cba5ed505450c78a25

20 months agofeat(imx8mq): add version for B2
Ye Li [Wed, 3 Feb 2021 04:06:40 +0000 (20:06 -0800)]
feat(imx8mq): add version for B2

iMX8MQ B2 chip uses same OCOTP magic value with B1. So
read the ROM version to distinguish it with B1.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I3e6865922deeb66816a0dddb49d986405e802b6f

20 months agofix(imx8m): backup mr12/14 value from lpddr4 chip
Jacky Bai [Mon, 20 Dec 2021 09:56:08 +0000 (17:56 +0800)]
fix(imx8m): backup mr12/14 value from lpddr4 chip

Backup the mr12/14 value as the actual value used is not the
one we configured in the ddrc config timing.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: If04733b34a3b4c080828bb7c82e83f0badbeaafd

20 months agoMerge "fix(rme): update sample platform attestation token" into integration
Soby Mathew [Tue, 28 Feb 2023 16:41:41 +0000 (17:41 +0100)]
Merge "fix(rme): update sample platform attestation token" into integration

20 months agoMerge changes from topic "feat_state_part2" into integration
Manish Pandey [Tue, 28 Feb 2023 10:40:54 +0000 (11:40 +0100)]
Merge changes from topic "feat_state_part2" into integration

* changes:
  refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED
  refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED
  refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
  fix(cpufeat): context-switch: move FGT availability check to callers
  feat(cpufeat): extend check_feature() to deal with min/max
  refactor(cpufeat): wrap CPU ID register field isolation

20 months agoMerge changes Ia19c6678,I44baaa47 into integration
Sandrine Bailleux [Tue, 28 Feb 2023 08:42:51 +0000 (09:42 +0100)]
Merge changes Ia19c6678,I44baaa47 into integration

* changes:
  refactor(auth): clean up certificate length checks
  refactor(auth): remove code duplication

20 months agofix(imx8m): add ddr4 dvfs sw workaround for ERR050712
Jacky Bai [Tue, 16 Mar 2021 08:42:54 +0000 (16:42 +0800)]
fix(imx8m): add ddr4 dvfs sw workaround for ERR050712

APB Write data corruption following MRCTRL0.mr_wr=1 while
hardware-driven MR access is occurring

When performing a software driven MR access, the following
sequence must be done automatically before performing other
APB register accesses:

1. Set MRCTRL0.mr_wr=1
2. Check for MRSTAT.mr_wr_busy=0. If not, go to step (2)
3. Check for MRSTAT.mr_wr_busy=0 again (for the second time),
   if not, go to step (2).

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Ie26e08bcc83d3ed4844ed04a853162308dcdccd0

20 months agofix(imx8m): fix coverity out of bound access issue
Jacky Bai [Tue, 8 Sep 2020 01:55:59 +0000 (09:55 +0800)]
fix(imx8m): fix coverity out of bound access issue

Fix the out of bound access to the rank setting array.

Fix Coverity issue:

CID 6474575: Out-of-bounds access (OVERRUN)
CID 11014855: Unused value (UNUSED_VALUE)

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I5d9ef90f1479e5d46d1b6c8693a27e3abd614766

20 months agofix(imx8m): fix the dram retention random hang on some imx8mq Rev2.0
Jacky Bai [Thu, 22 Oct 2020 06:35:12 +0000 (14:35 +0800)]
fix(imx8m): fix the dram retention random hang on some imx8mq Rev2.0

It seems the DRAM APB clock root slice can NOT work normally
if the PLLs is power down in DSM mode. So update this clock
slice's setting explicitly to make it work. This piece of code
is there for a long while on previous release, so just add
it back to align with previous flow.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Change-Id: I113069494074194e116fdb1229052d2956bf90ea

20 months agofeat(imx8m): add more dram pll setting
Jacky Bai [Mon, 19 Oct 2020 07:45:16 +0000 (15:45 +0800)]
feat(imx8m): add more dram pll setting

Add DRAM PLL frequency setting for 3200mts & 4000mts.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: I4b0609f9e7c0f35d75a26ec9ccebec77b3dbe68f

20 months agofix(imx8m): fix the current fsp init
Jacky Bai [Mon, 3 Aug 2020 05:31:26 +0000 (13:31 +0800)]
fix(imx8m): fix the current fsp init

The dfimisc reg value should be shift right 8 bit to
get the current fsp.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Change-Id: I4c8c166bc3ad4cc1376961cbf47631c68b5900cc

20 months agofix(imx8m): fix the rank to rank space issue
Jacky Bai [Fri, 8 May 2020 09:37:24 +0000 (17:37 +0800)]
fix(imx8m): fix the rank to rank space issue

update umctl2's setting based on phy training CDD value
to workaround the rank-to-rank space issue.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: I0fab18cdc378fda760daa0f89c4dd84eb46f7e11

20 months agorefactor(auth): clean up certificate length checks
Demi Marie Obenour [Thu, 19 Jan 2023 14:50:16 +0000 (09:50 -0500)]
refactor(auth): clean up certificate length checks

The previous code was correct but unnecessarily verbose.

Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
20 months agorefactor(auth): remove code duplication
Demi Marie Obenour [Thu, 19 Jan 2023 14:46:55 +0000 (09:46 -0500)]
refactor(auth): remove code duplication

The unique IDs are handled identically, so just use a for loop to get
both of them.

Change-Id: I44baaa4747ca7f314d364a79dfcbce97315f5a92
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
20 months agorefactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED
Andre Przywara [Thu, 17 Nov 2022 17:30:43 +0000 (17:30 +0000)]
refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED

At the moment we only support FEAT_TRF to be either unconditionally
compiled in, or to be not supported at all.

Add support for runtime detection (ENABLE_TRF_FOR_NS=2), by splitting
is_feat_trf_present() into an ID register reading function and a second
function to report the support status. That function considers both
build time settings and runtime information (if needed), and is used
before we access TRF related registers.
Also move the context saving code from assembly to C, and use the new
is_feat_trf_supported() function to guard its execution.

The FVP platform decided to compile in support unconditionally (=1),
even though FEAT_TRF is an ARMv8.4 feature, so is not available with the
FVP model's default command line.
Change that to the now supported dynamic option (=2), so the right
decision can be made by the code at runtime.

Change-Id: Ia97b01adbe24970a4d837afd463dc5506b7295a3
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agorefactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED
Andre Przywara [Thu, 17 Nov 2022 16:42:09 +0000 (16:42 +0000)]
refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED

At the moment we only support FEAT_BRBE to be either unconditionally
compiled in, or to be not supported at all.

Add support for runtime detection (ENABLE_BRBE_FOR_NS=2), by splitting
is_feat_brbe_present() into an ID register reading function and a second
function to report the support status. That function considers both
build time settings and runtime information (if needed), and is used
before we access BRBE related registers.

The FVP platform decided to compile in support unconditionally (=1),
even though FEAT_BRBE is an ARMv9 feature, so is not available with the
FVP model's default command line.
Change that to the now supported dynamic option (=2), so the right
decision can be made by the code at runtime.

Change-Id: I5f2e2c9648300f65f0fa9a5f8e2f34e73529d053
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agorefactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
Andre Przywara [Thu, 17 Nov 2022 16:42:09 +0000 (16:42 +0000)]
refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED

At the moment we only support FEAT_TRBE to be either unconditionally
compiled in, or to be not supported at all.

Add support for runtime detection (ENABLE_TRBE_FOR_NS=2), by splitting
is_feat_trbe_present() into an ID register reading function and a second
function to report the support status. That function considers both
build time settings and runtime information (if needed), and is used
before we access TRBE related registers.

The FVP platform decided to compile in support unconditionally (=1),
even though FEAT_TRBE is an ARMv9 feature, so is not available with the
FVP model's default command line.
Change that to the now supported dynamic option (=2), so the right
decision can be made by the code at runtime.

Change-Id: Iee7f88ea930119049543a8a4a105389997e7692c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agofix(cpufeat): context-switch: move FGT availability check to callers
Andre Przywara [Wed, 15 Feb 2023 15:56:15 +0000 (15:56 +0000)]
fix(cpufeat): context-switch: move FGT availability check to callers

To be inline with other features, and to allow the availability to be
checked for different contexts, move the FGT availability check out of
the save/restore functions. This is instead now checked at the caller.

Change-Id: I96e0638714f9d1b6fdadc1cb989cbd33bd48b1f6
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agofeat(cpufeat): extend check_feature() to deal with min/max
Andre Przywara [Wed, 1 Feb 2023 11:46:31 +0000 (11:46 +0000)]
feat(cpufeat): extend check_feature() to deal with min/max

So far the check_feature() function compares the subfield of a CPU ID
register against 0, to learn if a feature is enabled or not.
This is problematic for checks that require a certain revision of a
feature, so we should check against a minimum version number instead.
On top of that we might need to add code to support newer versions of a
feature, so we should be alerted if new hardware introduces a higher
number.

Extend the check_feature() function to take two extra arguments: the
minimum version, and the greatest currently known number.
Then make sure that the CPU ID field is in this range.

Change-Id: I425b68535a2ba9eafd31854e74d142183b521cd5
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agorefactor(cpufeat): wrap CPU ID register field isolation
Andre Przywara [Wed, 25 Jan 2023 12:26:14 +0000 (12:26 +0000)]
refactor(cpufeat): wrap CPU ID register field isolation

Some MISRA test complains about our code to isolate CPU ID register
fields: the ID registers (and associated masks) are 64 bits wide, but
the eventual field is always 4 bits wide only, so we use an unsigned
int to represent that. MISRA dislikes the differing width here.

Since the code to extract a feature field from a CPU ID register is very
schematic already, provide a wrapper macro to make this more readable,
and do the proper casting in one central place on the way.

While at it, use the same macro for the AArch32 feature detection side.

Change-Id: Ie102a9e7007a386f5879ec65e159ff041504a4ee
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
20 months agoMerge changes I960771e6,I291dc627,I57f31664 into integration
Madhukar Pappireddy [Mon, 27 Feb 2023 15:59:56 +0000 (16:59 +0100)]
Merge changes I960771e6,I291dc627,I57f31664 into integration

* changes:
  fix(ufs): set the PRDT length field properly
  fix(ufs): flush the entire PRDT
  fix(ufs): only allow using one slot

20 months agoMerge changes from topic "mbedtls3_support" into integration
Manish V Badarkhe [Mon, 27 Feb 2023 15:32:21 +0000 (16:32 +0100)]
Merge changes from topic "mbedtls3_support" into integration

* changes:
  feat(stm32mp1): add mbedtls-3.3 support config
  refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT
  style(crypto): add braces for if statement
  feat(fvp): increase BL1_RW and BL2 size
  feat(mbedtls): add support for mbedtls-3.3
  refactor(crypto): avoid using struct mbedtls_pk_rsassa_pss_options
  refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE

20 months agofix(docs): add plantuml as a dependency
Boyan Karatotev [Mon, 27 Feb 2023 15:01:58 +0000 (15:01 +0000)]
fix(docs): add plantuml as a dependency

This wasn't listed on the web interface configuration. Perhaps it came
preloaded. Anyway, it's needed for diagrams. Add it back.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I20c1eb0e8d5abaa3533169dd9704cbd3b0eb06a5

20 months agoMerge "revert(zynqmp): remove EM SMC handler" into integration
Joanna Farley [Mon, 27 Feb 2023 13:20:08 +0000 (14:20 +0100)]
Merge "revert(zynqmp): remove EM SMC handler" into integration

20 months agofeat(stm32mp1): add mbedtls-3.3 support config
Govindraj Raja [Mon, 23 Jan 2023 13:11:12 +0000 (13:11 +0000)]
feat(stm32mp1): add mbedtls-3.3 support config

Add stm32mp1_mbedtls_config-3.h config file for stm32mp1 builds with
mbedtls-3.3

Change-Id: I4581cb0ea7b2c7022e71aefd7ff05ee3a72f5883
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
20 months agorevert(zynqmp): remove EM SMC handler
Michal Simek [Mon, 27 Feb 2023 08:28:20 +0000 (09:28 +0100)]
revert(zynqmp): remove EM SMC handler

EM support was out of SMC SIP range that's why has been moved to SIP
range 0x3000 by commit acbae3998bd8 ("fix(zynqmp): move EM SMC range
to SIP range").
But after another investigation was found that this interface has no
user in any our SW and likely never adopted by anybody else. That's
why simply remove it. If there is any user it can be added back but
as TF-A size is challenging removing unused code is very welcome.
Origin code was added by commit 504925f99da0 ("xilinx: zynqmp: Add
support for Error Management").

Change-Id: I2d9222d7dde507400893e06f7f12e1713ce6bc9a
Signed-off-by: Michal Simek <michal.simek@amd.com>
20 months agofix(imx8m): fix the dfiphymaster setting after dvfs
Jacky Bai [Wed, 6 May 2020 05:11:04 +0000 (13:11 +0800)]
fix(imx8m): fix the dfiphymaster setting after dvfs

the dfi phy master setting need to be save/restore to make
sure it aligned with the initial config.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: I4f572b9aff9cc47a6c28524ce0fe03cdc66b88a1

20 months agofeat(imx8m): update the ddr4 dvfs flow to include ddr3l support
Jacky Bai [Wed, 22 Apr 2020 13:26:13 +0000 (21:26 +0800)]
feat(imx8m): update the ddr4 dvfs flow to include ddr3l support

the DDR3L & DDR4 can share same piece of code for DDR frequency scaling.
So update the ddr4 dvfs flow to support DDR3L too.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: Ifc6981f05ed8a4e399adad97690197a9680f554d

20 months agofix(imx8m): correct the rank info get fro mstr
Jacky Bai [Mon, 13 Apr 2020 09:44:50 +0000 (17:44 +0800)]
fix(imx8m): correct the rank info get fro mstr

the bitfield of active_ranks in MSTR is defined as below.
Correct the rank num get in dram_info.

  0x01: one rank;
  0x11: two rank;

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: Idcadb39f492a8fe81c973ac4136d9a1eaa32f54b

20 months agofeat(imx8m): fix the ddr4 dvfs random hang on imx8m
Jacky Bai [Mon, 13 Apr 2020 03:07:40 +0000 (11:07 +0800)]
feat(imx8m): fix the ddr4 dvfs random hang on imx8m

Remove the while loop waiting in step12 to align with what
we did before, just use a 'if' condition check for debug
purpose.

Tested-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id2685c5f628270a24944470d675a5c8706f39f13

20 months agofix(ufs): set the PRDT length field properly
Jorge Troncoso [Wed, 22 Feb 2023 23:30:47 +0000 (15:30 -0800)]
fix(ufs): set the PRDT length field properly

The PRDT length field contains the count of the entries in the PRDT. See
JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
Descriptor," page 66. Previously we were setting the PRDT length field
to the number of bytes in the PRDT divided by four (the size in units of
32 bits). This was incorrect according to the spec.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I960771e6ce57002872392993042fae9ec505447e

20 months agofix(ufs): flush the entire PRDT
Jorge Troncoso [Wed, 22 Feb 2023 09:41:18 +0000 (01:41 -0800)]
fix(ufs): flush the entire PRDT

Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table (PRDT). This would cause the UFS host
controller to read empty PRDT entries, which eventually would make the
system crash. This change updates the UFS driver to flush the entire
PRDT, irrespective of the size of the image being read.

This change also throws an error if the memory allocated for UFS
descriptors is not sufficient to hold the entire Physical Region
Descriptor Table (PRDT).

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I291dc62748992481be3cc156ce1474a6e3990ea9

20 months agofix(ufs): only allow using one slot
Jorge Troncoso [Wed, 22 Feb 2023 08:51:31 +0000 (00:51 -0800)]
fix(ufs): only allow using one slot

Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be reserved for other slots in the UTP Transfer Request
List, but because we always use slot zero, the other slots in the UTP
Transfer Request List are never used and this is okay.

Because the Command UPIU, Response UPIU, and PRDT are placed inside the
UTP Transfer Request List, the UFS driver would break if two or more
slots were used at the same time. Therefore, in a sense the
get_empty_slot() function is misleading. It gives developers the
illusion that they can use two or more slots simultaneously but in
reality they cannot.

This change deletes the get_empty_slot() function and replaces it with
is_slot_available() so that only one slot can be used.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I57f316640a1cdd56493505ede61f3012ceb2f305

20 months agoMerge "feat(zynqmp): add hooks for mmap and early setup" into integration
Joanna Farley [Sat, 25 Feb 2023 00:15:09 +0000 (01:15 +0100)]
Merge "feat(zynqmp): add hooks for mmap and early setup" into integration

20 months agofix(rme): update sample platform attestation token
Mate Toth-Pal [Thu, 12 Jan 2023 15:56:43 +0000 (16:56 +0100)]
fix(rme): update sample platform attestation token

Update FVP platform attestation token to comply with RMM Beta0
specification. The changes are:
- change platform implementation id claim value from 64 to 32 bits
- change Realm Challenge
- update Hash Algorithm Identifier claim value
- add protected header
- change signing algotithm to ECDSA ES384

Change-Id: I1c5907d1a4961ce08a1408d25128de125b3f2e7f
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
20 months agoMerge "feat(build): allow additional CFLAGS for library build" into integration
Sandrine Bailleux [Fri, 24 Feb 2023 14:17:10 +0000 (15:17 +0100)]
Merge "feat(build): allow additional CFLAGS for library build" into integration

21 months agofeat(zynqmp): add hooks for mmap and early setup
Amit Nagal [Thu, 23 Feb 2023 16:07:23 +0000 (21:37 +0530)]
feat(zynqmp): add hooks for mmap and early setup

Add early setup hooks (via custom_early_setup()) and provide a way
to cover custom memory mapping which includes extending memory map
via custom_mmap_add().

This likely also require to align MAX_XLAT_TABLE, MAX_XLAT_TABLES
macros. It can be done for example by defining these macros in
custom_pkg.mk
MAX_MMAP_REGIONS := XY
$(eval $(call add_define,MAX_MMAP_REGIONS))
MAX_XLAT_TABLES := XZ
$(eval $(call add_define,MAX_XLAT_TABLES))

custom_early_setup() can be used for early low level operations
related to setting up the system to correct state.

Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Change-Id: I61df6f9ba5af0bc97c430974fb10a2edde44f23d

21 months agoMerge changes from topic "panic_cleanup" into integration
Bipin Ravi [Thu, 23 Feb 2023 22:38:26 +0000 (23:38 +0100)]
Merge changes from topic "panic_cleanup" into integration

* changes:
  refactor(bl31): use elx_panic for sysreg_handler64
  refactor(aarch64): rename do_panic and el3_panic
  refactor(aarch64): remove weak links to el3_panic
  refactor(aarch64): refactor usage of elx_panic
  refactor(aarch64): cleanup HANDLE_EA_EL3_FIRST_NS usage

21 months agoMerge "fix: remove useless "return" at void functions" into integration
Madhukar Pappireddy [Thu, 23 Feb 2023 20:26:24 +0000 (21:26 +0100)]
Merge "fix: remove useless "return" at void functions" into integration

21 months agoMerge "fix(zynqmp): add bitmask for get_op_char API" into integration
Joanna Farley [Thu, 23 Feb 2023 17:23:44 +0000 (18:23 +0100)]
Merge "fix(zynqmp): add bitmask for get_op_char API" into integration

21 months agorefactor(bl31): use elx_panic for sysreg_handler64
Govindraj Raja [Tue, 21 Feb 2023 17:43:55 +0000 (17:43 +0000)]
refactor(bl31): use elx_panic for sysreg_handler64

When we reach sysreg_handler64 from any trap handling we are entering
this path from lower EL and thus we should be calling lower_el_panic
reporting mechanism to print panic report.

Make report_elx_panic available through assembly func elx_panic which
could be used for reporting any lower_el_panic.

Change-Id: Ieb260cf20ea327a59db84198b2c6a6bfc9ca9537
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
21 months agoMerge "docs: add interrupts-target field to sp manifest" into integration
Madhukar Pappireddy [Wed, 22 Feb 2023 16:46:22 +0000 (17:46 +0100)]
Merge "docs: add interrupts-target field to sp manifest" into integration

21 months agofix(zynqmp): add bitmask for get_op_char API
Ronak Jain [Wed, 22 Feb 2023 12:28:02 +0000 (04:28 -0800)]
fix(zynqmp): add bitmask for get_op_char API

As per the current functionality, there are a couple of types like
PM_OPCHAR_TYPE_TEMP, PM_OPCHAR_TYPE_POWER and PM_OPCHAR_TYPE_LATENCY
for the PM_GET_OP_CHARACTERISTIC EEMI API which is mismatched across
the Versal and ZynqMP platforms.

So added the bitmask functionality for PM_GET_OP_CHARACTERISTIC API
in feature check in the firmware and as part of that the firmware fill
up payload[1] with the bitmask value of supported types of the
PM_GET_OP_CHARACTERISTIC EEMI API but from TF-A based on the current
codebase it is just returning the version. So filling up the bitmask
buffer which is received from the firmware and returned the same to
the user.

Signed-off-by: Ronak Jain <ronak.jain@amd.com>
Change-Id: I2c55f3e902a5f89eed899e99a97ad9b3f0a12796

21 months agoMerge changes I51c13c52,I3358c51e into integration
Manish Pandey [Wed, 22 Feb 2023 12:19:01 +0000 (13:19 +0100)]
Merge changes I51c13c52,I3358c51e into integration

* changes:
  build: always prefix section names with `.`
  build: communicate correct page size to linker

21 months agoMerge "feat(gicv3): enlarge the range for intr_num of structure interrupt_prop_t...
Manish Pandey [Wed, 22 Feb 2023 09:51:11 +0000 (10:51 +0100)]
Merge "feat(gicv3): enlarge the range for intr_num of structure interrupt_prop_t" into integration

21 months agoMerge "fix(zynqmp): panic w/o handoff structure in !JTAG" into integration
Joanna Farley [Wed, 22 Feb 2023 09:47:41 +0000 (10:47 +0100)]
Merge "fix(zynqmp): panic w/o handoff structure in !JTAG" into integration

21 months agoMerge "fix(zynqmp): move EM SMC range to SIP range" into integration
Joanna Farley [Wed, 22 Feb 2023 09:44:20 +0000 (10:44 +0100)]
Merge "fix(zynqmp): move EM SMC range to SIP range" into integration