Commit graph

13103 commits

Author SHA1 Message Date
Arvind Ram Prakash
b0b712ba76 refactor(cpus): reorder Neoverse V1 errata by ascending order
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I1c531fe166218804e4fc9ebbdeda2bfebdd69081
2023-08-03 23:02:26 +02:00
Lauren Wehrmeister
708d0abdcd Merge changes from topic "gr/errata_refactor" into integration
* changes:
  refactor(cpus): convert the Cortex-A76 to use cpu helpers
  refactor(cpus): convert the Cortex-A76 to use the errata framework
2023-08-03 22:53:46 +02:00
Bipin Ravi
fc22bcf85c Merge changes from topic "gr/errata_refactor" into integration
* changes:
  refactor(cpus): convert the Cortex-A55 to use cpu helpers
  refactor(cpus): convert the Cortex-A55 to use the errata framework
  refactor(cpus): convert the Cortex-A76AE to use cpu helpers
  refactor(cpus): convert the Cortex-A76AE to use the errata framework
  refactor(cpus): convert the Cortex-A78 to use cpu helpers
  refactor(cpus): convert the Cortex-A78 to use the errata framework
  refactor(cpus): reorder Cortex-A78 errata by ascending order
  refactor(cpus): convert the Cortex-A78C to use cpu helpers
  refactor(cpus): convert the Cortex-A78C to use the errata framework
  refactor(cpus): reorder Cortex-A78C errata by ascending order
  refactor(cpus): convert the Cortex-X1 to use cpu helpers
  refactor(cpus): convert the Cortex-X1 to use the errata framework
  refactor(cpus): reorder Cortex-X1 errata by ascending order
  refactor(cpus): use cpu errata wrappers Cortex-A12 aarch32 cpu
  refactor(cpus): use cpu errata wrappers Cortex-A7 and A9 aarch32 cpus
2023-08-03 22:52:10 +02:00
Govindraj Raja
53e02f2a59 refactor(cpus): convert the Cortex-A76 to use cpu helpers
Change-Id: I9c9dff626f073d762b5c8c2d8286e1654ac5c2e5
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:10:28 -05:00
Govindraj Raja
b6120c69fc refactor(cpus): convert the Cortex-A55 to use cpu helpers
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I45835b223f4734279845610529454fe0148ea43f
2023-08-03 14:10:28 -05:00
Govindraj Raja
6fb2dbd252 refactor(cpus): convert the Cortex-A76 to use the errata framework
Testing:
   - Manual comparison of disassembly with and without conversion.
   - Using the test script in gerrit - 19136
   - Building with errata and stepping through from ArmDS and running tftf.

Change-Id: I126f09de44b16e8bbb7e32477b880b4650eef23b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:10:28 -05:00
Govindraj Raja
1de3c3a95b refactor(cpus): convert the Cortex-A55 to use the errata framework
Testing:
   - Manual comparison of disassembly with and without conversion.
   - Using the test script in gerrit - 19136
   - Building with errata and stepping through from ArmDS and running tftf.

Change-Id: I2ff16be8bb568e37477edbbd7551877cbbde4c60
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:10:28 -05:00
Govindraj Raja
91ba1a5edf refactor(cpus): convert the Cortex-A76AE to use cpu helpers
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I72627afd0e2f10fb754d5c0de137fc9714ed391f
2023-08-03 14:10:28 -05:00
Govindraj Raja
c62d9c7d27 refactor(cpus): convert the Cortex-A76AE to use the errata framework
Testing:
  - Manual comparison of disassembly with and without conversion.
  - Using the test script in gerrit - 19136
  - Building with errata and stepping through from ArmDS and running tftf.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I1936ab6aaef803f653e79f5c6b590a59b34a8ed1
2023-08-03 14:10:28 -05:00
Govindraj Raja
0a3274591a refactor(cpus): convert the Cortex-A78 to use cpu helpers
Change-Id: I3a65815cee9f78acb79b86990d20cf936aee7023
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:10:28 -05:00
Govindraj Raja
20c791e8b0 refactor(cpus): convert the Cortex-A78 to use the errata framework
Testing:
  - Manual comparison of disassembly with and without conversion.
  - Using the test script in gerrit - 19136
  - Building with errata and stepping through from ArmDS and running tftf.

Change-Id: I41e4169fb16ef488e116f6b3b1b5cc78b070c0fb
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:10:18 -05:00
Govindraj Raja
dd0dbe4445 refactor(cpus): reorder Cortex-A78 errata by ascending order
Change-Id: I433b2b1e5b3604bb0a13d167167b0f86255c6903
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
cc0fc5526a refactor(cpus): convert the Cortex-A78C to use cpu helpers
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I6ef39641a9534e48db27ccd63b6190570dbfe760
2023-08-03 14:09:00 -05:00
Govindraj Raja
3c8de370a0 refactor(cpus): convert the Cortex-A78C to use the errata framework
Testing:
      - Manual comparison of disassembly with and without conversion.
      - Using the test script in gerrit - 19136
      - Building with errata and stepping through from ArmDS and running tftf.

Change-Id: Ib361cdfa43fc1c88d97e346d41b1cbf211c045d9
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
1c857218b2 refactor(cpus): reorder Cortex-A78C errata by ascending order
Change-Id: Id5cf37e22ddbd5baffcd80e2fc5c76f4cdc2ed9f
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
1ff96d6da6 refactor(cpus): convert the Cortex-X1 to use cpu helpers
Change-Id: I0b62fa613eab4a7545408c0da0c05f88f5f28838
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
2110686820 refactor(cpus): convert the Cortex-X1 to use the errata framework
Testing:
  - Manual comparison of disassembly with and without conversion.
  - Using the test script in gerrit - 19136
  - Building with errata and stepping through from ArmDS and running tftf.

Change-Id: Ie3909ef51c28a24728752a08ddf96a48d87d3cd7
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
e76cfe50e7 refactor(cpus): reorder Cortex-X1 errata by ascending order
Change-Id: I1e580dd330b545370b23d4b9704d899f6a679250
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:09:00 -05:00
Govindraj Raja
62e84c8804 refactor(cpus): use cpu errata wrappers Cortex-A12 aarch32 cpu
Adapt to use errata frame-work cpu macro helpers for Cortex-A12
aarch32 cpu.

Testing:
- Manual comparison of disassembly with and without the patch.
- Compile testing.

Change-Id: I9bad7f1e3d87419c0451b5d46edf0c406d31a84d
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:08:35 -05:00
Govindraj Raja
3ca54cb4a3 refactor(cpus): use cpu errata wrappers Cortex-A7 and A9 aarch32 cpus
Adapt to use errata frame-work cpu macro helpers for following cpu's:

- Cortex-A7
- Cortex-A9

Testing:
- Manual comparison of disassembly with and without the patch.
- Compile testing.

Change-Id: I88eb90d7fd0e82fc4bfc9d1aee947f0c820e1222
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-08-03 14:07:01 -05:00
Madhukar Pappireddy
12900c4ab6 Merge "fix(imx8m): make IMX_BOOT_UART_BASE autodetection option more obvious" into integration 2023-08-03 18:02:58 +02:00
Joanna Farley
8bcc7532f5 Merge "fix(xilinx): remove clock_setrate and clock_getrate api" into integration 2023-08-03 15:46:44 +02:00
Ronak Jain
e5955d7c63 fix(xilinx): remove clock_setrate and clock_getrate api
As per the current code base, PM_CLOCK_SETRATE and PM_CLOCK_GETRATE
APIs are not supported for the runtime operations in the firmware and
the TF-A it is already returning an error when there is any request
to access these APIs. So, just removing the unused code to avoid the
confusion around these APIs.

Also, there is no issue with the backward compatibility as these APIs
were never used since implemented. Hence no need to bump up the
version of the feature check API as well.

Signed-off-by: Ronak Jain <ronak.jain@amd.com>
Change-Id: I444f973e62cd25aae2e7f697d808210b265106ad
2023-08-02 22:11:49 -07:00
Marco Felsch
101f07022a fix(imx8m): make IMX_BOOT_UART_BASE autodetection option more obvious
Switch from IMX_BOOT_UART_BASE=0 to IMX_BOOT_UART_BASE=auto to make it
more obvious that the detection is based on the runtime autodetection.

In addition this moves the evaluation of IMX_BOOT_UART_BASE into the
makefile which removes the ugly conditional compilation as well.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: I92c13607bf81c6267f4b6aee829d74902b7f72d2
2023-08-02 10:40:27 +02:00
Madhukar Pappireddy
5029574cd8 Merge changes from topic "CPU_RAS_FF" into integration
* changes:
  feat(rdn2): enable Neoverse N2 CPU error handling support
  feat(sgi): firmware first error handling for Neoverse N2 CPU
  feat(arm): enable FHI PPI interrupt to report CPU errors
2023-08-01 20:32:44 +02:00
Omkar Anand Kulkarni
e80274880b feat(rdn2): enable Neoverse N2 CPU error handling support
Defines N2 CPU RAS error for RD-N2 platform variants. Enables N2 CPU
error handling on RD-N2 platform variants.

Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: If9378064c41e0d14e6c789c71f8def594f89e220
2023-08-01 21:09:18 +05:30
Omkar Anand Kulkarni
31d1e4ff8d feat(sgi): firmware first error handling for Neoverse N2 CPU
RD-N2 platform variants have Neoverse N2 CPU that supports RAS
extensions. N2 CPU has error node that captures the faults occurring on
L1, L2 tag and data RAMs. This node captures the error information in
its error records and generates fault handling interrupt on error event.

This patch adds reference implementation to demonstrate firmware-first
error handling of 1-bit CE that occur on CPU. On error event the error
handler reads the error records and ELx context information and forwards
it to secure partition. Secure partition creates a CPER record from this
error information. Finally the handler notifies the OS about the RAS
error using the SDEI notification mechanism.

Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: I769550efee10b9a3d89056bca4bfeb2db4708998
2023-08-01 21:09:18 +05:30
Omkar Anand Kulkarni
f1e4a28d3f feat(arm): enable FHI PPI interrupt to report CPU errors
To handle the core corrected errors in the firmware, the FHI PPI
interrupt has to be enabled on all the cores. At boot, when the RAS
framework is initialized, only primary core is up and hence core FHI PPI
interrupt is enabled only on primary core. This patch adds support to
configure and enable core FHI interrupt for all the secondary cores as
part of their boot sequence.

Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: I4b25152cb498fe975b9c770babb25aa9e01f9656
2023-08-01 21:09:18 +05:30
André Przywara
8eca49e4dd Merge "feat(allwinner): use reset through scpi for warm/soft reset" into integration 2023-08-01 02:16:31 +02:00
Lauren Wehrmeister
231305ec0f Merge changes from topic "jc/errata_refactor" into integration
* changes:
  refactor(cpus): convert Cortex-A72 to use cpu helpers
  refactor(cpus): convert the Cortex-A72 to use the errata framework
  refactor(cpus): reorder Cortex-A72 errata by ascending order
2023-08-01 00:04:01 +02:00
Bipin Ravi
39f63170c7 Merge "refactor(cpus): use cpu errata wrappers for aarch64 hunter based cpus" into integration 2023-07-31 23:17:32 +02:00
Andrey Skvortsov
0cf5f08a20 feat(allwinner): use reset through scpi for warm/soft reset
On systems with SCP (running crust) scpi_system_reboot action
performs board-level (PMIC) reboot. This doesn't preserve RAM content
on A64 PinePhone at least.

warm/soft system reset without RAM reset is required to get
pstore (persistent storage) in RAM working with Linux kernel. That is
very useful for oops/panic logging for post mortem analysis.

scpi_system_reset action performs reset via SoC reset (using watchdog)
and RAM content is preserved in this case. Linux kernel detects
system_reset2 support and uses it for warm reset automatically.

Change-Id: I1c21aa8f27c8e0395e2326034788693b59b80bc4
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2023-07-31 21:55:30 +02:00
Madhukar Pappireddy
b74a193852 Merge "feat(nuvoton): added support for npcm845x chip" into integration 2023-07-31 18:48:28 +02:00
Jayanth Dodderi Chidanand
64ea532dab refactor(cpus): convert Cortex-A72 to use cpu helpers
Change-Id: Ic327389e610bff0f71939cb57d661ea84ddef3f6
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-31 15:28:38 +01:00
Jayanth Dodderi Chidanand
989960cf94 refactor(cpus): convert the Cortex-A72 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.

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.

 * Testing via script was not complete, as it directed to verify the
   check and the workaround functions of few erratas manually.

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

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

 * Manual comparison of disassembly of both both files(bl31.elf)
   ensured,the ported changes were identical and hence verified.

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

   CROSS_COMPILE=aarch64-none-elf- \
   make PLAT=fvp \
   ARCH=aarch64 \
   DEBUG=0 \
   HW_ASSISTED_COHERENCY=1 \
   USE_COHERENT_MEM=0 \
   CTX_INCLUDE_AARCH32_REGS=0 \
   ERRATA_A72_859971=1 \
   ERRATA_A72_1319367=1 \
   WORKAROUND_CVE_2017_5715=1 \
   WORKAROUND_CVE_2018_3639=1 \
   WORKAROUND_CVE_2022_23960=1 \
   BL33=/home/jaychi01/tf_a/tf-a-tests/build/fvp/release/tftf.bin \
   fip all -j12

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure that if Errata are applicable then the workaround
   functions are entered precisely.

Change-Id: I8ee5288f395b0391a242506e7effdb65ab4c4de7
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-31 11:45:33 +01:00
Jayanth Dodderi Chidanand
14197f8e61 refactor(cpus): reorder Cortex-A72 errata by ascending order
Change-Id: I8fa7886a47b37d9e7bd580549971cd59ac3d5606
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-31 11:45:33 +01:00
Olivier Deprez
d66168acd1 Merge "chore(ethos-n): update npu firmware version" into integration 2023-07-31 12:04:24 +02:00
Lauren Wehrmeister
37366af8d4 Merge "fix(cpus): fix minor issue seen with a9 cpu" into integration 2023-07-28 17:04:54 +02:00
Govindraj Raja
e488307124 refactor(cpus): use cpu errata wrappers for aarch64 hunter based cpus
Adapt to use errata frame-work cpu macro helpers for following cpus:

- cortex-a520
- cortex-a720
- cortex-x4
- cortex-chaberton
- cortex-blackhawk

- Use sysreg_bit_set helper macro for enabling of any system register
  bit field.
- Use errata_report_shim macro for reporting errata.
- Use cpu_reset_func_start/end helpers for adding cpu reset functions.

Testing:

- Manual comparison of disassembly with and without conversion.
- Using the test script in gerrit - 19136
- Building with erratas and stepping through from ArmDS and running tftf.

Change-Id: I954fb603aa3746e02f2288656b98148d9cfd7843
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-07-28 09:16:59 -05:00
Govindraj Raja
af704705c1 fix(cpus): fix minor issue seen with a9 cpu
fix typo in a9_794073 report errata.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: Iace9f7fd18af529823488b6b6cb79e6bc13b9d4d
2023-07-27 17:41:02 -05:00
Bipin Ravi
f3c80668c8 Merge "refactor(cpus): convert Cortex-A715 to the errata framework" into integration 2023-07-28 00:22:19 +02:00
Bipin Ravi
e070eadbb2 Merge changes from topic "hm/errata-fw" into integration
* changes:
  refactor(cpus): add Cortex-A17 errata framework information
  fix(fvp): resolve broken workaround reference
2023-07-28 00:21:42 +02:00
Bipin Ravi
6c6cc73770 Merge changes from topics "hm/errata-refactor", "jc/errata_refactor" into integration
* changes:
  refactor(cpus): convert the Cortex-x2 to use cpu helpers
  refactor(cpus): convert the Cortex-x2 to use the errata framework
  refactor(cpus): reorder Cortex-x2 errata by ascending order
  refactor(cpus): convert the Cortex-A65AE to use the errata framework
  refactor(cpus): convert the Cortex-A510 to use cpu helpers
  refactor(cpus): convert the Cortex-A510 to use the errata framework
  refactor(cpus): reorder Cortex-A510 errata by ascending order
  chore(fvp): add Aarch32 Cortex-A53 to the build
  refactor(cpus): add Cortex-A53 errata framework information
  feat(cpus): add errata framework helpers
  chore(brcm): include cpu_helpers.S for bl2 build
2023-07-28 00:09:19 +02:00
Bipin Ravi
79e2fae7cf Merge changes from topic "lw/errata_refactor" into integration
* changes:
  refactor(cpus): convert Neoverse-N1 to use helpers
  refactor(cpus): convert Neoverse-N1 to framework
  refactor(cpus): reorder Neoverse-N1 .S file
  refactor(cpus): convert Neoverse-E1 to framework
2023-07-27 21:01:59 +02:00
Manish V Badarkhe
8dce48afbd Merge "feat(morello): add support for I2S audio" into integration 2023-07-27 14:45:39 +02:00
Manish V Badarkhe
52f0ecdf06 Merge "Revert "docs: disable PDF output for documentation generation"" into integration 2023-07-27 14:15:12 +02:00
Faiz Abbas
6bcbe43790 feat(morello): add support for I2S audio
Add support for Morello I2S audio subsystem. This includes adding the
audio formatter and I2S transmitter nodes and gluing them together with
the hdmi codec using a simple sound card machine node.

Change-Id: I3de4b06ef965c8e0555d074118b944fe6b4b78bb
Signed-off-by: Anurag Koul <anurag.koul@arm.com>
Signed-off-by: Faiz Abbas <faiz.abbas@arm.com>
2023-07-27 15:20:14 +05:30
Manish V Badarkhe
d48a646214 Revert "docs: disable PDF output for documentation generation"
This reverts commit 279e28ed35.

Reason for revert: Re-enable the pdf generation since the necessary fix to generate pdf has already been merged.

Change-Id: Ia68e8caea94b5d89fcf182251a13473b32b4bfad
2023-07-27 11:30:56 +02:00
Jayanth Dodderi Chidanand
fdd3287829 refactor(cpus): convert the Cortex-x2 to use cpu helpers
Change-Id: Ic1016eb8598dbba08cdfc3bdaa24f90411d83a7c
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-27 09:35:12 +01:00
Jayanth Dodderi Chidanand
a62b1b31d8 refactor(cpus): convert the Cortex-x2 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.

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.

 * Testing via script was not complete, as it directed to verify the
   check and the workaround functions of few erratas manually.

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

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

 * Manual comparison of disassembly of both both files(bl31.elf)
   ensured,the ported changes were identical and hence verified.

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

   CROSS_COMPILE=aarch64-none-elf- \
   make PLAT=fvp \
   ARCH=aarch64 \
   DEBUG=0 \
   HW_ASSISTED_COHERENCY=1 \
   USE_COHERENT_MEM=0 \
   CTX_INCLUDE_AARCH32_REGS=0 \
   ERRATA_X2_2002765=1 \
   ERRATA_X2_2017096=1 \
   ERRATA_X2_2058056=1 \
   ERRATA_X2_2081180=1 \
   ERRATA_X2_2083908=1 \
   ERRATA_X2_2147715=1 \
   ERRATA_X2_2216384=1 \
   ERRATA_X2_2282622=1 \
   ERRATA_X2_2371105=1 \
   ERRATA_X2_2768515=1 \
   WORKAROUND_CVE_2022_23960=1 \
   ERRATA_DSU_2313941=1 \
   BL33=/home/jaychi01/tf_a/tf-a-tests/build/fvp/release/tftf.bin \
   fip all -j12

 * Build for debug with all errata enabled and step through ArmDS
   at reset to ensure that if Errata are applicable then the workaround
   functions are entered precisely.

Change-Id: Icd2268cdf27f41240c92e3df23b5ad22f3ce3124
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-27 09:35:12 +01:00