Commit graph

12806 commits

Author SHA1 Message Date
Manish Pandey
bf1e58e737 Merge "docs: update PSCI reference" into integration 2023-06-16 10:44:39 +02:00
Lauren Wehrmeister
aa1055e300 Merge "fix(cpus): reduce generic_errata_report()'s size" into integration 2023-06-15 19:07:36 +02:00
Lauren Wehrmeister
d2e0743698 Merge changes from topic "bk/errata_refactor" into integration
* changes:
  feat(cpus): add more errata framework helpers
  docs: document the errata framework
2023-06-15 16:28:41 +02:00
Boyan Karatotev
f43e09a12e fix(cpus): reduce generic_errata_report()'s size
For a pretty implementation and straightforward code, the CVE/erratum
dispatching of the errata status reporting was done with a macro,
closely following the old code. Unfortunately, this produces a function
that was over a kilobyte in size, which unsurprisingly doesn't fit on
some platforms.

Convert the macro to a proper C function and call it once. Also hide the
errata ordering checking behind the FEATURE_DETECTION flag to further
save space. This functionality is not necessary for most builds.
Development and platform bringup builds, which should find this
functionality useful, are expected to have FEATURE_DETECTION enabled.

This reduces the function to under 600 bytes.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ibf5376a26cbae28d9dc010128452cb3c694a3f78
2023-06-15 10:14:59 +01:00
Boyan Karatotev
94a75ad456 feat(cpus): add more errata framework helpers
Figuring out the naming format of errata is annoying, so add a shorthand
for the custom checker functions. Also add some more semantic macros
instead of passing around constants.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ibdcf72146738026df4ebd047bfb30790fd4a1053
2023-06-15 10:14:59 +01:00
Boyan Karatotev
6a0e8e80fb docs: document the errata framework
Also add a recommended Procedure Call Standard (PCS) to use inside CPU
files and split everything into sections to make it easier to follow.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Idd876d8e598b5dfe1193aa3e7375c52f6edf5671
2023-06-15 10:14:58 +01:00
Manish V Badarkhe
032c698350 Merge "feat(ast2700): add Aspeed AST2700 platform support" into integration 2023-06-15 10:57:58 +02:00
Manish V Badarkhe
3be6b4fbe5 docs: update PSCI reference
PSCI specification reference in the documentation is updated
to point to latest specification and duplicate PSCI references are
removed.

Change-Id: I35ee365f08c557f3017af4d51f6d063a7501b27e
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-06-15 09:46:43 +01:00
Manish V Badarkhe
c219b03df6 Merge "fix(spmd): relax use of EHF with SPMC at S-EL2" into integration 2023-06-13 18:21:39 +02:00
Manish Pandey
e1ce6cdf60 Merge "fix(versal): add missing irq mapping for wakeup src" into integration 2023-06-13 18:18:54 +02:00
Jay Buddhabhatti
06b9c4c87d fix(versal): add missing irq mapping for wakeup src
The commit 0ec6c31320 provides irq to device index mapping
which is required to check for IRQs and set peripheral as a
wake source if IRQ is enabled. But in that commit some IRQ
numbers are missed. Because of that, wakeup using some
peripheral interrupts will not work. Add those missing IRQ
numbers.

Fixes: 0ec6c31320 ("feat(versal): replace irq array with switch case")
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: Icbc773050c328be253702e63e7cf8450c7dee133
2023-06-13 00:29:21 -07:00
Olivier Deprez
bb6d0a174f fix(spmd): relax use of EHF with SPMC at S-EL2
Follow up to [1] and [2], for systems implementing the SPMC at S-EL2,
it is necessary to leave the option for handling Group0 interrupts
(while the normal world runs) through the EHF by the use of the
EL3_EXCEPTION_HANDLING option.
Specifically for RAS, the handling through EHF is still required because
the platform function provided by the SPMD doesn't provide the facility
to link back to the RAS handling framework.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16047
[2] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/19897

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Idf8741887904a286fb3f5ab2d754afd2fc78d3b0
2023-06-13 08:59:17 +02:00
Lauren Wehrmeister
0484b2cb9c Merge "docs: update Measured Boot PoC" into integration 2023-06-12 18:23:37 +02:00
Manish Pandey
f51bbacff6 Merge "fix(zynqmp): fix prepare_dtb() memory description" into integration 2023-06-12 17:33:00 +02:00
Sandrine Bailleux
7ae96dcebd Merge "chore(bl): add UNALIGNED symbols for TEXT/RODATA" into integration 2023-06-12 14:43:17 +02:00
Manish V Badarkhe
7a8a97f582 Merge changes from topics "hm/latex", "hm/latexpdf" into integration
* changes:
  fix(docs): fix build errors for latexpdf
  chore: reformat sphinx configuration
2023-06-12 13:49:19 +02:00
Michal Simek
f7d445fcbb chore(bl): add UNALIGNED symbols for TEXT/RODATA
Add symbols to mark end of TEXT/RODATA before page alignment.
Similar change was done by commit 8d69a03f6a ("Various
improvements/cleanups on the linker scripts") for
RO_END/COHERENT_RAM. These symbols help to know how much free
space is in the final binary because of page alignment.

Also show all *UNALIGNED__ symbols via poetry.
For example:
poetry run memory -p zynqmp -b debug

Change-Id: I322beba37dad76be9f4e88ca7e5b3eff2df7d96e
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-06-12 12:50:08 +02:00
Harrison Mutai
443d6ea699 fix(docs): fix build errors for latexpdf
Fixes errors encountered when handling SVG graphics, unicode characters,
and deeply nested lists (i.e. in the change log) with the `latexpdf`
docs build. Adds `sphinxcontrib-svg2pdfconverter` to allow embedding SVG
images into PDF files; changes the LaTeX engine to XeLaTex to provide
wider support for unicode characters (see [1] for more details); and
increases the maximum list depth.

[1] https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_engine

Change-Id: I2ee265d301f6822bae7aa6dfa3a8bfcf070076d3
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-06-12 10:56:30 +01:00
Manish Pandey
f4d011b0f0 Merge changes from topic "psci-osi" into integration
* changes:
  fix(psci): add optional pwr_domain_validate_suspend to plat_psci_ops_t
  fix(sc7280): update pwr_domain_suspend
  fix(fvp): update pwr_domain_suspend
2023-06-12 10:22:50 +02:00
Manish V Badarkhe
30ee1b065d docs: update Measured Boot PoC
Updated the Measured Boot PoC to be compliant with the current TF-A
implementation that supports multiple Measured Boot backends, which
are the RSS and Event Log.

Change-Id: I8a38a801dd75e6282d103e154966959bba2d1ec7
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-06-12 09:08:48 +01:00
Sandrine Bailleux
f3c25f9c93 Merge "fix(memmap): reintroduce support for GNU map files" into integration 2023-06-12 08:30:17 +02:00
Chia-Wei Wang
85f199b774 feat(ast2700): add Aspeed AST2700 platform support
Aspeed AST2700 is a quad-core SoC with ARM Cortex-A35 integrated.
This patch adds the initial platform support for AST2700 and also
updates the documents.

Change-Id: I1796f7aae5ed2d1799e91fabb8949607959cd9b3
Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2023-06-12 10:28:21 +08:00
Olivier Deprez
1c0612d815 Merge "chore: remove unused and undefined function" into integration 2023-06-09 17:03:05 +02:00
Olivier Deprez
c161772f40 Merge "refactor(el3-spmc): add emad_advance()" into integration 2023-06-08 15:47:09 +02:00
Harrison Mutai
d0e3053c4f fix(memmap): reintroduce support for GNU map files
The intial patch stack only supported ELF files, which proved
particularly problematic when dealing with incomplete builds (i.e. build
didn't complete due to linker errors). This adds support for GNU map
files. Most analysis performed by the tool should be possible with map
files alone.

Change-Id: I89f775a98efc5aef6671a17d0e6e973df555a6fa
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-06-08 14:06:00 +01:00
Manish V Badarkhe
919e25e9e3 Merge "docs: add detail to assembly language guideline" into integration 2023-06-08 11:50:12 +02:00
Manish V Badarkhe
c64681d0ff Merge "feat(aarch64): add stack debug information to assembly routines" into integration 2023-06-08 11:23:43 +02:00
Sandrine Bailleux
1b4d99878c Merge "fix(doc): match boot-order size to implementation" into integration 2023-06-08 08:30:40 +02:00
Manish Pandey
f1a32f4978 Merge "chore(xilinx): replace ATF with TFA" into integration 2023-06-07 17:49:58 +02:00
Manish Pandey
f6bf4d6bc8 Merge changes from topic "hm/memmap-feat" into integration
* changes:
  feat(memmap): add topological memory view
  feat(memmap): add tabular memory use data
2023-06-07 17:48:14 +02:00
Manish Pandey
d4affdce80 Merge "fix(stm32mp1): add void entry in plat_def_toc_entries" into integration 2023-06-07 17:30:11 +02:00
Madhukar Pappireddy
c58a9c36fa Merge "fix(zynqmp): fix sdei arm_validate_ns_entrypoint()" into integration 2023-06-07 16:25:46 +02:00
Michal Simek
3efee73d52 fix(zynqmp): fix prepare_dtb() memory description
The commit 8ce2fbffe3 ("fix(zynqmp): fix BLXX memory limits for user
defined values") fixed logic around BL31_LIMIT but didn't update
prepare_dtb() which is also using +1 logic.

Change-Id: Ia6de10d992a552ca9cfa39c14261b0f94cda95ec
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-06-07 16:01:59 +05:30
Manish Pandey
6e1ae30725 Merge "fix(qemu): fix 32-bit builds with stack protector" into integration 2023-06-07 10:50:16 +02:00
Olivier Deprez
ab23061eb0 Merge changes from topic "bk/clearups" into integration
* changes:
  chore(rme): add make rule for SPD=spmd
  chore(bl1): remove redundant bl1_arch_next_el_setup
  chore(docs): remove control register setup section
  chore(pauth): remove redundant pauth_disable_el3() call
2023-06-07 10:13:17 +02:00
Michal Simek
3b3c70a418 fix(zynqmp): fix sdei arm_validate_ns_entrypoint()
Don't use BL31_LIMIT macro for validation logic directly but clearly
mark BL31_LIMIT as 64bit address to avoid compilation error when
-Werror=logical-op is passed.

Likely caused by ZYNQMP_ATF_MEM_BASE + ZYNQMP_ATF_MEM_SIZE is in 64bit
logic 0x100000000 and compiler handles it as 32bit value. That's why
error is shown.

Use uint64_t variable for limit and also for base.

Here is command line to replicate this issue:
make realclean; make -j PLAT=zynqmp DEBUG=1 RESET_TO_BL31=1 \
SPD=tspd SDEI_SUPPORT=1 ZYNQMP_ATF_MEM_BASE=0xFFFC0000 \
ZYNQMP_ATF_MEM_SIZE=0x00040000 all -Werror=logical-op

Also error which is coming:
plat/xilinx/zynqmp/zynqmp_sdei.c: In function
   'arm_validate_ns_entrypoint':
plat/xilinx/zynqmp/zynqmp_sdei.c:19:40: error: logical 'or' of
 collectively  exhaustive tests is always true [-Werror=logical-op]
   19 |         return (entrypoint < BL31_BASE ||
   entrypoint > BL31_LIMIT) ? 0 : -1;

Change-Id: Ie1f1b4d2cd94b977aebb72786ecace0b062da418
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-06-07 09:11:29 +02:00
Madhukar Pappireddy
396ea00a83 Merge changes I907f3862,Ie749ff06,If8da2bb1,I457deb0b into integration
* changes:
  fix(el3-spmc): validate shmem descriptor alignment
  refactor(el3-spmc): avoid using EINVAL
  fix(el3-spmc): avoid descriptor size calc overflow
  fix(el3-spmc): use uint64_t for 64-bit type
2023-06-06 22:12:02 +02:00
Sandrine Bailleux
201e3c78a7 Merge "chore(fconf): rename last occurences of set_fw_config_info()" into integration 2023-06-06 17:49:06 +02:00
Raghu Krishnamurthy
01c1b3e17f chore: remove unused and undefined function
Clean up unused function

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: Ib761d04070f7eb7e0dddad4ad885ce11f82582b8
2023-06-06 08:19:06 -07:00
Manish Pandey
e1c0a47267 Merge changes from topic "dummy_feat_aa32" into integration
* changes:
  feat(cpufeat): deny AArch64-only features when building for AArch32
  feat(cpufeat): add AArch32 PAN detection support
2023-06-06 16:50:36 +02:00
Manish Pandey
dbe4765c30 Merge "refactor(el3-spmc): avoid unneeded function call" into integration 2023-06-06 16:44:49 +02:00
Manish Pandey
f4c913630d Merge changes Ia052c7f9,If598680a,Ieae11722 into integration
* changes:
  refactor(el3-spmc): move function call out of loop
  refactor(el3-spmc): crash instead of reading OOB
  fix(el3-spmc): prevent total_page_count overflow
2023-06-06 16:43:53 +02:00
Madhukar Pappireddy
1d64109ece Merge changes from topic "st-fixes" into integration
* changes:
  fix(spi-nand): add Quad Enable management
  fix(st-clock): disabling CKPER clock is not functional on stm32mp13
  fix(st-uart): skip console flush if UART is disabled
  fix(st): flush UART at the end of uart_read()
  fix(stm32mp1): use the BSEC nodes compatible for stm32mp13
  fix(stm32mp13-fdts): correct the BSEC nodes compatible
  fix(stm32mp1-fdts): move /omit-if-no-ref/ to overlay files
  fix(stm32mp1): properly check PSCI functions return
2023-06-06 16:03:38 +02:00
Sandrine Bailleux
8dadc1e2a6 chore(fconf): rename last occurences of set_fw_config_info()
set_fw_config_info() interface got renamed into set_config_info() as
part of commit f441718936 ("lib/fconf:
Update 'set_fw_config_info' function"). Rename a few left-overs of the
old name.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I119719cd7f3ba544e0c4c438e5341d35c7b5bdc2
2023-06-06 14:38:34 +02:00
Sandrine Bailleux
e14b7acb49 Merge "refactor(fvp): nv ctr addr static helper function" into integration 2023-06-06 13:30:26 +02:00
Prasad Kummari
c8be2240d3 chore(xilinx): replace ATF with TFA
Since the Arm Trusted Firmware(ATF) has been renamed to Trusted
Firmware-A (TF-A), replace all the instances of ATF from code comments,
macros, variables and functions to TF-A.

Change-Id: Iab448d96158612a3effb4e49943f8d6cb43aaad5
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-06-06 17:00:14 +05:30
Sandrine Bailleux
e9736a01a1 Merge changes from topic "version/0.1-gic" into integration
* changes:
  feat(qemu-sbsa): handle GIC base
  feat(qemu-sbsa): handle platform version
2023-06-06 11:08:42 +02:00
Olivier Deprez
4c8e1f9a35 Merge changes I21d65a88,I949cfce9,If4249f22,Id0451bd1,I9e930070, ... into integration
* changes:
  feat(mediatek): add APU watchdog timeout control
  feat(mt8188): add emi mpu protection for APU secure memory
  feat(mt8188): add devapc setting of apusys rcx
  feat(mt8188): add backup/restore function when power on/off
  feat(mediatek): add APU bootup control smc call
  feat(mt8188): enable apusys mailbox mpu protect
  feat(mt8188): enable apusys domain remap
  feat(mt8188): add apusys ao devapc setting
  feat(mt8188): increase TZRAM_SIZE from 192KB to 256KB
2023-06-06 09:31:05 +02:00
Chungying Lu
baa0d45ced feat(mediatek): add APU watchdog timeout control
Add APU watchdog timeout control.

Change-Id: I21d65a88d20b6b2752a75f74487b5fe6596ebdf7
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: Karl Li <karl.li@mediatek.com>
2023-06-06 13:45:40 +08:00
Chungying Lu
176846a50b feat(mt8188): add emi mpu protection for APU secure memory
Add emi mpu protection of APU secure memory.

Change-Id: I949cfce97565d8a313caae4ea41af60a171042a6
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: Karl Li <karl.li@mediatek.com>
2023-06-06 13:45:40 +08:00