On 01/06/2020 21:08, Jason A. Donenfeld wrote: > On Mon, Jun 1, 2020 at 1:54 PM Mark Cave-Ayland > <mark.cave-ayl...@ilande.co.uk> wrote: >> >> On 01/06/2020 08:23, Jason A. Donenfeld wrote: >> >>> On Sun, May 31, 2020 at 3:18 AM Mark Cave-Ayland >>> <mark.cave-ayl...@ilande.co.uk> wrote: >>>> >>>> AFAICT the problem here is the Forth being used at >>>> https://github.com/openbsd/src/blob/master/sys/arch/sparc64/dev/fb.c#L511: >>>> since the >>>> addr word isn't part of the IEEE-1275 specification, it is currently >>>> unimplemented in >>>> OpenBIOS. >>> >>> Actually, it looks to me like after this line runs: >>> >>> OF_interpret("stdout @ is my-self " >>> "addr char-height addr char-width " >>> "addr window-top addr window-left", >>> 4, &windowleft, &windowtop, &romwidth, &romheight); >>> >>> windowleft and windowtop contain legit addresses, but romwidth and >>> romheight have garbage in them. It might be possible to chalk this up >>> to bogus QEMU firmware, in which case, whatever. >> >> Sadly I think that's more due to luck than anything else. If you have a >> working boot >> loader then can you try booting qemu-system-sparc64 with -prom-env >> 'auto-boot?=false' >> and then entering the following definition of addr at the Forth prompt: >> >> : addr >> parse-word $find if >> cell + >> then >> ; >> >> followed by: >> >> boot >> >> That should give you a definition of addr that will return the address of a >> value >> type in Forth. > > Wow, that's magic, and works perfectly: > https://data.zx2c4.com/openbsd-qemu-sparc64-pretty-vga-with-serif-font.png > Pretty font too. > > It sounds like the issue we're facing here is that the addr function > is missing from QEMU's firmware? Would it be quasi interesting to > remove use of it from OpenBSD? Or should we take this over to QEMU > instead and get it implemented?
Oh wow it looks great! I also have commit access to OpenBIOS so I can tidy that up and get it posted over on the OpenBIOS mailing list. Probably the main thing is to figure out what to do if the specified word doesn't exist. I'll also try and find a few mins to fire up my Mac Mini to see if it exists there to work out if it should be restricted to SPARC only. Note that I did my last merge a few days ago so it will be a little while before it hits QEMU git master, but I can certainly get it added in time for the next official QEMU release. ATB, Mark.