From nobody Sun Jan 16 18:10:08 2022 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 79D0A1955F9B for ; Sun, 16 Jan 2022 18:10:51 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-oo1-xc31.google.com (mail-oo1-xc31.google.com [IPv6:2607:f8b0:4864:20::c31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JcNPk2zl0z3hjQ for ; Sun, 16 Jan 2022 18:10:50 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: by mail-oo1-xc31.google.com with SMTP id v10-20020a4a860a000000b002ddc59f8900so4260772ooh.7 for ; Sun, 16 Jan 2022 10:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f7WLyrfKxYjqDvlYQfddhrLpvWqj4oMJuTxT1ddZR0o=; b=R6U+zMtn9QKXD4bNp7pR1VJpO3XXBWh6ynqRgekQB34tkdD25KHgr71FDvF4K5FFQD LXlF8RqBTy67w9Gh7d3tvfsOwr/qhCsSbYyb4GbNWcX8Xljeb8OKRvPcsp56G5oNsrDt hLeEDaxZdK2/79nNvX0K3wKxCkB/MlVJiG0wN9Xd9RB7cic8eJAvxpypLAKt6jLYa/bp nwkAT/fcqbM6YDYKayPQZjjLC8W71Un43J1N1i1QEg8PDXF8/+JbWfvDV99daYerpoJp PabwMxqZVfpg4Vw78rbpUqWRGARaSOYxXEQWR3WpYyt9BMuFxGAboKJeSqzS+dIvsXWz YltQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f7WLyrfKxYjqDvlYQfddhrLpvWqj4oMJuTxT1ddZR0o=; b=6XRvuYhzRChvO8KioElybNBtuhUVqtGC4rKUDjIbm69qD5kAMte/nk1uzN44tZoiso mItIqf3nBFkuYcERg6izHECL6tHs8nfBaUul1lFRft1srrE+dTAMslroj2GMNthe1jJg dd+OfcHBoIDt4rHpa8jboqr5rk1GFnJCXt7LbEXYhvF7RZkOW47uh6uL6AVlblJzTKAt GtilZAZiS0Evt03sqz7NKRoTeDC7A/j/Nq45LQCVN54CY1EYwXUBD8WqffRJM3jZCGt0 zWNcXZnylskboou2P2xOOKEvYHAfyT4DEPJeUebq+eSMyn7poHv6iajhpRAUU1+qAd/p nF9w== X-Gm-Message-State: AOAM533CqY8xMNbR9NOH3Q8gb5BK59wBs2GtcCMLhVwuNEHa4s39IMJi MiPKkqgNwdwABGVTqMRZ/OU4EabRQcmTr9SLDgg= X-Google-Smtp-Source: ABdhPJzoYR8BmL9jgt6FVJGKi5qcFiOljDoccZA15DtIPnwy4pDbfECUL8fP/XGq6TzihZ+S+BpWoORkLd+LRb+5vog= X-Received: by 2002:a05:6820:151b:: with SMTP id ay27mr4600617oob.47.1642356644206; Sun, 16 Jan 2022 10:10:44 -0800 (PST) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 References: <6B196318-29A4-479B-BC12-99EBBB69397E@iitbombay.org> In-Reply-To: From: Mehmet Erol Sanliturk Date: Sun, 16 Jan 2022 21:10:08 +0300 Message-ID: Subject: Re: Using bhyve to develop and OS -- tips on how? To: Aryeh Friedman Cc: Bakul Shah , "freebsd-virtualization@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000005f59f605d5b6f458" X-Rspamd-Queue-Id: 4JcNPk2zl0z3hjQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=R6U+zMtn; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mesanliturk@gmail.com designates 2607:f8b0:4864:20::c31 as permitted sender) smtp.mailfrom=mesanliturk@gmail.com X-Spamd-Result: default: False [-0.97 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.987]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.985]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[virtualization@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c31:from]; MLMMJ_DEST(0.00)[virtualization]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000005f59f605d5b6f458 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 16, 2022 at 8:59 PM Aryeh Friedman wrote: > It was/is off topic to discuss the motivations on the design I have in > mind but after thinking for it over 10 years (and using FreeBSD to build = a > IaaS around bhyve) I have come to the conclusion that *NO* existing OS ca= n > meet the design requirements I have in mind. > > If you say this , it is understood that you are on the correct path . Please continue . My understanding was based on your "(mostly for fun)" phrase. I beg your pardon . With my best wishes for all , and additionally success in your efforts . Mehmet Erol Sanliturk > On Sun, Jan 16, 2022 at 11:13 AM Mehmet Erol Sanliturk < > m.e.sanliturk@gmail.com> wrote: > >> >> >> >> >> On Sat, Jan 15, 2022 at 1:54 PM Bakul Shah wrote: >> >>> You may be better off using qemu, at least initially as =E2=80=9Clegacy= =E2=80=9D booting >>> requires jumping through a few more hoops. Another suggestion is to che= ck >>> out wiki.osdev.org. There are a lot of useful resources on this site. >>> >>> On Jan 15, 2022, at 1:29 AM, Aryeh Friedman >>> wrote: >>> >>> =EF=BB=BF >>> I want to develop a OS completely from scratch, i.e. starting with the >>> first instruction encountered after POST and everything above it (mostl= y >>> for fun). >>> >>> I want to use bhyve to do this any tips on how to get started (I have >>> found a few tutorials on how to do the asm part of a MBR but that's abo= ut >>> as far as I have gotten). >>> >>> -- >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>> >>> >> >> Dear Aryeh , >> >> >> https://wiki.osdev.org/Required_Knowledge >> >> From the beginning of above page : >> >> " >> Required Knowledge >> >> If you think you can skip this, it's probably just for you. >> >> Writing an OS is not a beginner's task. >> In fact, writing an OS is usually considered the most difficult >> programming task. >> You will need above-average programming skills before even considering >> a project like this. ..... >> " >> >> If you want to take such a difficult road to pursue , you may do the >> following : >> >> Study the bug reports , or GSOC projects , or projects to be handled by >> the >> FreeBSD Foundation >> ( or if you want more difficult problems , please search my mailing list >> messages >> to see "crazy" ideas , or please ask me "Do you have more crazy ideas ?" >> . >> You may be sure that I can find much "more crazy" ideas for you based on >> my goal to write >> a NEW operating system mainly based on FreeBSD , but from SCRATCH for >> ( not "Very" but ) "Large scale software stacks ( distributed , expert >> system based >> meaning learning , etc ... . ) ) >> >> >> If you confine your works on FreeBSD , if you want to be able to solve >> its current problems , >> this will mean that you are knowing how to write an OS because you are >> knowing >> the FreeBSD very well and are able to modify it toward a more mature >> state . >> At the end you will gain and FreeBSD will gain . >> >> >> A few suggestions : >> >> (1) Make a list of "panic" points . >> Eliminate as many of them as possible to protect the OS from >> crashing by determining >> whether the next application step will cause a panic or not ( check >> panic conditions >> before entering the next step ) and do not enter into it but return >> safely back by taking >> necessary actions other than "panic" . >> >> (2) At present many device behaviors are encoded into kernel related >> routines >> such as internal tables , constants , etc. . >> Design a device definition *.XML file format and move these >> internal definitions >> into these files with file names generated from device >> characteristics . >> For the detected existing devices and newly attached devices , >> generate the file >> name and search that file . If it exists , load it , else give a >> suitable error message . >> This allows to add new devices by the users by using device >> producing company >> supplied device definitions , or device definitions without >> requirement of >> modifications of kernel related sources . >> One more step would be to allow user supplied ( not "root" supplied >> ) device definitions >> and its associated device drivers loaded from userland . >> >> Such a system will be a very easy structure for the device >> producing companies >> because already they have device driver software , it is very easy >> to generate a >> device definition . The users will be able to use these devices >> easily by only >> attaching the device , storing its device driver and definition >> file into her / his space . >> >> This will attract the companies to be interested in FreeBSD , and >> produce more >> such drivers , definitions . >> This will increase number of possible FreeBSD users now repelled >> back due to difficulty of >> use of the devices or complete lack of their associated software >> parts , by solving >> their problems . >> >> >> It is possible to define many more improvement points . >> >> If present problems are handled , they will inspire many new improvement >> points >> which means you may continue to contribute to FreeBSD as much as possibl= e >> . >> >> This will supply what you want to do and its very pleasing happiness ( >> with respect to my >> understanding of your intentions ) . >> >> >> >> With my best wishes for all , >> >> Mehmet Erol Sanliturk >> >> >> >> >> >> > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > --0000000000005f59f605d5b6f458 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Jan 16, 2022= at 8:59 PM Aryeh Friedman <= aryeh.friedman@gmail.com> wrote:
It was/is off topic to discuss the= motivations on the design I have in mind but after thinking for it over 10= years (and using FreeBSD to build a IaaS around bhyve) I have come to the = conclusion that *NO* existing OS can meet the design requirements I have in= mind.



If you say this , it is understood that you are on the correct path .
Please continue .
My understanding was based on= your=C2=A0 "(mostly for fun)"=C2=A0 phrase.
I beg= your pardon .



With my best wishes for= all , and additionally success in your efforts .

Mehmet Erol Sanliturk





=C2=A0
On Sun, Jan 16, 2022= at 11:13 AM Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> wrote:

<= /div>



On = Sat, Jan 15, 2022 at 1:54 PM Bakul Shah <bakul@iitbombay.org> wrote:
You may be better off using qemu, at least init= ially as =E2=80=9Clegacy=E2=80=9D booting requires jumping through a few mo= re hoops. Another suggestion is to check out wiki.osdev.org. There are a lot of useful resourc= es on this site.

On Jan= 15, 2022, at 1:29 AM, Aryeh Friedman <aryeh.friedman@gmail.com> wrote:
=EF=BB=BF
I want to develop a OS completely from scratch, i.e. sta= rting with the first instruction encountered after POST and everything abov= e it (mostly for fun).

I want to use bhyve to do t= his any tips on how to get started (I have found a few tutorials on how to = do the asm part of a MBR but that's about as far as I have gotten).
=

--
Aryeh M. Fried= man, Lead Developer, http://www.PetiteCloud.org


Dear Aryeh ,

=

F= rom the beginning of above page :

"
Required Knowledge

If you think you= can skip this, it's probably just for you.

Writing an OS is not= a beginner's task.
In fact, writing an OS is usually considered th= e most difficult programming task.
You will need above-average programm= ing skills before even considering
a project like this. ...= ..
&= quot;
If you = want to take such a difficult road to pursue , you may do the following :

=
Study the bug = reports , or GSOC projects , or projects to be handled by the
FreeBSD Foundation
( or if= you want more difficult problems , please search my mailing list messages =
to s= ee "crazy" ideas , or please ask me "Do you have more crazy = ideas ?" .
You may be sure that I can find much "more crazy" ide= as for you based on my goal to write
a NEW operating system mainly based on FreeBSD = , but from SCRATCH for
( not "Very" but ) "Large scale software stack= s (=C2=A0 distributed , expert system based
meaning learning=C2=A0 , etc ... . ) )

=

If you confine you= r works on FreeBSD , if you want to be able to solve its current problems ,=
thi= s will mean that you are knowing how to write an OS because you are knowing=
the Free= BSD very well and are able to modify it toward a more mature state .
At the end = you will gain and FreeBSD will gain .


A few suggestions :

(1) Make a list of "panic" points= .
=C2=A0= =C2=A0=C2=A0=C2=A0 Eliminate as many of them as possible to protect the OS = from crashing by determining
=C2=A0=C2=A0=C2=A0=C2=A0 whether the next application s= tep will cause a panic or not ( check panic conditions
=C2=A0=C2=A0=C2=A0=C2=A0 befo= re entering the next step ) and do not enter into it but return safely back= by taking
=C2=A0=C2=A0=C2=A0=C2=A0 necessary actions other than "panic" .=

(2) At prese= nt many device behaviors are encoded into kernel related routines
=C2=A0=C2=A0= =C2=A0=C2=A0 such as internal tables , constants , etc. .
=C2=A0=C2=A0=C2=A0=C2= =A0 Design a device definition=C2=A0 *.XML file format and move these inter= nal definitions
=C2=A0=C2=A0=C2=A0=C2=A0 into these files with file names gener= ated from device characteristics .
=C2=A0=C2=A0=C2=A0=C2=A0 For the detected existin= g devices and newly attached devices , generate the file
=C2=A0=C2=A0=C2=A0=C2= =A0 name and search that file . If it exists , load it , else give a suitab= le error message .
=C2=A0=C2=A0=C2=A0=C2=A0 This allows to add new devices by the us= ers by using device producing company
=C2=A0=C2=A0=C2=A0=C2=A0 supplied=C2=A0= =C2=A0=C2=A0 device definitions=C2=A0 , or device definitions without requi= rement of
=C2=A0 =C2=A0=C2=A0 modifications of kernel related sources=C2=A0 .
<= div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2= =A0=C2=A0 One more step would be to allow user supplied ( not "root&qu= ot; supplied ) device definitions
=C2=A0=C2=A0=C2=A0=C2=A0 and its associated device= drivers loaded from userland .

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Such a system will be a v= ery easy structure for the device producing companies
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= because already they have device driver software , it is very easy to gene= rate a
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 device definition . The users will be able t= o use these devices easily by only
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 attaching the devi= ce , storing its device driver and definition file into her / his space .

=
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 This will attract the companies to be interested in Free= BSD , and produce more
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 such drivers , definitions .
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 This will increase number of possible FreeBSD users n= ow repelled back due to difficulty of
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 use of the devi= ces or complete lack of their associated software parts , by solving
<= div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 their problems .


It is possible to define many more improvement points .=

If present p= roblems are handled , they will inspire many new improvement points
which means= you may continue to contribute to FreeBSD as much as possible .

This will supply what y= ou want to do and its very pleasing happiness ( with respect to my
understanding of = your intentions ) .



With my best wishes for all ,

Mehmet Erol Sanliturk




=C2=A0


--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
--0000000000005f59f605d5b6f458--