]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
2 years agofix(el3_runtime): restore SPSR/ELR/SCR after esb
Manish Pandey [Thu, 17 Nov 2022 14:43:15 +0000 (14:43 +0000)]
fix(el3_runtime): restore SPSR/ELR/SCR after esb

SCR_EL3 register is restored before esb issued and it is assumed
that EAs are unmasked at that point, which is wrong, as the SCR_EL3
value at that time is restored from the context of the world where
it is returning to.

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

2 years agoMerge changes from topic "mb/refactor-evlog" into integration
Manish Pandey [Wed, 30 Nov 2022 13:17:08 +0000 (14:17 +0100)]
Merge changes from topic "mb/refactor-evlog" into integration

* changes:
  refactor(qemu): pass platform metadata as a function's argument
  refactor(imx8m): pass platform metadata as a function's argument
  refactor(fvp): pass platform metadata as a function's argument
  refactor(measured-boot): accept metadata as a function's argument

2 years agoMerge "fix(console): fix crash on spin_unlock with cache disabled" into integration
Manish Pandey [Tue, 29 Nov 2022 09:32:46 +0000 (10:32 +0100)]
Merge "fix(console): fix crash on spin_unlock with cache disabled" into integration

2 years agofix(console): fix crash on spin_unlock with cache disabled
Baruch Siach [Thu, 24 Nov 2022 08:34:06 +0000 (10:34 +0200)]
fix(console): fix crash on spin_unlock with cache disabled

Current code skips load of spinlock address when cache is disabled. The
following call to spin_unlock stores into the random location that x0
points to.

Move spinlock address load earlier so that x0 is always valid on
spin_unlock call.

Change-Id: Iac640289725dce2518f2fed483d7d36ca748ffe8
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2 years agoMerge "fix(cpus): workaround for Cortex-X3 erratum 2615812" into integration
Lauren Wehrmeister [Mon, 28 Nov 2022 17:15:06 +0000 (18:15 +0100)]
Merge "fix(cpus): workaround for Cortex-X3 erratum 2615812" into integration

2 years agoMerge "fix(intel): fix print out ERROR when encounter SEU_Err" into integration
Sandrine Bailleux [Mon, 28 Nov 2022 14:08:25 +0000 (15:08 +0100)]
Merge "fix(intel): fix print out ERROR when encounter SEU_Err" into integration

2 years agoMerge changes I8667f362,Ia0bd832c into integration
Sandrine Bailleux [Mon, 28 Nov 2022 14:07:11 +0000 (15:07 +0100)]
Merge changes I8667f362,Ia0bd832c into integration

* changes:
  feat(intel): setup FPGA interface for Agilex
  fix(intel): fix pinmux handoff bug on Agilex

2 years agoMerge "fix(intel): fix sp_timer0 is not disabled in firewall on Agilex" into integration
Sandrine Bailleux [Mon, 28 Nov 2022 14:03:16 +0000 (15:03 +0100)]
Merge "fix(intel): fix sp_timer0 is not disabled in firewall on Agilex" into integration

2 years agoMerge "fix(intel): remove checking on TEMP and VOLT checking for HWMON" into integration
Sandrine Bailleux [Mon, 28 Nov 2022 14:02:41 +0000 (15:02 +0100)]
Merge "fix(intel): remove checking on TEMP and VOLT checking for HWMON" into integration

2 years agoMerge "fix(rss): remove null-terminator from RSS metadata" into integration
Sandrine Bailleux [Mon, 28 Nov 2022 11:46:56 +0000 (12:46 +0100)]
Merge "fix(rss): remove null-terminator from RSS metadata" into integration

2 years agofix(rss): remove null-terminator from RSS metadata
David Vincze [Fri, 4 Nov 2022 17:28:12 +0000 (18:28 +0100)]
fix(rss): remove null-terminator from RSS metadata

Remove the null-terminator of the string-like data items
from the RSS measurement's metadata. The 'version' and
'sw_type' items have an associated length value which
should not include a null-terminator when storing the
measurement.

Change-Id: Ia91ace2fff8b6f75686dd2e1862475268300bbdb
Signed-off-by: David Vincze <david.vincze@arm.com>
2 years agoMerge "fix(zynqmp): check return status of pm_get_api_version" into integration
Joanna Farley [Fri, 25 Nov 2022 15:25:53 +0000 (16:25 +0100)]
Merge "fix(zynqmp): check return status of pm_get_api_version" into integration

2 years agoMerge "fix(versal): initialize the variable with value 0 in pm code" into integration
Joanna Farley [Fri, 25 Nov 2022 15:24:53 +0000 (16:24 +0100)]
Merge "fix(versal): initialize the variable with value 0 in pm code" into integration

2 years agofix(zynqmp): check return status of pm_get_api_version
Naman Patel [Tue, 22 Nov 2022 13:01:37 +0000 (05:01 -0800)]
fix(zynqmp): check return status of pm_get_api_version

MISRA Violation: MISRA C-2012 Rule 17.7
- Check the return status of function pm_get_api_version
and return error in case of failure.

Signed-off-by: Naman Patel <naman.patel@amd.com>
Change-Id: I69fb000c04f22996da7965a09a1797c7bfaad252

2 years agofix(versal): initialize the variable with value 0 in pm code
Naman Patel [Wed, 16 Nov 2022 09:54:23 +0000 (01:54 -0800)]
fix(versal): initialize the variable with value 0 in pm code

Remove zeromem function as the array is already initialized
with value 0.

MISRA Violation: MISRA C-2012 Rule 9.1
- Initialize the array/variable with a value 0 to resolve
the misra warnings in pm_service component.

Signed-off-by: Naman Patel <naman.patel@amd.com>
Change-Id: I1a3d44a7ae4088a3034eb0119d82b99cd4617ccd

2 years agoMerge "feat(qemu): increase size of bl2" into integration
Manish Pandey [Thu, 24 Nov 2022 10:41:08 +0000 (11:41 +0100)]
Merge "feat(qemu): increase size of bl2" into integration

2 years agoMerge "fix(docs): deprecate plat_convert_pk() in v2.9" into integration
Joanna Farley [Tue, 22 Nov 2022 16:07:05 +0000 (17:07 +0100)]
Merge "fix(docs): deprecate plat_convert_pk() in v2.9" into integration

2 years agofix(intel): remove checking on TEMP and VOLT checking for HWMON
Jit Loon Lim [Thu, 6 Oct 2022 02:52:40 +0000 (10:52 +0800)]
fix(intel): remove checking on TEMP and VOLT checking for HWMON

Remove high level logic hardware channel checking on HWMON
TEMP and VOLT read.

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

2 years agofix(intel): fix sp_timer0 is not disabled in firewall on Agilex
Jit Loon Lim [Tue, 20 Sep 2022 02:41:37 +0000 (10:41 +0800)]
fix(intel): fix sp_timer0 is not disabled in firewall on Agilex

sp_timer0 is not disabled in firewall on Agilex causing Zephyr is facing
issue to access the timer.

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

2 years agofeat(intel): setup FPGA interface for Agilex
Jit Loon Lim [Wed, 15 Jun 2022 12:59:33 +0000 (14:59 +0200)]
feat(intel): setup FPGA interface for Agilex

Enable/Disable FPGA interfaces based on handoff configuration.

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

2 years agofix(intel): fix pinmux handoff bug on Agilex
Jit Loon Lim [Thu, 16 Jun 2022 20:54:01 +0000 (22:54 +0200)]
fix(intel): fix pinmux handoff bug on Agilex

Incorrect number of FPGA pinmux registers was copied from handoff data.
This caused pinmux_emac0_usefpga register to always be zero meaning
"EMAC0 uses HPS IO Pins" even if handoff data for this register was one
meaning "EMAC0 uses the FPGA Inteface".

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

2 years agofix(intel): fix print out ERROR when encounter SEU_Err
Sieu Mun Tang [Tue, 22 Nov 2022 15:22:45 +0000 (23:22 +0800)]
fix(intel): fix print out ERROR when encounter SEU_Err

Print out ERROR message when system face encounter SEU_ERR

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

2 years agofix(docs): deprecate plat_convert_pk() in v2.9
Yann Gautier [Tue, 22 Nov 2022 13:05:03 +0000 (14:05 +0100)]
fix(docs): deprecate plat_convert_pk() in v2.9

The deprecation was tagged "Next release after 2.8". Now there is a 2.9
planned, directly use this version.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I0727eebc4a3800dafafc4166b0c2c40a12c90b4b

2 years agorefactor(qemu): pass platform metadata as a function's argument
Manish V Badarkhe [Fri, 18 Nov 2022 20:43:07 +0000 (20:43 +0000)]
refactor(qemu): pass platform metadata as a function's argument

Based on the prototype modification of the event_log_measure_and_record
function in the previous patch, platform metadata was passed as an
argument.

Change-Id: I9d8316914c046f47cdc6875b16649479e82087aa
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agorefactor(imx8m): pass platform metadata as a function's argument
Manish V Badarkhe [Fri, 18 Nov 2022 20:42:44 +0000 (20:42 +0000)]
refactor(imx8m): pass platform metadata as a function's argument

Based on the prototype modification of the event_log_measure_and_record
function in the previous patch, platform metadata was passed as an
argument.

Change-Id: I4b98b6a035abb28c000344f2dbeb3996c69eee61
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agorefactor(fvp): pass platform metadata as a function's argument
Manish V Badarkhe [Fri, 18 Nov 2022 20:27:21 +0000 (20:27 +0000)]
refactor(fvp): pass platform metadata as a function's argument

Based on the prototype modification of the event_log_measure_and_record
function in the previous patch, platform metadata was passed as an
argument.

Change-Id: Id1bf59c243c483d7e32152f094c693e95d29fe2b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agorefactor(measured-boot): accept metadata as a function's argument
Manish V Badarkhe [Fri, 18 Nov 2022 18:30:08 +0000 (18:30 +0000)]
refactor(measured-boot): accept metadata as a function's argument

Updated the event log driver's function to accept metadata as an
argument, to remove the platform function usage from the event log
driver to make it a standalone driver.

Change-Id: I512cf693d51dc3c0b9d2c1bfde4f89414e273049
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agoMerge "docs(spm): update threat model" into integration
Manish Pandey [Mon, 21 Nov 2022 18:12:00 +0000 (19:12 +0100)]
Merge "docs(spm): update threat model" into integration

2 years agoMerge "docs(qemu): document steps to run in OpenCI" into integration
Manish Pandey [Mon, 21 Nov 2022 17:55:23 +0000 (18:55 +0100)]
Merge "docs(qemu): document steps to run in OpenCI" into integration

2 years agodocs(spm): update threat model
Madhukar Pappireddy [Fri, 14 Oct 2022 21:06:00 +0000 (16:06 -0500)]
docs(spm): update threat model

Update SPM threat model for possible threats, from malicious
endpoints, related to interrupt management. The mitigations
are based on the guidance provided in FF-A v1.1 EAC0 spec.

Change-Id: Ib9e26e3f1c60fe3a2734a67de1dcf1cea4883d38
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2 years agodocs(qemu): document steps to run in OpenCI
Harrison Mutai [Tue, 15 Nov 2022 18:28:18 +0000 (18:28 +0000)]
docs(qemu): document steps to run in OpenCI

Add details on how to run QEMU in OpenCI, and what tests are currently
supported.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I291e4eb64a58c766519ff7dcac4841ae75c3934e

2 years agoMerge "fix(intel): fix UART baud rate and clock" into integration
Sandrine Bailleux [Mon, 21 Nov 2022 13:57:10 +0000 (14:57 +0100)]
Merge "fix(intel): fix UART baud rate and clock" into integration

2 years agofix(intel): fix UART baud rate and clock
Sieu Mun Tang [Fri, 1 Jul 2022 01:08:57 +0000 (09:08 +0800)]
fix(intel): fix UART baud rate and clock

Revise the UART baud rate and clock for general platform build,
SIMIC build and EMU build.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I62fefe7b96d5124e75d2810b4fbc1640422b1353

2 years agoMerge "docs(changelog): changelog for v2.8 release" into integration
Manish Pandey [Fri, 18 Nov 2022 17:28:52 +0000 (18:28 +0100)]
Merge "docs(changelog): changelog for v2.8 release" into integration

2 years agoMerge "fix(docs): add v2.9 release schedule" into integration
Joanna Farley [Fri, 18 Nov 2022 16:47:14 +0000 (17:47 +0100)]
Merge "fix(docs): add v2.9 release schedule" into integration

2 years agofix(docs): add v2.9 release schedule
Joanna Farley [Fri, 18 Nov 2022 00:33:16 +0000 (02:33 +0200)]
fix(docs): add v2.9 release schedule

Signed-off-by: Joanna Farley <Joanna.Farley@arm.com>
Change-Id: I082461d7d21f63e3b8cbee37e8f01b8128e4b5a0

2 years agoMerge changes I97687f18,I91d5718b into integration
Olivier Deprez [Thu, 17 Nov 2022 10:14:05 +0000 (11:14 +0100)]
Merge changes I97687f18,I91d5718b into integration

* changes:
  docs(spm): interrupt handling guidance FF-A v1.1 EAC0
  docs(spm): partition runtime model and schedule modes

2 years agofix(cpus): workaround for Cortex-X3 erratum 2615812
Harrison Mutai [Fri, 11 Nov 2022 14:09:55 +0000 (14:09 +0000)]
fix(cpus): workaround for Cortex-X3 erratum 2615812

Cortex-X3 erratum 2615812 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r1p1, and is still open. The workaround is to disable
the use of the Full Retention power mode in the core (setting
WFI_RET_CTRL and WFE_RET_CTRL in CORTEX_X3_IMP_CPUPWRCTLR_EL1 to 0b000).

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2055130/latest

Change-Id: I5ad66df3e18fc85a6b23f6662239494ee001d82f
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2 years agoMerge changes from topic "ja/spm_doc" into integration
Olivier Deprez [Thu, 17 Nov 2022 09:04:49 +0000 (10:04 +0100)]
Merge changes from topic "ja/spm_doc" into integration

* changes:
  docs(spm): ff-a v1.1 indirect message
  docs(spm): s-el0 partition support update

2 years agofeat(qemu): increase size of bl2
Leo Yan [Wed, 16 Nov 2022 06:52:50 +0000 (14:52 +0800)]
feat(qemu): increase size of bl2

Increases BL2 size to have room to enable security features (like
measurement and TPM).

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Change-Id: Iba5e8923e2e154315499e9bfce2e0aff0ccc8f95

2 years agodocs(spm): interrupt handling guidance FF-A v1.1 EAC0
Madhukar Pappireddy [Mon, 3 Oct 2022 23:09:32 +0000 (18:09 -0500)]
docs(spm): interrupt handling guidance FF-A v1.1 EAC0

This patch documents the actions taken by Hafnium SPMC in response
to non-secure and secure interrupts.

Change-Id: I97687f188ca97aeb255e3e5b55d44ddf5d66b6e0
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2 years agodocs(changelog): changelog for v2.8 release
laurenw-arm [Tue, 15 Nov 2022 16:15:34 +0000 (10:15 -0600)]
docs(changelog): changelog for v2.8 release

Change-Id: I1d99ea46ad527993ee786c34a67f94d74470f960
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2 years agodocs(spm): partition runtime model and schedule modes
Madhukar Pappireddy [Mon, 3 Oct 2022 19:26:48 +0000 (14:26 -0500)]
docs(spm): partition runtime model and schedule modes

This patch documents the support for partition runtime models, call
chains and schedule modes in Hafnium SPMC.

Change-Id: I91d5718bb2c21d475499e402f6f27076930336cb
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2 years agoMerge "docs(marvell): fix typo 8K => A8K" into integration
Madhukar Pappireddy [Wed, 16 Nov 2022 17:13:48 +0000 (18:13 +0100)]
Merge "docs(marvell): fix typo 8K => A8K" into integration

2 years agodocs(spm): ff-a v1.1 indirect message
J-Alves [Wed, 26 Oct 2022 12:46:37 +0000 (13:46 +0100)]
docs(spm): ff-a v1.1 indirect message

Update secure partition manager documentation to include
FF-A v1.1 indirect messaging implementation.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ifbca45347f775080ef98ac896d31650204318ba4

2 years agoMerge changes If90a18ee,I02e88f8c,Iea447fb5,Ie0570481,Ieeb14cfc into integration
Manish V Badarkhe [Wed, 16 Nov 2022 15:18:54 +0000 (16:18 +0100)]
Merge changes If90a18ee,I02e88f8c,Iea447fb5,Ie0570481,Ieeb14cfc into integration

* changes:
  docs: add top level section numbering
  docs(build): clarify getting started section
  docs(build): clarify docs building instructions
  fix(docs): prevent a sphinx warning
  fix(docs): prevent a virtual environment from failing a build

2 years agoMerge "docs(spm): update FF-A manifest binding" into integration
Olivier Deprez [Wed, 16 Nov 2022 14:39:08 +0000 (15:39 +0100)]
Merge "docs(spm): update FF-A manifest binding" into integration

2 years agodocs: add top level section numbering
Boyan Karatotev [Thu, 27 Oct 2022 14:12:36 +0000 (15:12 +0100)]
docs: add top level section numbering

Top level sections are not numbered. Adding numbers makes referring to
sections easier. For example the Maintainers page changes from
"about/3.1" to simply "1.3.1".

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

2 years agodocs(build): clarify getting started section
Boyan Karatotev [Thu, 27 Oct 2022 13:47:18 +0000 (14:47 +0100)]
docs(build): clarify getting started section

The Getting started section is very difficult to follow. Building the
fip comes before building the files it needs, the BL33 requirement is
given in a somewhat hand wavy way, and the Arm Developer website
download provides a lot of targets and the guide is not clear which ones
are needed on download.

Swapping the initial build and supporting tools sections makes the flow
more natural and the supporting tools section then becomes clear.
Explicitly mentioning the GCC targets avoids confusion for people less
familiar with the project (eg. new starters).

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

2 years agodocs(build): clarify docs building instructions
Boyan Karatotev [Thu, 27 Oct 2022 12:55:12 +0000 (13:55 +0100)]
docs(build): clarify docs building instructions

Using virtual environments with pip is a generally recommended good
practice but the docs do not acknowledge it. As a result fresh installs
might fail builds due to missing $PATH entries. The Prerequisites
section is also a bit verbose which is difficult to read.

This patch adds the virtual environment mention and clarifies wording.

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

2 years agofix(docs): prevent a sphinx warning
Boyan Karatotev [Thu, 27 Oct 2022 10:56:40 +0000 (11:56 +0100)]
fix(docs): prevent a sphinx warning

Some newer versions of sphinx (tried on v5.3) will warn about language
being None which will fail the build. Change it to the default (en) to
prevent this.

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

2 years agofix(docs): prevent a virtual environment from failing a build
Boyan Karatotev [Thu, 27 Oct 2022 10:28:23 +0000 (11:28 +0100)]
fix(docs): prevent a virtual environment from failing a build

sphinx-build is passed a blanket "." to build all docs. However, if a
virtual environment is placed within the docs directory, sphinx will try
to build it which will fail due to some weird files it has.

This excludes the most common virtual environment directories from the
build to prevent this.

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

2 years agoMerge "fix(zynqmp): resolve coverity warnings" into integration
Joanna Farley [Wed, 16 Nov 2022 00:04:17 +0000 (01:04 +0100)]
Merge "fix(zynqmp): resolve coverity warnings" into integration

2 years agofix(zynqmp): resolve coverity warnings
HariBabu Gattem [Fri, 7 Oct 2022 07:07:49 +0000 (00:07 -0700)]
fix(zynqmp): resolve coverity warnings

Fix for coverity issues in pm_service component.
Fixed compilation error for versal platform.

Change-Id: I948f01807e67ad1e41021557e040dcbfb7b3a39e
Signed-off-by: HariBabu Gattem <haribabu.gattem@amd.com>
Signed-off-by: Naman Patel <naman.patel@amd.com>
2 years agoMerge "fix(docs): unify referenced Ubuntu versions" into integration
Madhukar Pappireddy [Tue, 15 Nov 2022 21:25:46 +0000 (22:25 +0100)]
Merge "fix(docs): unify referenced Ubuntu versions" into integration

2 years agofix(docs): unify referenced Ubuntu versions
Boyan Karatotev [Tue, 15 Nov 2022 17:39:22 +0000 (17:39 +0000)]
fix(docs): unify referenced Ubuntu versions

Documentation is inconsistent when referring to Ubuntu versioning.
Change this to a single reference that is consistent with the stated
version for TF-A tests.

The change was tested with a full build on a clean install of Ubuntu 20.04.

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

2 years agoMerge "fix(rockchip): align fdt buffer on 8 bytes" into integration
Manish Pandey [Tue, 15 Nov 2022 11:18:39 +0000 (12:18 +0100)]
Merge "fix(rockchip): align fdt buffer on 8 bytes" into integration

2 years agodocs(spm): s-el0 partition support update
J-Alves [Wed, 26 Oct 2022 10:00:28 +0000 (11:00 +0100)]
docs(spm): s-el0 partition support update

S-EL0 partitions already support indirect messaging and notifications
so add that to supported features.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I08e04593653ba38a2b82395f6f2d3ca7b212d494

2 years agofix(rockchip): align fdt buffer on 8 bytes
Quentin Schulz [Mon, 14 Nov 2022 16:40:33 +0000 (17:40 +0100)]
fix(rockchip): align fdt buffer on 8 bytes

Since commit 94b2f94bd632 ("feat(libfdt): upgrade libfdt source files"),
8-byte alignment of the FDT address is enforced to follow the DT
standard.

Rockchip implementation of params_early_setup loads the FDT address as
passed by the bootloader into a buffer. This buffer is currently made of
uint8_t which means it is not 8-byte aligned and might result in
fdt_open_into failing.

Instead, let's make this buffer uint64_t to make it 8-byte aligned.

Cc: Quentin Schulz <foss+tf-a@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Change-Id: Ifcf0e0cf4000e3661d76d3c3a2fe3921f7fe44b9

2 years agoMerge changes I256959d7,I721376bf into integration
Manish Pandey [Mon, 14 Nov 2022 14:54:27 +0000 (15:54 +0100)]
Merge changes I256959d7,I721376bf into integration

* changes:
  fix(cpus): remove plat_can_cmo check for aarch32
  fix(cpus): update doc and check for plat_can_cmo

2 years agoMerge "refactor(stm32mp1): remove STM32MP_USE_STM32IMAGE" into integration
Manish Pandey [Mon, 14 Nov 2022 14:40:06 +0000 (15:40 +0100)]
Merge "refactor(stm32mp1): remove STM32MP_USE_STM32IMAGE" into integration

2 years agofix(cpus): remove plat_can_cmo check for aarch32
Okash Khawaja [Mon, 14 Nov 2022 13:02:12 +0000 (13:02 +0000)]
fix(cpus): remove plat_can_cmo check for aarch32

We don't need CONDITIONAL_CMO for aarch32 so let's remove it.

Signed-off-by: Okash Khawawja <okash@google.com>
Change-Id: I256959d7005df21a850ff7791c8188ea01f5c53b

2 years agofix(cpus): update doc and check for plat_can_cmo
Okash Khawaja [Mon, 14 Nov 2022 12:50:30 +0000 (12:50 +0000)]
fix(cpus): update doc and check for plat_can_cmo

plat_can_cmo must not clobber x1 but the doc doesn't mention that. This
patch updates the doc to mention x1. It also adds check for plat_can_cmo
to `dcsw_op_louis` which was missed out in original patch.

Signed-off-by: Okash Khawaja <okash@google.com>
Change-Id: I721376bf3726520d0d5b0df0f33f98ce92257287

2 years agorefactor(stm32mp1): remove STM32MP_USE_STM32IMAGE
Yann Gautier [Mon, 14 Nov 2022 13:14:48 +0000 (14:14 +0100)]
refactor(stm32mp1): remove STM32MP_USE_STM32IMAGE

The code managing legacy boot (without FIP) that was under
STM32MP_USE_STM32IMAGE flag is remove.

Change-Id: I04452453ed84567b0de39e900594a81526562259
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2 years agoMerge changes from topic "stm32mp1-trusted-boot" into integration
Manish Pandey [Mon, 14 Nov 2022 13:11:55 +0000 (14:11 +0100)]
Merge changes from topic "stm32mp1-trusted-boot" into integration

* changes:
  docs(st): update documentation for TRUSTED_BOARD_BOOT
  fix(build): ensure that the correct rule is called for tools
  feat(stm32mp1): add the platform specific build for tools
  fix(stm32mp13-fdts): remove secure status
  feat(stm32mp1-fdts): add CoT and fuse references for authentication
  feat(stm32mp1): add a check on TRUSTED_BOARD_BOOT with secure chip
  feat(stm32mp1): add the decryption support
  feat(stm32mp1): add the TRUSTED_BOARD_BOOT support
  feat(stm32mp1): update ROM code API for header v2 management
  feat(stm32mp1): remove unused function from boot API
  refactor(stm32mp1): remove authentication using STM32 image mode
  fix(fconf): fix type error displaying disable_auth
  feat(tbbr): increase PK_DER_LEN size
  fix(auth): correct sign-compare warning
  feat(auth): allow to verify PublicKey with platform format PK
  feat(cert-create): update for ECDSA brainpoolP256r/t1 support
  feat(stm32mp1): add RNG initialization in BL2 for STM32MP13
  feat(st-crypto): remove BL32 HASH driver usage
  feat(stm32mp1): add a stm32mp crypto library
  feat(st-crypto): add STM32 RNG driver
  feat(st-crypto): add AES decrypt/auth by SAES IP
  feat(st-crypto): add ECDSA signature check with PKA
  feat(st-crypto): update HASH for new hardware version used in STM32MP13

2 years agodocs(st): update documentation for TRUSTED_BOARD_BOOT
Lionel Debieve [Thu, 6 Oct 2022 07:00:14 +0000 (09:00 +0200)]
docs(st): update documentation for TRUSTED_BOARD_BOOT

Update the documentation to indicate commands needed for
TRUSTED_BOARD_BOOT management.

Change-Id: I7b8781eaa7f8b6b8d675a625c7ff2e1ee767222a
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofix(build): ensure that the correct rule is called for tools
Lionel Debieve [Mon, 14 Nov 2022 10:05:09 +0000 (11:05 +0100)]
fix(build): ensure that the correct rule is called for tools

In case of platform specific usage for both fiptool or certtool,
we need to ensure that the Makefile will use the correct rule
to generate the binary. Add the explicit call to the "all" rule.

Change-Id: I9724b63e01b3497daaedb9365c7d6a494aac9561
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): add the platform specific build for tools
Lionel Debieve [Thu, 6 Oct 2022 06:54:23 +0000 (08:54 +0200)]
feat(stm32mp1): add the platform specific build for tools

Add cert_create and fiptool specific files to add the platform
addons to the generic tools.

Change-Id: Ifa600241cdf32b495cc65edccddab47c3796b77d
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofix(stm32mp13-fdts): remove secure status
Lionel Debieve [Thu, 6 Oct 2022 06:52:30 +0000 (08:52 +0200)]
fix(stm32mp13-fdts): remove secure status

Remove the secure status for PKA and SAES entries.
The peripherals are used in BL2 at EL3, context will
remain secure only.

Change-Id: I79d95bc55a9afd27f295249936d7bc332c777f5e
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1-fdts): add CoT and fuse references for authentication
Lionel Debieve [Thu, 6 Oct 2022 06:51:32 +0000 (08:51 +0200)]
feat(stm32mp1-fdts): add CoT and fuse references for authentication

Add the stm32mp1 CoT description file. Include the TRUSTED_BOARD_BOOT
entry in the platform device tree file.
Add the missing public root key reference for stm32mp15 and the
encryption key reference for stm32mp13.

Change-Id: I0ae2454979a3df6dd3e4361510317742e8fbc109
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): add a check on TRUSTED_BOARD_BOOT with secure chip
Lionel Debieve [Wed, 5 Oct 2022 14:52:09 +0000 (16:52 +0200)]
feat(stm32mp1): add a check on TRUSTED_BOARD_BOOT with secure chip

Add a security check to enforce the usage of TRUSTED_BOARD_BOOT
on closed device. It will guarantee the secure bootchain.

Change-Id: Id6120d0e5041e8f2d3866e5710876ec96b6d0216
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): add the decryption support
Lionel Debieve [Wed, 5 Oct 2022 14:51:12 +0000 (16:51 +0200)]
feat(stm32mp1): add the decryption support

Add the decryption support for STM32MP1 binaries.
Decryption is limited to the BL32 loaded images.

Limitation: STM32MP15 doesn't support the feature.

Change-Id: I96800bac7b22109f8471eb2953fc0dc269fc4fd1
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): add the TRUSTED_BOARD_BOOT support
Lionel Debieve [Wed, 5 Oct 2022 14:47:03 +0000 (16:47 +0200)]
feat(stm32mp1): add the TRUSTED_BOARD_BOOT support

Add the support of the TRUSTED_BOARD_BOOT to authenticate the loaded
FIP using platform CoT management.
It adds TBB platform definition, redefining the standard image ID in
order to decrease requested size in BL2 binary.
Authentication will use mbedTLS library for parsing certificate
configured with a platform configuration.

Change-Id: I9da66b915c5e9e9293fccfce92bef2434da1e430
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): update ROM code API for header v2 management
Lionel Debieve [Wed, 5 Oct 2022 14:31:28 +0000 (16:31 +0200)]
feat(stm32mp1): update ROM code API for header v2 management

Add the new definition field for authentication used in header V2
on STM32MP13.

Change-Id: Id8f0c2584ca9b74b0d21d82c9a98d286500548c4
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): remove unused function from boot API
Lionel Debieve [Wed, 5 Oct 2022 14:29:38 +0000 (16:29 +0200)]
feat(stm32mp1): remove unused function from boot API

Remove old library access from ROM library that is no more
used.

Change-Id: I9b91f1efd6ff9d311b69ca36f60474f01268c221
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agorefactor(stm32mp1): remove authentication using STM32 image mode
Lionel Debieve [Wed, 5 Oct 2022 14:22:07 +0000 (16:22 +0200)]
refactor(stm32mp1): remove authentication using STM32 image mode

Remove deprecated authentication mode to use the FIP authentication
based on TBBR requirements. It will use the new crypto library.

Change-Id: I95c7baa64ba42c370ae136f59781f2a7a4c7f507
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofix(fconf): fix type error displaying disable_auth
Lionel Debieve [Wed, 5 Oct 2022 09:40:15 +0000 (11:40 +0200)]
fix(fconf): fix type error displaying disable_auth

disable_auth is defined as uint32_t and must be displayed
as an unsigned int.

lib/fconf/fconf_tbbr_getter.c:
In function ‘fconf_populate_tbbr_dyn_config’:
include/common/debug.h:46:41: error:
format ‘%d’ expects argument of type ‘int’, but argument 3 has
 type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=]
   46 | #define LOG_MARKER_WARNING              "\x1e"  /* 30 */
      |                                         ^~~~~~
include/common/debug.h:77:32: note:
 in expansion of macro ‘LOG_MARKER_WARNING’
   77 | # define WARN(...) tf_log(LOG_MARKER_WARNING __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~~
lib/fconf/fconf_tbbr_getter.c:47:17: note:
in expansion of macro ‘WARN’
   47 |                 WARN("Invalid value for `%s` cell %d\n",
      |                 ^~~~
include/common/debug.h:48:41: error:
format ‘%d’ expects argument of type ‘int’, but argument 5 has
 type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=]
   48 | #define LOG_MARKER_VERBOSE              "\x32"  /* 50 */
      |                                         ^~~~~~
include/common/debug.h:58:32: note:
in definition of macro ‘no_tf_log’
   58 |                 tf_log(fmt, ##__VA_ARGS__);     \
      |                        ^~~
include/common/debug.h:91:35: note:
in expansion of macro ‘LOG_MARKER_VERBOSE’
   91 | # define VERBOSE(...)
      |           no_tf_log(LOG_MARKER_VERBOSE __VA_ARGS__)
      |                     ^~~~~~~~~~~~~~~~~~
lib/fconf/fconf_tbbr_getter.c:74:9: note:
in expansion of macro ‘VERBOSE’
   74 |    VERBOSE("%s%s%s %d\n","FCONF: `tbbr.", "disable_auth",
      |    ^~~~~~~
cc1: all warnings being treated as errors

Change-Id: I0164ddfe511406cc1a8d014a368ef3e3c5f8cd27
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(tbbr): increase PK_DER_LEN size
Nicolas Toromanoff [Tue, 17 Nov 2020 09:03:40 +0000 (10:03 +0100)]
feat(tbbr): increase PK_DER_LEN size

Public key brainpool ECDSA DER certificate are 92 byte long.
OID for brainpool curve are 1 byte bigger than the one for NIST curve.

Change-Id: Ifad51da3c576d555da9fc519d2df3d9a0e6ed91b
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
2 years agofix(auth): correct sign-compare warning
Nicolas Toromanoff [Wed, 23 Dec 2020 15:01:25 +0000 (16:01 +0100)]
fix(auth): correct sign-compare warning

Correct the warning due to comparison between signed and
unsigned variable.

drivers/auth/mbedtls/mbedtls_x509_parser.c: In function 'get_ext':
drivers/auth/mbedtls/mbedtls_x509_parser.c:120:30:
error: comparison of integer expressions of different
signedness: 'int' and 'size_t' {aka 'unsigned int'}
[-Werror=sign-compare]
120 | if ((oid_len == strlen(oid_str)) && !strcmp(oid, oid_str)) {
    |              ^~

Change-Id: Ic12527f5f92a34e925bee3047c168eacf5e99d8a
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
2 years agofeat(auth): allow to verify PublicKey with platform format PK
Nicolas Toromanoff [Mon, 9 Nov 2020 11:14:52 +0000 (12:14 +0100)]
feat(auth): allow to verify PublicKey with platform format PK

In some platform the digest of the public key saved in the OTP is not
the digest of the exact same public key buffer needed to check the
signature. Typically, platform checks signature using the DER ROTPK
whereas some others add some related information. Add a new platform
weak function to transform the public key buffer used by
verify_signature to a platform specific public key.

Mark this new weak function as deprecated as it will be replaced
by another framework implementation.

Change-Id: I71017b41e3eca9398cededf317ad97e9b511be5f
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(cert-create): update for ECDSA brainpoolP256r/t1 support
Lionel Debieve [Mon, 14 Nov 2022 10:03:42 +0000 (11:03 +0100)]
feat(cert-create): update for ECDSA brainpoolP256r/t1 support

Updated cert_tool to be able to select brainpool P256r/t1
or NIST prim256v1 curve for certificates signature.

Change-Id: I6e800144697069ea83660053b8ba6e21c229243a
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agoMerge changes I5838964f,Id752c1cc,Idd42d5a2,Iff4680cd,I2b1801a7, ... into integration
Manish Pandey [Mon, 14 Nov 2022 10:17:27 +0000 (11:17 +0100)]
Merge changes I5838964f,Id752c1cc,Idd42d5a2,Iff4680cd,I2b1801a7, ... into integration

* changes:
  fix(mt8188): add mmap entry for CPU idle SRAM
  fix(mt8188): refine gic init flow after system resume
  fix(mt8186): fix the DRAM voltage after the system resumes
  feat(mt8188): add audio support
  refactor(mt8195): use ptp3 common drivers
  feat(mt8188): add support for PTP3
  feat(mt8188): enable MTK_PUBEVENT_ENABLE

2 years agofeat(stm32mp1): add RNG initialization in BL2 for STM32MP13
Nicolas Le Bayon [Wed, 2 Dec 2020 15:23:49 +0000 (16:23 +0100)]
feat(stm32mp1): add RNG initialization in BL2 for STM32MP13

Initialize RNG driver at platform level for STM32MP13.

Change-Id: I64832de43e5f6559a12e26680142db54c88f0b9e
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@foss.st.com>
2 years agofeat(st-crypto): remove BL32 HASH driver usage
Lionel Debieve [Tue, 4 Oct 2022 12:28:57 +0000 (14:28 +0200)]
feat(st-crypto): remove BL32 HASH driver usage

Remove unused mode for HASH driver. The driver will only be
used in BL2 scope.

Change-Id: I1fce09cdaa9da0c11554ac5f73433b4bee776011
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(stm32mp1): add a stm32mp crypto library
Lionel Debieve [Wed, 5 Oct 2022 14:16:50 +0000 (16:16 +0200)]
feat(stm32mp1): add a stm32mp crypto library

Add the crypto library for STM32MP1 to use STM32 hardware
accelerators.

Change-Id: I0bbb941001242a6fdc47514ab3efe07b12249285
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(st-crypto): add STM32 RNG driver
Yann Gautier [Thu, 18 Apr 2019 12:47:35 +0000 (14:47 +0200)]
feat(st-crypto): add STM32 RNG driver

This driver manages the STM32 Random Number Generator
peripheral.

Change-Id: I4403ebb2dbdaa8df993a4413f1ef48eeba00427c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofeat(st-crypto): add AES decrypt/auth by SAES IP
Nicolas Toromanoff [Fri, 18 Sep 2020 07:19:11 +0000 (09:19 +0200)]
feat(st-crypto): add AES decrypt/auth by SAES IP

Add code to be able to use STMicroelectronics SAES IP. This driver
can manage many AES algorithms (CBC, ECB, CCM, GCM). It will be used
by the authenticated decryption framework (AES-GCM only).

Change-Id: Ibd4030719fb12877dcecd5d2c395d13b4b15c260
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
2 years agofeat(st-crypto): add ECDSA signature check with PKA
Nicolas Toromanoff [Wed, 30 Sep 2020 15:36:45 +0000 (17:36 +0200)]
feat(st-crypto): add ECDSA signature check with PKA

Add code to be able to use STMicroelectronics PKA peripheral
in the authentication framework.

Change-Id: Ifeafe84c68db483cd18674f2280576cc065f92ee
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
2 years agofeat(st-crypto): update HASH for new hardware version used in STM32MP13
Nicolas Toromanoff [Tue, 22 Dec 2020 12:54:51 +0000 (13:54 +0100)]
feat(st-crypto): update HASH for new hardware version used in STM32MP13

Introduce new flag to manage hardware version.
STM32MP15 currently uses the HASH_V2 and STM32MP13 uses the HASH_V4.
For STM32_HASH_V4: remove MD5 algorithm (no more supported) and
add SHA384 and SHA512.

For STM32_HASH_V2: no change.

Change-Id: I3a9ae9e38249a2421c657232cb0877004d04dae1
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
2 years agofix(mt8188): add mmap entry for CPU idle SRAM
Liju-Clr Chen [Fri, 11 Nov 2022 01:51:51 +0000 (09:51 +0800)]
fix(mt8188): add mmap entry for CPU idle SRAM

CPU PM driver accesses CPU idle SRAM during the system suspend
process. The region of CPU idle SRAM needs to be added as mmap entry.
Otherwise, the execption would occur.

BUG=b:244215539
TEST=Test of suspend resume passes.

Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com>
Change-Id: I5838964fd9cb1b833e4006e2123febb4a4601003

2 years agofix(mt8188): refine gic init flow after system resume
James Liao [Fri, 23 Sep 2022 08:37:59 +0000 (16:37 +0800)]
fix(mt8188): refine gic init flow after system resume

Call gicv3_distif_init() instead of mt_gic_init() in
armv8_2_mcusys_pwr_on_common(). This is to prevent
gicv3_rdistif_init() and gicv3_cpuif_enable() from being called twice
in the power-on flow. gicv3_rdistif_init() and gicv3_cpuif_enable()
are called in later armv8_2_cpu_pwr_on_common().

BUG=b:244215539
TEST=Suspend Resume Test pass

Change-Id: Id752c1ccbb9eab277ed6278c2dd90a051a894146
Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com>
2 years agofix(mt8186): fix the DRAM voltage after the system resumes
Allen-KH Cheng [Tue, 8 Nov 2022 10:40:27 +0000 (18:40 +0800)]
fix(mt8186): fix the DRAM voltage after the system resumes

The DRAM power supply must sustain at 0.8V after the system resumes.
Otherwise, unexpected errors would occur. Therefore, we update the
DRAM voltage to 0.8v in PMIC voltage wrap table.

BUG=b:253537849
TEST=Suspend Resume Test

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.corp-partner.google.com>
Change-Id: Idd42d5a2d646468822e391e48d01d870c3b7f0d3

2 years agofeat(mt8188): add audio support
Trevor Wu [Tue, 20 Sep 2022 06:50:36 +0000 (14:50 +0800)]
feat(mt8188): add audio support

For MT8188, MTK_AUDIO_SMC_OP_DOMAIN_SIDEBANDS is required for normal
mode switch.
  - Add audio common code and chip specific code.
  - Add new id (MTK_SIP_AUDIO_CONTROL) to mtk_sip_def.h.
  - Enable for MT8188.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Change-Id: Iff4680cd0b520b2b519ecf30ecafe100f147cc62

2 years agorefactor(mt8195): use ptp3 common drivers
Liju-Clr Chen [Thu, 3 Nov 2022 11:49:23 +0000 (19:49 +0800)]
refactor(mt8195): use ptp3 common drivers

Some 8195 ptp3 drivers are the same in plat/mediatek/drivers/ptp3, so
add this patch to reuse them.

Change-Id: I2b1801a73b6a2979e20d49d314c57f663dc5bf04
Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com>
2 years agofeat(mt8188): add support for PTP3
Riven Chen [Mon, 17 Oct 2022 05:11:27 +0000 (13:11 +0800)]
feat(mt8188): add support for PTP3

Add PTP3 driver to protect CPU from excessive voltage drop in CPU
heavy loading.

Signed-off-by: Riven Chen <riven.chen@mediatek.corp-partner.google.com>
Change-Id: I394096be43e1d1d615f99b22f38f0b3ae0bb40c1

2 years agofeat(mt8188): enable MTK_PUBEVENT_ENABLE
Rex-BC Chen [Fri, 14 Oct 2022 08:19:25 +0000 (16:19 +0800)]
feat(mt8188): enable MTK_PUBEVENT_ENABLE

Enable MTK_PUBEVENT_ENABLE for subscribing CPUPM events. This
patch also corrects the header file naming.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Iabd89a4ead21ccafa833390367484bfea5d351f6

2 years agoMerge "refactor(security): add OpenSSL 1.x compatibility" into integration
Manish V Badarkhe [Fri, 11 Nov 2022 18:59:58 +0000 (19:59 +0100)]
Merge "refactor(security): add OpenSSL 1.x compatibility" into integration

2 years agorefactor(security): add OpenSSL 1.x compatibility
Juan Pablo Conde [Tue, 25 Oct 2022 23:41:02 +0000 (19:41 -0400)]
refactor(security): add OpenSSL 1.x compatibility

When updated to work with OpenSSL 3.0, the host tools lost their
compatibility with previous versions (1.x) of OpenSSL. This is
mainly due to the fact that 1.x APIs became deprecated in 3.0 and
therefore their use cause compiling errors. In addition, updating
for a newer version of OpenSSL meant improving the stability
against security threats. However, although version 1.1.1 is
now deprecated, it still receives security updates, so it would
not imply major security issues to keep compatibility with it too.

This patch adds backwards compatibility with OpenSSL 1.x versions
by adding back 1.x API code. It defines a macro USING_OPENSSL3,
which will select the appropriate OpenSSL API version depending on
the OpenSSL library path chosen (which is determined by the
already-existing OPENSSL_DIR variable).

In addition, cleanup items were packed in functions and moved to
the proper modules in order to make the code more maintainable and
legible.

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

2 years agoMerge "fix(docs): add LTS maintainers" into integration
Manish Pandey [Fri, 11 Nov 2022 17:40:39 +0000 (18:40 +0100)]
Merge "fix(docs): add LTS maintainers" into integration

2 years agoMerge "feat(cpus): make cache ops conditional" into integration
Bipin Ravi [Fri, 11 Nov 2022 16:49:20 +0000 (17:49 +0100)]
Merge "feat(cpus): make cache ops conditional" into integration