| b22f18e3 | 11-Feb-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge changes from topic "snprintf-fix" into integration
* changes: fix(libc): snprintf: include stdint.h fix(libc): limit snprintf radix value fix(libc): fix snprintf corner cases |
| 410c925a | 27-Jan-2022 |
Andre Przywara <andre.przywara@arm.com> |
fix(libc): snprintf: include stdint.h
The snprintf code uses the uintptr_t type, which is defined in stdint.h. We do not include this header explicitly, but get the definition indirectly through som
fix(libc): snprintf: include stdint.h
The snprintf code uses the uintptr_t type, which is defined in stdint.h. We do not include this header explicitly, but get the definition indirectly through some other header doing so.
However this breaks when snprintf is compiled in isolation (for instance for unit-testing), so let's add this #include to make things right.
Change-Id: I1299767ee482f5cf1af30c4df2e8f7e596969b41 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| b30dd403 | 24-Jan-2022 |
Andre Przywara <andre.przywara@arm.com> |
fix(libc): limit snprintf radix value
In our unsigned_num_print() function we first print the integer into a local buffer, then put this through alignment and padding and output the result. For this
fix(libc): limit snprintf radix value
In our unsigned_num_print() function we first print the integer into a local buffer, then put this through alignment and padding and output the result. For this we use a local buffer, sized by the maximum possible length of the largest possible number.
However this assumes that the radix is not smaller than 10, which is indeed the smallest value we pass into this static function at the moment. To prevent accidents in the future, should we add support for other radices, add an assert to enforce our assumption.
Unfortunately this cannot be a static assert (CASSERT), since the compiler is not smart enough to see that the argument is always coming from a literal.
Change-Id: Ic204462600d9f4c281d899cf9f2c698a0a33a874 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| f20eb893 | 31-Dec-2021 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(spe): add support for FEAT_SPEv1p2
Allow access to PMSNEVFR_EL1 register at NS-EL1 or NS-EL2 when FEAT_SPEv1p2 is implemented.
Change-Id: I44b1de93526dbe9c11fd061d876371a6c0e6fa9c Signed-off-b
feat(spe): add support for FEAT_SPEv1p2
Allow access to PMSNEVFR_EL1 register at NS-EL1 or NS-EL2 when FEAT_SPEv1p2 is implemented.
Change-Id: I44b1de93526dbe9c11fd061d876371a6c0e6fa9c Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| c1f5a092 | 21-Dec-2021 |
Andre Przywara <andre.przywara@arm.com> |
fix(libc): fix snprintf corner cases
The number formatting routine in snprintf was trying to be clever with the buffer handling, but tripped over its own feet: snprintf() users expect output to be e
fix(libc): fix snprintf corner cases
The number formatting routine in snprintf was trying to be clever with the buffer handling, but tripped over its own feet: snprintf() users expect output to be emitted, even if not everything fits into the buffer. The current code gives up completely when the buffer is too small.
Fix those issues and simplify the code on the way, by consequently using the CHECK_AND_PUT_CHAR() macro, which both checks for the buffer size correctly, but also keeps track of the number of should-be-printed characters for the return value.
Change-Id: Ifd2b03b9a73f9279abed53081a2d88720ecbdbc1 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 8a855bd2 | 06-Feb-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(errata): workaround for Cortex-A710 erratum 2136059
Cortex-A710 erratum 2136059 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1. The workaround i
fix(errata): workaround for Cortex-A710 erratum 2136059
Cortex-A710 erratum 2136059 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1. The workaround is to set CPUACTLR5_EL1[44] to 1 which will cause the CPP instruction to invalidate the hardware prefetcher state trained from any EL.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775101/latest
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: I43a86a365418fb663cc1b6ab1d365b4beddae0bc
show more ...
|
| cfe1a8f7 | 06-Feb-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(errata): workaround for Cortex-A710 erratum 2267065
Cortex-A710 erratum 2267065 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1. The workaround
fix(errata): workaround for Cortex-A710 erratum 2267065
Cortex-A710 erratum 2267065 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1. The workaround is to set CPUACTLR_EL1[22] to 1'b1. Setting CPUACTLR_EL1[22] will cause the CFP instruction to invalidate all branch predictor resources regardless of context.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775101/latest
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: Ia9085aaf9b2b6a2b25d03ab36bd3774839fac9aa
show more ...
|
| 4dff7594 | 06-Feb-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(errata): workaround for Cortex-X2 erratum 2216384
Cortex-X2 erratum 2216384 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of CPU. It is fixed in r2p1. The workaround is to set
fix(errata): workaround for Cortex-X2 erratum 2216384
Cortex-X2 erratum 2216384 is a Cat B erratum that applies to revisions r0p0, r1p0 and r2p0 of CPU. It is fixed in r2p1. The workaround is to set CPUACTLR5_EL1[17] to 1'b1 followed by applying an instruction patching sequence.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100/latest
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: I3c216161678887c06a28c59644e784e0c7d37bab
show more ...
|
| c060b533 | 20-Jan-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(errata): workaround for Cortex-X2 errata 2081180
Cortex-X2 erratum 2081180 is a Cat B erratum present in r0p0, r1p0 and r2p0 of the Cortex-X2 processor core.
Cortex-X2 SDEN: https://developer.a
fix(errata): workaround for Cortex-X2 errata 2081180
Cortex-X2 erratum 2081180 is a Cat B erratum present in r0p0, r1p0 and r2p0 of the Cortex-X2 processor core.
Cortex-X2 SDEN: https://developer.arm.com/documentation/SDEN1775100
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: I64bed2fd5b7e12932d6de2ae668786e689885188
show more ...
|
| e7ca4433 | 20-Jan-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(errata): workaround for Cortex-X2 errata 2017096
Cortex-X2 erratum 2017096 is a Cat B erratum that applies to revisions r0p0, r1p0 & r2p0. The workaround is to set CPUECLTR_EL1[8] to 1 which dis
fix(errata): workaround for Cortex-X2 errata 2017096
Cortex-X2 erratum 2017096 is a Cat B erratum that applies to revisions r0p0, r1p0 & r2p0. The workaround is to set CPUECLTR_EL1[8] to 1 which disables store issue prefetching.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: I3b740aedc95c2394f6b8d1186014d2b2f640ae05
show more ...
|
| 7d33ffe4 | 25-May-2021 |
Daniel Boulby <daniel.boulby@arm.com> |
fix(el3-runtime): set unset pstate bits to default
During a transition to a higher EL some of the PSTATE bits are not set by hardware, this means that their state may be leaked from lower ELs. This
fix(el3-runtime): set unset pstate bits to default
During a transition to a higher EL some of the PSTATE bits are not set by hardware, this means that their state may be leaked from lower ELs. This patch sets those bits to a default value upon entry to EL3.
This patch was tested using a debugger to check the PSTATE values are correctly set. As well as adding a test in the next patch to ensure the PSTATE in lower ELs is still maintained after this change.
Change-Id: Ie546acbca7b9aa3c86bd68185edded91b2a64ae5 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
show more ...
|
| 97215e0f | 19-Jan-2022 |
Daniel Boulby <daniel.boulby@arm.com> |
refactor(el3-runtime): add prepare_el3_entry func
In the next patch we add an extra step of setting the PSTATE registers to a known state on el3 entry. In this patch we create the function prepare_e
refactor(el3-runtime): add prepare_el3_entry func
In the next patch we add an extra step of setting the PSTATE registers to a known state on el3 entry. In this patch we create the function prepare_el3_entry to wrap the steps needed for before el3 entry. For now this is only save_gp_pmcr_pauth_regs.
Change-Id: Ie26dc8d89bfaec308769165d2649e84d41be196c Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
show more ...
|
| 14714755 | 07-Dec-2021 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cpu): add library support for Poseidon CPU
This patch adds the basic CPU library code to support the Poseidon CPU in TF-A. Poseidon is derived from HunterELP core, an implementation of v9.2 arc
feat(cpu): add library support for Poseidon CPU
This patch adds the basic CPU library code to support the Poseidon CPU in TF-A. Poseidon is derived from HunterELP core, an implementation of v9.2 architecture. Currently, Hunter CPU the predecessor to HunterELP, is supported in TF-A. Accordingly the Hunter CPU library code has been as the base and adapted here.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: I406b4de156a67132e6a5523370115aaac933f18d
show more ...
|
| a72144fb | 05-Jan-2022 |
Manoj Kumar <manoj.kumar3@arm.com> |
fix(errata): workaround for Rainier erratum 1868343
Rainier CPU is based on Neoverse N1 R4P0 version which exhibits the erratum 1868343. This patch inherits the workaround from neoverse_n1.S file in
fix(errata): workaround for Rainier erratum 1868343
Rainier CPU is based on Neoverse N1 R4P0 version which exhibits the erratum 1868343. This patch inherits the workaround from neoverse_n1.S file into rainier.S file for erratum 1868343.
Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com> Change-Id: I735595229716a77d26369943086de08384cafa70
show more ...
|
| a006606f | 24-Dec-2021 |
Joanna Farley <joanna.farley@arm.com> |
Merge "feat(ccidx): update the do_dcsw_op function to support FEAT_CCIDX" into integration |
| e16045de | 03-Dec-2021 |
johpow01 <john.powell@arm.com> |
fix(errata): workaround for Cortex X2 erratum 2058056
Cortex X2 erratum 2058056 is a Cat B erratum present in the X2 core. It applies to revisions r0p0, r1p0, and r2p0 and is still open.
There are
fix(errata): workaround for Cortex X2 erratum 2058056
Cortex X2 erratum 2058056 is a Cat B erratum present in the X2 core. It applies to revisions r0p0, r1p0, and r2p0 and is still open.
There are 2 ways this workaround can be accomplished, the first of which involves executing a few additional instructions around MSR writes to CPUECTLR when disabling the prefetcher. (see SDEN for details)
However, this patch implements the 2nd possible workaround which sets the prefetcher into its most conservative mode, since this workaround is generic.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100
Signed-off-by: John Powell <john.powell@arm.com> Change-Id: Idb20d9928c986616cd5bedf40bb29d46d384cfd3
show more ...
|
| 34ee76db | 02-Dec-2021 |
johpow01 <john.powell@arm.com> |
fix(errata): workaround for Cortex X2 erratum 2002765
Cortex X2 erratum 2002765 is a Cat B erratum present in the X2 core. It applies to revisions r0p0, r1p0, and r2p0 and is still open.
SDEN can b
fix(errata): workaround for Cortex X2 erratum 2002765
Cortex X2 erratum 2002765 is a Cat B erratum present in the X2 core. It applies to revisions r0p0, r1p0, and r2p0 and is still open.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100
Signed-off-by: John Powell <john.powell@arm.com> Change-Id: I11576a03bfd8a6b1bd9ffef4430a097d763ca3cf
show more ...
|
| 1db6cd60 | 01-Dec-2021 |
johpow01 <john.powell@arm.com> |
fix(errata): workaround for Cortex X2 erratum 2083908
Cortex X2 erratum 2083908 is a Cat B erratum present in the Cortex X2 core. It applies to revision r2p0 and is still open.
SDEN can be found he
fix(errata): workaround for Cortex X2 erratum 2083908
Cortex X2 erratum 2083908 is a Cat B erratum present in the Cortex X2 core. It applies to revision r2p0 and is still open.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100
Signed-off-by: John Powell <john.powell@arm.com> Change-Id: Id9dca2b042bf48e75fb3013ab37d1c5925824728
show more ...
|
| d0ec1cc4 | 01-Dec-2021 |
johpow01 <john.powell@arm.com> |
feat(ccidx): update the do_dcsw_op function to support FEAT_CCIDX
FEAT_CCIDX modifies the register fields in CCSIDR/CCSIDR2 (aarch32) and CCSIDR_EL1 (aarch64). This patch adds a check to the do_dcsw
feat(ccidx): update the do_dcsw_op function to support FEAT_CCIDX
FEAT_CCIDX modifies the register fields in CCSIDR/CCSIDR2 (aarch32) and CCSIDR_EL1 (aarch64). This patch adds a check to the do_dcsw_op function to use the right register format rather than assuming that FEAT_CCIDX is not implemented.
Signed-off-by: John Powell <john.powell@arm.com> Change-Id: I12cd00cd7b5889525d4d2750281a751dd74ef5dc
show more ...
|
| 9e3f4093 | 13-Dec-2021 |
Yann Gautier <yann.gautier@st.com> |
feat(fconf): add a helper to get image index
A new function dyn_cfg_dtb_info_get_index() is created to get the index of the given image config_id in the dtb_infos pool. This allows checking if an im
feat(fconf): add a helper to get image index
A new function dyn_cfg_dtb_info_get_index() is created to get the index of the given image config_id in the dtb_infos pool. This allows checking if an image with a specific ID is in the FIP.
Change-Id: Ib300ed08e5b8a683dc7980a90221c305fb3f457d Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| f74cb0be | 25-Nov-2021 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
fix(amu): fault handling on EL2 context switch
The HAFGRTR_EL2 register is UNDEFINED unless the CPU supports both FEAT_FGT and FEAT_AMUv1. FEAT_FGT is mandatory for v8.6-A and upwards, but FEAT_AMUv
fix(amu): fault handling on EL2 context switch
The HAFGRTR_EL2 register is UNDEFINED unless the CPU supports both FEAT_FGT and FEAT_AMUv1. FEAT_FGT is mandatory for v8.6-A and upwards, but FEAT_AMUv1 is optional (from v8.4-A upwards), and as such any 8.6-A cores today without support for FEAT_AMUv1 will trigger an undefined instruction exception on accessing this register.
Currently ARM_ARCH_AT_LEAST macro has been used to associate with an architecture extension allowing to access HAFGRTR_EL2 register. This condition should be replaced with macros specific to individual features. This patch adds a new set of macros "ENABLE_FEAT_FGT, ENABLE_FEAT_AMUv1, ENABLE_FEAT_ECV" under build options to provide controlled access to the HAFGRTR_EL2 register.
Further to ensure that the the build options passed comply with the given hardware implementation, a feature detection mechanism, checking whether build options match with the architecture is required at bootime. This will be implemented and pushed later in a separate patch.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: Ie390f4babe233b8b09455290277edbddecd33ead
show more ...
|
| 8b0c6612 | 06-Dec-2021 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "fix(xlat): fix bug on VERBOSE trace" into integration |
| 956d76f6 | 25-Nov-2021 |
Javier Almansa Sobrino <javier.almansasobrino@arm.com> |
fix(xlat): fix bug on VERBOSE trace
When log level is set to VERBOSE, a build error happens due a incorrect format stringon a printf call.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobri
fix(xlat): fix bug on VERBOSE trace
When log level is set to VERBOSE, a build error happens due a incorrect format stringon a printf call.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com> Change-Id: I8f869e078a3c179470977dadc063521c1ae30dbb
show more ...
|
| 5ecde2a2 | 27-Oct-2021 |
Yann Gautier <yann.gautier@st.com> |
fix(pie): align fixup_gdt_reloc() for aarch64
Do not skip upper limit address (__RW_END__) during relocation process. This align the code on what is done for AARCH32.
Change-Id: I236368376276c2d3aa
fix(pie): align fixup_gdt_reloc() for aarch64
Do not skip upper limit address (__RW_END__) during relocation process. This align the code on what is done for AARCH32.
Change-Id: I236368376276c2d3aa79adce13ca49f4023ce369 Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| 4f1a658f | 26-Oct-2021 |
Yann Gautier <yann.gautier@foss.st.com> |
fix(pie): do not skip __RW_END__ address during relocation
In fixup_gdt_reloc(), do not skip the last address (__RW_END__) for dynamic relocations. Else, the invalidation of the data done under _ini
fix(pie): do not skip __RW_END__ address during relocation
In fixup_gdt_reloc(), do not skip the last address (__RW_END__) for dynamic relocations. Else, the invalidation of the data done under _init_c_runtime in el3_entrypoint_common macro will not be correct.
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Change-Id: I1166a59ac964ec8ad4e099cb3600e843afc71d82
show more ...
|