Just to inform project contributors that people may find their gerrit access rights may be broken at this time.
I have raised a support request with the trustedfirmware.org support team.
Joanna
Hi All,
The next TF-A Tech Forum is scheduled for Thu 27th August 2020 16:00 – 17:00 (BST). A reoccurring meeting invite has been sent out to the subscribers of this TF-A mailing list. If you don’t have this please let me know.
Agenda:
* TF-A Errata Process – Presented by Bipin Ravi
* Bug Review Committee (BRC) & Categorization of Errata
* Software Developers Errata Notice (SDEN) & Product Errata Notice (PEN)
* What TF-A Implements
* How TF-A Implements
* Testing
If TF-A contributors have anything they wish to present at any future TF-A tech forum please contact me to have that scheduled.
Previous sessions, both recording and presentation material can be found on the trustedfirmware.org TF-A Technical meeting webpage: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/
A scheduling tracking page is also available to help track sessions suggested and being prepared: https://developer.trustedfirmware.org/w/tf_a/tf-a-tech-forum-scheduling/ Final decisions on what will be presented will be shared a few days before the next meeting and shared on the TF-A mailing list.
Thanks
Joanna
<Cc alias>
-----Original Message-----
From: Sandeep Tripathy <sandeep.tripathy(a)broadcom.com>
Sent: Tuesday, August 25, 2020 8:59 AM
To: Varun Wadekar <vwadekar(a)nvidia.com>; Soby Mathew <Soby.Mathew(a)arm.com>
Subject: RE: [TF-A] [RFC] Api to power down all cores
Thanks,
I will use callback as param to get rid of the 'plat*'. 'void psci_stop_other_cores(void (*stop_func)(uregister_t mpidr))'
Platform can call like .. psci_stop_other_cores(ipi_send_stop); I will
update the patch tomorrow.
This api is not invoked by psci generic functions. So I think that should suffice your concern. Anyways I will take care any other suggestions.
IPI implementation is under flag 'IPI_SUPPORT'.
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5323/
Thanks
Sandeep
> -----Original Message-----
> From: Varun Wadekar [mailto:vwadekar@nvidia.com]
> Sent: Tuesday, August 25, 2020 9:11 AM
> To: Soby Mathew; Sandeep Tripathy
> Subject: RE: [TF-A] [RFC] Api to power down all cores
>
> Hi,
>
> In addition to the suggestions already posted, we should provide a
> build flag or dynamic knob to allow platforms to disable this feature.
>
> -Varun
>
> -----Original Message-----
> From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of Soby
> Mathew via TF-A
> Sent: Friday, August 21, 2020 3:57 AM
> To: Sandeep Tripathy <sandeep.tripathy(a)broadcom.com>
> Cc: tf-a(a)lists.trustedfirmware.org
> Subject: Re: [TF-A] [RFC] Api to power down all cores
>
> External email: Use caution opening links or attachments
>
>
> Hi Sandeep,
> Thanks for the clarification. I too think this has general utility and
> since you need access to internal PSCI data to perform the
> functionality , exporting a utility function from PSCI for platforms
> to invoke seems the right thing to do.
> The small concern I have is using the `plat_*` namespace as this is a
> utility function invoked by the platform and another porting layer
> beneath it seems out of place.
>
> I would suggest to add a parameter to stop_other_cores(), this could
> be either the IPI number or a callback function to trigger the IPI.
> This allows to provide the platform specific details without `plat_*`
> API.
>
> Best Regards
> Soby Mathew
>
> > -----Original Message-----
> > From: Sandeep Tripathy <sandeep.tripathy(a)broadcom.com>
> > Sent: 21 August 2020 07:17
> > To: Soby Mathew <Soby.Mathew(a)arm.com>
> > Cc: tf-a(a)lists.trustedfirmware.org
> > Subject: RE: [TF-A] [RFC] Api to power down all cores
> >
> > Hi Soby,
> > I realize using term 'PSCI API' in rfc tag is misleading like Achin
> > mentioned in gerrit.
> >
> > Here I wanted to have a generic API to 'stop_other_cores' in
> > secure world.
> > The usage is platform firmware specific.
> > Implementation of 'stop_other_cores' depends on a generic 'IPI'
> > support
> (1).
> > It leverages the existing EHF. So I feel it is not adding and
> > complexity or overhead in normal execution path.
> >
> > 'stop_other_cores' API implementation depends on some psci private
> > functions to traverse the pd nodes and extract MPIDRs for target pe
> > list. That was the reason to put the function within psci lib. So
> > there are
> two things.
> > 1- Does this idea of 'stop_other_core' api qualify to be generic
> > 2- Does a generic IPI layer make sense
> >
> > Thanks
> > Sandeep
> > > -----Original Message-----
> > > From: Soby Mathew [mailto:Soby.Mathew@arm.com]
> > > Sent: Thursday, August 20, 2020 8:54 PM
> > > To: Sandeep Tripathy
> > > Cc: tf-a(a)lists.trustedfirmware.org
> > > Subject: RE: [TF-A] [RFC] psci: api to power down all cores
> > >
> > > Hi Sandeep,
> > > Just to understand better, if there is a secure side
> > > panic/watchdog interrupt, then the secure side is already able to
> > > do such an intervention without the availability of a PSCI API to the NS side.
> > >
> > > In case the NS world has crashed, then PSCI_SYSTEM_RESET and
> > > PSCI_SYSTEM_OFF APIs can be invoked which then does the
> > > appropriate actions. From my reading, the PSCI specification
> > > doesn't prevent firmware implementation of the reset and off API's
> > > from doing the kind of implementation as per your proposal.
> >
> > I intend to do 'stop_other_cores' in platform extension of
> > 'plat_system_resetx()', secure side watchdog expiry/
> > plat_panic_handler().
> >
> > >
> > > Best Regards
> > > Soby Mathew
> > >
> > > > -----Original Message-----
> > > > From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of
> > > Sandeep
> > > > Tripathy via TF-A
> > > > Sent: 19 August 2020 16:42
> > > > To: tf-a(a)lists.trustedfirmware.org
> > > > Subject: [TF-A] [RFC] psci: api to power down all cores
> > > >
> > > > Hi,
> > > > I am proposing to have a generic api in psci lib which can be
> > > > used to
> > > force
> > > > power down all other cores from any initiating core analogous to
> > > > 'smp_cpu_stop' in linux. It is immune to interrupt lock by
> > > > EL1/EL2 software.
> > > >
> > > > Platforms may use this api in case of secure side panic, secure
> > > > watchdog interrupt handling or if required in certain types of
> > > > warm resets. The usage
> > > is
> > > > platform dependent.
> > > >
> > > > This depends on a generic implementation of secure IPI (1) which
> > > > uses EHF
> > > to
> > > > handle IPI at platform defined priority. We probably require
> > > > more types of secure IPIs.
> > > >
> > > > Please review the series
> > > > Ref:
> > > > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5
> > > > 32
> > > > 4
> > > >
> > > > diff --git a/lib/psci/psci_system_off.c
> > > > b/lib/psci/psci_system_off.c index
> > > > 141d69e..011aaa6 100644
> > > > --- a/lib/psci/psci_system_off.c
> > > > +++ b/lib/psci/psci_system_off.c
> > > > @@ -10,10 +10,44 @@
> > > > #include <arch_helpers.h>
> > > > #include <common/debug.h>
> > > > #include <drivers/console.h>
> > > > +#include <drivers/delay_timer.h>
> > > > #include <plat/common/platform.h>
> > > >
> > > > #include "psci_private.h"
> > > >
> > > > +#ifndef PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS #define
> > > > +PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> > > > +
> > > > +#if IMAGE_BL31
> > > > +void psci_stop_other_cores(void) { #define
> > > > +PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> > > > +
> > > > +#if IMAGE_BL31
> > > > +void psci_stop_other_cores(void) {
> > > > + int idx, this_cpu_idx, cnt;
> > > > +
> > > > + this_cpu_idx = plat_my_core_pos();
> > > > +
> > > > + /* Raise G0 IPI cpustop to all cores but self */
> > > > + for (idx = 0; idx < psci_plat_core_count; idx++) {
> > > > + if ((idx != this_cpu_idx) &&
> > > > + (psci_get_aff_info_state_by_idx(idx) ==
> > > > AFF_STATE_ON)) {
> > > > +
> > > > plat_ipi_send_cpu_stop(psci_cpu_pd_nodes[idx].mpidr);
> > > > + }
> > > > + }
> > > > +
> > > > + /* Wait for others cores to shutdown */
> > > > + for (cnt = 0; cnt < PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS;
> > > > + cnt++)
> > > {
> > > > + if (psci_is_last_on_cpu())
> > > > + break;
> > > > + mdelay(1);
> > > > + }
> > > > +
> > > > + if (!psci_is_last_on_cpu()) {
> > > > + WARN("Failed to stop all cores!\n");
> > > > + psci_print_power_domain_map();
> > > > + }
> > > > +}
> > > > +#endif
> > > > +
> > > >
> > > > (1)
> > > > RFC: ipi: add ipi feature
> > > > Ref:
> > > > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-
> > > a/+/5323/1
> > > >
> > > > Thanks
> > > > Sandeep
> > > > --
> > > > TF-A mailing list
> > > > TF-A(a)lists.trustedfirmware.org
> > > > https://lists.trustedfirmware.org/mailman/listinfo/tf-a
> --
> TF-A mailing list
> TF-A(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hello team,
Requesting reviews for the latest patches [1] form our internal repos for Tegra platforms. I have updated the verification steps for each patch in the comments to help answer some questions.
Thanks in advance.
-Varun
[1] https://review.trustedfirmware.org/q/topic:%22tegra-downstream-08252020%22+…
Hi,
Please find the latest report on new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
1 new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 361456: Memory - illegal accesses (NEGATIVE_RETURNS)
/services/std_svc/spmd/spmd_main.c: 49 in spmd_get_context_by_mpidr()
________________________________________________________________________________________________________
*** CID 361456: Memory - illegal accesses (NEGATIVE_RETURNS)
/services/std_svc/spmd/spmd_main.c: 49 in spmd_get_context_by_mpidr()
43
44 /*******************************************************************************
45 * SPM Core context on CPU based on mpidr.
46 ******************************************************************************/
47 spmd_spm_core_context_t *spmd_get_context_by_mpidr(uint64_t mpidr)
48 {
>>> CID 361456: Memory - illegal accesses (NEGATIVE_RETURNS)
>>> Using variable "plat_core_pos_by_mpidr(mpidr)" as an index to array "spm_core_context".
49 return &spm_core_context[plat_core_pos_by_mpidr(mpidr)];
50 }
51
52 /*******************************************************************************
53 * SPM Core context on current CPU get helper.
54 ******************************************************************************/
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P…
Hi Soby,
I realize using term 'PSCI API' in rfc tag is misleading like Achin
mentioned in gerrit.
Here I wanted to have a generic API to 'stop_other_cores' in secure world.
The usage is platform firmware specific.
Implementation of 'stop_other_cores' depends on a generic 'IPI' support
(1).
It leverages the existing EHF. So I feel it is not adding and complexity or
overhead in normal execution path.
'stop_other_cores' API implementation depends on some psci private
functions to traverse the pd nodes and
extract MPIDRs for target pe list. That was the reason to put the function
within psci lib. So there are two things.
1- Does this idea of 'stop_other_core' api qualify to be generic
2- Does a generic IPI layer make sense
Thanks
Sandeep
> -----Original Message-----
> From: Soby Mathew [mailto:Soby.Mathew@arm.com]
> Sent: Thursday, August 20, 2020 8:54 PM
> To: Sandeep Tripathy
> Cc: tf-a(a)lists.trustedfirmware.org
> Subject: RE: [TF-A] [RFC] psci: api to power down all cores
>
> Hi Sandeep,
> Just to understand better, if there is a secure side panic/watchdog
> interrupt,
> then the secure side is already able to do such an intervention without
> the
> availability of a PSCI API to the NS side.
>
> In case the NS world has crashed, then PSCI_SYSTEM_RESET and
> PSCI_SYSTEM_OFF APIs can be invoked which then does the appropriate
> actions. From my reading, the PSCI specification doesn't prevent firmware
> implementation of the reset and off API's from doing the kind of
> implementation as per your proposal.
I intend to do 'stop_other_cores' in platform extension of
'plat_system_resetx()',
secure side watchdog expiry/ plat_panic_handler().
>
> Best Regards
> Soby Mathew
>
> > -----Original Message-----
> > From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Sandeep
> > Tripathy via TF-A
> > Sent: 19 August 2020 16:42
> > To: tf-a(a)lists.trustedfirmware.org
> > Subject: [TF-A] [RFC] psci: api to power down all cores
> >
> > Hi,
> > I am proposing to have a generic api in psci lib which can be used to
> force
> > power down all other cores from any initiating core analogous to
> > 'smp_cpu_stop' in linux. It is immune to interrupt lock by EL1/EL2
> > software.
> >
> > Platforms may use this api in case of secure side panic, secure watchdog
> > interrupt handling or if required in certain types of warm resets. The
> > usage
> is
> > platform dependent.
> >
> > This depends on a generic implementation of secure IPI (1) which uses
> > EHF
> to
> > handle IPI at platform defined priority. We probably require more types
> > of
> > secure IPIs.
> >
> > Please review the series
> > Ref:
> > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5324
> >
> > diff --git a/lib/psci/psci_system_off.c b/lib/psci/psci_system_off.c
> > index
> > 141d69e..011aaa6 100644
> > --- a/lib/psci/psci_system_off.c
> > +++ b/lib/psci/psci_system_off.c
> > @@ -10,10 +10,44 @@
> > #include <arch_helpers.h>
> > #include <common/debug.h>
> > #include <drivers/console.h>
> > +#include <drivers/delay_timer.h>
> > #include <plat/common/platform.h>
> >
> > #include "psci_private.h"
> >
> > +#ifndef PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS #define
> > +PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> > +
> > +#if IMAGE_BL31
> > +void psci_stop_other_cores(void)
> > +{
> > +#define PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> > +
> > +#if IMAGE_BL31
> > +void psci_stop_other_cores(void)
> > +{
> > + int idx, this_cpu_idx, cnt;
> > +
> > + this_cpu_idx = plat_my_core_pos();
> > +
> > + /* Raise G0 IPI cpustop to all cores but self */
> > + for (idx = 0; idx < psci_plat_core_count; idx++) {
> > + if ((idx != this_cpu_idx) &&
> > + (psci_get_aff_info_state_by_idx(idx) ==
> > AFF_STATE_ON)) {
> > +
> > plat_ipi_send_cpu_stop(psci_cpu_pd_nodes[idx].mpidr);
> > + }
> > + }
> > +
> > + /* Wait for others cores to shutdown */
> > + for (cnt = 0; cnt < PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS; cnt++)
> {
> > + if (psci_is_last_on_cpu())
> > + break;
> > + mdelay(1);
> > + }
> > +
> > + if (!psci_is_last_on_cpu()) {
> > + WARN("Failed to stop all cores!\n");
> > + psci_print_power_domain_map();
> > + }
> > +}
> > +#endif
> > +
> >
> > (1)
> > RFC: ipi: add ipi feature
> > Ref: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-
> a/+/5323/1
> >
> > Thanks
> > Sandeep
> > --
> > TF-A mailing list
> > TF-A(a)lists.trustedfirmware.org
> > https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi Sandeep,
Just to understand better, if there is a secure side panic/watchdog interrupt, then the secure side is already able to do such an intervention without the availability of a PSCI API to the NS side.
In case the NS world has crashed, then PSCI_SYSTEM_RESET and PSCI_SYSTEM_OFF APIs can be invoked which then does the appropriate actions. From my reading, the PSCI specification doesn't prevent firmware implementation of the reset and off API's from doing the kind of implementation as per your proposal.
Best Regards
Soby Mathew
> -----Original Message-----
> From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of Sandeep
> Tripathy via TF-A
> Sent: 19 August 2020 16:42
> To: tf-a(a)lists.trustedfirmware.org
> Subject: [TF-A] [RFC] psci: api to power down all cores
>
> Hi,
> I am proposing to have a generic api in psci lib which can be used to force
> power down all other cores from any initiating core analogous to
> 'smp_cpu_stop' in linux. It is immune to interrupt lock by EL1/EL2 software.
>
> Platforms may use this api in case of secure side panic, secure watchdog
> interrupt handling or if required in certain types of warm resets. The usage is
> platform dependent.
>
> This depends on a generic implementation of secure IPI (1) which uses EHF to
> handle IPI at platform defined priority. We probably require more types of
> secure IPIs.
>
> Please review the series
> Ref: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5324
>
> diff --git a/lib/psci/psci_system_off.c b/lib/psci/psci_system_off.c index
> 141d69e..011aaa6 100644
> --- a/lib/psci/psci_system_off.c
> +++ b/lib/psci/psci_system_off.c
> @@ -10,10 +10,44 @@
> #include <arch_helpers.h>
> #include <common/debug.h>
> #include <drivers/console.h>
> +#include <drivers/delay_timer.h>
> #include <plat/common/platform.h>
>
> #include "psci_private.h"
>
> +#ifndef PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS #define
> +PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> +
> +#if IMAGE_BL31
> +void psci_stop_other_cores(void)
> +{
> +#define PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000 #endif
> +
> +#if IMAGE_BL31
> +void psci_stop_other_cores(void)
> +{
> + int idx, this_cpu_idx, cnt;
> +
> + this_cpu_idx = plat_my_core_pos();
> +
> + /* Raise G0 IPI cpustop to all cores but self */
> + for (idx = 0; idx < psci_plat_core_count; idx++) {
> + if ((idx != this_cpu_idx) &&
> + (psci_get_aff_info_state_by_idx(idx) == AFF_STATE_ON)) {
> + plat_ipi_send_cpu_stop(psci_cpu_pd_nodes[idx].mpidr);
> + }
> + }
> +
> + /* Wait for others cores to shutdown */
> + for (cnt = 0; cnt < PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS; cnt++) {
> + if (psci_is_last_on_cpu())
> + break;
> + mdelay(1);
> + }
> +
> + if (!psci_is_last_on_cpu()) {
> + WARN("Failed to stop all cores!\n");
> + psci_print_power_domain_map();
> + }
> +}
> +#endif
> +
>
> (1)
> RFC: ipi: add ipi feature
> Ref: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5323/1
>
> Thanks
> Sandeep
> --
> TF-A mailing list
> TF-A(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi,
I am proposing to have a generic api in psci lib which can be used
to force power down all other cores from any initiating core analogous
to 'smp_cpu_stop' in linux. It is immune
to interrupt lock by EL1/EL2 software.
Platforms may use this api in case of secure side panic, secure
watchdog interrupt handling or if required in certain types of warm
resets. The usage is platform dependent.
This depends on a generic implementation of secure IPI (1) which uses
EHF to handle IPI at platform defined priority. We probably require
more types of secure IPIs.
Please review the series
Ref: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5324
diff --git a/lib/psci/psci_system_off.c b/lib/psci/psci_system_off.c
index 141d69e..011aaa6 100644
--- a/lib/psci/psci_system_off.c
+++ b/lib/psci/psci_system_off.c
@@ -10,10 +10,44 @@
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/console.h>
+#include <drivers/delay_timer.h>
#include <plat/common/platform.h>
#include "psci_private.h"
+#ifndef PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS
+#define PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000
+#endif
+
+#if IMAGE_BL31
+void psci_stop_other_cores(void)
+{
+#define PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS 1000
+#endif
+
+#if IMAGE_BL31
+void psci_stop_other_cores(void)
+{
+ int idx, this_cpu_idx, cnt;
+
+ this_cpu_idx = plat_my_core_pos();
+
+ /* Raise G0 IPI cpustop to all cores but self */
+ for (idx = 0; idx < psci_plat_core_count; idx++) {
+ if ((idx != this_cpu_idx) &&
+ (psci_get_aff_info_state_by_idx(idx) == AFF_STATE_ON)) {
+ plat_ipi_send_cpu_stop(psci_cpu_pd_nodes[idx].mpidr);
+ }
+ }
+
+ /* Wait for others cores to shutdown */
+ for (cnt = 0; cnt < PLAT_CORES_PWRDWN_WAIT_TIMEOUT_MS; cnt++) {
+ if (psci_is_last_on_cpu())
+ break;
+ mdelay(1);
+ }
+
+ if (!psci_is_last_on_cpu()) {
+ WARN("Failed to stop all cores!\n");
+ psci_print_power_domain_map();
+ }
+}
+#endif
+
(1)
RFC: ipi: add ipi feature
Ref: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5323/1
Thanks
Sandeep
Hi Raghu,
Thank you very much for your feedback!
It seems like a good idea to automate it and the approach looks fine to me. Is my understanding correct that the generated *dtsi* files will need to be included in the *dts* files once and the hope is if there is a change, the dts files need not change since the dtsi files will be regenerated every time during build?
Yes, your understanding is correct.
The other way this could be done is that the tool can generate dts files which have nodes that change at build time, which can then be compiled and added as dtb files, added to the FIP. That way fvp_tb_fw_config.dts and fvp_spmc_manifest.dts will remain the same and not have any dependency on a changing dtsi file. I’d prefer that dts files that change frequently like in this case be autogenerated entirely and as separate files. That _seems_ cleaner but may not work out so in practice.
I agree with you that the approach you described above would make the whole process a bit cleaner.
One way this could be done is by passing the *.pre.dts files (generated after the initial processing from dtc) to the script that are part of the patch. Last time I worked on this, I added the possibility to generate the nodes structure to an already existing dts file. Thus, expanding the previous configuration with the values of the new nodes. However, this work needs further testing.
Alternatively, the python package I am using in the script can parse and generate dtb instead of dts. I was thinking to add the option to the dts_gen.py script (maybe rename it as well) to operate over the dtb format. So, making sure that "in-place" changes are working , and adding the option to operate over dtb files should allow for the cleaner approach that you referred. As is and making the referred changes, most of the script's logic should be preserved, so I don't think there will be a lot of changes to the current implementation, which is good. Please let me know if I was not very clear, or if you have any other comments.
Also thanks @Gyorgy Szing<mailto:Gyorgy.Szing@arm.com> for the feedback on the current state of the patch, I appreciate it.
Let me know if anyone has questions, or any other comments to the scripts and/or current discussion.
I will notify once the work progresses.
Best regards,
João Alves
________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Raghu Krishnamurthy via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: Friday, August 7, 2020 5:54 PM
To: tf-a(a)lists.trustedfirmware.org <tf-a(a)lists.trustedfirmware.org>; hafnium(a)lists.trustedfirmware.org <hafnium(a)lists.trustedfirmware.org>
Subject: Re: [Hafnium] [TF-A] Fw: Automate generation of Partition's specific configuration
Hi,
It seems like a good idea to automate it and the approach looks fine to me. Is my understanding correct that the generated *dtsi* files will need to be included in the *dts* files once and the hope is if there is a change, the dts files need not change since the dtsi files will be regenerated every time during build?
The other way this could be done is that the tool can generate dts files which have nodes that change at build time, which can then be compiled and added as dtb files, added to the FIP. That way fvp_tb_fw_config.dts and fvp_spmc_manifest.dts will remain the same and not have any dependency on a changing dtsi file. I’d prefer that dts files that change frequently like in this case be autogenerated entirely and as separate files. That _seems_ cleaner but may not work out so in practice.
Thanks
Raghu
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of Joao Alves via TF-A
Sent: Monday, August 3, 2020 10:08 AM
To: tf-a(a)lists.trustedfirmware.org
Subject: [TF-A] Fw: Automate generation of Partition's specific configuration
Hi all,
Forwarding email below as the referred work may be useful/relevant for other parts of the TF-A project as well.
Best regards,
João Alves
_____
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org <mailto:hafnium-bounces@lists.trustedfirmware.org> > on behalf of Joao Alves via Hafnium <hafnium(a)lists.trustedfirmware.org <mailto:hafnium@lists.trustedfirmware.org> >
Sent: Monday, August 3, 2020 5:59 PM
To: hafnium(a)lists.trustedfirmware.org <mailto:hafnium@lists.trustedfirmware.org> <hafnium(a)lists.trustedfirmware.org <mailto:hafnium@lists.trustedfirmware.org> >
Subject: [Hafnium] Automate generation of Partition's specific configuration
Hello all,
I have been trying to ease the process of adding a Secure Partition to a system using Secure Hafnium.
There is no way to automatically generate SP's specific configuration into TF-A's code-base. Considering FVP as the target platform, we need to manually add partition's specific configuration to files "fvp_tb_fw_config.dts" and "fvp_spmc_manifest.dts" (files held in FVP platform specific folder of TF-A codebase). The following snippet shows the hypervisor node from "fvp_spmc_manifest.dts", for the simple case of having in the system two Cactus Secure Partitions:
hypervisor {
compatible = "hafnium,hafnium";
vm1 {
is_ffa_partition;
debug_name = "cactus-primary";
load_address = <0x7000000>;
};
vm2 {
is_ffa_partition;
debug_name = "cactus-secondary";
load_address = <0x7100000>;
vcpu_count = <2>;
mem_size = <1048576>;
};
};
Some of the above properties are available in the partition's manifest, for example "debug_name" and "load_address".
If changing one of these values in the partition's manifest or adding another SP, we also need to update the referred files.
In order to avoid the burden of having to manually update partition's specific configuration and to make whole system more scalable, I started to write a script that is able to generate a specific node structure and fetch any property value from a any dts file. Then, applied it to fetch/generate SPs specific configuration and include it in aforementioned configuration files.
Although it is still a Work In Progress, the work can be found in the patch: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5150.
The implementation is divided between two scripts:
* "dts_gen.py" - This is a generic solution for the problem. It can fetch/generate/alter any configuration using dts files.
* "sp_dts_gen.py" - Uses the previous command to solve the specific problem regarding SPs specific configuration.
Although is still Work In Progress, I am looking to obtain feedback/reviews from anyone that could be interested in using this implementation.
The above files contain a lot of comments on how to use them, and also describing the implementation.
If the obtained feedback is good, I can work on integrating this in TF-A's build-system.
Let me know if anyone has questions.
Best regards,
João Alves
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org <mailto:Hafnium@lists.trustedfirmware.org>
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
This event has been cancelled with this note:
"
Next TF-A Tech Forum is now scheduled for 26th August"
Title: TF-A Tech Forum
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to
colleagues. Invites are via the TF-A mailing list and also published on the
Trusted Firmware website. Details are
here: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Tr…
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://zoom.us/j/9159704974Meeting ID: 915 970 4974One tap
mobile+16465588656,,9159704974# US (New York)+16699009128,,9159704974# US
(San Jose)Dial by your location +1 646 558
8656 US (New York) +1 669 900
9128 US (San Jose) 877 853 5247 US
Toll-free 888 788 0099 US Toll-freeMeeting ID:
915 970 4974Find your local
number: https://zoom.us/u/ad27hc6t7h
When: Thu 13 Aug 2020 16:00 – 17:00 United Kingdom Time
Calendar: tf-a(a)lists.trustedfirmware.org
Who:
* Bill Fletcher- creator
* marek.bykowski(a)gmail.com
* okash.khawaja(a)gmail.com
* tf-a(a)lists.trustedfirmware.org
Invitation from Google Calendar: https://www.google.com/calendar/
You are receiving this courtesy email at the account
tf-a(a)lists.trustedfirmware.org because you are an attendee of this event.
To stop receiving future updates for this event, decline this event.
Alternatively, you can sign up for a Google Account at
https://www.google.com/calendar/ and control your notification settings for
your entire calendar.
Forwarding this invitation could allow any recipient to send a response to
the organiser and be added to the guest list, invite others regardless of
their own invitation status or to modify your RSVP. Learn more at
https://support.google.com/calendar/answer/37135#forwarding