]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofeat(intel): implement timer init divider via cpu frequency. (#1)
BenjaminLimJL [Wed, 6 Apr 2022 02:19:16 +0000 (10:19 +0800)]
feat(intel): implement timer init divider via cpu frequency. (#1)

Get cpu frequency and update the timer init div with it.
The timer is vary based on the cpu frequency instead of hardcoded.
The implementation shall apply to only Agilex and S10

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

3 years agoMerge "fix(st): fix NULL pointer dereference issues" into integration
Sandrine Bailleux [Fri, 6 May 2022 14:53:24 +0000 (16:53 +0200)]
Merge "fix(st): fix NULL pointer dereference issues" into integration

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Fri, 6 May 2022 13:58:03 +0000 (15:58 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(spmc): enable checking of execution ctx count
  feat(spmc): enable parsing of UUID from SP Manifest
  feat(spmc): add partition mailbox structs
  feat(plat/arm): allow BL32 specific defines to be used by SPMC_AT_EL3
  feat(plat/fvp): add EL3 SPMC #defines
  test(plat/fvp/lsp): add example logical partition
  feat(spmc/lsp): add logical partition framework

3 years agoMerge changes from topic "xlnx_zynqmp_misra" into integration
Manish Pandey [Fri, 6 May 2022 13:51:25 +0000 (15:51 +0200)]
Merge changes from topic "xlnx_zynqmp_misra" into integration

* changes:
  fix(zynqmp): resolve misra R14.4 warnings
  fix(zynqmp): resolve misra R16.3 warnings
  fix(zynqmp): resolve misra R15.7 warnings
  fix(zynqmp): resolve misra R15.6 warnings
  fix(zynqmp): resolve misra 7.2 warnings
  fix(zynqmp): resolve misra R10.3

3 years agoMerge "feat(brbe): add BRBE support for NS world" into integration
Manish Pandey [Fri, 6 May 2022 10:46:03 +0000 (12:46 +0200)]
Merge "feat(brbe): add BRBE support for NS world" into integration

3 years agoMerge changes from topic "ja/boot_protocol" into integration
Olivier Deprez [Fri, 6 May 2022 09:52:55 +0000 (11:52 +0200)]
Merge changes from topic "ja/boot_protocol" into integration

* changes:
  fix(sptool): update Optee FF-A manifest
  feat(sptool): delete c version of the sptool
  feat(sptool): use python version of sptool
  feat(sptool): python version of the sptool
  refactor(sptool): use SpSetupActions in sp_mk_generator.py
  feat(sptool): add python SpSetupActions framework

3 years agofix(st): fix NULL pointer dereference issues
Yann Gautier [Fri, 6 May 2022 07:50:43 +0000 (09:50 +0200)]
fix(st): fix NULL pointer dereference issues

The get_bl_mem_params_node() function could return NULL. Add asserts to
check the return value is not NULL.
This corrects coverity issues:
pager_mem_params = get_bl_mem_params_node(BL32_EXTRA1_IMAGE_ID);
>>>     CID 378360:    (NULL_RETURNS)
>>>     Dereferencing "pager_mem_params", which is known to be "NULL".

paged_mem_params = get_bl_mem_params_node(BL32_EXTRA2_IMAGE_ID);
>>>     CID 378360:    (NULL_RETURNS)
>>>     Dereferencing "paged_mem_params", which is known to be "NULL".

tos_fw_mem_params = get_bl_mem_params_node(TOS_FW_CONFIG_ID);
>>>     CID 378360:    (NULL_RETURNS)
>>>     Dereferencing "tos_fw_mem_params", which is known to be "NULL".

Do the same for other occurrences of get_bl_mem_params_node() return not
checked, in the functions plat_get_bl_image_load_info() and
bl2_plat_handle_pre_image_load().

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

3 years agofix(zynqmp): resolve misra R14.4 warnings
Venkatesh Yadav Abbarapu [Wed, 4 May 2022 08:57:56 +0000 (14:27 +0530)]
fix(zynqmp): resolve misra R14.4 warnings

MISRA Violation: MISRA-C:2012 R.14.4
The controlling expression of an if statement and the controlling
expression of an iteration-statement shall have essentially Boolean type.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I8f3f6f956d1d58ca201fb5895f12bcaabf2afd3b

3 years agofix(zynqmp): resolve misra R16.3 warnings
Venkatesh Yadav Abbarapu [Fri, 29 Apr 2022 09:47:13 +0000 (15:17 +0530)]
fix(zynqmp): resolve misra R16.3 warnings

MISRA Violation: MISRA-C:2012 R.16.3
- An unconditional break statement shall terminate every switch-clause.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I96a8b627c593ff1293b725d443531e42368923c5

3 years agofix(zynqmp): resolve misra R15.7 warnings
Venkatesh Yadav Abbarapu [Wed, 4 May 2022 08:53:32 +0000 (14:23 +0530)]
fix(zynqmp): resolve misra R15.7 warnings

MISRA Violation: MISRA-C:2012 R.15.7
- All if . . else if constructs shall be terminated
with an else statement.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: If921ca7c30b2feea6535791aa15f4de7101c3134

3 years agofix(zynqmp): resolve misra R15.6 warnings
Venkatesh Yadav Abbarapu [Fri, 29 Apr 2022 08:22:00 +0000 (13:52 +0530)]
fix(zynqmp): resolve misra R15.6 warnings

MISRA Violation: MISRA-C:2012 R.15.6
- The body of an iteration-statement or a selection-statement shall be
  a compound statement.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I0fc8eeac0e592f00297a1ac42a1ba3df1144733b

3 years agofix(zynqmp): resolve misra 7.2 warnings
Venkatesh Yadav Abbarapu [Fri, 29 Apr 2022 04:28:30 +0000 (09:58 +0530)]
fix(zynqmp): resolve misra 7.2 warnings

MISRA Violation: MISRA-C:2012 R.7.2
- A "u" or "U" suffix shall be applied to all integer constants that are
represented in an unsigned type.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ieeff81ed42155c03aebca75b2f33f311279b9ed4

3 years agofix(zynqmp): resolve misra R10.3
Venkatesh Yadav Abbarapu [Thu, 28 Apr 2022 11:09:07 +0000 (16:39 +0530)]
fix(zynqmp): resolve misra R10.3

MISRA Violation: MISRA-C:2012 R.10.3
- The value of an expression shall not be assigned to an object with a
  narrower essential type or of a different essential type category.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I5a60c66788d59e45f41ceb81758b42ef2df9f5f7

3 years agoMerge "fix(fvp): fix NULL pointer dereference issue" into integration
Sandrine Bailleux [Fri, 6 May 2022 08:08:54 +0000 (10:08 +0200)]
Merge "fix(fvp): fix NULL pointer dereference issue" into integration

3 years agoMerge "docs(maintainers): update measured boot code owners" into integration
Madhukar Pappireddy [Thu, 5 May 2022 20:27:35 +0000 (22:27 +0200)]
Merge "docs(maintainers): update measured boot code owners" into integration

3 years agofeat(brbe): add BRBE support for NS world
johpow01 [Fri, 28 Jan 2022 23:06:20 +0000 (17:06 -0600)]
feat(brbe): add BRBE support for NS world

This patch enables access to the branch record buffer control registers
in non-secure EL2 and EL1 using the new build option ENABLE_BRBE_FOR_NS.
It is disabled for all secure world, and cannot be used with ENABLE_RME.

This option is disabled by default, however, the FVP platform makefile
enables it for FVP builds.

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

3 years agoMerge "fix(intel): reject non 4-byte align request size for FPGA Crypto Service ...
Madhukar Pappireddy [Thu, 5 May 2022 14:12:04 +0000 (16:12 +0200)]
Merge "fix(intel): reject non 4-byte align request size for FPGA Crypto Service (FCS)" into integration

3 years agofix(fvp): fix NULL pointer dereference issue
Manish V Badarkhe [Wed, 4 May 2022 16:21:22 +0000 (17:21 +0100)]
fix(fvp): fix NULL pointer dereference issue

Fixed below NULL pointer dereference issue reported by coverity scan
by asserting the hw_config_info is not NULL.

*** CID 378361:  Null pointer dereferences  (NULL_RETURNS)
/plat/arm/board/fvp/fvp_bl2_setup.c: 84 in plat_get_next_bl_params()
78
79       /* To retrieve actual size of the HW_CONFIG */
80       param_node = get_bl_mem_params_node(HW_CONFIG_ID);
81       assert(param_node != NULL);
82
83       /* Copy HW config from Secure address to NS address */
>>>     CID 378361:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing "hw_config_info", which is known to be "NULL".
84       memcpy((void *)hw_config_info->ns_config_addr,
85              (void *)hw_config_info->config_addr,
86              (size_t)param_node->image_info.image_size);

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

3 years agofeat(spmc): enable checking of execution ctx count
Marc Bonnici [Thu, 9 Dec 2021 10:51:05 +0000 (10:51 +0000)]
feat(spmc): enable checking of execution ctx count

This is a mandatory entry in an SP's manifest however
currently an S-EL1 partition running under the EL3 SPMC
must have the same amount of execution contexts as
physical cores therefore just check the entry matches
this value.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I4c2a85ccde7a7bb9b1232cf6389a8c532cbf3d41

3 years agofeat(spmc): enable parsing of UUID from SP Manifest
Marc Bonnici [Tue, 24 Aug 2021 10:31:52 +0000 (11:31 +0100)]
feat(spmc): enable parsing of UUID from SP Manifest

To align with other SPMC implementations parse the UUID
from the SP manifest as 4 uint32 values and store
this internally.

Change-Id: I7de5d5ef8d98dc14bc7c76892133c2333358a379
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agofeat(spmc): add partition mailbox structs
Marc Bonnici [Thu, 2 Sep 2021 12:18:41 +0000 (13:18 +0100)]
feat(spmc): add partition mailbox structs

Add mailbox structs to the partition descriptors
and ensure these are initialised correctly.

Change-Id: Ie80166d19763c266b6a1d23e351d312dc31fb221
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agofeat(plat/arm): allow BL32 specific defines to be used by SPMC_AT_EL3
Marc Bonnici [Mon, 20 Dec 2021 10:53:52 +0000 (10:53 +0000)]
feat(plat/arm): allow BL32 specific defines to be used by SPMC_AT_EL3

For EL3 SPMC configuration enabled platforms, allow the reuse of
BL32 specific definitions.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I37ffbbf680326c101fbb2f146085a96c138f07a1

3 years agofeat(plat/fvp): add EL3 SPMC #defines
Marc Bonnici [Mon, 29 Nov 2021 16:59:02 +0000 (16:59 +0000)]
feat(plat/fvp): add EL3 SPMC #defines

Introduce additional #defines for running with the EL3
SPMC on the FVP.

The increase in xlat tables has been chosen to allow
the test cases to complete successfully and may need
adjusting depending on the desired usecase.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I7f44344ff8b74ae8907d53ebb652ff8def2d2562

3 years agotest(plat/fvp/lsp): add example logical partition
Marc Bonnici [Thu, 19 Aug 2021 13:42:19 +0000 (14:42 +0100)]
test(plat/fvp/lsp): add example logical partition

Add an example logical partition to the FVP platform that
simply prints and echos the contents of a direct request
with the appropriate direct response.

Change-Id: Ib2052c9a63a74830e5e83bd8c128c5f9b0d94658
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agoMerge changes from topic "mp/delete_platforms" into integration
Sandrine Bailleux [Thu, 5 May 2022 08:30:26 +0000 (10:30 +0200)]
Merge changes from topic "mp/delete_platforms" into integration

* changes:
  refactor(mt6795): remove mediatek's mt6795 platform
  refactor(sgm775): remove Arm sgm775 platform

3 years agoMerge "docs(maintainers): add code owners for Firmware Update driver" into integration
Sandrine Bailleux [Thu, 5 May 2022 07:34:04 +0000 (09:34 +0200)]
Merge "docs(maintainers): add code owners for Firmware Update driver" into integration

3 years agodocs(maintainers): add code owners for Firmware Update driver
Manish V Badarkhe [Wed, 4 May 2022 15:19:17 +0000 (16:19 +0100)]
docs(maintainers): add code owners for Firmware Update driver

Added myself and Sandrine Bailleux as code owners for Firmware
Update driver.

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

3 years agofix(sptool): update Optee FF-A manifest
J-Alves [Fri, 8 Apr 2022 08:52:26 +0000 (09:52 +0100)]
fix(sptool): update Optee FF-A manifest

Change the OPTEE FF-A manifest to comply with changes to the sp pkg [1].
The sptool packs the image at the default offset of 0x4000, if it is not
provided in the arguments.

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

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

3 years agofeat(sptool): delete c version of the sptool
J-Alves [Tue, 22 Mar 2022 19:17:44 +0000 (19:17 +0000)]
feat(sptool): delete c version of the sptool

Change-Id: I224762ef66624c78dd87729dac80b2c956ee50ba
Signed-off-by: J-Alves <joao.alves@arm.com>
3 years agofeat(sptool): use python version of sptool
J-Alves [Tue, 22 Mar 2022 16:28:51 +0000 (16:28 +0000)]
feat(sptool): use python version of sptool

Change-Id: I567ef0b977c69c38323740a592dd9451e261a407
Signed-off-by: J-Alves <joao.alves@arm.com>
3 years agofeat(sptool): python version of the sptool
J-Alves [Mon, 21 Mar 2022 16:27:56 +0000 (16:27 +0000)]
feat(sptool): python version of the sptool

To cope with the changes/design decisions in the implementation of
boot protocol, from FF-A v1.1 specification in the S-EL2 SPM, we have
changed the format of the sp pkg header.
These changes need to be reflected in the sptool, used for packaging
the SP binary, and the SP's FF-A manifest. Now the SP pkg can
contain the boot information blob as defined by the FF-A specification.
To cater for these changes, bring to the TF-A project an equivalent to
the tool used in the Hafnium project.

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

3 years agoMerge changes from topic "hm/make-refactor" into integration
Manish Pandey [Wed, 4 May 2022 12:17:38 +0000 (14:17 +0200)]
Merge changes from topic "hm/make-refactor" into integration

* changes:
  docs(prerequisites): use LLVM utilities to build with clang
  build(make): use clang binutils to compile

3 years agoMerge "feat(allwinner): add SMCCC SOCID support" into integration
Manish Pandey [Wed, 4 May 2022 12:16:36 +0000 (14:16 +0200)]
Merge "feat(allwinner): add SMCCC SOCID support" into integration

3 years agofeat(spmc/lsp): add logical partition framework
Marc Bonnici [Mon, 14 Feb 2022 17:06:09 +0000 (17:06 +0000)]
feat(spmc/lsp): add logical partition framework

Introduce a framework to support running logical
partitions alongside the SPMC in EL3  as per the
v1.1 FF-A spec.

The DECLARE_LOGICAL_PARTITION macro has been added to
simplify the process to define a Logical Partition.
The partitions themselves are statically allocated
with the descriptors placed in RO memory.

It is assumed that the MAX_EL3_LP_DESCS_COUNT will
be defined by the platform.

Change-Id: I1c2523e0ad2d9c5d36aeeef6b8bcb1e80db7c443
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agorefactor(mt6795): remove mediatek's mt6795 platform
Manish Pandey [Wed, 4 May 2022 10:14:17 +0000 (11:14 +0100)]
refactor(mt6795): remove mediatek's mt6795 platform

Mediatek's mt6795 platform was deprecated in 2.5 release and as per [1]
a platform which has been marked deprecated should be removed from repo
after 2 release cycle.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/plat/deprecated.html?highlight=deprecated

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

3 years agorefactor(sgm775): remove Arm sgm775 platform
Manish Pandey [Wed, 4 May 2022 09:59:52 +0000 (10:59 +0100)]
refactor(sgm775): remove Arm sgm775 platform

Arm's sgm775 platform was deprecated in 2.5 release and as per [1] a
platform which has been marked deprecated should be removed from repo
after 2 release cycle.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/plat/deprecated.html?highlight=deprecated

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

3 years agorefactor(sptool): use SpSetupActions in sp_mk_generator.py
J-Alves [Mon, 21 Mar 2022 14:11:43 +0000 (14:11 +0000)]
refactor(sptool): use SpSetupActions in sp_mk_generator.py

The "sp_mk_generator.py" is responsible for processing the SP layout
file, which contains information about the SPs to be deployed on top of
the SPM, to generate the "sp_gen.mk" file which appends information
specific to each SP that shall help with packing all SPs into a fip
binary.
Before this patch the "sp_mk_generator.py" was a monolithic script,
which has now been broken down into functions for each identified
configuration action.

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

3 years agofeat(sptool): add python SpSetupActions framework
J-Alves [Mon, 21 Mar 2022 14:08:27 +0000 (14:08 +0000)]
feat(sptool): add python SpSetupActions framework

Developed python framework to help with SPs configuration. The framework
allows for functions (dubbed "actions" in the framework) to be defined
that should process the "sp_layout.json" file.

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

3 years agoMerge "build(commitlint): make the scope optional" into integration
Sandrine Bailleux [Wed, 4 May 2022 06:29:23 +0000 (08:29 +0200)]
Merge "build(commitlint): make the scope optional" into integration

3 years agofeat(allwinner): add SMCCC SOCID support
Andre Przywara [Fri, 25 Sep 2020 15:42:06 +0000 (16:42 +0100)]
feat(allwinner): add SMCCC SOCID support

The Allwinner SID device holds a 16-bit SoC identifier, which we already
use in our code.

Export this number through the generic SMCCC SOCID interface, to allow
an architectural identification of an Allwinner SoC. This enables access
to this information from non-secure world, simplifies generic drivers
(ACPI comes to mind), and gives easy and precise access to the SoC ID
from userland in OSes like Linux.

Change-Id: I91753046b2ae5408ca7bc0b864fcd97d24c8267c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoMerge changes from topic "allwinner-idle" into integration
André Przywara [Wed, 4 May 2022 00:10:02 +0000 (02:10 +0200)]
Merge changes from topic "allwinner-idle" into integration

* changes:
  feat(allwinner): provide CPU idle states to the rich OS
  feat(allwinner): simplify CPU_SUSPEND power state encoding
  feat(allwinner): choose PSCI states to avoid translation
  feat(fdt): add the ability to supply idle state information
  fix(allwinner): improve DTB patching error handling
  refactor(allwinner): patch the DTB after setting up PSCI
  refactor(allwinner): move DTB change code into allwinner/common

3 years agoMerge changes from topic "refactor-hw-config-load" into integration
Lauren Wehrmeister [Tue, 3 May 2022 15:06:49 +0000 (17:06 +0200)]
Merge changes from topic "refactor-hw-config-load" into integration

* changes:
  docs(fvp): update loading addresses of HW_CONFIG
  docs(fconf): update device tree binding for FCONF
  feat(fvp): update HW_CONFIG DT loading mechanism
  refactor(st): update set_config_info function call
  refactor(fvp_r): update set_config_info function call
  refactor(arm): update set_config_info function call
  feat(fconf): add NS load address in configuration DTB nodes

3 years agodocs(maintainers): update measured boot code owners
Sandrine Bailleux [Tue, 3 May 2022 12:59:48 +0000 (14:59 +0200)]
docs(maintainers): update measured boot code owners

Propose myself as a code owner of the measured boot module.

Also do a couple of updates along the way:

 - Add the measured boot bindings document to the list of measured
   boot files.

 - Fix the list of FVP files. plat/arm/board/fvp/fvp_measured_boot.c
   does not exist anymore. It has been replaced by
   plat/arm/board/fvp/fvp_measured_{bl1,bl2,common}_boot.c files.

Change-Id: Ifb34f4f7c704b1db966b44428bbffd48c5e3c42b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agobuild(commitlint): make the scope optional
Sandrine Bailleux [Tue, 3 May 2022 06:14:23 +0000 (08:14 +0200)]
build(commitlint): make the scope optional

In all TF-A commit messages, the first line must comply to the
following format:

  type(scope): description

Although the conventional commits specification says that the scope
above is optional, we have made it mandatory in TF-A and the following
error message is printed if no scope is provided:

  scope may not be empty [scope-empty]

However, this can be too restrictive for some types of commits. For
example, it is typically hard to choose a scope for documentation
patches which modify several documents of different natures.

Lift this restriction in the tools and leave it up to the developer to
decide whether a scope is needed or not.

Change-Id: I9d35e7790fc3fa74651794216fe8db265ad09982
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "feat(xilinx): add SPP/EMU platform support for versal" into integration
Madhukar Pappireddy [Mon, 2 May 2022 21:42:48 +0000 (23:42 +0200)]
Merge "feat(xilinx): add SPP/EMU platform support for versal" into integration

3 years agofeat(xilinx): add SPP/EMU platform support for versal
Venkatesh Yadav Abbarapu [Wed, 13 Apr 2022 03:34:53 +0000 (09:04 +0530)]
feat(xilinx): add SPP/EMU platform support for versal

This patch adds SPP/EMU platform support for Xilinx Versal and
also updating the documentation.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ibdadec4d00cd33ea32332299e7a00de31dc9d60b

3 years agofix(intel): reject non 4-byte align request size for FPGA Crypto Service (FCS)
Sieu Mun Tang [Sat, 19 Mar 2022 16:49:57 +0000 (00:49 +0800)]
fix(intel): reject non 4-byte align request size for FPGA Crypto Service (FCS)

This patch is to add size checking to make sure that
each certificate and encryption/decryption request
are 4-byte align as this driver is expecting. Unaligned
size may indicate invalid/corrupted request hence will
be rejected.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ib6f97849ec470e45679c5adc4fbfa3afd10eda90

3 years agoMerge changes I47014d72,Ibf00c386 into integration
Madhukar Pappireddy [Fri, 29 Apr 2022 21:12:21 +0000 (23:12 +0200)]
Merge changes I47014d72,Ibf00c386 into integration

* changes:
  docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
  feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

3 years agodocs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
Jorge Ramirez-Ortiz [Fri, 15 Apr 2022 09:51:03 +0000 (11:51 +0200)]
docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

Document the RESET_TO_BL31 with parameters feature.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Change-Id: I47014d724f2eb822b69a112c3acee546fbfe82d5

3 years agofeat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
Jorge Ramirez-Ortiz [Fri, 15 Apr 2022 09:46:47 +0000 (11:46 +0200)]
feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

It is not always the case that RESET_TO_BL31 enabled platforms don't
execute a bootloader before BL31.

For those use cases, being able to receive arguments from that first
loader (i.e: a DTB with TPM logs) might be necessary feature.

This code has been validated on iMX8mm.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Change-Id: Ibf00c3867cb1d1012b8b376e64ccaeca1c9d2bff

3 years agoMerge "fix(zynqmp): update the log message to verbose" into integration
Madhukar Pappireddy [Fri, 29 Apr 2022 17:10:33 +0000 (19:10 +0200)]
Merge "fix(zynqmp): update the log message to verbose" into integration

3 years agoMerge "fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960" into integr...
Bipin Ravi [Fri, 29 Apr 2022 13:29:41 +0000 (15:29 +0200)]
Merge "fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960" into integration

3 years agoMerge "docs(fvp): specify correct reference of the hw_config address" into integration
Manish Pandey [Fri, 29 Apr 2022 11:52:59 +0000 (13:52 +0200)]
Merge "docs(fvp): specify correct reference of the hw_config address" into integration

3 years agodocs(prerequisites): use LLVM utilities to build with clang
Harrison Mutai [Wed, 23 Feb 2022 11:37:12 +0000 (11:37 +0000)]
docs(prerequisites): use LLVM utilities to build with clang

Makefile updated to use LLVM utilities instead of GNU utilities when
compiling with clang. `CROSS_COMPILE` is not required since this
dependency has been removed.

Change-Id: I19706b84b9310e07935516681b86596c04ef8ad6
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofix(zynqmp): update the log message to verbose
Venkatesh Yadav Abbarapu [Tue, 12 Apr 2022 03:51:32 +0000 (09:21 +0530)]
fix(zynqmp): update the log message to verbose

Changing the log message from notice to verbose, to save some space
and that leads to successfull compilation.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Iee5a808febf211464eb8ba6f0377f79378333f5d

3 years agoMerge "feat(smmu): configure SMMU Root interface" into integration
Manish Pandey [Thu, 28 Apr 2022 21:20:16 +0000 (23:20 +0200)]
Merge "feat(smmu): configure SMMU Root interface" into integration

3 years agofix(security): update Cortex-A15 CPU lib files for CVE-2022-23960
John Powell [Fri, 15 Apr 2022 00:10:17 +0000 (19:10 -0500)]
fix(security): update Cortex-A15 CPU lib files for CVE-2022-23960

Cortex-A15 does not support FEAT_CSV2 so the existing workaround for
Spectre V2 is sufficient to mitigate against Spectre BHB attacks,
however the code needed to be updated to work with the new build flag.

Also, some code was refactored several years ago and not updated in
the Cortex-A15 library file so this patch fixes that as well.

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

3 years agoMerge changes I80661161,I82c1fa93,I018ccbb9,Ibc23734d,I97406abe, ... into integration
Manish Pandey [Thu, 28 Apr 2022 16:51:50 +0000 (18:51 +0200)]
Merge changes I80661161,I82c1fa93,I018ccbb9,Ibc23734d,I97406abe, ... into integration

* changes:
  feat(intel): add SMC support for HWMON voltage and temp sensor
  feat(intel): add SMC support for Get USERCODE
  fix(intel): extend SDM command to return the SDM firmware version
  feat(intel): add SMC for enquiring firmware version
  fix(intel): configuration status based on start request
  fix(intel): bit-wise configuration flag handling
  fix(intel): get config status OK status
  fix(intel): use macro as return value
  fix(intel): fix fpga config write return mechanism
  feat(intel): add SiP service for DCMF status
  feat(intel): add RSU 'Max Retry' SiP SMC services
  feat(intel): enable SMC SoC FPGA bridges enable/disable
  feat(intel): add SMC/PSCI services for DCMF version support
  feat(intel): allow to access all register addresses if DEBUG=1
  fix(intel): modify how configuration type is handled
  feat(intel): support SiP SVC version
  feat(intel): enable firewall for OCRAM in BL31
  feat(intel): create source file for firewall configuration
  fix(intel): refactor NOC header

3 years agofeat(smmu): configure SMMU Root interface
Olivier Deprez [Fri, 4 Feb 2022 11:30:11 +0000 (12:30 +0100)]
feat(smmu): configure SMMU Root interface

This change performs a basic configuration of the SMMU root registers
interface on an RME enabled system. This permits enabling GPC checks
for transactions originated from a non-secure or secure device upstream
to an SMMU. It re-uses the boot time GPT base address and configuration
programmed on the PE.
The root register file offset is platform dependent and has to be
supplied on a model command line.

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

3 years agoMerge "feat(qemu): add support for measured boot" into integration
Manish Pandey [Thu, 28 Apr 2022 15:18:47 +0000 (17:18 +0200)]
Merge "feat(qemu): add support for measured boot" into integration

3 years agofeat(intel): add SMC support for HWMON voltage and temp sensor
Kris Chaplin [Fri, 25 Jun 2021 10:31:52 +0000 (11:31 +0100)]
feat(intel): add SMC support for HWMON voltage and temp sensor

Add support to read temperature and voltage using SMC command

Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I806611610043906b720b5096728a5deb5d652b1d

3 years agofeat(intel): add SMC support for Get USERCODE
Sieu Mun Tang [Wed, 27 Apr 2022 10:57:29 +0000 (18:57 +0800)]
feat(intel): add SMC support for Get USERCODE

This patch adds SMC support for enquiring FPGA's User Code.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I82c1fa9390b6f7509b2284d51e199fb8b6a9b1ad

3 years agofix(intel): extend SDM command to return the SDM firmware version
Sieu Mun Tang [Wed, 27 Apr 2022 10:54:10 +0000 (18:54 +0800)]
fix(intel): extend SDM command to return the SDM firmware version

Updates intel_smc_fw_version function to read SDM
firmware version in major/minor ACDS release number.
Update CONFIG_STATUS Response Data [1] bit0-23.

Return INTEL_SIP_SMC_STATUS_ERROR if unexpected
firmware version is being retrieved.

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

3 years agofeat(intel): add SMC for enquiring firmware version
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 5 Feb 2021 03:50:58 +0000 (11:50 +0800)]
feat(intel): add SMC for enquiring firmware version

This command allows non-secure world software to enquire the
version of currently running Secure Device Manager (SDM) firmware.

This will be useful in maintaining backward-compatibility as well
as ensuring software cross-compabitility.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ibc23734d1135db74423da5e29655f9d32472a3b0

3 years agofix(intel): configuration status based on start request
Abdul Halim, Muhammad Hadi Asyrafi [Tue, 29 Dec 2020 08:49:23 +0000 (16:49 +0800)]
fix(intel): configuration status based on start request

Configuration status command now returns the result based on the last
config start command made to the runtime software. The status type can
be either:
- NO_REQUEST (default)
- RECONFIGURATION
- BITSTREAM_AUTH

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I97406abe09b49b9d9a5b43e62fe09eb23c729bff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): bit-wise configuration flag handling
Sieu Mun Tang [Thu, 28 Apr 2022 14:40:58 +0000 (22:40 +0800)]
fix(intel): bit-wise configuration flag handling

Change configuration type handling to bit-wise flag. This is to align
with Linux's FPGA Manager definitions and promotes better compatibility.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I5aaf91d3fec538fe3f4fe8395d9adb47ec969434

3 years agofix(intel): get config status OK status
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 20 Nov 2020 03:41:59 +0000 (11:41 +0800)]
fix(intel): get config status OK status

Config status have different OK requirement between MBOX_CONFIG_STATUS
and MBOX_RECONFIG_STATUS request. This patch adds the checking to
differentiate between both command.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I45a4c3de460b031757dbcbd0b3a8055cb0a55aff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): use macro as return value
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 20 Nov 2020 03:06:00 +0000 (11:06 +0800)]
fix(intel): use macro as return value

SMC function should strictly return INTEL_SIP_SMC_STATUS macro. Directly
returning value of variable status might cause confusion in calling
software.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Iea17f4feaa5c917e8b995471f3019dba6ea8dcd3
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agoMerge changes from topic "vendor_makefile_extension" into integration
Manish Pandey [Thu, 28 Apr 2022 14:25:34 +0000 (16:25 +0200)]
Merge changes from topic "vendor_makefile_extension" into integration

* changes:
  feat(plat/mediatek/build_helpers): introduce mtk makefile
  build(makefile): add extra makefile variable for extension

3 years agofix(intel): fix fpga config write return mechanism
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 5 Nov 2020 10:00:03 +0000 (18:00 +0800)]
fix(intel): fix fpga config write return mechanism

This revert commit 279c8015fefcb544eb311b9052f417fc02ab84aa.
The previous change breaks this feature compatibility with Linux driver.
Hence, the fix for the earlier issue is going to be fixed in uboot instead.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I93220243bad65ed53322050d990544c7df4ce66b

3 years agofeat(intel): add SiP service for DCMF status
Sieu Mun Tang [Thu, 28 Apr 2022 14:21:01 +0000 (22:21 +0800)]
feat(intel): add SiP service for DCMF status

This patch adds 2 additional RSU SiP services for Intel SoCFPGA
platforms:
- INTEL_SIP_SMC_RSU_COPY_DCMF_STATUS stores current DCMF status in
  BL31
- INTEL_SIP_SMC_RSU_DCMF_STATUS is calling function for non-secure
  software to retrieve stored DCMF status

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ic7a3e6988c71ad4bf66c58a1d669956524dfdf11

3 years agoMerge "docs(build): update GCC to version 11.2-2022.02" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:18:43 +0000 (16:18 +0200)]
Merge "docs(build): update GCC to version 11.2-2022.02" into integration

3 years agoMerge changes from topic "qemu-measured-boot" into integration
Manish Pandey [Thu, 28 Apr 2022 14:17:00 +0000 (16:17 +0200)]
Merge changes from topic "qemu-measured-boot" into integration

* changes:
  fix(arm): fix fvp and juno build with USE_ROMLIB option
  feat(fdt-wrappers): add function to find or add a sudnode

3 years agofeat(intel): add RSU 'Max Retry' SiP SMC services
Chee Hong Ang [Wed, 1 Jul 2020 06:22:25 +0000 (14:22 +0800)]
feat(intel): add RSU 'Max Retry' SiP SMC services

Add SiP SMC services to store/retrieve 'Max Retry' counter
for Remote System Update (RSU).

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I17c1f0107ead64e6160954d26407f399003bcbd9

3 years agoMerge "fix(bl2): define RAM_NOLOAD for XIP" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:10:21 +0000 (16:10 +0200)]
Merge "fix(bl2): define RAM_NOLOAD for XIP" into integration

3 years agoMerge changes from topic "ti-k3-system-suspend-base-support" into integration
Madhukar Pappireddy [Thu, 28 Apr 2022 14:05:47 +0000 (16:05 +0200)]
Merge changes from topic "ti-k3-system-suspend-base-support" into integration

* changes:
  feat(ti): allow build config of low power mode support
  feat(ti): increase SEC_SRAM_SIZE to 128k
  feat(ti): add PSCI handlers for system suspend
  feat(ti): add gic save and restore calls
  feat(ti): add enter sleep method

3 years agofeat(qemu): add support for measured boot
Ruchika Gupta [Fri, 8 Apr 2022 07:44:44 +0000 (13:14 +0530)]
feat(qemu): add support for measured boot

Add helper functions to generate event log for qemu
when MEASURED_BOOT=1.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Change-Id: I17a098cb614a3a89fe0fe9577bed6edda8bfd070

3 years agofix(arm): fix fvp and juno build with USE_ROMLIB option
Manish V Badarkhe [Tue, 19 Apr 2022 08:40:15 +0000 (09:40 +0100)]
fix(arm): fix fvp and juno build with USE_ROMLIB option

Change-Id: I8a9b30a952be594435003f0d684e3faad484e8b8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(fdt-wrappers): add function to find or add a sudnode
Ruchika Gupta [Fri, 8 Apr 2022 07:46:16 +0000 (13:16 +0530)]
feat(fdt-wrappers): add function to find or add a sudnode

This change adds a new utility function - `fdtw_find_or_add_subnode`
to find a subnode. If the subnode is not present, the function adds
it in the flattened device tree.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Change-Id: Idf3ceddc57761ac015763d4a8b004877bcad766a

3 years agofeat(intel): enable SMC SoC FPGA bridges enable/disable
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 18 Jun 2020 08:21:29 +0000 (16:21 +0800)]
feat(intel): enable SMC SoC FPGA bridges enable/disable

Enable SoC FPGA bridges enable/disable from non-secure world
through secure monitor calls

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4474abab9731923a61ff0e7eb2c2fa32048001cb
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(intel): add SMC/PSCI services for DCMF version support
Chee Hong Ang [Wed, 13 May 2020 03:44:04 +0000 (11:44 +0800)]
feat(intel): add SMC/PSCI services for DCMF version support

Support get/store RSU DCMF version:
INTEL_SIP_SMC_RSU_DCMF_VERSION - Get current DCMF version
INTEL_SIP_SMC_RSU_COPY_DCMF_VERSION - Store current DCMF version

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I85ffbc0efc859736899d4812f040fd7be17c8d8d

3 years agofeat(intel): allow to access all register addresses if DEBUG=1
Siew Chin Lim [Tue, 11 May 2021 13:12:22 +0000 (21:12 +0800)]
feat(intel): allow to access all register addresses if DEBUG=1

Allow to access all register addresses from SMC call if compile the code
with DEBUG=1 for debugging purpose.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Idd31827fb71307efbdbcceeaa05f6cb072842e10

3 years agofix(intel): modify how configuration type is handled
Abdul Halim, Muhammad Hadi Asyrafi [Fri, 29 May 2020 04:13:17 +0000 (12:13 +0800)]
fix(intel): modify how configuration type is handled

This patch creates macros to handle different configuration
types. These changes will help in adding new configuration
types in the future.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I5826a8e5942228a9ed376212f0df43b1605c0199

3 years agofeat(intel): support SiP SVC version
Sieu Mun Tang [Wed, 27 Apr 2022 10:24:06 +0000 (18:24 +0800)]
feat(intel): support SiP SVC version

This command supports to return SiP SVC major and minor version.

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

3 years agofeat(intel): enable firewall for OCRAM in BL31
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:40:46 +0000 (22:40 +0800)]
feat(intel): enable firewall for OCRAM in BL31

Set OCRAM as secure region and required privileged access in BL31 to
prevent software running in normal world (non-secure) accessing memory
region in OCRAM which may contain sensitive information (e.g. FSBL,
handoff data)

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib6b24efd69f49cd3f9aa4ef2ea9f1af5ce582bd6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(intel): create source file for firewall configuration
Abdul Halim, Muhammad Hadi Asyrafi [Thu, 6 Aug 2020 02:21:54 +0000 (10:21 +0800)]
feat(intel): create source file for firewall configuration

Move codes that previously were part of system_manager driver into
firewall driver which are more appropriate based on their functionalities.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I35e9d792f35ee7491c2f306781417a0c8faae3fd
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofix(intel): refactor NOC header
Abdul Halim, Muhammad Hadi Asyrafi [Wed, 5 Aug 2020 14:12:23 +0000 (22:12 +0800)]
fix(intel): refactor NOC header

Refactor NOC header to be shareable across both Stratix 10 and Agilex
platforms. This patch also removes redundant NOC declarations in system
manager header file.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I6348b67a8b54c2ad19327d6b8c25ae37d25e4b4a
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
3 years agofeat(plat/mediatek/build_helpers): introduce mtk makefile
Leon Chen [Thu, 24 Mar 2022 02:55:08 +0000 (10:55 +0800)]
feat(plat/mediatek/build_helpers): introduce mtk makefile

In order to modularize software libraries and platform drivers,
we create makefile helpers to treat a folder as a basic compile
unit.

Each module has a build rule (rules.mk) to describe driver and software
library source codes to be built in.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: Ib2113b259dc97937b7295b265509025b43b14077

3 years agobuild(makefile): add extra makefile variable for extension
Leon Chen [Wed, 23 Mar 2022 10:51:48 +0000 (18:51 +0800)]
build(makefile): add extra makefile variable for extension

Introduce EXTRA_LINKERFILE for GCC linker options. GCC linker
can realize multiple linker scripts, and vendors can extend ro or
text sections by inserting sections among the original sections
specified by blx.ld.S.

Vendors can assign compiled object files by assigning MODULE_OBJS
with their own built path.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I1bd2e0383a52204723816131da4b7948def4c4e9

3 years agodocs(fvp): update loading addresses of HW_CONFIG
Manish V Badarkhe [Tue, 12 Apr 2022 20:11:56 +0000 (21:11 +0100)]
docs(fvp): update loading addresses of HW_CONFIG

As per change [1], now HW_CONFIG gets loaded in secure and
non-secure memory. Hence updated the documentation to show
secure and non-secure load region of HW_CONFIG in FVP Arm
platform.

Additionally, added a note on how FW_CONFIG address gets
passed from BL2 to BL31/SP_MIN.

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

Change-Id: I37e02ff4f433c87bccbe67c7df5ecde3017668b9
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agodocs(fconf): update device tree binding for FCONF
Manish V Badarkhe [Thu, 21 Apr 2022 22:10:25 +0000 (23:10 +0100)]
docs(fconf): update device tree binding for FCONF

Added a description for the newly introduced 'ns-load-address' property
in the dtb-registry node of FCONF.

Change-Id: Ief8e8a55a6363fd42b23491d000b097b0c48453b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(fvp): update HW_CONFIG DT loading mechanism
Manish V Badarkhe [Tue, 15 Mar 2022 16:05:58 +0000 (16:05 +0000)]
feat(fvp): update HW_CONFIG DT loading mechanism

Currently, HW-config is loaded into non-secure memory, which mean
a malicious NS-agent could tamper with it. Ideally, this shouldn't
be an issue since no software runs in non-secure world at this time
(non-secure world has not been started yet).

It does not provide a guarantee though since malicious external
NS-agents can take control of this memory region for update/corruption
after BL2 loads it and before BL31/BL32/SP_MIN consumes it. The threat
is mapped to Threat ID#3 (Bypass authentication scenario) in threat
model [1].

Hence modified the code as below -
1. BL2 loads the HW_CONFIG into secure memory
2. BL2 makes a copy of the HW_CONFIG in the non-secure memory at an
   address provided by the newly added property(ns-load-address) in
   the 'hw-config' node of the FW_CONFIG
3. SP_MIN receives the FW_CONFIG address from BL2 via arg1 so that
   it can retrieve details (address and size) of HW_CONFIG from
   FW_CONFIG
4. A secure and non-secure HW_CONFIG address will eventually be used
   by BL31/SP_MIN/BL32 and BL33 components respectively
5. BL31/SP_MIN dynamically maps the Secure HW_CONFIG region and reads
   information from it to local variables (structures) and then
   unmaps it
6. Reduce HW_CONFIG maximum size from 16MB to 1MB; it appears
   sufficient, and it will also create a free space for any future
   components to be added to memory

[1]: https://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html

Change-Id: I1d431f3e640ded60616604b1c33aa638b9a1e55e
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofeat(ti): allow build config of low power mode support
Dave Gerlach [Fri, 11 Feb 2022 19:57:19 +0000 (13:57 -0600)]
feat(ti): allow build config of low power mode support

Not all K3 platforms support low power mode, so to allow these
features to be included for platforms that do in build and
therefore reported in the PSCI caps, define K3_PM_SYSTEM_SUSPEND
flag that can be set during build that will cause appropriate
space and functionality to be included in build for system
suspend support.

Change-Id: I821fbbd5232d91de6c40f63254b855e285d9b3e8
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): increase SEC_SRAM_SIZE to 128k
Dave Gerlach [Fri, 7 Jan 2022 14:11:10 +0000 (08:11 -0600)]
feat(ti): increase SEC_SRAM_SIZE to 128k

Increase the lite platform SEC_SRAM_SIZE to 128k to allow space
for GIC context.

Change-Id: I6414309757ce9a9b7b3a9233a401312bfc459a3b
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add PSCI handlers for system suspend
Dave Gerlach [Tue, 30 Nov 2021 21:45:34 +0000 (15:45 -0600)]
feat(ti): add PSCI handlers for system suspend

Add necessary K3 PSCI handlers to enable system suspend to be reported
in the PSCI capabilities when asked during OS boot.

Additionally, have the handlers provide information that all domains
should be off and also have the power domain suspend handler invoke the
TISCI_MSG_ENTER_SLEEP message to enter system suspend.

Change-Id: I351a16167770e9909e8ca525ee0d74fa93331194
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add gic save and restore calls
Dave Gerlach [Fri, 7 Jan 2022 14:12:39 +0000 (08:12 -0600)]
feat(ti): add gic save and restore calls

Add functions to save and restore GICv3 redist and dist contexts during
low power mode and then call these during the suspend entry and finish
psci handlers.

Change-Id: I26c2c0f3b7fc925de3b349499fa42d2405441577
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agofeat(ti): add enter sleep method
Dave Gerlach [Tue, 30 Nov 2021 21:35:08 +0000 (15:35 -0600)]
feat(ti): add enter sleep method

This TISCI API must be used to trigger entry into system suspend, and
this is done through the use of TI_SCI_MSG_ENTER_SLEEP. Introduce a
method to send this message.

Change-Id: Id7af5fb2a34623ad69e76764f389ff4d8d259fba
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoMerge "docs(zynqmp): update the make command" into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:41:21 +0000 (16:41 +0200)]
Merge "docs(zynqmp): update the make command" into integration

3 years agoMerge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration
Madhukar Pappireddy [Wed, 27 Apr 2022 14:40:38 +0000 (16:40 +0200)]
Merge changes Ibe6fd206,Icdca3de6,I72016620,I57a2787c into integration

* changes:
  fix(versal): fix coverity scan warnings
  feat(versal): get version for ATF related EEMI APIs
  feat(versal): enhance PM_IOCTL EEMI API to support additional arg
  feat(versal): add common interfaces to handle EEMI commands

3 years agoMerge "refactor(twed): improve TWED enablement in EL-3" into integration
Manish Pandey [Wed, 27 Apr 2022 09:01:52 +0000 (11:01 +0200)]
Merge "refactor(twed): improve TWED enablement in EL-3" into integration