Date: Wed, 3 Jul 2024 22:09:20 +0200 From: Mario Marietto <marietto2008@gmail.com> To: Nimbly2329 <hjlftdygaqf@use.startmail.com> Cc: Dmitry Salychev <dsl@freebsd.org>, freebsd-drivers@freebsd.org Subject: Re: Project Proposal: An Standard Driver Virtual Machine Message-ID: <CA%2B1FSigHtNONn6600hiPhCA5FifvZYDcZz1szUZ0k9UtA0aCtg@mail.gmail.com> In-Reply-To: <172003689512.28.10920198816573547978@startmail.com> References: <171996207708.31.7910752540216367279@startmail.com> <86ed8aalkh.fsf@peasant.bootbsd.com> <172003689512.28.10920198816573547978@startmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000ad26c061c5d6af5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ---> it does allow to use loadable kernel drivers between different version of the FreeBSD kernel Can someone elaborate more on this ? Because it happened yesterday that I tried to load the vmm.ko module present in my FreeBSD 14.0-RELEASE system to FreeBSD 14.1-RELEASE system but it hasn't been accepted. The same happened with the ZFS module. On Wed, Jul 3, 2024 at 10:01=E2=80=AFPM Nimbly2329 <hjlftdygaqf@use.startma= il.com> wrote: > > Nimbly2329 <hjlftdygaqf@use.startmail.com> writes:> Motivation:>> In is n= ot a obscure fact that driver development is the hardest part in both maint= aining and creating an operating system, and > > that FreeBSD struggles to keep the pace with Linux and Windows. And is = the the number one cause that there is no way of > > developing novel and viable operating systems. > > > > Plan: > > > > (1) We and maybe with the cooperation of another public source kernel/O= S projects develop a Standard Driver Virtual > > Machine, (2) and then we manage to get it implemented in at least Linux= , so that Linus et al. promote that all new drivers > > shall be written against the Standard Driver Virtual Machine. (3) Final= ly profit in little to no effort in porting drivers from Linux. > > I wish we had more Spare Time Investment proposals instead of project > ones :) > > Regards, > Dmitry > > -- https://wiki.freebsd.org/DmitrySalychev > > > I have reading some resources regarding FreeBSD drivers, looks like > FreeBSD has a superior system to Linux's Dynamic Kernel Module System > (dmks), for loading drivers, as by the architecture book ( > https://download.freebsd.org/doc/en/books/arch-handbook/arch-handbook_en.= pdf, > or in other of the sources at freebsd.org I don't remember exactly) it > does allow to use loadable kernel drivers between different version of t= he > FreeBSD kernel, giving both backwards and forward compatibility by design= , > through an stable Binary Application Interface. > > > Therefore if where for only being able to write a loadable kernel drivers= , > that would be enough, but it also has to work with static linked drivers. > > > Does is possible to statically link an otherwise loadable kernel driver > final binary? > > There is a way to implement an device detection from userspace?, so that > device drivers can be loaded as needed. > > > If boat of those are possible, then there is an even simpler plan, and > that is to make Linux implement the FreeBSD's Driver ABI, and my proposal > also is simpler. > > > Regards, > > Nimbly2329 > > > By the way where is the documentation of the FreeBSD's driver ABI? > --=20 Mario. --0000000000000ad26c061c5d6af5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>---> it=20 does allow to use loadable kernel drivers=C2=A0 between different version o= f=20 the FreeBSD kernel</div><div><br></div><div>Can someone elaborate more on t= his ? Because it happened yesterday that I tried to load the vmm.ko module = present in my FreeBSD 14.0-RELEASE system to FreeBSD 14.1-RELEASE system bu= t it hasn't been accepted. The same happened with the ZFS module. <br><= /div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a= ttr">On Wed, Jul 3, 2024 at 10:01=E2=80=AFPM Nimbly2329 <<a href=3D"mail= to:hjlftdygaqf@use.startmail.com">hjlftdygaqf@use.startmail.com</a>> wro= te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span s= tyle=3D"font-family:arial,helvetica,sans-serif"><span style=3D"color:rgb(59= ,67,92)"><span style=3D"font-size:medium"></span></span></span><span style= =3D"font-family:arial,helvetica,sans-serif"><span style=3D"color:rgb(59,67,= 92)"><span style=3D"font-size:medium"></span></span></span><span style=3D"f= ont-family:arial,helvetica,sans-serif"><span style=3D"color:rgb(59,67,92)">= <span style=3D"font-size:medium"></span></span></span><span style=3D"font-f= amily:arial,helvetica,sans-serif"><span style=3D"font-size:medium"><span st= yle=3D"color:rgb(59,67,92)"></span></span></span><br></div><blockquote><pre= id=3D"m_-7981900796853909745body.mime.1"><span style=3D"font-family:arial,= helvetica,sans-serif"><span style=3D"color:rgb(59,67,92)"><span style=3D"fo= nt-size:medium"></span></span><span style=3D"color:rgb(59,67,92)"><span sty= le=3D"font-size:medium"></span></span></span>Nimbly2329 <<a href=3D"mail= to:hjlftdygaqf@use.startmail.com" target=3D"_blank">hjlftdygaqf@use.startma= il.com</a>> writes: <span style=3D"font-family:arial,helvetica,sans-serif"><span style=3D"color= :rgb(59,67,92)"><span style=3D"font-size:medium"></span></span></span> <span style=3D"font-family:arial,helvetica,sans-serif"><span style=3D"color= :rgb(59,67,92)"><span style=3D"font-size:medium"></span></span></span>> = Motivation: <span style=3D"font-family:arial,helvetica,sans-serif"><span style=3D"color= :rgb(59,67,92)"><span style=3D"font-size:medium"></span></span></span>> <span style=3D"font-family:arial,helvetica,sans-serif"><span style=3D"color= :rgb(59,67,92)"><span style=3D"font-size:medium"></span></span></span>> = In is not a obscure fact that driver development is the hardest part in bot= h maintaining and creating an <span style=3D"font-family:arial,helvetica,sa= ns-serif"><span style=3D"color:rgb(59,67,92)"><span style=3D"font-size:medi= um"></span></span><span style=3D"color:rgb(59,67,92)"><span style=3D"font-s= ize:medium"></span></span><span style=3D"color:rgb(59,67,92)"><span style= =3D"font-size:medium"></span></span><span style=3D"color:rgb(59,67,92)"><sp= an style=3D"font-size:medium"></span></span><span style=3D"color:rgb(59,67,= 92)"><span style=3D"font-size:medium"></span></span><span style=3D"color:rg= b(59,67,92)"><span style=3D"font-size:medium"></span></span><span style=3D"= color:rgb(59,67,92)"><span style=3D"font-size:medium"></span></span><span s= tyle=3D"color:rgb(59,67,92)"><span style=3D"font-size:medium"></span></span= ><span style=3D"color:rgb(59,67,92)"><span style=3D"font-size:medium"></spa= n></span><span style=3D"color:rgb(59,67,92)"><span style=3D"font-size:mediu= m"></span></span><span style=3D"color:rgb(59,67,92)"><span style=3D"font-si= ze:medium"></span></span><span style=3D"color:rgb(59,67,92)"><span style=3D= "font-size:medium"></span></span><span style=3D"color:rgb(59,67,92)"><span = style=3D"font-size:medium"></span></span><span style=3D"color:rgb(59,67,92)= "><span style=3D"font-size:medium"></span></span><span style=3D"color:rgb(5= 9,67,92)"><span style=3D"font-size:medium"></span></span><span style=3D"col= or:rgb(59,67,92)"><span style=3D"font-size:medium"></span></span></span>ope= rating system, and > that FreeBSD struggles to keep the pace with Linux and Windows. And is= the the number one cause that there is no way of > developing novel and viable operating systems. > > Plan: > > (1) We and maybe with the cooperation of another public source kernel/= OS projects develop a Standard Driver Virtual > Machine, (2) and then we manage to get it implemented in at least Linu= x, so that Linus et al. promote that all new drivers > shall be written against the Standard Driver Virtual Machine. (3) Fina= lly profit in little to no effort in porting drivers from Linux. I wish we had more Spare Time Investment proposals instead of project ones :) Regards, Dmitry --=20 <a href=3D"https://wiki.freebsd.org/DmitrySalychev" target=3D"_blank">https= ://wiki.freebsd.org/DmitrySalychev</a> <br></pre></blockquote><p style=3D"margin:0px;color:rgb(59,67,92);font-fami= ly:arial,helvetica;font-size:medium">I have reading some resources regarding FreeBSD drivers, looks like=20 FreeBSD has a superior system to Linux's Dynamic Kernel Module System= =20 (dmks), for loading drivers, as by the architecture book (<a href=3D"https:= //download.freebsd.org/doc/en/books/arch-handbook/arch-handbook_en.pdf" rel= =3D"noopener noreferrer" target=3D"_blank">https://download.freebsd.org/doc= /en/books/arch-handbook/arch-handbook_en.pdf</a>, or in other of the sources at <a href=3D"http://freebsd.org" target=3D"_bl= ank">freebsd.org</a> I don't remember exactly) it=20 does allow to use loadable kernel drivers=C2=A0 between different version o= f=20 the FreeBSD kernel, giving both backwards and forward compatibility by=20 design, through an stable Binary Application Interface.<br></p><p style=3D"= margin:0px;color:rgb(59,67,92);font-family:arial,helvetica;font-size:medium= "><br></p><p style=3D"margin:0px;color:rgb(59,67,92);font-family:arial,helv= etica;font-size:medium">Therefore if where for only being able to write a loadable kernel drivers, that=20 would be enough, but it also has to work with static linked drivers.<br></p= ><p style=3D"margin:0px;color:rgb(59,67,92);font-family:arial,helvetica;fon= t-size:medium"><br></p><p style=3D"margin:0px;color:rgb(59,67,92);font-fami= ly:arial,helvetica;font-size:medium">Does is possible to statically link an= otherwise loadable kernel driver final binary?<br></p><p style=3D"margin:0= px;color:rgb(59,67,92);font-family:arial,helvetica;font-size:medium">There = is a way to implement an device detection from userspace?, so that device d= rivers can be loaded as needed.<br></p><p style=3D"margin:0px;color:rgb(59,= 67,92);font-family:arial,helvetica;font-size:medium"><br></p><p style=3D"ma= rgin:0px;color:rgb(59,67,92);font-family:arial,helvetica;font-size:medium">= If boat of those are possible, then there is an even simpler plan, and=20 that is to make Linux implement the FreeBSD's Driver ABI, and my=20 proposal also is simpler.<br></p><p style=3D"margin:0px;color:rgb(59,67,92)= ;font-family:arial,helvetica;font-size:medium"><br></p><p style=3D"margin:0= px;color:rgb(59,67,92);font-family:arial,helvetica;font-size:medium">Regard= s,<br></p><p style=3D"margin:0px;color:rgb(59,67,92);font-family:arial,helv= etica;font-size:medium">Nimbly2329<br></p><p style=3D"margin:0px;color:rgb(= 59,67,92);font-family:arial,helvetica;font-size:medium"><br></p><p style=3D= "margin:0px;color:rgb(59,67,92);font-family:arial,helvetica;font-size:mediu= m">By the way where is the documentation of the FreeBSD's driver ABI?<b= r></p> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d= iv> --0000000000000ad26c061c5d6af5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigHtNONn6600hiPhCA5FifvZYDcZz1szUZ0k9UtA0aCtg>