]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
19 months agoMerge changes from topic "versal/xlat-v2" into integration
Joanna Farley [Mon, 24 Apr 2023 12:08:10 +0000 (14:08 +0200)]
Merge changes from topic "versal/xlat-v2" into integration

* changes:
  feat(versal): switch to xlat_v2
  fix(xilinx): remove asserts around arg0/arg1

19 months agoMerge "fix(uuid): add missing `#include` directives" into integration
Manish Pandey [Fri, 21 Apr 2023 12:24:12 +0000 (14:24 +0200)]
Merge "fix(uuid): add missing `#include` directives" into integration

19 months agoMerge "feat: add support for poetry" into integration
Madhukar Pappireddy [Thu, 20 Apr 2023 13:20:23 +0000 (15:20 +0200)]
Merge "feat: add support for poetry" into integration

19 months agoMerge "fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS" into integration
Joanna Farley [Thu, 20 Apr 2023 08:19:41 +0000 (10:19 +0200)]
Merge "fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS" into integration

19 months agoMerge "style(xilinx): replace ARM by Arm in copyrights" into integration
Joanna Farley [Thu, 20 Apr 2023 08:18:31 +0000 (10:18 +0200)]
Merge "style(xilinx): replace ARM by Arm in copyrights" into integration

19 months agoMerge "feat(imx8): add support for debug uart on lpuart1" into integration
Madhukar Pappireddy [Wed, 19 Apr 2023 19:56:09 +0000 (21:56 +0200)]
Merge "feat(imx8): add support for debug uart on lpuart1" into integration

19 months agoMerge "build(hooks): allow hooks to skip Commitizen" into integration
Mark Dykes [Wed, 19 Apr 2023 15:25:31 +0000 (17:25 +0200)]
Merge "build(hooks): allow hooks to skip Commitizen" into integration

19 months agofeat: add support for poetry
Harrison Mutai [Thu, 16 Feb 2023 10:20:48 +0000 (10:20 +0000)]
feat: add support for poetry

New python dependencies are introduced by the memory mapping script.
Rather than add another `requirements.txt` utilise poetry. This is a
proper dependency management framework for Python. The two main upsides
of using poetry instead of the traditional requirements.txt are
maintainability and reproducibility.

Poetry provides a proper lock file for pinning dependencies, similar to
npm for JavaScript. This allows for separate environments (i.e. docs,
tools) to be created efficiently, and in a reproducible manner, wherever
the project is deployed.  Having dependencies pinned in this manner is a
boon as a security focused project. An additional upside is that we will
receive security updates for dependencies via GitHub's Dependabot.

Change-Id: I5a3c2003769b878a464c8feac0f789e5ecf8d56c
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
19 months agoMerge "feat(fvp): add Event Log maximum size property in DT" into integration
Sandrine Bailleux [Wed, 19 Apr 2023 08:05:15 +0000 (10:05 +0200)]
Merge "feat(fvp): add Event Log maximum size property in DT" into integration

19 months agobuild(hooks): allow hooks to skip Commitizen
Chris Kay [Tue, 18 Apr 2023 16:32:41 +0000 (17:32 +0100)]
build(hooks): allow hooks to skip Commitizen

Adds a conditional check in the `prepare-commit-msg` commit hook that
reads the `tf-a.disableCommitizen` Git configuration option, and
does not execute Commitizen if it is found.

To skip Commitizen, run:

    git config tf-a.disableCommitizen true

Change-Id: Ic8967f6f42bf3555df09b57096044fb99438d4d4
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agofeat(fvp): add Event Log maximum size property in DT
Manish V Badarkhe [Mon, 20 Mar 2023 14:58:06 +0000 (14:58 +0000)]
feat(fvp): add Event Log maximum size property in DT

Updated the code to get and set the 'tpm_event_log_max_size' property
in the event_log.dtsi.

In this change, the maximum Event Log buffer size allocated by BL1 is
passed to BL2, rather than both relying on the maximum Event Log buffer
size macro.

Change-Id: I7aa6256390872171e362b6f166f3f7335aa6e425
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agoMerge "feat(docs): allow verbose build" into integration
Sandrine Bailleux [Tue, 18 Apr 2023 15:10:04 +0000 (17:10 +0200)]
Merge "feat(docs): allow verbose build" into integration

19 months agofix(uuid): add missing `#include` directives
Chris Kay [Thu, 13 Apr 2023 16:24:20 +0000 (17:24 +0100)]
fix(uuid): add missing `#include` directives

These include directives were missing from both `uuid.h` files.

Change-Id: I875dfda3e0985728277b72f0e7597dde5cf9d304
Signed-off-by: Chris Kay <chris.kay@arm.com>
19 months agoMerge changes I43a9d83c,Ibfaa47fb into integration
Sandrine Bailleux [Mon, 17 Apr 2023 14:18:39 +0000 (16:18 +0200)]
Merge changes I43a9d83c,Ibfaa47fb into integration

* changes:
  fix(intel): fix Agilex and N5X clock manager to main PLL C0
  feat(intel): implement timer init divider via CPU frequency for N5X

19 months agofeat(imx8): add support for debug uart on lpuart1
Markus Niebel [Tue, 2 Mar 2021 17:44:25 +0000 (18:44 +0100)]
feat(imx8): add support for debug uart on lpuart1

Needed for TQMa8Xx on MBa8Xx. With this changes it is
possible to build:

$ make PLAT=imx8qx IMX_DEBUG_UART=1 DEBUG_CONSOLE=1 bl31

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Change-Id: If380845b254f30fe919ebb33c86130597c4b8ad3

19 months agofix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS
Michal Simek [Mon, 17 Apr 2023 11:51:59 +0000 (13:51 +0200)]
fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS

Remove unused PLAT_NUM_POWER_DOMAINS macro. Macro is referenced by
docs/design/psci-pd-tree.rst but it is not used in any calculation
that's why it is better to remove it.

Change-Id: I33f26cda6a4404061af5598ea4c751f64127e50a
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofeat(versal): switch to xlat_v2
Michal Simek [Thu, 13 Apr 2023 11:19:11 +0000 (13:19 +0200)]
feat(versal): switch to xlat_v2

Switch to v2 version to add support for dynamic mapping which is not
supported in v1. It can be used for run time DT mapping.

Change-Id: I3f27591caf944dc758cc45ee870b9b5b3ff0a18d
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(xilinx): remove asserts around arg0/arg1
Michal Simek [Mon, 17 Apr 2023 11:15:23 +0000 (13:15 +0200)]
fix(xilinx): remove asserts around arg0/arg1

The commit a6f340fe58b9 ("Introduce the new BL handover interface")
extended handoff to 4 registers instead of 2. Arguments arg0-3 are
not used by platform code but in future they can be used for it.
But it doesn't make sense to checking their unused value.

Change-Id: I151e4b1574465409424453c054d937487086b79a
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoMerge "fix(versal): replace FPD_MAINCCI* macros" into integration
Joanna Farley [Mon, 17 Apr 2023 11:08:26 +0000 (13:08 +0200)]
Merge "fix(versal): replace FPD_MAINCCI* macros" into integration

19 months agoMerge "feat(mt8188): add apu power on/off control" into integration
Manish Pandey [Mon, 17 Apr 2023 09:23:28 +0000 (11:23 +0200)]
Merge "feat(mt8188): add apu power on/off control" into integration

19 months agoMerge "feat(qemu): increase max cpus per cluster to 16" into integration
Bipin Ravi [Fri, 14 Apr 2023 21:04:18 +0000 (23:04 +0200)]
Merge "feat(qemu): increase max cpus per cluster to 16" into integration

19 months agoMerge "fix(cpus): use hint instruction for "tsb csync"" into integration
Bipin Ravi [Fri, 14 Apr 2023 21:01:32 +0000 (23:01 +0200)]
Merge "fix(cpus): use hint instruction for "tsb csync"" into integration

19 months agostyle(xilinx): replace ARM by Arm in copyrights
Michal Simek [Fri, 14 Apr 2023 06:43:51 +0000 (08:43 +0200)]
style(xilinx): replace ARM by Arm in copyrights

The commit 6bb49c876c75 ("style(hooks): adds Arm copyright style fix")
is enforcing proper case for ARM. That's why fix it in plat/xilinx to
make sure that pre-commit.copyright won't be touching platform specific
files.

Change-Id: I49c66e18d46ed871a6aa128c9b2a403d0cf83416
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(versal): replace FPD_MAINCCI* macros
Michal Simek [Fri, 14 Apr 2023 06:39:49 +0000 (08:39 +0200)]
fix(versal): replace FPD_MAINCCI* macros

Replace FPD_MAINCCI* macros by PLAT_ARM_CCI* not to have two different
names for the same IP.

Change-Id: Ia1930e150a51603471051acec5c79c649d57f92f
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agofix(intel): fix Agilex and N5X clock manager to main PLL C0
Jit Loon Lim [Thu, 22 Dec 2022 13:52:36 +0000 (21:52 +0800)]
fix(intel): fix Agilex and N5X clock manager to main PLL C0

Update Agilex and N5X clock manager to get MPU clock from mainPLL C0
and PeriPLLC0.
1. Updated macro name PLAT_SYS_COUNTER_CONVERT_TO_MHZ to
PLAT_HZ_CONVERT_TO_MHZ.
2. Updated get_cpu_clk to point to get_mpu_clk and added comment.
3. Added get_mpu_clk to get clock from main PLL C0 and Peri PLL C0.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I43a9d83caa832b61eba93a830e2a671fd4dffa19

19 months agofeat(intel): implement timer init divider via CPU frequency for N5X
Sieu Mun Tang [Thu, 23 Jun 2022 10:05:02 +0000 (18:05 +0800)]
feat(intel): implement timer init divider via CPU frequency for N5X

Get CPU frequency and update the timer init div with it.
The timer is vary based on the CPU frequency instead of hardcoded.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ibfaa47fb7a25176eebf06f4828bf9729d56f12ed

19 months agoMerge "feat(hcx): initialize HCRX_EL2 to its default value" into integration
Manish Pandey [Thu, 13 Apr 2023 16:10:44 +0000 (18:10 +0200)]
Merge "feat(hcx): initialize HCRX_EL2 to its default value" into integration

19 months agoMerge "fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c" into integration
Madhukar Pappireddy [Thu, 13 Apr 2023 14:33:27 +0000 (16:33 +0200)]
Merge "fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c" into integration

19 months agoMerge "docs(maintainers): update maintainers for n1sdp/morello" into integration
Manish Pandey [Thu, 13 Apr 2023 09:51:14 +0000 (11:51 +0200)]
Merge "docs(maintainers): update maintainers for n1sdp/morello" into integration

19 months agoMerge "fix(rpi3): initialize SD card host controller" into integration
André Przywara [Thu, 13 Apr 2023 09:33:00 +0000 (11:33 +0200)]
Merge "fix(rpi3): initialize SD card host controller" into integration

19 months agofix(rpi3): initialize SD card host controller
Rob Newberry [Thu, 30 Mar 2023 17:43:21 +0000 (10:43 -0700)]
fix(rpi3): initialize SD card host controller

Add initial configuration parameters for Rasperry Pi 3's sdhost
controller, and then configure and use those parameters.

This change allows warm reboots of UEFI on Raspberry Pi 3B+ where
existing code often fails with "unknown error". See discussion at:

https://github.com/pftf/RPi3/issues/24

The basic idea is that some initial configuration parameters
(clock rate, bus width) aren't configured into the hardware before
commands start being sent. I suspect that the particular setting
that matters is the "slow card" bit, but the initial clock setting
also seemed wrong to me.

Change-Id: I526def340def143f23f3422f1fc14c12c937ca7f
Signed-off-by: Rob Newberry <robthedude@mac.com>
19 months agofeat(hcx): initialize HCRX_EL2 to its default value
Juan Pablo Conde [Wed, 22 Feb 2023 16:09:52 +0000 (10:09 -0600)]
feat(hcx): initialize HCRX_EL2 to its default value

The value of register HCRX_EL2 is UNKNOWN out of reset. This can
affect the behavior in lower exception levels, such as traps to
EL2 due to a wrong configuration of the register upon reset.

This patch initializes the register at EL3 and disables all traps
related to it.

On the other hand, new fields have been introduced for HCRX_EL2,
which are now defined in this patch, so they can be used in
further development.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I0bf1e949aa0d3be9f227358ad088a1ecb96ce222

19 months agoMerge "feat(pie/por): support permission indirection and overlay" into integration
André Przywara [Wed, 12 Apr 2023 15:47:54 +0000 (17:47 +0200)]
Merge "feat(pie/por): support permission indirection and overlay" into integration

19 months agoMerge "fix(psci): potential array overflow with cpu on" into integration
Manish Pandey [Wed, 12 Apr 2023 14:47:36 +0000 (16:47 +0200)]
Merge "fix(psci): potential array overflow with cpu on" into integration

19 months agofeat(pie/por): support permission indirection and overlay
Mark Brown [Tue, 14 Mar 2023 20:48:43 +0000 (20:48 +0000)]
feat(pie/por): support permission indirection and overlay

Arm v8.9 introduces a series of features providing a new way to set memory
permissions. Instead of directly encoding the permissions in the page
tables the PTEs contain indexes into an array of permissions stored in
system registers, allowing greater flexibility and density of encoding.

Enable access to these features for EL2 and below, context switching the
newly added EL2 registers as appropriate. Since all of FEAT_S[12]P[IO]E
are separately discoverable we have separate build time options for
enabling them, but note that there is overlap in the registers that they
implement and the enable bit required for lower EL access.

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: Icf89e444e39e1af768739668b505661df18fb234

19 months agoMerge "fix(imx8mq): fix compilation with gcc >= 12.x" into integration
André Przywara [Wed, 12 Apr 2023 12:40:36 +0000 (14:40 +0200)]
Merge "fix(imx8mq): fix compilation with gcc >= 12.x" into integration

19 months agoMerge "feat(zynqmp): make stack size configurable" into integration
Joanna Farley [Wed, 12 Apr 2023 09:04:09 +0000 (11:04 +0200)]
Merge "feat(zynqmp): make stack size configurable" into integration

19 months agoMerge "feat(intel): fix bridge disable and reset" into integration
Sandrine Bailleux [Wed, 12 Apr 2023 06:32:56 +0000 (08:32 +0200)]
Merge "feat(intel): fix bridge disable and reset" into integration

19 months agofix(psci): potential array overflow with cpu on
Olivier Deprez [Tue, 11 Apr 2023 08:00:21 +0000 (10:00 +0200)]
fix(psci): potential array overflow with cpu on

Fix coverity finding in psci_cpu_on, in which target_idx is directly
assigned the return value from plat_core_pos_by_mpidr. If the latter
returns a negative or large positive value, it can trigger an out of
bounds overflow for the psci_cpu_pd_nodes array.

>>>>    CID 382009:    (OVERRUN)
>>>>    Overrunning callee's array of size 8 by passing argument "target_idx" (which evaluates to 4294967295) in call to "psci_spin_lock_cpu".
> 80         psci_spin_lock_cpu(target_idx);

>>>>    CID 382009:    (OVERRUN)
>>>>    Overrunning callee's array of size 8 by passing argument "target_idx" (which evaluates to 4294967295) in call to "psci_spin_unlock_cpu".
> 160         psci_spin_unlock_cpu(target_idx);

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

19 months agoMerge changes from topic "mb/rst-to-bl31-update" into integration
Manish V Badarkhe [Tue, 11 Apr 2023 15:10:23 +0000 (17:10 +0200)]
Merge changes from topic "mb/rst-to-bl31-update" into integration

* changes:
  docs: update RESET_TO_BL31 documentation
  fix(bl31): avoid clearing of argument registers in RESET_TO_BL31 case
  Revert "docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS"
  Revert "feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS"

19 months agofeat(zynqmp): make stack size configurable
Akshay Belsare [Thu, 6 Apr 2023 10:51:06 +0000 (16:21 +0530)]
feat(zynqmp): make stack size configurable

If PLATFORM_STACK_SIZE not already defined, use the default value of
PLATFORM_STACK_SIZE.
This makes the stack size value configurable for different interface
like custom packages.

Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
Change-Id: I87e9fcbfb4c4092378b1ac0ff8fb6d084495d320

19 months agoMerge changes from topic "sb/doc-updates" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 08:14:24 +0000 (10:14 +0200)]
Merge changes from topic "sb/doc-updates" into integration

* changes:
  docs(porting): refer the reader back to the threat model
  docs(porting): move porting guide upper in table of contents

19 months agodocs(porting): refer the reader back to the threat model
Sandrine Bailleux [Tue, 4 Apr 2023 14:36:08 +0000 (16:36 +0200)]
docs(porting): refer the reader back to the threat model

When porting TF-A to a new platform, it is essential to read the
threat model documents in conjunction with the porting guide to
understand the security responsibilities of each platform interface
to implement.

Add a note to highlight this in the porting guide.

Change-Id: Icd1e41ae4b15032b72531690dd82a9ef95ca0db5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
19 months agodocs(porting): move porting guide upper in table of contents
Sandrine Bailleux [Wed, 8 Feb 2023 13:07:29 +0000 (14:07 +0100)]
docs(porting): move porting guide upper in table of contents

The porting guide is currently hosted under the 'Getting started'
section. Yet, porting the full firmware to a new platform is probably
not the first thing that one would do. Before delving into the
details, one would probably start by building the code for an emulated
platform, such as Arm FVP.

Furthermore, the porting guide is such a big and important document
that it probably deserves being visible in the main table of contents.
Thus, move it just above the list of supported platforms.

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

19 months agoMerge changes from topic "sb/doc-updates" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 08:04:32 +0000 (10:04 +0200)]
Merge changes from topic "sb/doc-updates" into integration

* changes:
  docs(porting): remove reference to xlat_table lib v1
  docs(porting): remove pull request terminology
  docs(changelog): add 'porting' scope

19 months agodocs(porting): remove reference to xlat_table lib v1
Sandrine Bailleux [Wed, 8 Feb 2023 13:02:45 +0000 (14:02 +0100)]
docs(porting): remove reference to xlat_table lib v1

Version 1 of the translation table library is deprecated. Refer to
version 2 instead.

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

19 months agodocs(porting): remove pull request terminology
Sandrine Bailleux [Wed, 8 Feb 2023 13:01:18 +0000 (14:01 +0100)]
docs(porting): remove pull request terminology

The pull request terminology dates back from when TF-A repository was
hosted on Github. Use a terminology that is more suited to Gerrit
workflow.

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

19 months agodocs(changelog): add 'porting' scope
Sandrine Bailleux [Wed, 8 Feb 2023 12:58:25 +0000 (13:58 +0100)]
docs(changelog): add 'porting' scope

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

19 months agoMerge "fix(intel): update boot scratch to indicate to Uboot is PSCI ON" into integration
Sandrine Bailleux [Tue, 11 Apr 2023 07:39:11 +0000 (09:39 +0200)]
Merge "fix(intel): update boot scratch to indicate to Uboot is PSCI ON" into integration

19 months agoMerge "feat(zynqmp): add hooks for custom runtime setup" into integration
Joanna Farley [Tue, 11 Apr 2023 07:27:48 +0000 (09:27 +0200)]
Merge "feat(zynqmp): add hooks for custom runtime setup" into integration

19 months agoMerge changes Ifd5a63a3,Idb8bda44 into integration
Sandrine Bailleux [Tue, 11 Apr 2023 06:36:34 +0000 (08:36 +0200)]
Merge changes Ifd5a63a3,Idb8bda44 into integration

* changes:
  fix(intel): flash dcache before mmio read
  fix(intel): fix the pointer of block memory to fill in and bytes being set

19 months agofix(intel): flash dcache before mmio read
Jit Loon Lim [Mon, 27 Mar 2023 07:19:53 +0000 (15:19 +0800)]
fix(intel): flash dcache before mmio read

Flash dcache before mmio read to avoid reading old/previous value.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ifd5a63a3c0f20b3e673be62ff5c3b6c4cf69df51

19 months agofix(intel): fix the pointer of block memory to fill in and bytes being set
Sieu Mun Tang [Tue, 21 Mar 2023 07:11:08 +0000 (15:11 +0800)]
fix(intel): fix the pointer of block memory to fill in and bytes being set

Fix on the pointer of the block memory to fill in and the number of
bytes to be set. So it can clear the exact address with exact number
of bytes.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Idb8bda446ecd4c1d85d1ec9802bdcb020904c6c1

19 months agofeat(intel): fix bridge disable and reset
Ang Tien Sung [Mon, 13 Mar 2023 01:32:40 +0000 (09:32 +0800)]
feat(intel): fix bridge disable and reset

Fix bridge sideband manager register clear and set incorrect
implementation. To support non-graceful full bridge disable
and enable.

Signed-off-by: Ang Tien Sung <tien.sung.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I651f3ec163d954e8efb0542ec33bce96e51992db

19 months agofix(intel): update boot scratch to indicate to Uboot is PSCI ON
Jit Loon Lim [Thu, 2 Mar 2023 05:38:53 +0000 (13:38 +0800)]
fix(intel): update boot scratch to indicate to Uboot is PSCI ON

There is a use case where kernel requested ATF to power off/on only CPU0.
However, after ATF power off/on CPU0, CPU0 did not back into the state
to wait for ATF. Instead, CPU0 continue to reentry SPL boot sequence
because CPU0 is master/primary core. This causing the system reboot from
SPL again, while the slave core still in kernel.

To resolve this, ATF is set the boot scratch register 8 bit 17 whenever
it is a request from kernel to power off/on only CPU0. So, if this boot
scratch bit is set, CPU 0 will be able to put into a state to wait for
ATF.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ia0228c5396beaa479858f5bd02fc05139efd2423

19 months agoMerge "style(docs): fix typo s/flase/false/" into integration
Joanna Farley [Thu, 6 Apr 2023 11:52:25 +0000 (13:52 +0200)]
Merge "style(docs): fix typo s/flase/false/" into integration

19 months agoMerge "fix(scmi): fix compilation error in scmi base" into integration
Joanna Farley [Thu, 6 Apr 2023 11:51:25 +0000 (13:51 +0200)]
Merge "fix(scmi): fix compilation error in scmi base" into integration

19 months agoMerge "docs(threat-model): refresh top-level page" into integration
Sandrine Bailleux [Thu, 6 Apr 2023 11:29:45 +0000 (13:29 +0200)]
Merge "docs(threat-model): refresh top-level page" into integration

19 months agoMerge "fix(fvp): work around DRTM_SUPPORT BL31 progbits exceeded" into integration
Manish V Badarkhe [Thu, 6 Apr 2023 09:23:51 +0000 (11:23 +0200)]
Merge "fix(fvp): work around DRTM_SUPPORT BL31 progbits exceeded" into integration

19 months agofeat(zynqmp): add hooks for custom runtime setup
Akshay Belsare [Thu, 6 Apr 2023 05:39:20 +0000 (11:09 +0530)]
feat(zynqmp): add hooks for custom runtime setup

Add runtime setup hooks (via custom_runtime_setup()) for low level
operations related to setting up the system to correct state.

Change-Id: I4af7050dba2ee2446366d482bef5f5c5dde4bddf
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
19 months agoMerge changes from topic "cpus" into integration
Bipin Ravi [Thu, 6 Apr 2023 06:06:10 +0000 (08:06 +0200)]
Merge changes from topic "cpus" into integration

* changes:
  feat(cpus): add support for blackhawk cpu
  feat(cpus): add support for chaberton cpu

19 months agofeat(mt8188): add apu power on/off control
Chungying Lu [Wed, 15 Mar 2023 07:31:56 +0000 (15:31 +0800)]
feat(mt8188): add apu power on/off control

Add mt8188 apu power on/off control

Change-Id: I8e28bf7a4ad4067553981c67c4c2225fdd802859
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: jason-ch chen <Jason-ch.Chen@mediatek.com>
19 months agofix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c
Vyacheslav Yurkov [Tue, 4 Apr 2023 18:58:13 +0000 (20:58 +0200)]
fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c

Use /omit-if-no-ref/ keyword in DT to remove extra device nodes only
when they are not used / not referenced.

If the board device tree only defines subnodes, dtc does not consider it
as usage, you have to specifically mention device's phandle, e.g.:

\ {
i2c6-phandle = <&i2c6>;
};

or in aliases section
aliases {
i2c6 = &i2c6;
};

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Change-Id: I431ecd93576f97fd021d82d23b93c659fc8f26b8

19 months agoMerge "chore: add dependency files generated by tools to .gitignore" into integration
Sandrine Bailleux [Wed, 5 Apr 2023 12:39:50 +0000 (14:39 +0200)]
Merge "chore: add dependency files generated by tools to .gitignore" into integration

19 months agofeat(qemu): increase max cpus per cluster to 16
Evgeny Iakovlev [Tue, 4 Apr 2023 17:41:52 +0000 (19:41 +0200)]
feat(qemu): increase max cpus per cluster to 16

Qemu-tcg with GICv3 emulation enabled will by default configure MPIDR
topology to report up to 16 cpus per cluster. This is NOT overriden by
qemu's -smp setting, e.g. -smp 8,clusters=2,cores=4,threads=1 will still
generate MPIDR reads as if all 8 CPUs were within one cluster.

Increase the hardcoded limit to reflect that so that we accept PSCI
calls that provide MPIDRs based on what was actually read from the
emulated CPU.

Change-Id: Ia321d555f885c96a9a94ae053b340e3a9e300e6d
Signed-off-by: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
19 months agochore: add dependency files generated by tools to .gitignore
Manish V Badarkhe [Wed, 5 Apr 2023 07:57:32 +0000 (08:57 +0100)]
chore: add dependency files generated by tools to .gitignore

In order to avoid git tracking dependency files generated while
compiling tools, the .gitignore list was updated with these files.

Change-Id: I97f1ace40441353779f4f82051d66c478571df38
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
19 months agofix(imx8mq): fix compilation with gcc >= 12.x
Andre Przywara [Tue, 4 Apr 2023 15:52:25 +0000 (16:52 +0100)]
fix(imx8mq): fix compilation with gcc >= 12.x

Starting with GCC >= 12.x the -Wall option includes -Werror=array-bounds
checks. Per default GCC treats all memory accesses below 4096 as NULL,
so access to ROMAPI causes the following warning:

------------
In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
In function 'mmio_read_8',
    inlined from 'imx8mq_soc_info_init' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16,
    inlined from 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
   19 |         return *(volatile uint8_t*)addr;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
In function 'mmio_read_8',
    inlined from 'imx8mq_soc_info_init' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:74:16,
    inlined from 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
   19 |         return *(volatile uint8_t*)addr;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
------------

This comes arguably from us somewhat abusing pointers to access MMIO
memory regions, which is not really covered by the C language.

Replace the pointer-dereferencing mmio_read_8() with an implementation
that uses inline assembly, to directly generate an 8-bit load
instruction. This avoids the compiler thinking that this access is using
a pointer it needs to jealously look after.

Change-Id: Iab39f6f615d51d3e8a1c54a1262d1e6ec208811d
Reported-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
19 months agodocs(maintainers): update maintainers for n1sdp/morello
Anurag Koul [Tue, 4 Apr 2023 15:42:59 +0000 (16:42 +0100)]
docs(maintainers): update maintainers for n1sdp/morello

Signed-off-by: Anurag Koul <anurag.koul@arm.com>
Change-Id: I305d03ae664f7d6124bf73d3bfdd81d34d760065

19 months agofeat(cpus): add support for blackhawk cpu
Govindraj Raja [Mon, 13 Mar 2023 12:09:12 +0000 (12:09 +0000)]
feat(cpus): add support for blackhawk cpu

Add basic CPU library code to support the Blackhawk CPU,
BlackHawk core is based out of Hunter ELP core,
so overall library code was adapted based on that.

Change-Id: I4750e774732218ee669dceb734cd107f46b78492
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
19 months agofeat(cpus): add support for chaberton cpu
Govindraj Raja [Fri, 10 Mar 2023 10:38:54 +0000 (10:38 +0000)]
feat(cpus): add support for chaberton cpu

Add basic CPU library code to support the Chaberton CPU,
Chaberton cores are based out of Hunter core, so overall
library code was adapted based on that.

Change-Id: I58321c77f2c364225a764da6fa65656d1bec33f1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
19 months agofix(fvp): work around DRTM_SUPPORT BL31 progbits exceeded
Boyan Karatotev [Tue, 4 Apr 2023 13:48:04 +0000 (14:48 +0100)]
fix(fvp): work around DRTM_SUPPORT BL31 progbits exceeded

Just like the tspd, DRTM support pulls in a lot of code which can't fit
into SRAM with everything else the fvp is including. Luckily, testing
this feature is only done on v8.0 models, meaning all feature related
code can be excluded for this run, saving space. The benefit of doing it
this way is that the test can continue running unaltered in the interim.

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

19 months agoMerge changes from topic "ethos-n" into integration
Joanna Farley [Tue, 4 Apr 2023 14:16:04 +0000 (16:16 +0200)]
Merge changes from topic "ethos-n" into integration

* changes:
  docs(maintainers): update NPU driver files
  docs(ethos-n): update porting-guide.rst for NPU
  feat(ethos-n): add separate RO and RW NSAIDs
  feat(ethos-n)!: add protected NPU firmware setup
  feat(ethos-n): add stream extends and attr support
  feat(ethos-n): add reserved memory address support
  feat(ethos-n): add event and aux control support
  feat(ethos-n): add SMC call to get FW properties
  refactor(ethos-n): split up SMC call handling
  feat(ethos-n): add NPU firmware validation
  feat(ethos-n): add check for NPU in SiP setup
  feat(ethos-n)!: load NPU firmware at BL2
  feat(juno): support ARM_IO_IN_DTB option for Juno
  fix(fconf): fix FCONF_ARM_IO_UUID_NUMBER value
  fix(fvp): incorrect UUID name in FVP tb_fw_config
  fix(ethos-n): add workaround for erratum 2838783
  feat(ethos-n): add support for NPU to cert_create
  feat(ethos-n): add NPU support in fiptool
  feat(ethos-n): add support to set up NSAID
  build(fiptool): add object dependency generation
  feat(ethos-n): add NPU sleeping SMC call
  feat(ethos-n): add multiple asset allocators
  feat(ethos-n): add reset type to reset SMC calls
  feat(ethos-n): add protected NPU TZMP1 regions
  build(ethos-n): add TZMP1 build flag

19 months agodocs(threat-model): refresh top-level page
Sandrine Bailleux [Tue, 4 Apr 2023 14:02:42 +0000 (16:02 +0200)]
docs(threat-model): refresh top-level page

The top-level page for threat model documents is evidently out-dated,
as it contains text which no longer makes sense on its own. Most
likely it relates back to the days where we had a single threat model
document.

Reword it accordingly. While we are at it, explain the motivation and
structure of the documents.

Change-Id: I63c8f38ec32b6edbfd1b4332eeaca19a01ae70e9
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
19 months agoMerge "fix(psci): remove unreachable switch/case blocks" into integration
Manish Pandey [Tue, 4 Apr 2023 11:58:19 +0000 (13:58 +0200)]
Merge "fix(psci): remove unreachable switch/case blocks" into integration

19 months agoMerge "docs(maintainers): update NPU driver owners" into integration
Joanna Farley [Tue, 4 Apr 2023 10:50:03 +0000 (12:50 +0200)]
Merge "docs(maintainers): update NPU driver owners" into integration

19 months agofix(psci): remove unreachable switch/case blocks
Andre Przywara [Wed, 29 Mar 2023 11:05:19 +0000 (12:05 +0100)]
fix(psci): remove unreachable switch/case blocks

The PSCI function dispatcher switch/case is split up between 32-bit and
64-bit function IDs, based on bit 30 of the encoding. This bit just
encodes the maximum size of the arguments, not necessarily whether they
are used from AArch64 or AArch32. So while some functions exist in both
worlds (CPU_ON, for instance), some functions take no or only 32-bit
arguments (CPU_OFF, PSCI_FEATURES), so they only exist as a 32-bit
function call.

Commit b88a4416b5e5 ("feat(psci): add support for PSCI_SET_SUSPEND_MODE"
, gerrit ID Iebf65f5f7846aef6b8643ad6082db99b4dcc4bef) and commit
9a70e69e0598 ("feat(psci): update PSCI_FEATURES", gerrit ID
I5da8a989b53419ad2ab55b73ddeee6e882c25554) introduced two "case"
sections for 32-bit function IDs in the 64-bit branch, which will never
trigger. The one small extra case caused the sun50i_a64 DEBUG build to
go beyond its RAM limit.

Removed the redundant switch/case blocks, to make sun50i_a64 build
again.

Change-Id: Ic65b7403d128837296a0c3af42c6f23f9f57778e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
19 months agodocs(maintainers): update NPU driver owners
Mikael Olsson [Mon, 27 Mar 2023 16:52:39 +0000 (18:52 +0200)]
docs(maintainers): update NPU driver owners

Mikael Olsson will no longer be working with the Arm(R) Ethos(TM)-N NPU
so Ştefana Simion will take over the ownership of the driver.

Change-Id: If22bbdcb26af9bf851efc14ad96ed76c745eadfd
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
19 months agodocs(maintainers): update NPU driver files
Mikael Olsson [Tue, 28 Mar 2023 13:51:49 +0000 (15:51 +0200)]
docs(maintainers): update NPU driver files

New files have been added for the Arm(R) Ethos(TM)-N NPU driver with the
addition of TZMP1 support so the files in the maintainers list have been
updated accordingly.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I3768b2ab78c117c1dd4fc03b38cf35f6811fa378

19 months agodocs(ethos-n): update porting-guide.rst for NPU
Rob Hughes [Mon, 20 Feb 2023 12:03:52 +0000 (12:03 +0000)]
docs(ethos-n): update porting-guide.rst for NPU

Add some missing configuration that must be done for supporting NPU on
other platforms.

Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: Ic505ea60f73b970d0d7ded101830eb2ce8c7ab64

19 months agofeat(ethos-n): add separate RO and RW NSAIDs
Mikael Olsson [Tue, 14 Mar 2023 17:29:06 +0000 (18:29 +0100)]
feat(ethos-n): add separate RO and RW NSAIDs

To be able to further restrict the memory access for the Arm(R)
Ethos(TM)-N NPU, separate read-only and read/write NSAIDs for the
non-protected and protected memory have been added to the Juno
platform's TZMP1 TZC configuration for the NPU.

The platform definition has been updated accordingly and the NPU driver
will now only give read/write access to the streams that require it.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I5a173500fc1943a5cd406a3b379e1f1f554eeda6

19 months agofeat(ethos-n)!: add protected NPU firmware setup
Mikael Olsson [Fri, 10 Feb 2023 15:59:23 +0000 (16:59 +0100)]
feat(ethos-n)!: add protected NPU firmware setup

When the Arm(R) Ethos(TM)-N NPU driver is built with TZMP1 support, the
NPU should use the firmware that has been loaded into the protected
memory by BL2. The Linux Kernel NPU driver in the non-secure world is
not allowed to configure the NPU to do this in a TZMP1 build so the SiP
service will now configure the NPU to boot with the firmware in the
protected memory.

BREAKING CHANGE: The Linux Kernel NPU driver can no longer directly
configure and boot the NPU in a TZMP1 build. The API version has
therefore been given a major version bump with this change.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I65d00f54b3ade3665d7941e270da7a3dec02281a

19 months agofeat(ethos-n): add stream extends and attr support
Mikael Olsson [Fri, 10 Feb 2023 15:59:03 +0000 (16:59 +0100)]
feat(ethos-n): add stream extends and attr support

The SiP service for the Arm(R) Ethos(TM)-N NPU driver will now handle
setting up the address extension and attribute control for the NPU's
streams. The non-secure world will still be allowed to read the address
extension for stream0 but non-secure access to all other streams have
been removed.

The API version has been given a minor bump with this change to indicate
the added functionality.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I2b041ca4a0a2b5cd6344a4ae144f75e137c72592

19 months agofeat(ethos-n): add reserved memory address support
Mikael Olsson [Fri, 10 Feb 2023 10:39:40 +0000 (11:39 +0100)]
feat(ethos-n): add reserved memory address support

The FCONF parsing of the HW_CONFIG for the Arm(R) Ethos(TM)-N NPU now
supports reading the address of the reserved memory setup for the NPU so
the address can be used in the SiP service for the NPU.

Change-Id: I0968255a966e84896b00ea935d6aa3d5232c5f7b
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
19 months agofeat(ethos-n): add event and aux control support
Mikael Olsson [Fri, 10 Feb 2023 10:36:19 +0000 (11:36 +0100)]
feat(ethos-n): add event and aux control support

The SiP service for the Arm(R) Ethos(TM)-N NPU driver will now handle
setting up the NPU's event and aux control registers during the SMC
reset call. The aux control register will no longer be accessible by the
non-secure world.

The API version has been given a minor bump with this change to indicate
the added functionality.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I5b099e25978aa4089c384eb17c5060c5b4eaf373

19 months agofeat(ethos-n): add SMC call to get FW properties
Mikael Olsson [Fri, 27 Jan 2023 17:53:48 +0000 (18:53 +0100)]
feat(ethos-n): add SMC call to get FW properties

When the Arm(R) Ethos(TM)-N NPU firmware is loaded by BL2 into protected
memory, the Linux kernel NPU driver cannot access the firmware. To still
allow the kernel driver to access some information about the firmware,
SMC calls have been added so it can check compatibility and get the
necessary information to map the firmware into the SMMU for the NPU.

The API version has been given a minor version bump with this change to
indicate the added functionality.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: Idb076b7bcf54ed7e8eb39be80114dc1d1c45336d

19 months agorefactor(ethos-n): split up SMC call handling
Mikael Olsson [Fri, 27 Jan 2023 17:26:36 +0000 (18:26 +0100)]
refactor(ethos-n): split up SMC call handling

Doing all the SMC call handling in a single function and using specific
names for the x1-4 parameters is no longer practical for upcoming
additions to the SiP service. Handling of the different SMC functions
have therefore been split into separate functions.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: If28da8df0f13c449d1fdb2bd9d792d818ec5e1af

19 months agofeat(ethos-n): add NPU firmware validation
Mikael Olsson [Fri, 13 Jan 2023 08:56:41 +0000 (09:56 +0100)]
feat(ethos-n): add NPU firmware validation

When the Arm(R) Ethos(TM)-N NPU driver is built with TZMP1 support, it
will now validate the NPU firmware binary that BL2 is expected to load
into the protected memory location specified by
ARM_ETHOSN_NPU_IMAGE_BASE.

Juno has been updated with a new BL31 memory mapping to allow the SiP
service to read the protected memory that contains the NPU firmware
binary.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I633256ab7dd4f8f5a6f864c8c98a66bf9dfc37f3

19 months agofeat(ethos-n): add check for NPU in SiP setup
Mikael Olsson [Wed, 18 Jan 2023 17:05:15 +0000 (18:05 +0100)]
feat(ethos-n): add check for NPU in SiP setup

The SiP service in the Arm(R) Ethos(TM)-N NPU driver requires that there
is at least one NPU available. If there is no NPU available, the driver
is either used incorrectly or the HW config is incorrect.

To ensure that the SiP service is not incorrectly used, a setup handler
has been added to the service that will validate that there is at least
one NPU available.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I8139a652f265cfc0db4a37464f39f1fb92868e10

19 months agofeat(ethos-n)!: load NPU firmware at BL2
Rob Hughes [Tue, 17 Jan 2023 16:10:26 +0000 (16:10 +0000)]
feat(ethos-n)!: load NPU firmware at BL2

BL2 on Juno now loads the Arm(R) Ethos(TM)-N NPU firmware into a fixed
address, using the existing image loading framework.

Includes support for TRUSTED_BOARD_BOOT, if enabled, using the firmware
content and key certificates from the FIP.

Supports the ARM_IO_IN_DTB option so can specify the firmware location
from the dtb rather than it being hardcoded to the FIP

Update makefile to automatically embed the appropriate images into the
FIP.

BREAKING CHANGE: Building the FIP when TZMP1 support is enabled in the
NPU driver now requires a parameter to specify the NPU firmware file.

Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I8cd64fb20d58f8bd539facb085606213d6cead06

19 months agofeat(juno): support ARM_IO_IN_DTB option for Juno
Rob Hughes [Fri, 20 Jan 2023 10:47:30 +0000 (10:47 +0000)]
feat(juno): support ARM_IO_IN_DTB option for Juno

Add UUIDs for loadable FIP images to Juno's tb_fw_config device tree, so
that it can be built with the ARM_IO_IN_DTB option. Increase the
max-size of the tb_fw-config image accordingly, as the new entries
enlarge that image(new size is 2,116 bytes, rounded up to 2,560 =
0xA00)

Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I557bca7dd32c3be084bbba11d84dfa2818cb6789

19 months agofix(fconf): fix FCONF_ARM_IO_UUID_NUMBER value
Rob Hughes [Fri, 20 Jan 2023 10:43:41 +0000 (10:43 +0000)]
fix(fconf): fix FCONF_ARM_IO_UUID_NUMBER value

The FCONF_ARM_IO_UUID_NUMBER macro is hardcoded to the number of entries
in the `load_info` array, but this number did not match the actual
length of the array in the case that TRUSTED_BOARD_BOOT is defined, but
SPD_spmd is not defined.

This patch fixes the hardcoded length by replacing it with a more
flexible calculation which sums up the various contributing groups of
entries.

Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I557bca7dd32c3be084bbba11d84dfa2818cb6790

19 months agofix(fvp): incorrect UUID name in FVP tb_fw_config
Rob Hughes [Fri, 20 Jan 2023 10:40:27 +0000 (10:40 +0000)]
fix(fvp): incorrect UUID name in FVP tb_fw_config

Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I557bca7dd32c3be084bbba11d84dfa2818cb6791

19 months agofix(ethos-n): add workaround for erratum 2838783
Mikael Olsson [Wed, 11 Jan 2023 09:36:22 +0000 (10:36 +0100)]
fix(ethos-n): add workaround for erratum 2838783

To workaround Arm(R) Ethos(TM)-N NPU erratum 2838783, the NPU has been
configured to allow being woken up by both secure and non-secure events
to make sure that an event always wakes up the NPU.

The API version has been given a minor version bump with this change to
indicate that this fix is included.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I429cdd6bf1e633b4dedf2e94af28937dd892a0ba

19 months agofeat(ethos-n): add support for NPU to cert_create
Mohamed Elzahhar [Wed, 16 Nov 2022 12:05:37 +0000 (12:05 +0000)]
feat(ethos-n): add support for NPU to cert_create

Add Juno specific Makefile to the certificate tool build. That
Makefile is included by the certificate tool Makefile to add
information about the authentication data for the
Arm(R) Ethos(TM)-N NPU's firmware binary.

Signed-off-by: Mohamed Elzahhar <Mohamed.Elzahhar@arm.com>
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: Ie4b6a1c29d73b3ed5041b57f2cd88033be18a63a

19 months agofeat(ethos-n): add NPU support in fiptool
Daniele Castro [Thu, 24 Nov 2022 12:06:13 +0000 (12:06 +0000)]
feat(ethos-n): add NPU support in fiptool

Add platform specific Makefile to add UUIDs and command options
for the Arm(R) Ethos(TM)-N NPU firmware binary and certificate
data to the FIP so that the TF-A's BL2 can later be used to load
the Arm(R) Ethos(TM)-N NPU firmware binary into memory and verify
its integrity.

Add separate driver specific include header file for the
Arm(R) Ethos(TM)-N NPU images containing UUIDs and command options
to make it easy to port the FIP support to other platforms.

Signed-off-by: Daniele Castro <daniele.castro@arm.com>
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I8cd64fb20d58f8bd539facb085606213d6cead05

19 months agofeat(ethos-n): add support to set up NSAID
Rajasekaran Kalidoss [Wed, 16 Nov 2022 16:16:44 +0000 (17:16 +0100)]
feat(ethos-n): add support to set up NSAID

For the TZC to allow the Arm(R) Ethos(TM)-N NPU to access the buffers
allocated in a protected memory region, it must include the correct
NSAID for that region in its transactions to the memory.  This change
updates the SiP service to configure the NSAIDs specified by a platform
define. When doing a protected access the SiP service now configures the
NSAIDs specified by the platform define. For unprotected access the
NSAID is set to zero.

Signed-off-by: Rajasekaran Kalidoss <rajasekaran.kalidoss@arm.com>
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I3360ef33705162aba5c67670386922420869e331

19 months agobuild(fiptool): add object dependency generation
Mikael Olsson [Thu, 8 Dec 2022 16:07:06 +0000 (17:07 +0100)]
build(fiptool): add object dependency generation

The object target in the fiptool Makefile only depends on the
corresponding source file so it won't rebuild the object, if a header
file used by the source file is changed.

To make it rebuild the object file for both source and header file
changes, a dependency file will now be generated for each object and
included in the Makefile.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I0468c6e9c54126242150667268d471f28e011b0d

19 months agofeat(ethos-n): add NPU sleeping SMC call
Mikael Olsson [Fri, 4 Nov 2022 14:01:02 +0000 (15:01 +0100)]
feat(ethos-n): add NPU sleeping SMC call

The non-secure world delegation of the register needed to determine if
the Arm(R) Ethos(TM)-N NPU is active or sleeping will be removed in the
future. In preparation for the change, a new SMC call has been added to
allow the non-secure world to ask the SiP service for the state instead.

A minor API version bump has been done with this change to indicate
support for the new functionality.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I1338341be385cf1891f4809efb7083fae6d928bc

19 months agofeat(ethos-n): add multiple asset allocators
Joshua Pimm [Wed, 9 Nov 2022 11:26:11 +0000 (11:26 +0000)]
feat(ethos-n): add multiple asset allocators

Adds additional asset allocators to the device tree include
file as the non-secure world kernel module for the Arm(R)
Ethos(TM)-N NPU now fully supports having and using multiple
asset allocators.

Signed-off-by: Joshua Pimm <joshua.pimm@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I82d53667ef64968ee814f611d0a90abd3b3cf3de

19 months agofeat(ethos-n): add reset type to reset SMC calls
Joshua Pimm [Wed, 19 Oct 2022 14:46:27 +0000 (15:46 +0100)]
feat(ethos-n): add reset type to reset SMC calls

Adds a reset type argument for the soft and hard reset SMC calls to
indicate whether to perform a full reset and setup or only halt the
Arm(R) Ethos(TM)-N NPU. For use in cases where the NPU will not be
used but must be put into a known state, such as suspending the NPU
as part of power management.

Signed-off-by: Joshua Pimm <joshua.pimm@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I6018af85a28b0e977166ec29d26f04739123140c