- 28 Sep, 2015 1 commit
-
-
Sandrine Bailleux authored
The generic delay timer driver expects a pointer to a timer_ops_t structure containing the specific timer driver information. It doesn't make a copy of the structure, instead it just keeps the pointer. Therefore, this pointer must remain valid over time. The SP804 driver doesn't satisfy this requirement. The sp804_timer_init() macro creates a temporary instanciation of the timer_ops_t structure on the fly and passes it to the generic delay timer. When this temporary instanciation gets deallocated, the generic delay timer is left with a pointer to invalid data. This patch fixes this bug by statically allocating the SP804 timer_ops_t structure. Change-Id: I8fbf75907583aef06701e3fd9fabe0b2c9bc95bf
-
- 14 Sep, 2015 2 commits
-
-
Achin Gupta authored
Re-design bakery lock allocation and algorithm
-
Achin Gupta authored
Add more configurability options in ARM platform port code
-
- 11 Sep, 2015 7 commits
-
-
Vikram Kanigiri authored
This patch update Mediatek port to use the `DEFINE_BAKERY_LOCK` macro instead of specifying the exact data structure to use for a bakery lock and the input linker section that it should be allocated to. Change-Id: I2116dbe27010bb46d7cc64fafef55c7240c4c721
-
Vikram Kanigiri authored
This patch updates ARM platform ports to use the new unified bakery locks API. The caller does not have to use a different bakery lock API depending upon the value of the USE_COHERENT_MEM build option. NOTE: THIS PATCH CAN BE USED AS A REFERENCE TO UPDATE OTHER PLATFORM PORTS. Change-Id: I1b26afc7c9a9808a6040eb22f603d30192251da7
-
Andrew Thoelke authored
This patch unifies the bakery lock api's across coherent and normal memory implementation of locks by using same data type `bakery_lock_t` and similar arguments to functions. A separate section `bakery_lock` has been created and used to allocate memory for bakery locks using `DEFINE_BAKERY_LOCK`. When locks are allocated in normal memory, each lock for a core has to spread across multiple cache lines. By using the total size allocated in a separate cache line for a single core at compile time, the memory for other core locks is allocated at link time by multiplying the single core locks size with (PLATFORM_CORE_COUNT - 1). The normal memory lock algorithm now uses lock address instead of the `id` in the per_cpu_data. For locks allocated in coherent memory, it moves locks from tzfw_coherent_memory to bakery_lock section. The bakery locks are allocated as part of bss or in coherent memory depending on usage of coherent memory. Both these regions are initialised to zero as part of run_time_init before locks are used. Hence, bakery_lock_init() is made an empty function as the lock memory is already initialised to zero. The above design lead to the removal of psci bakery locks from non_cpu_power_pd_node to psci_locks. NOTE: THE BAKERY LOCK API WHEN USE_COHERENT_MEM IS NOT SET HAS CHANGED. THIS IS A BREAKING CHANGE FOR ALL PLATFORM PORTS THAT ALLOCATE BAKERY LOCKS IN NORMAL MEMORY. Change-Id: Ic3751c0066b8032dcbf9d88f1d4dc73d15f61d8b
-
Achin Gupta authored
Pass the target suspend level to SPD suspend hooks
-
Vikram Kanigiri authored
Currently, on ARM platforms(ex. Juno) non-secure access to specific peripheral regions, config registers which are inside and outside CSS is done in the soc_css_security_setup(). This patch separates the CSS security setup from the SOC security setup in the css_security_setup(). The CSS security setup involves programming of the internal NIC to provide access to regions inside the CSS. This is needed only in Juno, hence Juno implements it in its board files as css_init_nic400(). Change-Id: I95a1fb9f13f9b18fa8e915eb4ae2f15264f1b060
-
Vikram Kanigiri authored
On Juno and FVP platforms, the Non-Secure System timer corresponds to frame 1. However, this is a platform-specific decision and it shouldn't be hard-coded. Hence, this patch introduces PLAT_ARM_NSTIMER_FRAME_ID which should be used by all ARM platforms to specify the correct non-secure timer frame. Change-Id: I6c3a905d7d89200a2f58c20ce5d1e1d166832bba
-
Vikram Kanigiri authored
This patch replaces the `ARM_TZC_BASE` constant with `PLAT_ARM_TZC_BASE` to support different TrustZone Controller base addresses across ARM platforms. Change-Id: Ie4e1c7600fd7a5875323c7cc35e067de0c6ef6dd
-
- 10 Sep, 2015 1 commit
-
-
Achin Gupta authored
In certain Trusted OS implementations it is a requirement to pass them the highest power level which will enter a power down state during a PSCI CPU_SUSPEND or SYSTEM_SUSPEND API invocation. This patch passes this power level to the SPD in the "max_off_pwrlvl" parameter of the svc_suspend() hook. Currently, the highest power level which was requested to be placed in a low power state (retention or power down) is passed to the SPD svc_suspend_finish() hook. This hook is called after emerging from the low power state. It is more useful to pass the highest power level which was powered down instead. This patch does this by changing the semantics of the parameter passed to an SPD's svc_suspend_finish() hook. The name of the parameter has been changed from "suspend_level" to "max_off_pwrlvl" as well. Same changes have been made to the parameter passed to the tsp_cpu_resume_main() function. NOTE: THIS PATCH CHANGES THE SEMANTICS OF THE EXISTING "svc_suspend_finish()" API BETWEEN THE PSCI AND SPD/SP IMPLEMENTATIONS. THE LATTER MIGHT NEED UPDATES TO ENSURE CORRECT BEHAVIOUR. Change-Id: If3a9d39b13119bbb6281f508a91f78a2f46a8b90
-
- 02 Sep, 2015 4 commits
-
-
danh-arm authored
Ensure BL2 security state is secure
-
Vikram Kanigiri authored
BL2 loads secure runtime code(BL3-1, BL3-2) and hence it has to run in secure world otherwise BL3-1/BL3-2 have to execute from non-secure memory. Hence, This patch removes the change_security_state() call in bl1_run_bl2() and replaces it with an assert to confirm the BL2 as secure. Fixes ARM-software/tf-issues#314 Change-Id: I611b83f5c4090e58a76a2e950b0d797b46df3c29
-
danh-arm authored
Configure all secure interrupts on ARM platforms
-
danh-arm authored
Remove EL2/EL1 GICv3 register updates
-
- 01 Sep, 2015 3 commits
-
-
Vikram Kanigiri authored
ARM TF configures all interrupts as non-secure except those which are present in irq_sec_array. This patch updates the irq_sec_array with the missing secure interrupts for ARM platforms. It also updates the documentation to be inline with the latest implementation. Fixes ARM-software/tf-issues#312 Change-Id: I39956c56a319086e3929d1fa89030b4ec4b01fcc
-
Vikram Kanigiri authored
From Linux 3.17 onwards, the mainline kernel has support for GICv3 systems and if EL3 exists, it only needs to initialise ICC_SRE_EL3.SRE and ICC_SRE_EL3.Enable to 1. Hence, this patch removes the redundant updates of ICC_SRE_EL2 and ICC_PMR_EL1. NOTE: For partner software's which enter kernel in EL1, ICC_SRE_EL2.Enable and ICC_SRE_EL2.SRE bit needs to be set to 1 in EL2 before jumping to linux. Change-Id: I09ed47869351b08a3b034735f532bc677eaa6917
-
danh-arm authored
Tegra: fix logic to clear videomem regions
-
- 26 Aug, 2015 1 commit
-
-
Varun Wadekar authored
The previous logic in the memctrl driver was not catering to cases where the new memory region lied inside the older region. This patch fixes the if/elseif/elseif logic in the driver to take care of this case. Reported by: Vikram Kanigiri <vikram.kanigiri@arm.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
- 25 Aug, 2015 1 commit
-
-
Achin Gupta authored
Retention entry v3
-
- 24 Aug, 2015 2 commits
-
-
Varun Wadekar authored
This patch programs the CPUECTLR_EL1 and L2ECTLR_EL1 registers, so that the core waits for 512 generic timer CNTVALUEB ticks before entering retention state, after executing a WFI instruction. This functionality is configurable and can be enabled for platforms by setting the newly defined 'ENABLE_L2_DYNAMIC_RETENTION' and 'ENABLE_CPU_DYNAMIC_RETENTION' flag. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
Varun Wadekar authored
This patch adds macros suitable for programming the Advanced SIMD/Floating-point (only Cortex-A53), CPU and L2 dynamic retention control policy in the CPUECTLR_EL1 and L2ECTLR registers. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
- 21 Aug, 2015 1 commit
-
-
danh-arm authored
TBB: abort boot if BL3-2 cannot be authenticated
-
- 20 Aug, 2015 2 commits
-
-
danh-arm authored
docs: Fixes to platform-migration-guide.md
-
Juan Castillo authored
BL3-2 image (Secure Payload) is optional. If the image cannot be loaded a warning message is printed and the boot process continues. According to the TBBR document, this behaviour should not apply in case of an authentication error, where the boot process should be aborted. This patch modifies the load_auth_image() function to distinguish between a load error and an authentication error. The caller uses the return value to abort the boot process or continue. In case of authentication error, the memory region used to store the image is wiped clean. Change-Id: I534391d526d514b2a85981c3dda00de67e0e7992
-
- 18 Aug, 2015 6 commits
-
-
Soby Mathew authored
This patch corrects some typos in the platform migration guide. More importantly, the commit ID of the patch that implements migration of ARM Reference platforms to the new platform API has been corrected. Change-Id: Ib0109ea42c3d2bad2c6856ab725862652da7f3c8
-
danh-arm authored
mt8173: Fix cluster 0 core count
-
danh-arm authored
mt8173: update spm wake_src setting
-
danh-arm authored
Fix build error with optimizations disabled (-O0)
-
Jimmy Huang authored
Use constant macro defined in platform_def.h to replace hardcoded value. This patch fix following assert in new psci-1.0 framework. ASSERT: populate_power_domain_tree <183> : j == PLATFORM_CORE_COUNT Change-Id: I9b7eda525479464a8c3805b6fe14ffb10debaf72 Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
-
kenny liang authored
1. SEJ should not be one of the wake up sources BUG=chrome-os-partner:38426 TEST=powerd_dbus_suspend Change-Id: If8f3f19a885e66d7c10b472c2e3182a5affa4773 Signed-off-by: kenny liang <kenny.liang@mediatek.com>
-
- 17 Aug, 2015 1 commit
-
-
Achin Gupta authored
For sm/psci proto v5
-
- 13 Aug, 2015 8 commits
-
-
Soby Mathew authored
This patch reworks the PSCI generic implementation to conform to ARM Trusted Firmware coding guidelines as described here: https://github.com/ARM-software/arm-trusted-firmware/wiki This patch also reviews the use of signed data types within PSCI Generic code and replaces them with their unsigned counterparts wherever they are not appropriate. The PSCI_INVALID_DATA macro which was defined to -1 is now replaced with PSCI_INVALID_PWR_LVL macro which is defined to PLAT_MAX_PWR_LVL + 1. Change-Id: Iaea422d0e46fc314e0b173c2b4c16e0d56b2515a
-
Soby Mathew authored
This patch adds the necessary documentation updates to porting_guide.md for the changes in the platform interface mandated as a result of the new PSCI Topology and power state management frameworks. It also adds a new document `platform-migration-guide.md` to aid the migration of existing platform ports to the new API. The patch fixes the implementation and callers of plat_is_my_cpu_primary() to use w0 as the return parameter as implied by the function signature rather than x0 which was used previously. Change-Id: Ic11e73019188c8ba2bd64c47e1729ff5acdcdd5b
-
Soby Mathew authored
This patch implements the platform power managment handler to verify non secure entrypoint for ARM platforms. The handler ensures that the entry point specified by the normal world during CPU_SUSPEND, CPU_ON or SYSTEM_SUSPEND PSCI API is a valid address within the non secure DRAM. Change-Id: I4795452df99f67a24682b22f0e0967175c1de429
-
Soby Mathew authored
As per PSCI1.0 specification, the error code to be returned when an invalid non secure entrypoint address is specified by the PSCI client for CPU_SUSPEND, CPU_ON or SYSTEM_SUSPEND must be PSCI_E_INVALID_ADDRESS. The current PSCI implementation returned PSCI_E_INVAL_PARAMS. This patch rectifies this error and also implements a common helper function to validate the entrypoint information to be used across these PSCI API implementations. Change-Id: I52d697d236c8bf0cd3297da4008c8e8c2399b170
-
Soby Mathew authored
The new PSCI frameworks mandates that the platform APIs and the various frameworks in Trusted Firmware migrate away from MPIDR based core identification to one based on core index. Deprecated versions of the old APIs are still present to provide compatibility but their implementations are not optimal. This patch migrates the various SPDs exisiting within Trusted Firmware tree and TSP to the new APIs. Change-Id: Ifc37e7071c5769b5ded21d0b6a071c8c4cab7836
-
Sandrine Bailleux authored
Now that the FVP mailbox is no longer zeroed, the function platform_mem_init() does nothing both on FVP and on Juno. Therefore, this patch pools it as the default implementation on ARM platforms. Change-Id: I007220f4531f15e8b602c3368a1129a5e3a38d91
-
Sandrine Bailleux authored
Since there is a unique warm reset entry point, the FVP and Juno port can use a single mailbox instead of maintaining one per core. The mailbox gets programmed only once when plat_setup_psci_ops() is invoked during PSCI initialization. This means mailbox is not zeroed out during wakeup. Change-Id: Ieba032a90b43650f970f197340ebb0ce5548d432
-
Soby Mathew authored
This patch adds support to the Juno and FVP ports for composite power states with both the original and extended state-id power-state formats. Both the platform ports use the recommended state-id encoding as specified in Section 6.5 of the PSCI specification (ARM DEN 0022C). The platform build flag ARM_RECOM_STATE_ID_ENC is used to include this support. By default, to maintain backwards compatibility, the original power state parameter format is used and the state-id field is expected to be zero. Change-Id: Ie721b961957eaecaca5bf417a30952fe0627ef10
-