Commit Graph

5147 Commits

Author SHA1 Message Date
Soby Mathew 2c269b4736
Merge pull request #1904 from lmayencourt/lm/move_pie_fixup
PIE: Fix reloc at the beginning of bl31 entrypoint
2019-03-25 11:00:46 +00:00
Louis Mayencourt 330ead8065 PIE: Fix reloc at the beginning of bl31 entrypoint
The relocation fixup code must be called at the beginning of bl31
entrypoint to ensure that CPU specific reset handlers are fixed up for
relocations.

Change-Id: Icb04eacb2d4c26c26b08b768d871d2c82777babb
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-03-25 10:54:59 +00:00
Dimitris Papastamos 981db33f77
Merge pull request #1903 from thloh85-intel/thloh85-integration
driver: synosys: Fix SD MMC not initializing correctly
2019-03-22 16:26:28 +00:00
Tien Hock, Loh 2baa727011 driver: synosys: Fix SD MMC not initializing correctly
dw_params.mmc_dev_type should be assigned before mmc_init, otherwise SDMMC
initialization will fail as the initialization treats the device as EMMC
instead of SD.

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-22 12:54:31 +08:00
Dimitris Papastamos 46d58f80af
Merge pull request #1902 from jts-arm/romlib
ROMLIB bug fixes
2019-03-21 12:40:35 +00:00
John Tsichritzis ae2e01b876 ROMLIB bug fixes
Fixed the below bugs:
1) Bug related to build flag V=1: if the flag was V=0, building with
ROMLIB would fail.
2) Due to a syntax bug in genwrappers.sh, index file entries marked as
"patch" or "reserved" were ignored.
3) Added a prepending hash to constants that genwrappers is generating.
4) Due to broken dependencies, currently the inclusion functionality is
intentionally not utilised. This is why the contents of romlib/jmptbl.i
have been copied to platform specific jmptbl.i files. As a result of the
broken dependencies, when changing the index files, e.g. patching
functions, a clean build is always required. This is a known issue that
will be fixed in the future.

Change-Id: I9d92aa9724e86d8f90fcd3e9f66a27aa3cab7aaa
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-21 10:51:07 +00:00
Dimitris Papastamos cc0dcf428f
Merge pull request #1899 from jts-arm/docs
Add USE_ROMLIB build option to user guide
2019-03-20 12:36:17 +00:00
Dimitris Papastamos 3481800fbd
Merge pull request #1887 from ambroise-arm/av/a76-cve
Cortex-A76: Optimize CVE_2018_3639 workaround
2019-03-20 11:18:20 +00:00
Dimitris Papastamos 5e5c77dbe4
Merge pull request #1901 from AlexeiFedorov/af/restore_pauth_context_smc
Restore PAuth context in case of unknown SMC call
2019-03-20 11:17:33 +00:00
Soby Mathew 859cf9ea33
Merge pull request #1900 from soby-mathew/sm/revert_xlat_changes
xlat_tables_v2: Revert recent changes to remove recursion
2019-03-19 15:25:41 +00:00
Antonio Nino Diaz f253645d69 xlat_tables_v2: Revert recent changes to remove recursion
This commit reverts the following commits:

- c54c7fc358 ("xlat_tables_v2: print xlat tables without recursion")
- db8cac2d98 ("xlat_tables_v2: unmap region without recursion.")
- 0ffe269215 ("xlat_tables_v2: map region without recursion.")

This was part of PR#1843.

A problem has been detected in one of our test run configurations
involving dynamic mapping of regions and it is blocking the next
release. Until the problem can be solved, it is safer to revert
the changes.

Change-Id: I3d5456e4dbebf291c8b74939c6fb02a912e0903b
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2019-03-19 14:56:00 +00:00
John Tsichritzis 5a8f0a3f74 Add USE_ROMLIB build option to user guide
Change-Id: I4261fec500184383980b7fc9475620a485cf6c28
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-19 12:21:37 +00:00
Soby Mathew 75044d8b87
Merge pull request #1894 from jts-arm/e1_midr
Fix MIDR_EL1 value for Neoverse E1
2019-03-18 16:15:12 +00:00
Soby Mathew 1bd0fad925
Merge pull request #1895 from AlexeiFedorov/af/declare_pauth_experimental
Declare ENABLE_PAUTH build option as experimental
2019-03-18 16:09:51 +00:00
Alexei Fedorov 317d68e9de Restore PAuth context in case of unknown SMC call
Change-Id: I8fb346743b7afddbb8bf5908db4f27ee5a26f99b
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-03-18 16:02:16 +00:00
Alexei Fedorov 06715f85d1 Declare PAuth for Secure world as experimental
Declare ENABLE_PAUTH and CTX_INCLUDE_PAUTH_REGS
build options as experimental.
Pointer Authentication is enabled for Non-secure world
irrespective of the value of these build flags if the
CPU supports it.
The patch also fixes the description of fiptool 'help' command.

Change-Id: I46de3228fbcce774a2624cd387798680d8504c38
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-03-18 15:46:22 +00:00
Soby Mathew cc6864927d
Merge pull request #1892 from sandrine-bailleux-arm/sb/pauth
Pointer authentication fixes
2019-03-18 12:48:55 +00:00
John Tsichritzis c4187c9c4b Fix wrong MIDR_EL1 value for Neoverse E1
Change-Id: I75ee39d78c81ecb528a671c0cfadfc2fe7b5d818
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-15 15:40:27 +00:00
Dimitris Papastamos 73050e6970
Merge pull request #1866 from mmind/rockchip-fdt-param
rockchip: add an fdt parsing stub for platform param
2019-03-15 15:29:09 +00:00
Dimitris Papastamos 1fbb682a73
Merge pull request #1888 from jts-arm/zeus
Introduce preliminary support for Neoverse Zeus
2019-03-15 15:28:17 +00:00
Dimitris Papastamos 136b9fa7c2
Merge pull request #1889 from jts-arm/var4
Apply variant 4 mitigation for Neoverse N1
2019-03-15 15:28:08 +00:00
Dimitris Papastamos d409c3eb3e
Merge pull request #1890 from jts-arm/mbedtls
Update documentation for mbed TLS v2.16
2019-03-15 15:27:59 +00:00
Dimitris Papastamos accabf404d
Merge pull request #1891 from soby-mathew/sm/increase_fvp_stack
fvp: Increase the size of the stack for FVP
2019-03-15 11:16:22 +00:00
Heiko Stuebner 7029e80683 rockchip: add an fdt parsing stub for platform param
The Rockchip ATF platform can be entered from both Coreboot and U-Boot.
While Coreboot does submit the list of linked parameter structs as
platform param, upstream u-boot actually always provides a pointer
to a devicetree as parameter.
This results in current ATF not running at all when started from U-Boot.

To fix this, add a stub that checks if the parameter is a fdt so we
can at least boot and not get stuck. Later on we can extend this with
actual parsing of information from the devicetree.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-03-14 22:45:15 +01:00
Louis Mayencourt 01aa5247f0 fvp: Increase the size of the stack for FVP
When RECLAIM_INIT_CODE is 1, the stack is used to contain the .text.init
section. This is by default enable on FVP. Due to the size increase of
the .text.init section, the stack had to be adjusted contain it.

Change-Id: Ia392341970fb86c0426cf2229b1a7295453e2e32
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-03-14 16:02:15 +00:00
John Tsichritzis 62e2d97423 Update documentation for mbed TLS v2.16
Change-Id: I1854b5830dbd48e909a4ce1b931c13fb3e997600
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-14 15:27:19 +00:00
Sandrine Bailleux 47102b35d6 Put Pointer Authentication key value in BSS section
The dummy implementation of the plat_init_apiakey() platform API uses
an internal 128-bit buffer to store the initial key value used for
Pointer Authentication support.

The intent - as stated in the file comments - was for this buffer to
be write-protected by the MMU. Initialization of the buffer would be
performed before enabling the MMU, thus bypassing write protection
checks.

However, the key buffer ended up into its own read-write section by
mistake due to a typo on the section name ('rodata.apiakey' instead of
'.rodata.apiakey', note the leading dot). As a result, the linker
script was not pulling it into the .rodata output section.

One way to address this issue could have been to fix the section
name. However, this approach does not work well for BL1. Being the
first image in the boot flow, it typically is sitting in real ROM
so we don't have the capacity to update the key buffer at any time.

The dummy implementation of plat_init_apiakey() provided at the moment
is just there to demonstrate the Pointer Authentication feature in
action. Proper key management and key generation would have to be a
lot more careful on a production system.

Therefore, the approach chosen here to leave the key buffer in
writable memory but move it to the BSS section. This does mean that
the key buffer could be maliciously updated for intalling unintended
keys on the warm boot path but at the feature is only at an
experimental stage right now, this is deemed acceptable.

Change-Id: I121ccf35fe7bc86c73275a4586b32d4bc14698d6
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-03-14 13:57:27 +01:00
Sandrine Bailleux 3ca26bed7e Fix restoring APIBKey registers
Instruction key A was incorrectly restored in the instruction key B
registers.

Change-Id: I4cb81ac72180442c077898509cb696c9d992eda3
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-03-14 13:57:16 +01:00
John Tsichritzis a4546e80f5 Introduce preliminary support for Neoverse Zeus
Change-Id: If56d1e200a31bd716726d7fdc1cc0ae8a63ba3ee
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-14 11:39:40 +00:00
John Tsichritzis 8074448f09 Apply variant 4 mitigation for Neoverse N1
This patch applies the new MSR instruction to directly set the
PSTATE.SSBS bit which controls speculative loads. This new instruction
is available at Neoverse N1 core so it's utilised.

Change-Id: Iee18a8b042c90fdb72d2b98f364dcfbb17510728
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-14 11:31:43 +00:00
Ambroise Vincent d0d115e214 Cortex-A76: Optimize CVE_2018_3639 workaround
Switched from a static check to a runtime assert to make sure a
workaround is implemented for CVE_2018_3639.

This allows platforms that know they have the SSBS hardware workaround
in the CPU to compile out code under DYNAMIC_WORKAROUND_CVE_2018_3639.

The gain in memory size without the dynamic workaround is 4KB in bl31.

Change-Id: I61bb7d87c59964b0c7faac5d6bc7fc5c4651cbf3
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-14 09:36:12 +00:00
Ambroise Vincent e8383be4a1 Cortex-A76: fix spelling
Change-Id: I6adf7c14e8a974a7d40d51615b5e69eab1a7436f
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-14 09:36:12 +00:00
Soby Mathew d7cf435bed
Merge pull request #1859 from JackyBai/master
refact the imx8m common code and add the imx8mm support
2019-03-13 17:31:36 +00:00
Soby Mathew 620d9832f9
Merge pull request #1883 from ambroise-arm/av/a17-errata
Apply workarounds for errata of Cortex-A17
2019-03-13 15:53:52 +00:00
Ambroise Vincent be10dcde52 Cortex-A17: Implement workaround for errata 852423
Change-Id: I3a101e540f0b134ecf9a51fa3d7d8e3d0369b297
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-13 15:40:45 +00:00
Ambroise Vincent 0b64c19485 Cortex-A17: Implement workaround for errata 852421
Change-Id: Ic3004fc43229d63c5a59ca74c1837fb0604e1f33
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-13 15:40:45 +00:00
Soby Mathew ab15922ebd
Merge pull request #1884 from AlexeiFedorov/af/set_march_to_arch_minor
Allow setting compiler's target architecture
2019-03-13 15:36:58 +00:00
Soby Mathew b9d20d0eda
Merge pull request #1882 from ambroise-arm/av/a15-errata
Apply workarounds for errata of Cortex-A15
2019-03-13 15:34:33 +00:00
Soby Mathew 046c21c216
Merge pull request #1881 from sandrine-bailleux-arm/sb/doc-fixes
Minor doc fixes
2019-03-13 15:33:36 +00:00
Soby Mathew 9d0ac8362a
Merge pull request #1880 from lmayencourt/lm/pie
PIE: fix linking with pie and binutils > 2.27
2019-03-13 15:33:13 +00:00
Soby Mathew b79239db1c
Merge pull request #1879 from pbeesley-arm/pb/todo-removal
Pb/todo removal
2019-03-13 15:32:15 +00:00
Soby Mathew c0ce16fba3
Merge pull request #1878 from jts-arm/sctlr
Apply stricter speculative load restriction
2019-03-13 15:32:00 +00:00
Soby Mathew c61a807a4f
Merge pull request #1874 from hadi-asyrafi/qspi_boot
intel: QSPI boot enablement
2019-03-13 15:31:33 +00:00
Soby Mathew 0976b3487b
Merge pull request #1873 from hadi-asyrafi/driver_qspi
intel: Add driver for QSPI
2019-03-13 15:30:43 +00:00
Soby Mathew d0759c2c44
Merge pull request #1843 from DavidPu/xlat_tables_v2_non_recursion
Remove recursion from xlat_tables_v2 library
2019-03-13 15:26:51 +00:00
Soby Mathew 77913d446c
Merge pull request #1858 from thloh85-intel/dwmmc_fixes
drivers: synopsys: Fix synopsys MMC driver
2019-03-13 15:25:54 +00:00
Soby Mathew eb9da9e182
Merge pull request #1856 from masahisak/synquacer-scmi-support
plat/synquacer: enable SCMI support
2019-03-13 15:24:11 +00:00
Ambroise Vincent 5f2c690d0e Cortex-A15: Implement workaround for errata 827671
This erratum can only be worked around on revisions >= r3p0 because the
register that needs to be accessed only exists in those revisions[1].

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0438g/CIHEAAAD.html

Change-Id: I5d773547d7a09b5bd01dabcd19ceeaf53c186faa
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-13 14:05:47 +00:00
Ambroise Vincent 75a1ada95e Cortex-A15: Implement workaround for errata 816470
Change-Id: I9755252725be25bfd0147839d7df56888424ff84
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-03-13 14:05:47 +00:00
Dimitris Papastamos e082009e05
Merge pull request #1877 from bryanodonoghue/integration+bl2-el3-eret-fix-v2
bl2-el3: Fix exit to bl32 by ensuring full write to SPSR
2019-03-13 13:59:00 +00:00