| e62ea09b | 13-Jul-2018 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix HCPTR.TCP11 bit definition
Change-Id: I98f23f6cebcf984b57efc5449b75ff702e1984a0 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> |
| 30399885 | 12-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix types of arch.h definitions
Define the values as unsigned int or unsigned long long based on the actual size of the register. This prevents subtle issues caused by having a type that is too smal
Fix types of arch.h definitions
Define the values as unsigned int or unsigned long long based on the actual size of the register. This prevents subtle issues caused by having a type that is too small. For example:
#define OPTION_ENABLE 0x3 #define OPTION_SHIFT 32
uint64_t mask = OPTION_ENABLE << OPTION_SHIFT;
Because OPTION_ENABLE fits in an int, the value is considered an int. This means that, after shifting it 32 places to the left, the final result is 0. The correct way to define the values is:
#define OPTION_ENABLE ULL(0x3) #define OPTION_SHIFT U(32)
In this case, the compiler is forced to use a 64 bit value from the start, so shifting it 32 places to the left results in the expected value.
Change-Id: Ieaf2ffc2d8caa48c622db011f2aef549e713e019 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 0107aa49 | 11-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add missing parentheses to macros in arch.h
Change-Id: Ifea46da46d1bfd01b341acfad75df5bcab48a204 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| 1dd6c051 | 12-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat: Remove references to the Trusted Firmware
This library can be used in other projects. All comments that talk about the Trusted Firmware should be talking about the library itself.
Change-Id:
xlat: Remove references to the Trusted Firmware
This library can be used in other projects. All comments that talk about the Trusted Firmware should be talking about the library itself.
Change-Id: I3b98d42f7132be72c1f8a4900acfaa78dbd2daa2 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 63ddbae3 | 15-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat v2: Make setup_mmu_config public
This allows other parts of the code to reuse it. No functional changes.
Change-Id: Ib052ae235c422d9179958bd3016c3e678779ae9b Signed-off-by: Antonio Nino Diaz <
xlat v2: Make setup_mmu_config public
This allows other parts of the code to reuse it. No functional changes.
Change-Id: Ib052ae235c422d9179958bd3016c3e678779ae9b Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 6563c0be | 12-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat v2: Turn MMU parameters into 64-bit values
Most registers are 64-bit wide, even in AArch32 mode:
- MAIR_ELx is equivalent to MAIR0 and MAIR1. - TTBR is 64 bit in both AArch64 and AArch32.
The
xlat v2: Turn MMU parameters into 64-bit values
Most registers are 64-bit wide, even in AArch32 mode:
- MAIR_ELx is equivalent to MAIR0 and MAIR1. - TTBR is 64 bit in both AArch64 and AArch32.
The only difference is the TCR register, which is 32 bit in AArch32 and in EL3 in AArch64. For consistency with the rest of ELs in AArch64, it makes sense to also have it as a 64-bit value.
Change-Id: I2274d66a28876702e7085df5f8aad0e7ec139da9 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| aa1d5f60 | 12-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat v2: Remove IMAGE_EL define
The Exception Level is now detected at runtime. This means that it is not needed to hardcode the EL used by each image.
This doesn't result in a substantial increase
xlat v2: Remove IMAGE_EL define
The Exception Level is now detected at runtime. This means that it is not needed to hardcode the EL used by each image.
This doesn't result in a substantial increase of the image size because the initialization functions that aren't used are garbage-collected by the linker.
In AArch32 the current EL has been changed from EL3 to EL1 because the the AArch32 PL1&0 translation regime behaves more like the AArch64 EL1&0 translation regime than the EL3 one.
Change-Id: I941404299ebe7666ca17619207c923b49a55cb73 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 46e88703 | 10-Jan-2018 |
Joel Hutton <joel.hutton@arm.com> |
Add initial CPU support for Cortex-Helios
Change-Id: Ic0486131c493632eadf329f80b0b5904aed5e4ef Signed-off-by: Joel Hutton <joel.hutton@arm.com> Signed-off-by: Dimitris Papastamos <dimitris.papastamo
Add initial CPU support for Cortex-Helios
Change-Id: Ic0486131c493632eadf329f80b0b5904aed5e4ef Signed-off-by: Joel Hutton <joel.hutton@arm.com> Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|
| c84b6cb1 | 04-May-2018 |
Joel Hutton <Joel.Hutton@Arm.com> |
Add initial CPU support for Cortex-Deimos
Change-Id: I2c4b06423fcd96af9351b88a5e2818059f981f1b Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com> Signed-off-by: Dimitris Papastamos <dimitris.papastamo
Add initial CPU support for Cortex-Deimos
Change-Id: I2c4b06423fcd96af9351b88a5e2818059f981f1b Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com> Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|
| 6cbf17d1 | 11-Jul-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1473 from robertovargas-arm/misra
Misra |
| 9fdad699 | 04-May-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Remove integrity check in declare_cpu_ops_base
This check was added to ensure the correct behaviour of fill_constants macro. This macro has been verified and it is known his correct behaviour. The c
Remove integrity check in declare_cpu_ops_base
This check was added to ensure the correct behaviour of fill_constants macro. This macro has been verified and it is known his correct behaviour. The check generates an error when the clang assembler is used, so it is better to remove the check.
Change-Id: I3447ff9e9e5ee5cf0502f65e53c3d105d9396b8b Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| f21b9f6d | 01-May-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Remove .struct directive
This directive is not implemented by clang assembler. The traditional way to implement structs in assembly is using two macros for every field, one for the offset, and anoth
Remove .struct directive
This directive is not implemented by clang assembler. The traditional way to implement structs in assembly is using two macros for every field, one for the offset, and another one for the size. For every field, the offset can be calculated using the size and offset of the previous field.
Change-Id: Iacc6781e8f302fb925898737b8e85ab4e88a51cc Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| c96f297f | 12-Feb-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Fix MISRA rule 8.3
Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers.
Fixed for: make DEBUG=1 PLAT=juno ARCH=aarch32 AARCH32_SP=sp_min
Fix MISRA rule 8.3
Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers.
Fixed for: make DEBUG=1 PLAT=juno ARCH=aarch32 AARCH32_SP=sp_min RESET_TO_SP_MIN=1 JUNO_AARCH32_EL3_RUNTIME=1 bl32
Change-Id: Ia34f5155e1cdb67161191f69e8d1248cbaa39e1a Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 43b8fa8e | 02-Jul-2018 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix incorrect pointer conversion in SMC_UUID_RET()
Casting a pointer to a struct uuid into a pointer to uint32_t may result in a pointer that is not correctly aligned, which constitutes an undefined
Fix incorrect pointer conversion in SMC_UUID_RET()
Casting a pointer to a struct uuid into a pointer to uint32_t may result in a pointer that is not correctly aligned, which constitutes an undefined behaviour. In the case of TF, this also generates a data abort because alignment fault checking is enabled (through the SCTLR.A bit).
This patch modifies the SMC_UUID_RET() macro to read the uuid structure without any pointer aliasing. A helper function then combines every set of 4 bytes into a 32-bit value suitable to be returned through the x0-x3 registers.
This fixes a violation of MISRA rule 11.3.
Change-Id: I53ee73bb4cb332f4d8286055ceceb6f347caa080 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| fd2299e6 | 03-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat v2: Split code into separate files
Instead of having one big file with all the code, it's better to have a few smaller files that are more manageable:
- xlat_tables_core.c: Code related to the
xlat v2: Split code into separate files
Instead of having one big file with all the code, it's better to have a few smaller files that are more manageable:
- xlat_tables_core.c: Code related to the core functionality of the library (map and unmap regions, initialize xlat context). - xlat_tables_context.c: Instantiation of the active image context as well as APIs to manipulate it. - xlat_tables_utils.c: Helper code that isn't part of the core functionality (change attributes, debug print messages).
Change-Id: I3ea956fc1afd7473c0bb5e7c6aab3b2e5d88c711 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 0cc7aa89 | 27-Apr-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
xlat v2: Split MMU setup and enable
At present, the function provided by the translation library to enable MMU constructs appropriate values for translation library, and programs them to the right r
xlat v2: Split MMU setup and enable
At present, the function provided by the translation library to enable MMU constructs appropriate values for translation library, and programs them to the right registers. The construction of initial values, however, is only required once as both the primary and secondaries program the same values.
Additionally, the MMU-enabling function is written in C, which means there's an active stack at the time of enabling MMU. On some systems, like Arm DynamIQ, having active stack while enabling MMU during warm boot might lead to coherency problems.
This patch addresses both the above problems by:
- Splitting the MMU-enabling function into two: one that sets up values to be programmed into the registers, and another one that takes the pre-computed values and writes to the appropriate registers. With this, the primary effectively calls both functions to have the MMU enabled, but secondaries only need to call the latter.
- Rewriting the function that enables MMU in assembly so that it doesn't use stack.
This patch fixes a bunch of MISRA issues on the way.
Change-Id: I0faca97263a970ffe765f0e731a1417e43fbfc45 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| ebce735d | 22-Jun-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1406 from robertovargas-arm/uuid
Make TF UUID RFC 4122 compliant |
| 9dfd7553 | 22-Jun-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1437 from jeenu-arm/ras-remaining
SDEI dispatch changes to enable RAS use cases |
| 3a1b7b10 | 21-Jun-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat: Remove mmap_attr_t enum type
The values defined in this type are used in logical operations, which goes against MISRA Rule 10.1: "Operands shall not be of an inappropriate essential type".
No
xlat: Remove mmap_attr_t enum type
The values defined in this type are used in logical operations, which goes against MISRA Rule 10.1: "Operands shall not be of an inappropriate essential type".
Now, `unsigned int` is used instead. This also allows us to move the dynamic mapping bit from 30 to 31. It was an undefined behaviour in the past because an enum is signed by default, and bit 31 corresponds to the sign bit. It is undefined behaviour to modify the sign bit. Now, bit 31 is free to use as it was originally meant to be.
mmap_attr_t is now defined as an `unsigned int` for backwards compatibility.
Change-Id: I6b31218c14b9c7fdabebe432de7fae6e90a97f34 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| e7b9473e | 16-Feb-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
BL31: Introduce jump primitives
This patch introduces setjmp() and ongjmp() primitives to enable standard setjmp/longjmp style execution. Both APIs parameters take a pointer to struct jmpbuf type, w
BL31: Introduce jump primitives
This patch introduces setjmp() and ongjmp() primitives to enable standard setjmp/longjmp style execution. Both APIs parameters take a pointer to struct jmpbuf type, which hosts CPU registers saved/restored during jump.
As per the standard usage:
- setjmp() return 0 when a jump is setup; and a non-zero value when returning from jump.
- The caller of setjmp() must not return, or otherwise update stack pointer since.
Change-Id: I4af1d32e490cfa547979631b762b4cba188d0551 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 342d6220 | 11-Jun-2018 |
Soby Mathew <soby.mathew@arm.com> |
ARM Platforms: Update CNTFRQ register in CNTCTLBase frame
Currently TF-A doesn't initialise CNTFRQ register in CNTCTLBase frame of the system timer. ARM ARM states that "The instance of the register
ARM Platforms: Update CNTFRQ register in CNTCTLBase frame
Currently TF-A doesn't initialise CNTFRQ register in CNTCTLBase frame of the system timer. ARM ARM states that "The instance of the register in the CNTCTLBase frame must be programmed with this value as part of system initialization."
The psci_arch_setup() updates the CNTFRQ system register but according to the ARM ARM, this instance of the register is independent of the memory mapped instance. This is only an issue for Normal world software which relies on the memory mapped instance rather than the system register one.
This patch resolves the issue for ARM platforms.
The patch also solves a related issue on Juno, wherein CNTBaseN.CNTFRQ can be written and does not reflect the value of the register in CNTCTLBase frame. Hence this patch additionally updates CNTFRQ register in the Non Secure frame of the CNTBaseN.
Fixes ARM-Software/tf-issues#593
Change-Id: I09cebb6633688b34d5b1bc349fbde4751025b350 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 167c5f80 | 14-Jun-2018 |
Yann Gautier <yann.gautier@st.com> |
utils: Add BIT_32 and BIT_64 macros
When applying some MISRA rules, lots of issues are raised with BIT macro on AARCH32, and cast on uint32_t would be required (Rule 10.3). The macros BIT_32 and BIT
utils: Add BIT_32 and BIT_64 macros
When applying some MISRA rules, lots of issues are raised with BIT macro on AARCH32, and cast on uint32_t would be required (Rule 10.3). The macros BIT_32 and BIT_64 are then created for 32bit and 64bit. Then the BIT macro defaults on BIT_64 on AARCH64, and on BIT_32 on AARCH32.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| 39676357 | 14-Jun-2018 |
Yann Gautier <yann.gautier@st.com> |
Add GENMASK macros
Import GENMASK_32 and GENMASK_64 macros from optee-os (permissive license). And default GENMASK is set to GENMASK_32 for AARCH32, and to GENMASK_64 for 64bit arch.
fixes arm-soft
Add GENMASK macros
Import GENMASK_32 and GENMASK_64 macros from optee-os (permissive license). And default GENMASK is set to GENMASK_32 for AARCH32, and to GENMASK_64 for 64bit arch.
fixes arm-software/tf-issues#596
Signed-off-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
show more ...
|
| 03364865 | 26-Apr-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Make TF UUID RFC 4122 compliant
RFC4122 defines that fields are stored in network order (big endian), but TF-A stores them in machine order (little endian by default in TF-A). We cannot change the f
Make TF UUID RFC 4122 compliant
RFC4122 defines that fields are stored in network order (big endian), but TF-A stores them in machine order (little endian by default in TF-A). We cannot change the future UUIDs that are already generated, but we can store all the bytes using arrays and modify fiptool to generate the UUIDs with the correct byte order.
Change-Id: I97be2d3168d91f4dee7ccfafc533ea55ff33e46f Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 59c43463 | 14-Jun-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1415 from antonio-nino-diaz-arm/an/spm-fixes
Minor fixes to SPM |