]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoIncrementing the minor version to reflect upcoming v2.3 release
Madhukar Pappireddy [Mon, 20 Apr 2020 05:01:09 +0000 (00:01 -0500)]
Incrementing the minor version to reflect upcoming v2.3 release

Change-Id: I27f7d92988fc16f68041c2ddaa8dd3a60362ddd1
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "juno/sgm: Align SCP_BL2 to page boundary" into integration
Mark Dykes [Fri, 17 Apr 2020 15:25:21 +0000 (15:25 +0000)]
Merge "juno/sgm: Align SCP_BL2 to page boundary" into integration

5 years agoMerge "doc: Fixup some SMCCC links" into integration
Mark Dykes [Fri, 17 Apr 2020 15:23:47 +0000 (15:23 +0000)]
Merge "doc: Fixup some SMCCC links" into integration

5 years agojuno/sgm: Align SCP_BL2 to page boundary
Chris Kay [Fri, 17 Apr 2020 09:36:34 +0000 (10:36 +0100)]
juno/sgm: Align SCP_BL2 to page boundary

This commit fixes an assertion that was triggering in certain contexts:

    ERROR: mmap_add_region_check() failed. error -22
    ASSERT: lib/xlat_tables_v2/xlat_tables_core.c:790

Change-Id: Ia55b3fb4f496c8cd791ea6093d122edae0a7e92a
Signed-off-by: Chris Kay <chris.kay@arm.com>
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agodoc: Fixup some SMCCC links
Sandrine Bailleux [Fri, 17 Apr 2020 12:06:52 +0000 (14:06 +0200)]
doc: Fixup some SMCCC links

This is a fixup for patch 3ba55a3c5fa260c9218be1adff8f39fc2a568d68
("docs: Update SMCCC doc, other changes for release"), where some
links names got changed but their references didn't.

Change-Id: I980d04dde338f3539a2ec1ae2e807440587b1cf5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoMerge "doc: Set fconf as experimental feature" into integration
Sandrine Bailleux [Fri, 17 Apr 2020 08:35:33 +0000 (08:35 +0000)]
Merge "doc: Set fconf as experimental feature" into integration

5 years agoMerge "docs: Update SMCCC doc, other changes for release" into integration
Mark Dykes [Thu, 16 Apr 2020 21:04:44 +0000 (21:04 +0000)]
Merge "docs: Update SMCCC doc, other changes for release" into integration

5 years agoMerge "docs: Updating Change log for v2.3 Release" into integration
Mark Dykes [Thu, 16 Apr 2020 21:04:17 +0000 (21:04 +0000)]
Merge "docs: Updating Change log for v2.3 Release" into integration

5 years agodoc: Set fconf as experimental feature
Louis Mayencourt [Thu, 9 Apr 2020 15:32:20 +0000 (16:32 +0100)]
doc: Set fconf as experimental feature

Following the messages on the mailing list regarding the possible issue around
reading DTB's information, we decided to flag the fconf feature as experimental.
A uniform approach should be used to handle properties miss and DTB validation.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: Ib3c86e81fb2e89452c593f68d825d3d8f505e1fb

5 years agodocs: Updating Change log for v2.3 Release
laurenw-arm [Tue, 14 Apr 2020 21:44:52 +0000 (16:44 -0500)]
docs: Updating Change log for v2.3 Release

Updating the change log for the v2.3 release and the upcoming change log
template for v2.4 release.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ice875d3c93227069738a429d4b945512af8470e9

5 years agodocs: Update SMCCC doc, other changes for release
laurenw-arm [Thu, 16 Apr 2020 15:02:17 +0000 (10:02 -0500)]
docs: Update SMCCC doc, other changes for release

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ie842d6a9919776de151a4e9304f870aede07c47a

5 years agoMerge "docs: Fixes and updates for the v2.3 release" into integration
Sandrine Bailleux [Thu, 16 Apr 2020 07:42:55 +0000 (07:42 +0000)]
Merge "docs: Fixes and updates for the v2.3 release" into integration

5 years agoMerge "docs: Updating Release information for v2.4" into integration
joanna.farley [Thu, 16 Apr 2020 07:12:39 +0000 (07:12 +0000)]
Merge "docs: Updating Release information for v2.4" into integration

5 years agodocs: Fixes and updates for the v2.3 release
laurenw-arm [Wed, 15 Apr 2020 22:48:36 +0000 (17:48 -0500)]
docs: Fixes and updates for the v2.3 release

A small set of misc changes to ensure correctness before the v2.3
release.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I5b4e35b3b46616df0453cecff61f5a414951cd62

5 years agodocs: Updating Release information for v2.4
laurenw-arm [Wed, 15 Apr 2020 20:19:50 +0000 (15:19 -0500)]
docs: Updating Release information for v2.4

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I5a7ae778999295f3453b7ab0bfc26351e545fb8f

5 years agoMerge "plat/arm/sgi: update mmap and xlat count" into integration
Manish Pandey [Wed, 15 Apr 2020 11:25:08 +0000 (11:25 +0000)]
Merge "plat/arm/sgi: update mmap and xlat count" into integration

5 years agoMerge "Fix Broadcom Stingray platform documentation" into integration
Sandrine Bailleux [Wed, 15 Apr 2020 10:29:27 +0000 (10:29 +0000)]
Merge "Fix Broadcom Stingray platform documentation" into integration

5 years agoFix Broadcom Stingray platform documentation
Sandrine Bailleux [Wed, 15 Apr 2020 09:13:38 +0000 (11:13 +0200)]
Fix Broadcom Stingray platform documentation

 - Include the platform documentation in the table of contents.

 - Add a title for the document. Without this, the platform
   documentation was listed under a 'Description' title on page
   https://trustedfirmware-a.readthedocs.io/en/latest/plat/index.html

 - Change TF-A git repository URL to point to tf.org (rather than the
   deprecated read-only mirror on Github).

 - Fix the restructuredText syntax for the FIP command line. It was
   not displayed at all on the rendered version.

Change-Id: I7a0f062bcf8e0dfc65e8f8bdd6775c497a47e619
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoplat/arm/sgi: update mmap and xlat count
Aditya Angadi [Wed, 8 Apr 2020 08:47:08 +0000 (14:17 +0530)]
plat/arm/sgi: update mmap and xlat count

A single chip platform requires five mmap entries and a corresponding
number of translation tables. For every additional chip in the system,
three additional mmap entries are required to map the shared SRAM and
the IO regions. A corresponding number of additional translation
tables are required as well.

Change-Id: I1332a1305f2af62181387cf36954f6fb0e6f11ed
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
5 years agoMerge "stingray: fix coverity reported issues on brcm platform" into integration
Sandrine Bailleux [Tue, 14 Apr 2020 07:54:26 +0000 (07:54 +0000)]
Merge "stingray: fix coverity reported issues on brcm platform" into integration

5 years agostingray: fix coverity reported issues on brcm platform
Sheetal Tigadoli [Mon, 13 Apr 2020 13:13:29 +0000 (18:43 +0530)]
stingray: fix coverity reported issues on brcm platform

fix coverity reported issues
1. uninitialized var,
2. check for negative val on unsigned variable

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Change-Id: I28b7517135ba6c1ba0df04f0c73189cf84ba89e6

5 years agoMerge "arm_fpga: Remove bogus timer initialisation" into integration
Sandrine Bailleux [Thu, 9 Apr 2020 15:03:20 +0000 (15:03 +0000)]
Merge "arm_fpga: Remove bogus timer initialisation" into integration

5 years agoarm_fpga: Remove bogus timer initialisation
Andre Przywara [Thu, 9 Apr 2020 10:27:21 +0000 (11:27 +0100)]
arm_fpga: Remove bogus timer initialisation

The arm_fpga platform code contains an dubious line to initialise some
timer. On closer inspection this turn out to be bogus, as this was only
needed on some special (older) FPGA board, and is actually not needed on
the current model. Also the base address was wrong anyways.

Remove the code entirely.

Change-Id: I02e71aea645051b5addb42d972d7a79f04b81106
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoMerge "TF-A GICv3 driver: Change API for GICR_IPRIORITYR accessors" into integration
joanna.farley [Tue, 7 Apr 2020 22:48:39 +0000 (22:48 +0000)]
Merge "TF-A GICv3 driver: Change API for GICR_IPRIORITYR accessors" into integration

5 years agoTF-A GICv3 driver: Change API for GICR_IPRIORITYR accessors
Alexei Fedorov [Tue, 7 Apr 2020 17:16:18 +0000 (18:16 +0100)]
TF-A GICv3 driver: Change API for GICR_IPRIORITYR accessors

To support compatibility with previous GICv3 driver version
this patch:
- restores original API for gicr_read_ipriority() and
gicr_wrtite_ipriority() functions;
- adds accessor functions for GICR_XXX0,1 registers, e.g.
GICR_IGROUPR0, GICR_ICFGR0, GICR_ICFGR1, etc.

Change-Id: I796a312a61665ff384e3d9de2f4b3c60f700b43b
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "plat/arm/rddaniel: enabled GICv4 extension" into integration
Alexei Fedorov [Tue, 7 Apr 2020 17:31:53 +0000 (17:31 +0000)]
Merge "plat/arm/rddaniel: enabled GICv4 extension" into integration

5 years agoMerge "gic multichip: add support for clayton" into integration
Alexei Fedorov [Tue, 7 Apr 2020 17:30:40 +0000 (17:30 +0000)]
Merge "gic multichip: add support for clayton" into integration

5 years agoplat/arm/rddaniel: enabled GICv4 extension
Vijayenthiran Subramaniam [Mon, 6 Apr 2020 12:24:42 +0000 (17:54 +0530)]
plat/arm/rddaniel: enabled GICv4 extension

RD-Daniel uses GIC-Clayton as its interrupt controller which is an
implementation of GICv4.1 architecture. Hence for RD-Daniel, enable
GICv4 extension support.

Change-Id: I45ae8c82376f8fe8fc0666306822ae2db74e71b8
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
5 years agogic multichip: add support for clayton
Vijayenthiran Subramaniam [Mon, 6 Apr 2020 08:24:50 +0000 (13:54 +0530)]
gic multichip: add support for clayton

GIC-Clayton supports multichip operation mode which allows it to connect
upto 16 other GIC-Clayton instances. GIC-Clayton's multichip programming
and operation remains same as GIC-600 with a minor change in the
SPI_BLOCKS and SPI_BLOCK_MIN shifts to accommodate additional SPI
ranges. So identify if the GIC v4 extension is enabled by the platform
makefile and appropriately select the SPI_BLOCKS and SPI_BLOCK_MIN
shifts.

Change-Id: I95fd80ef16af6c7ca09e2335539187b133052d41
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
5 years agoMerge changes from topics "af/fvp_gicv4", "af/gicv4", "af/gic_extended" into integration
Olivier Deprez [Tue, 7 Apr 2020 12:52:46 +0000 (12:52 +0000)]
Merge changes from topics "af/fvp_gicv4", "af/gicv4", "af/gic_extended" into integration

* changes:
  FVP: Add support for GICv4 extension
  TF-A: Add GICv4 extension for GIC driver
  TF-A GICv3 driver: Add extended PPI and SPI range

5 years agoFVP: Add support for GICv4 extension
Alexei Fedorov [Tue, 7 Apr 2020 10:48:00 +0000 (11:48 +0100)]
FVP: Add support for GICv4 extension

This patch adds support for GICv4 extension for FVP platform.

Change-Id: Ia389b61266af669b1ca9b999a8b76476cab214f4
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoTF-A: Add GICv4 extension for GIC driver
Alexei Fedorov [Mon, 6 Apr 2020 18:00:35 +0000 (19:00 +0100)]
TF-A: Add GICv4 extension for GIC driver

This patch adds support for GICv4 extension.
New `GIC_ENABLE_V4_EXTN` option passed to gicv3.mk makefile
was added, and enables GICv4 related changes when set to 1.
This option defaults to 0.

Change-Id: I30ebe1b7a98d3a54863900f37eda4589c707a288
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoMerge "coreboot: Add memory range parsing" into integration
Sandrine Bailleux [Tue, 7 Apr 2020 07:35:29 +0000 (07:35 +0000)]
Merge "coreboot: Add memory range parsing" into integration

5 years agocoreboot: Add memory range parsing
Julius Werner [Fri, 27 Mar 2020 01:06:21 +0000 (18:06 -0700)]
coreboot: Add memory range parsing

This patch adds code to parse memory range information passed by
coreboot, and a simple helper to test whether a specific address belongs
to a range. This may be useful for coreboot-using platforms that need to
know information about the system's memory layout (e.g. to check whether
an address passed in via SMC targets valid DRAM).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I3bea326c426db27d1a8b7d6e17418e4850e884b4

5 years agoIncrease maximum size of BL2 image
Manish V Badarkhe [Thu, 2 Apr 2020 12:23:45 +0000 (13:23 +0100)]
Increase maximum size of BL2 image

Increased the maximum size of BL2 image in order to
accommodate the BL2 image when TF-A build with no compiler
optimization for ARM platform.

Note: As of now, "no compiler optimization" build works
only when TRUSTED_BOOT_BOARD option is set to 0.

This change is verified using below CI configuration:
1. juno-no-optimize-default:juno-linux.uboot
2. fvp-no-optimize-default,fvp-default:fvp-tftf-fip.tftf-aemv8a-debug

Change-Id: I5932621237f8acd1b510682388f3ba78eae90ea4
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
5 years agolocks: bakery: use is_dcache_enabled() helper
Masahiro Yamada [Thu, 2 Apr 2020 06:35:19 +0000 (15:35 +0900)]
locks: bakery: use is_dcache_enabled() helper

bakery_lock_normal.c uses the raw register accessor, read_sctlr(_el3)
to check whether the dcache is enabled.

Using is_dcache_enabled() is cleaner, and a good abstraction for
the library code like this.

A problem is is_dcache_enabled() is declared in the local header,
lib/xlat_tables_v2/xlat_tables_private.h

I searched for a good place to declare this helper. Moving it to
arch_helpers.h, closed to cache operation helpers, looks good enough
to me.

I also changed the type of 'is_cached' to bool for consistency,
and to avoid MISRA warnings.

Change-Id: I9b016f67bc8eade25c316aa9c0db0fa4cd375b79
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge "stingray: Fix board configuration typo."
Mark Dykes [Mon, 6 Apr 2020 18:16:43 +0000 (18:16 +0000)]
Merge "stingray: Fix board configuration typo."

5 years agoTF-A GICv3 driver: Add extended PPI and SPI range
Alexei Fedorov [Mon, 6 Apr 2020 15:27:54 +0000 (16:27 +0100)]
TF-A GICv3 driver: Add extended PPI and SPI range

This patch provides support for GICv3.1 extended PPI and SPI
range. The option is enabled by setting to 1 and passing
`GIC_EXT_INTID` build flag to gicv3.mk makefile.
This option defaults to 0 with no extended range support.

Change-Id: I7d09086fe22ea531c5df51a8a1efd8928458d394
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agostingray: Fix board configuration typo.
Max Shvetsov [Mon, 6 Apr 2020 10:32:38 +0000 (11:32 +0100)]
stingray: Fix board configuration typo.

Default board configuration was set to bcm958742k which is not present
in current codebase. This causes a default platform build to fail.
Changing to bcm958742t.

Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: Ie24f94ef0ef316ff56fe142df5de45d70ba93c28

5 years agoMerge "Fix MISRA C issues in BL1/BL2/BL31" into integration
Mark Dykes [Sat, 4 Apr 2020 19:58:56 +0000 (19:58 +0000)]
Merge "Fix MISRA C issues in BL1/BL2/BL31" into integration

5 years agoMerge "xlat_tables_v2: use get_current_el_maybe_constant() in is_dcache_enabled(...
Mark Dykes [Fri, 3 Apr 2020 21:41:05 +0000 (21:41 +0000)]
Merge "xlat_tables_v2: use get_current_el_maybe_constant() in is_dcache_enabled()" into integration

5 years agoFix MISRA C issues in BL1/BL2/BL31
John Powell [Fri, 20 Mar 2020 19:21:05 +0000 (14:21 -0500)]
Fix MISRA C issues in BL1/BL2/BL31

Attempts to address MISRA compliance issues in BL1, BL2, and BL31 code.
Mainly issues like not using boolean expressions in conditionals,
conflicting variable names, ignoring return values without (void), adding
explicit casts, etc.

Change-Id: If1fa18ab621b9c374db73fa6eaa6f6e5e55c146a
Signed-off-by: John Powell <john.powell@arm.com>
5 years agoMerge "arm_fpga: adapt to new way of including gicv3 files" into integration
Alexei Fedorov [Fri, 3 Apr 2020 19:04:45 +0000 (19:04 +0000)]
Merge "arm_fpga: adapt to new way of including gicv3 files" into integration

5 years agoarm_fpga: adapt to new way of including gicv3 files
Manish Pandey [Fri, 3 Apr 2020 17:59:20 +0000 (18:59 +0100)]
arm_fpga: adapt to new way of including gicv3 files

with commit a6ea06f5, the way platform includes gicv3 files has been
modified, this patch adapts to new method of including gicv3 files
for arm_fpga platform.

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

5 years agoMerge "xlat lib v2: Add support to pass shareability attribute for normal memory...
Manish Pandey [Fri, 3 Apr 2020 18:06:52 +0000 (18:06 +0000)]
Merge "xlat lib v2: Add support to pass shareability attribute for normal memory region" into integration

5 years agoMerge changes from topic "brcm_initial_support" into integration
Manish Pandey [Fri, 3 Apr 2020 13:53:48 +0000 (13:53 +0000)]
Merge changes from topic "brcm_initial_support" into integration

* changes:
  doc: brcm: Add documentation file for brcm stingray platform
  drivers: Add SPI Nor flash support
  drivers: Add iproc spi driver
  drivers: Add emmc driver for Broadcom platforms
  Add BL31 support for Broadcom stingray platform
  Add BL2 support for Broadcom stingray platform
  Add bl31 support common across Broadcom platforms
  Add bl2 setup code common across Broadcom platforms
  drivers: Add support to retrieve plat_toc_flags

5 years agoxlat lib v2: Add support to pass shareability attribute for normal memory region
Pramod Kumar [Wed, 19 Feb 2020 05:09:10 +0000 (10:39 +0530)]
xlat lib v2: Add support to pass shareability attribute for normal memory region

Present framework restricts platform to pass desired shareability attribute
for normal memory region mapped in MMU. it defaults to inner shareability.

There are platforms where memories (like SRAM) are not placed at snoopable
region in advaned interconnect like CCN/CMN hence snoopable transaction is
not possible to these memory. Though These memories could be mapped in MMU
as MT_NON_CACHEABLE, data caches benefits won't be available.

If these memories are mapped as cacheable with non-shareable attribute,
when only one core is running like at boot time, MMU data cached could be
used for faster execution. Hence adding support to pass the shareability
attribute for memory regions.

Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Change-Id: I678cb50120a28dae4aa9d1896e8faf1dd5cf1754

5 years agodoc: brcm: Add documentation file for brcm stingray platform
Sheetal Tigadoli [Fri, 20 Mar 2020 18:42:50 +0000 (00:12 +0530)]
doc: brcm: Add documentation file for brcm stingray platform

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Change-Id: I5e2c1220e9694d6ba771cc90daa0e70e967eebe6

5 years agodrivers: Add SPI Nor flash support
Sheetal Tigadoli [Sun, 5 Jan 2020 18:38:24 +0000 (00:08 +0530)]
drivers: Add SPI Nor flash support

Add SPI Nor flash support

Change-Id: I0cde3fdb4dcad5bcaf445b3bb48e279332bd28af
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agodrivers: Add iproc spi driver
Sheetal Tigadoli [Sun, 5 Jan 2020 15:49:02 +0000 (21:19 +0530)]
drivers: Add iproc spi driver

Add iproc spi driver

Change-Id: I652efab1efd9c487974dae9cb9d98b9b8e3759c4
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agodrivers: Add emmc driver for Broadcom platforms
Sheetal Tigadoli [Sun, 5 Jan 2020 09:29:04 +0000 (14:59 +0530)]
drivers: Add emmc driver for Broadcom platforms

Add emmc driver for Broadcom platforms

Change-Id: I126a6dfccd41062cb0b856f2c2fb1f724730b95e
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agoAdd BL31 support for Broadcom stingray platform
Sheetal Tigadoli [Wed, 18 Dec 2019 14:35:09 +0000 (20:05 +0530)]
Add BL31 support for Broadcom stingray platform

Change-Id: Icfef5b6923dc292e637001045a334c499d346fe9
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agoAdd BL2 support for Broadcom stingray platform
Sheetal Tigadoli [Wed, 18 Dec 2019 14:14:43 +0000 (19:44 +0530)]
Add BL2 support for Broadcom stingray platform

Change-Id: I5daa3f2b4b9d85cb857547a588571a9aa8ad05c2
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agoAdd bl31 support common across Broadcom platforms
Sheetal Tigadoli [Wed, 18 Dec 2019 06:31:01 +0000 (12:01 +0530)]
Add bl31 support common across Broadcom platforms

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Change-Id: Ic1a392a633b447935fa3a7528326c97845f5b1bc

5 years agoMerge "uniphier: define PLAT_XLAT_TABLES_DYNAMIC only for BL2" into integration
Sandrine Bailleux [Fri, 3 Apr 2020 11:39:41 +0000 (11:39 +0000)]
Merge "uniphier: define PLAT_XLAT_TABLES_DYNAMIC only for BL2" into integration

5 years agoMerge changes from topic "sb/fconf" into integration
Olivier Deprez [Fri, 3 Apr 2020 11:36:30 +0000 (11:36 +0000)]
Merge changes from topic "sb/fconf" into integration

* changes:
  Check for out-of-bound accesses in the platform io policies
  Check for out-of-bound accesses in the CoT description

5 years agoAdd bl2 setup code common across Broadcom platforms
Sheetal Tigadoli [Fri, 13 Dec 2019 05:09:06 +0000 (10:39 +0530)]
Add bl2 setup code common across Broadcom platforms

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Change-Id: Iabeaee35c22608c93945c8295bf70947b0f6049a

5 years agoxlat_tables_v2: use get_current_el_maybe_constant() in is_dcache_enabled()
Masahiro Yamada [Thu, 2 Apr 2020 07:20:21 +0000 (16:20 +0900)]
xlat_tables_v2: use get_current_el_maybe_constant() in is_dcache_enabled()

Using get_current_el_maybe_constant() produces more optimized code
because in most cases, we know the exception level at build-time.
For example, BL31 runs at EL3, so unneeded code will be trimmed.

[before]

0000000000000000 <is_dcache_enabled>:
   0:   d5384240        mrs     x0, currentel
   4:   53020c00        ubfx    w0, w0, #2, #2
   8:   7100041f        cmp     w0, #0x1
   c:   54000081        b.ne    1c <is_dcache_enabled+0x1c>  // b.any
  10:   d5381000        mrs     x0, sctlr_el1
  14:   53020800        ubfx    w0, w0, #2, #1
  18:   d65f03c0        ret
  1c:   7100081f        cmp     w0, #0x2
  20:   54000061        b.ne    2c <is_dcache_enabled+0x2c>  // b.any
  24:   d53c1000        mrs     x0, sctlr_el2
  28:   17fffffb        b       14 <is_dcache_enabled+0x14>
  2c:   d53e1000        mrs     x0, sctlr_el3
  30:   17fffff9        b       14 <is_dcache_enabled+0x14>

[after]

0000000000000000 <is_dcache_enabled>:
   0:   d53e1000        mrs     x0, sctlr_el3
   4:   53020800        ubfx    w0, w0, #2, #1
   8:   d65f03c0        ret

Change-Id: I3698fae9b517022ff9fbfd4cad3a320c6e137e10
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge changes from topic "macro-cleanup" into integration
Mark Dykes [Thu, 2 Apr 2020 21:54:17 +0000 (21:54 +0000)]
Merge changes from topic "macro-cleanup" into integration

* changes:
  plat: remove redundant =1 from -D option
  Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS

5 years agoMerge "cryptocell: add support for Cryptocell 713" into integration
joanna.farley [Thu, 2 Apr 2020 15:23:49 +0000 (15:23 +0000)]
Merge "cryptocell: add support for Cryptocell 713" into integration

5 years agoMerge "Fix coverity defects found on the FPGA port." into integration
Olivier Deprez [Thu, 2 Apr 2020 14:38:01 +0000 (14:38 +0000)]
Merge "Fix coverity defects found on the FPGA port." into integration

5 years agoCheck for out-of-bound accesses in the platform io policies
Sandrine Bailleux [Thu, 2 Apr 2020 13:52:44 +0000 (15:52 +0200)]
Check for out-of-bound accesses in the platform io policies

The platform io policies array is now always accessed through a fconf getter.
This gives us an ideal spot to check for out-of-bound accesses.

Remove the assertion in plat_get_image_source(), which is now redundant.

Change-Id: Iefe808d530229073b68cbd164d927b8b6662a217
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoCheck for out-of-bound accesses in the CoT description
Sandrine Bailleux [Wed, 25 Mar 2020 10:22:34 +0000 (11:22 +0100)]
Check for out-of-bound accesses in the CoT description

The chain of trust array is now always accessed through a fconf getter.
This gives us an ideal spot to check for out-of-bound accesses.

Change-Id: Ic5ea20e43cf8ca959bb7f9b60de7c0839b390add
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoFix coverity defects found on the FPGA port.
Javier Almansa Sobrino [Thu, 2 Apr 2020 11:36:16 +0000 (12:36 +0100)]
Fix coverity defects found on the FPGA port.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I397b642eff8a09b201f497f8d2ba39e2460c0dba

5 years agoMerge changes from topic "xlat" into integration
Sandrine Bailleux [Thu, 2 Apr 2020 11:41:33 +0000 (11:41 +0000)]
Merge changes from topic "xlat" into integration

* changes:
  xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES
  linker_script: move bss section to bl_common.ld.h
  linker_script: replace common read-only data with RODATA_COMMON
  linker_script: move more common code to bl_common.ld.h

5 years agoMerge "Specify integration as the default branch for git-review" into integration
Manish Pandey [Thu, 2 Apr 2020 10:22:55 +0000 (10:22 +0000)]
Merge "Specify integration as the default branch for git-review" into integration

5 years agoMerge "Tegra: enable EHF for watchdog timer interrupts" into integration
Manish Pandey [Thu, 2 Apr 2020 09:03:07 +0000 (09:03 +0000)]
Merge "Tegra: enable EHF for watchdog timer interrupts" into integration

5 years agoSpecify integration as the default branch for git-review
Sandrine Bailleux [Fri, 13 Mar 2020 12:35:27 +0000 (13:35 +0100)]
Specify integration as the default branch for git-review

Submitting a change for review using 'git review' will now automatically use
the special refs/for/integration ref (instead of targeting the master
branch).

Change-Id: Idef58b20c492bf5ab06599f4cd4a5e5b75837066
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agouniphier: define PLAT_XLAT_TABLES_DYNAMIC only for BL2
Masahiro Yamada [Thu, 2 Apr 2020 05:03:53 +0000 (14:03 +0900)]
uniphier: define PLAT_XLAT_TABLES_DYNAMIC only for BL2

This is not used in BL31 or Bl32 for this platform.

Pass it to BL2_CPPFLAGS instead of defining it for all BL images.

This will produce slightly smaller BL31 and Bl32.

Change-Id: I66ec5179f8dc5b112e65547335e7dd0a0f4074cd
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoplat: remove redundant =1 from -D option
Masahiro Yamada [Wed, 1 Apr 2020 05:28:24 +0000 (14:28 +0900)]
plat: remove redundant =1 from -D option

As GCC manual says, -D option defines a macro as 1, if =<value> is omitted.

  -D <name>
      Predefine <name> as a macro, with definition 1.

The same applied with Clang, too.

In the context of -D option, =1 is always redundant.

Change-Id: I487489a1ea3eb51e734741619c1e65dab1420bc4
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoPass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS
Masahiro Yamada [Wed, 1 Apr 2020 05:20:58 +0000 (14:20 +0900)]
Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS

Commit d5e97a1d2c79 ("Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3
globally for C files") does not have commit 848a7e8ce1d9 ("Build:
introduce per-BL CPPFLAGS and ASFLAGS") as an ancestor because
they were pulled almost at the same time.

This is a follow-up conversion to be consistent with commit
11a3c5ee7325 ("plat: pass -D option to BL*_CPPFLAGS instead of
BL*_CFLAGS").

With this change, the command line option, IMAGE_AT_EL3, will be
passed to .S files as well.

I remove the definition in include/lib/cpus/aarch64/cpu_macros.S

Otherwise, the following error would happen.

  include/lib/cpus/aarch64/cpu_macros.S:29:0: error: "IMAGE_AT_EL3" redefined [-Werror]

Change-Id: I943c8f22356483c2ae3c57b515c69243a8fa6889
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoxlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES

If PLAT_RO_XLAT_TABLES is defined, the base xlat table goes to the
.rodata section instead of .bss section.

This causes a warning like:

/tmp/ccswitLr.s: Assembler messages:
/tmp/ccswitLr.s:297: Warning: setting incorrect section attributes for .rodata

It is practically no problem, but I want to keep the build log clean.

Put the base table into the "base_xlat_table" section to suppress the
assembler warnings.

The linker script determines its final destination; rodata section if
PLAT_RO_XLAT_TABLES=1, or bss section otherwise. So, the result is the
same.

Change-Id: Ic85d1d2dddd9b5339289fc2378cbcb21dd7db02e
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agolinker_script: move bss section to bl_common.ld.h
Masahiro Yamada [Thu, 26 Mar 2020 04:16:33 +0000 (13:16 +0900)]
linker_script: move bss section to bl_common.ld.h

Move the bss section to the common header. This adds BAKERY_LOCK_NORMAL
and PMF_TIMESTAMP, which previously existed only in BL31. This is not
a big deal because unused data should not be compiled in the first
place. I believe this should be controlled by BL*_SOURCES in Makefiles,
not by linker scripts.

I investigated BL1, BL2, BL2U, BL31 for plat=fvp, and BL2-AT-EL3,
BL31, BL31 for plat=uniphier. I did not see any more  unexpected
code addition.

The bss section has bigger alignment. I added BSS_ALIGN for this.

Currently, SORT_BY_ALIGNMENT() is missing in sp_min.ld.S, and with this
change, the BSS symbols in SP_MIN will be sorted by the alignment.
This is not a big deal (or, even better in terms of the image size).

Change-Id: I680ee61f84067a559bac0757f9d03e73119beb33
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agolinker_script: replace common read-only data with RODATA_COMMON
Masahiro Yamada [Thu, 26 Mar 2020 01:57:12 +0000 (10:57 +0900)]
linker_script: replace common read-only data with RODATA_COMMON

The common section data are repeated in many linker scripts (often
twice in each script to support SEPARATE_CODE_AND_RODATA). When you
add a new read-only data section, you end up with touching lots of
places.

After this commit, you will only need to touch bl_common.ld.h when
you add a new section to RODATA_COMMON.

Replace a series of RO section with RODATA_COMMON, which contains
6 sections, some of which did not exist before.

This is not a big deal because unneeded data should not be compiled
in the first place. I believe this should be controlled by BL*_SOURCES
in Makefiles, not by linker scripts.

When I was working on this commit, the BL1 image size increased
due to the fconf_populator. Commit c452ba159c14 ("fconf: exclude
fconf_dyn_cfg_getter.c from BL1_SOURCES") fixed this issue.

I investigated BL1, BL2, BL2U, BL31 for plat=fvp, and BL2-AT-EL3,
BL31, BL31 for plat=uniphier. I did not see any more  unexpected
code addition.

Change-Id: I5d14d60dbe3c821765bce3ae538968ef266f1460
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agolinker_script: move more common code to bl_common.ld.h
Masahiro Yamada [Thu, 26 Mar 2020 01:51:39 +0000 (10:51 +0900)]
linker_script: move more common code to bl_common.ld.h

These are mostly used to collect data from special structure,
and repeated in many linker scripts.

To differentiate the alignment size between aarch32/aarch64, I added
a new macro STRUCT_ALIGN.

While I moved the PMF_SVC_DESCS, I dropped #if ENABLE_PMF conditional.
As you can see in include/lib/pmf/pmf_helpers.h, PMF_REGISTER_SERVICE*
are no-op when ENABLE_PMF=0. So, pmf_svc_descs and pmf_timestamp_array
data are not populated.

Change-Id: I3f4ab7fa18f76339f1789103407ba76bda7e56d0
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge "include: fixup 'cm_setup_context' prototype" into integration
Mark Dykes [Wed, 1 Apr 2020 22:29:40 +0000 (22:29 +0000)]
Merge "include: fixup 'cm_setup_context' prototype" into integration

5 years agoTegra: enable EHF for watchdog timer interrupts
Varun Wadekar [Wed, 1 Apr 2020 01:42:59 +0000 (18:42 -0700)]
Tegra: enable EHF for watchdog timer interrupts

This patch enables the Exception Handling Framework to service the WDT
interrupts on all Tegra platforms.

Verified that the watchdog timer interrupt fires after migrating to
the EHF.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I6b2e33da7841aa064e3a8f825c26fadf168cd0d5

5 years agoinclude: fixup 'cm_setup_context' prototype
Varun Wadekar [Wed, 1 Apr 2020 16:55:49 +0000 (09:55 -0700)]
include: fixup 'cm_setup_context' prototype

This patch changes the prototype cm_setup_context() to use struct entry_point_info
rather than the typedef'ed version of it. This fixes the following compilation error
seen with EL3_EXCEPTION_HANDLING = 1.

<snip>
In file included from bl31/ehf.c:19:
include/lib/el3_runtime/context_mgmt.h:35:49: error: unknown type name 'entry_point_info_t'
   35 | void cm_setup_context(cpu_context_t *ctx, const entry_point_info_t *ep);
      |                                                 ^~~~~~~~~~~~~~~~~~
<snip>

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I73b059ff2dade2259cefd0f9a097c7ea4a88055d

5 years agocryptocell: add support for Cryptocell 713
Gilad Ben-Yossef [Wed, 15 May 2019 06:24:04 +0000 (09:24 +0300)]
cryptocell: add support for Cryptocell 713

Add Crypto 713 support as crypto module and NVM counter provider.

As files under include/drivers/arm/cryptocell/713/ are copied verbatim
from the CryptoCell SBROM lib project they are filtered from checkpatch
coding style check.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Change-Id: I7c361772f00ca7d96481f81ac6cbb2704467e52c

5 years agoMerge "Add support to pass the nt_fw_config DTB to OP-TEE." into integration
Alexei Fedorov [Wed, 1 Apr 2020 17:40:59 +0000 (17:40 +0000)]
Merge "Add support to pass the nt_fw_config DTB to OP-TEE." into integration

5 years agoMerge changes from topic "rpi_cpu_off" into integration
Manish Pandey [Wed, 1 Apr 2020 16:42:07 +0000 (16:42 +0000)]
Merge changes from topic "rpi_cpu_off" into integration

* changes:
  rpi: Implement PSCI CPU_OFF
  rpi: rpi3_pwr_domain_on(): Use MMIO accessor
  rpi: move plat_helpers.S to common

5 years agorpi: Implement PSCI CPU_OFF
Andrei Warkentin [Thu, 12 Mar 2020 05:11:06 +0000 (22:11 -0700)]
rpi: Implement PSCI CPU_OFF

We simulate the PSCI CPU_OFF operation by reseting the core via RMR.
For secondaries, that already puts them in the holding pen waiting for a
"warm boot" request as part of PSCI CPU_ON. For the BSP, we have to add
logic to distinguish a regular boot from a CPU_OFF state, where, like the
secondaries, the BSP needs to wait foor a "warm boot" request as part
of CPU_ON.

Testing done:

- ACS suite now passes more tests (since it repeatedly
calls code on secondaries via CPU_ON).

- Linux testing including offlining/onlineing CPU0, e.g.
"echo 0 > /sys/devices/system/cpu/cpu0/online".

Change-Id: Id0ae11a0ee0721b20fa2578b54dadc72dcbd69e0
Link: https://developer.trustedfirmware.org/T686
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
[Andre: adapt to unified plat_helpers.S, smaller fixes]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agorpi: rpi3_pwr_domain_on(): Use MMIO accessor
Andre Przywara [Sat, 21 Mar 2020 11:22:13 +0000 (11:22 +0000)]
rpi: rpi3_pwr_domain_on(): Use MMIO accessor

When writing to arbitrary locations in memory using a constructed
pointer, there is no guarantee that the compiler does not optimise away
the access, since it cannot detect any dependency.

One typical solution is to use the "volatile" keyword, but using MMIO
accessors in usually the better answer, to avoid torn writes.

Replace the usage of an array with such an MMIO accessor function in
rpi3_pwr_domain_on(), to make sure the write is really happening.

Change-Id: Ia18163c95e92f1557471089fd18abc6dc7fee0c7
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agorpi: move plat_helpers.S to common
Andre Przywara [Thu, 12 Mar 2020 14:20:04 +0000 (14:20 +0000)]
rpi: move plat_helpers.S to common

The plat_helpers.S file was almost identical between its RPi3 and RPi4
versions. Unify the two files, moving it into the common/ directory.

This adds a plat_rpi_get_model() function, which can be used to trigger
RPi4 specific action, detected at runtime. We use that to do the RPi4
specific L2 cache initialisation.

Change-Id: I2295704fd6dde7c76fe83b6d98c7bf998d4bf074
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agouniphier: support read-only xlat tables
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
uniphier: support read-only xlat tables

BL2 for this platform uses mmap_add_dynamic_region(), but BL31 and
BL32 (TSP) only use static mapping. So, BL31 and BL32 can make the
tables read-only after enabling MMU.

Enable ALLOW_RO_XLAT_TABLES by default.

Change-Id: Ib59c44697163629119888bb6abd47fa144f09ba3
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: use enable_mmu() in common function
Masahiro Yamada [Thu, 26 Mar 2020 04:18:48 +0000 (13:18 +0900)]
uniphier: use enable_mmu() in common function

Currently, enable_mmu_el1() or enable_mmu_el3() is kept outside the
common function because the appropriate one must be chosen.

Use enable_mmu() and move it to the common function.

Change-Id: If2fb651691a7b6be05674f5cf730ae067ba95d4b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agodoc: Fix "unexpected indentation" warning.
Louis Mayencourt [Fri, 27 Mar 2020 11:49:20 +0000 (11:49 +0000)]
doc: Fix "unexpected indentation" warning.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I521eed6466fdfef18a92f5237912cb402441044a

5 years agodoc: Update fconf uml diagrams
Louis Mayencourt [Fri, 27 Mar 2020 11:02:05 +0000 (11:02 +0000)]
doc: Update fconf uml diagrams

Update the plantuml diagrams to match the latest modification in fconf.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I90f55bba0fd039a3f7e1bd39661cf849fccd64f5

5 years agoEnable MTE support
Manish V Badarkhe [Sun, 22 Mar 2020 05:06:38 +0000 (05:06 +0000)]
Enable MTE support

Enable MTE support by adding memory tag option in Makefile
This option is available only when ARMv8.5-MemTag is implemented

MTE options are added in latest clang and armclang compiler which
support below options:
for clang <version 11.0.0>
1. -march=arm8.5-a+memtag
2. -fsanitize=memtag

for armclang <version 6.12>
1. -march=arm8.5-a+memtag
2. -mmemtag-stack

Set the option SUPPORT_STACK_MEMTAG=yes to enable memory stack tagging.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I4e0bbde4e9769ce03ead6f550158e22f32c1c413

5 years agoAdd support to pass the nt_fw_config DTB to OP-TEE.
Javier Almansa Sobrino [Mon, 10 Feb 2020 14:14:27 +0000 (14:14 +0000)]
Add support to pass the nt_fw_config DTB to OP-TEE.

At the moment, OP-TEE has no support to receive a DTB in Secure Memory
so it cannot receive TOS_FW_CONFIG_ID as it is supposed to happen on
any BL32 image. Instead, when OP-TEE is enable as BL32 payload,
NT_FW_CONFIG_ID is passed.

This MUST be reverted as soon as OP-TEE has support for receiving
DTBs from Secure Memory.

Change-Id: I9a873f42e94f2f99a60b638333e7afba1505aec9
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
5 years agoMerge "doc: Fix broken external link for Odroid C2"
Sandrine Bailleux [Wed, 1 Apr 2020 07:21:51 +0000 (07:21 +0000)]
Merge "doc: Fix broken external link for Odroid C2"

5 years agodrivers: Add support to retrieve plat_toc_flags
Scott Branden [Fri, 8 Jul 2016 19:09:23 +0000 (12:09 -0700)]
drivers: Add support to retrieve plat_toc_flags

Add support to retrieve plat_toc_flags value from FIP header flags.
plat_toc_flags is for platform specific use. It is stored in
FIP header by fiptool using --plat-toc-flags option.

Change-Id: Ibadd91b4f28e6503f4426e4efd404bbe512ad124
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
5 years agoMerge "plat: imx: imx8qx: provide debug uart num as build param" into integration
Mark Dykes [Tue, 31 Mar 2020 21:27:39 +0000 (21:27 +0000)]
Merge "plat: imx: imx8qx: provide debug uart num as build param" into integration

5 years agoMerge "Update code freeze and release target date for 2.3" into integration
Mark Dykes [Tue, 31 Mar 2020 20:33:30 +0000 (20:33 +0000)]
Merge "Update code freeze and release target date for 2.3" into integration

5 years agoMerge "xlat_tables_v2: add enable_mmu()" into integration
Mark Dykes [Tue, 31 Mar 2020 19:56:31 +0000 (19:56 +0000)]
Merge "xlat_tables_v2: add enable_mmu()" into integration

5 years agoMerge "Add get_current_el_maybe_constant()" into integration
Mark Dykes [Tue, 31 Mar 2020 19:55:44 +0000 (19:55 +0000)]
Merge "Add get_current_el_maybe_constant()" into integration

5 years agoMerge "Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files" into integration
Mark Dykes [Tue, 31 Mar 2020 19:55:06 +0000 (19:55 +0000)]
Merge "Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files" into integration

5 years agoUpdate code freeze and release target date for 2.3
laurenw-arm [Tue, 31 Mar 2020 19:20:25 +0000 (14:20 -0500)]
Update code freeze and release target date for 2.3

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Icf0a5737852e4f025dd8ce3748594ad25da43045

5 years agoMerge "fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES" into integration
Mark Dykes [Tue, 31 Mar 2020 18:50:44 +0000 (18:50 +0000)]
Merge "fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES" into integration

5 years agoMerge "bl32: sp_min: reduce the alignment for fconf_populator" into integration
Mark Dykes [Tue, 31 Mar 2020 18:50:20 +0000 (18:50 +0000)]
Merge "bl32: sp_min: reduce the alignment for fconf_populator" into integration