[SLOF] [PATCH v3 6/6] obp-tftp: Remove the ciregs-buffer

Thomas Huth thuth at redhat.com
Wed Oct 12 21:44:08 AEDT 2016


When a secondary boot loader like Yaboot tries to load additional files
like the kernel image via TFTP, SLOF internally started the net-snk as a
second client to do the TFTP transfer. So there were suddenly two clients
using the Open Firmware client interface at the same time. Thus the
obp-tftp code had to save the client interface registers from yaboot
before jumping into the net-snk client, and restore them afterwards.
Since we're now not using net-snk for the network loading anymore, we
also don't need to buffer the register contents of the client anymore.

Signed-off-by: Thomas Huth <thuth at redhat.com>
---
 slof/fs/packages/obp-tftp.fs | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/slof/fs/packages/obp-tftp.fs b/slof/fs/packages/obp-tftp.fs
index 2e6bcfc..63171d0 100644
--- a/slof/fs/packages/obp-tftp.fs
+++ b/slof/fs/packages/obp-tftp.fs
@@ -14,18 +14,11 @@ s" obp-tftp" device-name
 
 VARIABLE huge-tftp-load 1 huge-tftp-load !
 
-INSTANCE VARIABLE ciregs-buffer
-
 : open ( -- okay? ) 
-    ciregs-size alloc-mem ciregs-buffer ! 
     true
 ;
 
 : load ( addr -- size )
-
-    \ Save old client interface register 
-    ciregs ciregs-buffer @ ciregs-size move
-
     s" bootargs" get-chosen 0= IF 0 0 THEN >r >r
     s" bootpath" get-chosen 0= IF 0 0 THEN >r >r
 
@@ -42,9 +35,6 @@ INSTANCE VARIABLE ciregs-buffer
     my-args
     net-load dup 0< IF drop 0 THEN
 
-    \ Restore to old client interface register 
-    ciregs-buffer @ ciregs ciregs-size move
-
     \ Recover buffer address of BOOTP-REPLY packet
     r>
 
@@ -59,7 +49,6 @@ INSTANCE VARIABLE ciregs-buffer
 ;
 
 : close ( -- )
-   ciregs-buffer @ ciregs-size free-mem 
 ;
 
 : ping  ( -- )
-- 
1.8.3.1



More information about the SLOF mailing list