| 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 |
| 0dd41951 | 21-Jun-2017 |
David Cunado <david.cunado@arm.com> |
Resolve signed-unsigned comparison issues
A recent commit 030567e6f51731982a7e71cbd387de93bc0e35fd added U()/ULL() macro to TF constants. This has caused some signed-unsigned comparison warnings / e
Resolve signed-unsigned comparison issues
A recent commit 030567e6f51731982a7e71cbd387de93bc0e35fd added U()/ULL() macro to TF constants. This has caused some signed-unsigned comparison warnings / errors in the TF static analysis.
This patch addresses these issues by migrating impacted variables from signed ints to unsigned ints and vice verse where applicable.
Change-Id: I4b4c739a3fa64aaf13b69ad1702c66ec79247e53 Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| ccf39111 | 26-Jun-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #994 from soby-mathew/sm/fwu_fix
Fix FWU and cache helper optimization |
| 73e11b43 | 23-Jun-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #976 from etienne-lms/minor-psci
psci: minor fixes in lib |
| 9151ac0e | 23-Jun-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #997 from dp-arm/dp/spe
aarch64: Enable Statistical Profiling Extensions for lower ELs |
| ee881c15 | 23-Jun-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #995 from davidcunado-arm/dc/init_reg
Fully initialise essential control registers |
| aa8d5f88 | 07-Jun-2017 |
Etienne Carriere <etienne.carriere@st.com> |
PSCI: use same function prototype as in header file
Signed-off-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com> |
| c283e05a | 22-Jun-2017 |
Etienne Carriere <etienne.carriere@st.com> |
psci: minor fixes in lib
Call svc_suspend_finish if registered. psci_get_stat() is static to psci_stat.c Fix types used in comparison. Fix coding style (empty line between variable definition and in
psci: minor fixes in lib
Call svc_suspend_finish if registered. psci_get_stat() is static to psci_stat.c Fix types used in comparison. Fix coding style (empty line between variable definition and instructions block).
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| a94cc374 | 19-Jun-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Apply workarounds for A53 Cat A Errata 835769 and 843419
These errata are only applicable to AArch64 state. See the errata notice for more details: http://infocenter.arm.com/help/index.jsp?topic=/co
Apply workarounds for A53 Cat A Errata 835769 and 843419
These errata are only applicable to AArch64 state. See the errata notice for more details: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.epm048406/index.html
Introduce the build options ERRATA_A53_835769 and ERRATA_A53_843419. Enable both of them for Juno.
Apply the 835769 workaround as following: * Compile with -mfix-cortex-a53-835769 * Link with --fix-cortex-a53-835769
Apply the 843419 workaround as following: * Link with --fix-cortex-a53-843419
The erratum 843419 workaround can lead the linker to create new sections suffixed with "*.stub*" and 4KB aligned. The erratum 835769 can lead the linker to create new "*.stub" sections with no particular alignment.
Also add support for LDFLAGS_aarch32 and LDFLAGS_aarch64 in Makefile for architecture-specific linker options.
Change-Id: Iab3337e338b7a0a16b0d102404d9db98c154f8f8 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 6f512a3d | 20-Jun-2017 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
aarch32: Apply workaround for errata 813419 of Cortex-A57
TLBI instructions for monitor mode won't have the desired effect under specific circumstances in Cortex-A57 r0p0. The workaround is to execu
aarch32: Apply workaround for errata 813419 of Cortex-A57
TLBI instructions for monitor mode won't have the desired effect under specific circumstances in Cortex-A57 r0p0. The workaround is to execute DSB and TLBI twice each time.
Even though this errata is only needed in r0p0, the current errata framework is not prepared to apply run-time workarounds. The current one is always applied if compiled in, regardless of the CPU or its revision.
The `DSB` instruction used when initializing the translation tables has been changed to `DSB ISH` as an optimization and to be consistent with the barriers used for the workaround.
NOTE: This workaround is present in AArch64 TF and already enabled by default on Juno.
Change-Id: I10b0baa304ed64b13b7b26ea766e61461e759dfa Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|
| d832aee9 | 23-May-2017 |
dp-arm <dimitris.papastamos@arm.com> |
aarch64: Enable Statistical Profiling Extensions for lower ELs
SPE is only supported in non-secure state. Accesses to SPE specific registers from SEL1 will trap to EL3. During a world switch, befo
aarch64: Enable Statistical Profiling Extensions for lower ELs
SPE is only supported in non-secure state. Accesses to SPE specific registers from SEL1 will trap to EL3. During a world switch, before `TTBR` is modified the SPE profiling buffers are drained. This is to avoid a potential invalid memory access in SEL1.
SPE is architecturally specified only for AArch64.
Change-Id: I04a96427d9f9d586c331913d815fdc726855f6b0 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 18f2efd6 | 13-Apr-2017 |
David Cunado <david.cunado@arm.com> |
Fully initialise essential control registers
This patch updates the el3_arch_init_common macro so that it fully initialises essential control registers rather then relying on hardware to set the res
Fully initialise essential control registers
This patch updates the el3_arch_init_common macro so that it fully initialises essential control registers rather then relying on hardware to set the reset values.
The context management functions are also updated to fully initialise the appropriate control registers when initialising the non-secure and secure context structures and when preparing to leave EL3 for a lower EL.
This gives better alignement with the ARM ARM which states that software must initialise RES0 and RES1 fields with 0 / 1.
This patch also corrects the following typos:
"NASCR definitions" -> "NSACR definitions"
Change-Id: Ia8940b8351dc27bc09e2138b011e249655041cfc Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| 3ec5204c | 15-Jun-2017 |
Soby Mathew <soby.mathew@arm.com> |
Exit early if size zero for cache helpers
This patch enables cache helper functions `flush_dcache_range`, `clean_dcache_range` and `invalidate_dcache_range` to exit early if the size argument specif
Exit early if size zero for cache helpers
This patch enables cache helper functions `flush_dcache_range`, `clean_dcache_range` and `invalidate_dcache_range` to exit early if the size argument specified is zero
Change-Id: I0b63e8f4bd3d47ec08bf2a0b0b9a7ff8a269a9b0 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| e036660a | 20-Jun-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #983 from dp-arm/dp/aarch32-errata
aarch32: Implement errata workarounds for Cortex A53 and A57 |
| 94f7d1e2 | 05-Jun-2017 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
aarch32: Implement errata workarounds for Cortex A57
This brings the implementation on par with the software errata workarounds for AArch64.
Change-Id: I98a85fd92e32ae4259f4ec5b3e93cffc87090064 Sig
aarch32: Implement errata workarounds for Cortex A57
This brings the implementation on par with the software errata workarounds for AArch64.
Change-Id: I98a85fd92e32ae4259f4ec5b3e93cffc87090064 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|
| 3749d853 | 05-Jun-2017 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
aarch32: Implement errata workarounds for Cortex A53
This brings the implementation on par with the software errata workarounds for AArch64.
Change-Id: Id103602e35b1c0ad3705a5b2b7cdb34dd8a8c5e2 Sig
aarch32: Implement errata workarounds for Cortex A53
This brings the implementation on par with the software errata workarounds for AArch64.
Change-Id: Id103602e35b1c0ad3705a5b2b7cdb34dd8a8c5e2 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|