Commit Graph

1493 Commits

Author SHA1 Message Date
Sandrine Bailleux 8c0e51ebb7 Mandate 'Signed-off-by' line in commit messages
This patch updates the configuration file for the checkpatch.pl
script to check for the presence of a 'Signed-off-by' line in the
commit message. This is now required by TF contribution process.

Change-Id: I8bcd6d39a5dcd85547244d60c10a7cd2148c404f

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2016-10-24 13:44:59 +01:00
danh-arm e1c4274091 Merge pull request #735 from soby-mathew/sm/aarch32_sctlr
Unify SCTLR initialization for AArch32 normal world
2016-10-17 12:20:18 +01:00
danh-arm 1281a42f6f Merge pull request #734 from afaerber/make-help
Makefile: Add missing space in help output
2016-10-17 12:19:45 +01:00
danh-arm 274e84406d Merge pull request #730 from dp-arm/dp/uuid-cleanup
Remove non-standard <sys/cdefs.h> include from uuid.h
2016-10-17 12:19:34 +01:00
danh-arm 66b4542a5f Merge pull request #729 from dp-arm/dp/arm-sip
Add instrumentation support for PSCI
2016-10-17 12:19:20 +01:00
davidcunado-arm 5cab1a4a18 Merge pull request #721 from rockchip-linux/fixes-the-clock-select-and-divide-register
rockchip: fixes the clock select and divide register for rk3399
2016-10-14 12:25:06 +01:00
Soby Mathew b7b0787da8 Unify SCTLR initialization for AArch32 normal world
The values of CP15BEN, nTWI & nTWE bits in SCTLR_EL1 are architecturally
unknown if EL3 is AARCH64 whereas they reset to 1 if EL3 is AArch32. This
might be a compatibility break for legacy AArch32 normal world software if
these bits are not set to 1 when EL3 is AArch64. This patch enables the
CP15BEN, nTWI and nTWE bits in the SCTLR_EL1 if the lower non-secure EL is
AArch32. This unifies the SCTLR settings for lower non-secure EL in AArch32
mode for both AArch64 and AArch32 builds of Trusted Firmware.

Fixes ARM-software/tf-issues#428

Change-Id: I3152d1580e4869c0ea745c5bd9da765f9c254947
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2016-10-14 09:53:22 +01:00
davidcunado-arm 6bb37adc20 Merge pull request #733 from danh-arm/dh/v1.3-final
Final updates for v1.3 release
2016-10-13 17:49:06 +01:00
davidcunado-arm fd0201bc30 Merge pull request #736 from davidcunado-arm/dc/v1.3_update
Release v1.3: Minor updates to user guide
2016-10-13 17:48:29 +01:00
David Cunado 49db6f1cba Release v1.3: Minor updates to user guide
Updated the user guide to clarify building FIP for AArch32.
The instructions were previously specific to building a FIP for AArch64.

Change-Id: I7bd1a6b8e810cfda411f707e04f479006817858e
Signed-off-by: David Cunado <david.cunado@arm.com>
2016-10-13 17:45:12 +01:00
Dan Handley 3a2879450f Update readme.md for v1.3
Update the release notes (readme.md) for the ARM Trusted Firmware
v1.3 release.

Change-Id: Ia1f4eb1897e63eeab7d69a593ba0ad91d50043f5
Signed-off-by: Dan Handley <dan.handley@arm.com>
2016-10-13 15:18:11 +01:00
David Cunado d4e748f30b Release v1.3: Update minor version number to 3
Change-Id: I05991543d28e70b67be600b714990af6a8d7ba29
2016-10-13 15:17:39 +01:00
David Cunado 6ad67cc858 Release v1.3: update change-log.md
Updated change-log.md with summary of changes since release v1.2.

Change-Id: Ia1e18ff4b0da567cf12dfcb53e6317e995100bdf
2016-10-13 15:17:39 +01:00
danh-arm b314c9fa88 Merge pull request #732 from dp-arm/dp/pmf-doc
PMF: Add documentation
2016-10-12 17:17:19 +01:00
dp-arm 514a94c2dc PMF: Add documentation
Add a Performance Measurement Framework (PMF) section
to the firmware design document.

Change-Id: I5953bd3b1067501f190164c8827d2b0d8022fc0b
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-10-12 17:04:16 +01:00
dp-arm 9e23f9abf5 Remove non-standard <sys/cdefs.h> include from uuid.h
This include provides nothing useful for TF and prevents building
the fiptool using musl libc[0].

[0] https://www.musl-libc.org/

Change-Id: Ied35e16b9ea2b40213433f2a8185dddc59077884
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-10-12 15:37:37 +01:00
dp-arm 872be88a29 Add PMF instrumentation points in TF
In order to quantify the overall time spent in the PSCI software
implementation, an initial collection of PMF instrumentation points
has been added.

Instrumentation has been added to the following code paths:

- Entry to PSCI SMC handler.  The timestamp is captured as early
  as possible during the runtime exception and stored in memory
  before entering the PSCI SMC handler.

- Exit from PSCI SMC handler.  The timestamp is captured after
  normal return from the PSCI SMC handler or if a low power state
  was requested it is captured in the bl31 warm boot path before
  return to normal world.

- Entry to low power state.  The timestamp is captured before entry
  to a low power state which implies either standby or power down.
  As these power states are mutually exclusive, only one timestamp
  is defined to describe both.  It is possible to differentiate between
  the two power states using the PSCI STAT interface.

- Exit from low power state.  The timestamp is captured after a standby
  or power up operation has completed.

To calculate the number of cycles spent running code in Trusted Firmware
one can perform the following calculation:

(exit_psci - enter_psci) - (exit_low_pwr - enter_low_pwr).

The resulting number of cycles can be converted to time given the
frequency of the counter.

Change-Id: Ie3b8f3d16409b6703747093b3a2d5c7429ad0166
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-10-12 15:36:49 +01:00
dp-arm f10796a068 Introduce ARM SiP service
This patch adds ARM SiP service for use by ARM standard platforms.
This service is added to support the SMC interface for the Performance
measurement framework(PMF).

Change-Id: I26f5712f9ab54f5f721dd4781e35a16f40aacc44
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-10-12 15:36:45 +01:00
danh-arm 2c8df7c12c Merge pull request #731 from danh-arm/an/fix-juno-doc
Fix documentation of bootwrapper boot on juno
2016-10-12 11:52:57 +01:00
Antonio Nino Diaz 7486eb0475 Fix documentation of bootwrapper boot on juno
The user guide incorrectly claimed that it is possible to load a
bootwrapped kernel over JTAG on Juno in the same manner as an EL3
payload. In the EL3 payload boot flow, some of the platform
initialisations in BL2 are modified. In particular, the TZC settings
are modified to allow unrestricted access to DRAM. This in turn allows
the debugger to access the DRAM and therefore to load the image there.

In the BL33-preloaded boot flow though, BL2 uses the default TZC
programming, which prevent access to most of the DRAM from secure state.
When execution reaches the SPIN_ON_BL1_EXIT loop, the MMU is disabled
and thus DS-5 presumably issues secure access transactions while trying
to load the image, which fails.

One way around it is to stop execution at the end of BL2 instead. At
this point, the MMU is still enabled and the DRAM is mapped as
non-secure memory. Therefore, the debugger is allowed to access this
memory in this context and to sucessfully load the bootwrapped kernel in
DRAM. The user guide is updated to suggest this alternative method.

Co-Authored-By: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Dan Handley <dan.handley@arm.com>

Change-Id: I537ea1c6d2f96edc06bc3f512e770c748bcabe94
2016-10-12 11:42:06 +01:00
danh-arm c81894d759 Merge pull request #728 from yatharth-arm/yk/AArch32_porting_doc
AArch32: Update firmware-design.md
2016-10-12 11:15:35 +01:00
danh-arm ea68f8c774 Merge pull request #727 from soby-mathew/sm/PSCI_lib_doc
AArch32: Update user-guide and add DTBs
2016-10-12 11:15:06 +01:00
danh-arm 2010cf7305 Merge pull request #726 from soby-mathew/sm/fix_dt
Fix GICv3 DT to include psci system off/reset
2016-10-12 11:14:29 +01:00
danh-arm c31e707efb Merge pull request #725 from jeenu-arm/fix-duplicate-title
Docs: Rename duplicate title in porting guide
2016-10-12 11:13:58 +01:00
Soby Mathew 5e21d795b4 AArch32: Update user-guide and add DTBs
This patch adds necessary updates for building and running Trusted
Firmware for AArch32 to user-guide.md. The instructions for running
on both `FVP_Base_AEMv8A-AEMv8A` in AArch32 mode and
`FVP_Base_Cortex-A32x4` models are added. The device tree files for
AArch32 Linux kernel are also added in the `fdts` folder.

Change-Id: I0023b6b03e05f32637cb5765fdeda8c8df2d0d3e
2016-10-11 17:39:30 +01:00
Yatharth Kochar 9a3236ea43 AArch32: Update firmware-design.md
This patch updates the firmware-design.md for AArch32 related changes.

Change-Id: Idf392a44861ab9c1f59f3de4f3435f508b17c678
2016-10-11 17:02:58 +01:00
Jeenu Viswambharan ec2653a742 Docs: Rename duplicate title in porting guide
Fix one of the two titles that ended up being the same, although both
describe different things.

Change-Id: I66ecf369643709898ee4c014659d8f85c0480643
2016-10-11 11:45:14 +01:00
Soby Mathew 78c4f19293 Fix GICv3 DT to include psci system off/reset
The `fvp-base-gicv3-psci` and `fvp-foundation-gicv3-psci` device tree source
files did not have psci node entries for `system off` and `system reset`.
Also the DTS files included `rtsm_ve-motherboard-no_psci.dtsi` instead of
`rtsm_ve-motherboard.dtsi`. As a result, the Linux kernel failed to invoke
the PSCI_SYSTEM_OFF/RESET API when being shutdown/reset. This patch corrects
this problem and also updates the corresponding DTB files.

This patch also removes `rtsm_ve-motherboard-no_psci.dtsi` and
`fvp-foundation-motherboard-no_psci.dtsi` files as they are no longer used.

Change-Id: I8ba61a1323035f7508cae663bb490ac0e8a64618
2016-10-11 11:03:28 +01:00
Andreas Färber 59dead2415 Makefile: Add missing space in help output
Insert a cosmetic space before "(FIP)".

Signed-off-by: Andreas Färber <afaerber@suse.de>
2016-10-10 05:21:33 +02:00
davidcunado-arm a5a4231008 Merge pull request #719 from yatharth-arm/yk/AArch32_porting_memcpy
AArch32: Add `memcpy4` function in assembly
2016-09-29 10:49:29 +01:00
davidcunado-arm ecc959097c Merge pull request #720 from soby-mathew/sm/PSCI_lib_docs
Docs: Add the PSCI library integration guide
2016-09-29 10:49:14 +01:00
danh-arm eebb91e21a Merge pull request #722 from danh-arm/dh/drop-cla
Drop requirement for CLA in contribution.md
2016-09-28 23:26:56 +01:00
Caesar Wang 4d5d98c77c rockchip: fixes the clock select and divide register for rk3399
As the new RK3399TRM v1.1, there are some wrong set for CRU_CLKSEL_CON
register.

As the CRU_CLKSEL_CON96~107 high 16-bit isn't write mask and the
CRU_CLKSEL_CON offset is 0x100,not 0x80.

Change-Id: Ie127e9de74b87100af9a0150aad43e89e4972529
2016-09-29 00:51:19 +08:00
Soby Mathew 9e534b2015 Docs: Add the PSCI library integration guide
This patch adds the PSCI library integration guide for AArch32 ARMv8-A
systems `psci-lib-integration-guide.md` to the documentation. The
patch also adds appropriate reference to the new document in
the `firmware-design.md` document.

Change-Id: I2d5b5c6b612452371713399702e318e3c73a8ee0
2016-09-28 16:56:10 +01:00
Yatharth Kochar 9c1dceb106 AArch32: Add `memcpy4` function in assembly
At present the `el3_entrypoint_common` macro uses `memcpy`
function defined in lib/stdlib/mem.c file, to copy data
from ROM to RAM for BL1. Depending on the compiler being
used the stack could potentially be used, in `memcpy`,
for storing the local variables. Since the stack is
initialized much later in `el3_entrypoint_common` it
may result in unknown behaviour.

This patch adds `memcpy4` function definition in assembly so
that it can be used before the stack is initialized and it
also replaces `memcpy` by `memcpy4` in `el3_entrypoint_common`
macro, to copy data from ROM to RAM for BL1.

Change-Id: I3357a0e8095f05f71bbbf0b185585d9499bfd5e0
2016-09-28 14:03:47 +01:00
Dan Handley 110740d326 Drop requirement for CLA in contribution.md
It is no longer necessary for contributors to send a CLA to ARM
before making contributions. Contributors must instead add a
"Signed-off-by:" line to each commit, which certifies that the
contribution is made under the Developer Certificate of Origin
(DCO).

Update contributing.md to reflect this new policy and add a copy of
the DCO to the repository.

Change-Id: I7ca98bffc3bf57e8bdd51d763c24f13e415a328b
Signed-off-by: Dan Handley <dan.handley@arm.com>
2016-09-27 21:52:03 +01:00
davidcunado-arm bfd925139f Merge pull request #718 from sandrine-bailleux-arm/sb/update-deps-v1.3
Upgrade Linaro release, FVPs and mbed TLS versions
2016-09-27 10:05:29 +01:00
Sandrine Bailleux 605a4fc70d Upgrade Linaro release, FVPs and mbed TLS versions
This patch updates the User Guide to recommend the latest version
of some of the software dependencies of ARM Trusted Firmware.

 - Upgrade Linaro release:     16.02 -> 16.06

 - Upgrade FVPs
    - Foundation v8 FVP:       9.5 -> 10.1
    - Base FVPs:               7.6 -> 7.7

 - Upgrade mbed TLS library:   2.2.0 -> 2.2.1

Note that the latest release of mbed TLS as of today is 2.3.0 but it has
compilations issues with the set of library configuration options that
Trusted Firmware uses. 2.2.1 is the next most recent release known to
build with TF.

This patch also fixes the markdown formatting of a link in the
User Guide.

Change-Id: Ieb7dd336f4d3110fba060afec4ad580ae707a8f1
2016-09-27 09:30:58 +01:00
davidcunado-arm bce266f07b Merge pull request #717 from sandrine-bailleux-arm/sb/foundation-fvp-v10
Whitelist version 9.6 of Foundation FVP
2016-09-26 10:20:08 +01:00
davidcunado-arm ec413b885c Merge pull request #716 from yatharth-arm/yk/AArch32_porting
AArch32: Fix detection of virtualization support
2016-09-23 15:54:33 +01:00
Yatharth Kochar fabf3017cf AArch32: Fix detection of virtualization support
The Virtualization field in the ID_PFR1 register has only 2
valid values (0 or 1) but it was incorrectly checked against
unrelated value tied to the SPSR register instead.

This patch fixes the detection of virtualization support by
using the valid values in BL1 context management code.

Change-Id: If12592e343770e1da90f0f5fecf0a3376047ac29
2016-09-23 14:34:29 +01:00
Sandrine Bailleux 4faa4a1d3d Whitelist version 9.6 of Foundation FVP
This prevents a warning being emitted in the console during FVP
configuration setup when using the Foundation FVP 9.6 onwards.

Change-Id: I685b8bd0dbd0119af4b0cb3f7d708fcc08e99561
2016-09-23 13:22:19 +01:00
danh-arm 06fbe47280 Merge pull request #714 from soby-mathew/sm/psci_lib_args
Introduce PSCI Library argument structure
2016-09-22 17:30:38 +01:00
Soby Mathew 58e946aec5 PSCI: Do psci_setup() as part of std_svc_setup()
This patch moves the invocation of `psci_setup()` from BL31 and SP_MIN
into `std_svc_setup()` as part of ARM Standard Service initialization.
This allows us to consolidate ARM Standard Service initializations which
will be added to in the future. A new function `get_arm_std_svc_args()`
is introduced to get arguments corresponding to each standard service.
This function must be implemented by the EL3 Runtime Firmware and both
SP_MIN and BL31 implement it.

Change-Id: I38e1b644f797fa4089b20574bd4a10f0419de184
2016-09-22 17:07:20 +01:00
Soby Mathew f426fc0519 PSCI: Introduce PSCI Library argument structure
This patch introduces a `psci_lib_args_t` structure which must be
passed into `psci_setup()` which is then used to initialize the PSCI
library. The `psci_lib_args_t` is a versioned structure so as to enable
compatibility checks during library initialization. Both BL31 and SP_MIN
are modified to use the new structure.

SP_MIN is also modified to add version string and build message as part
of its cold boot log just like the other BLs in Trusted Firmware.

NOTE: Please be aware that this patch modifies the prototype of
`psci_setup()`, which breaks compatibility with EL3 Runtime Firmware
(excluding BL31 and SP_MIN) integrated with the PSCI Library.

Change-Id: Ic3761db0b790760a7ad664d8a437c72ea5edbcd6
2016-09-22 17:07:20 +01:00
danh-arm 44abeaa632 Merge pull request #713 from yatharth-arm/yk/AArch32_porting
Add basic AArch32 support for BL1 & BL2
2016-09-22 17:05:32 +01:00
Yatharth Kochar 03a3042b04 AArch32: Add support for ARM Cortex-A32 MPCore Processor
This patch adds ARM Cortex-A32 MPCore Processor support
in the CPU specific operations framework. It also includes
this support for the Base FVP port.

Change-Id: If3697b88678df737c29f79cf3fa1ea2cb6fa565d
2016-09-21 16:28:55 +01:00
Yatharth Kochar d991551872 AArch32: Support in SP_MIN to receive arguments from BL2
This patch adds support in SP_MIN to receive generic and
platform specific arguments from BL2.

The new signature is as following:
    void sp_min_early_platform_setup(void *from_bl2,
         void *plat_params_from_bl2);

ARM platforms have been modified to use this support.

Note: Platforms may break if using old signature.
      Default value for RESET_TO_SP_MIN is changed to 0.

Change-Id: I008d4b09fd3803c7b6231587ebf02a047bdba8d0
2016-09-21 16:28:46 +01:00
Yatharth Kochar 3bdf0e5df2 AArch32: Refactor SP_MIN to support RESET_TO_SP_MIN
This patch uses the `el3_entrypoint_common` macro to initialize
CPU registers, in SP_MIN entrypoint.s file, in both cold and warm
boot path. It also adds conditional compilation, in cold and warm
boot entry path, based on RESET_TO_SP_MIN.

Change-Id: Id493ca840dc7b9e26948dc78ee928e9fdb76b9e4
2016-09-21 16:28:39 +01:00
Yatharth Kochar 6fe8aa2fa6 AArch32: Add ARM platform changes in BL2
This patch adds ARM platform changes in BL2 for AArch32 state.
It instantiates a descriptor array for ARM platforms describing
image and entrypoint information for `SCP_BL2`, `BL32` and `BL33`.
It also enables building of BL2 for ARCH=aarch32.

Change-Id: I60dc7a284311eceba401fc789311c50ac746c51e
2016-09-21 16:28:25 +01:00