[OpenBIOS] [commit] r1385 - trunk/openbios-devel/arch/ppc/qemu

repository service svn at openbios.org
Sat Feb 20 14:22:25 CET 2016


Author: mcayland
Date: Sat Feb 20 14:22:24 2016
New Revision: 1385
URL: http://tracker.coreboot.org/trac/openbios/changeset/1385

Log:
ppc: move copyright property hooks from adler32 word

Instead insert the copyright property if we detect the /rom/macos device
generated by the MacOS boot loader just before we call the client with
go and remove it before control is returned back to the interpreter.

This effectively hides the property from everyone except for MacOS bootloaders.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/arch/ppc/qemu/init.c
   trunk/openbios-devel/arch/ppc/qemu/qemu.fs

Modified: trunk/openbios-devel/arch/ppc/qemu/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/init.c	Sat Feb 20 14:22:22 2016	(r1384)
+++ trunk/openbios-devel/arch/ppc/qemu/init.c	Sat Feb 20 14:22:24 2016	(r1385)
@@ -601,6 +601,11 @@
 {
     ucell addr;
 
+    /* Insert copyright property for MacOS 9 and below */
+    if (find_dev("/rom/macos")) {
+        fword("insert-copyright-property");
+    }
+    
     feval("saved-program-state >sps.entry @");
     addr = POP();
 

Modified: trunk/openbios-devel/arch/ppc/qemu/qemu.fs
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/qemu.fs	Sat Feb 20 14:22:22 2016	(r1384)
+++ trunk/openbios-devel/arch/ppc/qemu/qemu.fs	Sat Feb 20 14:22:24 2016	(r1385)
@@ -121,18 +121,16 @@
   active-package!
 ;
 
+: (exit)
+  \ Clean up before returning to the interpreter
+  delete-copyright-property
+;
+
 \ -------------------------------------------------------------------------
 \ Adler-32 wrapper
 \ -------------------------------------------------------------------------
 
 : adler32 ( adler buf len -- checksum )
-  \ Since Mac OS 9 is the only system using this word, we take this
-  \ opportunity to inject a copyright message that is necessary for the
-  \ system to boot.
-  insert-copyright-property
-
-  ( adler buf len )
-
   " (adler32)" $find if
     execute
   else



More information about the OpenBIOS mailing list