| 2e09d4f8 | 23-Aug-2017 |
Ken Kuang <ken.kuang@spreadtrum.com> |
fix a typo about sctlr_el2 which will cause write_sctlr_el2 use all sctlr_el1 value except the EE bit
The code doesn't "Use SCTLR_EL1.EE value to initialise sctlr_el2" but, read out SCTLR_EL1 and cl
fix a typo about sctlr_el2 which will cause write_sctlr_el2 use all sctlr_el1 value except the EE bit
The code doesn't "Use SCTLR_EL1.EE value to initialise sctlr_el2" but, read out SCTLR_EL1 and clear EE bit, then set to sctlr_el2
Signed-off-by: Ken Kuang <ken.kuang@spreadtrum.com>
show more ...
|
| 54661cd2 | 24-Apr-2017 |
Summer Qin <summer.qin@arm.com> |
Add Trusted OS extra image parsing support for ARM standard platforms
Trusted OS may have extra images to be loaded. Load them one by one and do the parsing. In this patch, ARM TF need to load up to
Add Trusted OS extra image parsing support for ARM standard platforms
Trusted OS may have extra images to be loaded. Load them one by one and do the parsing. In this patch, ARM TF need to load up to 3 images for optee os: header, pager and paged images. Header image is the info about optee os and images. Pager image include pager code and data. Paged image include the paging parts using virtual memory.
Change-Id: Ia3bcfa6d8a3ed7850deb5729654daca7b00be394 Signed-off-by: Summer Qin <summer.qin@arm.com>
show more ...
|
| 3e0cba52 | 01-Aug-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1021 from vwadekar/psci-early-suspend-handler
lib: psci: early suspend handler for platforms |
| 235581cf | 01-Aug-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1045 from sandrine-bailleux-arm/sb/xlat-lib-ctx
Fix sign of variable in xlat_tables_print() |
| 664e6931 | 01-Aug-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Fix sign of debug loop variable
This patch changes the sign of the loop variable used in xlat_tables_print(). It needs to be unsigned because it is compared against another unsigned int
xlat lib v2: Fix sign of debug loop variable
This patch changes the sign of the loop variable used in xlat_tables_print(). It needs to be unsigned because it is compared against another unsigned int.
Change-Id: I2b3cee7990dd75e8ebd2701de3860ead7cad8dc8 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 1862d620 | 10-Jul-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
lib: psci: early suspend handler for platforms
This patch adds an early suspend handler, that executes with SMP and data cache enabled. This handler allows platforms to perform any early actions dur
lib: psci: early suspend handler for platforms
This patch adds an early suspend handler, that executes with SMP and data cache enabled. This handler allows platforms to perform any early actions during the CPU suspend entry sequence.
This handler is optional and platforms can choose to implement it depending on their needs. The `pwr_domain_suspend` handler still exists and platforms can keep on using it without any side effects.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| ddc5bfdb | 31-Jul-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1035 from sandrine-bailleux-arm/sb/xlat-lib-ctx
Translation table library v2 improvements |
| d9f18155 | 31-Jul-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1033 from davidcunado-arm/dc/psci_flush
Address edge case for stale PSCI CPU data in cache |
| 881cf374 | 26-Jul-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1031 from robertovargas-arm/assert_format
Use standard UNIX file:line format in assert |
| 71341d23 | 19-Jul-2017 |
David Cunado <david.cunado@arm.com> |
Address edge case for stale PSCI CPU data in cache
There is a theoretical edge case during CPU_ON where the cache may contain stale data for the target CPU data - this can occur under the following
Address edge case for stale PSCI CPU data in cache
There is a theoretical edge case during CPU_ON where the cache may contain stale data for the target CPU data - this can occur under the following conditions:
- the target CPU is in another cluster from the current - the target CPU was the last CPU to shutdown on its cluster - the cluster was removed from coherency as part of the CPU shutdown
In this case the cache maintenace that was performed as part of the target CPUs shutdown was not seen by the current CPU's cluster. And so the cache may contain stale data for the target CPU.
This patch adds a cache maintenance operation (flush) for the cache-line containing the target CPU data - this ensures that the target CPU data is read from main memory.
Change-Id: If8cfd42639b03174f60669429b7f7a757027d0fb Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| 0044231d | 19-Jul-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib: Fix some types
Fix the type length and signedness of some of the constants and variables used in the translation table library.
This patch supersedes Pull Request #1018: https://github.co
xlat lib: Fix some types
Fix the type length and signedness of some of the constants and variables used in the translation table library.
This patch supersedes Pull Request #1018: https://github.com/ARM-software/arm-trusted-firmware/pull/1018
Change-Id: Ibd45faf7a4fb428a0bf71c752551d35800212fb2 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 7bba6884 | 19-Jul-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Import ctzdi2.c from LLVM compiler-rt
When using __builtin_ctzll() in AArch32 code, the compiler may translate that into a call to the __ctzdi2() function. In this case, the linking phase fails beca
Import ctzdi2.c from LLVM compiler-rt
When using __builtin_ctzll() in AArch32 code, the compiler may translate that into a call to the __ctzdi2() function. In this case, the linking phase fails because TF doesn't provide an implementation for it.
This patch imports the implementation of the __ctzdi2() function from LLVM's compiler-rt project and hooks it into TF's build system. The ctzdi2.c file is an unmodified copy from the master branch as of July 19 2017 (SVN revision: 308480).
Change-Id: I96766a025ba28e1afc6ef6a5c4ef91d85fc8f32b Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 347621bb | 11-Jul-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Remove hard-coded virtual address space size
Previous patches have made it possible to specify the physical and virtual address spaces sizes for each translation context. However, there
xlat lib v2: Remove hard-coded virtual address space size
Previous patches have made it possible to specify the physical and virtual address spaces sizes for each translation context. However, there are still some places in the code where the physical (resp. virtual) address space size is assumed to be PLAT_PHY_ADDR_SPACE_SIZE (resp. PLAT_VIRT_ADDR_SPACE_SIZE).
This patch removes them and reads the relevant address space size from the translation context itself instead. This information is now passed in argument to the enable_mmu_arch() function, which needs it to configure the TCR_ELx.T0SZ field (in AArch64) or the TTBCR.T0SZ field (in AArch32) appropriately.
Change-Id: I20b0e68b03a143e998695d42911d9954328a06aa Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| d83f3579 | 31-May-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Refactor the functions enabling the MMU
This patch refactors both the AArch32 and AArch64 versions of the function enable_mmu_arch().
In both versions, the code now computes the VMSA-r
xlat lib v2: Refactor the functions enabling the MMU
This patch refactors both the AArch32 and AArch64 versions of the function enable_mmu_arch().
In both versions, the code now computes the VMSA-related system registers upfront then program them in one go (rather than interleaving the 2).
In the AArch64 version, this allows to reduce the amount of code generated by the C preprocessor and limits it to the actual differences between EL1 and EL3.
In the AArch32 version, this patch also removes the function enable_mmu_internal_secure() and moves its code directly inside enable_mmu_arch(), as it was its only caller.
Change-Id: I35c09b6db4404916cbb2e2fd3fda2ad59f935954 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 99f60798 | 31-May-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Remove init_xlat_tables_arch() function
In both the AArch32 and AArch64 versions, this function used to check the sanity of the PLAT_PHY_ADDR_SPACE_SIZE in regard to the architectural m
xlat lib v2: Remove init_xlat_tables_arch() function
In both the AArch32 and AArch64 versions, this function used to check the sanity of the PLAT_PHY_ADDR_SPACE_SIZE in regard to the architectural maximum value. Instead, export the xlat_arch_get_max_supported_pa() function and move the debug assertion in AArch-agnostic code.
The AArch64 used to also precalculate the TCR.PS field value, based on the size of the physical address space. This is now done directly by enable_mmu_arch(), which now receives the physical address space size in argument.
Change-Id: Ie77ea92eb06db586f28784fdb479c6e27dd1acc1 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| a9ad848c | 18-Jul-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Expose *_ctx() APIs
In a previous patch, the xlat_ctx_t type has been made public. This patch now makes the *_ctx() APIs public.
Each API now has a *_ctx() variant. Most of them were a
xlat lib v2: Expose *_ctx() APIs
In a previous patch, the xlat_ctx_t type has been made public. This patch now makes the *_ctx() APIs public.
Each API now has a *_ctx() variant. Most of them were already implemented and this patch just makes them public. However, some of them were missing so this patch introduces them.
Now that all these APIs are public, there's no good reason for splitting them accross 2 files (xlat_tables_internal.c and xlat_tables_common.c). Therefore, this patch moves all code into xlat_tables_internal.c and removes xlat_tables_common.c. It removes it from the library's makefile as well.
This last change introduces a compatibility break for platform ports that specifically include the xlat_tables_common.c file instead of including the library's Makefile. The UniPhier platform makefile has been updated to now omit this file from the list of source files.
The prototype of mmap_add_region_ctx() has been slightly changed. The mmap_region_t passed in argument needs to be constant because it gets called from map_add(), which receives a constant region. The former implementation of mmap_add() used to cast the const qualifier away, which is not a good practice.
Also remove init_xlation_table(), which was a sub-function of init_xlat_tables(). Now there's just init_xlat_tables() (and init_xlat_tables_ctx()). Both names were too similar, which was confusing. Besides, now that all the code is in a single file, it's no longer needed to have 2 functions for that.
Change-Id: I4ed88c68e44561c3902fbebb89cb197279c5293b Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 55c84964 | 10-Jul-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Export translation context as an opaque type
At the moment, the translation context type (xlat_ctx_t) is a private type reserved for the internal usage of the translation table library.
xlat lib v2: Export translation context as an opaque type
At the moment, the translation context type (xlat_ctx_t) is a private type reserved for the internal usage of the translation table library. All exported APIs (implemented in xlat_tables_common.c) are wrappers over the internal implementations that use such a translation context.
These wrappers unconditionally pass the current translation context representing the memory mappings of the executing BL image. This means that the caller has no control over which translation context the library functions act on.
As a first step to make this code more flexible, this patch exports the 'xlat_ctx_t' type. Note that, although the declaration of this type is now public, its definition stays private. A macro is introduced to statically allocate and initialize such a translation context.
The library now internally uses this macro to allocate the default translation context for the running BL image.
Change-Id: Icece1cde4813fac19452c782b682c758142b1489 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 8933c34b | 19-May-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib: Reorganize architectural defs
Move the header files that provide translation tables architectural definitions from the library v2 source files to the library include directory. This allows
xlat lib: Reorganize architectural defs
Move the header files that provide translation tables architectural definitions from the library v2 source files to the library include directory. This allows to share these definitions between both versions (v1 and v2) of the library.
Create a new header file that includes the AArch32 or AArch64 definitions based on the AARCH32 build flag, so that the library user doesn't have to worry about handling it on their side.
Also repurpose some of the definitions the header files provide to concentrate on the things that differ between AArch32 and AArch64. As a result they now contain the following information: - the first table level that allows block descriptors; - the architectural limits of the virtual address space; - the initial lookup level to cover the entire address space.
Additionally, move the XLAT_TABLE_LEVEL_MIN macro from xlat_tables_defs.h to the AArch32/AArch64 architectural definitions.
This new organisation eliminates duplicated information in the AArch32 and AArch64 versions. It also decouples these architectural files from any platform-specific information. Previously, they were dependent on the address space size, which is platform-specific.
Finally, for the v2 of the library, move the compatibility code for ADDR_SPACE_SIZE into a C file as it is not needed outside of this file. For v1, this code hasn't been changed and stays in a header file because it's needed by several files.
Change-Id: If746c684acd80eebf918abd3ab6e8481d004ac68 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| 0350bc6d | 26-May-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib v2: Print some debug statistics
This patch adds some debug prints to display some statistics about page tables usage. They are printed only if the LOG_LEVEL is at least 50 (i.e. VERBOSE).
xlat lib v2: Print some debug statistics
This patch adds some debug prints to display some statistics about page tables usage. They are printed only if the LOG_LEVEL is at least 50 (i.e. VERBOSE).
Sample output for BL1:
VERBOSE: Translation tables state: VERBOSE: Max allowed PA: 0xffffffff VERBOSE: Max allowed VA: 0xffffffff VERBOSE: Max mapped PA: 0x7fffffff VERBOSE: Max mapped VA: 0x7fffffff VERBOSE: Initial lookup level: 1 VERBOSE: Entries @initial lookup level: 4 VERBOSE: Used 4 sub-tables out of 5 (spare: 1)
Change-Id: If38956902e9616cdcd6065ecd140fe21482597ea Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| d52be21f | 18-Jul-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
Use standard UNIX file:line format in assert
This format is understood by almost all the UNIX tools (vi, emacs, acme, ...), and it allows these tools to jump directly to the line where the assert fa
Use standard UNIX file:line format in assert
This format is understood by almost all the UNIX tools (vi, emacs, acme, ...), and it allows these tools to jump directly to the line where the assert failed.
Change-Id: I648fa93c7cc65f911a17dcad5e1a775ac1ae5ed4 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 2a4b4b71 | 11-Jul-2017 |
Isla Mitchell <isla.mitchell@arm.com> |
Fix order of #includes
This fix modifies the order of system includes to meet the ARM TF coding standard. There are some exceptions in order to retain header groupings, minimise changes to imported
Fix order of #includes
This fix modifies the order of system includes to meet the ARM TF coding standard. There are some exceptions in order to retain header groupings, minimise changes to imported headers, and where there are headers within the #if and #ifndef statements.
Change-Id: I65085a142ba6a83792b26efb47df1329153f1624 Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
show more ...
|
| c2b8806f | 22-Jun-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Introduce TF_LDFLAGS
Use TF_LDFLAGS from the Makefiles, and still append LDFLAGS as well to the compiler's invocation. This allows passing extra options from the make command line using LDFLAGS.
Do
Introduce TF_LDFLAGS
Use TF_LDFLAGS from the Makefiles, and still append LDFLAGS as well to the compiler's invocation. This allows passing extra options from the make command line using LDFLAGS.
Document new LDFLAGS Makefile option.
Change-Id: I88c5ac26ca12ac2b2d60a6f150ae027639991f27 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 0d182a0b | 28-Jun-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #1002 from douglas-raillard-arm/dr/fix_errata_a53
Apply workarounds for A53 Cat A Errata 835769 and 843419 |
| 267d4bf9 | 28-Jun-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #1001 from davidcunado-arm/dc/fix-signed-comparisons
Resolve signed-unsigned comparison issues |
| d70a7d0c | 28-Jun-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #978 from etienne-lms/minor-build
Minor build fixes |