Commit graph

1859 commits

Author SHA1 Message Date
Bipin Ravi
b01140256b fix(cpus): workaround for Neoverse V2 erratum 2719105
Neoverse V2 erratum 2719105 is a Cat B erratum that applies to all
revisions <= r0p1 and is fixed in r0p2.

The erratum is avoided by setting CPUACTLR2_EL1[0] to 1 to force
PLDW/PFRM ST to behave like PLD/PRFM LD and not cause invalidations
to other PE caches. There might be a small performance degradation
to this workaround for certain workloads that share data.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2332927/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Id026edcb7ee1ca93371ce0001d18f5a8282c49ba
2023-09-18 17:43:51 -05:00
Bipin Ravi
8852fb5b7d fix(cpus): workaround for Neoverse V2 erratum 2331132
Neoverse V2 erratum 2331132 is a Cat B erratum that applies to all
revisions <= r0p2 and is still open. The workaround is to write the
value 4'b1001 to the PF_MODE bits in the IMP_CPUECTLR2_EL1 register
which will place the data prefetcher in the most conservative mode
instead of disabling it.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2332927/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ic6c76375df465a4ad2e20dd7add7037477d973c1
2023-09-18 17:42:07 -05:00
Bipin Ravi
e99df5c295 Merge changes from topic "sm/errata_X3" into integration
* changes:
  fix(cpus): workaround for Cortex-X3 erratum 2742421
  feat(errata_abi): add support for Cortex-X3
2023-09-08 22:18:32 +02:00
Sona Mathew
5b0e4438d0 fix(cpus): workaround for Cortex-X3 erratum 2742421
Cortex-X3 erratum 2742421 is a Cat B erratum that applies to
all revisions <= r1p1 and is fixed in r1p2. The workaround is to
set CPUACTLR5_EL1[56:55] to 2'b01.

SDEN documentation:
https://developer.arm.com/documentation/2055130/latest

Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
Change-Id: Idadd323e419739fe909b9b68ea2dbe857846666b
2023-09-07 16:31:47 -05:00
Mark Dykes
d2b66cc87e Merge "fix(cpus): workaround for Neoverse N2 erratum 2009478" into integration 2023-09-07 23:05:48 +02:00
Manish Pandey
6a62ddff78 Merge "feat(cpufeat): initialize HFG*_EL2 registers" into integration 2023-08-30 16:19:26 +02:00
Bipin Ravi
74bfe31fd2 fix(cpus): workaround for Neoverse N2 erratum 2009478
Neoverse N2 erratum 2009478 is a Cat B erratum that applies to
revision r0p0 and is fixed in r0p1. The workaround is to clear
the ED bit for all core error records before setting the PWRDN_EN
bit in CPUPWRCTLR_EL1 to request a power down.

SDEN documentation:
https://developer.arm.com/documentation/SDEN1982442/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ic5ef58c9e795b90026af1d2b09edc0eea3ceee51
2023-08-29 15:05:56 -05:00
Bipin Ravi
38f7b43409 Merge "feat(cpus): add support for Nevis CPU" into integration 2023-08-29 00:28:35 +02:00
Juan Pablo Conde
549795895c feat(cpus): add support for Nevis CPU
Adding basic CPU library code to support Nevis CPU

Change-Id: I399cc9b7b2d907b02b76ea2a3e5abb54e28fbf6c
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-28 13:18:20 -05:00
Bipin Ravi
fde15ecf03 Merge changes from topic "sm_bk/errata_refactor" into integration
* changes:
  refactor(cpus): convert the Cortex-A57 to use cpu helpers
  refactor(cpus): convert the Cortex-A57 to use the errata framework
  refactor(cpus): reorder Cortex-A57 errata by ascending order
  refactor(cpus): add Cortex-A57 errata framework information
  refactor(cpus): convert the Cortex-A53 to use cpu helpers
  refactor(cpus): convert the Cortex-A53 to use the errata framework
  refactor(cpus): reorder Cortex-A53 errata by ascending order
2023-08-28 15:56:44 +02:00
Boyan Karatotev
dbab05efcc refactor(cpus): convert the Cortex-A57 to use cpu helpers
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1cc10fa91cb9c837386144249dafeb6178d5866e
2023-08-24 14:27:42 -05:00
Boyan Karatotev
4ac54693bf refactor(cpus): convert the Cortex-A57 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround sequences remain
unchanged and preserve their git blame.

At this point the binary output of all errata was checked with the
script from commit 19136. All reported discrepancies involve errata
with no workaround in the cpu file or errata that did not previously
have a workaround function and now do. The non temporal hint erratum has
been converted to a numeric erratum.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ib321ab01362c5954fe78e7349229c1437b3da847
2023-08-24 14:27:42 -05:00
Boyan Karatotev
f08cfc3145 refactor(cpus): reorder Cortex-A57 errata by ascending order
Errata report order is enforced to be in ascending order. To achieve
this with the errata framework this has to be done at the definition
level.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ia98976797fc0811f30c7dbf714e94b36e3c2263e
2023-08-24 14:27:42 -05:00
Boyan Karatotev
285861d054 refactor(cpus): add Cortex-A57 errata framework information
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ic435b8d42639454fabb587ead44f646f7285cc40
2023-08-24 14:27:42 -05:00
Boyan Karatotev
d20fa4e4e0 refactor(cpus): convert the Cortex-A53 to use cpu helpers
Also, convert checker functions of errata which are enabled for all cpu
revisions to report correctly in preparation of the errata ABI.

Although the script from commit 250919 was used to check that errata
code did not change, this CPU only loosely adhered to convention and its
output was not particularly useful. Nevertheless, the discrepancies were
manually verified. All errata have been checked that they get invoked.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I988db6e7b6d1732f1d2258dbdf945cb475781894
2023-08-24 14:27:42 -05:00
Boyan Karatotev
b2d78e1c41 refactor(cpus): convert the Cortex-A53 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround and checking
sequences remain unchanged and preserve their git blame.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I30556f438859d17f054cb6bc96f3069b40474b58
2023-08-24 14:27:42 -05:00
Boyan Karatotev
e37dfd3c57 refactor(cpus): reorder Cortex-A53 errata by ascending order
Errata report order is enforced to be in ascending order. To achieve
this with the errata framework this has to be done at the definition
level.

Also rename the disable_non_temporal_hint to its erratum number to
conform to convention.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Id474872afebf361ab3d21c454ab3624db8354045
2023-08-24 14:27:42 -05:00
Juan Pablo Conde
0bbd4329bf fix(cpus): check for SME presence in Gelas
The original powerdown function for Gelas included SME disabling
instructions but did not check for the presence of SME before disabling.
This could lead to unexpected beaviors. This patch adds that check so
the feature is disabled only if it is present.

Change-Id: I582db53a6669317620e4f72a3eac87525897d3d0
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-24 14:23:28 -05:00
Boyan Karatotev
ac58e574f1 refactor(cm): move remaining EL2 save/restore into C
MTE and common system registers are the last remaining EL2 save/restores
in assembly. Convert them to C, like all the others.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: If690f792e70b97fd4b4cd5f43847a71719b128f1
2023-08-16 15:06:16 +01:00
Lauren Wehrmeister
abc2919c6c Merge "feat(cpus): add support for Gelas CPU" into integration 2023-08-14 21:05:23 +02:00
Juan Pablo Conde
02586e0e28 feat(cpus): add support for Gelas CPU
This patch adds the necessary CPU library code to support the Gelas CPU

Change-Id: I13ec4a8bb7055c1ebd0796a4a1378983d930fcb3
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-11 15:57:33 -05:00
Bipin Ravi
0a54b5cda5 Merge changes from topic "ar/errata_refactor" into integration
* changes:
  refactor(cpus): convert Neoverse Poseidon to use CPU helpers
  refactor(cpus): convert Neoverse Poseidon to framework
2023-08-11 21:16:14 +02:00
Arvind Ram Prakash
b98eb2dc1d refactor(cpus): convert Neoverse Poseidon to use CPU helpers
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Icf406c05cdb8d62cd0f41a5f19ae5376707e69bd
2023-08-11 14:14:22 -05:00
Arvind Ram Prakash
471e0b8b34 refactor(cpus): convert Neoverse Poseidon to framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround sequences remain
unchanged and preserve their git blame.

Testing was conducted by:

 * Manual comparison of disassembly of converted functions with non-
   converted functions

   aarch64-none-elf-objdump -D <trusted-firmware-a with conversion>/build/fvp/release/bl31/bl31.elf
     vs
   aarch64-none-elf-objdump -D <trusted-firmware-a clean repo>/build/fvp/release/bl31/bl31.elf

 * Build for release with all errata flags enabled and run default tftf
   tests

CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp DEBUG=0 \
CTX_INCLUDE_AARCH32_REGS=0 HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 \
BL33=./../tf-a-tests/build/fvp/release/tftf.bin \
WORKAROUND_CVE_2022_23960=1 ERRATA_ABI_SUPPORT=1 all fip

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Change-Id: I34e27e468d4f971423a03a95a4a52f4af8bd783a
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2023-08-11 14:14:22 -05:00
Lauren Wehrmeister
50d89e3016 Merge changes from topic "ar/errata_refactor" into integration
* changes:
  refactor(cpus): convert Neoverse V2 to use CPU helpers
  refactor(cpus): convert Neoverse V2 to framework
2023-08-11 17:44:33 +02:00
Moritz Fischer
5039015a9d refactor(cpus): convert Neoverse V2 to use CPU helpers
Convert Neoverse V2 to use CPU helpers, in this case that's
only two spots.

Change-Id: Icd250f92974e8a50c459038de7644a2e68007589
Signed-off-by: Moritz Fischer <moritzf@google.com>
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2023-08-10 15:49:53 -05:00
Moritz Fischer
31a3da83f8 refactor(cpus): convert Neoverse V2 to framework
For V2, this involves replacing:
  - The reset_func with the standard cpu_reset_func_{start,end}
    to apply errata automatically
  - The <cpu>_errata_report with the errata_report_shim to
    report errata automatically

And for each erratum:
  - The prologue with the workaround_<type>_start to do the checks and
    framework registration automatically at reset or runtime
  - The epilogue with the workaround_<type>_end
  - The checker function with the check_erratum_<type> to check whether
    the erratum applies on the revision of the CPU.

It is important to note that the errata workaround sequences remain
unchanged and preserve their git blame.

Testing was conducted by:

 * Manual comparison of disassembly of converted functions with non-
   converted functions

   aarch64-none-elf-objdump -D <trusted-firmware-a with conversion>/build/fvp/release/bl31/bl31.elf
     vs
   aarch64-none-elf-objdump -D <trusted-firmware-a clean repo>/build/fvp/release/bl31/bl31.elf

 * Build for release with all errata flags enabled and run default tftf
   tests

   CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp  CTX_INCLUDE_AARCH32_REGS=0 \
   HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 \
   BL33=./../tf-a-tests/build/fvp/debug/tftf.bin \
   ERRATA_V2_2801372 WORKAROUND_CVE_2022_23960=1 ERRATA_ABI_SUPPORT=1 all fip

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Change-Id: Ic968844d6aabea3867189d747769ced8faa87e56
Signed-off-by: Moritz Fischer <moritzf@google.com>
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2023-08-10 15:49:53 -05:00
Thaddeus Serna
3f721c6edd fix(cpus): assert invalid cpu_ops obtained
Not including the proper CPU file can halt execution at the
reset_handler since the cpu_ops obtained will be invalid and therefore
the cpu reset function will be invalid too, unless SUPPORT_UNKNOWN_MPID
is enabled.

This patch adds an assert to check for the validity of the obtained
cpu_ops object and will display an error if the object is invalid.

Change-Id: I0e1661745e4a692aab5e910e110c2de0caf64f46
Signed-off-by: Thaddeus Serna <Thaddeus.Gonzalez-Serna@arm.com>
2023-08-10 16:38:42 +02:00
Stephan Gerhold
c5c160cddd fix(cpus): flush L2 cache for Cortex-A7/12/15/17
Similar to Cortex-A53, the AArch32-only Cortex-A7/12/15/17 have an
(optional) integrated L2 cache that might need to be flushed if the
whole cluster is powered down. However, unlike Cortex-A53 there is
currently no L2 cache flush in the cluster_pwr_dwn implementation for
some reason. This causes problems if there is unwritten data left in
the L2 cache during a cluster power off.

Fix this by adding the L2 cache flush similar to cortex_a53.S.

Change-Id: Icd087bef9acff11e03edcaa0d26dd8b8e30796b7
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-08-10 09:28:52 +02:00
Bipin Ravi
1fd03dd62b Merge "fix(cpus): revert erroneous use of override_vector_table macro in Cortex-A73" into integration 2023-08-08 22:33:45 +02:00
Manish V Badarkhe
72e8f2456a Merge "chore: update to use Arm word across TF-A" into integration 2023-08-08 17:26:48 +02:00
Govindraj Raja
4c700c1563 chore: update to use Arm word across TF-A
Align entire TF-A to use Arm in copyright header.

Change-Id: Ief9992169efdab61d0da6bd8c5180de7a4bc2244
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-08 15:12:30 +01:00
Sona Mathew
9a0c81257f fix(cpus): revert erroneous use of override_vector_table macro in Cortex-A73
override_vector_table does adr, followed by an msr ops.
Accidentally was used here for for adr and mrs op.

Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
Change-Id: I2d3fda12acd097acabbde9b7dcc376d08419e223
2023-08-07 18:22:21 -05:00
Harrison Mutai
7b1e8c1c39 refactor(cpus): convert the Cortex-A710 to use cpu helpers
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I5e928f139c2e9fa91c78947cf6a8bff546f7be05
2023-08-07 19:36:56 +01:00
Harrison Mutai
d16a90d422 refactor(cpus): convert Cortex-A710 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround and checking
sequences remain unchanged and preserve their git blame. Testing was
conducted by:

 * Building for release with all errata flags enabled and running script
   in change 19136 to compare output of objdump for each errata.
 * Manual comparison of disassembly of converted functions with non-
   converted functions
 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I417539ab292f13a4f0949625d2fef6b7792fbd35
2023-08-07 19:36:56 +01:00
Harrison Mutai
d25136daea refactor(cpus): reorder Cortex-A710 errata by ascending order
Errata report order is enforced to be in ascending order. To achieve
this with the errata framework this has to be done at the definition
level.

Change-Id: I4a6ed55d48e91ec914b7a591c6d30da5ce5d915d
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-08-07 19:36:56 +01:00
Bipin Ravi
bfd856004f Merge changes from topic "sm/errata_refactor" into integration
* changes:
  refactor(cpus): convert Cortex-A15 to use the errata framework
  refactor(cpus): convert the Cortex-X3 to use the cpu helpers
  refactor(cpus): convert Cortex-X3 to use the errata framework
  refactor(cpus): reorder Cortex-X3 errata by ascending order
  refactor(cpus): convert the Cortex-A73 to use the cpu helpers
  refactor(cpus): convert Cortex-A73 to use the errata framework
  refactor(cpus): reorder Cortex-A73 errata by ascending order
  refactor(cpus): convert the Cortex-A35 to use the cpu helpers
  refactor(cpus): convert Cortex-A35 to use the errata framework
2023-08-05 00:50:32 +02:00
Sona Mathew
cbc8cae7ff refactor(cpus): convert Cortex-A15 to use the errata framework
Change-Id: I569b0da3ed5b81b4b6e9a7820d32684376a190a9
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:24:55 -05:00
Sona Mathew
f99a481045 refactor(cpus): convert the Cortex-X3 to use the cpu helpers
Change-Id: I922d3d0e81deb5ff7d89aaa1e7a96ef72d3d6943
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
1a9d5d1e14 refactor(cpus): convert Cortex-X3 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

 * Manual comparison of disassembly of converted functions with non-
   converted functions.

	aarch64-none-elf-objdump -D <TF-A with
	conversion>/build/../release/bl31/bl31.elf
	vs
	aarch64-none-elf-objdump -D <TF-A clean
	repo>/build/fvp/release/bl31/bl31.elf

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Change-Id: I62e030962edf4e8e8be2c19e7a3176e319468c50
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
2975bc0c9d refactor(cpus): reorder Cortex-X3 errata by ascending order
Errata report order is enforced to be in ascending order. To achieve
this with the errata framework this has to be done at the definition
level.

Change-Id: I168bf99be0cb0b046d6b641c855f9241991bb0bc
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
51e9eb101e refactor(cpus): convert the Cortex-A73 to use the cpu helpers
Change-Id: I910c657b3064b8e19eb84656109074ddf0e4ece8
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
7711223d00 refactor(cpus): convert Cortex-A73 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround and checking
sequences remain unchanged and preserve their git blame. Testing was
conducted by:

 * Manual comparison of disassembly of converted functions with non-
   converted functions.

	aarch64-none-elf-objdump -D <TF-A with
	conversion>/build/../release/bl31/bl31.elf
	vs
	aarch64-none-elf-objdump -D <TF-A clean
	repo>/build/fvp/release/bl31/bl31.elf

 * Build for release with all errata flags enabled and compare
   the disassembly of converted functions with non-converted
   functions.
	CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp DEBUG=0 \
	HW_ASSISTED_COHERENCY=0 BL33=<tf-a-tests>/build/fvp/debug/tftf.bin \
	all fip ERRATA_A73_852427=1 \
	ERRATA_A73_855423=1 \
	WORKAROUND_CVE_2017_5715=1 \
	WORKAROUND_CVE_2018_3639=1 \
	WORKAROUND_CVE_2022_23960=1

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Change-Id: I63e5b2cc42e1e12daee0b727770cbc19ba729ff7
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
e2da5e0ed7 refactor(cpus): reorder Cortex-A73 errata by ascending order
Errata report order is enforced to be in ascending order. To achieve
this with the errata framework this has to be done at the definition
level.

Change-Id: I70b05cc366c3b6d07a63edd88d23a52dd3d019c1
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
5c7d12cbd9 refactor(cpus): convert the Cortex-A35 to use the cpu helpers
Change-Id: Idd945cacb46cdbbcbd8309b8a2e7a94887120ff3
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Sona Mathew
40eef67e6e refactor(cpus): convert Cortex-A35 to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround and checking
sequences remain unchanged and preserve their git blame. Testing was
conducted by:

 * Manual comparison of disassembly of converted functions with non-
   converted functions.

	aarch64-none-elf-objdump -D <TF-A with
	conversion>/build/../release/bl31/bl31.elf
     	vs
	aarch64-none-elf-objdump -D <TF-A with
	clean repo>/build/fvp/release/bl31/bl31.elf

 * Build for release with all errata flags enabled and ensure the
   changes were identical.
	CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp \
	DEBUG=0 HW_ASSISTED_COHERENCY=0 \
	BL33=<tf-a-tests>/build/fvp/debug/tftf.bin \
	all fip ERRATA_A35_855472=1

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure all functions are entered.

Change-Id: Ib001e9fc269e60369ccfda0245a3e6247f0d6aaa
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-08-04 17:23:18 -05:00
Boyan Karatotev
65a5384844 refactor(cpus): convert the Cortex-A78AE to use cpu helpers
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ic4189d943c3e55bc25a82f09f2ad4a5b06f443a3
2023-08-04 11:52:06 -05:00
Boyan Karatotev
15702f280a refactor(cpus): convert the Denver cpu to use the errata framework
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I8f804b237a6a566f1c5d0ca1ab62ea76350fc2a2
2023-08-04 11:50:27 -05:00
Boyan Karatotev
27a8bcdc37 refactor(cpus): convert the Cortex-A78AE to use the errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
...and for each erratum:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

It is important to note that the errata workaround and checking
sequences remain unchanged and preserve their git blame.

At this point the binary output of all errata was checked with the
script from commit 19136. The reported discrepancies are immaterial.
All errata have been checked that they get invoked.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ideb6397f4ac7c3c1d04549a57af43bfa7ef25c1d
2023-08-04 11:50:23 -05:00
Boyan Karatotev
aff3fa210b refactor(cpus): convert the Cortex-A5 to use the errata framework
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I8214fdff2c528ccfa64a366ee1f3bc04d52a0bf8
2023-08-04 11:34:28 -05:00