Page MenuHomeFreeBSD

Generic SMCCC
ClosedPublic

Authored by br on Aug 27 2019, 2:48 PM.
Tags
None
Referenced Files
F82952045: D21439.diff
Sat, May 4, 9:52 AM
Unknown Object (File)
Fri, Apr 12, 7:18 PM
Unknown Object (File)
Fri, Apr 12, 7:18 PM
Unknown Object (File)
Fri, Apr 12, 7:18 PM
Unknown Object (File)
Fri, Apr 12, 7:16 PM
Unknown Object (File)
Mar 20 2024, 7:53 AM
Unknown Object (File)
Dec 20 2023, 4:49 AM
Unknown Object (File)
Dec 3 2023, 3:16 AM

Details

Summary

Implement generic arm_smccc calls for arm and arm64

This is used by Intel Stratix 10 platform SMC drivers

Test Plan

Tested on Intel S10

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/arm64/include/arm-smccc.h
2

Why is this file in sys/arm64/include? It doesn't seem to be arm64 specific.

sys/arm64/arm64/smccc-call.S
39

I think you mean struct arm_smccc_res *res.

43

You could allow for NULL to be passed as res by checking x4 is non-zero, e.g.

cbz x4, 1f
stp ...
stp ...
1f:
ret

Alternatively if x8 is preserved you could return the struct arm_smccc_res directly. The caller will allocate space for it and pass a pointer to the memory in x8 (assuming I'm remembering the ABI correctly).

51

And here.

address Andy's comments

br marked 3 inline comments as done.Sep 3 2019, 5:43 PM
br added inline comments.
sys/arm64/include/arm-smccc.h
2

Hmm I'm not sure where to put it then. Any idea ?

Can you update the psci code to use the arm_smccc_* functions? We should only have one copy the functions to make smccc calls and you can consider psci to be based on it.

sys/arm64/include/arm-smccc.h
2

I would leave the code where it was and add your changes to sys/dev/psci/smccc.h.

sys/arm64/arm64/smccc-call.S should also be moved to sys/dev/psci/smccc_arm64.S.

Reuse generic SMCCC for PSCI.

Can you update the psci code to use the arm_smccc_* functions? We should only have one copy the functions to make smccc calls and you can consider psci to be based on it.

OK I updated. I did not test on arm since I dont have PSCI-enabled arm hardware

This revision is now accepted and ready to land.Sep 11 2019, 4:36 PM