Commit Graph

4517 Commits

Author SHA1 Message Date
Antonio Nino Diaz 07146afb11 plat/arm: Always define TSP memory region
Even though this is not used unless SPD=tspd, only defining it when
SPD_tspd is defined doesn't have any advantage and it makes it harder to
read the code.

Change-Id: I3d93135e05f39be071d16f8a47394a9a3ff54bc8
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2019-01-04 10:43:16 +00:00
Antonio Niño Díaz 3f99f7e4cb
Merge pull request #1731 from miyatsu/doc-fix-20181225
docs: marvell: Fix typo in file build.txt
2019-01-04 09:14:22 +00:00
Antonio Niño Díaz acfc1bc259
Merge pull request #1728 from satheesbalya-arm/sb1/sb1_2497_v84_dit
Enable DIT if supported
2019-01-04 09:13:32 +00:00
Sathees Balya 65849aa595 Enable DIT if supported
This patch enables the Data Independent Timing
functionality (DIT) in EL3 if supported
by the platform.

Change-Id: Ia527d6aa2ee88a9a9fe1c941220404b9ff5567e5
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2019-01-03 17:33:09 +00:00
Ding Tao 44eb04d23e docs: marvell: Fix typo in file build.txt
Replace "SECURE=0" with "MARVELL_SECURE_BOOT=0".

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-12-25 14:42:08 +08:00
Antonio Niño Díaz c8765826f4
Merge pull request #1730 from antonio-nino-diaz-arm/an/spdx
Use SPDX identifier in checkpatch config file
2018-12-19 15:08:23 +01:00
Antonio Nino Diaz 205bd56934 Use SPDX identifier in checkpatch config file
Change-Id: I4113604ac69ba07bd90d8268be65cae8aa43138e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-19 13:13:45 +00:00
Antonio Niño Díaz e475ba245d
Merge pull request #1725 from Yann-lms/clang_aarch32
clang: 32 bit compilation should include march32-directive
2018-12-19 13:43:17 +01:00
Antonio Niño Díaz 72b3226fa2
Merge pull request #1727 from antonio-nino-diaz-arm/an/gitignore
gitignore: Ignore sptool and doimage binaries
2018-12-19 10:52:27 +01:00
Antonio Niño Díaz 7b3cb3639f
Merge pull request #1729 from vwadekar/tegra-native-gicv2
Tegra native gicv2
2018-12-19 10:51:28 +01:00
Varun Wadekar 80c50eeaf9 Tegra: support for native GICv2 drivers
This patch converts Tegra platforms to support native
GICv2 drivers. This involves removes Tegra's GIC driver
port platforms to use interrupt_props

Change-Id: I83d8a690ff276dd97928dc60824a4fd36999bb30
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2018-12-18 14:25:27 -08:00
Varun Wadekar ce6107c747 Tegra: support to compile native GICv2 drivers
This patch adds a macro to allow platforms to compile native
GICv2 drivers along with Tegra handlers.

Change-Id: I8281796c09dae5704cff2daab831395d65e261b7
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2018-12-18 13:24:52 -08:00
Antonio Nino Diaz e0a1de4cc3 gitignore: Ignore sptool and doimage binaries
Change-Id: I119b85179f68148e128cc194f11d2cccb1e33d6d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-18 15:26:22 +00:00
Antonio Niño Díaz cae725bf38
Merge pull request #1721 from marex/arm/master/memsize-passing-v2
plat: rcar: Move FDT from x3 to x1
2018-12-18 15:24:52 +01:00
Antonio Niño Díaz 85686f1842
Merge pull request #1717 from satheesbalya-arm/sb1/sb1_2629_romlib_ifc
romlib: Add platform specific jump table list
2018-12-18 15:22:49 +01:00
Sathees Balya 8b9a0de440 romlib: Add platform specific jump table list
This patch allows platforms to define their
own jump table list for library at ROM. The
file has the list of functions to be used
from library at ROM. It can also include
other list files.

Change-Id: I721c35d7dad3dcadbb3a7f3277bfd5d3e1f6e00a
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-12-18 13:55:47 +00:00
Antonio Niño Díaz bcc7ad76c6
Merge pull request #1722 from antonio-nino-diaz-arm/an/arch
Synchronize architectural headers with TF-A-Tests
2018-12-18 13:50:38 +01:00
Antonio Nino Diaz b4474fabe8 Import exception helpers from TF-A-Tests
This is done in order to keep the files in both repositories in sync.

Change-Id: Ie1a9f321cbcfe8d7d14f206883fa718872271218
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-18 10:57:01 +00:00
Antonio Nino Diaz fdbc29344a Deprecate some unused AArch64 assembly functions
Change-Id: I8a0be21783a0c12325e6ab22e9e53ab5466ed9e0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-18 10:57:01 +00:00
Antonio Nino Diaz 5e96139f78 Move helpers from arch.h to arch_helpers.h
Some of the affected macros can only be used from C code. In general, we
use arch_helpers.h for any C helpers to access registers. For
consistency, the other macros have been moved as well.

Also, import some AArch32 helpers from TF-A-Tests.

Change-Id: Ie8fe1ddeadba5336c12971ddc39a7883121386b1
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-18 10:57:01 +00:00
Antonio Niño Díaz 08fd68a27d
Merge pull request #1718 from vwadekar/cc-variable-findstring
build: find "armclang" string in the 'CC' variable
2018-12-18 11:55:45 +01:00
Antonio Niño Díaz f5cf2aa555
Merge pull request #1719 from Yann-lms/useless_flags
stm32mp1: remove useless compilation flags
2018-12-18 11:55:11 +01:00
Yann Gautier e2bfec0b8d clang: 32 bit compilation should include march32-directive
This is done for other compilers, and without this some code does not
compile, like inline assembly code.

Fixes ARM-software/tf-issues#657.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
2018-12-18 10:46:34 +01:00
Antonio Niño Díaz e01065472a
Merge pull request #1720 from jeenu-arm/gic-priority
GIC: Remove lowest priority constants
2018-12-18 10:05:22 +01:00
Antonio Niño Díaz ea9c332d12
Merge pull request #1723 from soby-mathew/sm/reset_bl31_fix
FVP: Fixes for RESET_TO_BL31
2018-12-18 10:04:57 +01:00
Soby Mathew 8aa4e5f4eb docs: User-guide corrections for RESET_TO_BL31
This patch updates the user guide instructions for
RESET_TO_SP_MIN and RESET_TO_BL31 cases. The load
address for BL31 had to be updated because of increase
in code size. Also, information about PIE support when
RESET_TO_BL31=1 for FVP is added.

In the case of RESET_TO_SP_MIN, the RVBAR address
was wrong in the instruction. This is also corrected
in the patch.

Change-Id: I65fe6d28c5cf79bee0a11fbde320d49fcc1aacf5
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-12-17 15:25:49 +00:00
Soby Mathew 5bfac4fc2f BL31: correct GOT section omission
When the patch SHA 931f7c6 introduced PIE support for BL31,
adding the GOT section when the SEPARATE_CODE_AND_RODATA=0
to the linker script was erroneously omitted. This patch corrects
the same.

Also the patch reduces the alignment requirement for GOT and RELA
sections from 16 bytes to 8. Comments are added explain the
intent for alignment.

Change-Id: I8035cbf75f346f99bd56b13f32e0b3b70dd2fe6c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-12-17 15:25:49 +00:00
Soby Mathew 55cf015c20 FVP: Change BL31_BASE when RESET_TO_BL31=1
This patch defines BL31_BASE to 0x0 when RESET_TO_BL31=1 as the
executable is built with PIE support and can be loaded anywhere
in SRAM for execution.

Change-Id: I4007f4626322f1200a6304c9c565987d3357986c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-12-17 15:25:49 +00:00
Antonio Niño Díaz 4dd62543b7
Merge pull request #1716 from miyatsu/marvell-doc-fix-20181210
docs: marvell: Fix typo in file build.txt
2018-12-17 11:54:16 +01:00
Jeenu Viswambharan 35cd9e8169 GIC: Remove lowest priority constants
The GIC lowest priority values for each world depends on the number of
priority values implemented in hardware. These constants currently
defined in gic_common.h only meant to enumerate lowest possible
architectural values. Since these values are not used in generic code or
upstream platforms, and that general use of these constants can be
wrong, remove these. Platforms should either define and use these as
appropriate, or determine correct values at run time.

Change-Id: I3805cea8ceb8a592b9eff681ea1b63b7496cec5f
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
2018-12-14 09:26:54 +00:00
Marek Vasut 06ce6912b3 plat: rcar: Move FDT from x3 to x1
As suggested, pass the FDT to BL 33 via x1 instead of x3 , to be
consistent with the other platforms.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2018-12-13 22:08:24 +01:00
Yann Gautier 941ba04396 stm32mp1: remove useless compilation flags
On AARCH32, thumb is used by default, no need to redefine it.
As all our binaries are compiled with thumb, interwork is not needed.
The binaries compiled with or without those flags are the same,
except of course for the date.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
2018-12-13 15:01:53 +01:00
Varun Wadekar fd18a8fcb8 build: find "armclang" string in the 'CC' variable
This patch modifies the search criteria to see if we are using 'armclang'
as the compiler. Switch over to using 'findstring' which enables platforms
to do fancy stuff using scripts e.g. check if armclang timed out and retry
compilation.

Change-Id: If2162ebadb9033f6457a4e8d4243345e711defe6
Signed-off-by: Kalyani Chidambaram Vaidyanathan <kalyanic@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2018-12-12 15:22:27 -08:00
Soby Mathew c0940083bc
Merge pull request #1708 from Yann-lms/warnings
Add possibility to add compilation warnings
2018-12-12 15:54:47 +00:00
Soby Mathew fd809dc8d8
Merge pull request #1715 from pangupta/master
ccn: for RN-I, used node id instead of node postion
2018-12-12 15:54:09 +00:00
Soby Mathew 4f7812e7ac
Merge pull request #1712 from jeenu-arm/ssbs
AArch64: Use SSBS for CVE_2018_3639 mitigation
2018-12-12 09:43:49 +00:00
Pankaj Gupta 2f2b9ec822 ccn: for RN-I, used node id instead of node postion
For RN-I, node id is used instead of node postion in the bitmap
to calculate the region id.

Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
2018-12-12 09:18:27 +05:30
Antonio Niño Díaz fca0a51ff5
Merge pull request #1707 from antonio-nino-diaz-arm/an/spm
SPM: Initial prototype based on SPCI and SPRT
2018-12-11 17:48:17 +01:00
Antonio Nino Diaz 2ada829df1 SPM: Rename files for consistency
Rename files prefixed by sp_ to spm_.

Change-Id: Ie3016a4c4ac5987fe6fdd734c6b470c60954e23d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz 83a5d51279 SPM: Remove remaining SMC interfaces
Also, add a disclaimer to explain that the current implementation of SPM
is a prototype that is going to undergo a lot of rework.

Change-Id: I303c1e61c51d9f286cc599fea565fc9ba5a996bf
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz e23ae073cb SPM: Migrate mem attr get/set helpers to SPRT
The old SMCs SP_MEMORY_ATTRIBUTES_{GET,SET}_AARCH64 have been removed in
favour of SPRT_MEMORY_PERM_ATTR_{GET,SET}_AARCH64.

Change-Id: Idb93cfa5461d0098df941037c5653f7c44b65227
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz 206d2b3783 SPM: Allow preemption in non-blocking requests
Change-Id: I1fdc2285a3f6517a715ad6159322543fd5a37a37
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz eb1cbb4c83 SPM: Support non-blocking calls
Note that the arguments passed during the SMC call don't comply with the
SPCI specifications. This will be fixed in following patches, but it is
needed to implement a few more SPCI SMCs to be able to do it. The
current code allows us to start testing it.

Change-Id: Ic13dcc54c40327df03be1b0f52e8a44f468f06b4
Co-authored-by: Jean-Paul Etienne <jean-paul.etienne@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz aa9ae89835 SPM: Implement global response buffer helpers
This buffer is where all the responses from Secure Partitions are stored
until they are requested.

Change-Id: Iafeb8f0848c5ff6f3e187060cd3a47702484dc45
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz 2f48ddae74 SPM: Prevent simultaneous blocking calls
Blocking calls can only succeed if the target Secure Partition is idle.

Change-Id: Iabeaa0b8d3e653fd8581fa086758936abfc1c772
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz d54f0cab3b SPM: Support blocking calls
Note that the arguments passed during the SMC call don't comply with the
SPCI specifications. This will be fixed in following patches, but it is
needed to implement a few more SPCI SMCs to be able to do it. The
current code allows us to start testing it.

Change-Id: Ief0e75d072b311737fcdb0c6a60ba5b7406a9ee5
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz 07c13a30d2 SPM: Introduce SPRT C host library
Change-Id: If57ec9cc0791f49d9ade83dff9d24ef9047963a8
Co-authored-by: Jean-Paul Etienne <jean-paul.etienne@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 15:04:24 +00:00
Antonio Nino Diaz 56ae97924d SPM: Implement SPCI open/close handle SMCs
Introduce SMCs that open and close handles according to the SPCI
specification.

Change-Id: I65f365f15612e01aa445e783e96e48ae275c39fd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 13:45:41 +00:00
Antonio Nino Diaz e8ce60aeb1 SPM: Introduce SMC handlers for SPCI and SPRT
Change-Id: I2ae9b3bb686c41b2e138132a7bed107925ac861e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 13:45:41 +00:00
Antonio Nino Diaz bbc8100720 SPM: Support multiple xlat tables contexts
Change-Id: Ib7c2529b85bb5930d44907edfc8ead13d3b1ef4d
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-12-11 13:45:41 +00:00