Commit Graph

5134 Commits

Author SHA1 Message Date
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
Tien Hock, Loh 69ae781161 plat: intel: Add MMC OCR voltage information for initialization
MMC stack needs OCR voltage information for the platform to initialize
MMC controller correctly.

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-08 09:29:28 +08:00
Tien Hock, Loh dd8c03b6bf plat: intel: Add MMC OCR voltage information for initialization
MMC stack needs OCR voltage information for the platform to initialize
MMC controller correctly.

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-08 09:26:24 +08:00
Dimitris Papastamos a6561a28d6
Merge pull request #1864 from hadi-asyrafi/mailbox_fix
intel: Mailbox service un-accessible
2019-03-07 13:58:12 +00:00
Dimitris Papastamos f7c8f31e94
Merge pull request #1862 from thloh85-intel/s10_bl2
plat: intel: Improve ECC scrubbing performance
2019-03-07 13:31:41 +00:00
Dimitris Papastamos 8061c458b7
Merge pull request #1868 from Yann-lms/zeromem_device_info
stm32mp1: zeromem device_info struct
2019-03-07 13:31:10 +00:00
Soby Mathew fc43c30d21
Merge pull request #1869 from pbeesley-arm/pb/wiki-import
Pb/wiki import
2019-03-07 13:19:52 +00:00
Paul Beesley 0c6be93fc2 doc: Add and correct headings for imported files
Some files imported from the wiki are missing RST section headers and
other files are using inconsistent characters for the same header level.

Change-Id: I318c843f9bc8fb40074ef90827b9acac06463662
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-07 11:23:32 +00:00
Paul Beesley 12fc6ba73d doc: Add missing CVE links to advisories
Some security advisories did not contain a direct link to the CVE page
on mitre.org.

Change-Id: I80f8f27a25da3a76b564a3e49cafe5e253379f37
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-07 11:23:32 +00:00
Joel Hutton d0f9809d89 doc: Update links within imported wiki content
This patch covers two changes:

- Links that refer to GitHub are updated to point to the
  relevant content on trustedfirmware.org

- Internal links between documents have been updated,
  with the required .rst suffix being added or due
  to a change in the relative locations of the files.

Change-Id: Ibf87da7d2ece726d1c94a9b33a2bbc3129de7779
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-07 11:23:32 +00:00
Joel Hutton 4fe9123024 doc: Migrate a subset of the GitHub wiki content
With the TF wiki being migrated from GitHub to trustedfirmware.org,
some documents will be moved into the docs/ directory within the
repository rather than remaining as external content. The
appropriate action has been decided on a per-document basis.

Change-Id: Id0f615f3418369256f30d2e34e354a115389d105
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-07 11:23:32 +00:00
Alexei Fedorov 7dcbb4f315 BL31: Enable pointer authentication support in warm boot path
In the current Pointer Authentication support added in
commit b86048c40c
PAuth gets enabled in BL31 cold boot entrypoint only,
(see bl31_entrypoint() in bl31\aarch64\bl31_entrypoint.S)
but not in bl31_warm_entrypoint().
This results in EnIA bit [31] in SCTLR_EL3 not being set
and pointer authentication disabled after CPU wake-up event.

Fixes ARM-software/tf-issues#684

Change-Id: I27a67804764dfba2a6d72ca119ca2bcff4f536d6
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-03-07 10:50:10 +00:00
Dimitris Papastamos 534fdec44b
Merge pull request #1860 from pbeesley-arm/pb/todo-cleanup
doc: Remove todo from example code
2019-03-07 09:57:28 +00:00
Yann Gautier 42beea8d70 stm32mp1: zeromem device_info struct
The change of the structure highlighted the fact that all fields are not
correctly initialized with zeroes.

Replace the other memset in the function with zeromem, as it is faster.

Change-Id: I27f45a64e34637f79fa519f486bf5936721ef396
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-03-07 10:56:17 +01:00
Muhammad Hadi Asyrafi Abdul Halim 5bd1b445a9 intel: Mailbox service un-accessible
Change map region for device 2 from non-secure to secure

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-07 13:17:25 +08:00
Tien Hock, Loh a468e75637 drivers: mmc: Fix some issues with MMC stack
Some bugs in MMC stack needs to be fixed:
- scr cannot be local as this will cause cache issue when invalidating
after the read DMA transfer is completed
- ACMD41 needs to send voltage information in initialization, otherwise the
command is a query, thus will not initialize the controller
- when checking device state, retry until the retries counter goes to zero
before failing

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-07 11:34:20 +08:00
Tien Hock, Loh bf8b8fb657 plat: intel: Improve ECC scrubbing performance
We should be using zeromem to scrub memory instead of memset. This would
improve the performance by 200x

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-07 11:28:05 +08:00
Paul Beesley 3d20bf716b Remove todo from example code
Keeping that in the docs is a bit untidy

Change-Id: Ia95246208cee48df1536b4317a8c896ab2c84fc2
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-03-06 10:27:57 +00:00
David Pu c54c7fc358 xlat_tables_v2: print xlat tables without recursion
This patch uses an array on stack to save parent xlat table information when
traversing the xlat tables. It keeps exactly same xlat table traversal
order compared to recursive version.

fixes arm-software/tf-issues#664

Signed-off-by: David Pu <dpu@nvidia.com>
2019-03-05 09:21:39 -08:00
David Pu db8cac2d98 xlat_tables_v2: unmap region without recursion.
This patch uses an array on stack to save parent xlat table information when
traversing the xlat tables. It keeps exactly same xlat table traversal
order compared to recursive version.

fixes arm-software/tf-issues#664

Signed-off-by: David Pu <dpu@nvidia.com>
2019-03-05 09:21:39 -08:00
David Pu 0ffe269215 xlat_tables_v2: map region without recursion.
This patch uses an array on stack to save parent xlat table information when
traversing the xlat tables. It keeps exactly same xlat table traversal
order compared to recursive version.

fixes arm-software/tf-issues#664

Signed-off-by: David Pu <dpu@nvidia.com>
2019-03-05 09:21:36 -08:00
Antonio Niño Díaz f009c5f312
Merge pull request #1847 from jts-arm/mbedtls
Remove Mbed TLS dependency from plat_bl_common.c
2019-03-05 10:39:14 +00:00
Antonio Niño Díaz bf9e90c916
Merge pull request #1855 from dp-arm/dp/ssbs
Ensure proper ID register is checked for feature detection
2019-03-05 09:52:28 +00:00
Antonio Niño Díaz e70ce64c2e
Merge pull request #1853 from vwadekar/dummy_io_storage
Tegra: dummy support for the io_storage backend
2019-03-05 09:52:14 +00:00
Antonio Niño Díaz ba4ae23dde
Merge pull request #1854 from marex/arm/master/atf-v2.0.1
Arm/master/atf v2.0.1
2019-03-05 09:51:58 +00:00
Antonio Niño Díaz 8b02aaed4f
Merge pull request #1852 from sandrine-bailleux-arm/sb/fix-intmgt-doc
Minor fixes in the interrupt framework design guide
2019-03-04 17:05:19 +00:00
Dimitris Papastamos 6ecfda52fc Ensure proper ID register is checked for feature detection
SSBS support is determined by checking ID_AA64PFR1_EL1 and not
ID_AA64PFR0_EL1.

Fixes ARM-Software/tf-issues#679

Change-Id: I8ecba13b850995ec6a6ede3c2a1e02e69a3a95db
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2019-03-04 13:12:17 +00:00
Marek Vasut 9b70cd5f0d rcar_gen3: drivers: pfc: Configure GP5_09 as input on ULCB
Configure the GPIO5 09 pin as input on the ULCB board by default,
since the pin is routed on the expansion connector and not connected
to anything by default.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2019-03-04 13:29:32 +01:00
Marek Vasut 845d8fbb6e rcar_gen3: Add M3-W 3.0 support
Add support for the M3W 3.0 SoC and synchronize the upstream ATF with
Renesas downstream ATF release v2.0.1.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2019-03-04 13:29:32 +01:00
Marek Vasut 4a56163722 rcar_gen3: Add myself as a maintainer
Add myself into the maintainers file to make Jorge's life easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2019-03-04 13:29:31 +01:00
Antonio Niño Díaz c9aa2786f3
Merge pull request #1844 from chandnich/rename_sgiclark
css/sgi: replace all uses of Clark with new product names
2019-03-04 09:52:09 +00:00