2014-07-28 |
Merge pull request #177 from jcastillo-arm/jc/tf-issues/096
...
Rework incorrect use of assert() and panic() in codebase
danh-arm
committed
on 28 Jul 2014
|
Rework incorrect use of assert() and panic() in codebase
...
Assert a valid security state using the macro sec_state_is_valid().
Replace assert() with panic() in those cases that might arise
because of runtime errors and not programming errors.
Replace panic() with assert() in those cases that might arise
because of programming errors.
Fixes ARM-software/tf-issues#96
Change-Id: I51e9ef0439fd5ff5e0edfef49050b69804bf14d5
Juan Castillo
committed
on 28 Jul 2014
|
Simplify management of SCTLR_EL3 and SCTLR_EL1
...
This patch reworks the manner in which the M,A, C, SA, I, WXN & EE bits of
SCTLR_EL3 & SCTLR_EL1 are managed. The EE bit is cleared immediately after reset
in EL3. The I, A and SA bits are set next in EL3 and immediately upon entry in
S-EL1. These bits are no longer managed in the blX_arch_setup() functions. They
do not have to be saved and restored either. The M, WXN and optionally the C
bit are set in the enable_mmu_elX() function. This is done during both the warm
and cold boot paths.
Fixes ARM-software/tf-issues#226
Change-Id: Ie894d1a07b8697c116960d858cd138c50bc7a069
Achin Gupta
committed
on 28 Jul 2014
|
Remove the concept of coherent stacks
...
This patch removes the allocation of memory for coherent stacks, associated
accessor function and some dead code which called the accessor function. It also
updates the porting guide to remove the concept and the motivation behind using
stacks allocated in coherent memory.
Fixes ARM-software/tf-issues#198
Change-Id: I00ff9a04f693a03df3627ba39727e3497263fc38
Achin Gupta
committed
on 28 Jul 2014
|
2014-07-19 |
Remove coherent stack usage from the warm boot path
...
This patch uses stacks allocated in normal memory to enable the MMU early in the
warm boot path thus removing the dependency on stacks allocated in coherent
memory. Necessary cache and stack maintenance is performed when a cpu is being
powered down and up. This avoids any coherency issues that can arise from
reading speculatively fetched stale stack memory from another CPUs cache. These
changes affect the warm boot path in both BL3-1 and BL3-2.
The EL3 system registers responsible for preserving the MMU state are not saved
and restored any longer. Static values are used to program these system
registers when a cpu is powered on or resumed from suspend.
Change-Id: I8357e2eb5eb6c5f448492c5094b82b8927603784
Achin Gupta
committed
on 19 Jul 2014
|
Make enablement of the MMU more flexible
...
This patch adds a 'flags' parameter to each exception level specific function
responsible for enabling the MMU. At present only a single flag which indicates
whether the data cache should also be enabled is implemented. Subsequent patches
will use this flag when enabling the MMU in the warm boot paths.
Change-Id: I0eafae1e678c9ecc604e680851093f1680e9cefa
Achin Gupta
committed
on 19 Jul 2014
|
2014-06-25 |
Remove current CPU mpidr from PSCI common code
...
Many of the interfaces internal to PSCI pass the current CPU
MPIDR_EL1 value from function to function. This is not required,
and with inline access to the system registers is less efficient
than requiring the code to read that register whenever required.
This patch remove the mpidr parameter from the affected interfaces
and reduces code in FVP BL3-1 size by 160 bytes.
Change-Id: I16120a7c6944de37232016d7e109976540775602
Andrew Thoelke
committed
on 25 Jun 2014
|
2014-06-24 |
Merge pull request #152 from jcastillo-arm/jc/tf-issues/073-v2
...
Remove all checkpatch errors from codebase
danh-arm
committed
on 24 Jun 2014
|
Merge pull request #147 from athoelke/at/remove-bakery-mpidr
...
Remove calling CPU mpidr from bakery lock API
danh-arm
committed
on 24 Jun 2014
|
Remove all checkpatch errors from codebase
...
Exclude stdlib files because they do not follow kernel code style.
Fixes ARM-software/tf-issues#73
Change-Id: I4cfafa38ab436f5ab22c277cb38f884346a267ab
Juan Castillo
committed
on 24 Jun 2014
|
2014-06-23 |
Remove calling CPU mpidr from bakery lock API
...
The bakery lock code currently expects the calling code to pass
the MPIDR_EL1 of the current CPU.
This is not always done correctly. Also the change to provide
inline access to system registers makes it more efficient for the
bakery lock code to obtain the MPIDR_EL1 directly.
This change removes the mpidr parameter from the bakery lock
interface, and results in a code reduction of 160 bytes for the
ARM FVP port.
Fixes ARM-software/tf-issues#213
Change-Id: I7ec7bd117bcc9794a0d948990fcf3336a367d543
Andrew Thoelke
committed
on 23 Jun 2014
|
Merge pull request #145 from athoelke/at/psci-memory-optimization-v2
...
PSCI memory optimizations (v2)
danh-arm
committed
on 23 Jun 2014
|
Merge pull request #144 from athoelke/at/init-context-v2
...
Initialise CPU contexts from entry_point_info (v2)
danh-arm
committed
on 23 Jun 2014
|
Correctly dimension the PSCI aff_map_node array
...
The array of affinity nodes is currently allocated for 32 entries
with the PSCI_NUM_AFFS value defined in psci.h. This is not enough
for large systems, and will substantially over allocate the array
for small systems.
This patch introduces an optional platform definition
PLATFORM_NUM_AFFS to platform_def.h. If defined this value is
used for PSCI_NUM_AFFS, otherwise a value of two times the number
of CPU cores is used.
The FVP port defines PLATFORM_NUM_AFFS to be 10 which saves
nearly 1.5KB of memory.
Fixes ARM-software/tf-issues#192
Change-Id: I68e30ac950de88cfbd02982ba882a18fb69c1445
Andrew Thoelke
committed
on 23 Jun 2014
|
Eliminate psci_suspend_context array
...
psci_suspend_context is an array of cache-line aligned structures
containing the single power_state integer per cpu. This array is
the only structure indexed by the aff_map_node.data integer.
This patch saves 2KB of BL3-1 memory by placing the CPU
power_state value directly in the aff_map_node structure. As a
result, this value is now never cached and the cache clean when
writing the value is no longer required.
Fixes ARM-software/tf-issues#195
Change-Id: Ib4c70c8f79eed295ea541e7827977a588a19ef9b
Andrew Thoelke
committed
on 23 Jun 2014
|
Initialise CPU contexts from entry_point_info
...
Consolidate all BL3-1 CPU context initialization for cold boot, PSCI
and SPDs into two functions:
* The first uses entry_point_info to initialize the relevant
cpu_context for first entry into a lower exception level on a CPU
* The second populates the EL1 and EL2 system registers as needed
from the cpu_context to ensure correct entry into the lower EL
This patch alters the way that BL3-1 determines which exception level
is used when first entering EL1 or EL2 during cold boot - this is now
fully determined by the SPSR value in the entry_point_info for BL3-3,
as set up by the platform code in BL2 (or otherwise provided to BL3-1).
In the situation that EL1 (or svc mode) is selected for a processor
that supports EL2, the context management code will now configure all
essential EL2 register state to ensure correct execution of EL1. This
allows the platform code to run non-secure EL1 payloads directly
without requiring a small EL2 stub or OS loader.
Change-Id: If9fbb2417e82d2226e47568203d5a369f39d3b0f
Andrew Thoelke
committed
on 23 Jun 2014
|
Merge pull request #140 from athoelke/at/psci_smc_handler
...
PSCI SMC handler improvements
danh-arm
committed
on 23 Jun 2014
|
2014-06-17 |
Remove early_exceptions from BL3-1
...
The crash reporting support and early initialisation of the
cpu_data allow the runtime_exception vectors to be used from
the start in BL3-1, removing the need for the additional
early_exception vectors and 2KB of code from BL3-1.
Change-Id: I5f8997dabbaafd8935a7455910b7db174a25d871
Andrew Thoelke
committed
on 17 Jun 2014
|
2014-06-16 |
Per-cpu data cache restructuring
...
This patch prepares the per-cpu pointer cache for wider use by:
* renaming the structure to cpu_data and placing in new header
* providing accessors for this CPU, or other CPUs
* splitting the initialization of the TPIDR pointer from the
initialization of the cpu_data content
* moving the crash stack initialization to a crash stack function
* setting the TPIDR pointer very early during boot
Change-Id: Icef9004ff88f8eb241d48c14be3158087d7e49a3
Andrew Thoelke
committed
on 16 Jun 2014
|
2014-06-11 |
Provide cm_get/set_context() for current CPU
...
All callers of cm_get_context() pass the calling CPU MPIDR to the
function. Providing a specialised version for the current
CPU results in a reduction in code size and better readability.
The current function has been renamed to cm_get_context_by_mpidr()
and the existing name is now used for the current-CPU version.
The same treatment has been done to cm_set_context(), although
only both forms are used at present in the PSCI and TSPD code.
Change-Id: I91cb0c2f7bfcb950a045dbd9ff7595751c0c0ffb
Andrew Thoelke
committed
on 11 Jun 2014
|
2014-06-10 |
PSCI SMC handler improvements
...
The SMC handler for PSCI was not correctly handling calls from
secure states, or from AArch32.
This patch completes the handler implementation to correctly
detect secure callers and to clear the top bits in parameters from
AArch32 callers.
The patch also reorganises the switch statement to separate SMC64 and
SMC32 function IDs which allows the compiler to generate much smaller
code for the function.
Change-Id: I36b1ac81fb14253d257255d0477771d54fab0d11
Andrew Thoelke
committed
on 10 Jun 2014
|
2014-05-29 |
Fix compilation issue for IMF_READ_INTERRUPT_ID build flag
...
This patch fixes the compilation issue for trusted firmware when the
IMF_READ_INTERRUPT_ID is enabled.
Change-Id: I94ab613b9bc96a7c1935796c674dc42246aaafee
Soby Mathew
committed
on 29 May 2014
|
2014-05-27 |
Merge pull request #110 from soby-mathew:sm/support_normal_irq_in_tsp-v4 into for-v0.4
Dan Handley
committed
on 27 May 2014
|
Further renames of platform porting functions
...
Rename the ic_* platform porting functions to plat_ic_* to be
consistent with the other functions in platform.h. Also rename
bl31_get_next_image_info() to bl31_plat_get_next_image_ep_info()
and remove the duplicate declaration in bl31.h.
Change-Id: I4851842069d3cff14c0a468daacc0a891a7ede84
Dan Handley
committed
on 27 May 2014
|
Fixup Standard SMC Resume Handling
...
This patch fixes a missed return and code alignment issues
in TSP_FID_RESUME handling.
Change-Id: Icf8aeb76dfd6898745653ce039e3bac45e0a9b3a
Soby Mathew
committed
on 27 May 2014
|
2014-05-23 |
Add enable mmu platform porting interfaces
...
Previously, the enable_mmu_elX() functions were implicitly part of
the platform porting layer since they were included by generic
code. These functions have been placed behind 2 new platform
functions, bl31_plat_enable_mmu() and bl32_plat_enable_mmu().
These are weakly defined so that they can be optionally overridden
by platform ports.
Also, the enable_mmu_elX() functions have been moved to
lib/aarch64/xlat_tables.c for optional re-use by platform ports.
These functions are tightly coupled with the translation table
initialization code.
Fixes ARM-software/tf-issues#152
Change-Id: I0a2251ce76acfa3c27541f832a9efaa49135cc1c
Dan Handley
authored
on 16 May 2014
Achin Gupta
committed
on 23 May 2014
|
Split platform.h into separate headers
...
Previously, platform.h contained many declarations and definitions
used for different purposes. This file has been split so that:
* Platform definitions used by common code that must be defined
by the platform are now in platform_def.h. The exact include
path is exported through $PLAT_INCLUDES in the platform makefile.
* Platform definitions specific to the FVP platform are now in
/plat/fvp/fvp_def.h.
* Platform API declarations specific to the FVP platform are now
in /plat/fvp/fvp_private.h.
* The remaining platform API declarations that must be ported by
each platform are still in platform.h but this file has been
moved to /include/plat/common since this can be shared by all
platforms.
Change-Id: Ieb3bb22fbab3ee8027413c6b39a783534aee474a
Dan Handley
authored
on 14 May 2014
Achin Gupta
committed
on 23 May 2014
|
Remove unused data declarations
...
Some data variables were declared but not used. These have been
removed.
Change-Id: I038632af3c32d88984cd25b886c43ff763269bf9
Dan Handley
authored
on 14 May 2014
Andrew Thoelke
committed
on 23 May 2014
|
Remove extern keyword from function declarations
...
Function declarations implicitly have external linkage so do not
need the extern keyword.
Change-Id: Ia0549786796d8bf5956487e8996450a0b3d79f32
Dan Handley
authored
on 14 May 2014
Andrew Thoelke
committed
on 23 May 2014
|
Merge pull request #104 from athoelke:at/tsp-entrypoints-v2
Andrew Thoelke
committed
on 23 May 2014
|