| 42019bf4 | 12-Sep-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Changes for new version of image loading in BL1/BL2
This patch adds changes in BL1 & BL2 to use new version of image loading to load the BL images.
Following are the changes in BL1: -Use new vers
Changes for new version of image loading in BL1/BL2
This patch adds changes in BL1 & BL2 to use new version of image loading to load the BL images.
Following are the changes in BL1: -Use new version of load_auth_image() to load BL2 -Modified `bl1_init_bl2_mem_layout()` to remove using `reserve_mem()` and to calculate `bl2_mem_layout`. `bl2_mem_layout` calculation now assumes that BL1 RW data is at the top of the bl1_mem_layout, which is more restrictive than the previous BL1 behaviour.
Following are the changes in BL2: -The `bl2_main.c` is refactored and all the functions for loading BLxx images are now moved to `bl2_image_load.c` `bl2_main.c` now calls a top level `bl2_load_images()` to load all the images that are applicable in BL2. -Added new file `bl2_image_load_v2.c` that uses new version of image loading to load the BL images in BL2.
All the above changes are conditionally compiled using the `LOAD_IMAGE_V2` flag.
Change-Id: Ic6dcde5a484495bdc05526d9121c59fa50c1bf23
show more ...
|
| 72600226 | 12-Sep-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Add new version of image loading.
This patch adds capability to load BL images based on image descriptors instead of hard coded way of loading BL images. This framework is designed such that it can
Add new version of image loading.
This patch adds capability to load BL images based on image descriptors instead of hard coded way of loading BL images. This framework is designed such that it can be readily adapted by any BL stage that needs to load images.
In order to provide the above capability the following new platform functions are introduced:
bl_load_info_t *plat_get_bl_image_load_info(void); This function returns pointer to the list of images that the platform has populated to load.
bl_params_t *plat_get_next_bl_params(void); This function returns a pointer to the shared memory that the platform has kept aside to pass trusted firmware related information that next BL image needs.
void plat_flush_next_bl_params(void); This function flushes to main memory all the params that are passed to next image.
int bl2_plat_handle_post_image_load(unsigned int image_id) This function can be used by the platforms to update/use image information for given `image_id`.
`desc_image_load.c` contains utility functions which can be used by the platforms to generate, load and executable, image list based on the registered image descriptors.
This patch also adds new version of `load_image/load_auth_image` functions in-order to achieve the above capability.
Following are the changes for the new version as compared to old: - Refactor the signature and only keep image_id and image_info_t arguments. Removed image_base argument as it is already passed through image_info_t. Given that the BL image base addresses and limit/size are already provided by the platforms, the meminfo_t and entry_point_info arguments are not needed to provide/reserve the extent of free memory for the given BL image.
- Added check for the image size against the defined max size. This is needed because the image size could come from an unauthenticated source (e.g. the FIP header). To make this check, new member is added to the image_info_t struct for identifying the image maximum size.
New flag `LOAD_IMAGE_V2` is added in the Makefile. Default value is 0.
NOTE: `TRUSTED_BOARD_BOOT` is currently not supported when `LOAD_IMAGE_V2` is enabled.
Change-Id: Ia7b643f4817a170d5a2fbf479b9bc12e63112e79
show more ...
|
| 7a1b2794 | 19-Sep-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #702 from jeenu-arm/psci-node-hw-state
Support for PSCI NODE_HW_STATE |
| 3cc17aae | 04-Aug-2016 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
CSS: Implement support for NODE_HW_STATE
This patch implements CSS platform hook to support NODE_HW_STATE PSCI API. The platform hook queries SCP to obtain CSS power state. Power states returned by
CSS: Implement support for NODE_HW_STATE
This patch implements CSS platform hook to support NODE_HW_STATE PSCI API. The platform hook queries SCP to obtain CSS power state. Power states returned by SCP are then converted to expected PSCI return codes.
Juno's PSCI operation structure is modified to use the CSS implementation.
Change-Id: I4a5edac0e5895dd77b51398cbd78f934831dafc0
show more ...
|
| afc931f5 | 15-Sep-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add some missing forward declarations in plat_arm.h
This patch adds a couple of missing forward declarations in plat_arm.h so that all types it references are known within this header file, without
Add some missing forward declarations in plat_arm.h
This patch adds a couple of missing forward declarations in plat_arm.h so that all types it references are known within this header file, without relying on previous header inclusions. This concerns the meminfo and bl31_params structures, which are defined in bl_common.h. Other external types referenced from plat_arm.h (e.g. mmap_region_t) get declared through header files included by arm_plat.h so they don't need forward declarations.
Change-Id: I471d5aa487919aff3fa979fc65e053f4f5b0ef32
show more ...
|
| 181bbd41 | 11-Jul-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Add FVP support for SP_MIN
This patch implements the support for SP_MIN in FVP. The SP_MIN platform APIs are implemented and the required makefile support is added for FVP.
Change-Id: Id50
AArch32: Add FVP support for SP_MIN
This patch implements the support for SP_MIN in FVP. The SP_MIN platform APIs are implemented and the required makefile support is added for FVP.
Change-Id: Id50bd6093eccbd5e38894e3fd2b20d5baeac5452
show more ...
|
| 877cf3ff | 11-Jul-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Add essential ARM platform and FVP support
This patch adds AArch32 support for FVP and implements common platform APIs like `plat_get_my_stack`, `plat_set_my_stack`, `plat_my_core_cos` for
AArch32: Add essential ARM platform and FVP support
This patch adds AArch32 support for FVP and implements common platform APIs like `plat_get_my_stack`, `plat_set_my_stack`, `plat_my_core_cos` for AArch32. Only Multi Processor(MP) implementations of these functions are considered in this patch. The ARM Standard platform layer helpers are implemented for AArch32 and the common makefiles are modified to cater for both AArch64 and AArch32 builds. Compatibility with the deprecated platform API is not supported for AArch32.
Change-Id: Iad228400613eec91abf731b49e21a15bcf2833ea
show more ...
|
| 405f42f9 | 28-Jul-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #671 from antonio-nino-diaz-arm/an/unoptimised-mem
ARM platforms: Define common image sizes |
| 0289970d | 25-Jul-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
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 t
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
show more ...
|
| 4c0d0390 | 16-Jun-2016 |
Soby Mathew <soby.mathew@arm.com> |
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
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
show more ...
|
| 91fad655 | 14-Jun-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
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 an
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
show more ...
|
| 0af559a8 | 08-Jul-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
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 re
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
show more ...
|
| ed81f3eb | 05-Jul-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
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, archit
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
show more ...
|
| b5fa6563 | 18-May-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
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 do
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
show more ...
|
| 04943d33 | 24-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
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
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
show more ...
|
| d4486391 | 18-May-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit plat_get_syscnt_freq. The old one has been flagged as deprecated. Common code has been
Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit plat_get_syscnt_freq. The old one has been flagged as deprecated. Common code has been updated to use this new version. Porting guide has been updated.
Change-Id: I9e913544926c418970972bfe7d81ee88b4da837e
show more ...
|
| c073fda1 | 14-Apr-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Move `plat_get_syscnt_freq()` to arm_common.c
This patch moves the definition for `plat_get_syscnt_freq()` from arm_bl31_setup.c to arm_common.c. This could be useful in case a delay timer needs to
Move `plat_get_syscnt_freq()` to arm_common.c
This patch moves the definition for `plat_get_syscnt_freq()` from arm_bl31_setup.c to arm_common.c. This could be useful in case a delay timer needs to be installed based on the generic timer in other BLs. This patch also modifies the return type for this function from `uint64_t` to `unsigned long long` within ARM and other platform files.
Change-Id: Iccdfa811948e660d4fdcaae60ad1d700e4eda80d
show more ...
|
| 9ff67fa6 | 26-Nov-2015 |
Gerald Lejeune <gerald.lejeune@st.com> |
Dump platform-defined regs in crash reporting
It is up to the platform to implement the new plat_crash_print_regs macro to report all relevant platform registers helpful for troubleshooting.
plat_c
Dump platform-defined regs in crash reporting
It is up to the platform to implement the new plat_crash_print_regs macro to report all relevant platform registers helpful for troubleshooting.
plat_crash_print_regs merges or calls previously defined plat_print_gic_regs and plat_print_interconnect_regs macros for each existing platforms.
NOTE: THIS COMMIT REQUIRES ALL PLATFORMS THAT ENABLE THE `CRASH_REPORTING` BUILD FLAG TO MIGRATE TO USE THE NEW `plat_crash_print_regs()` MACRO. BY DEFAULT, `CRASH_REPORTING` IS ENABLED IN DEBUG BUILDS FOR ALL PLATFORMS.
Fixes: arm-software/tf-issues#373
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
show more ...
|
| b2c9687f | 08-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #586 from antonio-nino-diaz-arm/an/spd-bl32
Remove BL32_BASE when building without SPD for FVP |
| 81d139d5 | 05-Apr-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove BL32_BASE when building without SPD for FVP
Previously, when building TF without SPD support, BL2 tried to load a BL32 image from the FIP and fails to find one, which resulted on warning mess
Remove BL32_BASE when building without SPD for FVP
Previously, when building TF without SPD support, BL2 tried to load a BL32 image from the FIP and fails to find one, which resulted on warning messages on the console. Even if there is a BL32 image in the FIP it shouldn't be loaded because there is no way to transfer control to the Secure Payload without SPD support.
The Makefile has been modified to pass a define of the form SPD_${SPD} to the source code the same way it's done for PLAT. The define SPD_none is then used to undefine BL32_BASE when BL32 is not used to prevent BL2 from trying to load a BL32 image and failing, thus removing the warning messages mentioned above.
Fixes ARM-software/tf-issues#287
Change-Id: Ifeb6f1c26935efb76afd353fea88e87ba09e9658
show more ...
|
| 105b59e7 | 07-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #575 from soby-mathew/sm/new_tzc_driver
Refactor the TZC driver and add DMC-500 driver |
| 5d29c760 | 07-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #572 from jcastillo-arm/jc/tbb_nvcounter
TBB NVcounter support |
| a0ad6019 | 23-Mar-2016 |
Soby Mathew <soby.mathew@arm.com> |
Modify return type of plat_get_ns_image_entrypoint()
This patch modifies the return type of the platform API `plat_get_ns_image_entrypoint()` from `unsigned long` to `uintptr_t` in accordance with t
Modify return type of plat_get_ns_image_entrypoint()
This patch modifies the return type of the platform API `plat_get_ns_image_entrypoint()` from `unsigned long` to `uintptr_t` in accordance with the coding guidelines.
Change-Id: Icb4510ca98b706aa4d535fe27e203394184fb4ca
show more ...
|
| 618f0fee | 29-Jan-2016 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Add support to program a DMC-500 TZC on ARM platforms
This patch adds support to program TrustZone protection on ARM platforms that implement a DMC-500. arm_dmc_500.c has been added which implements
Add support to program a DMC-500 TZC on ARM platforms
This patch adds support to program TrustZone protection on ARM platforms that implement a DMC-500. arm_dmc_500.c has been added which implements the arm_dmc_tzc_setup() function. This function relies on constants related to TZC programming that are exported by each platform to program TrustZone protection using the DMC-500 TrustZone controller driver. This function should be called from plat_arm_security_setup() which is implemented by each platform.
Change-Id: I5400bdee9e4b29155fd11296a40693d512312f29
show more ...
|
| 57f78201 | 26-Feb-2016 |
Soby Mathew <soby.mathew@arm.com> |
Migrate ARM standard platforms to the refactored TZC driver
This patch migrates ARM Standard platforms to the refactored TZC driver.
Change-Id: I2a2f60b645f73e14d8f416740c4551cec87cb1fb |