Page MenuHomeFreeBSD

Generic SMCCC
ClosedPublic

Authored by br on Aug 27 2019, 2:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 2:26 AM
Unknown Object (File)
Sep 21 2024, 11:53 AM
Unknown Object (File)
Sep 19 2024, 9:03 PM
Unknown Object (File)
Sep 19 2024, 9:03 PM
Unknown Object (File)
Sep 19 2024, 9:03 PM
Unknown Object (File)
Sep 19 2024, 9:02 PM
Unknown Object (File)
Sep 19 2024, 9:02 PM
Unknown Object (File)
Sep 16 2024, 6:11 PM

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
1

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

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

I think you mean struct arm_smccc_res *res.

42

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).

50

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
1

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
1

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