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:a344:: with SMTP id m65mr23629459qke.114.1595865890968; Mon, 27 Jul 2020 09:04:50 -0700 (PDT) X-Received: by 2002:a37:a848:: with SMTP id r69mr22143570qke.58.1595865890728; Mon, 27 Jul 2020 09:04:50 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!peer03.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: Mon, 27 Jul 2020 09:04:50 -0700 (PDT) In-Reply-To: <1603a778-dc76-4c82-88f2-872212871b65n@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=95.250.125.238; posting-account=JRF_-woAAABYlsAtkCl_CUxBuQy2SsaQ NNTP-Posting-Host: 95.250.125.238 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <62b36d1a-6d2c-4c79-a335-20546225544co@googlegroups.com> Subject: Re: SweetAda 0.1e released From: gabriele.galeotti.xyz@gmail.com Injection-Date: Mon, 27 Jul 2020 16:04:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 11834 X-Received-Body-CRC: 3433421622 Xref: reader01.eternal-september.org comp.lang.ada:59552 List-Id: On Monday, July 27, 2020 at 4:02:48 PM UTC+2, Roger Mc wrote: > On Monday, July 27, 2020 at 11:18:47 PM UTC+10, gabriele.g...@gmail.com w= rote: > > On Monday, July 27, 2020 at 1:34:28 PM UTC+2, Roger Mc wrote:=20 > > > On Monday, July 27, 2020 at 8:51:55 PM UTC+10, gabriele.g...@gmail.co= m wrote:=20 > > > > On Sunday, July 26, 2020 at 3:51:41 AM UTC+2, Roger Mc wrote:=20 > > > > > I reinstalled 0.1e and now it works, at least to the extent that = 0.1d works.=20 > > > > > Quite strange as I had the same problem on both my computers.=20 > > > > > The only thing that I can think of is that on the previous 01e in= stall I just used=20 > > > > > ./menu.sh ( without target selection)=20 > > > > > which was the method I used for 0.1d. Perhaps this messed somethi= ng up?=20 > > > > > When that didn't work, I inspected 0.1e menu.sh and discovered th= e need to use target selection;=20 > > > > > however, on using target selection, in the order stated in your a= dvice (perhaps eventually), I had the reported problem.=20 > > > > > It seems, somehow I messed something up; somehow on both computer= s!=20 > > > > > Thanks for your much appreciated advice.=20 > > > > >=20 > > > > > I still haven't tracked down the Catalina problem. Inspiration co= mes slowly.=20 > > > > > Certainly, the Ada code is working correctly but, somehow the ass= embly coded outb instructions in x86_64-io don't seem to be having any effe= ct.=20 > > > > > Possibly being blocked by Catalina security features?=20 > > > > > I currently don't know how to track outb functionality.=20 > > > > > I'll keep trying (slooowly)=20 > > > > Hi Roger.=20 > > > >=20 > > > > Fine, the most important thing is that we have verified that tools = run correctly. Maybe it could be useful to delete everything (after a backu= p) and repeat a fresh installation, so you could check that you have a perf= ectly aligned layout, without previous mistakes.=20 > > > >=20 > > > I just received your message recommending awaiting the next release.= =20 > > >=20 > > > > Correct me if I'm wrong, I understood that IOEMU window is working = and shows I/O widgets cycling, but not in Catalina, is that correct?=20 > > > Thats correct. I had the IOEMU window working and showing I/O widgets= cycling under High Sierra but still not under Catalina.=20 > > > >=20 > > > > In this case maybe there is either a problem in the GUI code or in = Catalina handling of windows.=20 > > > >=20 > > > > But you can assume safely that Ada code is working since you should= see some output in serial terminal.=20 > > > Yes I'm very confident that the Ada code is working and certainly see= output in the serial terminal and the QEMU window.=20 > > > >=20 > > > > About the outb instruction, please explain me (even writing down yo= ur code) what you are trying to do. outb instructions should behave fine, o= therwise you should see a totally dead system.=20 > > > The outb instructions that I was referring to are those in X86_64-io.= adb which are invoked by pc.PIC procedures which I have been trying to unde= rstand.=20 > > > My current understanding is that it is PIC procedures in pc.adb that = should drive the I/O widgets cycling in the IOEMU window via the in X86_64-= io outb instructions?=20 > > > >=20 > > > > By the way, apologies if I repeat myself, but try to isolate your c= ode in an application file like the standard one, I'm changing some with/us= e and simplify units, so expect some minor changes in future release. This = way you can change very little in your code. For example, unit x86_64.IO is= likely to change in CPU.IO. Ask me if you have difficulties recompiling yo= ur code.=20 > > >=20 > > > Understood. But, at the moment I'm nowhere near producing my own code= and am essentially trying to "reverse engineer" your code in order to unde= rstand how things work.=20 > > >=20 > > > I have spent today coming to grips with MPLAB via various MPLAB tutor= ials, which also included tutorials on PIC hardware and interfacing. This, = eventually has been quite rewarding but I still have some way to go to reac= h adequate knowledge.=20 > > >=20 > > > I've not tried sending files via Google Groups before so I don't know= if this works!=20 > > > If it does this shows my current understanding of the system=20 > > > /System/Volumes/Data/QEMU/sweetada_run.pdf.zip > > OK. Maybe the Catalina problem is an issue we could solve in the near f= uture. If you have an environment that does work, that is very fine, so we = have a common base.=20 > >=20 > > Now for the outb instructions.=20 > > No, pc.pic instructions do not drive IOEMU graphics widgets. Let me exp= lain. I say again, I do not known your level of knowledge so I will go deep= in order to not be misunderstood. Sorry for trivial things.=20 > >=20 > > You are inside an emulated virtual machine, thanks to QEMU. This machin= e is a more or less standard x86-64 cpu PC machine. In the current PC-x86-6= 4 platform development there are no calls to PC.PIC unit. This is done in t= he 32-bit platform, which isn't your choice. Maybe you mean PC.PPI, which i= s the parallel port.=20 > >=20 > > I hope you are not confusing the PIC (programmable interrupt controller= ) in the PC chipset) with a PIC microcontroller, which are two entirely dif= ferent context.=20 > >=20 > > And this is done because I had to reprogram the Programmable Interrupt = Controller (PIC) that's inside the chipset of every PC. It is needed for pr= oper handling of interrupts (that I have yet to write down for x86-64, unli= ke the 32-bit platform, which is more "mature").=20 > >=20 > > I/O widgets are excited by instructions in applications.adb. Now, there= are two sets of "visible" I/O. One set is 3 I/O ports of the parallel port= interface.=20 > >=20 > > By calling PC.PPI... you read or write something in this ports. So:=20 > >=20 > > applications.adb: calls PPI_DataOut (Value)=20 > > pc.adb: PPI_DataOut() implements a calls to CPU.IO.PortOut (Value)=20 > >=20 > > Note that pc.adb with's CPU.ads=20 > >=20 > > Inside cpu.ads, CPU.IO.PortOut is a renaming of x86_64.IO package.=20 > > Inside package x86_64.IO, finally, PortOut is implemented as on outb/ou= tw/outl, whatever instructions is picked up by the compiler thanks to overl= oading on the proper size of the data to be handled. If you want to output = an Unsigned_8 value (the right choice because it's an 8-bit port), then=20 > >=20 > > procedure PortOut (Port : in Unsigned_16; Value : in Unsigned_8)=20 > >=20 > > is picked up.=20 > >=20 > > The same also for "control" and "status". Every port is then tied to a = widget by IOEMU, which visualize it in real-time.=20 > >=20 > > The there is another set of I/O ports available to be shown in IOEMU, y= ou can read their addresses when QEMU start. You can create an I/O section = in qemu.cfg and assign to these ports a widget and then make a PortOut also= on them.=20 > >=20 >=20 > Many thanks for this which I will study in detail. Nothing is trivial. My= "level of knowledge" in this context is low. > I have been confusing the PIC (programmable interrupt controller) in the = PC chipset) with a PIC microcontroller which I thought i8259 PIC was referr= ing to. > I think I need to study QEMU and IOEMU in depth which I hadn't got aroun= d to yet. > Actually, perhaps demonstrating my level of ignorance, I'm baffled as to = just where QEMU and IOEMU "are" in the sweetada distribution? > Presumably such a question demonstrates my limited knowledge. > My only clues at the moment are that QEMU and IOEMU are windows which mu= st be generated somewhere; but so far I haven't been able to discover the "= somewhere". > When I first started looking at sweetada, I did install a QEMU system to = get some understanding and successfully installed Ubuntu it. But that was j= ust a familiarity exercise which I have since deleted.=20 >=20 > > If you want to send me a piece of code, you can try gabriele...@sweetad= a.org > This was actually a diagram which I will now update in conformance with y= our description. > Apparently this Groups message editor is supposed to have a format toolba= r from which attachments can be made but no such toolbar shows up on either= of my Macs. > Again, your explanations are much appreciated, > Roger I sensed the strange PIC problem. 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 cpu, or= a PowerPC, maybe it is better to exercise on an virtual machine. That's wh= y exists a QEMU. QEMU is patched so that every machine it could emulates ha= s additional I/Os that normally do not exist in that machine. Like a generi= c I/O card inside a computer. For example, if you choose a SPARC cpu (an th= us an emulated machine like a SPARCstation5), it is difficult to have immed= iate evidence, because you have to low-level program a huge number of thing= s, 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 normal = 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 indipendent lib= rary added inside the distribution, but it's nothing more that a GUI manage= r for widgets, together with a parser for ioemu.cfg configuration files. Ag= ain I will release the source once that the code is cleaned up and stable. = I make huge changes everyday, and don't want ugly things spreading off the = net. By the way, you can run QEMU without IOEMU, just delete the library file. T= hen supply QEMU with your own firmware by standard command line options. QE= MU for sweetada has nothing different. To be honest, if you want to study QEMU from a low-level point of view, pre= pare yourself for a long journey. It's incredibly complicated. And Sweetada= does help you very little in doing that. The focus of sweetada is currentl= y to adapt Ada code to machines. G