danh-arm [Thu, 3 Nov 2016 17:49:32 +0000 (17:49 +0000)]
Merge pull request #749 from sandrine-bailleux-arm/sb/fix-bl1_plat_mem_check-doc
Porting guide: Improve bl1_plat_mem_check() doc
danh-arm [Thu, 3 Nov 2016 17:49:16 +0000 (17:49 +0000)]
Merge pull request #748 from dp-arm/dp/arm-sip
BL31 runtime instrumentation fixes and documentation update
Sandrine Bailleux [Thu, 3 Nov 2016 14:26:37 +0000 (14:26 +0000)]
Porting guide: Improve bl1_plat_mem_check() doc
This patch fixes the type of the return value of bl1_plat_mem_check()
in the porting guide. It also specifies the expected return value.
Change-Id: I7c437342b8bfb1e621d74b2edf0aaf97b913216a
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
dp-arm [Mon, 31 Oct 2016 17:17:21 +0000 (17:17 +0000)]
Perform a cache flush after ENTER PSCI timestamp capture
Without an explicit cache flush, the next timestamp captured might have
a bogus value.
This can happen if the following operations happen in order,
on a CPU that's being powered down.
1) ENTER PSCI timestamp is captured with caches enabled.
2) The next timestamp (ENTER_HW_LOW_PWR) is captured with caches
disabled.
3) On a system that uses a write-back cache configuration, the
cache line that holds the PMF timestamps is evicted.
After step 1), the ENTER_PSCI timestamp is cached and not in main memory.
After step 2), the ENTER_HW_LOW_PWR timestamp is stored in main memory.
Before the CPU power down happens, the hardware evicts the cache line that
contains the PMF timestamps for this service. As a result, the timestamp
captured in step 2) is overwritten with a bogus value.
Change-Id: Ic1bd816498d1a6d4dc16540208ed3a5efe43f529
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
dp-arm [Fri, 14 Oct 2016 10:18:09 +0000 (11:18 +0100)]
user guide: Document `ENABLE_RUNTIME_INSTRUMENTATION` option
Change-Id: I8e50df67e860b9589834445761a7b9927690fdce
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
danh-arm [Thu, 3 Nov 2016 15:13:36 +0000 (15:13 +0000)]
Merge pull request #745 from rockchip-linux/support-rk3399-dram
Support rk3399 dram
danh-arm [Thu, 3 Nov 2016 12:17:38 +0000 (12:17 +0000)]
Merge pull request #746 from antonio-nino-diaz-arm/an/fix-checkpatch
Fix format of patches passed to checkpatch
davidcunado-arm [Mon, 31 Oct 2016 23:12:03 +0000 (23:12 +0000)]
Merge pull request #742 from masahir0y/misc
Comment fixes and .gitignore update
davidcunado-arm [Fri, 28 Oct 2016 22:18:16 +0000 (23:18 +0100)]
Merge pull request #744 from masahir0y/fiptool
fiptool: fix Segmentation fault when only --verbose option is given
Antonio Nino Diaz [Thu, 27 Oct 2016 08:36:09 +0000 (09:36 +0100)]
Fix format of patches passed to checkpatch
Checkpatch is a script developed to verify the style of Linux kernel
patches. As Kernel developers use emails to send patches for review,
checkpatch is prepared for that specific format. This change adapts
the Makefile to use said format.
As a result, indentation in the commit message has been removed, thus
fixing the warnings about Signed-off-by lines being preceded by
whitespace.
Fixes ARM-software/tf-issues#432
Change-Id: I00cb86365fe15f7e2c3a99a306c8eb51cf02fe86
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
davidcunado-arm [Thu, 27 Oct 2016 08:31:29 +0000 (09:31 +0100)]
Merge pull request #741 from sandrine-bailleux-arm/sb/checkpatch-signoff
Mandate 'Signed-off-by' line in commit messages
davidcunado-arm [Thu, 27 Oct 2016 08:31:00 +0000 (09:31 +0100)]
Merge pull request #738 from dp-arm/dp/fiptool-uuid
fiptool: Link `toc_entry` and `image` structures via UUID
Caesar Wang [Wed, 26 Oct 2016 17:13:34 +0000 (01:13 +0800)]
rockchip: close the PD center logic during suspend
The RK3399 supports close the center logic enter power mode,
so we can close PD_CENTER to save more power during suspend.
Therefore, we need to support save/restore the DDR PHY and
controller registers during suspend/resume.
Also, need CL (http://crosreview.com/397399) to check disabling
center logic.
Change-Id: I288defd8e9caa3846d9fa663a33e4d51df1aaa5d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Wed, 26 Oct 2016 17:13:16 +0000 (01:13 +0800)]
rockchip: add support save/restore configuration for DDR during enter S3
This patch intend to support save the registers of the DDR controller
and PHY before suspend, and restore them after resume.
Change-Id: Ia10b476c0b837628ac0f365416a7118292753e96
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Wed, 26 Oct 2016 17:12:47 +0000 (01:12 +0800)]
rockchip: Change dmc register accesses to ATF style for rk3399
This changes the style of dmc register accesses to be a read/write on
a base address plus a register offset instead of reinterpretting a
base address as a struct and accessing members within that struct.
Change-Id: Iead097cd6afdb830d8bc193608cd39d01ce5a6bc
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Wed, 26 Oct 2016 17:12:34 +0000 (01:12 +0800)]
rockchip: Break out common dram code for rk3399
This renames dram.c and dram.h to dfs.c and dfs.h respectively. This
is to make room for common functionality between frequency scaling and
suspend code for the DRAM in a pair of common files named dram.c and
dram.h. It also removes a duplicate enum definition from
dram_spec_timing.h
Change-Id: Ibfa1041f8781401f9d27901fe8c61862bcb05562
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Wed, 26 Oct 2016 17:10:28 +0000 (01:10 +0800)]
rockchip: move pmu registers into another header for rk3399
This moves the PMU register definitions into another file for use in
later patches.
Change-Id: I8b5f1e7938b63ada6a743cf9661c3e474e96e4e4
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Masahiro Yamada [Wed, 26 Oct 2016 04:24:26 +0000 (13:24 +0900)]
fiptool: fix Segmentation fault when only --verbose option is given
Fix the following bug:
$ tools/fiptool/fiptool -v
Segmentation fault (core dumped)
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
davidcunado-arm [Wed, 26 Oct 2016 08:54:36 +0000 (09:54 +0100)]
Merge pull request #724 from rockchip-linux/support-rk3399-sdram
rockchip: optimize the link mechanism for SRAM code
davidcunado-arm [Wed, 26 Oct 2016 08:53:34 +0000 (09:53 +0100)]
Merge pull request #739 from rockchip-linux/fixes-latency
rockchip: fix A72 L2CTLR_DATA_RAM_LATENCY to 5
Caesar Wang [Thu, 4 Aug 2016 12:46:35 +0000 (20:46 +0800)]
rockchip: fix A72 L2CTLR_DATA_RAM_LATENCY to 5
The default value of L2CTLR_DATA_RAM_LATENCY is 2, depends to
the test result on rk3399, the A72 will need lower voltage for
high frequency if it's set to be 5, and almost no effect on performance.
Change-Id: I99a6a43edcc0c58f7775c10f4b85669dc3eff66d
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Tue, 11 Oct 2016 17:47:51 +0000 (01:47 +0800)]
rockchip: clear the power mode status via M0
Due to the PMU design, the PMU may not clear the WAKEUP bit after
wakeup, therefore, the state machine at the power mode may enter
the infinite loop during WFI.
There is a solution that we can use the M0 to monitor the WAKEUP
bit and clear it during power mode, then the state machine will be
recovered immediately. Then, the DUT can exit the WFI normally.
Change-Id: I303628553b728c214bf2d436bd3122032b5e669c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Wed, 12 Oct 2016 00:10:12 +0000 (08:10 +0800)]
rockchip: add M0 source code and build system for RK3399
This CL supports add M0 source code to built into the bl31.bin, the
goal is that we can load the M0 code binary into SRAM and execute it.
We need the M0 help us to clean the power_mode_en bit during the AP
PMU enter the state machine with interrupt, and avoid to the AP can
not exit the loop forever.
Change-Id: I844582c54a1f0d44ca41290d44618df58679f341
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Caesar Wang [Tue, 11 Oct 2016 01:36:00 +0000 (09:36 +0800)]
rockchip: optimize the link mechanism for SRAM code
Add the common extra.ld.S and customized rk3399.ld.S to extend
to more features for different platforms.
For example, we can add SRAM section and specific address to
load there if we need it, and the common bl31.ld.S not need to
be modified.
Therefore, we can remove the unused codes which copying explicitly
from the function pmusram_prepare(). It looks like more clear.
Change-Id: Ibffa2da5e8e3d1d2fca80085ebb296ceb967fce8
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Masahiro Yamada [Sat, 3 Sep 2016 02:40:24 +0000 (11:40 +0900)]
.gitignore: ignore editor backup files
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 24 Sep 2016 09:07:46 +0000 (18:07 +0900)]
Fix comment of plat_reset_handler stub
As described in the Porting Guide, plat_reset_handler should
preserve x19 to x29.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 22 Oct 2016 16:15:21 +0000 (01:15 +0900)]
Docs: fix a typo in Porting Guide about plat_get_my_entrypoint()
Do not double the phrase "called with the".
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Sandrine Bailleux [Mon, 24 Oct 2016 12:09:08 +0000 (13:09 +0100)]
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>
davidcunado-arm [Mon, 24 Oct 2016 11:36:03 +0000 (12:36 +0100)]
Merge pull request #740 from rockchip-linux/rk3399/fixes-cru-typo
rockchip: fixes the wrong CLKSEL_CON count for CRU
Caesar Wang [Thu, 20 Oct 2016 21:14:45 +0000 (14:14 -0700)]
rockchip: fixes the wrong CLKSEL_CON count for CRU
The CRU_CLKSEL_COUNT value is 108, not 0x108.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ib9db066b8b3ecafcee7f645dd5633b55a808e3d7
danh-arm [Tue, 18 Oct 2016 15:32:57 +0000 (16:32 +0100)]
Merge pull request #677 from hzhuang1/gpt
partition: check GPT partition table
dp-arm [Tue, 30 Aug 2016 13:18:58 +0000 (14:18 +0100)]
fiptool: Link `toc_entry` and `image` structures via UUID
The `toc_entry` and `image` data structures had a cyclic
relationship. This patch removes the explicit dependencies and introduces
functions to link them via the UUID.
This change highlights the intent of the code better and makes it more
flexible for future enhancements.
Change-Id: I0c3dd7bfda2a631a3827c8ba4831849c500affe9
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
danh-arm [Mon, 17 Oct 2016 11:20:18 +0000 (12:20 +0100)]
Merge pull request #735 from soby-mathew/sm/aarch32_sctlr
Unify SCTLR initialization for AArch32 normal world
danh-arm [Mon, 17 Oct 2016 11:19:45 +0000 (12:19 +0100)]
Merge pull request #734 from afaerber/make-help
Makefile: Add missing space in help output
danh-arm [Mon, 17 Oct 2016 11:19:34 +0000 (12:19 +0100)]
Merge pull request #730 from dp-arm/dp/uuid-cleanup
Remove non-standard <sys/cdefs.h> include from uuid.h
danh-arm [Mon, 17 Oct 2016 11:19:20 +0000 (12:19 +0100)]
Merge pull request #729 from dp-arm/dp/arm-sip
Add instrumentation support for PSCI
davidcunado-arm [Fri, 14 Oct 2016 11:25:06 +0000 (12:25 +0100)]
Merge pull request #721 from rockchip-linux/fixes-the-clock-select-and-divide-register
rockchip: fixes the clock select and divide register for rk3399
Soby Mathew [Thu, 29 Sep 2016 13:15:57 +0000 (14:15 +0100)]
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>
davidcunado-arm [Thu, 13 Oct 2016 16:49:06 +0000 (17:49 +0100)]
Merge pull request #733 from danh-arm/dh/v1.3-final
Final updates for v1.3 release
davidcunado-arm [Thu, 13 Oct 2016 16:48:29 +0000 (17:48 +0100)]
Merge pull request #736 from davidcunado-arm/dc/v1.3_update
Release v1.3: Minor updates to user guide
David Cunado [Thu, 13 Oct 2016 15:04:12 +0000 (16:04 +0100)]
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>
Dan Handley [Tue, 11 Oct 2016 15:17:11 +0000 (16:17 +0100)]
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>
David Cunado [Tue, 4 Oct 2016 15:06:37 +0000 (16:06 +0100)]
Release v1.3: Update minor version number to 3
Change-Id: I05991543d28e70b67be600b714990af6a8d7ba29
David Cunado [Mon, 3 Oct 2016 17:20:35 +0000 (18:20 +0100)]
Release v1.3: update change-log.md
Updated change-log.md with summary of changes since release v1.2.
Change-Id: Ia1e18ff4b0da567cf12dfcb53e6317e995100bdf
danh-arm [Wed, 12 Oct 2016 16:17:19 +0000 (17:17 +0100)]
Merge pull request #732 from dp-arm/dp/pmf-doc
PMF: Add documentation
dp-arm [Thu, 8 Sep 2016 10:54:22 +0000 (11:54 +0100)]
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>
dp-arm [Fri, 16 Sep 2016 14:46:47 +0000 (15:46 +0100)]
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>
dp-arm [Mon, 19 Sep 2016 10:18:44 +0000 (11:18 +0100)]
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>
dp-arm [Mon, 19 Sep 2016 10:21:03 +0000 (11:21 +0100)]
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>
danh-arm [Wed, 12 Oct 2016 10:52:57 +0000 (11:52 +0100)]
Merge pull request #731 from danh-arm/an/fix-juno-doc
Fix documentation of bootwrapper boot on juno
Antonio Nino Diaz [Wed, 20 Apr 2016 10:55:14 +0000 (11:55 +0100)]
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
danh-arm [Wed, 12 Oct 2016 10:15:35 +0000 (11:15 +0100)]
Merge pull request #728 from yatharth-arm/yk/AArch32_porting_doc
AArch32: Update firmware-design.md
danh-arm [Wed, 12 Oct 2016 10:15:06 +0000 (11:15 +0100)]
Merge pull request #727 from soby-mathew/sm/PSCI_lib_doc
AArch32: Update user-guide and add DTBs
danh-arm [Wed, 12 Oct 2016 10:14:29 +0000 (11:14 +0100)]
Merge pull request #726 from soby-mathew/sm/fix_dt
Fix GICv3 DT to include psci system off/reset
danh-arm [Wed, 12 Oct 2016 10:13:58 +0000 (11:13 +0100)]
Merge pull request #725 from jeenu-arm/fix-duplicate-title
Docs: Rename duplicate title in porting guide
Soby Mathew [Wed, 14 Sep 2016 14:51:44 +0000 (15:51 +0100)]
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
Yatharth Kochar [Wed, 24 Aug 2016 11:20:02 +0000 (12:20 +0100)]
AArch32: Update firmware-design.md
This patch updates the firmware-design.md for AArch32 related changes.
Change-Id: Idf392a44861ab9c1f59f3de4f3435f508b17c678
Jeenu Viswambharan [Tue, 11 Oct 2016 10:43:04 +0000 (11:43 +0100)]
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
Soby Mathew [Wed, 5 Oct 2016 14:38:01 +0000 (15:38 +0100)]
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
Andreas Färber [Mon, 10 Oct 2016 03:18:49 +0000 (05:18 +0200)]
Makefile: Add missing space in help output
Insert a cosmetic space before "(FIP)".
Signed-off-by: Andreas Färber <afaerber@suse.de>
davidcunado-arm [Thu, 29 Sep 2016 09:49:29 +0000 (10:49 +0100)]
Merge pull request #719 from yatharth-arm/yk/AArch32_porting_memcpy
AArch32: Add `memcpy4` function in assembly
davidcunado-arm [Thu, 29 Sep 2016 09:49:14 +0000 (10:49 +0100)]
Merge pull request #720 from soby-mathew/sm/PSCI_lib_docs
Docs: Add the PSCI library integration guide
danh-arm [Wed, 28 Sep 2016 22:26:56 +0000 (23:26 +0100)]
Merge pull request #722 from danh-arm/dh/drop-cla
Drop requirement for CLA in contribution.md
Caesar Wang [Wed, 28 Sep 2016 01:19:30 +0000 (18:19 -0700)]
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
Soby Mathew [Wed, 3 Aug 2016 13:26:51 +0000 (14:26 +0100)]
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
Yatharth Kochar [Wed, 28 Sep 2016 10:00:05 +0000 (11:00 +0100)]
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
Dan Handley [Tue, 20 Sep 2016 16:14:25 +0000 (17:14 +0100)]
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>
davidcunado-arm [Tue, 27 Sep 2016 09:05:29 +0000 (10:05 +0100)]
Merge pull request #718 from sandrine-bailleux-arm/sb/update-deps-v1.3
Upgrade Linaro release, FVPs and mbed TLS versions
Sandrine Bailleux [Fri, 23 Sep 2016 15:20:25 +0000 (16:20 +0100)]
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
davidcunado-arm [Mon, 26 Sep 2016 09:20:08 +0000 (10:20 +0100)]
Merge pull request #717 from sandrine-bailleux-arm/sb/foundation-fvp-v10
Whitelist version 9.6 of Foundation FVP
davidcunado-arm [Fri, 23 Sep 2016 14:54:33 +0000 (15:54 +0100)]
Merge pull request #716 from yatharth-arm/yk/AArch32_porting
AArch32: Fix detection of virtualization support
Yatharth Kochar [Fri, 23 Sep 2016 09:48:29 +0000 (10:48 +0100)]
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
Sandrine Bailleux [Thu, 22 Sep 2016 08:46:50 +0000 (09:46 +0100)]
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
danh-arm [Thu, 22 Sep 2016 16:30:38 +0000 (17:30 +0100)]
Merge pull request #714 from soby-mathew/sm/psci_lib_args
Introduce PSCI Library argument structure
Soby Mathew [Mon, 19 Sep 2016 16:21:15 +0000 (17:21 +0100)]
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
Soby Mathew [Tue, 13 Sep 2016 13:19:08 +0000 (14:19 +0100)]
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
danh-arm [Thu, 22 Sep 2016 16:05:32 +0000 (17:05 +0100)]
Merge pull request #713 from yatharth-arm/yk/AArch32_porting
Add basic AArch32 support for BL1 & BL2
Yatharth Kochar [Tue, 12 Jul 2016 14:47:03 +0000 (15:47 +0100)]
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
Yatharth Kochar [Thu, 30 Jun 2016 13:50:58 +0000 (14:50 +0100)]
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
Yatharth Kochar [Thu, 30 Jun 2016 14:02:31 +0000 (15:02 +0100)]
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
Yatharth Kochar [Mon, 4 Jul 2016 10:26:14 +0000 (11:26 +0100)]
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
Yatharth Kochar [Thu, 30 Jun 2016 13:52:12 +0000 (14:52 +0100)]
AArch32: Add generic changes in BL2
This patch adds generic changes in BL2 to support AArch32 state.
New AArch32 specific assembly/C files are introduced and
some files are moved to AArch32/64 specific folders.
BL2 for AArch64 is refactored but functionally identical.
BL2 executes in Secure SVC mode in AArch32 state.
Change-Id: Ifaacbc2a91f8640876385b953adb24744d9dbde3
Yatharth Kochar [Mon, 4 Jul 2016 10:03:49 +0000 (11:03 +0100)]
AArch32: Add ARM platform changes in BL1
This patch adds ARM platform changes in BL1 for AArch32 state.
It also enables building of BL1 for ARCH=aarch32.
Change-Id: I079be81a93d027f37b0f7d8bb474b1252bb4cf48
Yatharth Kochar [Tue, 28 Jun 2016 16:07:09 +0000 (17:07 +0100)]
AArch32: Add generic changes in BL1
This patch adds generic changes in BL1 to support AArch32 state.
New AArch32 specific assembly/C files are introduced and
some files are moved to AArch32/64 specific folders.
BL1 for AArch64 is refactored but functionally identical.
BL1 executes in Secure Monitor mode in AArch32 state.
NOTE: BL1 in AArch32 state ONLY handles BL1_RUN_IMAGE SMC.
Change-Id: I6e2296374c7efbf3cf2aa1a0ce8de0732d8c98a5
Yatharth Kochar [Tue, 28 Jun 2016 15:58:26 +0000 (16:58 +0100)]
AArch32: Common changes needed for BL1/BL2
This patch adds common changes to support AArch32 state in
BL1 and BL2. Following are the changes:
* Added functions for disabling MMU from Secure state.
* Added AArch32 specific SMC function.
* Added semihosting support.
* Added reporting of unhandled exceptions.
* Added uniprocessor stack support.
* Added `el3_entrypoint_common` macro that can be
shared by BL1 and BL32 (SP_MIN) BL stages. The
`el3_entrypoint_common` is similar to the AArch64
counterpart with the main difference in the assembly
instructions and the registers that are relevant to
AArch32 execution state.
* Enabled `LOAD_IMAGE_V2` flag in Makefile for
`ARCH=aarch32` and added check to make sure that
platform has not overridden to disable it.
Change-Id: I33c6d8dfefb2e5d142fdfd06a0f4a7332962e1a3
Yatharth Kochar [Tue, 13 Sep 2016 16:07:57 +0000 (17:07 +0100)]
ARM platform changes for new version of image loading
This patch adds changes in ARM platform code to use new
version of image loading.
Following are the major changes:
-Refactor the signatures for bl31_early_platform_setup()
and arm_bl31_early_platform_setup() function to use
`void *` instead of `bl31_params_t *`.
-Introduce `plat_arm_bl2_handle_scp_bl2()` to handle
loading of SCP_BL2 image from BL2.
-Remove usage of reserve_mem() function from
`arm_bl1_early_platform_setup()`
-Extract BL32 & BL33 entrypoint info, from the link list
passed by BL2, in `arm_bl31_early_platform_setup()`
-Provides weak definitions for following platform functions:
plat_get_bl_image_load_info
plat_get_next_bl_params
plat_flush_next_bl_params
bl2_plat_handle_post_image_load
-Instantiates a descriptor array for ARM platforms
describing image and entrypoint information for
`SCP_BL2`, `BL31`, `BL32` and `BL33` images.
All the above changes are conditionally compiled using the
`LOAD_IMAGE_V2` flag.
Change-Id: I5e88b9785a3df1a2b2bbbb37d85b8e353ca61049
Yatharth Kochar [Mon, 12 Sep 2016 15:10:33 +0000 (16:10 +0100)]
Changes for new version of image loading in BL1/BL2
This patch adds changes in BL1 & BL2 to use new version
of image loading to load the BL images.
Following are the changes in BL1:
-Use new version of load_auth_image() to load BL2
-Modified `bl1_init_bl2_mem_layout()` to remove using
`reserve_mem()` and to calculate `bl2_mem_layout`.
`bl2_mem_layout` calculation now assumes that BL1 RW
data is at the top of the bl1_mem_layout, which is more
restrictive than the previous BL1 behaviour.
Following are the changes in BL2:
-The `bl2_main.c` is refactored and all the functions
for loading BLxx images are now moved to `bl2_image_load.c`
`bl2_main.c` now calls a top level `bl2_load_images()` to
load all the images that are applicable in BL2.
-Added new file `bl2_image_load_v2.c` that uses new version
of image loading to load the BL images in BL2.
All the above changes are conditionally compiled using the
`LOAD_IMAGE_V2` flag.
Change-Id: Ic6dcde5a484495bdc05526d9121c59fa50c1bf23
Yatharth Kochar [Mon, 12 Sep 2016 15:08:41 +0000 (16:08 +0100)]
Add new version of image loading.
This patch adds capability to load BL images based on image
descriptors instead of hard coded way of loading BL images.
This framework is designed such that it can be readily adapted
by any BL stage that needs to load images.
In order to provide the above capability the following new
platform functions are introduced:
bl_load_info_t *plat_get_bl_image_load_info(void);
This function returns pointer to the list of images that the
platform has populated to load.
bl_params_t *plat_get_next_bl_params(void);
This function returns a pointer to the shared memory that the
platform has kept aside to pass trusted firmware related
information that next BL image needs.
void plat_flush_next_bl_params(void);
This function flushes to main memory all the params that
are passed to next image.
int bl2_plat_handle_post_image_load(unsigned int image_id)
This function can be used by the platforms to update/use
image information for given `image_id`.
`desc_image_load.c` contains utility functions which can be used
by the platforms to generate, load and executable, image list
based on the registered image descriptors.
This patch also adds new version of `load_image/load_auth_image`
functions in-order to achieve the above capability.
Following are the changes for the new version as compared to old:
- Refactor the signature and only keep image_id and image_info_t
arguments. Removed image_base argument as it is already passed
through image_info_t. Given that the BL image base addresses and
limit/size are already provided by the platforms, the meminfo_t
and entry_point_info arguments are not needed to provide/reserve
the extent of free memory for the given BL image.
- Added check for the image size against the defined max size.
This is needed because the image size could come from an
unauthenticated source (e.g. the FIP header).
To make this check, new member is added to the image_info_t
struct for identifying the image maximum size.
New flag `LOAD_IMAGE_V2` is added in the Makefile.
Default value is 0.
NOTE: `TRUSTED_BOARD_BOOT` is currently not supported when
`LOAD_IMAGE_V2` is enabled.
Change-Id: Ia7b643f4817a170d5a2fbf479b9bc12e63112e79
Haojian Zhuang [Wed, 17 Aug 2016 13:05:07 +0000 (21:05 +0800)]
Document: add PLAT_PARTITION_MAX_ENTRIES define
Partition driver requires the "PLAT_PARTITION_MAX_ENTRIES" definition.
By default, it's defined to 128 in partition driver. But it costs a lot
of memory, and only a few partition entries are really used in platform
partition table. If user wants use memory efficiently, user should
define the build flag in platform.mk instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Haojian Zhuang [Thu, 28 Jul 2016 06:19:36 +0000 (14:19 +0800)]
partition: check GPT partition table
Now only support GPT partition table. MBR partition table isn't
supported yet.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
danh-arm [Mon, 19 Sep 2016 10:58:55 +0000 (11:58 +0100)]
Merge pull request #711 from leon-chen-mtk/mt6795_2
Remove MT6795 plat_sip_svc.c to fix Coverity analysis error.
danh-arm [Mon, 19 Sep 2016 10:57:30 +0000 (11:57 +0100)]
Merge pull request #710 from dp-arm/dp/fiptool-usage
fiptool: Invoke command specific usage function
danh-arm [Mon, 19 Sep 2016 10:57:02 +0000 (11:57 +0100)]
Merge pull request #706 from dp-arm/dp/pmf-aligned-svc
Ensure PMF service timestamps are properly aligned on a cache line bo…
danh-arm [Mon, 19 Sep 2016 10:56:39 +0000 (11:56 +0100)]
Merge pull request #705 from dp-arm/dp/pmf-macro-rename
Rename `pmf_calc_timestamp_offset` to `pmf_calc_timestamp_addr`
danh-arm [Mon, 19 Sep 2016 10:56:23 +0000 (11:56 +0100)]
Merge pull request #704 from yatharth-arm/yk/genfw-1495
GICv3: Allow either G1S or G0 interrupts to be configured
danh-arm [Mon, 19 Sep 2016 10:55:56 +0000 (11:55 +0100)]
Merge pull request #702 from jeenu-arm/psci-node-hw-state
Support for PSCI NODE_HW_STATE
danh-arm [Mon, 19 Sep 2016 10:54:27 +0000 (11:54 +0100)]
Merge pull request #701 from dp-arm/dp/fiptool-sha256
fiptool: Add support for printing the sha256 digest with info command
Leon Chen [Mon, 19 Sep 2016 06:20:42 +0000 (14:20 +0800)]
Remove MT6795 plat_sip_svc.c to fix Coverity analysis error.
davidcunado-arm [Fri, 16 Sep 2016 12:57:10 +0000 (13:57 +0100)]
Merge pull request #709 from Xilinx/zynqmp-2016-09
xilinx: ZynqMP updates
- new SIP calls for bitstream programming
- new SIP call to discover the SOC silicon version
- support the delay timer
Jeenu Viswambharan [Thu, 4 Aug 2016 08:43:15 +0000 (09:43 +0100)]
CSS: Implement support for NODE_HW_STATE
This patch implements CSS platform hook to support NODE_HW_STATE PSCI
API. The platform hook queries SCP to obtain CSS power state. Power
states returned by SCP are then converted to expected PSCI return codes.
Juno's PSCI operation structure is modified to use the CSS
implementation.
Change-Id: I4a5edac0e5895dd77b51398cbd78f934831dafc0