diff mbox

[v2,10/10] obp-tftp: Remove the ciregs-buffer

Message ID 1474312112-27835-11-git-send-email-thuth@redhat.com
State Superseded
Headers show

Commit Message

Thomas Huth Sept. 19, 2016, 7:08 p.m. UTC
Since we're not messing up with the client interface now anymore,
we don't need to buffer the register contents of the client anymore.

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

Comments

Alexey Kardashevskiy Oct. 10, 2016, 3:06 a.m. UTC | #1
On 20/09/16 05:08, Thomas Huth wrote:
> Since we're not messing up with the client interface now anymore,

Out of curiosity - what was messing with CI and why/when did this stop?


> we don't need to buffer the register contents of the client anymore.
> 
> Signed-off-by: Thomas Huth <thuth@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  ( -- )
>
Thomas Huth Oct. 11, 2016, 9:08 a.m. UTC | #2
On 10.10.2016 05:06, Alexey Kardashevskiy wrote:
> On 20/09/16 05:08, Thomas Huth wrote:
>> Since we're not messing up with the client interface now anymore,
> 
> Out of curiosity - what was messing with CI and why/when did this stop?

IIRC the problem with the ciregs happened when doing network loading in
yaboot. Yaboot is using the client interface as a "normal" client
already, but when it tries to load additional files like the kernel
image via TFTP, SLOF internally starts the net-snk as a second client.
So there were suddenly two clients using the Open Firmware client
interface at the same time. So the obp-tftp code had to save the ciregs
from yaboot before jumping into the net-snk client.

 Thomas
Alexey Kardashevskiy Oct. 12, 2016, 12:44 a.m. UTC | #3
On 11/10/16 20:08, Thomas Huth wrote:
> On 10.10.2016 05:06, Alexey Kardashevskiy wrote:
>> On 20/09/16 05:08, Thomas Huth wrote:
>>> Since we're not messing up with the client interface now anymore,
>>
>> Out of curiosity - what was messing with CI and why/when did this stop?
> 
> IIRC the problem with the ciregs happened when doing network loading in
> yaboot. Yaboot is using the client interface as a "normal" client
> already, but when it tries to load additional files like the kernel
> image via TFTP, SLOF internally starts the net-snk as a second client.
> So there were suddenly two clients using the Open Firmware client
> interface at the same time. So the obp-tftp code had to save the ciregs
> from yaboot before jumping into the net-snk client.

If you repost 05/10..10/10, please add this to the commit log. Thanks.
diff mbox

Patch

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  ( -- )