From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan9/Bochs/kernel panic In-Reply-To: Your message of "Tue, 11 Nov 2003 09:14:06 EST." From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <81554.1068577245.1@t40.swtch.com> Message-Id: Date: Tue, 11 Nov 2003 14:00:45 -0500 Topicbox-Message-UUID: 87378eb0-eacc-11e9-9e20-41e7f4b1d025 > Beyond that I'm not much help. Math emu means that the kernel > got a floating point exception, which should not happen. I tracked this down. It seems to be a bug in Bochs. Real processors all let us turn off the FPU twice, but if the FPU is already off, then Bochs causes an exception when we "FWAIT" before turning it off again. The Intel manual (I looked at the current online one as well as an old 486 one) is very clear -- FWAIT causes an exception if CR0.EM and CR0.TS are *both* set, whereas Bochs causes an exception if *either* is set. (To be fair, all the other floating point instructions are supposed to cause the exception if *either* is set, so it's not surprising that Bochs got this one exception (no pun intended) wrong.) Russ