]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoel3_runtime: Update context save and restore routines for EL1 and EL2
Manish V Badarkhe [Tue, 28 Jul 2020 06:12:56 +0000 (07:12 +0100)]
el3_runtime: Update context save and restore routines for EL1 and EL2

As per latest mailing communication [1], we decided
not to update SCTLR and TCR registers in EL1 and EL2 context
restore routine when AT speculative workaround is enabled
hence reverted the changes done as part of this commit: 45aecff00.

[1]:
https://lists.trustedfirmware.org/pipermail/tf-a/2020-July/000586.html

Change-Id: I8c5f31d81fcd53770a610e302a5005d98772b71f
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge "plat/arm: Use common build flag for using generic sp804 driver" into integration
Mark Dykes [Mon, 17 Aug 2020 21:08:44 +0000 (21:08 +0000)]
Merge "plat/arm: Use common build flag for using generic sp804 driver" into integration

5 years agoplat/arm: Use common build flag for using generic sp804 driver
Madhukar Pappireddy [Wed, 12 Aug 2020 18:18:19 +0000 (13:18 -0500)]
plat/arm: Use common build flag for using generic sp804 driver

SP804 TIMER is not platform specific, and current code base adds
multiple defines to use this driver. Like FVP_USE_SP804_TIMER and
FVP_VE_USE_SP804_TIMER.

This patch removes platform specific build flag and adds generic
flag `USE_SP804_TIMER` to be set to 1 by platform if needed.

Change-Id: I5ab792c189885fd1b98ddd187f3a38ebdd0baba2
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "doc: Refactor the contribution guidelines" into integration
Sandrine Bailleux [Mon, 17 Aug 2020 08:29:11 +0000 (08:29 +0000)]
Merge "doc: Refactor the contribution guidelines" into integration

5 years agoMerge "stm32mp1: use newly introduced GICv2 makefile" into integration
Madhukar Pappireddy [Sun, 16 Aug 2020 23:05:12 +0000 (23:05 +0000)]
Merge "stm32mp1: use newly introduced GICv2 makefile" into integration

5 years agoMerge "lib: cpus: denver: add some MIDR values" into integration
Varun Wadekar [Fri, 14 Aug 2020 20:32:44 +0000 (20:32 +0000)]
Merge "lib: cpus: denver: add some MIDR values" into integration

5 years agoMerge changes from topic "sb/contribution-guidelines" into integration
Mark Dykes [Fri, 14 Aug 2020 19:59:57 +0000 (19:59 +0000)]
Merge changes from topic "sb/contribution-guidelines" into integration

* changes:
  doc: Mention the TF-A Tech Forum as a way to contact developers
  doc: Emphasize that security issues must not be reported as normal bugs

5 years agoMerge "doc: Stop advising the creation of Phabricator issues" into integration
Mark Dykes [Fri, 14 Aug 2020 19:48:39 +0000 (19:48 +0000)]
Merge "doc: Stop advising the creation of Phabricator issues" into integration

5 years agoMerge changes from topic "tegra-downstream-07092020" into integration
Mark Dykes [Fri, 14 Aug 2020 19:12:35 +0000 (19:12 +0000)]
Merge changes from topic "tegra-downstream-07092020" into integration

* changes:
  Tegra: memctrl: remove unused TZRAM setup function
  Tegra: reorganize drivers and lib folders

5 years agostm32mp1: use newly introduced GICv2 makefile
Yann Gautier [Fri, 7 Aug 2020 07:48:30 +0000 (09:48 +0200)]
stm32mp1: use newly introduced GICv2 makefile

Include the GICv2 makefile in STM32MP1 SP_min makefile, and use
${GICV2_SOURCES} instead of taking drivers/arm/gic files directly.

Change-Id: Ibcaed5b0bd17f6d8cf200e208c11cc10cd6d2ee5
Signed-off-by: Yann Gautier <yann.gautier@st.com>
5 years agoMerge changes from topic "sp_dual_signing" into integration
Manish Pandey [Fri, 14 Aug 2020 15:58:04 +0000 (15:58 +0000)]
Merge changes from topic "sp_dual_signing" into integration

* changes:
  SPM: Add owner field to cactus secure partitions
  SPM: Alter sp_gen.mk entry depending on owner of partition
  plat/arm: enable support for Plat owned SPs

5 years agoSPM: Add owner field to cactus secure partitions
Ruari Phipps [Tue, 11 Aug 2020 14:28:03 +0000 (15:28 +0100)]
SPM: Add owner field to cactus secure partitions

For supporting dualroot CoT for Secure Partitions a new optional field
"owner" is introduced which will be used to sign the SP with
corresponding signing domain. To demonstrate its usage, this patch adds
owners to cactus Secure Partitions.

Signed-off-by: Ruari Phipps <ruari.phipps@arm.com>
Change-Id: I7b760580355fc92edf5402cecc38c38125dc1cae

5 years agoSPM: Alter sp_gen.mk entry depending on owner of partition
Ruari Phipps [Fri, 24 Jul 2020 15:20:57 +0000 (16:20 +0100)]
SPM: Alter sp_gen.mk entry depending on owner of partition

With recently introduced dualroot CoT for SPs where they are owned
either by SiP or by Platform. SiP owned SPs index starts at SP_PKG1_ID
while Plat owned SPs index starts at SP_PKG5_ID.

This patch modifies SP makefile generator script to take CoT as an
argument and if it is "dualroot" then generates SP_PKG in order
mentioned above, otherwise generates it sequentially.

Signed-off-by: Ruari Phipps <ruari.phipps@arm.com>
Change-Id: Iffad1131787be650a9462f6f8cc09b603cddb3b8

5 years agoplat/arm: enable support for Plat owned SPs
Manish Pandey [Fri, 31 Jul 2020 15:15:16 +0000 (16:15 +0100)]
plat/arm: enable support for Plat owned SPs

For Arm platforms SPs are loaded by parsing tb_fw_config.dts and
adding them to SP structure sequentially, which in-turn is appended to
loadable image list.

With recently introduced dualroot CoT for SPs where they are owned
either by SiP or by Platform. SiP owned SPs index starts at SP_PKG1_ID
and Plat owned SPs index starts at SP_PKG5_ID. As the start index of SP
depends on the owner, there should be a mechanism to parse owner of a SP
and put it at the correct index in SP structure.

This patch adds support for parsing a new optional field "owner" and
based on it put SP details(UUID & Load-address) at the correct index in
SP structure.

Change-Id: Ibd255b60d5c45023cc7fdb10971bef6626cb560b
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agodoc: Refactor the contribution guidelines
Sandrine Bailleux [Wed, 12 Aug 2020 09:29:46 +0000 (11:29 +0200)]
doc: Refactor the contribution guidelines

Ensuring that each file changed by a patch has the correct copyright and
license information does not only apply to documentation files but to
all files within the source tree.

Move the guidance for copyright and license headers out of the paragraph
about updating the documentation to avoid any confusion.

Also do some cosmetic changes (adding empty lines, fitting in longer
lines in the 80-column limit, ...) to improve the readability of the RST
file.

Change-Id: I241a2089ca9db70f5a9f26b7070b947674b43265
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Mention the TF-A Tech Forum as a way to contact developers
Sandrine Bailleux [Wed, 12 Aug 2020 11:41:41 +0000 (13:41 +0200)]
doc: Mention the TF-A Tech Forum as a way to contact developers

Change-Id: Ib4ad853ebb6e28adcf9ed14714d43799f9370343
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Emphasize that security issues must not be reported as normal bugs
Sandrine Bailleux [Wed, 12 Aug 2020 08:52:32 +0000 (10:52 +0200)]
doc: Emphasize that security issues must not be reported as normal bugs

Change-Id: I43e452c9993a8608b20ec029562982f5dcf8e6b2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Stop advising the creation of Phabricator issues
Sandrine Bailleux [Mon, 3 Aug 2020 08:27:19 +0000 (10:27 +0200)]
doc: Stop advising the creation of Phabricator issues

We have noticed that Phabricator (the ticketing system on tf.org [1])
has far less visibility within the community than the mailing list [2].
For this reason, let's drop usage of Phabricator for anything else than
bug reports. For the rest, advise contributors to start a discussion on
the mailing list, where they are more likely to get feedback.

[1] https://developer.trustedfirmware.org/project/board/1/
[2] https://lists.trustedfirmware.org/mailman/listinfo/tf-a

Change-Id: I7d2d3d305ad0a0f8aacc2a2f25eb5ff429853a3f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoMerge changes from topic "sp_dual_signing" into integration
Sandrine Bailleux [Fri, 14 Aug 2020 11:44:58 +0000 (11:44 +0000)]
Merge changes from topic "sp_dual_signing" into integration

* changes:
  dualroot: add chain of trust for Platform owned SPs
  cert_create: add Platform owned secure partitions support

5 years agoMerge "Use true instead of 1 in while" into integration
Sandrine Bailleux [Fri, 14 Aug 2020 11:43:05 +0000 (11:43 +0000)]
Merge "Use true instead of 1 in while" into integration

5 years agoMerge changes from topic "bl1-misra" into integration
Sandrine Bailleux [Fri, 14 Aug 2020 11:38:25 +0000 (11:38 +0000)]
Merge changes from topic "bl1-misra" into integration

* changes:
  Specify signed-ness of constants
  Prevent colliding identifiers

5 years agoUse true instead of 1 in while
Jimmy Brisson [Thu, 6 Aug 2020 15:50:15 +0000 (10:50 -0500)]
Use true instead of 1 in while

This resolves MISRA defects such as:

    plat/common/plat_bl1_common.c:63:[MISRA C-2012 Rule 14.4 (required)]
    The condition expression "1" does not have an essentially boolean type.

Change-Id: I679411980ad661191fbc834a44a5eca5494fd0e2
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoSpecify signed-ness of constants
Jimmy Brisson [Wed, 5 Aug 2020 20:33:40 +0000 (15:33 -0500)]
Specify signed-ness of constants

We relyed on the default signed-ness of constants, which is usually
signed. This can create MISRA violations, such as:

     bl1/bl1_main.c:257:[MISRA C-2012 10.8 (required)] Cast of composite
     expression off essential type signed to essential type unsigned

These constants were only used as unsigned, so this patch makes them
explicitly unsigned.

Change-Id: I5f1310c881e936077035fbb1d5ffb449b45de3ad
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoPrevent colliding identifiers
Jimmy Brisson [Wed, 5 Aug 2020 19:05:53 +0000 (14:05 -0500)]
Prevent colliding identifiers

There was a collision between the name of the typedef in the CASSERT and
something else, so we make the name of the typedef unique to the
invocation of DEFFINE_SVC_UUID2 by appending the name that's passed into
the macro. This eliminates the following MISRA violation:

    bl1/bl1_main.c:233:[MISRA C-2012 Rule 5.6 (required)] Identifier
    "invalid_svc_uuid" is already used to represent a typedef.

This also resolves MISRA rule 5.9.

These renamings are as follows:
  * tzram -> secram. This matches the function call name as it has
  sec_mem in it's  name
  * fw_config_base -> config_base. This file does not mess with
  hw_conig, so there's little chance of confusion

Change-Id: I8734ba0956140c8e29b89d0596d10d61a6ef351e
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoMerge "lib: cpus: denver: mark exception vectors as private" into integration
Mark Dykes [Thu, 13 Aug 2020 21:09:09 +0000 (21:09 +0000)]
Merge "lib: cpus: denver: mark exception vectors as private" into integration

5 years agoMerge "qti: Add RNG driver" into integration
joanna.farley [Thu, 13 Aug 2020 17:35:43 +0000 (17:35 +0000)]
Merge "qti: Add RNG driver" into integration

5 years agoqti: Add RNG driver
Saurabh Gorecha [Wed, 8 Jul 2020 20:50:08 +0000 (02:20 +0530)]
qti: Add RNG driver

This patch adds RNG driver and use it to generate random number for stack
protection.

Change-Id: I73d79e68d08b5aa902dc7fad48e17a03f996178d
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
5 years agoMerge "TF-A AMU: remove AMU enable info print" into integration
Madhukar Pappireddy [Thu, 13 Aug 2020 16:51:46 +0000 (16:51 +0000)]
Merge "TF-A AMU: remove AMU enable info print" into integration

5 years agoTF-A AMU: remove AMU enable info print
Olivier Deprez [Thu, 13 Aug 2020 10:55:54 +0000 (12:55 +0200)]
TF-A AMU: remove AMU enable info print

Following f3ccf036ecb1ae1628 the INFO print in amu_enable is causing
a lot of print outs on UART1 in DEBUG mode especially on PSCI test
cases because CPU_ON or SUSPEND operations call:
cm_prepare_el3_exit => enable_extensions_nonsecure => amu_enable.
PSCI SUSPEND is also very frequent in linux boot cases causing test
timeout failures.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I63581f8fa489d44b3b1d10af3b7f6fdf3af44720

5 years agodualroot: add chain of trust for Platform owned SPs
Manish Pandey [Fri, 31 Jul 2020 15:25:17 +0000 (16:25 +0100)]
dualroot: add chain of trust for Platform owned SPs

For dualroot CoT there are two sets of SP certificates, one owned by
Silicon Provider(SiP) and other owned by Platform. Each certificate can
have a maximum of 4 SPs.

This patch reduces the number of SiP owned SPs from 8 to 4 and adds
the remaining 4 to Plat owned SP.
Plat owned SP certificate is signed using Platform RoT key and
protected against anti-rollback using the Non-trusted Non-volatile
counter.

Change-Id: Idc3ddd87d6d85a5506a7435f45a6ec17c4c50425
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
5 years agocert_create: add Platform owned secure partitions support
Manish Pandey [Fri, 24 Jul 2020 15:43:54 +0000 (16:43 +0100)]
cert_create: add Platform owned secure partitions support

Add support to generate a certificate named "plat-sp-cert" for Secure
Partitions(SP) owned by Platform.
Earlier a single certificate file "sip-sp-cert" was generated which
contained hash of all 8 SPs, with this change SPs are divided into
two categories viz "SiP owned" and "Plat owned" containing 4 SPs each.

Platform RoT key pair is used for signing.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I5bd493cfce4cf3fc14b87c8ed1045f633d0c92b6

5 years agoMerge "TF-A AMU extension: fix detection of group 1 counters." into integration
Mark Dykes [Tue, 11 Aug 2020 15:30:13 +0000 (15:30 +0000)]
Merge "TF-A AMU extension: fix detection of group 1 counters." into integration

5 years agoMerge "plat/arm: Reduce size of BL31 binary" into integration
Manish Pandey [Tue, 11 Aug 2020 10:24:26 +0000 (10:24 +0000)]
Merge "plat/arm: Reduce size of BL31 binary" into integration

5 years agoMerge changes from topic "release/14.0" into integration
Manish Pandey [Mon, 10 Aug 2020 23:13:36 +0000 (23:13 +0000)]
Merge changes from topic "release/14.0" into integration

* changes:
  docs: marvell: update PHY porting layer description
  docs: marvell: update path in marvell documentation
  docs: marvell: update build instructions with CN913x
  plat: marvell: octeontx: add support for t9130
  plat: marvell: t9130: add SVC support
  plat: marvell: t9130: update AVS settings
  plat: marvell: t9130: pass actual CP count for load_image
  plat: marvell: armada: a7k: add support to SVC validation mode
  plat: marvell: armada: add support for twin-die combined memory device

5 years agoMerge "sc7180 platform support" into integration
Julius Werner [Mon, 10 Aug 2020 20:50:39 +0000 (20:50 +0000)]
Merge "sc7180 platform support" into integration

5 years agoTF-A AMU extension: fix detection of group 1 counters.
Alexei Fedorov [Tue, 14 Jul 2020 07:17:56 +0000 (08:17 +0100)]
TF-A AMU extension: fix detection of group 1 counters.

This patch fixes the bug when AMUv1 group1 counters was
always assumed being implemented without checking for its
presence which was causing exception otherwise.
The AMU extension code was also modified as listed below:
- Added detection of AMUv1 for ARMv8.6
- 'PLAT_AMU_GROUP1_NR_COUNTERS' build option is removed and
number of group1 counters 'AMU_GROUP1_NR_COUNTERS' is now
calculated based on 'AMU_GROUP1_COUNTERS_MASK' value
- Added bit fields definitions and access functions for
AMCFGR_EL0/AMCFGR and AMCGCR_EL0/AMCGCR registers
- Unification of amu.c Aarch64 and Aarch32 source files
- Bug fixes and TF-A coding style compliant changes.

Change-Id: I14e407be62c3026ebc674ec7045e240ccb71e1fb
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoplat/arm: Reduce size of BL31 binary
Alexei Fedorov [Tue, 21 Jul 2020 16:07:45 +0000 (17:07 +0100)]
plat/arm: Reduce size of BL31 binary

BL31 binary size is aligned to 4KB because of the
code in include\plat\arm\common\arm_reclaim_init.ld.S:
    __INIT_CODE_UNALIGNED__ = .;
    . = ALIGN(PAGE_SIZE);
    __INIT_CODE_END__ = .;
with all the zero data after the last instruction of
BL31 code to the end of the page.
This causes increase in size of BL31 binary stored in FIP
and its loading time by BL2.
This patch reduces the size of BL31 image by moving
page alignment from __INIT_CODE_END__ to __STACKS_END__
which also increases the stack size for secondary CPUs.

Change-Id: Ie2ec503fc774c22c12ec506d74fd3ef2b0b183a9
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agosc7180 platform support
Saurabh Gorecha [Wed, 22 Apr 2020 16:01:24 +0000 (21:31 +0530)]
sc7180 platform support

Adding support for QTI CHIP SC7180 on ATF

Change-Id: I0d82d3a378036003fbd0bc4784f61464bb76ea82
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
Co-authored-by: Maulik Shah <mkshah@codeaurora.org>
5 years agoMerge "MISRA cleanup in mem_region and semihosting files" into integration
Madhukar Pappireddy [Sun, 9 Aug 2020 17:21:48 +0000 (17:21 +0000)]
Merge "MISRA cleanup in mem_region and semihosting files" into integration

5 years agolib: cpus: denver: add some MIDR values
Alex Van Brunt [Tue, 23 Jul 2019 17:00:42 +0000 (10:00 -0700)]
lib: cpus: denver: add some MIDR values

This patch adds support for additional Denver MIDRs to
cover all the current SKUs.

Change-Id: I85d0ffe9b3cb351f430ca7d7065a2609968a7a28
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: memctrl: remove unused TZRAM setup function
Varun Wadekar [Mon, 17 Jun 2019 18:45:11 +0000 (11:45 -0700)]
Tegra: memctrl: remove unused TZRAM setup function

This patch removes the unused TZRAM setup function from the memory
controller driver.

Change-Id: Ic16f21fb84c47df71be6ab3e1e286640daa39291
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: reorganize drivers and lib folders
Varun Wadekar [Thu, 13 Jun 2019 22:32:11 +0000 (15:32 -0700)]
Tegra: reorganize drivers and lib folders

This patch moves the 'drivers' and the 'lib' folders out of the
'common' folder. This way the 'common' folder shall contain only
the platform support required for all Tegra platforms.

Change-Id: I2f238572d0a078d60c6b458a559538dc8a4d1856
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agolib: cpus: denver: mark exception vectors as private
Varun Wadekar [Thu, 13 Jun 2019 18:55:05 +0000 (11:55 -0700)]
lib: cpus: denver: mark exception vectors as private

This patch removes the 'workaround_bpflush_runtime_exceptions' exception
vector table base address from the globals list as it gets used only by
the Denver CPU implementation.

Change-Id: I6ef94989f6dc4535d464493cc8621d32795ee1f6
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoMISRA cleanup in mem_region and semihosting files
johpow01 [Thu, 30 Jul 2020 22:11:03 +0000 (17:11 -0500)]
MISRA cleanup in mem_region and semihosting files

MISRA defect cleanup and general code cleanup in mem_region.c and
semihosting.c.  This task also called for cleanup of the ARM NOR flash
driver but that was removed at some point since the Jira task was
created.  This patch fixes all MISRA defects in these files except for a
few "Calling function "console_flush()" which returns error information
without testing the error information." errors which can't really be
avoided.

Defects Fixed

File                           Line Rule
lib/semihosting/semihosting.c  70   MISRA C-2012 Rule 14.4 (required)
lib/semihosting/semihosting.c  197  MISRA C-2012 Rule 14.3 (required)
lib/semihosting/semihosting.c  210  MISRA C-2012 Rule 14.4 (required)
lib/utils/mem_region.c         128  MISRA C-2012 Rule 12.1 (advisory)

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I21a039d1cfccd6aa4301da09daec15e373305a80

5 years agoMerge "Fix broken links in docs" into integration
Mark Dykes [Fri, 7 Aug 2020 18:47:02 +0000 (18:47 +0000)]
Merge "Fix broken links in docs" into integration

5 years agoMerge "plat: imx: add sdei support for i.MX8MM" into integration
Madhukar Pappireddy [Fri, 7 Aug 2020 13:57:37 +0000 (13:57 +0000)]
Merge "plat: imx: add sdei support for i.MX8MM" into integration

5 years agoFix broken links in docs
Madhukar Pappireddy [Thu, 6 Aug 2020 17:36:17 +0000 (12:36 -0500)]
Fix broken links in docs

Change-Id: If82aaba9f2a5a74cfb5e4381f968166037a70037
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoplat: imx: add sdei support for i.MX8MM
Peng Fan [Mon, 27 Jul 2020 13:22:14 +0000 (21:22 +0800)]
plat: imx: add sdei support for i.MX8MM

Add sdei support for i.MX8MM, this is to let jailhouse Hypervisor
could use SDEI to do hypervisor management, after physical IRQ
has been disabled routing.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I5fd697fee22df151e13d0f1335e8ac8a7bae6189

5 years agoMerge "Initialize platform for MediaTek mt8192" into integration
Mark Dykes [Wed, 5 Aug 2020 19:13:16 +0000 (19:13 +0000)]
Merge "Initialize platform for MediaTek mt8192" into integration

5 years agoMerge "BL31: Fix relocation error for PIE" into integration
Manish Pandey [Wed, 5 Aug 2020 16:35:19 +0000 (16:35 +0000)]
Merge "BL31: Fix relocation error for PIE" into integration

5 years agoMerge "Use abspath to dereference $BUILD_BASE" into integration
Alexei Fedorov [Wed, 5 Aug 2020 16:31:27 +0000 (16:31 +0000)]
Merge "Use abspath to dereference $BUILD_BASE" into integration

5 years agoMerge changes from topic "qemu" into integration
Sandrine Bailleux [Wed, 5 Aug 2020 07:42:45 +0000 (07:42 +0000)]
Merge changes from topic "qemu" into integration

* changes:
  docs: qemu: bump to QEMU 5.0.0
  docs: qemu: remove unneeded root=/dev/vda2 kernel parameter
  docs: qemu: add build instructions for QEMU_EFI.fd and rootfs.cpio.gz

5 years agoUse abspath to dereference $BUILD_BASE
Grant Likely [Thu, 30 Jul 2020 07:50:10 +0000 (08:50 +0100)]
Use abspath to dereference $BUILD_BASE

If the user tries to change BUILD_BASE to put the build products outside
the build tree the compile will fail due to hard coded assumptions that
$BUILD_BASE is a relative path. Fix by using $(abspath $(BUILD_BASE))
to rationalize to an absolute path every time and remove the relative
path assumptions.

This patch also adds documentation that BUILD_BASE can be specified by
the user.

Signed-off-by: Grant Likely <grant.likely@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ib1af874de658484aaffc672f30029b852d2489c8

5 years agoMerge "spm-mm: fix MISRA C-2012 Rule 2.3 spm_mm_boot_info_t defined but never used...
Madhukar Pappireddy [Tue, 4 Aug 2020 14:21:51 +0000 (14:21 +0000)]
Merge "spm-mm: fix MISRA C-2012 Rule 2.3 spm_mm_boot_info_t defined but never used." into integration

5 years agoMerge "SPM: build OP-TEE as an S-EL1 Secure Partition" into integration
Manish Pandey [Tue, 4 Aug 2020 09:59:49 +0000 (09:59 +0000)]
Merge "SPM: build OP-TEE as an S-EL1 Secure Partition" into integration

5 years agoMerge "Fix broken links to various sections across docs" into integration
Sandrine Bailleux [Tue, 4 Aug 2020 09:00:47 +0000 (09:00 +0000)]
Merge "Fix broken links to various sections across docs" into integration

5 years agoMerge "TF-A Aarch32: optimise memcpy4()" into integration
Manish Pandey [Mon, 3 Aug 2020 22:24:29 +0000 (22:24 +0000)]
Merge "TF-A Aarch32: optimise memcpy4()" into integration

5 years agoMerge "Aarch32 xlat_tables lib: Fix MISRA-2012 defects" into integration
Madhukar Pappireddy [Mon, 3 Aug 2020 17:49:44 +0000 (17:49 +0000)]
Merge "Aarch32 xlat_tables lib: Fix MISRA-2012 defects" into integration

5 years agoFix broken links to various sections across docs
Madhukar Pappireddy [Wed, 29 Jul 2020 14:37:25 +0000 (09:37 -0500)]
Fix broken links to various sections across docs

These broken links were found with the help of this command:
$> sphinx-build -M linkcheck . build

A sample broken link is reported as follows:
(line   80) -local-   firmware-design.rst#secure-el1-payloads-and-dispatchers

Change-Id: I5dcefdd4b8040908658115647e957f6c2c5da7c2
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "arm_fpga: Support uploading a custom command line" into integration
André Przywara [Mon, 3 Aug 2020 10:37:27 +0000 (10:37 +0000)]
Merge "arm_fpga: Support uploading a custom command line" into integration

5 years agoMerge "tbbr/dualroot: rename SP package certificate file" into integration
Manish Pandey [Fri, 31 Jul 2020 15:54:43 +0000 (15:54 +0000)]
Merge "tbbr/dualroot: rename SP package certificate file" into integration

5 years agoBL31: Fix relocation error for PIE
Alexei Fedorov [Fri, 31 Jul 2020 14:23:55 +0000 (15:23 +0100)]
BL31: Fix relocation error for PIE

This patch fixes BL31 linker error
 "relocation R_AARCH64_ABS32 against `a local symbol'
 can not be used when making a shared object"
when Position Independent Executable (PIE) support
is enabled with ENABLE_PIE=1 build option.

Change-Id: I2692269676db3f3b27eed499fc029fffb67969be
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "Makefile, doc: Make OPENSSL_DIR variable as build option for tools" into integ...
Madhukar Pappireddy [Fri, 31 Jul 2020 14:07:17 +0000 (14:07 +0000)]
Merge "Makefile, doc: Make OPENSSL_DIR variable as build option for tools" into integration

5 years agotbbr/dualroot: rename SP package certificate file
Manish Pandey [Thu, 23 Jul 2020 15:54:30 +0000 (16:54 +0100)]
tbbr/dualroot: rename SP package certificate file

Currently only single signing domain is supported for SP packages but
there is plan to support dual signing domains if CoT is dualroot.

SP_CONTENT_CERT_ID is the certificate file which is currently generated
and signed with trusted world key which in-turn is derived from Silicon
provider RoT key.
To allow dual signing domain for SP packages, other certificate file
will be derived from Platform owned RoT key.

This patch renames "SP_CONTENT_CERT_ID" to "SIP_SP_CONTENT_CERT_ID" and
does other related changes.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I0bc445a3ab257e2dac03faa64f46e36a9fed5e93

5 years agospm-mm: fix MISRA C-2012 Rule 2.3 spm_mm_boot_info_t defined but never used.
Olivier Deprez [Thu, 30 Jul 2020 15:18:33 +0000 (17:18 +0200)]
spm-mm: fix MISRA C-2012 Rule 2.3 spm_mm_boot_info_t defined but never used.

Following merge of patchset [1] the spm_mm_boot_info_t structure is
included in few platform files unconditionally even when SPM_MM option
is disabled.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/2647

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I68bc034c9348b5d9bcfd2e5217b781df5ad1b369

5 years agoInitialize platform for MediaTek mt8192
Nina Wu [Fri, 17 Apr 2020 09:14:23 +0000 (17:14 +0800)]
Initialize platform for MediaTek mt8192

- Add basic platform setup
- Add mt8192 documentation at docs/plat/
- Add generic CPU helper functions
- Add basic register address

Change-Id: Ife34622105404a8227441aab939e3c55c96374e9
Signed-off-by: Nina Wu <nina-cm.wu@mediatek.com>
5 years agoMerge "fconf: spm: minor bug fix" into integration
Madhukar Pappireddy [Thu, 30 Jul 2020 23:57:25 +0000 (23:57 +0000)]
Merge "fconf: spm: minor bug fix" into integration

5 years agoarm_fpga: Support uploading a custom command line
Andre Przywara [Tue, 7 Jul 2020 09:40:46 +0000 (10:40 +0100)]
arm_fpga: Support uploading a custom command line

The command line for BL33 payloads is typically taken from the DTB. On
"normal" systems the bootloader will put the right version in there, but
we typically don't use one on the FPGAs.
To avoid editing (and possibly re-packaging) the DTB for every change in
the command line, try to read it from some "magic" memory location
instead. It can be easily placed there by the tool that uploads the
other payloads to the FPGA's memory. BL31 will then replace the existing
command line in the DTB with that new string.

To avoid reading garbage, check the memory location for containing a
magic value. This is conveniently chosen to be a simple ASCII string, so
it can just preceed the actual command line in a text file:
--------------------------------
CMD:console=ttyAMA0,38400n8 debug loglevel=8
--------------------------------

Change-Id: I5923a80332c9fac3b4afd1a6aaa321233d0f60da
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoSPM: build OP-TEE as an S-EL1 Secure Partition
Olivier Deprez [Wed, 1 Apr 2020 19:28:26 +0000 (21:28 +0200)]
SPM: build OP-TEE as an S-EL1 Secure Partition

Provide manifest and build options to boot OP-TEE as a
guest S-EL1 Secure Partition on top of Hafnium in S-EL2.

Increase ARM_SP_MAX_SIZE to cope with OP-TEE debug build image.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Idd2686fa689a78fe2d05ed92b1d23c65e2edd4cb

5 years agoMakefile, doc: Make OPENSSL_DIR variable as build option for tools
Manish V Badarkhe [Wed, 29 Jul 2020 09:58:44 +0000 (10:58 +0100)]
Makefile, doc: Make OPENSSL_DIR variable as build option for tools

Openssl directory path is hardcoded to '/usr' in the makefile
of certificate generation and firmware encryption tool using
'OPENSSL_DIR' variable.

Hence changes are done to make 'OPENSSL_DIR' variable as
a build option so that user can provide openssl directory
path while building the certificate generation and firmware
encryption tool.

Also, updated the document for this newly created build option

Change-Id: Ib1538370d2c59263417f5db3746d1087ee1c1339
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge "fdts: n1sdp: DTS file for single-chip and multi-chip environment." into integr...
Manish Pandey [Thu, 30 Jul 2020 13:41:16 +0000 (13:41 +0000)]
Merge "fdts: n1sdp: DTS file for single-chip and multi-chip environment." into integration

5 years agodocs: marvell: update PHY porting layer description
Grzegorz Jaszczyk [Fri, 22 Mar 2019 10:38:56 +0000 (11:38 +0100)]
docs: marvell: update PHY porting layer description

The purpose of rx_training had changed after last update. Currently it
is not supposed to help with providing static parameters for porting
layer. Instead, it aims to suit the parameters per connection.

Change-Id: I2a146b71e2e20bd264c090a9a627d0b6bc56e052
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agodocs: marvell: update path in marvell documentation
Grzegorz Jaszczyk [Mon, 10 Dec 2018 11:01:29 +0000 (12:01 +0100)]
docs: marvell: update path in marvell documentation

Change-Id: I0cebbaa900aa518700f13cbf02f8a97e0c76b21c
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agodocs: marvell: update build instructions with CN913x
Konstantin Porotchkin [Tue, 19 Feb 2019 08:40:33 +0000 (10:40 +0200)]
docs: marvell: update build instructions with CN913x

Add references to the OcteonTX2 CN913x family.

Change-Id: I172a8e3d061086bf4843acad014c113c80359e01
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
5 years agoplat: marvell: octeontx: add support for t9130
Grzegorz Jaszczyk [Sun, 9 Dec 2018 21:08:20 +0000 (22:08 +0100)]
plat: marvell: octeontx: add support for t9130

CN-9130 has single CP0 inside the package and 2 additional one from MoChi
interface. In case of db-9130-modular board the MCI interface is routed to:
- on-board CP115 (MCI0)
- extension board CP115 (MCI1)

The board is based on DIMM DDR.

The 9130 has up to 3CP, and decoding windows looks like below:

  (free for further use)
 .----------. 0xf800 0000
 | CP2 CFG  |
 '----------' 0xf600 0000
 | CP1 CFG  |
 '----------' 0xf400 0000
 | CP0 CFG  |
 '----------' 0xf200 0000
 | AP CFG   |
 '----------' 0xf000 0000
  (free for further use)
 .----------. 0xec00 0000
 | SPI      |
 | MEM_MAP  | (Currently not opened)
 '----------' 0xe800 0000
 | PEX2_CP2 |
 '----------' 0xe700 0000
 | PEX1_CP2 |
 '----------' 0xe600 0000
 | PEX0-CP2 |
 '----------'
 .----------. 0xe500 0000
 | PEX2_CP1 |
 '----------' 0xe400 0000
 | PEX1_CP1 |
 '----------' 0xe300 0000
 | PEX0-CP1 |
 '----------'
 .----------. 0xe200 0000
 | PEX2-CP0 |
 '----------' 0xe100 0000
 | PEX1-CP0 |
 '----------' 0xe000 0000
 | PEX0-CP0 |
 | 512MB    |
 '----------' 0xc000 0000

Change-Id: Ia8eee4f96c1043753f74f9da437b9f72ce2d6eb0
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agoplat: marvell: t9130: add SVC support
Alex Evraev [Mon, 6 May 2019 10:15:07 +0000 (13:15 +0300)]
plat: marvell: t9130: add SVC support

As the preparation for adding the CN913x SoC family support
introduce code that enable SVC and the frequency handling
specific for the AP807 North Bridge.

Change-Id: Ibe34a511b49cd9671a2e53b77bdcfc644bb915e3
Signed-off-by: Alex Evraev <alexev@marvell.com>
5 years agoplat: marvell: t9130: update AVS settings
Grzegorz Jaszczyk [Thu, 24 Jan 2019 09:18:33 +0000 (10:18 +0100)]
plat: marvell: t9130: update AVS settings

Update AVS settings and remove unused macros.
This is a preparation patch for adding CN913x SoC
family support.

Change-Id: Ib1dd70885a316ed5763d0f4730d0e4734da117b7
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
5 years agoplat: marvell: t9130: pass actual CP count for load_image
Ben Peled [Wed, 27 Mar 2019 14:26:02 +0000 (16:26 +0200)]
plat: marvell: t9130: pass actual CP count for load_image

Add CN913x case to bl2_plat_get_cp_count.
Fix loading of cp1/2 image. This is a preparation
patch for adding CN913x SoC family support.

Change-Id: Id84a30203d20572fc0dfd3f91ea395c199a85fe9
Signed-off-by: Ben Peled <bpeled@marvell.com>
5 years agoplat: marvell: armada: a7k: add support to SVC validation mode
Alex Evraev [Sun, 11 Aug 2019 10:38:15 +0000 (13:38 +0300)]
plat: marvell: armada: a7k: add support to SVC validation mode

Add support for “AVS reduction” feature at this mode for
7040 Dual Cluster operation mode at CPU=1600MHz

Change-Id: Ia72b10e0ccfad07568bf4c089ea3990173ae24b2
Signed-off-by: Alex Evraev <alexev@marvell.com>
5 years agoplat: marvell: armada: add support for twin-die combined memory device
Moti Buskila [Sun, 6 Oct 2019 13:36:27 +0000 (16:36 +0300)]
plat: marvell: armada: add support for twin-die combined memory device

the twin-die combined memory device should be treated as
X8 device and not as X16 one. This patch is required to
re-enable compilation after BLE (mv-ddr-marvell) firmware upgrade.

Change-Id: I41257ff2825164ebca85a84bbb8462d7b3447b97
Signed-off-by: Moti Buskila <motib@marvell.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
5 years agofdts: n1sdp: DTS file for single-chip and multi-chip environment.
Andre Przywara [Mon, 6 Jul 2020 05:49:41 +0000 (11:19 +0530)]
fdts: n1sdp: DTS file for single-chip and multi-chip environment.

N1SDP supports both single-chip and multi-chip environment.
Added  DTS file for both type of environment.
Enabled DTS files compilation for N1SDP platform.

Change-Id: I66af88dcfb841893eb6ed2ca18d3025de81236a0
Co-authored-by: Robin Murphy <Robin.Murphy@arm.com>
Co-authored-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Co-authored-by: Manoj Kumar <manoj.kumar3@arm.com>
Co-authored-by: Anurag Koul <anurag.koul@arm.com>
Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
5 years agofconf: spm: minor bug fix
Manish Pandey [Mon, 27 Jul 2020 12:00:38 +0000 (13:00 +0100)]
fconf: spm: minor bug fix

This patch fixes a bug where wrong panic was caused when the number
of SP was same as max limit.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I9ace62d8d5bcdc410eeacdd9d33d55a7be5fcc8e

5 years agoMerge "GIC-600: Fix MISRA-2012 defects" into integration
Mark Dykes [Wed, 29 Jul 2020 19:24:53 +0000 (19:24 +0000)]
Merge "GIC-600: Fix MISRA-2012 defects" into integration

5 years agoGIC-600: Fix MISRA-2012 defects
Alexei Fedorov [Wed, 29 Jul 2020 14:16:36 +0000 (15:16 +0100)]
GIC-600: Fix MISRA-2012 defects

This patch fixes violation of Rules 10.1, 10.4,
11.9 and 13.2 reported by MISRA-2012 scan.

Change-Id: Ibe9190cb0f26ae85d9a31db8e92fbd32f1740e25
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "docs/fvp: update SGI and RD FVP list" into integration
Madhukar Pappireddy [Wed, 29 Jul 2020 15:20:03 +0000 (15:20 +0000)]
Merge "docs/fvp: update SGI and RD FVP list" into integration

5 years agoAarch32 xlat_tables lib: Fix MISRA-2012 defects
Alexei Fedorov [Tue, 28 Jul 2020 11:26:36 +0000 (12:26 +0100)]
Aarch32 xlat_tables lib: Fix MISRA-2012 defects

This patch fixes violation of Rules 2.1, 7.3, 10.1,
10.4, 12.1, 14.3, 14.4, 17.7, 20.9 reported by
MISRA-2012 scan and adds braces for conditional
statements according to the TF-A coding style.

Change-Id: Ib2463601fb43d955c3d901102b6dceaaad6614f3
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "doc: secure partition manager design" into integration
joanna.farley [Wed, 29 Jul 2020 10:34:09 +0000 (10:34 +0000)]
Merge "doc: secure partition manager design" into integration

5 years agoMerge "Fix broken link in documentation" into integration
Madhukar Pappireddy [Wed, 29 Jul 2020 00:07:42 +0000 (00:07 +0000)]
Merge "Fix broken link in documentation" into integration

5 years agoMerge "plat/nvidia: tegra: Enable SMCCC_ARCH_SOC_ID feature" into integration
Madhukar Pappireddy [Tue, 28 Jul 2020 18:31:59 +0000 (18:31 +0000)]
Merge "plat/nvidia: tegra: Enable SMCCC_ARCH_SOC_ID feature" into integration

5 years agoMerge "plat/arm: Disable SMCCC_ARCH_SOC_ID feature" into integration
Madhukar Pappireddy [Tue, 28 Jul 2020 18:31:52 +0000 (18:31 +0000)]
Merge "plat/arm: Disable SMCCC_ARCH_SOC_ID feature" into integration

5 years agoMerge "SMCCC: Introduce function to check SMCCC function availability" into integration
Madhukar Pappireddy [Tue, 28 Jul 2020 18:31:47 +0000 (18:31 +0000)]
Merge "SMCCC: Introduce function to check SMCCC function availability" into integration

5 years agoFix broken link in documentation
johpow01 [Tue, 28 Jul 2020 18:07:25 +0000 (13:07 -0500)]
Fix broken link in documentation

The link to the exception handling framework page on the System Design /
Firmware Design / Section 4.3 just links to itself, so I changed it to
link to the exception handling framework component document.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I6711b423a789b2b3d1921671e8497fffa8ba33d1

5 years agoMerge "doc: use docker to build documentation" into integration
Sandrine Bailleux [Tue, 28 Jul 2020 15:08:47 +0000 (15:08 +0000)]
Merge "doc: use docker to build documentation" into integration

5 years agoMerge "TZ DMC620 driver: Fix MISRA-2012 defects" into integration
Mark Dykes [Mon, 27 Jul 2020 21:30:29 +0000 (21:30 +0000)]
Merge "TZ DMC620 driver: Fix MISRA-2012 defects" into integration

5 years agoTZ DMC620 driver: Fix MISRA-2012 defects
Alexei Fedorov [Mon, 27 Jul 2020 14:04:14 +0000 (15:04 +0100)]
TZ DMC620 driver: Fix MISRA-2012 defects

This patch fixes defects 10.3, 10.4, 10.7, 20.7
reported by MISRA-2012 scan and adds braces for
conditional statements according to the TF-A
coding style.

Change-Id: If84ed31cdd55bc8e7cdd2a5f48c0dacc25792112
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoplat/nvidia: tegra: Enable SMCCC_ARCH_SOC_ID feature
Manish V Badarkhe [Fri, 24 Jul 2020 01:05:24 +0000 (02:05 +0100)]
plat/nvidia: tegra: Enable SMCCC_ARCH_SOC_ID feature

Enabled 'SMCCC_ARCH_SOC_ID' feature for Nvidia Tegra platforms.

Change-Id: If17415f42304c6518aeead8dfe5909c378aaa777
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoplat/arm: Disable SMCCC_ARCH_SOC_ID feature
Manish V Badarkhe [Fri, 24 Jul 2020 02:26:05 +0000 (03:26 +0100)]
plat/arm: Disable SMCCC_ARCH_SOC_ID feature

Currently, soc-revision information is not available for arm
platforms hence disabled 'SMCCC_ARCH_SOC_ID' feature for all arm
platforms.

Change-Id: I1ab878c6a4c8fecfff63bc6dde83e3ecefe20279
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoSMCCC: Introduce function to check SMCCC function availability
Manish V Badarkhe [Thu, 23 Jul 2020 19:23:01 +0000 (20:23 +0100)]
SMCCC: Introduce function to check SMCCC function availability

Currently, 'SMCCC_ARCH_FEATURES' SMC call handler unconditionally
returns 'SMC_OK' for 'SMCCC_ARCH_SOC_ID' function. This seems to
be not correct for the platform which doesn't implement soc-id
functionality i.e. functions to retrieve both soc-version and
soc-revision.
Hence introduced a platform function which will check whether SMCCC
feature is available for the platform.

Also, updated porting guide for the newly added platform function.

Change-Id: I389f0ef6b0837bb24c712aa995b7176117bc7961
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agoMerge "plat/arm: spm: add support for RESET_TO_BL31" into integration
Madhukar Pappireddy [Fri, 24 Jul 2020 19:59:56 +0000 (19:59 +0000)]
Merge "plat/arm: spm: add support for RESET_TO_BL31" into integration

5 years agoplat/arm: spm: add support for RESET_TO_BL31
Manish Pandey [Wed, 15 Jul 2020 23:38:59 +0000 (00:38 +0100)]
plat/arm: spm: add support for RESET_TO_BL31

SPM(BL32) and hafnium(BL33) expect their manifest base address in x0
register, which is updated during BL2 stage by parsing fw_config.
In case of RESET_TO_BL31 it has to be updated while populating
entry point information.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I6f4a97f3405029bd6ba25f0935e2d1f74bb95517