Date: Wed, 11 Jan 2006 07:11:51 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 89493 for review Message-ID: <200601110711.k0B7BpLH051264@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=89493 Change 89493 by kmacy@kmacy:freebsd7_xen3 on 2006/01/11 07:11:09 change control flow in segment setting slightly to remove some ifdefs Affected files ... .. //depot/projects/xen3/src/sys/i386/i386/sys_machdep.c#3 edit Differences ... ==== //depot/projects/xen3/src/sys/i386/i386/sys_machdep.c#3 (text+ko) ==== @@ -170,11 +170,8 @@ */ sd.sd_lobase = base & 0xffffff; sd.sd_hibase = (base >> 24) & 0xff; -#ifndef XEN + sd.sd_lolimit = 0xffff; /* 4GB limit, wraps around */ -#else - sd.sd_lolimit = 0x0; /* 4GB limit, wraps around */ -#endif sd.sd_hilimit = 0xf; sd.sd_type = SDT_MEMRWA; sd.sd_dpl = SEL_UPL; @@ -183,12 +180,14 @@ sd.sd_def32 = 1; sd.sd_gran = 1; critical_enter(); - td->td_pcb->pcb_fsd = sd; #ifndef XEN PCPU_GET(fsgs_gdt)[0] = sd; #else - HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), *(uint64_t *)&sd); + sd.sd_lolimit = 0x0; /* < 4GB limit */ + HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), + *(uint64_t *)&sd); #endif + td->td_pcb->pcb_fsd = sd; critical_exit(); td->td_frame->tf_fs = GSEL(GUFS_SEL, SEL_UPL); } @@ -208,11 +207,8 @@ */ sd.sd_lobase = base & 0xffffff; sd.sd_hibase = (base >> 24) & 0xff; -#ifndef XEN + sd.sd_lolimit = 0xffff; /* 4GB limit, wraps around */ -#else - sd.sd_lolimit = 0x0; /* 4GB limit, wraps around */ -#endif sd.sd_hilimit = 0xf; sd.sd_type = SDT_MEMRWA; sd.sd_dpl = SEL_UPL; @@ -221,12 +217,14 @@ sd.sd_def32 = 1; sd.sd_gran = 1; critical_enter(); - td->td_pcb->pcb_gsd = sd; #ifndef XEN PCPU_GET(fsgs_gdt)[1] = sd; #else - HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), *(uint64_t *)&sd); + sd.sd_lolimit = 0x0; /* 4GB limit, wraps around */ + HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), + *(uint64_t *)&sd); #endif + td->td_pcb->pcb_gsd = sd; critical_exit(); load_gs(GSEL(GUGS_SEL, SEL_UPL)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601110711.k0B7BpLH051264>