From 32d8f04c11f578633d93bef41a14d440946d335a Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 27 Sep 1996 13:38:02 +0000 Subject: [PATCH] part 2 of the bsdi compat tweak attempt. I believe that BSDI use both lcall 7,0 (ie: ldt slot 0) and lcall 0x87,0 (ldt slot 16, it's shifted three bits to the left). I was fiddling with this so long ago, I don't recall the specifics. --- sys/amd64/amd64/machdep.c | 5 ++++- sys/i386/i386/machdep.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 58c9cf7a672e..20a9a9929b48 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.203 1996/09/10 23:06:58 bde Exp $ + * $Id: machdep.c,v 1.204 1996/09/11 19:53:43 phk Exp $ */ #include "npx.h" @@ -1334,6 +1334,9 @@ init386(first) gdp->gd_p = 1; gdp->gd_hioffset = ((int) &IDTVEC(syscall)) >>16; + /* XXX does this work? */ + ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL]; + /* transfer to user mode */ _ucodesel = LSEL(LUCODE_SEL, SEL_UPL); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 58c9cf7a672e..20a9a9929b48 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.203 1996/09/10 23:06:58 bde Exp $ + * $Id: machdep.c,v 1.204 1996/09/11 19:53:43 phk Exp $ */ #include "npx.h" @@ -1334,6 +1334,9 @@ init386(first) gdp->gd_p = 1; gdp->gd_hioffset = ((int) &IDTVEC(syscall)) >>16; + /* XXX does this work? */ + ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL]; + /* transfer to user mode */ _ucodesel = LSEL(LUCODE_SEL, SEL_UPL);