2008-12-17 09:03:38

by Rogier Wolff

[permalink] [raw]
Subject: FPU emulation broken in 2.6.28-rc8 ?


Hi,

I'm getting messages similar to:

FPU emulator: unknown prefix byte 0x00,
FPU emulator: probably due to self-modifying code (emulation impossible)
FPU ........: internal error type 0x0126
At 00000017:0000
SW: b=1 st=0 es=1 sf=1 cc=0010 ef=111111
CW: ic=0 rc=00 pc=11 ien=0 ef=111111


(I cut-pasted the above from something I found on google, relating
to 2.4.7, where the FPU emulator was fixedin 2.4.8.
In my case "internal error" was 126, just like in '2001, In
my case I have "at 17:0", wwhereas in '01 it was reported "at
23:206". And the formatting changed a bit, which I corrected.
I don't have all the different flags available. If this doesn't
provide enough hints, I'll have to figure those out fro you again.

I'm trying to set up a thin client, which runs on a geode, which
apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
"fpu", what does THAT mean?)

Oh, it seems as if some "state" is involved. booting init=/bin/bash
works, but allowing the system to boot a bit further leads to the
login shell (/bin/bash) getting killed due to the FPU emulator
problem....

Roger.

--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ


2008-12-17 20:32:39

by Rogier Wolff

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?


Hi,

It took me a while to admit to this possiblity, but indeed, it
seems that FPU emulation is broken again. It's happened two times
before. 2.6.27 is NOT affected.

Roger.

On Wed, Dec 17, 2008 at 09:56:20AM +0100, Rogier Wolff wrote:
> I'm getting messages similar to:
>
> FPU emulator: unknown prefix byte 0x00,
> FPU emulator: probably due to self-modifying code (emulation impossible)
> FPU ........: internal error type 0x0126
> At 00000017:0000
> SW: b=1 st=0 es=1 sf=1 cc=0010 ef=111111
> CW: ic=0 rc=00 pc=11 ien=0 ef=111111
>
>
> (I cut-pasted the above from something I found on google, relating
> to 2.4.7, where the FPU emulator was fixedin 2.4.8.
> In my case "internal error" was 126, just like in '2001, In
> my case I have "at 17:0", wwhereas in '01 it was reported "at
> 23:206". And the formatting changed a bit, which I corrected.
> I don't have all the different flags available. If this doesn't
> provide enough hints, I'll have to figure those out fro you again.
>
> I'm trying to set up a thin client, which runs on a geode, which
> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
> "fpu", what does THAT mean?)
>
> Oh, it seems as if some "state" is involved. booting init=/bin/bash
> works, but allowing the system to boot a bit further leads to the
> login shell (/bin/bash) getting killed due to the FPU emulator
> problem....
>
> Roger.
>
> --
> ** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
> ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
> *-- BitWizard writes Linux device drivers for any device you may have! --*
> Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
> Does it sit on the couch all day? Is it unemployed? Please be specific!
> Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ

2008-12-17 22:45:19

by Andi Kleen

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?

Rogier Wolff <[email protected]> writes:
>>
>> I'm trying to set up a thin client, which runs on a geode, which
>> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
>> "fpu", what does THAT mean?)

Geodes all have FPUs to my knowledge.
The only FPU less x87s are 386s and special 486s (and a few emulators)

If the FPU doesn't work on the Geode something else must be broken
(or your CPU is not really a Geode)

-Andi

--
[email protected]

2008-12-17 22:52:33

by Rogier Wolff

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?

On Wed, Dec 17, 2008 at 11:45:39PM +0100, Andi Kleen wrote:
> Rogier Wolff <[email protected]> writes:
> >>
> >> I'm trying to set up a thin client, which runs on a geode, which
> >> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
> >> "fpu", what does THAT mean?)
>
> Geodes all have FPUs to my knowledge.
> The only FPU less x87s are 386s and special 486s (and a few emulators)
>
> If the FPU doesn't work on the Geode something else must be broken
> (or your CPU is not really a Geode)

Although the /proc/cpuinfo file shows the FPU flag, the kernel stops
with "no fpu found, and math emulation not present" if I disable
FP emulation....

chipolata:/etc/X11# cat /proc/cpuinfo
processor : 0
vendor_id : CyrixInstead
cpu family : 5
model : 9
model name : Geode(TM) Integrated Processor by National Semi
stepping : 2
cpu MHz : 299.913
cache size : 16 KB
fdiv_bug : yes
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : no
fpu_exception : no
cpuid level : 2
wp : yes
flags : fpu tsc msr cx8 cmov mmx cxmmx
bogomips : 599.82
clflush size : 32
power management:


Roger.

--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ

2008-12-17 23:21:58

by Andi Kleen

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?

On Wed, Dec 17, 2008 at 11:52:21PM +0100, Rogier Wolff wrote:
> On Wed, Dec 17, 2008 at 11:45:39PM +0100, Andi Kleen wrote:
> > Rogier Wolff <[email protected]> writes:
> > >>
> > >> I'm trying to set up a thin client, which runs on a geode, which
> > >> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
> > >> "fpu", what does THAT mean?)
> >
> > Geodes all have FPUs to my knowledge.
> > The only FPU less x87s are 386s and special 486s (and a few emulators)
> >
> > If the FPU doesn't work on the Geode something else must be broken
> > (or your CPU is not really a Geode)
>
> Although the /proc/cpuinfo file shows the FPU flag, the kernel stops
> with "no fpu found, and math emulation not present" if I disable
> FP emulation....

As I said then the problem is likely with the FPU check.

That said I don't doubt that FPU emulation might have broken
again (that is because hardly anyone uses it), just that fixing
it is not the real fix for your problem.

-Andi

2008-12-17 23:25:58

by Jesper Juhl

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?

On Wed, 17 Dec 2008, Rogier Wolff wrote:

> On Wed, Dec 17, 2008 at 11:45:39PM +0100, Andi Kleen wrote:
> > Rogier Wolff <[email protected]> writes:
> > >>
> > >> I'm trying to set up a thin client, which runs on a geode, which
> > >> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
> > >> "fpu", what does THAT mean?)
> >
> > Geodes all have FPUs to my knowledge.
> > The only FPU less x87s are 386s and special 486s (and a few emulators)
> >
> > If the FPU doesn't work on the Geode something else must be broken
> > (or your CPU is not really a Geode)
>
> Although the /proc/cpuinfo file shows the FPU flag, the kernel stops
> with "no fpu found, and math emulation not present" if I disable
> FP emulation....
>
> chipolata:/etc/X11# cat /proc/cpuinfo
> processor : 0
> vendor_id : CyrixInstead
> cpu family : 5
> model : 9
> model name : Geode(TM) Integrated Processor by National Semi
> stepping : 2
> cpu MHz : 299.913
> cache size : 16 KB
> fdiv_bug : yes
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : no
> fpu_exception : no
> cpuid level : 2
> wp : yes
> flags : fpu tsc msr cx8 cmov mmx cxmmx
> bogomips : 599.82
> clflush size : 32
> power management:
>
I've got a box with a Geode CPU here (although a slightly newer one than
yours) and it works fine without FPU/math emulation.

root@swampdragon:~# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 499.894
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow up
bogomips : 999.78
clflush size : 32
power management:

2008-12-18 08:19:59

by Rogier Wolff

[permalink] [raw]
Subject: Re: FPU emulation broken in 2.6.28-rc8 ?

On Thu, Dec 18, 2008 at 12:33:57AM +0100, Andi Kleen wrote:
> On Wed, Dec 17, 2008 at 11:52:21PM +0100, Rogier Wolff wrote:
> > On Wed, Dec 17, 2008 at 11:45:39PM +0100, Andi Kleen wrote:
> > > Rogier Wolff <[email protected]> writes:
> > > >>
> > > >> I'm trying to set up a thin client, which runs on a geode, which
> > > >> apparently doesn't have a FPU.... (/proc/cpuinfo mentions the flag
> > > >> "fpu", what does THAT mean?)
> > >
> > > Geodes all have FPUs to my knowledge.
> > > The only FPU less x87s are 386s and special 486s (and a few emulators)
> > >
> > > If the FPU doesn't work on the Geode something else must be broken
> > > (or your CPU is not really a Geode)
> >
> > Although the /proc/cpuinfo file shows the FPU flag, the kernel stops
> > with "no fpu found, and math emulation not present" if I disable
> > FP emulation....
>
> As I said then the problem is likely with the FPU check.
>
> That said I don't doubt that FPU emulation might have broken
> again (that is because hardly anyone uses it), just that fixing
> it is not the real fix for your problem.

In the past, I've compiled kernels with math emulation "just in case".
That was in that time that if my with-fpu machine would break down, I
might have to put a motherboard without FPU in there, and I liked the
prospect of being able to boot in such a case.

So, if an FPU is present, the math emulation code should just sit
dormant. Even when the detection then thinks that no FPU is present,
the "illegal instruction" traps that the math emulation is based on
simply should not occur.

But even if the math emulation code is actually active, then it should
simply work, and emulate any FPU instructions without problem.

Roger.

--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ