Commit Graph

5164 Commits

Author SHA1 Message Date
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
Dimitris Papastamos 36a540d6c8
Merge pull request #1861 from Yann-lms/checkpatch
Update checkpatch options
2019-03-13 13:58:10 +00:00
Dimitris Papastamos 69905f74b5
Merge pull request #1875 from Yann-lms/bsec
fdts: stm32mp1: add bsec node
2019-03-13 13:57:48 +00:00
Bryan O'Donoghue 520f864e66 bl1-smc-handler: Ensure the lower-order 16 bits of SPSR are programmed
A bug recently fixed in bl2/aarch32/bl2_el3_entrypoint.S relates to
programming the lower-order 16 bits of the SPSR to populate into the CPSR
on eret.

The BL1 smc-handler code is identical and has the same shortfall in
programming the SPSR from the platform defined struct
entry_point_info->spsr.

msr spsr, r1 will only update bits f->[31:24] and c->[7:0] respectively. In
order to ensure the 16 lower-order processor mode bits x->[15:8] and
c->[7:0] this patch changes msr spsr, r1 to msr spsr_xc, r1.

This change ensures we capture the x field, which we are interested in and
not the f field which we are not.

Fixes: f3b4914be3 ('AArch32: Add generic changes in BL1')

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
2019-03-13 10:08:50 +00:00
Bryan O'Donoghue eb20f04ef3 bl2-el3: Fix exit to bl32 by ensuring a more complete write to SPSR
Prior to entry into BL32 we set the SPSR by way of msr spsr, r1.
This unfortunately only writes the bits f->[31:24] and c->[7:0].

This patch updates the bl2 exit path to write the x->[15:8] and c->[7:0]
fields of the SPSR. For the purposes of initial setup of the SPSR the x and
c fields should be sufficient and importantly will capture the necessary
lower-order control bits that f:c alone do not.

This is important to do to ensure the SPSR is set to the mode the platform
intends prior to performing an eret.

Fixes: b1d27b484f ("bl2-el3: Add BL2_EL3 image")

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
2019-03-13 10:08:21 +00:00
Muhammad Hadi Asyrafi Abdul Halim f5ba408c34 intel: QSPI boot enablement
Manages QSPI initialization, configuration and IO handling as boot device

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-13 10:17:14 +08:00
Jacky Bai 179f82a2c6 plat: imx8m: Add the basic support for imx8mm
The i.MX8M Mini is new SOC of the i.MX8M family. it is
focused on delivering the latest and greatest video and
audio experience combining state-of-the-art media-specific
features with high-performance processing while optimized
for lowest power consumption. The i.MX 8M Mini Media Applications
Processor is  14nm FinFET product of the growing i.MX8M family
targeting the consumer & industrial market. It is built in 14LPP
to achieve both high performance and low power consumption
and relies on a powerful fully coherent core complex based on
a quad Cortex-A53 cluster with video and graphics accelerators

this patch add the basic support for i.MX8MM.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2019-03-13 10:14:59 +08:00
Muhammad Hadi Asyrafi Abdul Halim 150f1bc2ee intel: Add driver for QSPI
To support the enablement of QSPI booting

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-13 10:08:24 +08:00
Masahisa Kojima cf6c30e08b plat/arm: mhu: make mhu driver generic
MHU doorbell driver requires arm platform specific
macro "PLAT_CSS_MHU_BASE".
Rename it to "PLAT_MHUV2_BASE", so that platforms other than arm
can use generic MHU doorbell driver.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2019-03-13 09:54:35 +09:00
Masahisa Kojima b67d20297f plat/synquacer: enable SCMI support
Enable the SCMI protocol support in SynQuacer platform.
Aside from power domain, system power and apcore management protocol,
this commit adds the vendor specific protocol(0x80).
This vendor specific protocol is used to get the dram mapping information
from SCP.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2019-03-13 09:54:15 +09:00
Alexei Fedorov fa6f774b28 Allow setting compiler's target architecture
Change-Id: I56ea088f415bdb9077c385bd3450ff4b2cfa2eac
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-03-12 17:04:50 +00:00
Louis Mayencourt 80e1989707 Makefile: fix linking with pie and binutils > 2.27
Since binutils 1a9ccd70f9a7[1] TFA will not link when the PIE option is
used:

    aarch64-linux-gnu-ld: build/fvp/debug/bl31/bl31.elf: Not enough room
        for program headers, try linking with -N
    aarch64-linux-gnu-ld: final link failed: Bad value

This issue was also encountered by u-boot[2] and linux powerpc kernel
[3]. The fix is to provide --no-dynamic-linker for the linker. This
tells the linker that PIE does not need loaded program program headers.

Fix https://github.com/ARM-software/tf-issues/issues/675

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1a9ccd70f9a7
[2] http://git.denx.de/?p=u-boot.git;a=commit;h=e391b1e64b0bd65709a28a4764afe4f32d408243
[3] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=ff45000fcb56b5b0f1a14a865d3541746d838a0a

Change-Id: Ic3c33c795a9b7bdeab0e87c4345153ce2703a524
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-03-12 15:49:47 +00:00
Louis Mayencourt c5da062c3b PIE: Correct minor typographical errors
Change-Id: Ie7832b2ebffe15d53ffe3584e4d23a449d4f81ac
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-03-12 15:49:47 +00:00
Sandrine Bailleux 74f1f64ac8 doc: Minor formatting enhancement
The security advisories would all appear on a single line. Use bullet
points instead to improve the readability.

Change-Id: Id631985d7d559b3632f43d695cffa6735520b64a
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-03-12 15:12:41 +01:00
Sandrine Bailleux 3655ed8715 doc: Fix a broken link in the readme.rst file
Change-Id: I53a4649b17614f711957424ddffed1dcccfc7880
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-03-12 15:12:39 +01:00
Paul Beesley 7d721816a3 drivers: Remove TODO from io_fip.c
The comment suggests checking version numbers and
a checksum but there doesn't seem to be any usable
data for either of these.

For example, fip_toc_header_t doesn't contain any
version information and neither does fip_toc_entry_t.

As the function name "is_valid_header" suggests, this
function is not concerned with checksumming any of
the table of contents entries.

Change-Id: I8673ae5dd37793771760169f26b2f55c15fbf587
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-12 13:42:08 +00:00
Paul Beesley 9a2fffb800 drivers: Remove TODO from io_storage
This TODO was added five years ago so I assume that there is not
going to be a shutdown API added after all.

Change-Id: If0f4e2066454df773bd9bf41ed65d3a10248a2d3
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-12 13:42:08 +00:00
Paul Beesley efb20d8bc3 tools: Remove TODO from fiptool
It is quite unlikely that this number will ever change and, if it
does need to change, we should have a good reason to do so. It
seems that this comment is now redundant.

Change-Id: I409c764080748e338e9bc5606bbdcc475213fb6e
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-12 13:42:08 +00:00
Paul Beesley d5dc774cf0 tools: Remove unused cert_create defines
Change-Id: Iea72ef9ba16325cbce07eea1a975d2a96eede274
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-12 13:42:08 +00:00
Jacky Bai e8837b0aef plat: imx8m: refactor the code to make it reusable
for the i.MX8M SOCs, part of the code for gpc
and PSCI implementation can be reused and make it
common for all these SoCs. this patch extracts
the common part for reuse.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2019-03-12 21:21:03 +08:00
John Tsichritzis 02b5794396 Apply stricter speculative load restriction
The SCTLR.DSSBS bit is zero by default thus disabling speculative loads.
However, we also explicitly set it to zero for BL2 and TSP images when
each image initialises its context. This is done to ensure that the
image environment is initialised in a safe state, regardless of the
reset value of the bit.

Change-Id: If25a8396641edb640f7f298b8d3309d5cba3cd79
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-03-12 11:30:33 +00:00
Tien Hock, Loh 3d0f30bb54 drivers: synopsys: Fix synopsys MMC driver
There are some issues with synopsys MMC driver:
- CMD8 should not expect data (for SD)
- ACMD51 should expect data (Send SCR for SD)
- dw_prepare should not dictate size to be MMC_BLOCK_SIZE, block size is
now handled in the dw_prepare function
- after the CMD completes, when doing dw_read, we need to invalidate cache
and wait for the data transfer to complete
- Need to set FIFO threshold, otherwise DMA might never get the interrupt
to read or write

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-12 14:39:50 +08:00
Dimitris Papastamos 6105c4f8e4
Merge pull request #1872 from Yann-lms/ocr_voltage
mmc: stm32_sdmmc2: fill ocr_voltage
2019-03-11 09:20:47 +00:00
Yann Gautier 89d1d372f6 Remove some warnings when using checkpatch with --strict option
Some checks are ignored as they do not match TF-A coding rules:
PREFER_KERNEL_TYPES, USLEEP_RANGE
or MISRA:
COMPARISON_TO_NULL, UNNECESSARY_PARENTHESES

Change-Id: I335ede89fc872a6169028552d1ba9312fc61a0ba
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-11 10:09:58 +01:00
Yann Gautier 02a76d5ff2 Add the possibility to pass options for checkpatch
It can be handy for example to add --strict option which can detect more
coding issues, even if not mandated by TF-A coding rules.
To use it:
 CHECKPATCH_OPTS="--strict" make checkpatch

Change-Id: I707e4cc2d1250b21f18ff16169b5f1e5ab03a7ed
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-11 10:09:53 +01:00
Yann Gautier d4abda29fb .checkpatch.conf: ignore BRACES warnings
MISRA C:2012	Rule 15.6 asks to have braces for the body of an if,
for, or while statement.
This conflicts with checkpatch, and the warning should then be ignored.

Change-Id: I22589b68b03f19a426d3bcbc10a99d4e4c76eced
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-11 10:09:51 +01:00
Yann Gautier 83f62c877b fdts: stm32mp1: add bsec node
This node is added in a new file stm32mp157c-security.dtsi.
This node includes OTPs that should be shadowed and made readable
to non secure world.
Explicitly add status and secure-status, as these OTPs are accessible
by secure and non-secure world.

The stgen node is also moved to this file.

Change-Id: I3c89a01588d2e411fecfc44997e1c5df2fc37cad
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-11 10:09:34 +01:00
Andre Przywara c48d02bade allwinner: regulators: pick correct DT subnode
So far the DT node describing the AXP803 PMIC used in many Allwinner A64
boards had only one subnode, so our code just entering the first subnode
to find all regulators worked fine.

However recent DT updates in the Linux kernel add more subnodes *before*
that, so we need to make sure to explicitly enter the "regulators"
subnode to find the information we are after.

Improve some DT node parsing error handling on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2019-03-08 15:35:30 +00:00
Heiko Stuebner c6c10b02b8 Fixup register handling in aarch32 reset_handler
The BL handover interface stores the bootloader arguments in
registers r9-r12, so when the reset_handler stores the lr pointer
in r10 it clobers one of the arguments.

Adapt to use r8 and adapt the comment about registers allowed
to clober.

I've checked aarch32 reset_handlers and none seem to use higher
registers as far as I can tell.

Fixes: a6f340fe58 ("Introduce the new BL handover interface")
Cc: Soby Mathew <soby.mathew@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-03-08 15:35:30 +00:00
Luca Ceresoli 78d58519de zynqmp: pm: Add support for setting PMU configuration object
Allow EL2 (e.g. U-Boot) to load the configuration object at runtime
into the Xilinx ZynqMP PMU firmware. This allows booting with U-Boot
and U-Boot SPL with PMU FW without hard-coding the configuration
object.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
2019-03-08 15:35:30 +00:00
Yann Gautier b248bb4a74 mmc: stm32_sdmmc2: fill ocr_voltage
STM32MP1 SDMMC device voltage is 3.3V. We should then precise the 2 ranges
3.2 to 3.3V and 3.3 to 3.4V in ocr_voltage field.

Change-Id: I88e479f8f16bfe608a7808eace0df3fdec48deab
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-08 10:59:00 +01:00
Dimitris Papastamos e2b717e6bd
Merge pull request #1867 from AlexeiFedorov/af/enable_ptrauth_warm_boot
BL31: Enable pointer authentication support in warm boot path
2019-03-08 09:43:54 +00:00
Dimitris Papastamos 8807771ff5
Merge pull request #1870 from thloh85-intel/s10_mmc
plat: intel: Add MMC OCR voltage information for initialization
2019-03-08 09:42:44 +00:00
Dimitris Papastamos 3c652a2d1c
Merge pull request #1863 from thloh85-intel/mmc_fixes
drivers: mmc: Fix some issues with MMC stack
2019-03-08 09:41:22 +00:00