Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2022 06:06:19 +0000
From:      Souradeep Chakrabarti <schakrabarti@microsoft.com>
To:        Andrew Turner <andrew@freebsd.org>
Cc:        "freebsd-arm@FreeBSD.org" <freebsd-arm@FreeBSD.org>, Wei Hu <weh@microsoft.com>
Subject:   Re: [EXTERNAL] Re: SMCCC v1.1 compliant HVC call
Message-ID:  <PSAP153MB0536F8F1E6DBEFA6DB7A2346CCB89@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>
In-Reply-To: <F752FD4D-66DA-4513-B493-3F2281FC3FA9@FreeBSD.org>
References:  <PSAP153MB05364B5DEC6F1379B71C3758CCB99@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <F752FD4D-66DA-4513-B493-3F2281FC3FA9@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
=0A=
Hi Andrew,=0A=
=0A=
Thanks for your response. While looking into the code, it looked to me we h=
ave smccc version till 1.1 implemented.=0A=
But for hyper-v hypercall implementation we need to read registers beyond X=
0 to X3, which is implemented in 1.2 version.=0A=
=0A=
Is there any plan on version 1.2 implementation ?=0A=
=0A=
Thanks & Regards,=0A=
=A0Souradeep=0A=
=0A=
=0A=
=0A=
From: Andrew Turner <andrew@FreeBSD.org>=0A=
Sent: Monday, June 27, 2022 9:59 PM=0A=
To: Souradeep Chakrabarti <schakrabarti@microsoft.com>=0A=
Cc: freebsd-arm@FreeBSD.org <freebsd-arm@FreeBSD.org>; Wei Hu <weh@microsof=
t.com>=0A=
Subject: [EXTERNAL] Re: SMCCC v1.1 compliant HVC call =0A=
=A0=0A=
=0A=
=0A=
On 27 Jun 2022, at 09:57, Souradeep Chakrabarti <schakrabarti@microsoft.com=
> wrote:=0A=
=0A=
Hi Andrew,=0A=
=A0=0A=
In Linux we have SMCCC v1.1 compliant HVC call arm_smccc_1_1_hvc(), which i=
s used for SMCCC and HVC call convention.=0A=
In FreeBSD do we have something similar?=0A=
=A0=0A=
I can arm_smccc_smc() in sys/dev/psci/smccc.h, but could not find the imple=
mentation details of it. If I need to use SMCCC compliant=0A=
HVC call, what API should I use?=0A=
=A0=0A=
Thanks & Regards,=0A=
Souradeep=0A=
=0A=
You can use=A0arm_smccc_hvc to hard code the type. Both the hvc and smc ver=
sions are implemented in=A0sys/dev/psci/smccc_arm64.S. They depend on the a=
rm64 ABI to put the arguments into the correct registers to be passed into =
the hypervisor. =0A=
=0A=
If your code is running after the psci device has attached you can use=A0ps=
ci_callfn. It is a function pointer to either of the=A0arm_smccc_* function=
s depending on what is in ACPI/FDT.=0A=
=0A=
Andrew=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PSAP153MB0536F8F1E6DBEFA6DB7A2346CCB89>