Sandrine Bailleux [Tue, 16 Aug 2016 09:58:15 +0000 (10:58 +0100)]
Move up to Base FVP version 7.6
This patch updates the User Guide to move up from version 7.2 to 7.6
of the Base FVP.
Change-Id: I792b2250deb4836266e14b40992ae59a5ab5f729
danh-arm [Fri, 12 Aug 2016 11:19:43 +0000 (12:19 +0100)]
Merge pull request #679 from rockchip-linux/support-pwm-for-rk3399
Support pwm for rk3399
Caesar Wang [Mon, 8 Aug 2016 23:53:41 +0000 (07:53 +0800)]
rockchip: fix the reset-hold release for rk3399 resume
The pmusgrf reset-hold bits needs to be released, since the
pmusgrf reset-hold bits needs to be held.
Change-Id: Ia1eccc8fba18294f26b4cc07d47bc5e513dd9a1f
Caesar Wang [Tue, 9 Aug 2016 00:15:44 +0000 (08:15 +0800)]
rockchip: fix the power up/dowm cnt for rk3399
Sometimes this will cause the long delay for suspend/resume.
Since the 24M OCS will be turned off in power mode.
Also, remove the ERROR_DEPRECATED config define.
Change-Id: I78f21c35912c2250972e551695cdacc7bc4c020a
Caesar Wang [Wed, 10 Aug 2016 18:11:45 +0000 (02:11 +0800)]
rockchip: update to handle PWMs for rk3399
This patch updates some things for rk3399, as following:
1) Add the new file to handle the pwm. (e.g. the pwm regulator)
Make sure that good deal with the pwm related things.
Also, remove some pwm setting for pmu.c.
2) Set the plls slow mode and bypass in suspend, and restore them.
Change-Id: I112806700bf433c87763aac23d22fa7e6a7f5264
danh-arm [Tue, 9 Aug 2016 11:20:37 +0000 (12:20 +0100)]
Merge pull request #676 from hzhuang1/fix_io_unaligned
io: block: fix unaligned buffer
danh-arm [Tue, 9 Aug 2016 09:16:36 +0000 (10:16 +0100)]
Merge pull request #661 from dp-arm/master
Replace fip_create with fiptool
Haojian Zhuang [Thu, 28 Jul 2016 02:15:32 +0000 (10:15 +0800)]
io: block: fix unaligned buffer
If buffer address parameter isn't aligned, it may cause
DMA issue in block device driver, as eMMC. Now check the buffer
address. If it's not aligned, use temporary buffer in io block
driver instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
dp-arm [Wed, 25 May 2016 15:20:20 +0000 (16:20 +0100)]
Replace fip_create with fiptool
fiptool provides a more consistent and intuitive interface compared to
the fip_create program. It serves as a better base to build on more
features in the future.
fiptool supports various subcommands. Below are the currently
supported subcommands:
1) info - List the images contained in a FIP file.
2) create - Create a new FIP file with the given images.
3) update - Update an existing FIP with the given images.
4) unpack - Extract a selected set or all the images from a FIP file.
5) remove - Remove images from a FIP file. This is a new command that
was not present in fip_create.
To create a new FIP file, replace "fip_create" with "fiptool create".
To update a FIP file, replace "fip_create" with "fiptool update".
To dump the contents of a FIP file, replace "fip_create --dump" with
"fiptool info".
A compatibility script that emulates the basic functionality of
fip_create is provided. Existing scripts might or might not work with
the compatibility script. Users are strongly encouraged to migrate to
fiptool.
Fixes ARM-Software/tf-issues#87
Fixes ARM-Software/tf-issues#108
Fixes ARM-Software/tf-issues#361
Change-Id: I7ee4da7ac60179cc83cf46af890fd8bc61a53330
danh-arm [Thu, 28 Jul 2016 16:35:46 +0000 (17:35 +0100)]
Merge pull request #668 from sandrine-bailleux-arm/sb/rodata-xn-doc
Documentation for SEPARATE_CODE_AND_RODATA build flag
Sandrine Bailleux [Thu, 7 Jul 2016 13:23:04 +0000 (14:23 +0100)]
Documentation for SEPARATE_CODE_AND_RODATA build flag
This patch documents the effect, cost and benefits of the
SEPARATE_CODE_AND_RODATA build flag.
Change-Id: Ic8daf0563fa6335930ad6c70b9c35f678e84d39d
danh-arm [Thu, 28 Jul 2016 08:53:25 +0000 (09:53 +0100)]
Merge pull request #674 from rockchip-linux/Support-PWMs-for-rk3399-suspend/resume
rockchip: fixes typo and some bugs for suspend/resume tests
danh-arm [Thu, 28 Jul 2016 08:25:40 +0000 (09:25 +0100)]
Merge pull request #673 from soby-mathew/sm/coverity_issue
Improve debug assertion for runtime svc number
danh-arm [Thu, 28 Jul 2016 08:25:28 +0000 (09:25 +0100)]
Merge pull request #672 from soby-mathew/sm/irouter_offset
GICv3: Fix the GICD_IROUTER offset
danh-arm [Thu, 28 Jul 2016 08:23:10 +0000 (09:23 +0100)]
Merge pull request #671 from antonio-nino-diaz-arm/an/unoptimised-mem
ARM platforms: Define common image sizes
Caesar Wang [Thu, 21 Jul 2016 02:36:22 +0000 (10:36 +0800)]
rockchip: fixes typo and some bugs for suspend/resume tests
1. Remove the AP_PWROFF in ATF, should configure it in kernel.
2. Save and restore the PWMs pin/regs for suspend/resume.
3. The pmusgrf reset-hold bits needs to be released. since the
pmusgrf reset-hold bits needs to be held.
4. Configure the PMU power up/down cycles about delay 3ms.
5. With the MMIO register block as one big mapping.
6. Fix the build error with psci_entrypoint since PSCI lib updated.
Fixes the commit
9ec78bd ("rockchip: support the suspend/resume for rk3399").
Change-Id: I112806700bf433c87763aac23d22fa7e6a7f5264
Soby Mathew [Tue, 26 Jul 2016 16:46:56 +0000 (17:46 +0100)]
GICv3: Fix the GICD_IROUTER offset
This patch fixes the offset of GICD_IROUTER register defined in gicv3.h.
Although the GICv3 documention mentions that the offset for this register
is 0x6100-0x7FD8, the offset calculation for an interrupt id `n` is :
0x6000 + 8n, where n >= 32
This requires the offset for GICD_IROUTER to be defined as 0x6000.
Fixes ARM-software/tf-issues#410
Change-Id: If9e91e30d946afe7f1f60fea4f065c7567093fa8
Soby Mathew [Tue, 26 Jul 2016 15:09:44 +0000 (16:09 +0100)]
Improve debug assertion for runtime svc number
This patch improves the debug assertion for runtime svc number
- Remove useless comparison ensuring that the number of descriptors
is a positive number. The variable is an unsigned integer so can't
be negative.
- Check that the end address of the descriptors is sane relative
to the start address.
Change-Id: Iea7be6b34e33b8b1cbd394eb923cc834ea964831
danh-arm [Tue, 26 Jul 2016 13:35:07 +0000 (14:35 +0100)]
Merge pull request #670 from achingupta/ag/psci_retention_fix
Fix use of stale power states in PSCI standby finisher
danh-arm [Tue, 26 Jul 2016 13:34:13 +0000 (14:34 +0100)]
Merge pull request #669 from sandrine-bailleux-arm/sb/tf-hardening
Minor improvements to harden TF code
Achin Gupta [Tue, 28 Jun 2016 15:46:15 +0000 (16:46 +0100)]
Fix use of stale power states in PSCI standby finisher
A PSCI CPU_SUSPEND request to place a CPU in retention states at power levels
higher than the CPU power level is subject to the same state coordination as a
power down state. A CPU could implement multiple retention states at a
particular power level. When exiting WFI, the non-CPU power levels may be in a
different retention state to what was initially requested, therefore each CPU
should refresh its view of the states of all power levels.
Previously, a CPU re-used the state of the power levels when it entered the
retention state. This patch fixes this issue by ensuring that a CPU upon exit
from retention reads the state of each power level afresh.
Change-Id: I93b5f5065c63400c6fd2598dbaafac385748f989
Sandrine Bailleux [Tue, 12 Jul 2016 08:12:24 +0000 (09:12 +0100)]
Ensure addresses in is_mem_free() don't overflow
This patch adds some runtime checks to prevent some potential
pointer overflow issues in the is_mem_free() function. The overflow
could happen in the case where the end addresses, computed as the
sum of a base address and a size, results in a value large enough
to wrap around. This, in turn, could lead to unpredictable behaviour.
If such an overflow is detected, the is_mem_free() function will now
declare the memory region as not free. The overflow is detected using
a new macro, called check_uptr_overflow().
This patch also modifies all other places in the 'bl_common.c' file
where an end address was computed as the sum of a base address and a
size and instead keeps the two values separate. This avoids the need
to handle pointer overflows everywhere. The code doesn't actually need
to compute any end address before the is_mem_free() function is called
other than to print information message to the serial output.
This patch also introduces 2 slight changes to the reserve_mem()
function:
- It fixes the end addresses passed to choose_mem_pos(). It was
incorrectly passing (base + size) instead of (base + size - 1).
- When the requested allocation size is 0, the function now exits
straight away and says so using a warning message.
Previously, it used to actually reserve some memory. A zero-byte
allocation was not considered as a special case so the function
was using the same top/bottom allocation mechanism as for any
other allocation. As a result, the smallest area of memory starting
from the requested base address within the free region was
reserved.
Change-Id: I0e695f961e24e56ffe000718014e0496dc6e1ec6
Sandrine Bailleux [Tue, 28 Jun 2016 15:48:30 +0000 (16:48 +0100)]
Make runtime_svc_init() function more robust
- Added some debug assertions checking that the runtime services
indexes computed by get_unique_oen() are sane.
- Do not print the name of the service when its descriptor is
invalid. If the descriptor is corrupted then its name field
could be corrupted as well and we would end up reading an
arbitrary amount of invalid memory.
Change-Id: I16f61065277d01fe1555d5a9cf743f7b52ccaa60
Sandrine Bailleux [Tue, 28 Jun 2016 15:44:28 +0000 (16:44 +0100)]
Improvements to runtime service init code
Light refactoring of the code in runtime_svc.c file.
- Declare validate_rt_svc_desc()'s argument as const.
- Remove 'goto' path in runtime_svc_init(). It was used in one
place only.
- Improve code readability by declaring a local variable holding the
service pointer.
Change-Id: I3b15c5adb9f37b786b5b993a9be70ea9dd017a83
Sandrine Bailleux [Wed, 22 Jun 2016 15:35:01 +0000 (16:35 +0100)]
Validate psci_find_target_suspend_lvl() result
This patch adds a runtime check that psci_find_target_suspend_lvl()
returns a valid value back to psci_cpu_suspend() and psci_get_stat().
If it is invalid, BL31 will now panic.
Note that on the PSCI CPU suspend path there is already a debug
assertion checking the validity of the target composite power state,
which effectively also checks the validity of the target suspend level.
Therefore, the error condition would already be caught in debug builds,
but in a release build this assertion would be compiled out.
On the PSCI stat path, there is currently no debug assertion checking
the validity of the power state before using it as an index into
the power domain state array.
Although BL31 platforms ports are responsible for validating the
power state parameter, the security impact (i.e. an out-of-bounds
array access) of a potential platform port bug in this code would
be quite high, given that this parameter comes from an untrusted
source. The cost of checking this in runtime generic code is low.
Change-Id: Icea85b8020e39928ac03ec0cd49805b5857b3906
danh-arm [Mon, 25 Jul 2016 11:29:52 +0000 (12:29 +0100)]
Merge pull request #667 from soby-mathew/sm/PSCI_lib
Introduce PSCI library
Antonio Nino Diaz [Mon, 25 Jul 2016 11:04:31 +0000 (12:04 +0100)]
ARM platforms: Define common image sizes
Compile option `ARM_BOARD_OPTIMISE_MMAP` has been renamed to
`ARM_BOARD_OPTIMISE_MEM` because it now applies not only to defines
related to the translation tables but to the image size as well.
The defines `PLAT_ARM_MAX_BL1_RW_SIZE`, `PLAT_ARM_MAX_BL2_SIZE` and
`PLAT_ARM_MAX_BL31_SIZE` have been moved to the file board_arm_def.h.
This way, ARM platforms no longer have to set their own values if
`ARM_BOARD_OPTIMISE_MEM=0` and they can specify optimized values
otherwise. The common sizes have been set to the highest values used
for any of the current build configurations.
This is needed because in some build configurations some images are
running out of space. This way there is a common set of values known
to work for all of them and it can be optimized for each particular
platform if needed.
The space reserved for BL2 when `TRUSTED_BOARD_BOOT=0` has been
increased. This is needed because when memory optimisations are
disabled the values for Juno of `PLAT_ARM_MMAP_ENTRIES` and
`MAX_XLAT_TABLES` are higher. If in this situation the code is
compiled in debug mode and with "-O0", the code won't fit.
Change-Id: I70a3d8d3a0b0cad1d6b602c01a7ea334776e718e
Soby Mathew [Fri, 8 Jul 2016 14:26:35 +0000 (15:26 +0100)]
Rearrange assembly helper macros
This patch moves assembler macros which are not architecture specific
to a new file `asm_macros_common.S` and moves the `el3_common_macros.S`
into `aarch64` specific folder.
Change-Id: I444a1ee3346597bf26a8b827480cd9640b38c826
Soby Mathew [Thu, 7 Jul 2016 09:03:21 +0000 (10:03 +0100)]
Define `plat_get_syscnt_freq2()` unconditionally for ARM platforms
Previously the definition of `plat_get_syscnt_freq2()` in `arm_common.c` was
conditionally defined based on the ERROR_DEPRECATED flag. This patch makes
this function available irrespective of the flag and removes the deprecated
`plat_get_syscnt_freq()` definition.
Change-Id: I250ca787ca1b5e867096c6ba8f2bb444db44c97b
Soby Mathew [Mon, 9 May 2016 16:20:10 +0000 (17:20 +0100)]
Cater for preloaded BL33 within plat_get_ns_image_entrypoint()
The PRELOADED_BL33_BASE build option allows to preload a BL33 and bypass its
loading by BL2. In ARM standard platforms, the conditional behaviour of
PRELOADED_BL33_BASE is moved within the implementation of
`plat_get_ns_image_entrypoint()` so that all callers may benefit from this
feature.
Change-Id: Iea060e204ec72f8081087837854535c4e320da4e
Soby Mathew [Thu, 7 Jul 2016 07:45:56 +0000 (08:45 +0100)]
Move `arm_common.c` out of aarch64 folder
This patch moves the `arm_common.c` file from `plat/arm/common/aarch64/`
to the parent directory since the functions implemented in the file are
not AArch64 specific. The platform makefiles are also modified for this
change.
Change-Id: I776d2e4958f59041476cf2f53a9adb5b2d304ee0
Soby Mathew [Tue, 3 May 2016 11:31:18 +0000 (12:31 +0100)]
Include `plat_psci_common.c` from the new location
The `plat_psci_common.c` was moved to the new location `plat/common`
and a stub file was retained at previous location for compatibility. This
patch modifies the platform makefiles to include the file from the new
location.
Change-Id: Iabddeeb824e9a5d72d176d7c644735966c8c0699
Soby Mathew [Fri, 29 Apr 2016 18:01:30 +0000 (19:01 +0100)]
Introduce PSCI Library Interface
This patch introduces the PSCI Library interface. The major changes
introduced are as follows:
* Earlier BL31 was responsible for Architectural initialization during cold
boot via bl31_arch_setup() whereas PSCI was responsible for the same during
warm boot. This functionality is now consolidated by the PSCI library
and it does Architectural initialization via psci_arch_setup() during both
cold and warm boots.
* Earlier the warm boot entry point was always `psci_entrypoint()`. This was
not flexible enough as a library interface. Now PSCI expects the runtime
firmware to provide the entry point via `psci_setup()`. A new function
`bl31_warm_entrypoint` is introduced in BL31 and the previous
`psci_entrypoint()` is deprecated.
* The `smc_helpers.h` is reorganized to separate the SMC Calling Convention
defines from the Trusted Firmware SMC helpers. The former is now in a new
header file `smcc.h` and the SMC helpers are moved to Architecture specific
header.
* The CPU context is used by PSCI for context initialization and
restoration after power down (PSCI Context). It is also used by BL31 for SMC
handling and context management during Normal-Secure world switch (SMC
Context). The `psci_smc_handler()` interface is redefined to not use SMC
helper macros thus enabling to decouple the PSCI context from EL3 runtime
firmware SMC context. This enables PSCI to be integrated with other runtime
firmware using a different SMC context.
NOTE: With this patch the architectural setup done in `bl31_arch_setup()`
is done as part of `psci_setup()` and hence `bl31_platform_setup()` will be
invoked prior to architectural setup. It is highly unlikely that the platform
setup will depend on architectural setup and cause any failure. Please be
be aware of this change in sequence.
Change-Id: I7f497a08d33be234bbb822c28146250cb20dab73
Soby Mathew [Thu, 24 Mar 2016 16:56:29 +0000 (16:56 +0000)]
Introduce `el3_runtime` and `PSCI` libraries
This patch moves the PSCI services and BL31 frameworks like context
management and per-cpu data into new library components `PSCI` and
`el3_runtime` respectively. This enables PSCI to be built independently from
BL31. A new `psci_lib.mk` makefile is introduced which adds the relevant
PSCI library sources and gets included by `bl31.mk`. Other changes which
are done as part of this patch are:
* The runtime services framework is now moved to the `common/` folder to
enable reuse.
* The `asm_macros.S` and `assert_macros.S` helpers are moved to architecture
specific folder.
* The `plat_psci_common.c` is moved from the `plat/common/aarch64/` folder
to `plat/common` folder. The original file location now has a stub which
just includes the file from new location to maintain platform compatibility.
Most of the changes wouldn't affect platform builds as they just involve
changes to the generic bl1.mk and bl31.mk makefiles.
NOTE: THE `plat_psci_common.c` FILE HAS MOVED LOCATION AND THE STUB FILE AT
THE ORIGINAL LOCATION IS NOW DEPRECATED. PLATFORMS SHOULD MODIFY THEIR
MAKEFILES TO INCLUDE THE FILE FROM THE NEW LOCATION.
Change-Id: I6bd87d5b59424995c6a65ef8076d4fda91ad5e86
Soby Mathew [Tue, 3 May 2016 16:11:42 +0000 (17:11 +0100)]
Fix coding guideline warnings
This patch fixes some coding guideline warnings reported by the checkpatch
script. Only files related to upcoming feature development have been fixed.
Change-Id: I26fbce75c02ed62f00493ed6c106fe7c863ddbc5
Soby Mathew [Thu, 16 Jun 2016 13:52:04 +0000 (14:52 +0100)]
Rework type usage in Trusted Firmware
This patch reworks type usage in generic code, drivers and ARM platform files
to make it more portable. The major changes done with respect to
type usage are as listed below:
* Use uintptr_t for storing address instead of uint64_t or unsigned long.
* Review usage of unsigned long as it can no longer be assumed to be 64 bit.
* Use u_register_t for register values whose width varies depending on
whether AArch64 or AArch32.
* Use generic C types where-ever possible.
In addition to the above changes, this patch also modifies format specifiers
in print invocations so that they are AArch64/AArch32 agnostic. Only files
related to upcoming feature development have been reworked.
Change-Id: I9f8c78347c5a52ba7027ff389791f1dad63ee5f8
danh-arm [Mon, 18 Jul 2016 15:20:30 +0000 (16:20 +0100)]
Merge pull request #666 from Xilinx/zynqmp/rodata-xn
zynqmp: Map read-only data as execute-never
danh-arm [Mon, 18 Jul 2016 15:18:37 +0000 (16:18 +0100)]
Merge pull request #654 from rockchip-linux/rk3399-suspend-resume
rockchip: support the suspend/resume for rk3399
danh-arm [Mon, 18 Jul 2016 15:18:24 +0000 (16:18 +0100)]
Merge pull request #653 from rockchip-linux/support-rockchip-sip-runtime-service
rockchip: support plat SIP runtime service for rk3399
Tony Xie [Sat, 16 Jul 2016 03:16:51 +0000 (11:16 +0800)]
rockchip: support the suspend/resume for rk3399
1.Fixes the suspend/resume some bugs.
2.Add the power domain for saving power consumption.
3.Add cpu clusters suspend for rk3399 SoCs
Change-Id: Id602779016b41d6281f4ba40a20229d909b28e46
Caesar Wang [Tue, 21 Jun 2016 06:44:01 +0000 (14:44 +0800)]
rockchip: support plat SIP runtime service
Software executing in the normal world and in the trusted world at
exception levels lower than EL3 will request runtime services using the
SMC instruction.
See the documentation here:
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/
rt-svc-writers-guide.md
This to be implemented as an EL3 Runtime Service in rockchip BL31
platform port, using the "SiP Service Call" range as specified in the
SMC Calling Convention.
This doesn't support any SMC yet, we will support it in later.
Change-Id: I0a638dd0b653c28b08f79d89f77ed7c69864017d
danh-arm [Fri, 15 Jul 2016 17:55:43 +0000 (18:55 +0100)]
Merge pull request #662 from sandrine-bailleux-arm/sb/rodata-xn
Map read-only data as execute-never
danh-arm [Fri, 15 Jul 2016 17:23:11 +0000 (18:23 +0100)]
Merge pull request #659 from soby-mathew/sm/declare_stack
Derive stack alignment from CACHE_WRITEBACK_GRANULE
danh-arm [Fri, 15 Jul 2016 17:22:32 +0000 (18:22 +0100)]
Merge pull request #658 from soby-mathew/sm/init_spi_ppi_gic
GIC: Ensure SGIs and PPIs are Group0 before setup
danh-arm [Fri, 15 Jul 2016 17:14:41 +0000 (18:14 +0100)]
Merge pull request #655 from Xilinx/report_merr
bl31: Add error reporting registers
Naga Sureshkumar Relli [Fri, 1 Jul 2016 07:22:41 +0000 (12:52 +0530)]
bl31: Add error reporting registers
This patch adds cpumerrsr_el1 and l2merrsr_el1 to the register dump on
error for applicable CPUs.
These registers hold the ECC errors on L1 and L2 caches.
This patch updates the A53, A57, A72, A73 (l2merrsr_el1 only) CPU libraries.
Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Soren Brinkmann [Fri, 8 Jul 2016 21:45:14 +0000 (14:45 -0700)]
zynqmp: Separate code and rodata
Set the SEPARATE_CODE_AND_RODATA build flag to map read-only data as
execute never.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Sandrine Bailleux [Tue, 14 Jun 2016 16:01:00 +0000 (17:01 +0100)]
ARM CSS platforms: Map flash as execute-never by default
On ARM CSS platforms, the whole flash used to be mapped as executable.
This is not required, given that the flash is used to store the BL1
and FIP images and:
- The FIP is not executed in place, its images are copied to RAM
and executed from there.
- BL1 is executed in place from flash but only its code needs to be
mapped as executable and platform code takes care of re-mapping
BL1's read-only section as executable.
Therefore, this patch now maps the flash as non-executable by default
on these platforms. This increases security by restricting the
executable region to what is strictly needed.
This patch also adds some comments to clarify the memory mapping
attributes on these platforms.
Change-Id: I4db3c145508bea1f43fbe0f6dcd551e1aec1ecd3
Sandrine Bailleux [Mon, 20 Jun 2016 12:57:10 +0000 (13:57 +0100)]
Add some verbose traces in arm_setup_page_tables()
This patch adds some verbose traces in the arm_setup_page_tables()
function to print the extents of the different memory regions it maps.
Change-Id: Ia3ae1053e7ebf3579601ff9238b0e3791eb1e9e4
Sandrine Bailleux [Fri, 8 Jul 2016 13:38:16 +0000 (14:38 +0100)]
ARM platforms: Add support for SEPARATE_CODE_AND_RODATA
The arm_setup_page_tables() function used to expect a single set of
addresses defining the extents of the whole read-only section, code
and read-only data mixed up, which was mapped as executable.
This patch changes this behaviour. arm_setup_page_tables() now
expects 2 separate sets of addresses:
- the extents of the code section;
- the extents of the read-only data section.
The code is mapped as executable, whereas the data is mapped as
execute-never. New #defines have been introduced to identify the
extents of the code and the read-only data section. Given that
all BL images except BL1 share the same memory layout and linker
script structure, these #defines are common across these images.
The slight memory layout differences in BL1 have been handled by
providing values specific to BL1.
Note that this patch also affects the Xilinx platform port, which
uses the arm_setup_page_tables() function. It has been updated
accordingly, such that the memory mappings on this platform are
unchanged. This is achieved by passing null values as the extents
of the read-only data section so that it is ignored. As a result,
the whole read-only section is still mapped as executable.
Fixes ARM-software/tf-issues#85
Change-Id: I1f95865c53ce6e253a01286ff56e0aa1161abac5
Sandrine Bailleux [Mon, 20 Jun 2016 09:10:40 +0000 (10:10 +0100)]
ARM platforms: Include BL2U's RO section in total memory region
This patch changes the base address of the "total" Trusted SRAM region
seen by the BL2U image. It used to start just after BL2U's read-only
section (i.e. at address BL2U_RO_LIMIT), it now starts from the base
address of the BL2U image (i.e. at address BL2U_BASE). In other words,
the "total" memory region now includes BL2U's own read-only section.
This does not change BL2U's resulting memory mappings because the
read-only section was already mapped in BL2U, it just wasn't part of
this total memory region.
Change-Id: I2da16ac842469023b41904eaa8d13ed678d65671
Sandrine Bailleux [Wed, 15 Jun 2016 14:44:27 +0000 (15:44 +0100)]
ARM platforms: Restrict mapping of Trusted ROM in BL1
At the moment, on ARM platforms, BL1 maps everything from BL1_RO_BASE
to BL1_RO_LIMIT. BL1_RO_LIMIT, as defined in the porting guide, is
the maximum address in Trusted ROM that BL1's actual content _can_
occupy. The actual portion of ROM occupied by BL1 can be less than
that, which means that BL1 might map more Trusted ROM than it actually
needs to.
This patch changes BL1's memory mappings on ARM platforms to restrict
the region of Trusted ROM it maps. It uses the symbols exported by
the linker to figure out the actual extents of BL1's ROM footprint.
This change increases the number of page tables used on FVP by 1.
On FVP, we used to map the whole Trusted ROM. As it is 64MB large,
we used to map it as blocks of 2MB using level-2 translation table
entries. We now need a finer-grained mapping, which requires an
additional level-3 translation table.
On ARM CSS platforms, the number of translation tables is unchanged.
The BL1 image resides in flash at address 0x0BEC0000. This address is
not aligned on a 2MB-boundary so a level-3 translation table was
already required to map this memory.
Change-Id: I317a93fd99c40e70d0f13cc3d7a570f05c6c61eb
Sandrine Bailleux [Thu, 16 Jun 2016 13:24:26 +0000 (14:24 +0100)]
TSP: Print BL32_BASE rather than __RO_START__
In debug builds, the TSP prints its image base address and size.
The base address displayed corresponds to the start address of the
read-only section, as defined in the linker script.
This patch changes this to use the BL32_BASE address instead, which is
the same address as __RO_START__ at the moment but has the advantage
to be independent of the linker symbols defined in the linker script
as well as the layout and order of the sections.
Change-Id: I032d8d50df712c014cbbcaa84a9615796ec902cc
Sandrine Bailleux [Fri, 8 Jul 2016 13:37:40 +0000 (14:37 +0100)]
Introduce SEPARATE_CODE_AND_RODATA build flag
At the moment, all BL images share a similar memory layout: they start
with their code section, followed by their read-only data section.
The two sections are contiguous in memory. Therefore, the end of the
code section and the beginning of the read-only data one might share
a memory page. This forces both to be mapped with the same memory
attributes. As the code needs to be executable, this means that the
read-only data stored on the same memory page as the code are
executable as well. This could potentially be exploited as part of
a security attack.
This patch introduces a new build flag called
SEPARATE_CODE_AND_RODATA, which isolates the code and read-only data
on separate memory pages. This in turn allows independent control of
the access permissions for the code and read-only data.
This has an impact on memory footprint, as padding bytes need to be
introduced between the code and read-only data to ensure the
segragation of the two. To limit the memory cost, the memory layout
of the read-only section has been changed in this case.
- When SEPARATE_CODE_AND_RODATA=0, the layout is unchanged, i.e.
the read-only section still looks like this (padding omitted):
| ... |
+-------------------+
| Exception vectors |
+-------------------+
| Read-only data |
+-------------------+
| Code |
+-------------------+ BLx_BASE
In this case, the linker script provides the limits of the whole
read-only section.
- When SEPARATE_CODE_AND_RODATA=1, the exception vectors and
read-only data are swapped, such that the code and exception
vectors are contiguous, followed by the read-only data. This
gives the following new layout (padding omitted):
| ... |
+-------------------+
| Read-only data |
+-------------------+
| Exception vectors |
+-------------------+
| Code |
+-------------------+ BLx_BASE
In this case, the linker script now exports 2 sets of addresses
instead: the limits of the code and the limits of the read-only
data. Refer to the Firmware Design guide for more details. This
provides platform code with a finer-grained view of the image
layout and allows it to map these 2 regions with the appropriate
access permissions.
Note that SEPARATE_CODE_AND_RODATA applies to all BL images.
Change-Id: I936cf80164f6b66b6ad52b8edacadc532c935a49
Sandrine Bailleux [Thu, 16 Jun 2016 14:05:39 +0000 (15:05 +0100)]
Introduce round_up/down() macros
This patch introduces the round_up() and round_down() macros,
which round up (respectively down) a value to a given boundary.
The boundary must be a power of two.
Change-Id: I589dd1074aeb5ec730dd523b4ebf098d55a7e967
Sandrine Bailleux [Tue, 5 Jul 2016 08:55:03 +0000 (09:55 +0100)]
Introduce utils.h header file
This patch introduces a new header file: include/lib/utils.h.
Its purpose is to provide generic macros and helper functions that
are independent of any BL image, architecture, platform and even
not specific to Trusted Firmware.
For now, it contains only 2 macros: ARRAY_SIZE() and
IS_POWER_OF_TWO(). These were previously defined in bl_common.h and
xlat_tables.c respectively.
bl_common.h includes utils.h to retain compatibility for platforms
that relied on bl_common.h for the ARRAY_SIZE() macro. Upstream
platform ports that use this macro have been updated to include
utils.h.
Change-Id: I960450f54134f25d1710bfbdc4184f12c049a9a9
Sandrine Bailleux [Wed, 15 Jun 2016 12:53:50 +0000 (13:53 +0100)]
BL1: Add linker symbol identifying end of ROM content
This patch adds a new linker symbol in BL1's linker script named
'__BL1_ROM_END__', which marks the end of BL1's ROM content. This
covers BL1's code, read-only data and read-write data to relocate
in Trusted SRAM. The address of this new linker symbol is exported
to C code through the 'BL1_ROM_END' macro.
The section related to linker symbols in the Firmware Design guide
has been updated and improved.
Change-Id: I5c442ff497c78d865ffba1d7d044511c134e11c7
Sandrine Bailleux [Tue, 14 Jun 2016 15:31:09 +0000 (16:31 +0100)]
xlat lib: Introduce MT_EXECUTE/MT_EXECUTE_NEVER attributes
This patch introduces the MT_EXECUTE/MT_EXECUTE_NEVER memory mapping
attributes in the translation table library to specify the
access permissions for instruction execution of a memory region.
These new attributes should be used only for normal, read-only
memory regions. For other types of memory, the translation table
library still enforces the following rules, regardless of the
MT_EXECUTE/MT_EXECUTE_NEVER attribute:
- Device memory is always marked as execute-never.
- Read-write normal memory is always marked as execute-never.
Change-Id: I8bd27800a8c1d8ac1559910caf4a4840cf25b8b0
Sandrine Bailleux [Tue, 14 Jun 2016 15:29:04 +0000 (16:29 +0100)]
xlat lib: Refactor mmap_desc() function
This patch clarifies the mmap_desc() function by adding some comments
and reorganising its code. No functional change has been introduced.
Change-Id: I873493be17b4e60a89c1dc087dd908b425065401
Sandrine Bailleux [Wed, 18 May 2016 15:11:47 +0000 (16:11 +0100)]
Introduce arm_setup_page_tables() function
This patch introduces the arm_setup_page_tables() function to
set up page tables on ARM platforms. It replaces the
arm_configure_mmu_elx() functions and does the same thing except
that it doesn't enable the MMU at the end. The idea is to reduce
the amount of per-EL code that is generated by the C preprocessor
by splitting the memory regions definitions and page tables creation
(which is generic) from the MMU enablement (which is the only per-EL
configuration).
As a consequence, the call to the enable_mmu_elx() function has been
moved up into the plat_arch_setup() hook. Any other ARM standard
platforms that use the functions `arm_configure_mmu_elx()` must be
updated.
Change-Id: I6f12a20ce4e5187b3849a8574aac841a136de83d
Soby Mathew [Thu, 9 Jun 2016 16:16:35 +0000 (17:16 +0100)]
Derive stack alignment from CACHE_WRITEBACK_GRANULE
The per-cpu stacks should be aligned to the cache-line size and
the `declare_stack` helper in asm_macros.S macro assumed a
cache-line size of 64 bytes. The platform defines the cache-line
size via CACHE_WRITEBACK_GRANULE macro. This patch modifies
`declare_stack` helper macro to derive stack alignment from the
platform defined macro.
Change-Id: I1e1b00fc8806ecc88190ed169f4c8d3dd25fe95b
Soby Mathew [Tue, 7 Jun 2016 16:06:27 +0000 (17:06 +0100)]
GIC: Ensure SGIs and PPIs are Group0 before setup
The legacy GIC driver assumes that the SGIs and PPIs are Group0 during
initialization. This is true if the driver is the first one to initialize
the GIC hardware after reset. But in some cases, earlier BL stages could
have already initialized the GIC hardware which means that SGI and PPI
configuration are not the expected reset values causing assertion failure
in `gicd_set_ipriorityr()`. This patch explicitly resets the SGI and PPI
to Group0 prior to their initialization in the driver. The same patch is
not done in the GICv2-only driver because unlike in the legacy driver,
`gicd_set_ipriorityr()` of GICv2 driver doesn't enforce this policy and
the appropriate group is set irrespective of the initial value.
Fixes ARM-software/tf-issues#396
Change-Id: I521d35caa37470ce542c796c2ba99716e4763105
danh-arm [Wed, 6 Jul 2016 16:35:37 +0000 (17:35 +0100)]
Merge pull request #657 from yatharth-arm/yk/genfw-1505
Fix `cert_create` tool for Segmentation fault
Yatharth Kochar [Wed, 22 Jun 2016 13:49:27 +0000 (14:49 +0100)]
Fix `cert_create` tool for Segmentation fault
With the introduction of commit `
96103d5a`, the Certificate
Generation tool is not able to generate FWU certificate and
while doing so it does segmentation fault.
This happens because it is now required to pass non-volatile
counter values to the `cert_create` tool from the command line
for creating the trusted firmware certificates.
But in case of creating FWU certificate these counter values are not
being passed to the tool and as a consequence the `cert_create` tool
try to use the NULL argument and errors out with Segmentation fault.
This patch fixes this issue by providing a check before using the
command line argument passed in the case of `EXT_TYPE_NVCOUNTER`
certificate extension.
Change-Id: Ie17d0c1502b52aaa8500f3659c2da2448ab0347a
danh-arm [Mon, 4 Jul 2016 17:05:15 +0000 (18:05 +0100)]
Merge pull request #651 from Xilinx/zynqmp_uart
zynqmp: Make UART selectable
danh-arm [Mon, 4 Jul 2016 15:32:24 +0000 (16:32 +0100)]
Merge pull request #652 from soby-mathew/sm/pmf_psci_stat
Introduce PMF and implement PSCI STAT APIs
Soby Mathew [Mon, 23 May 2016 15:07:53 +0000 (16:07 +0100)]
Enable PSCI_STAT_COUNT/RESIDENCY for ARM standard platforms
This patch enables optional PSCI functions `PSCI_STAT_COUNT` and
`PSCI_STAT_RESIDENCY` for ARM standard platforms. The optional platform
API 'translate_power_state_by_mpidr()' is implemented for the Juno
platform. 'validate_power_state()' on Juno downgrades PSCI CPU_SUSPEND
requests for the system power level to the cluster power level.
Hence, it is not suitable for validating the 'power_state' parameter
passed in a PSCI_STAT_COUNT/RESIDENCY call.
Change-Id: I9548322676fa468d22912392f2325c2a9f96e4d2
Yatharth Kochar [Mon, 9 May 2016 17:26:35 +0000 (18:26 +0100)]
Add optional PSCI STAT residency & count functions
This patch adds following optional PSCI STAT functions:
- PSCI_STAT_RESIDENCY: This call returns the amount of time spent
in power_state in microseconds, by the node represented by the
`target_cpu` and the highest level of `power_state`.
- PSCI_STAT_COUNT: This call returns the number of times a
`power_state` has been used by the node represented by the
`target_cpu` and the highest power level of `power_state`.
These APIs provides residency statistics for power states that has
been used by the platform. They are implemented according to v1.0
of the PSCI specification.
By default this optional feature is disabled in the PSCI
implementation. To enable it, set the boolean flag
`ENABLE_PSCI_STAT` to 1. This also sets `ENABLE_PMF` to 1.
Change-Id: Ie62e9d37d6d416ccb1813acd7f616d1ddd3e8aff
Yatharth Kochar [Fri, 11 Mar 2016 14:20:19 +0000 (14:20 +0000)]
Add Performance Measurement Framework(PMF)
This patch adds Performance Measurement Framework(PMF) in the
ARM Trusted Firmware. PMF is implemented as a library and the
SMC interface is provided through ARM SiP service.
The PMF provides capturing, storing, dumping and retrieving the
time-stamps, by enabling the development of services by different
providers, that can be easily integrated into ARM Trusted Firmware.
The PMF capture and retrieval APIs can also do appropriate cache
maintenance operations to the timestamp memory when the caller
indicates so.
`pmf_main.c` consists of core functions that implement service
registration, initialization, storing, dumping and retrieving
the time-stamp.
`pmf_smc.c` consists SMC handling for registered PMF services.
`pmf.h` consists of the macros that can be used by the PMF service
providers to register service and declare time-stamp functions.
`pmf_helpers.h` consists of internal macros that are used by `pmf.h`
By default this feature is disabled in the ARM trusted firmware.
To enable it set the boolean flag `ENABLE_PMF` to 1.
NOTE: The caller is responsible for specifying the appropriate cache
maintenance flags and for acquiring/releasing appropriate locks
before/after capturing/retrieving the time-stamps.
Change-Id: Ib45219ac07c2a81b9726ef6bd9c190cc55e81854
Soren Brinkmann [Fri, 10 Jun 2016 16:57:14 +0000 (09:57 -0700)]
zynqmp: Add option to select between Cadence UARTs
Add build time option 'cadence1' for ZYNQMP_CONSOLE to select the 2nd
UART available in the SoC.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
danh-arm [Wed, 15 Jun 2016 14:57:02 +0000 (15:57 +0100)]
Merge pull request #650 from Xilinx/zynqmp-updates
Zynqmp updates
Soren Brinkmann [Thu, 9 Jun 2016 20:36:27 +0000 (13:36 -0700)]
build_macros: Add 'add_define_val' macro
Add a convenience macro to add a build definition with a value.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
danh-arm [Mon, 13 Jun 2016 12:50:58 +0000 (13:50 +0100)]
Merge pull request #629 from ljerry/tf_issue_398
Bring IO storage dummy driver
danh-arm [Mon, 13 Jun 2016 10:27:31 +0000 (11:27 +0100)]
Merge pull request #648 from ashutoshksingh/integration
opteed: assume aarch64 for optee
danh-arm [Mon, 13 Jun 2016 10:09:08 +0000 (11:09 +0100)]
Merge pull request #646 from davwan01/dw/gicv3-wakeup
CSS: Add support to wake up the core from wfi in GICv3
danh-arm [Mon, 13 Jun 2016 10:08:19 +0000 (11:08 +0100)]
Merge pull request #635 from jenswi-linaro/qemu
Add support for QEMU virt ARMv8-A
Ashutosh Singh [Fri, 27 May 2016 14:51:17 +0000 (15:51 +0100)]
opteed: assume aarch64 for optee
OPTEE to execute in aarch64 bit mode, set it accordingly
when execution transitions from EL3 to EL1
Change-Id: I59f2f940bdc1aac10543045b006a137d107ec95f
Signed-off-by: Ashutosh Singh <ashutosh.singh@arm.com>
Jens Wiklander [Mon, 7 Dec 2015 13:37:10 +0000 (14:37 +0100)]
Add support for QEMU virt ARMv8-A target
This patch adds support for the QEMU virt ARMv8-A target.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
danh-arm [Wed, 8 Jun 2016 15:06:43 +0000 (16:06 +0100)]
Merge pull request #642 from soby-mathew/sm/override_rotpk
Allow dynamic overriding of ROTPK verification
danh-arm [Wed, 8 Jun 2016 12:30:03 +0000 (13:30 +0100)]
Merge pull request #643 from sandrine-bailleux-arm/sb/checkpatch-conf-file
Move checkpatch options in a configuration file
danh-arm [Wed, 8 Jun 2016 12:20:35 +0000 (13:20 +0100)]
Merge pull request #639 from danh-arm/dh/import-libfdt
Import libfdt v1.4.1 and related changes
David Wang [Tue, 7 Jun 2016 01:22:40 +0000 (09:22 +0800)]
CSS: Add support to wake up the core from wfi in GICv3
In GICv3 mode, the non secure group1 interrupts are signalled via the
FIQ line in EL3. To support waking up from CPU_SUSPEND to standby on
these systems, EL3 should route FIQ to EL3 temporarily before wfi and
restore the original setting after resume. This patch makes this change
for the CSS platforms in the `css_cpu_standby` psci pm ops hook.
Change-Id: Ibf3295d16e2f08da490847c1457bc839e1bac144
Mirela Simonovic [Tue, 7 Jun 2016 16:15:40 +0000 (18:15 +0200)]
zynqmp: pm: Added NODE_IPI_APU slave node ID in pm_defs.h
NODE_IPI_APU is the node ID of APU's IPI device. If APU should be
woken-up on an IPI from FPD power down, this node shall be set as
the wake-up source upon suspend.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
danh-arm [Tue, 7 Jun 2016 08:35:02 +0000 (09:35 +0100)]
Merge pull request #645 from sandrine-bailleux-arm/sb/improve-load-image-comments
Update comments in load_image()
Sandrine Bailleux [Fri, 27 May 2016 13:08:10 +0000 (14:08 +0100)]
Update comments in load_image()
- Fix the function documentation.
Since commit
16948ae1, load_image() uses image IDs rather than image
names.
- Clarify the consequences of a null entry point argument.
- Slightly reorganize the code to remove an unnecessary 'if' statement.
Change-Id: Iebea3149a37f23d3b847a37a206ed23f7e8ec717
danh-arm [Mon, 6 Jun 2016 09:54:28 +0000 (10:54 +0100)]
Merge pull request #644 from sandrine-bailleux-arm/sb/rm-outdated-comment
xlat lib: Remove out-dated comment
Sandrine Bailleux [Thu, 2 Jun 2016 10:19:59 +0000 (11:19 +0100)]
Move checkpatch options in a configuration file
At the moment, the top Makefile specifies the options to pass to the
checkpatch script in order to check the coding style. The checkpatch
script also supports reading its options from a configuration file
rather than from the command line.
This patch makes use of this feature and moves the checkpatch options
out of the Makefile. This simplifies the Makefile and makes things
clearer.
This patch also adds some more checkpatch options:
--showfile
--ignore FILE_PATH_CHANGES
--ignore AVOID_EXTERNS
--ignore NEW_TYPEDEFS
--ignore VOLATILE
The rationale behind each of these options has been documented
in the configuration file.
Change-Id: I423e1abe5670c0f57046cbf705f89a8463898676
Soby Mathew [Tue, 24 May 2016 14:05:15 +0000 (15:05 +0100)]
Allow dynamic overriding of ROTPK verification
A production ROM with TBB enabled must have the ability to boot test software
before a real ROTPK is deployed (e.g. manufacturing mode). Previously the
function plat_get_rotpk_info() must return a valid ROTPK for TBB to succeed.
This patch adds an additional bit `ROTPK_NOT_DEPLOYED` in the output `flags`
parameter from plat_get_rotpk_info(). If this bit is set, then the ROTPK
in certificate is used without verifying against the platform value.
Fixes ARM-software/tf-issues#381
Change-Id: Icbbffab6bff8ed76b72431ee21337f550d8fdbbb
danh-arm [Fri, 3 Jun 2016 16:27:45 +0000 (17:27 +0100)]
Merge pull request #641 from antonio-nino-diaz-arm/an/fvp-set-nv-ctr
Implement plat_set_nv_ctr for FVP platforms
danh-arm [Fri, 3 Jun 2016 16:26:59 +0000 (17:26 +0100)]
Merge pull request #640 from sandrine-bailleux-arm/sb/fix-syntax-error
Fix a syntax error in plat/arm/common/aarch64/arm_common.c
danh-arm [Fri, 3 Jun 2016 14:12:51 +0000 (15:12 +0100)]
Merge pull request #637 from yatharth-arm/yk/genfw-1134
Add support for ARM Cortex-A73 MPCore Processor
danh-arm [Fri, 3 Jun 2016 14:12:37 +0000 (15:12 +0100)]
Merge pull request #636 from soby-mathew/sm/cpu_ctx_rem_aarch32_regs
Build option to include AArch32 registers in cpu context
Sandrine Bailleux [Fri, 3 Jun 2016 14:00:46 +0000 (15:00 +0100)]
Fix a syntax error
Building TF with ERROR_DEPRECATED=1 fails because of a missing
semi-column. This patch fixes this syntax error.
Change-Id: I98515840ce74245b0a0215805f85c8e399094f68
Dan Handley [Thu, 2 Jun 2016 14:28:23 +0000 (15:28 +0100)]
Minor libfdt changes to enable TF integration
* Move libfdt API headers to include/lib/libfdt
* Add libfdt.mk helper makefile
* Remove unused libfdt files
* Minor changes to fdt.h and libfdt.h to make them C99 compliant
Co-Authored-By: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: I425842c2b111dcd5fb6908cc698064de4f77220e
Dan Handley [Thu, 2 Jun 2016 13:23:40 +0000 (14:23 +0100)]
Import libfdt v1.4.1
Imports libfdt code from https://git.kernel.org/cgit/utils/dtc/dtc.git
tag "v1.4.1" commit
302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2.
Change-Id: Ia0d966058beee55a9047e80d8a05bbe4f71d8446
Dan Handley [Thu, 2 Jun 2016 17:21:02 +0000 (18:21 +0100)]
Exclude more files from checkpatch and checkcodebase
Exclude documentation files from the `make checkcodebase` target
(these files were already excluded from checkpatch).
Also exclude libfdt files to prepare for import of this library.
Change-Id: Iee597ed66494de2b11cf84096f771f1f04472d5b
Dan Handley [Thu, 2 Jun 2016 16:15:13 +0000 (17:15 +0100)]
Move stdlib header files to include/lib/stdlib
* Move stdlib header files from include/stdlib to include/lib/stdlib for
consistency with other library headers.
* Fix checkpatch paths to continue excluding stdlib files.
* Create stdlib.mk to define the stdlib source files and include directories.
* Include stdlib.mk from the top level Makefile.
* Update stdlib header path in the fip_create Makefile.
* Update porting-guide.md with the new paths.
Change-Id: Ia92c2dc572e9efb54a783e306b5ceb2ce24d27fa
Antonio Nino Diaz [Fri, 20 May 2016 13:14:16 +0000 (14:14 +0100)]
Implement plat_set_nv_ctr for FVP platforms
Replaced placeholder implementation of plat_set_nv_ctr for FVP
platforms by a working one.
On FVP, the mapping of region DEVICE2 has been changed from RO to RW
to prevent exceptions when writing to the NV counter, which is
contained in this region.
Change-Id: I56a49631432ce13905572378cbdf106f69c82f57
Soby Mathew [Tue, 17 May 2016 13:01:32 +0000 (14:01 +0100)]
Build option to include AArch32 registers in cpu context
The system registers that are saved and restored in CPU context include
AArch32 systems registers like SPSR_ABT, SPSR_UND, SPSR_IRQ, SPSR_FIQ,
DACR32_EL2, IFSR32_EL2 and FPEXC32_EL2. Accessing these registers on an
AArch64-only (i.e. on hardware that does not implement AArch32, or at
least not at EL1 and higher ELs) platform leads to an exception. This patch
introduces the build option `CTX_INCLUDE_AARCH32_REGS` to specify whether to
include these AArch32 systems registers in the cpu context or not. By default
this build option is set to 1 to ensure compatibility. AArch64-only platforms
must set it to 0. A runtime check is added in BL1 and BL31 cold boot path to
verify this.
Fixes ARM-software/tf-issues#386
Change-Id: I720cdbd7ed7f7d8516635a2ec80d025f478b95ee
Sandrine Bailleux [Tue, 31 May 2016 15:47:29 +0000 (16:47 +0100)]
xlat lib: Remove out-dated comment
As of commit
e1ea9290bb, if the attributes of an inner memory region
are different than the outer region, new page tables are generated
regardless of how "restrictive" they are. This patch removes an
out-dated comment still referring to the old priority system based
on which attributes were more restrictive.
Change-Id: Ie7fc1629c90ea91fe50315145f6de2f3995e5e00