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.


ATB,

Mark.

Reply via email to