From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:a104:: with SMTP id k4mr27196782qke.384.1595943127257; Tue, 28 Jul 2020 06:32:07 -0700 (PDT) X-Received: by 2002:a37:84c:: with SMTP id 73mr9532759qki.464.1595943126991; Tue, 28 Jul 2020 06:32:06 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 28 Jul 2020 06:32:06 -0700 (PDT) In-Reply-To: <40d7501a-9b4e-4cbd-a59d-cc0aa858c8e1o@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=203.59.139.151; posting-account=d51RWwoAAADvR-x0zYAtT9z3CRxT1eXo NNTP-Posting-Host: 203.59.139.151 References: <748b7abb-4bda-4174-aa37-367daaf1c02ao@googlegroups.com> <6cbf26a5-2047-4685-a87b-381bc5fedd5bo@googlegroups.com> <4472b2d0-e872-46c9-8665-af1fea1cc8c4n@googlegroups.com> <62b1618d-e93d-42f4-9970-314685e2c01ao@googlegroups.com> <1603a778-dc76-4c82-88f2-872212871b65n@googlegroups.com> <62b36d1a-6d2c-4c79-a335-20546225544co@googlegroups.com> <79d9a1d0-8735-460e-a648-c2a27e35a700n@googlegroups.com> <40d7501a-9b4e-4cbd-a59d-cc0aa858c8e1o@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2054c3f0-1336-48c0-8022-0fe5fdf23f4fn@googlegroups.com> Subject: Re: SweetAda 0.1e released From: Roger Mc Injection-Date: Tue, 28 Jul 2020 13:32:07 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5753 X-Received-Body-CRC: 2298978378 Xref: reader01.eternal-september.org comp.lang.ada:59568 List-Id: On Tuesday, July 28, 2020 at 7:16:59 PM UTC+10, gabriele.g...@gmail.com wro= te: > On Tuesday, July 28, 2020 at 2:06:46 AM UTC+2, Roger Mc wrote:=20 > > On Tuesday, July 28, 2020 at 2:04:52 AM UTC+10, gabriele.g...@gmail.com= wrote:=20 > > > In sweetada context, QEMU is a more or less normal QEMU that is used = as an aid in development. e.g.,if you want to try sweetada code on a MIPS c= pu, or a PowerPC, maybe it is better to exercise on an virtual machine. Tha= t's why exists a QEMU. QEMU is patched so that every machine it could emula= tes has additional I/Os that normally do not exist in that machine. Like a = generic I/O card inside a computer. For example, if you choose a SPARC cpu = (an thus an emulated machine like a SPARCstation5), it is difficult to have= immediate evidence, because you have to low-level program a huge number of= things, like the video framebuffer. Instead, you manipulate those simple I= /O and IOEMU lets you visualize them on his own window. QEMU package is a n= ormal QEMU distribution (apart the patches, that I have to make public soon= , just the time to adjust them in a decent form), and IOEMU is an indipende= nt library added inside the distribution, but it's nothing more that a GUI = manager for widgets, together with a parser for ioemu.cfg configuration fil= es. Again I will release the source once that the code is cleaned up and st= able. I make huge changes everyday, and don't want ugly things spreading of= f the net.=20 > > >=20 > > > By the way, you can run QEMU without IOEMU, just delete the library f= ile. Then supply QEMU with your own firmware by standard command line optio= ns. QEMU for sweetada has nothing different.=20 > > >=20 > > > To be honest, if you want to study QEMU from a low-level point of vie= w, prepare yourself for a long journey. It's incredibly complicated. And Sw= eetada does help you very little in doing that. The focus of sweetada is cu= rrently to adapt Ada code to machines.=20 > > >=20 > > > G=20 > >=20 > > Great! I finally get the picture (well, almost).=20 > > QEMU is /opt/sweetada/bin/qemu-system-x86_64 which starts up like a DOS= PC, booting from ROM and running until it can't find a bootable device.=20 > > Also, the QEMU-AArch64 directory gives me plenty of clues.=20 > >=20 > > My idea is certainly, not to study QEMU from a low-level point of view = but to understand its use in the context of sweetada and to understand the = adaption of Ada code to machines.=20 > > My planned first job is to completely identify and understand all inter= faces between sweetada and QEMU. > Well, absolutely.=20 >=20 > The flow is the following:=20 >=20 > - make all -> kernel.elf creation=20 > - make postbuild --> kernel.rom ROM BIOS image (or whatever is used by th= e target)=20 > - make run --> execute the "RUN_COMMAND" specified in configuration.in=20 > - in the case of PC-x86-64, runsweetada is called=20 > - runsweetada parses the START section of ioemu.cfg and executes QEMU for= a PC x86-64=20 > - qemu-system-x86_64 starts, it loads the ROM BIOS image and the emulated= CPU runs sweetada code=20 > - if the IOEMU library is present, it parses ioemu.cfg again, looking int= o I/O and serialport sections, creates the IOEMU window that displays physi= cal I/O ports and starts terminals connected to the serialports of the emul= ated machine=20 >=20 > In the case of QEMU-AArch64 nothing changes, obviously the system code is= different and qemu-system-aarch64 is called. You do not see anything in th= e QEMU window because a fictional board gets emulated, which does not have = a VGA screen, only CPU, RAM and some undisplayable peripherals. The image p= roduced by sweetada is not a true ROM image because this fictional board do= es not have an easily mappable ROM, so it directly loads the kernel.elf obj= ect.=20 >=20 > Regards Thanks Gabriele. As usual, very helpful.