Skip to contentSkip to conversation

sparc: implement addr function

PATCH New Jason A. Donenfeld 1 participant 1 message Jun 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: implement addr function

The sparc firmware provides an addr function, which is used by operating systems like OpenBSD to query and work with framebuffer information, addressing the cells directly. Without it, QEMU cannot start OpenBSD at all, while with it, QEMU boots out of the box.

---
After this lands, somebody will need to update the submodule and prebuilt inside of qemu.

 forth/device/extra.fs | 6 ++++++
 1 file changed, 6 insertions(+)
forth/device/extra.fs +6 -0
index 9ca6b78..f778f7a 100644
@@ -19,6 +19,12 @@
 	rot encode-int 2swap property
 ;
 
+: addr
+  parse-word $find if
+    cell +
+  then
+;
+
 \ -------------------------------------------------------------------------
 \ property utils
 \ -------------------------------------------------------------------------
Signature · 1 line
2.26.2