Hi Boaz,

It appears that you have included plat/arm files in your platform porting which is causing Arm platform function definition to be included.
Along with providing generic implementations Arm also has its own platforms(like any other partner platforms), code under plat/arm is meant only for Arm platforms.

Check your make file and make sure that you don't include plat/arm/common/arm_pm.c(to avoid plat_setup_psci_ops) and plat/arm/common/aarch64/arm_helpers.S(for other functions you mentioned) this will avoid multiple definition errors.

Hope this helps

thanks
Manish

From: TF-A <tf-a-bounces@lists.trustedfirmware.org> on behalf of IS20 Boaz Baron via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 29 July 2021 09:12
To: Madhukar Pappireddy <Madhukar.Pappireddy@arm.com>
Cc: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>; IN20 Hila Miranda-Kuzi <Hila.Miranda-Kuzi@nuvoton.com>
Subject: Re: [TF-A] A Q about TZ porting guide
 

Also, those functions aren’t defined as WEAK so I encountered  the same problem (multiple definitions)

plat_crash_console_putc

plat_crash_console_flush

platform_mem_init

 

From: IS20 Boaz Baron
Sent: Thursday, July 29, 2021 10:14 AM
To: Madhukar Pappireddy <Madhukar.Pappireddy@arm.com>
Cc: tf-a@lists.trustedfirmware.org; IN20 Hila Miranda-Kuzi <Hila.Miranda-Kuzi@nuvoton.com>
Subject: RE: [TF-A] A Q about TZ porting guide

 

Thanks Madhukar for your answer,

I think I wasn’t so clear.

plat_setup_psci_ops is listed as mandatory in the porting guide.

I implemented it locally but linkage fails because it is also defined in arm_pm.c.

How do you suggest to avoid this multiple definition?

 

Thanks,

Boaz.

 

 

From: Madhukar Pappireddy <Madhukar.Pappireddy@arm.com>
Sent: Wednesday, July 28, 2021 10:44 PM
To: IS20 Boaz Baron <boaz.baron@nuvoton.com>
Cc: tf-a@lists.trustedfirmware.org
Subject: RE: [TF-A] A Q about TZ porting guide

 

Hi Boaz

 

Yes, plat_setup_psci_ops() is mandatory. Every platform needs to implement it independently. You can use the implementation from [1] as a reference. I don’t think you have to delete any original function. If your platform does not support PSCI spec, you can implement a dummy function. Hope it helps.

 

int plat_setup_psci_ops(uintptr_t sec_entrypoint,

                                                const plat_psci_ops_t **psci_ops)

{

                return 0;

}

 

[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/arm/common/arm_pm.c

 

Thanks,

Madhukar

 

From: TF-A <tf-a-bounces@lists.trustedfirmware.org> On Behalf Of IS20 Boaz Baron via TF-A
Sent: Wednesday, July 28, 2021 7:58 AM
To: tf-a@lists.trustedfirmware.org
Subject: [TF-A] A Q about TZ porting guide

 

Hi all,

I have a Q about plat_setup_psci_ops()  function implementation ,

In the porting guide, that function is defined as mandatory BUT the original (arm) function isn’t defined as #pargam WEAK.

what should I do? to use/ delete the original function?

 

Thanks,

Boaz.


The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.


The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.