PPA implementation for SMC32 CPU_ON calls on LS2088A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PPA implementation for SMC32 CPU_ON calls on LS2088A

1,714 Views
andreidulea
Contributor I

Hello,

We have some issues when trying to boot / wake secondary cores on LS2088ARDB using fully flashed sdk-v2.0-1703 (PBL, PPA, U-boot, etc) and smc32 CPU_ON calls to PPA. More details, below:

- Switch to Aarch32 EL1-NS on core0 is handled on the entry-point of the Aarch32 OS, everything works fine on core0.

- For the SMP boot, we do issue smc32 CPU_ON calls to PPA, but we do encounter issues when trying to execute the provided entry point for secondary cores.

It seems that PPA implementation checks the EL level that generated the exception and switches to Aarch32 EL2-NS, although EL2 is AArch64 implemented.

Is this a normal behavior?

Best Regards,

Andrei.

Labels (1)
0 Kudos
7 Replies

1,196 Views
andreidulea
Contributor I

Hello yipingwang‌,

Thanks for your reply.

Digging a little into this issue, we found that when setting SPSR_EL3 for startup inside ppa/armv8/aarch64.s on _set_spsr_4_startup, there is a check for Aarch32 vs Aarch64, which is OK, but there is also a check for the _is_EL2_supported which will not consider that EL2 is not supported in Aarch32 (which is actually our case). We have checked id_aa64pfr0_el1 and properly branched to Aarch32 EL1 and it seems to work once re-flashing PPA with above update.

Can you please confirm the above behavior as an issue? If yes, will it be fixed in a future SDK release and when do we expect to find it upstream?

Thanks,

Andrei.

0 Kudos

1,196 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Andrei,

The development team is doing more investigation. Would you please send your code patch to us, which you made as a workaround?

Thanks,

Yiping

0 Kudos

1,196 Views
andreidulea
Contributor I

Hello Yiping,

Do you have any updates related to this?

Thanks,

Andrei.

0 Kudos

1,196 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Andrei,

There are further issues which the patch didn't tack into account.

Please refer to the attached patch provided by the Linux SDK development team.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,196 Views
andreidulea
Contributor I

Hello Yiping,

Please find attached the updates made, against sdk-v2.0.x branch.

Looking forward for a resolution on this issue.

Thanks,

Andrei.

0 Kudos

1,196 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Andrei,

The function _set_spsr_4_startup sets the spsr value for a core exiting from EL3, if the hw supports EL2, then the core is delivered to EL2, else it is delivered to EL1. This is the work flow of the current PPA code.

I will confirm with the development team about the PPA Aarch32 support on LS2088A in the future schedule.

Thanks,

Yiping

0 Kudos

1,196 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Andrei Dulea,

You could refer to the following boot flow with PPA enabled.

Boot Execution Order
1. Execution begins in the SP bootrom when the SoC comes out of reset
2. SP bootrom completes execution, and execution starts with bootcore in GPP bootrom
3. Bootcore branches to 1st stage bootloader running in EL3
4. Bootcore in 1st stage bootloader branches to EL3 init code in PPA
5. When bootcore completes EL3 init, it branches to 2nd stage bootloader in EL2
6. Bootcore in 2nd stage bootloader branches to Linux kernel in EL1
7. Kernel calls PSCI (cpu_on) to release secondary cores

Secondary Core Execution Path
1. Execution starts in the GPP bootrom when secondary core released from reset
2. If core is marked to be disabled, core enters power-down sequence in bootrom
3. Cores not disabled branch to EL3 init code in PPA
4. Upon completion of EL3 init, cores branch to start address at EL2 in kernel

We have already modified u-boot and PPA to resolved the conflict between PPA and AArch32, so on LS1043/LS1046, PPA can work on AArch32 mode in the latest SDK 1703 release.

However, I confirmed with the development team, we have not provided AArch32 support for LS2088 in the SDK release.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos