From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <20100911070236.GB4113@fangle.proxima.alt.za> <20100911071423.GC4113@fangle.proxima.alt.za> <20100911171823.GE4113@fangle.proxima.alt.za> <20100911173801.GF4113@fangle.proxima.alt.za> <20100911181409.GG4113@fangle.proxima.alt.za> Date: Sat, 11 Sep 2010 13:25:03 -0700 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Cc: lucio@proxima.alt.za Subject: Re: [9fans] 9VX failure Topicbox-Message-UUID: 547d57c0-ead6-11e9-9d60-3106f5b1d025 hg diff diff -r c7e9b5edb8d4 src/9vx/main.c --- a/src/9vx/main.c Sun Dec 27 09:49:22 2009 -0800 +++ b/src/9vx/main.c Fri Sep 03 16:58:16 2010 +0100 @@ -55,6 +55,7 @@ static void bootinit(void); static void siginit(void); +static void machkeyinit(void); static char* getuser(void); static char* findroot(void); @@ -80,6 +81,9 @@ char buf[1024]; Here you go, thanks Charles! ron /* Minimal set up to make print work. */ +#ifndef TLS + machkeyinit(); +#endif setmach(&mach0); coherence = nop; quotefmtinstall(); @@ -695,9 +699,6 @@ void mach0init(void) { -#ifndef TLS - machkeyinit(); -#endif conf.nmach = 1; machinit(); /* common per-processor init */ diff -r c7e9b5edb8d4 src/9vx/sched.c --- a/src/9vx/sched.c Sun Dec 27 09:49:22 2009 -0800 +++ b/src/9vx/sched.c Fri Sep 03 16:58:16 2010 +0100 @@ -158,6 +158,8 @@ m->machno, p->pid, p->text, kprocq.n, nrunproc); unlock(&kprocq.lk); punlock(&run); + while(p->mach != nil) + sched_yield(); return p; } diff -r c7e9b5edb8d4 src/Makefrag --- a/src/Makefrag Sun Dec 27 09:49:22 2009 -0800 +++ b/src/Makefrag Fri Sep 03 16:58:16 2010 +0100 @@ -1,7 +1,7 @@ # Main top-level makefile fragment for the vx32 virtual machine. # Compiler flags common to both host and VX32 environment files. -COMMON_CFLAGS = -g -O3 -MD -std=gnu99 -I. $(CFLAGS) +COMMON_CFLAGS = -g -O2 -MD -std=gnu99 -I. -fno-stack-protector $(CFLAGS) #COMMON_CFLAGS = -g -MD -std=gnu99 -I. $(CFLAGS) COMMON_LDFLAGS = -g -L. $(LDFLAGS) diff -r c7e9b5edb8d4 src/libvx32/run32.S --- a/src/libvx32/run32.S Sun Dec 27 09:49:22 2009 -0800 +++ b/src/libvx32/run32.S Fri Sep 03 16:58:16 2010 +0100 @@ -111,6 +111,7 @@ popl %edi popl %esi popl %ebx + cld ret @@ -128,6 +129,8 @@ // (DS/ES/SS were already restored by vxrun_return.) movw VXEMU_HOST_VS(%eax),VSEG + cld + ret // Don't put anything here!