Re: Linux fails on startup looking for SMC
Moshe Kravchik <[email protected]> Mon, 28 Apr 2025 15:00:04 +0000
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <DB3PR08MB8796623A884434D300E2E943A5812@DB3PR08MB8796.eurprd08.prod.outlook.com> |
--===============1470591458026327788== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DB3PR08MB8796623A884434D300E2E943A5812DB3PR08MB8796eurp_" --_000_DB3PR08MB8796623A884434D300E2E943A5812DB3PR08MB8796eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thank you! This configuration indeed resulted in the capability present. However, I still get the error: `zynqmp_firmware firmware:zynqmp-firmware: probe with driver zynqmp_firmwar= e failed with error -22` and when I add prints I see that the SMC calls in = the Linux kernel return -1. Anything else I need to add to the device tree to initialize it or somethin= g? When I boot into Ubuntu without L4 it works. Moshe ________________________________ From: Adam Lackorzynski <[email protected]> Sent: Monday, April 28, 2025 2:53 PM To: Moshe Kravchik <[email protected]>; [email protected]= <[email protected]> Subject: Re: Linux fails on startup looking for SMC On Mon Apr 28, 2025 at 05:25:34 +0000, Moshe Kravchik wrote: > Thanks a lot, Adam! > I added both and rebuilt the device tree, but now I'm getting: > ``` > vm-1 | VMM[smccc_proxy]: smccc_proxy > vm-1 | VMM: smccc_proxy.l4vmm,smccc_cap: capability smc is invalid. > vm-1 | VMM[vm]: Device creation for virtual device smccc_proxy failed.= Disabling device. > ``` This tells that the 'smc' cap is not there in uvmm. Is it there in the 'caps' table with which uvmm is started? There, where "ram =3D ..." is as well: caps =3D { ram =3D ...., smc =3D L4.Env.arm_smc, }, .... Additionally, in the microkernel, the CONFIG_ARM_SMC_USER option must also be enabled. Adam > Moshe > ________________________________ > From: Adam Lackorzynski <[email protected]> > Sent: Monday, April 28, 2025 12:07 AM > To: Moshe Kravchik <[email protected]>; [email protected].= de <[email protected]> > Subject: Re: Linux fails on startup looking for SMC > > Hi Moshe, > > On Sun Apr 27, 2025 at 15:32:53 +0000, Moshe Kravchik wrote: > > Hi, > > I'm trying to set up a Linux running on uvmm with a HW passthrough. > > I added `zynqmp_firmware` to my DTS (it was required for the device I'm= trying to pass). > > However, Linux fails to add the device and I see: > > vm-1 | [ 1.772078] ledtrig-cpu: registered to indicate activity on CPUs > > vm-1 | VMM[guest]: No handler for SMC call: imm=3D0 a0=3Dc200003f a1=3D= 3f ip=3Dffff800080026884 lr=3Dffff800080dcdb04 > > vm-1 | VMM[guest]: No handler for SMC call: imm=3D0 a0=3Dc2000001 a1=3D= 0 ip=3Dffff800080026884 lr=3Dffff800080dcdb04 > > vm-1 | [ 1.805957] zynqmp_firmware firmware:zynqmp-firmware: probe with= driver zynqmp_firmware failed with error -22 > > > > >From the traces I added, the failure is in `zynqmp_pm_get_api_version`= . > > > > How do I add SMC handling? > > You give uvmm in the Ned script: smc =3D L4.Env.arm_smc > > And put this into you device tree: > smccc_proxy { > compatible =3D "l4vmm,smccc_proxy"; > l4vmm,smccc_cap =3D "smc"; > method =3D "smc"; > }; > > Note that L4.Env.arm_smc gives access to the real interface with all the > power that is behind it (the kernel only filters its range). So in a > longer run it might be necessary to have proxy for this interface, or > emulate the SMCs, or modify Linux to not use it, whatever fits best. > > > > Adam --_000_DB3PR08MB8796623A884434D300E2E943A5812DB3PR08MB8796eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Thank you!<br> This configuration indeed resulted in the capability present.<br> However, I still get the error:<br> `zynqmp_firmware firmware:zynqmp-firmware: probe with driver zynqmp_firmwar= e failed with error -22` and when I add prints I see that the SMC calls in = the Linux kernel return -1.<br> Anything else I need to add to the device tree to initialize it or somethin= g?</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> When I boot into Ubuntu without L4 it works.</div> <div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san= s-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Moshe</div> <div id=3D"appendonsend"></div> <hr style=3D"display:inline-block;width:98%" tabindex=3D"-1"> <div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st= yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Adam Lackorzynski <= ;[email protected]><br> <b>Sent:</b> Monday, April 28, 2025 2:53 PM<br> <b>To:</b> Moshe Kravchik <[email protected]>; [email protected].= tu-dresden.de <[email protected]><br> <b>Subject:</b> Re: Linux fails on startup looking for SMC</font> <div> </div> </div> <div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;= "> <div class=3D"PlainText"><br> On Mon Apr 28, 2025 at 05:25:34 +0000, Moshe Kravchik wrote:<br> > Thanks a lot, Adam!<br> > I added both and rebuilt the device tree, but now I'm getting:<br> > ```<br> > vm-1 | VMM[smccc_proxy]: smccc_proxy<br> > vm-1 | VMM: smccc_proxy.l4vmm,smccc_cap: capability = smc is invalid.<br> > vm-1 | VMM[vm]: Device creation for virtual device s= mccc_proxy failed. Disabling device.<br> > ```<br> <br> This tells that the 'smc' cap is not there in uvmm. Is it there in the<br> 'caps' table with which uvmm is started? There, where "ram =3D ...&quo= t; is<br> as well: caps =3D { ram =3D ...., smc =3D L4.Env.arm_smc, }, ....<br> Additionally, in the microkernel, the CONFIG_ARM_SMC_USER option must<br> also be enabled.<br> <br> <br> Adam<br> <br> > Moshe<br> > ________________________________<br> > From: Adam Lackorzynski <[email protected]><br> > Sent: Monday, April 28, 2025 12:07 AM<br> > To: Moshe Kravchik <[email protected]>; [email protected]= -dresden.de <[email protected]><br> > Subject: Re: Linux fails on startup looking for SMC<br> > <br> > Hi Moshe,<br> > <br> > On Sun Apr 27, 2025 at 15:32:53 +0000, Moshe Kravchik wrote:<br> > > Hi,<br> > > I'm trying to set up a Linux running on uvmm with a HW passthroug= h.<br> > > I added `zynqmp_firmware` to my DTS (it was required for the devi= ce I'm trying to pass).<br> > > However, Linux fails to add the device and I see:<br> > > vm-1 | [ 1.772078] ledtrig-cpu: registered to indicate activity o= n CPUs<br> > > vm-1 | VMM[guest]: No handler for SMC call: imm=3D0 a0=3Dc200003f= a1=3D3f ip=3Dffff800080026884 lr=3Dffff800080dcdb04<br> > > vm-1 | VMM[guest]: No handler for SMC call: imm=3D0 a0=3Dc2000001= a1=3D0 ip=3Dffff800080026884 lr=3Dffff800080dcdb04<br> > > vm-1 | [ 1.805957] zynqmp_firmware firmware:zynqmp-firmware: prob= e with driver zynqmp_firmware failed with error -22<br> > ><br> > > >From the traces I added, the failure is in `zynqmp_pm_get_api= _version`.<br> > ><br> > > How do I add SMC handling?<br> > <br> > You give uvmm in the Ned script: smc =3D L4.Env.arm_smc<br> > <br> > And put this into you device tree:<br> > smccc_proxy {<br> > compatible =3D "l4vmm,s= mccc_proxy";<br> > l4vmm,smccc_cap =3D "sm= c";<br> > method =3D "smc";<= br> > };<br> > <br> > Note that L4.Env.arm_smc gives access to the real interface with all t= he<br> > power that is behind it (the kernel only filters its range). So in a<b= r> > longer run it might be necessary to have proxy for this interface, or<= br> > emulate the SMCs, or modify Linux to not use it, whatever fits best.<b= r> > <br> > <br> > <br> > Adam<br> </div> </span></font></div> </body> </html> --_000_DB3PR08MB8796623A884434D300E2E943A5812DB3PR08MB8796eurp_-- --===============1470591458026327788== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ l4-hackers mailing list -- [email protected] To unsubscribe send an email to [email protected] --===============1470591458026327788==--