Linux 2.4.x Kernel Bug - Problem NOT found, but found workaround

DragonK (dragon_krome@yahoo.com)
Fri, 27 Sep 2002 14:58:02 -0700 (PDT)


Hello again,

I followed your suggestion and tried to find where
exactly did the kernel
hang, by using an infinite loop and blinking floppy
LED (sorry, the kbd leds
didn't work, except in DOS).
I ended up in protected mode, in
[arch/i386/kernel/head.S] where I managed
to find a SOLUTION for the problem (HAVEN'T FOUND THE
PROBLEM (I THINK)).

Here is the modification I've made (sorry for not
sending a diff, I've lost the
original file :P )

This is from KERNEL 2.4.18

-------------(
arch/i386/kernel/head.S)------------------------------------
orl %eax,%eax # do we have
processor info as well?
je is486

# movl $1,%eax # Use the CPUID
instruction to get CPU type
# cpuid # <- This CPUID thing
hangs the machine
# With it, there's a
lock, without it, a reboot :(
# I've noticed that this code is the same in 2.2.20
kernel, which works perfectly!!!
# movb %al,%cl # save reg for future
use
# andb $0x0f,%ah # mask processor
family
# movb %ah,X86
# andb $0xf0,%al # mask model
# shrb $4,%al
# movb %al,X86_MODEL
# andb $0x0f,%cl # mask mask revision
# movb %cl,X86_MASK
# movl %edx,X86_CAPABILITY

movb $4, %al #
movb %al, X86_MODEL #
movb $5, %al # Hardcoded the CPUID
results (except edx...)
movb %al, X86 # and... the kernel
works fine!
movb $2, %al #
movb %al, X86_MASK #
is486:
-----------------------------------------------------------------------------

Why is this happening?

Thanks for your support.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/