Commit graph

14263 commits

Author SHA1 Message Date
Sughosh Ganu
7ae16196cc feat(fwu): document the config flag for including image info in the FWU metadata
The version 2 of the FWU metadata structure is designed such that the
information on the updatable images can be omitted from the metadata
structure. Add a config flag, PSA_FWU_METADATA_FW_STORE_DESC, which is
used to select whether the metadata structure has this information
included or not. It's value is set to 1 by default.

Change-Id: Id6c99455db768edd59b0a316051432a900d30076
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2024-03-01 14:19:56 +05:30
Sughosh Ganu
e106a78ef0 feat(fwu): update the URL links for the FWU specification
Update the links for accessing the FWU Multi Bank update specification
to point to the latest revision of the specification.

Change-Id: I25f35556a94ca81ca0a7463aebfcbc2d84595e8f
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2024-03-01 14:19:56 +05:30
Jens Wiklander
c09aa4ff76 refactor(qemu): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects the QEMU platform only.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: I6188d73dd3f3c97f41bb25de543f8c46a972adf0
2024-03-01 09:07:19 +01:00
Shruti Gupta
ba33528a00 fix(el3-spmc): add datastore linker script markers
Datastore symbol used by EL3 SPMC is not relocated at
boot time when using ENABLE_PIE=1.
Use linker script markers instead of symbol.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: If22d2fc8deacc74c73d7dc51bb70093935d9fa2b
2024-02-29 14:54:37 +01:00
Bipin Ravi
fa45e03c38 Merge "build(npm): update Node.js and all packages" into integration 2024-02-28 17:32:28 +01:00
Bipin Ravi
7f69a40697 fix(cpus): workaround for Cortex-X3 erratum 2372204
Cortex-X3 erratum 2372204 is a Cat B erratum that applies to revisions
r0p0 and r1p0. It is fixed in r1p1.

The workaround is to set bit[40] of CPUACTLR2_EL1 to disable folding
of demand requests into older prefetches with L2 miss requests
outstanding.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2055130/latest

Change-Id: Iad28f8625c84186fbd8049406d139d4f15c6e069
Signed-off-by: Bipin Ravi <biprav01@u203721.austin.arm.com>
2024-02-28 10:25:08 -06:00
Manish V Badarkhe
61ee40b1c9 Merge changes I6ac59693,Ib0e4e5cf into integration
* changes:
  refactor(tc): reorder config variable defines
  refactor(tc): move DTB to start of DRAM
2024-02-28 15:17:59 +01:00
Manish V Badarkhe
c2f9ba88f4 Merge changes from topic "mp/undef_injection" into integration
* changes:
  feat(el3-runtime): introduce UNDEF injection to lower EL
  feat(cpufeat): added few helper functions
2024-02-28 14:38:49 +01:00
Manish Pandey
3c789bfccc feat(el3-runtime): introduce UNDEF injection to lower EL
For a feature to be used at lower ELs, EL3 generally needs to disable
the trap so that lower ELs can access the system registers associated
with the feature. Lower ELs generally check ID registers to dynamically
detect if a feature is present (in HW) or not while EL3 Firmware relies
statically on feature build macros to enable a feature.

If a lower EL accesses a system register for a feature that EL3 FW is
unaware of, EL3 traps the access and panics. This happens mostly with
EL2 but sometimes VMs can also cause EL3 panic.

To provide platforms with capability to mitigate this problem, UNDEF
injection support has been introduced which injects a synchronous
exception into the lower EL which is supposed to handle the
synchronous exception.

The current support is only provided for aarch64.

The implementation does the following on encountering sys reg trap

 - Get the target EL, which can be either EL2 or EL1
 - Update ELR_ELx with ELR_EL3, so that after UNDEF handling in lower EL
   control returns to original location.
 - ESR_ELx with EC_UNKNOWN
 - Update ELR_EL3 with vector address of sync exception handler with
   following possible causes
     - Current EL with SP0
     - Current EL with SPx
     - Lower EL using AArch64
 - Re-create SPSR_EL3 which will be used to generate PSTATE at ERET

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I1b7bf6c043ce7aec1ee4fc1121c389b490b7bfb7
2024-02-28 12:47:29 +00:00
Manish Pandey
57c266dc25 Merge "fix(gpt): use DC CIGDPAPA when MTE2 is implemented" into integration 2024-02-28 12:35:59 +01:00
Manish V Badarkhe
92c36b31a1 Merge changes from topic "part_crc" into integration
* changes:
  feat(gpt): validate CRC of GPT partition entries
  refactor(gpt): return header instead of part_lba
2024-02-28 11:24:41 +01:00
Manish Pandey
30f05b4f5d feat(cpufeat): added few helper functions
Following utility functions/bit definitions done
 - Write a helper function to return the presence of following features
    - FEAT_UAO
    - FEAT_EBEP
    - FEAT_SEBEP
    - FEAT_SSBS
    - FEAT_NMI
    - FEAT_PAN
 - Add definition of some missing bits of SPSR.
 - Add GCSCR_EL1 register encoding and accessor function.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ifcead0dd8e3b32096e4ab810dde5d582a889785a
2024-02-28 10:02:24 +00:00
Chris Kay
c7080f6788 build(npm): update Node.js and all packages
This change updates the Node Version Manager version file to the latest
long-term release version of Node.js, v20.11.1, and the Node.js Package
Manager package file to require Node.js version v20 or later.

Additionally, all Node.js modules have been updated, as some packages
required additional accommodations to be made compatible with this
version of Node.js.

As part of this, the `.commitlintrc.js` has been rewritten from CommonJS
to ECMAScript. There should be no impact on the behaviour of Commitlint,
but this was was a requirement to allow Commitlint to continue using it
for configuration.

Change-Id: I7043faabc516c58edda9e58848b0569e2158b271
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-02-27 18:50:10 +00:00
laurenw-arm
7a9e9f6e96 feat(gpt): validate CRC of GPT partition entries
While loading partition entries, calculate CRC using tf_crc32() for each
entry to find the full CRC value of the partition entry array.

The start of the GPT partition entry array is located at the LBA
indicated by the partition entry array LBA field in the GPT header. The
size of the partition entry array is indicated by the size of partition
entry multiplied by the number of partition entries.

Compare the calculated CRC with the partition entry array CRC in the GPT
header, error out if the values do not match.

Change-Id: I4bfed8cf903125c1ef3fac2f0f4c0fb87d63aa78
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-02-27 09:44:21 -06:00
laurenw-arm
17a261decd refactor(gpt): return header instead of part_lba
Alter the function parameter to pass the full GPT header to be filled
instead of the starting LBA of the array of partion entries to
load_partition_gpt()

Change-Id: Ib3dde62d5b9996e74157714634bea748bd3b55aa
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-02-27 09:44:17 -06:00
Manish V Badarkhe
df21d41b77 Merge changes I1415e402,Ia92cc693,I7a42f72e,I6e75659e,I4c6136c5, ... into integration
* changes:
  refactor(tc): correlate secure world addresses with platform_def
  feat(tc): add memory node in the device tree
  feat(tc): pass the DTB address to BL33 in R0
  feat(tc): add arm_ffa node in dts
  chore(tc): add dummy entropy to speed up the Linux boot
  feat(tc): choose the DPU address and irq based on the target
  feat(tc): add SCMI power domain and IOMMU toggles
  refactor(tc): move the FVP RoS to a separate file
  feat(tc): factor in FVP/FPGA differences
  feat(tc): introduce an FPGA subvariant and TC3 CPUs
  feat(tc): add TC3 platform definitions
  refactor(tc): sanitise the device tree
  feat(tc): add PMU entry
  feat(tc): allow booting from DRAM
  chore(tc): remove unused hdlcd
  feat(tc): add firmware update secure partition
  feat(tc): add spmc manifest with trusty sp
  refactor(tc): unify all the spmc manifests
  feat(arm): add trusty_sp_fw_config build option
  fix(tc): do not enable MPMM and Aux AMU counters always
  fix(tc): correct interrupts
  feat(tc): interrupt numbers for `smmu_700`
  feat(tc): enable gpu/dpu scmi power domain and also gpu perf domain
2024-02-27 10:59:58 +01:00
Manish Pandey
f7e6b3b9e0 Merge "fix(psa): fix static check failure" into integration 2024-02-27 10:50:01 +01:00
Jacky Bai
5ae4aae2c0 docs(maintainers): add the maintainers for imx8ulp
Add the maintainers for NXP i.MX8ULP.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ifc5f86ad6eb7288ef28765311fc3b1ff48031df5
2024-02-27 14:29:54 +08:00
Jacky Bai
c67057fee0 docs(imx8ulp): add imx8ulp platform
Add i.MX8ULP platform introduction.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Idc16bcf5b23542f8a1f394a474309239ddcb9685
2024-02-27 14:29:54 +08:00
Jacky Bai
047d7d1ba2 fix(imx8ulp): increase the mmap region num
the mmap region num is not enough for the mmap regions,
so increase it, increase the xlat_table num too.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I2a2515b291e96cc12398a2c2c526351342811fff
2024-02-27 14:29:54 +08:00
Ji Luo
8d50c91b47 feat(imx8ulp): adjust the dram mapped region
below commit mapped 16 MB memory from the start of DRAM(0x80000000),
which may have conflict with the shared memory used by Trusty OS:
  LF-8819: plat: imx8ulp: ddrc switch auto low power and software interface

change the mapped memory to 'vdev0buffer' reserved memory (0x8ff00000)
to avoid memory conflict. This commit also bumps the XTLB tables
to avoid mapping failure.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I1a7af958af47e3fc9955d0a80d1649971e843eab
2024-02-27 14:29:54 +08:00
Adrian Alonso
ee25e6a51b feat(imx8ulp): ddrc switch auto low power and software interface
Enable switch between DDRC Auto low power and software/hardware
control modes DDRC Auto low-power mode is used when system is
active, software/hardware control mode is used when going into
suspend. Enable switching between Auto mode and SW/HW mode in
enter/exit retention routines.

Set LPI_SRPD_LONG_MCCLK_GATE_WAKEUP_F2 Max setting to allow
LPDDR_EN_CLKGATE reload LPI_SRPD_LONG_MCCLK_GATE_WAKEUP_F2 to
exit retention mode

Signed-off-by: Pascal Mareau <pascal.mareau@nxp.com>
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Hongting Ting <hongting.dong@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I3c4b6f7bc6ca02649ff27cd3d9a0c50dab3a3ad0
2024-02-27 14:29:54 +08:00
Jacky Bai
c514d3cfa7 feat(imx8ulp): add some delay before cmc1 access
When resume from APD sleep mode, need to add a small delay
before accessing the CMC1 register.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Ic8acdf58a3bf82b1791e7ae7f173f8c94c56b49d
2024-02-27 14:29:54 +08:00
Jacky Bai
4fafccb9a8 feat(imx8ulp): add a flag check for the ddr status
for some user case, the ddr may need to be controlled
by RTD side to save power, when APD resume from low
power mode, it should wait ddr is ready for access.
currently we use a GPR in SIM_RTD_SEC as a flag to
indicate when the DDR is for access, non-zero value
means the DDR can be access from APD.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I6fb0cc17a040d803a597304620202423f646f294
2024-02-27 14:29:54 +08:00
Jacky Bai
e1d5c3c8f4 fix(imx8ulp): add sw workaround for csi/hotplug test hang
When doing CSI stress test after cpu hotplug, sometimes, system
will hang in CSI test. After some debug, we find that if slow
down the APD NIC frequency before power on the offline CPU,
the issue is gone. For now, just add such SW workaround.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I39a49efc382fbebf46e1ff15c93d506bd5f6bec1
2024-02-27 14:29:54 +08:00
Jacky Bai
416c4433f0 feat(imx8ulp): adjust the voltage when sys dvfs enabled
When system level DVFS is enabled, voltage can be changed to
optimize the power consumption.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Idfa0e637402078f3daf6e7c4ea1abb9af7675494
2024-02-27 14:29:54 +08:00
Jacky Bai
caee2733ba feat(imx8ulp): enable the DDR frequency scaling support
Enable the DDR frequency scaling support on i.MX8ULP.
Normally, the freq_index define is as below:

 0: boot frequency;
 1: low frequency(PLL bypassed);
 2. high frequency(PLL ON).

Currently, DDR DFS only do frequency switching between
Low freq and high freq.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I3acd8bdf75e2dd6dff645b9f597dcfc0a756c428
2024-02-27 14:29:54 +08:00
Ye Li
68f132b88b fix(imx8ulp): fix suspend/resume issue when DBD owner is s400 only
After resume from APD power down, XRDC is initialized by S400 but
the PAC2 and MSC0-2 are not configured, so only DBD owner can access
the resources.

We have to move GPIO restore after TFA XRDC reinit and configure
PDAC for PCC5 before enabling eDMA2 MP clock

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I82748de080151b0bdf1cace092b7892a1e402a27
2024-02-27 14:29:54 +08:00
Ye Li
d159c00532 feat(imx8ulp): update XRDC for ELE to access DDR with CA35 DID
In order to isolate application memories, ELE FW introduces
a new policy which mimics the requestor attributes (DID, TZ).
So ELE configures SCM to access to external memory with CA35 DID
when CA35 request something from ELE.

Because ELE accesses DDR through NIC_LPAV, the XRDC MRC6 must be
configured for CA35 DID 7 to authorize the access.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I9e91a1b2798e8d15127d1bfa9aa0ffc612fd8981
2024-02-27 14:29:54 +08:00
Ji Luo
5fd06421f8 feat(imx8ulp): add memory region policy
set the memory region policy for secure heap(0xA9600000 ~ 0xAF600000),
it can only be RWX by secure master. At the same time, restrict G2D
and DCnano(domain 3) to write non-secure memory when they are set as
secure master.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: If53e130eaeb1ac867ee56e4af04e3be29dec9857
2024-02-27 14:29:53 +08:00
Ye Li
ff5e1793b9 feat(imx8ulp): protect TEE region for secure access only
Using XRDC MRC4/5/6 to restrict the secure access for TEE DDR
memory to protect TEE.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ic161df6a98ded23b9a74d552717fc5dcc1ee2ae8
2024-02-27 14:29:53 +08:00
Ji Luo
e853041920 feat(imx8ulp): add trusty support
Support trusty on imx8ulp.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I7ada2557023e271a721d50bfe7fd20b5f01cb128
2024-02-27 14:29:53 +08:00
Clement Faure
e7b82a7d2f feat(imx8ulp): add OPTEE support
Add opteed support for imx8ulp.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Iddf6f164b7146332e99de42fcbbf9c892eb1d994
2024-02-27 14:29:53 +08:00
Jacky Bai
36af80c2b4 feat(imx8ulp): update the upower config for power optimization
Enable the AFBB by default for active mode when APD side wakeup
from low power mode to align with the first time boot up.

Update the power mode configs to force shutdown all the
necessary power switches to optimize the power consumption.

To reduce the pad power consumption, put all the pad into
OFF mode to save more power. the PTD's compensation should
also be disabled in low power mode to save more power.

when APD enters PD mode, the LDO1(used by DDR) can be shutdown
to save power. when APD enters DPD mode, the BUCK3(supply for
APD/LPAV) can be shutdown to save power.

In single boot mode, When APD enters DPD mode, buck3 will
shutdown, LDO1 should be off to save more power as the DDR
controller has lost power.

In dualboot mode, the LPAV is owned by RTD side. When APD enters
low power mode, APD side should not config those PMIC regulators
that used by the resource owned by RTD side.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ie5e9b428f85345b81744313a8fb93bfc27e0dd71
2024-02-27 14:29:53 +08:00
Ye Li
ea1f7a2e10 feat(imx8ulp): allow RTD to reset APD through MU
Clear HRM bit in MU0_B CCR0 register to allow RTD to reset APD.
The action needs at both ATF init and APD resume.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I2475e34b13f57818580a478ab567bfb9fc6cf174
2024-02-27 14:29:53 +08:00
Ye Li
ab787dba77 feat(imx8ulp): not power off LPAV PD when LPAV owner is RTD
Upower will check the LPAV ownership when power off the SRAM or PS.
if the LPAV owner is not APD, then the power off will return failure.
Add similar checking in SCMI PD driver to skip the power off to avoid
failure print causing suspend/resume not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I9dc657c2277129ac90a792232f734c08fca5f997
2024-02-27 14:29:53 +08:00
Jacky Bai
891c547e96 feat(imx8ulp): add system power off support
On i.MX8ULP, we need to use the APD deep power down(DPD) mode
to support the system power off function. when APD enter
power off mode, only the RTD can re-kick it and boot from ROM.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Ifb42db0a7cf87b932160c59b47eca4d0f08f8cdf
2024-02-27 14:29:53 +08:00
Jacky Bai
478af8d3c3 feat(imx8ulp): add APD power down mode(PD) support in system suspend
The APD can be put into PD mode when linux suspend(mem). This patch
add the support for it. As the whole AP domain's context will be lost,
so we must save the necessary HW module states before entering PD mode,
and we need to restore those contexts when system wake up. Fot details
about which HW module's state will be lost, please refer to the RM.

When APD enter PD mode, only the wakeup event connected to the WUU
can wakeup APD successfully. The upower wakeup source is used to
wakeup APD by RTD due to the factor that the MU between A core & M
core is not connected into WUU to generate wakeup event.

as the SRAM0 will be power down when APD enters PD mode, so we
need to re-init the scmi channels(resides in the SRAM0). otherwise
the SCMI can NOT work anymore.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I44b0cdc8397e5d6a82081ea6746542e9fa4b9fc1
2024-02-27 14:29:53 +08:00
Jacky Bai
daa4478a3c feat(imx8ulp): add the basic support for idle & system suspned
Add basic support for the cpuidle(cluster retention) and system
suspend support using the HW sleep mode.

When system enter low power mode after doing reboot twice, APD
will be failed to exit from low power mode successfully. it is
because that after secondary reboot, upower will modify the default
power switch config, then DDR will be off wrongly. So config the
low power mode info explicitly before APD entering any low power
mode.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ib68bfdfd4b925541e343aef4a5296a542451f86b
2024-02-27 14:29:53 +08:00
Jacky Bai
bcca70b968 feat(imx8ulp): enable 512KB cache after resume on imx8ulp
The L2 cache size config will be reset to default 256KB,
So we need to switch to 512KB after resume to make sure
the L2 cache size is same as before suspend.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Ifd9b3e01829fbd7b1ae4ba00611359330f1a4f83
2024-02-27 14:29:53 +08:00
Jacky Bai
ac5d69b628 feat(imx8ulp): add the initial XRDC support
Add the initial xRDC support on i.MX8ULP.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I93ea8e2cebb049e6f20e71cfe50c7583a3228f38
2024-02-27 14:29:53 +08:00
Pankaj Gupta
7c5eedca4c feat(imx8ulp): allocated caam did for the non secure world
JR1, JR2 and JR3 are available for use by the non secure
world. Setup the A35 core DID for these job rings.

Signed-off-by: Varun Sethi <v.sethi@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: If64d4ce11ebff49a2405d8b561b344fcd7b2614f
2024-02-27 14:29:53 +08:00
Jacky Bai
fcd41e8692 feat(imx8ulp): add i.MX8ULP basic support
Add the basic support for i.MX8ULP.

The i.MX 8ULP family of processors features NXP’s advanced
implementation of the dual Arm Cortex-A35 cores alongside
an Arm Cortex-M33. This combined architecture enables the
device to run a rich operating system (such as Linux) on
the Cortex-A35 core and an RTOS (such as FreeRTOS) on the
Cortex-M33 core. It also includes a Cadence Tensilica Fusion
DSP for low-power audio and a HiFi4 DSP for advanced audio
and machine learning applications.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I12df622b95960bcdf7da52e4c66470a700690e36
2024-02-27 14:29:53 +08:00
Jacky Bai
0d6b4cdb23 build(changelog): add new scopes for nxp imx8ulp platform
Add new scopes for NXP i.MX8ULP SoC family.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I2fa646fdfa8040ee8142f48e1dfad6f42812d576
2024-02-27 14:29:53 +08:00
Jacky Bai
e63819f2bc feat(scmi): add scmi sensor support
LF-4715-1 drivers: scmi-msg: add sensor support

Add scmi sensor support

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I810e270b138bf5486b32df121056bfa5103c129f
2024-02-27 14:29:53 +08:00
Boyan Karatotev
96a5f8762c refactor(tc): reorder config variable defines
They are very scattered, hard to read, and especially hard to track
down. As a result some are duplicate and some are overridden in the
downstream as it's simpler.

Put all variables at the top of the platform makefile. Also drop setting
variables that don't change from their default values
(CTX_INCLUDE_EL2_REGS, ARCH, ENABLE_FEAT_RAS, SDEI_SUPPORT,
EL3_EXCEPTION_HANDLING, HANDLE_EA_EL3_FIRST_NS, ENABLE_SPE_FOR_NS).

While we're at it, add some variables that are necessary. SPMD
requires MTE registers to be saved, BRANCH_PROTECTION, as well as
running at SEL2. All of our CPUs are Armv8.7 compliant so we can have
ARM_ARCH_MINOR=7 (and drop ENABLE_TRF_FOR_NS which it includes).

Finally, drop the override directives as there's no reason to prohibit
experimentation (even if incorrect).

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I6ac596934952aab8abf5d4db5220e13a4941a10c
2024-02-26 16:07:41 +00:00
Boyan Karatotev
6dacc272b0 refactor(tc): correlate secure world addresses with platform_def
Similarly to the memory node in the NS device tree, platform_def already
defines all the necessary values to populate the spmc manifest and NS
related entries automatically. Use the macros directly so any changes
can propagate automatically.

The result of this is that TC3 and above get correct secure world
manifests automatically. They were previously broken.

One "breaking" change is that the FWU region moves. This should have
happened previously but it was missed when the secure portion of DRAM
was increased, leaving it in secure memory. This was caught when going
over the definitions and correlating them should prevent this in the
future.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1415e402be8c70f5e22f28eabddcb53298c57a11
2024-02-26 16:07:41 +00:00
Boyan Karatotev
d585aa162e refactor(tc): move DTB to start of DRAM
Now that tf-a passes the DTB address to BL33, its location doesn't
matter. Since we declare a fixed size for it (32K) put it at the start
of ram to not fragment memory. This has the added benefit of
"supporting" larger kernel sizes which are breaking with the current
location.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ib0e4e5cf780bd58a49a34d72085b0a0914c340ed
2024-02-26 16:07:41 +00:00
Boyan Karatotev
5ee4deb8e6 feat(tc): add memory node in the device tree
With new TC revisions, memory banks move around which requires an update
in platform_def. It also requires an update in the device tree which
doesn't come naturally. To avoid this, add the memory node such that it
uses the macros defined in platform_def.

By doing this we can put u-boot out of its misery in trying to come up
with the correct memory node and tf-a's device tree becomes complete.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ia92cc6931abb12be2856ac3fb1455e4f3005b326
2024-02-26 16:07:41 +00:00
Boyan Karatotev
638e4a92d8 feat(tc): pass the DTB address to BL33 in R0
The DTB that tf-a loads is already used in BL33 directly with the
address hardcoded. As this address is prone to changing, pass it forward
so we can avoid breakage in the future.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I7a42f72ecc00814b9f0a4bf5605d70cb53ce2ff4
2024-02-26 16:07:41 +00:00