direct-io.hg

changeset 12370:5bdd8b5e3a1f

[VMXASSIST] Support all data segments in mov_to_seg().

This patch lets Plan9 crash at the same location before the original
patch by Stephen Tweedie.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
author kaf24@localhost.localdomain
date Sat Nov 11 01:16:40 2006 +0000 (2006-11-11)
parents e821c15b7cfe
children fead92ec6b2d
files tools/firmware/vmxassist/vm86.c
line diff
     1.1 --- a/tools/firmware/vmxassist/vm86.c	Fri Nov 10 18:27:35 2006 +0000
     1.2 +++ b/tools/firmware/vmxassist/vm86.c	Sat Nov 11 01:16:40 2006 +0000
     1.3 @@ -829,15 +829,33 @@ mov_to_seg(struct regs *regs, unsigned p
     1.4  		goto fail;
     1.5  
     1.6  	switch ((modrm & 0x38) >> 3) {
     1.7 +	case 0: /* es */
     1.8 +		regs->ves = getreg16(regs, modrm);
     1.9 +		saved_rm_regs.ves = 0;
    1.10 +		oldctx.es_sel = regs->ves;
    1.11 +		return 1;
    1.12 +
    1.13 +	/* case 1: cs */
    1.14 +
    1.15 +	case 2: /* ss */
    1.16 +		regs->uss = getreg16(regs, modrm);
    1.17 +		saved_rm_regs.uss = 0;
    1.18 +		oldctx.ss_sel = regs->uss;
    1.19 +		return 1;
    1.20  	case 3: /* ds */
    1.21  		regs->vds = getreg16(regs, modrm);
    1.22  		saved_rm_regs.vds = 0;
    1.23  		oldctx.ds_sel = regs->vds;
    1.24  		return 1;
    1.25 -	case 0: /* es */
    1.26 -		regs->ves = getreg16(regs, modrm);
    1.27 -		saved_rm_regs.ves = 0;
    1.28 -		oldctx.es_sel = regs->ves;
    1.29 +	case 4: /* fs */
    1.30 +		regs->vfs = getreg16(regs, modrm);
    1.31 +		saved_rm_regs.vfs = 0;
    1.32 +		oldctx.fs_sel = regs->vfs;
    1.33 +		return 1;
    1.34 +	case 5: /* gs */
    1.35 +		regs->vgs = getreg16(regs, modrm);
    1.36 +		saved_rm_regs.vgs = 0;
    1.37 +		oldctx.gs_sel = regs->vgs;
    1.38  		return 1;
    1.39  	}
    1.40