[PATCH] sparc: implement addr function

Jason A. Donenfeld posted 1 patch 3 years, 11 months ago
Failed in applying to current master (apply log)
forth/device/extra.fs | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] sparc: implement addr function
Posted by Jason A. Donenfeld 3 years, 11 months ago
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.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
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(+)

diff --git a/forth/device/extra.fs b/forth/device/extra.fs
index 9ca6b78..f778f7a 100644
--- a/forth/device/extra.fs
+++ b/forth/device/extra.fs
@@ -19,6 +19,12 @@
 	rot encode-int 2swap property
 ;
 
+: addr
+  parse-word $find if
+    cell +
+  then
+;
+
 \ -------------------------------------------------------------------------
 \ property utils
 \ -------------------------------------------------------------------------
-- 
2.26.2