Re: [EXTERNAL] Re: SMCCC v1.1 compliant HVC call

Souradeep Chakrabarti <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <PSAP153MB0536AE42F3023CC7BC7AAB9DCCBB9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>
Hi Andrew,

It will be really helpful if arm smccc hvc 1.2 version is implemented in FreeBSD. It is required for Hyper-V HvCallGetVpRegisters hypercall. Please let me know if there is any plan to implement smccc 1.2 version anytime soon or not.

Thanks & Regards,
 Souradeep

________________________________________
From: Souradeep Chakrabarti <[email protected]>
Sent: Tuesday, June 28, 2022 11:36 AM
To: Andrew Turner
Cc: [email protected]; Wei Hu
Subject: Re: [EXTERNAL] Re: SMCCC v1.1 compliant HVC call


Hi Andrew,

Thanks for your response. While looking into the code, it looked to me we have smccc version till 1.1 implemented.
But for hyper-v hypercall implementation we need to read registers beyond X0 to X3, which is implemented in 1.2 version.

Is there any plan on version 1.2 implementation ?

Thanks & Regards,
 Souradeep



From: Andrew Turner <[email protected]>
Sent: Monday, June 27, 2022 9:59 PM
To: Souradeep Chakrabarti <[email protected]>
Cc: [email protected] <[email protected]>; Wei Hu <[email protected]>
Subject: [EXTERNAL] Re: SMCCC v1.1 compliant HVC call



On 27 Jun 2022, at 09:57, Souradeep Chakrabarti <[email protected]> wrote:

Hi Andrew,

In Linux we have SMCCC v1.1 compliant HVC call arm_smccc_1_1_hvc(), which is used for SMCCC and HVC call convention.
In FreeBSD do we have something similar?

I can arm_smccc_smc() in sys/dev/psci/smccc.h, but could not find the implementation details of it. If I need to use SMCCC compliant
HVC call, what API should I use?

Thanks & Regards,
Souradeep

You can use arm_smccc_hvc to hard code the type. Both the hvc and smc versions are implemented in sys/dev/psci/smccc_arm64.S. They depend on the arm64 ABI to put the arguments into the correct registers to be passed into the hypervisor.

If your code is running after the psci device has attached you can use psci_callfn. It is a function pointer to either of the arm_smccc_* functions depending on what is in ACPI/FDT.

Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.