On Mon, Jun 1, 2020 at 2:08 PM Jason A. Donenfeld <ja...@zx2c4.com> wrote: > > Hi Mark, > > 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?
I just sent a patch up to qemu-devel. We'll see what they think. You should be CC'd on it. https://lore.kernel.org/qemu-devel/20200601203143.93424-1-ja...@zx2c4.com/ Last nit would be figuring out how to prevent it from prompting me for "root device: ", "swap device: ", but I'm guessing that's just some prom variable or partition label I need to fiddle with, rather than a real bug worthy of this list. Jason