Commit graph

1904 commits

Author SHA1 Message Date
Maheedhar Bollapalli
9ded5e8d8b fix(console): add missing curly braces
This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement.
Enclosed statement body within the curly braces.

Change-Id: If8e77b291380fa7d9d95cab5836235790404b620
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-03-07 13:22:18 +01:00
Maheedhar Bollapalli
03c6bb0e38 fix(arm-drivers): add missing curly braces
This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement.
Enclosed statement body within the curly braces.

Change-Id: I66f957467bdee13052847f3e8c5ad6ae258c4222
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-03-07 13:22:18 +01:00
Maxime Méré
bdbbf48f4d fix(st-pmic): remove deadcode from STPMIC2 driver
"regul" corresponds to a specific part of a global table that can't be
undefined. Thus, checking if it is NULL is useless.

Issue found by Coverity (CID 445089).

Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: Ic812bc1fde12fe8389677c7c72fb85246c50f5c9
2025-02-26 20:18:16 +01:00
Manish V Badarkhe
99b2ae269e Merge changes from topic "jw/gic-lca-support" into integration
* changes:
  fix(rdn2): add LCA multichip data for RD-N2-Cfg2
  fix(rdv3): add LCA multichip data for RD-V3-Cfg2
  feat(gic): add support for local chip addressing
2025-02-20 17:17:35 +01:00
Ghennadi Procopciuc
47b3a8251f feat(s32g274a): enable sdhc clock
The uSDHC module clock must be enabled to use the SD/eMMC storage from
where the BL2 is expected to load images for the next boot stages.

Change-Id: Ib1cc7d5dda7a4283a29716f5b3d776048bd5b7ba
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
cf6d73d4c3 feat(nxp-clk): add clock modules for uSDHC
One of the uSDHC module's clock lines is attached to the CGM_MUX 14
 divider, which is connected to PERIPH_DFS3. The other one is attached
 to XBAR_DIV3.

Change-Id: I23f468a3e5f7daa832c0841b55211a048284a7f0
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
15869048b2 feat(nxp-clk): get MC_CGM divider's parent
The parent of the MC_CGM divider will always be the MC_CGM mux
identified based on s32cc_cgm_div.parent.

Change-Id: Ie13b16e0ee56f35d61374efbe158f166b99960b7
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
ad412c0d82 feat(nxp-clk): get MC_CGM divider's rate
The MC_CGM divider's frequency is obtained based on the state of the
settings found in its registers. If the divider is disabled, the
intended rate (s32cc_cgm_div.freq) will be returned.

Change-Id: I41698990952b530021de26eb51f74aca50176575
Co-developed-by: Florin Buica <florin.buica@nxp.com>
Signed-off-by: Florin Buica <florin.buica@nxp.com>
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
f99078a6a0 feat(nxp-clk): set MC_CGM divider's rate
The MC_CGM divider's frequency is saved as part of the object metadata.
No checks are performed on the requested frequency. It will be validated
during the enablement process.

Change-Id: Ide9c8c64be16a66b66f129735cebfc4d1f1772c5
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
2710bdadc4 feat(nxp-clk): enable MC_CGM dividers
Add the enablement mechanism for the MC_CGM dividers. The division
factor is established by dividing the parent's rate by the rate of the
divider's output.

Change-Id: Iadb84f4f47531a67b0b1509b94e1f2b962631a77
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:04 +02:00
Ghennadi Procopciuc
35988a9db0 feat(nxp-clk): get parent for the fixed dividers
Fixed dividers contribute to the Linflex and QSPI clocks.

Change-Id: Idb4e6fe883e117b2bb9260b6eeb6e15d75ce887e
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:59:02 +02:00
Ghennadi Procopciuc
8501b1fc60 feat(nxp-clk): set the rate for partition objects
Only the partition block link can set the frequency, while the other two
should not be able to because none of them participate in the clock
generation. In the first case, the request will be propagated to the
parent object of the partition link.

Change-Id: Ic237972008eb51c62e92f03f657698a8a1ca4b0e
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:53:50 +02:00
Ghennadi Procopciuc
63d536fe18 feat(nxp-clk): add clock objects for CGM dividers
The CGM dividers are controllable dividers attached to a CGM mux. Its
divison factor can be controlled through the MC_CGM's registers.

Change-Id: Id2786a46c5a1d389ca32a4839c7158949aec3b0a
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:53:50 +02:00
Ghennadi Procopciuc
29f8a952cb feat(nxp-clk): add base address for PERIPH_DFS
The PERIPH_DFS module is used to clock the SD and QSPI modules.

Change-Id: I440fd806d71acab641f0003a7f2a5ce720b469c6
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-02-18 09:53:50 +02:00
Yann Gautier
91c7a952be refactor(rse)!: remove rse_comms_init
The function to use is now rse_mbx_init(), that does the same if
using MHU.

Change-Id: I712712d7d1bcd8c96d26951e176b877afb65209d
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2025-02-12 10:11:49 +01:00
Yann Gautier
36416b1e76 refactor(rse): put MHU code in a dedicated file
To be able to use RSE comms without MHU, a first step is to disentangle
the rse_comms.c file with MHU code direct calls. This is done with the
creation of a new file rse_comms_mhu.c. New APIs are created to
initialize the mailbox, get max message size and send and receive data.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I75dda77e1886beaa6ced6f92c311617125918cfa
2025-02-12 10:11:49 +01:00
Yann Gautier
a773955094 refactor(arm)!: rename PLAT_MHU_VERSION flag
In order to support a platform without MHU in RSE, update the flag
PLAT_MHU_VERSION. It is renamed PLAT_MHU and can take the following
entries: NO_MHU, MHUv1, MHUv2, MHUv3...

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ia72e590088ce62ba8c9009f341b6135926947bee
2025-02-12 10:11:46 +01:00
Manish Pandey
fcb80d7d14 Merge changes I765a7fa0,Ic33f0b6d,I8d1a88c7,I381f96be,I698fa849, ... into integration
* changes:
  fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset
  chore(docs): drop the "wfi" from `pwr_domain_pwr_down_wfi`
  chore(psci): drop skip_wfi variable
  feat(arm): convert arm platforms to expect a wakeup
  fix(cpus): avoid SME related loss of context on powerdown
  feat(psci): allow cores to wake up from powerdown
  refactor: panic after calling psci_power_down_wfi()
  refactor(cpus): undo errata mitigations
  feat(cpus): add sysreg_bit_toggle
2025-02-11 16:52:18 +01:00
Madhukar Pappireddy
55740f3d3e Merge changes from topic "nxp-clk/add_get_rate" into integration
* changes:
  feat(nxp-clk): restore pll output dividers rate
  feat(nxp-clk): get pll rate using get_module_rate
  feat(nxp-clk): add get_rate for partition objects
  feat(nxp-clk): add get_rate for clock muxes
  feat(nxp-clk): add get_rate for s32cc_pll_out_div
  feat(nxp-clk): add get_rate for s32cc_fixed_div
  feat(nxp-clk): add get_rate for s32cc_dfs_div
  feat(nxp-clk): add get_rate for s32cc_dfs
  feat(nxp-clk): add get_rate for s32cc_pll
  feat(nxp-clk): add get_rate for s32cc_clk
  feat(nxp-clk): add a basic get_rate implementation
2025-02-05 15:41:04 +01:00
Boyan Karatotev
da305ec75d feat(arm): convert arm platforms to expect a wakeup
Newer cores in upcoming platforms may refuse to power down. The PSCI
library is already prepared for this so convert platform code to also
allow this. This is simple - drop the `wfi` + panic and let common code
deal with the fallout. The end result will be the same (sans the
message) except the platform will have fewer responsibilities. The only
exception is for cores being signalled to power off gracefully ahead of
system reset. That path must also be terminal so replace the end with
the same psci_pwrdown_cpu_end() to behave the same as the generic
implementation. It will handle wakeups and panic, hoping that the system
gets reset from under it. The dmb is upgraded to a dsb so no functional
change.

Change-Id: I381f96bec8532bda6ccdac65de57971aac42e7e8
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-03 14:29:47 +00:00
Boyan Karatotev
2b5e00d4ea feat(psci): allow cores to wake up from powerdown
The simplistic view of a core's powerdown sequence is that power is
atomically cut upon calling `wfi`. However, it turns out that it has
lots to do - it has to talk to the interconnect to exit coherency, clean
caches, check for RAS errors, etc. These take significant amounts of
time and are certainly not atomic. As such there is a significant window
of opportunity for external events to happen. Many of these steps are
not destructive to context, so theoretically, the core can just "give
up" half way (or roll certain actions back) and carry on running. The
point in this sequence after which roll back is not possible is called
the point of no return.

One of these actions is the checking for RAS errors. It is possible for
one to happen during this lengthy sequence, or at least remain
undiscovered until that point. If the core were to continue powerdown
when that happens, there would be no (easy) way to inform anyone about
it. Rejecting the powerdown and letting software handle the error is the
best way to implement this.

Arm cores since at least the a510 have included this exact feature. So
far it hasn't been deemed necessary to account for it in firmware due to
the low likelihood of this happening. However, events like GIC wakeup
requests are much more probable. Older cores will powerdown and
immediately power back up when this happens. Travis and Gelas include a
feature similar to the RAS case above, called powerdown abandon. The
idea is that this will improve the latency to service the interrupt by
saving on work which the core and software need to do.

So far firmware has relied on the `wfi` being the point of no return and
if it doesn't explicitly detect a pending interrupt quite early on, it
will embark onto a sequence that it expects to end with shutdown. To
accommodate for it not being a point of no return, we must undo all of
the system management we did, just like in the warm boot entrypoint.

To achieve that, the pwr_domain_pwr_down_wfi hook must not be terminal.
Most recent platforms do some platform management and finish on the
standard `wfi`, followed by a panic or an endless loop as this is
expected to not return. To make this generic, any platform that wishes
to support wakeups must instead let common code call
`psci_power_down_wfi()` right after. Besides wakeups, this lets common
code handle powerdown errata better as well.

Then, the CPU_OFF case is simple - PSCI does not allow it to return. So
the best that can be done is to attempt the `wfi` a few times (the
choice of 32 is arbitrary) in the hope that the wakeup is transient. If
it isn't, the only choice is to panic, as the system is likely to be in
a bad state, eg. interrupts weren't routed away. The same applies for
SYSTEM_OFF, SYSTEM_RESET, and SYSTEM_RESET2. There the panic won't
matter as the system is going offline one way or another. The RAS case
will be considered in a separate patch.

Now, the CPU_SUSPEND case is more involved. First, to powerdown it must
wipe its context as it is not written on warm boot. But it cannot be
overwritten in case of a wakeup. To avoid the catch 22, save a copy that
will only be used if powerdown fails. That is about 500 bytes on the
stack so it hopefully doesn't tip anyone over any limits. In future that
can be avoided by having a core manage its own context.

Second, when the core wakes up, it must undo anything it did to prepare
for poweroff, which for the cores we care about, is writing
CPUPWRCTLR_EL1.CORE_PWRDN_EN. The least intrusive for the cpu library
way of doing this is to simply call the power off hook again and have
the hook toggle the bit. If in the future there need to be more complex
sequences, their direction can be advised on the value of this bit.

Third, do the actual "resume". Most of the logic is already there for
the retention suspend, so that only needs a small touch up to apply to
the powerdown case as well. The missing bit is the powerdown specific
state management. Luckily, the warmboot entrypoint does exactly that
already too, so steal that and we're done.

All of this is hidden behind a FEAT_PABANDON flag since it has a large
memory and runtime cost that we don't want to burden non pabandon cores
with.

Finally, do some function renaming to better reflect their purpose and
make names a little bit more consistent.

Change-Id: I2405b59300c2e24ce02e266f91b7c51474c1145f
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-03 14:29:47 +00:00
Olivier Deprez
cf084b3620 Merge "fix(gicv3): do not assume redistributors are powered down" into integration 2025-01-30 16:27:44 +01:00
Jerry Wang
c89438bcea feat(gic): add support for local chip addressing
This patch adds support for Local Chip Addressing (LCA). In a multi-chip
system, enablig LCA allows each GIC Distributor to maintain its own
version of routing table. This feature is activated when the
GICD_CFGID.LCA bit is set to 1.

The existing `gic600_multichip_data` data structure did not account for
the LCA feature. To support LCA:
- `rt_owner_base` is replaced by `base_addrs[]`. This is required
  because each GICD in the system needs to be configured independently,
  and their base addresses must be passed to the driver.
- `chip_addrs` is changed from 1D to 2D array to store the routing table
  for each chip's GICD. The entries in `chip_addrs` are configuration
  dependent, as the GIC specification does not enforce this.

On a multi-chip platform with chip count N where LCA is enabled by
default, the `gic600_multichip_data` structure should contain all copies
of the routing table (N*N entries). On platforms where LCA is not
supported, only the first sub-array with N entries is required. The
function signature of `gic600_multichip_init` remains unchanged, but if
the LCA feature is enabled, the driver will expect the routing table
configuration in the described format.

Change-Id: I8830c2cf90db6a0cae78e99914cd32c637284a2b
Signed-off-by: Jerry Wang <Jerry.Wang4@arm.com>
2025-01-23 16:27:24 +01:00
Ghennadi Procopciuc
c23dde6c19 feat(nxp-clk): restore pll output dividers rate
Reconfiguration of the PLL may be requested while some output dividers
are already enabled. To prevent setting a different frequency for these
enabled dividers, the driver will attempt to adjust the division factor
to achieve the initially requested rate.

Change-Id: I7800c05b2f21bbdeda243db865942b647983687d
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
43b4b29fb9 feat(nxp-clk): get pll rate using get_module_rate
The DFS can use the get_module_rate instead of assuming its parent
object is a PLL. It also has the advantage that the frequency will be
returned based on the hardware state of the PLL module.

Change-Id: I3a270cbc92622ae82606382df1301597dc29782a
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
a74cf75f08 feat(nxp-clk): add get_rate for partition objects
The partition-related objects do not participate in clock rate
calculation, except the s32cc_part_block_link_t, whose call is forwarded
to the parent object.

Change-Id: Id9e7fa49c3c1fb5b30b4c1b97fc8441bc967578a
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
d1567da68d feat(nxp-clk): add get_rate for clock muxes
From the get rate callback perspective, all types of clock muxes should
return the frequency of the selected source, regardless of whether it is
an MC_CGM or PLL mux.

Change-Id: I24ae821013b0844e4d62793fde12b53b043a9776
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
a762c50579 feat(nxp-clk): add get_rate for s32cc_pll_out_div
The get rate callback is needed for s32cc_pll_out_div to get the A53
cores and DDR rate.

Change-Id: Ife7860c9941e819b612d7948dac9843bdf0c31c4
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
7c298ebcbf feat(nxp-clk): add get_rate for s32cc_fixed_div
The get rate callback is needed for s32cc_fixed_div to allow the
frequency compilation for modules attached to a fixed divider like
LINFLEXD_CLK.

Change-Id: Ibc3e52f7f1127bba0dd793be0a26bdff15260824
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
8f23e76fa5 feat(nxp-clk): add get_rate for s32cc_dfs_div
Add the option to obtain the rate of an s32cc_dfs_div object. As in the
case of the PLL, the output divider of a DFS will return its targeted
frequency if the module is disabled and calculate the rate based on the
settings found in its registers if the module is turned on.

Change-Id: Id6db92dbdf03f8119875476ad8f7aa268ff6ea93
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
2fb25509b8 feat(nxp-clk): add get_rate for s32cc_dfs
Add the option to obtain the rate of an s32cc_dfs object. The DFS rate
depends on the module to which it's connected. Therefore, it will always
return the rate of its parent.

Change-Id: Ie3becd36721f541d0fab11b2fb57aacd66d48220
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
fbebafa518 feat(nxp-clk): add get_rate for s32cc_pll
Add the option to obtain the rate of an s32cc_pll object. The rate of
the PLL can be obtained regardless of its hardware state. The targeted
frequency is returned in case the PLL is off. Otherwise, the frequency
is determined based on settings found in its registers.

Change-Id: Id200d0eff149109a724eee69b063bf750d5cba2e
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
46de0b9c99 feat(nxp-clk): add get_rate for s32cc_clk
Add the option to obtain the rate of an s32cc_clk object. s32cc_clk are
usually links to either another s32cc_clk or a different clock module.
Therefore, this function routes the request.

Change-Id: I0c1174cb861d2062882319e46cb6ca97bad70aab
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:24 +02:00
Ghennadi Procopciuc
bd69113663 feat(nxp-clk): add a basic get_rate implementation
Replace the dummy implementation of clk_ops.get_rate with a basic
version that only handles the oscillator objects. Subsequent commits
will add more objects to this list.

Change-Id: I8c1bbbfa6b116fdcf5a1f1353bdb52b474bac831
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-23 13:13:22 +02:00
Manish Pandey
a1ff78f53a Merge "fix(smmu): set root port CR0 GPCEN before ACCESSEN" into integration 2025-01-16 11:12:09 +01:00
Govindraj Raja
f532cd3069 Merge changes I137f69be,Ia2e7168f,I0e569d12,I614272ec,Ib68293f2 into integration
* changes:
  perf(psci): pass my_core_pos around instead of calling it repeatedly
  refactor(psci): move timestamp collection to psci_pwrdown_cpu
  refactor(psci): factor common code out of the standby finisher
  refactor(psci): don't use PSCI_INVALID_PWR_LVL to signal OFF state
  docs(psci): drop outdated cache maintenance comment
2025-01-15 17:03:27 +01:00
Ghennadi Procopciuc
61b5ef21af feat(s32g274a): split early clock initialization
Initializing all early clocks before the MMU is enabled can impact boot
time. Therefore, splitting the setup into A53 clocks and peripheral
clocks can be beneficial, with the peripheral clocks configured after
fully initializing the MMU.

Change-Id: I19644227b66effab8e2c43e64e057ea0c8625ebc
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-14 13:02:51 +02:00
Ghennadi Procopciuc
514c738045 feat(nxp-clk): dynamic map of the clock modules
Add all clock modules as entries in MMU using dynamic regions.

Change-Id: I56f724ced4bd024554c7b38afd14ea420de80cc6
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2025-01-14 13:02:51 +02:00
Boyan Karatotev
3b8021058a perf(psci): pass my_core_pos around instead of calling it repeatedly
On some platforms plat_my_core_pos is a nontrivial function that takes a
bit of time and the compiler really doesn't like to inline. In the PSCI
library, at least, we have no need to keep repeatedly calling it and we
can instead pass it around as an argument. This saves on a lot of
redundant calls, speeding the library up a bit.

Change-Id: I137f69bea80d7cac90d7a20ffe98e1ba8d77246f
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-01-14 10:02:00 +00:00
Olivier Deprez
8cc972421f fix(smmu): set root port CR0 GPCEN before ACCESSEN
In the SMMU root port programming model, changing both
SMMU_ROOT_CR0.GPCEN and ACCESSEN bits in the same MMIO write operation
is permitted by the architecture but left to the SMMU IP implementation
to determine the order of completing one or the other operation.

Enforce more determinism by setting CR0.GPCEN, wait for CR0ACK.GPCEN
completion, then setting CR0.ACCESSEN and wait for CR0ACK.ACCESSEN
completion.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I36ba5fbc13d06c6243226008d18a2d57477b0d28
2025-01-07 17:45:01 +01:00
Ryan Everett
640ba6343b refactor(mbedtls): rename default mbedtls confs
Change the name of these confs to be version agnostic,
we will later use these configs to enforce the mbedtls
minimum version

Change-Id: I1f665c2471877ecc833270c511749ff845046f10
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-12-09 15:59:45 +00:00
Marek Vasut
1a5711519a fix(rcar3-drivers): disable A/B loader support by default
The A/B loader [1] meant to be used for convenient CI testing.
The tool is installed into the same location as SA0, where it
conveniently fits due to its size, and where it makes use of
non-volatile PMIC registers to alternate between loading and
starting A or B copy of the BL2. The PMIC registers are used
because CPU registers are lost across reset.

In case the B copy is loaded, it is loaded from 8 MiB offset
from start of HF. In case the B copy fails to boot, a simple
reset of the system will switch back to booting previously
known working A copy and allow recovery.

The A/B loader sets MFIS bit MFISBTSTSR_BOOT_PARTITION to
pass the information which A/B copy is currently booting on
to TFA, which then loads the follow up components from 0 MiB
or 8 MiB offset, depending on whether the A or B copy is being
booted.

The MFISBTSTSR_BOOT_PARTITION interferes with regular A/B
switching during boot from eMMC as the boot media, where
the BootROM also sets MFISBTSTSR_BOOT_PARTITION bit in case
the system boots from SECOND eMMC HW BOOT partition.

Since the A/B loader is meant as a development and CI tool,
isolate the A/B loader use to RPC HF only and furthermore
isolate it behind new RCAR_RPC_HYPERFLASH_ABLOADER option
which is disabled by default.

[1] https://github.com/marex/abloader

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Change-Id: I04ecd50fa1405b78e1ba3949d54029034d4f22d8
2024-11-10 16:09:55 +01:00
Ryan Everett
885bd91f27 fix(mbedtls): fix error return code for calc_hash
Make this function return values from crypto_ret_value.
The previous method of returning the mbedtls error code
on failure meant that the authentication module couldn't
correctly parse failures from this function.

Change-Id: I9fe6eba1fc79e8f81004f8cd202781aea907e963
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-11-08 15:51:39 +00:00
Ryan Everett
12a8e95303 fix(psa): fix P-384 PSA key signature verification
The buffer size allocated for the raw ECDSA signatures
was too small for P-384 signatures. This led to mbedtls
aborting the generation of the raw sig.

Fix this by increasing the buffer size to the required
value.

Change-Id: I06a9cfe1f4cb2603c5fbe945714e90460c24edb8
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-11-06 16:58:40 +00:00
Yann Gautier
13cc1a5064 fix(st-ddr): move skipddc_dat definition
The skipddc_dat variable is only use at one place in dfixlat_program()
function. Move its definition and update there to avoid compilation
issues about variables being set but not used.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I6b5273365f1da26773fc46f898362cb9af170506
2024-11-04 18:45:26 +01:00
Sieu Mun Tang
beba20403e fix(intel): refactor SDMMC driver for Altera products
Refactor to be more robust. Removed duplicated and not used functions.
Add in ADMA read.

Change-Id: I1a5a00397ece6f9ccc5916225ab5317010b01b52
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-25 09:38:51 +08:00
Manish V Badarkhe
d7adbb5258 Merge "refactor(delay-timer): add timer callback functions" into integration 2024-10-17 21:16:04 +02:00
Joanna Farley
8ee6534417 Merge changes from topic "xlnx_fix_plat_console_changes" into integration
* changes:
  feat(xilinx): add none console
  feat(versal2): add dtb & runtime console
  feat(versal-net): add DTB console to platform.mk
  feat(versal-net): dedicate console for boot and runtime
  feat(versal): add DTB console to platform.mk
  feat(versal): dedicate console for boot and runtime
  refactor(xilinx): register runtime console directly
  refactor(xilinx): console registration through console holder structure
  feat(zynqmp): add DTB console to platform.mk
  feat(zynqmp): dedicate console for boot and runtime
  fix(xilinx): dcc to support runtime console scope
  refactor(xilinx): create generic function for DT console
  refactor(xilinx): rename setup_runtime_console to generic
  chore(xilinx): rename console variables
  chore(xilinx): rename runtime console to DT console
2024-10-16 15:23:28 +02:00
Abhi.Singh
a6485b2b3b refactor(delay-timer): add timer callback functions
In order to avoid separate platform definitions when not using the
default timer functions, it is better to move these functions out of the
header file and into the source files, so that they can be built if
needed.

Move timer functions from delay_timer.h into generic_delay_timer.c. Add
them as callback functions which are then called in delay_timer.c.

Change-Id: I96a1eac8948b1a7b1e481899b67a083db4c9b97d
Signed-off-by: Abhi Singh <abhi.singh@arm.com>
2024-10-16 10:33:03 +02:00
Maheedhar Bollapalli
238eb542bb fix(xilinx): dcc to support runtime console scope
DCC driver to support boot and runtime console scope
switch for dedicated boot and runtime consoles.

Change-Id: I7769dc44860a5fda99ca42ce17a3a6009288d7e7
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:34:26 +00:00