public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: Miguel Bolanos <mike@linuxlabs.com>
To: Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
Cc: linux-8086@vger.kernel.org
Subject: Re: Experimental fix for my memcpy_{to,from}fs problem
Date: Thu, 03 Jun 2004 08:02:18 -0600	[thread overview]
Message-ID: <1086271338.3227.3.camel@talena.hsol.net> (raw)
In-Reply-To: <20040602162521.GC26330@duckman.distro.conectiva>

Applied, but i did some changes on the patch, please read bellow.

On Wed, 2004-06-02 at 10:25, Eduardo Pereira Habkost wrote:
> On Tue, Jun 01, 2004 at 08:57:06PM -0600, Miguel Bolanos wrote:
> <snip>
> > 
> > Yes the fix is ok.. but it will break dev86 <= 0.16.0 versions... this
> > fact makes me hesitate a bit because Bruce does warn that 0.16.15 can
> > behave a bit unstable.
> > But we will see.
> 
> Yes, and bcc >= 0.16.8 variable offset macros are broken, anyway.
> 
> The original code didn't used the offset macros for accessing the
> variables. It will work only on:
> 
> - dev86 < 0.16.8
> - any dev86 version if not using optimization
> 
> And it will not work if the bcc variable offset macros bug is fixed,
> because the offsets really changed, with the optimized code.
> 
> The fix I've sent before really broke systems with dev86 <= 0.16.8.
> 
> The following patch against the current CVS code (that already has the
> "wrong" fix) change the asm code to access the variables using the
> "right way", that is: the variable offset macros.
> 
> It will work for:
> - dev86 < 0.16.8
> - any dev86 version if not using optimization
> - dev86 >= 0.16.8 with the previous patch I sent (Fix variable offset macros)
> - dev86 with the patch Robert sent
> 
> So please apply.
> 
> --
> Eduardo
> 
> 
> --- elks/arch/i86/mm/user.c	2 Jun 2004 03:06:01 -0000	1.16
> +++ elks/arch/i86/mm/user.c	2 Jun 2004 15:10:16 -0000
> @@ -39,11 +39,11 @@
>  	mov	dx,es
>  	mov	bx,ds
>  	mov	es,bx
> -	mov	ax,[bp-2]	! source segment (local variable)
> +	mov	ax,[bp+.memcpy_fromfs.ds]	! source segment (local variable)
>  	mov	ds,ax
> -	mov	di,[bp+4]	! destination address
> -	mov	si,[bp+6]	! source address
> -	mov	cx,[bp+8]	! number of bytes to copy
> +	mov	di,[bp+.memcpy_fromfs.daddr]	! destination address
> +	mov	si,[bp+.memcpy_fromfs.saddr]	! source address
> +	mov	cx,[bp+.memcpy_fromfs.len]	! number of bytes to copy
>  	cld
>  	rep
>  	movsb

This was already applied on a the previous patch

> @@ -77,11 +77,11 @@
>  	push	si
>  	push	di
>  	mov	dx,es
> -	mov	ax,[bp-2]	! source segment (local variable)
> +	mov	ax,[bp+.memcpy_tofs.es]	! source segment (local variable)
>  	mov	es,ax
> -	mov	di,[bp+4]	! destination address
> -	mov	si,[bp+6]	! source address
> -	mov	cx,[bp+8]	! number of bytes to copy
> +	mov	di,[bp+.memcpy_tofs.daddr]	! destination address
> +	mov	si,[bp+.memcpy_tofs.saddr]	! source address
> +	mov	cx,[bp+.memcpy_tofs.len]	! number of bytes to copy
>  	cld
>  	rep
>  	movsb

This was already done as well.

> @@ -167,17 +167,17 @@
>  #ifndef S_SPLINT_S
>  #asm
>  
> -	mov	ax,[bp-6]	! source segment (local variable)
> +	mov	ax,[bp+.strlen_fromfs.ds]	! source segment (local variable)
>  	mov	es,ax
> -	mov	di,[bp+4]	! source address
> +	mov	di,[bp+.strlen_fromfs.saddr]	! source address
>  	cld
>  	xor	al,al		! search for NULL byte
>  	mov	cx,#-1
>  	rep
>  	scasb
> -	sub	di,[bp+4]	! calc len +1
> +	sub	di,[bp+.strlen_fromfs.saddr]	! calc len +1
>  	dec	di
> -	mov	[bp-6],di	! save in local var ds
> +	mov	[bp+.strlen_fromfs.ds],di	! save in local var ds
>  #endasm
>  #endif
>  

This part was applied.

thanks a lot.

-- 
--------------------miguel bolanos, systems administrator, linuxlabs
... ........ ..... ....                 230 peachtree st nw ste 2701
the original linux labs                          atlanta.ga.us 30303
       -since 1995                          http://www.linuxlabs.com
                                office 404.577.7747 fax 404.577.7743
--------------------------------------------------------------------


  reply	other threads:[~2004-06-03 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-01 21:32 memcpy_fromfs() failing. Wrong variable offsets Eduardo Pereira Habkost
2004-06-01 22:02 ` Experimental fix for my memcpy_{to,from}fs problem Eduardo Pereira Habkost
2004-06-01 22:30   ` Eduardo Pereira Habkost
2004-06-02  2:57     ` Miguel Bolanos
2004-06-02 16:25       ` Eduardo Pereira Habkost
2004-06-03 14:02         ` Miguel Bolanos [this message]
2004-06-03 14:14           ` Eduardo Pereira Habkost
2004-06-03 14:37             ` Paul Nasrat
2004-06-02  1:33   ` claudio
2004-06-02 20:53     ` Miguel Bolanos
2004-06-02  3:05   ` Miguel Bolanos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1086271338.3227.3.camel@talena.hsol.net \
    --to=mike@linuxlabs.com \
    --cc=ehabkost@conectiva.com.br \
    --cc=linux-8086@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox