- 04 Dec, 2015 1 commit
-
-
Varun Wadekar authored
This patch modifies the Tegra port to support the new platform APIs so that we can disable the compat layer. This includes modifications to the power management and platform topology code. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
- 02 Dec, 2015 1 commit
-
-
Juan Castillo authored
This patch adds watchdog support on ARM platforms (FVP and Juno). A secure instance of SP805 is used as Trusted Watchdog. It is entirely managed in BL1, being enabled in the early platform setup hook and disabled in the exit hook. By default, the watchdog is enabled in every build (even when TBB is disabled). A new ARM platform specific build option `ARM_DISABLE_TRUSTED_WDOG` has been introduced to allow the user to disable the watchdog at build time. This feature may be used for testing or debugging purposes. Specific error handlers for Juno and FVP are also provided in this patch. These handlers will be called after an image load or authentication error. On FVP, the Table of Contents (ToC) in the FIP is erased. On Juno, the corresponding error code is stored in the V2M Non-Volatile flags register. In both cases, the CPU spins until a watchdog reset is generated after 256 seconds (as specified in the TBBR document). Change-Id: I9ca11dcb0fe15af5dbc5407ab3cf05add962f4b4
-
- 27 Nov, 2015 1 commit
-
-
Juan Castillo authored
FVP and Juno platforms include a NOR flash memory to store and load the FIP, the kernel or a ramdisk. This NOR flash is arranged as 2 x 16 bit flash devices and can be programmed using CFI standard commands. This patch provides a basic API to write single 32 bit words of data into the NOR flash. Functions to lock/unlock blocks against erase or write operations are also provided. Change-Id: I1da7ad3105b1ea409c976adc863954787cbd90d2
-
- 26 Nov, 2015 4 commits
-
-
Sandrine Bailleux authored
Normally, in the FVP port, secondary CPUs are immediately powered down if they are powered on at reset. However, when booting an EL3 payload, we need to keep them powered on as the requirement is for all CPUs to enter the EL3 payload image. This patch puts them in a holding pen instead of powering them off. Change-Id: I6526a88b907a0ddb820bead72f1d350a99b1692c
-
Sandrine Bailleux authored
By default, only the primary CPU is powered on by SCP on CSS platforms. Secondary CPUs are then powered on later using PSCI calls. However, it is possible to power on more than one CPU at boot time using platform specific settings. In this case, several CPUs will enter the Trusted Firmware and execute the cold boot path code. This is currently not supported and secondary CPUs will panic. This patch preserves this behaviour in the normal boot flow. However, when booting an EL3 payload, secondary CPUs are now held in a pen until their mailbox is populated, at which point they jump to this address. Note that, since all CPUs share the same mailbox, they will all be released from their holding pen at the same time and the EL3 payload is responsible to arbitrate execution between CPUs if required. Change-Id: I83737e0c9f15ca5e73afbed2e9c761bc580735b9
-
Sandrine Bailleux authored
This patch adds support for booting EL3 payloads on CSS platforms, for example Juno. In this scenario, the Trusted Firmware follows its normal boot flow up to the point where it would normally pass control to the BL31 image. At this point, it jumps to the EL3 payload entry point address instead. Before handing over to the EL3 payload, the data SCP writes for AP at the beginning of the Trusted SRAM is restored, i.e. we zero the first 128 bytes and restore the SCP Boot configuration. The latter is saved before transferring the BL30 image to SCP and is restored just after the transfer (in BL2). The goal is to make it appear that the EL3 payload is the first piece of software to run on the target. The BL31 entrypoint info structure is updated to make the primary CPU jump to the EL3 payload instead of the BL31 image. The mailbox is populated with the EL3 payload entrypoint address, which releases the secondary CPUs out of their holding pen (if the SCP has powered them on). The arm_program_trusted_mailbox() function has been exported for this purpose. The TZC-400 configuration in BL2 is simplified: it grants secure access only to the whole DRAM. Other security initialization is unchanged. This alternative boot flow is disabled by default. A new build option EL3_PAYLOAD_BASE has been introduced to enable it and provide the EL3 payload's entry point address. The build system has been modified such that BL31 and BL33 are not compiled and/or not put in the FIP in this case, as those images are not used in this boot flow. Change-Id: Id2e26fa57988bbc32323a0effd022ab42f5b5077
-
Sandrine Bailleux authored
This patch modifies the prototype of the bl1_plat_prepare_exit() platform API to pass the address of the entry point info structure received from BL2. The structure contains information that can be useful, depending on the kind of clean up or bookkeeping operations to perform. The weak implementation of this function ignores this argument to preserve platform backwards compatibility. NOTE: THIS PATCH MAY BREAK PLATFORM PORTS THAT ARE RELYING ON THE FORMER PROTOTYPE OF THE BL1_PLAT_PREPARE_EXIT() API. Change-Id: I3fc18f637de06c85719c4ee84c85d6a4572a0fdb
-
- 25 Nov, 2015 1 commit
-
-
Varun Wadekar authored
This patch renames the tegra_fc_cpu_idle() function to a more appropriate tegra_fc_cpu_powerdn() to better reflect its usage. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
- 19 Nov, 2015 2 commits
-
-
Sandrine Bailleux authored
The default reset values for the L2 Data & Tag RAM latencies on the Cortex-A72 on Juno R2 are not suitable. This patch modifies the Juno platform reset handler to configure the right settings on Juno R2. Change-Id: I20953de7ba0619324a389e0b7bbf951b64057db8
-
Sandrine Bailleux authored
This patch splits the Juno reset handler in 4 distinct pieces: - Detection of the board revision; - Juno R0 specific handler; - Juno R1 specific handler; - Juno R2 specific handler. Depending on the board revision, the appropriate handler is called. This makes the code easier to understand and maintain. This patch is mainly cosmetic. The only functional change introduced is that the Juno platform reset handler will now spin infinitely if the board revision is not recognised. Previously, it would have assumed that it was running on Juno R1 in this case. Change-Id: I54ed77c4665085ead9d1573316c9c884d7d3ffa0
-
- 13 Nov, 2015 1 commit
-
-
Juan Castillo authored
BL2 is responsible for loading BL32 and passing a pointer to the BL32 entrypoint info to BL31 in the BL31 parameters. If no BL32 image is loaded, a NULL pointer is passed. The platform is responsible for accessing BL31 parameters and extracting the corresponding BL32 EP info. In ARM platforms, arm_bl31_early_platform_setup() dereferences the pointer to the BL32 EP info without checking first if the pointer is NULL. This will cause an exception if a BL32 entrypoint has not been populated by BL2. FVP and Juno are not affected because they always define BL32_BASE, irrespective of whether a BL32 image is included in the FIP or not. This patches fixes the issue by checking the BL32 ep_info pointer before trying to access the data. If `RESET_TO_BL31` is enabled, the BL32 entrypoint is not populated if BL32_BASE is not defined. NOTE: Maintainers of partner platforms should check for this issue in their ports. Fixes ARM-software/tf-issues#320 Change-Id: I31456155503f2765766e8b7cd30ab4a40958fb96
-
- 10 Nov, 2015 1 commit
-
-
Varun Wadekar authored
This patch adds a per-soc system reset handler for Tegra chips. The handler gets executed before the actual system resets. This allows for custom handling of the system reset sequence on each SoC. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
- 04 Nov, 2015 1 commit
-
-
Brendan Jackman authored
Cortex-A72 library support is now compiled into the Juno platform port to go with the existing A53/A57 support. This enables a single set of Juno TF binaries to run on Juno R0, R1 and R2 boards. Change-Id: I4a601dc4f671e98bdb19d98bbb66f02f0d8b7fc7
-
- 02 Nov, 2015 1 commit
-
-
Juan Castillo authored
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO framework, IO drivers and IO platform layer. Following this patch, standard errno codes must be used when checking the return value of an IO function. Change-Id: Id6e0e9d0a7daf15a81ec598cf74de83d5768650f
-
- 30 Oct, 2015 2 commits
-
-
Soby Mathew authored
This patch adds the capability to power down at system power domain level on Juno via the PSCI SYSTEM SUSPEND API. The CSS power management helpers are modified to add support for power management operations at system power domain level. A new helper for populating `get_sys_suspend_power_state` handler in plat_psci_ops is defined. On entering the system suspend state, the SCP powers down the SYSTOP power domain on the SoC and puts the memory into retention mode. On wakeup from the power down, the system components on the CSS will be reinitialized by the platform layer and the PSCI client is responsible for restoring the context of these system components. According to PSCI Specification, interrupts targeted to cores in PSCI CPU SUSPEND should be able to resume it. On Juno, when the system power domain is suspended, the GIC is also powered down. The SCP resumes the final core to be suspend when an external wake-up event is received. But the other cores cannot be woken up by a targeted interrupt, because GIC doesn't forward these interrupts to the SCP. Due to this hardware limitation, we down-grade PSCI CPU SUSPEND requests targeted to the system power domain level to cluster power domain level in `juno_validate_power_state()` and the CSS default `plat_arm_psci_ops` is overridden in juno_pm.c. A system power domain resume helper `arm_system_pwr_domain_resume()` is defined for ARM standard platforms which resumes/re-initializes the system components on wakeup from system suspend. The security setup also needs to be done on resume from system suspend, which means `plat_arm_security_setup()` must now be included in the BL3-1 image in addition to previous BL images if system suspend need to be supported. Change-Id: Ie293f75f09bad24223af47ab6c6e1268f77bcc47
-
Soby Mathew authored
This patch implements the necessary topology changes for supporting system power domain on CSS platforms. The definition of PLAT_MAX_PWR_LVL and PLAT_NUM_PWR_DOMAINS macros are removed from arm_def.h and are made platform specific. In addition, the `arm_power_domain_tree_desc[]` and `arm_pm_idle_states[]` are modified to support the system power domain at level 2. With this patch, even though the power management operations involving the system power domain will not return any error, the platform layer will silently ignore any operations to the power domain. The actual power management support for the system power domain will be added later. Change-Id: I791867eded5156754fe898f9cdc6bba361e5a379
-
- 28 Oct, 2015 1 commit
-
-
Juan Castillo authored
This patch adds an optional API to the platform port: void plat_error_handler(int err) __dead2; The platform error handler is called when there is a specific error condition after which Trusted Firmware cannot continue. While panic() simply prints the crash report (if enabled) and spins, the platform error handler can be used to hand control over to the platform port so it can perform specific bookeeping or post-error actions (for example, reset the system). This function must not return. The parameter indicates the type of error using standard codes from errno.h. Possible errors reported by the generic code are: -EAUTH : a certificate or image could not be authenticated (when Trusted Board Boot is enabled) -ENOENT : the requested image or certificate could not be found or an IO error was detected -ENOMEM : resources exhausted. Trusted Firmware does not use dynamic memory, so this error is usually an indication of an incorrect array size A default weak implementation of this function has been provided. It simply implements an infinite loop. Change-Id: Iffaf9eee82d037da6caa43b3aed51df555e597a3
-
- 27 Oct, 2015 2 commits
-
-
Juan Castillo authored
This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
-
David Wang authored
Currently all ARM CSS platforms which include css_helpers.S use the same strong definition of `plat_arm_calc_core_pos`. This patch allows these CSS platforms to define their own strong definition of this function. * Replace the strong definition of `plat_arm_calc_core_pos` in css_helpers.S with a utility function `css_calc_core_pos_swap_cluster` does the same thing (swaps cluster IDs). ARM CSS platforms may choose to use this function or not. * Add a Juno strong definition of `plat_arm_calc_core_pos`, which uses `css_calc_core_pos_swap_cluster`. Change-Id: Ib5385ed10e44adf6cd1398a93c25973eb3506d9d
-
- 20 Oct, 2015 2 commits
-
-
Juan Castillo authored
This patch adds an optional API to the platform port: void bl1_plat_prepare_exit(void); This function is called prior to exiting BL1 in response to the RUN_IMAGE_SMC request raised by BL2. It should be used to perform platform specific clean up or bookkeeping operations before transferring control to the next image. A weak empty definition of this function has been provided to preserve platform backwards compatibility. Change-Id: Iec09697de5c449ae84601403795cdb6aca166ba1
-
Soby Mathew authored
This patch does the following reorganization to psci power management (PM) handler setup for ARM standard platform ports : 1. The mailbox programming required during `plat_setup_psci_ops()` is identical for all ARM platforms. Hence the implementation of this API is now moved to the common `arm_pm.c` file. Each ARM platform now must define the PLAT_ARM_TRUSTED_MAILBOX_BASE macro, which in current platforms is the same as ARM_SHARED_RAM_BASE. 2. The PSCI PM handler callback structure, `plat_psci_ops`, must now be exported via `plat_arm_psci_pm_ops`. This allows the common implementation of `plat_setup_psci_ops()` to return a platform specific `plat_psci_ops`. In the case of CSS platforms, a default weak implementation of the same is provided in `css_pm.c` which can be overridden by each CSS platform. 3. For CSS platforms, the PSCI PM handlers defined in `css_pm.c` are now made library functions and a new header file `css_pm.h` is added to export these generic PM handlers. This allows the platform to reuse the adequate CSS PM handlers and redefine others which need to be customized when overriding the default `plat_arm_psci_pm_ops` in `css_pm.c`. Change-Id: I277910f609e023ee5d5ff0129a80ecfce4356ede
-
- 19 Oct, 2015 1 commit
-
-
Sandrine Bailleux authored
This patch fixes the relative path to the 'bl1_private.h' header file included from 'arm_bl1_setup.c'. Note that, although the path was incorrect, it wasn't causing a compilation error because the header file still got included through an alternative include search path. Change-Id: I28e4f3dbe50e3550ca6cad186502c88a9fb5e260
-
- 14 Sep, 2015 4 commits
-
-
Achin Gupta authored
This patch adds a device driver which can be used to program the following aspects of ARM CCN IP: 1. Specify the mapping between ACE/ACELite/ACELite+DVM/CHI master interfaces and Request nodes. 2. Add and remove master interfaces from the snoop and dvm domains. 3. Place the L3 cache in a given power state. 4. Configuring system adress map and enabling 3 SN striping mode of memory controller operation. Change-Id: I0f665c6a306938e5b66f6a92f8549b529aa8f325
-
Vikram Kanigiri authored
Currently, the non-overlapping video memory carveout region is cleared after disabling the MMU at EL3. If at any exception level the carveout region is being marked as cacheable, this zeroing of memory will not have an affect on the cached lines. Hence, we first invalidate the dirty lines and update the memory and invalidate again so that both caches and memory is zeroed out. Change-Id: If3b2d139ab7227f6799c0911d59e079849dc86aa
-
Jimmy Huang authored
This patch corrects the watchdog register setting. To update watchdog register, the watchdog mode key must be set to make the register configurable. Change-Id: I9ca98ea4012f7f220b116013461030de4638ce0b Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
-
yt.lee authored
1. update suspend pcm code (add dummy apb read before mcusys power down) BRANCH=none BUG=none TEST=verified Change-Id: I2802cf8665fc1c8fe2304fd7d5f3eab9948b0b78 Signed-off-by: yt.lee <yt.lee@mediatek.com>
-
- 11 Sep, 2015 4 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
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
-
- 01 Sep, 2015 1 commit
-
-
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
-
- 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>
-
- 24 Aug, 2015 1 commit
-
-
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>
-
- 18 Aug, 2015 2 commits
-
-
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>
-
- 13 Aug, 2015 5 commits
-
-
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
-
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
-