Commit graph

12420 commits

Author SHA1 Message Date
Manish V Badarkhe
bb5b2632e1 docs(measured-boot): update the build command
As per recent changes to OPTEE's fvp.mk file, both options
"MEASURED_BOOT" and "MEASURED_BOOT_FTPM" are required for the fTPM
application to be built.

Change-Id: I621113c3fbd47e9f5be015ea65e9b8d0f218e4e8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-04-27 07:28:41 +01:00
Madhukar Pappireddy
e7df41b545 Merge "feat: add support for poetry" into integration 2023-04-20 15:20:23 +02:00
Joanna Farley
2ef07eb402 Merge "fix(zynqmp): remove unused PLAT_NUM_POWER_DOMAINS" into integration 2023-04-20 10:19:41 +02:00
Joanna Farley
d84171b4a8 Merge "style(xilinx): replace ARM by Arm in copyrights" into integration 2023-04-20 10:18:31 +02:00
Madhukar Pappireddy
2e31daecd7 Merge "feat(imx8): add support for debug uart on lpuart1" into integration 2023-04-19 21:56:09 +02:00
Mark Dykes
93c817f702 Merge "build(hooks): allow hooks to skip Commitizen" into integration 2023-04-19 17:25:31 +02:00
Harrison Mutai
793f72c06c 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>
2023-04-19 14:38:24 +01:00
Sandrine Bailleux
f2a01993db Merge "feat(fvp): add Event Log maximum size property in DT" into integration 2023-04-19 10:05:15 +02:00
Chris Kay
9a905a7d86 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>
2023-04-18 17:38:20 +01:00
Manish V Badarkhe
1cf3e2f0a8 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>
2023-04-18 17:13:17 +02:00
Sandrine Bailleux
0223d15764 Merge "feat(docs): allow verbose build" into integration 2023-04-18 17:10:04 +02:00
Sandrine Bailleux
ffc56bd02d 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
2023-04-17 16:18:39 +02:00
Markus Niebel
8406447f13 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
2023-04-17 14:43:27 +02:00
Michal Simek
72c3124f58 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>
2023-04-17 13:51:59 +02:00
Joanna Farley
114495b548 Merge "fix(versal): replace FPD_MAINCCI* macros" into integration 2023-04-17 13:08:26 +02:00
Manish Pandey
c629e8d8a2 Merge "feat(mt8188): add apu power on/off control" into integration 2023-04-17 11:23:28 +02:00
Bipin Ravi
ffd74f6618 Merge "feat(qemu): increase max cpus per cluster to 16" into integration 2023-04-14 23:04:18 +02:00
Bipin Ravi
b516a6f46c Merge "fix(cpus): use hint instruction for "tsb csync"" into integration 2023-04-14 23:01:32 +02:00
Michal Simek
619bc13eda style(xilinx): replace ARM by Arm in copyrights
The commit 6bb49c876c ("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>
2023-04-14 08:54:37 +02:00
Michal Simek
245d30efe6 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>
2023-04-14 08:52:04 +02:00
Jit Loon Lim
5f06bffa83 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
2023-04-14 09:19:31 +08:00
Sieu Mun Tang
02a9d70c4d 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
2023-04-14 09:17:33 +08:00
Manish Pandey
4a24538ae9 Merge "feat(hcx): initialize HCRX_EL2 to its default value" into integration 2023-04-13 18:10:44 +02:00
Madhukar Pappireddy
9d124ecd56 Merge "fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c" into integration 2023-04-13 16:33:27 +02:00
Manish Pandey
15b0a94bb5 Merge "docs(maintainers): update maintainers for n1sdp/morello" into integration 2023-04-13 11:51:14 +02:00
André Przywara
24ddb6ce01 Merge "fix(rpi3): initialize SD card host controller" into integration 2023-04-13 11:33:00 +02:00
Rob Newberry
bd96d533dc 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>
2023-04-13 10:29:51 +01:00
Juan Pablo Conde
ddb615b419 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
2023-04-12 15:26:41 -05:00
André Przywara
15db5039b5 Merge "feat(pie/por): support permission indirection and overlay" into integration 2023-04-12 17:47:54 +02:00
Manish Pandey
741a5dc8f6 Merge "fix(psci): potential array overflow with cpu on" into integration 2023-04-12 16:47:36 +02:00
Mark Brown
062b6c6bf2 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
2023-04-12 15:03:22 +01:00
André Przywara
2237e562fd Merge "fix(imx8mq): fix compilation with gcc >= 12.x" into integration 2023-04-12 14:40:36 +02:00
Joanna Farley
d2309b49ea Merge "feat(zynqmp): make stack size configurable" into integration 2023-04-12 11:04:09 +02:00
Sandrine Bailleux
49eccae949 Merge "feat(intel): fix bridge disable and reset" into integration 2023-04-12 08:32:56 +02:00
Olivier Deprez
66327414fb 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
2023-04-11 17:59:38 +02:00
Manish V Badarkhe
a1c924df6d 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"
2023-04-11 17:10:23 +02:00
Akshay Belsare
57536653e6 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
2023-04-11 15:10:23 +01:00
Sandrine Bailleux
07c594c518 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
2023-04-11 10:14:24 +02:00
Sandrine Bailleux
fd0933516b 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>
2023-04-11 10:11:04 +02:00
Sandrine Bailleux
292585be90 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
2023-04-11 10:11:04 +02:00
Sandrine Bailleux
da87d6a34c 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
2023-04-11 10:04:32 +02:00
Sandrine Bailleux
24d0fbcddf 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
2023-04-11 09:58:17 +02:00
Sandrine Bailleux
93e1ad7f76 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
2023-04-11 09:58:14 +02:00
Sandrine Bailleux
d3171619b3 docs(changelog): add 'porting' scope
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I22a81b3f69d90e0fcb88c7e98178e915253afb43
2023-04-11 09:58:10 +02:00
Sandrine Bailleux
f1bdf105d0 Merge "fix(intel): update boot scratch to indicate to Uboot is PSCI ON" into integration 2023-04-11 09:39:11 +02:00
Joanna Farley
ebb0838a98 Merge "feat(zynqmp): add hooks for custom runtime setup" into integration 2023-04-11 09:27:48 +02:00
Sandrine Bailleux
ffe7a9191c 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
2023-04-11 08:36:34 +02:00
Jit Loon Lim
731622fe75 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
2023-04-11 00:20:45 +08:00
Sieu Mun Tang
afe9fcc3d2 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
2023-04-11 00:20:24 +08:00
Ang Tien Sung
9ce82519c6 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
2023-04-11 00:17:00 +08:00