Re: Kernel for P-II on P-I.

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Jul 07 2000 - 02:24:43 EST


On Fri, 7 Jul 2000 08:53:33 +0200 (MEST),
R.E.Wolff@BitWizard.nl (Rogier Wolff) wrote:
>Keith Owens wrote:
>> AFAIK that is caused by gcc using instructions that exist on P-II but
>> not P-I, including instructions like conditional move (CMOVE).
>> Unfortunately those instructions are used everywhere, including in
>> printk. No way to get a message out without detecting the problem in
>> the real mode boot loader and using BIOS I/O.
>
>Knowing this I'd suggest that the few files that are needed to get the
>message out are compiled using the standard Pentium-instructions.

printk() is stored in a buffer until console_init() is called so
everything up to and including console_init() would need -m386[*].
That means all of init/main.c needs -m386 which will really mess up the
bogomips calculation compared to the rest of the kernel. Also printk()
on a serial console needs clean instructions in drivers/char/serial.o.
Memory probing would also have to use -m386, basically all of the init
code and everything it calls has to be -m386.

Working out which files you have to force to a guaranteed code level is
a can of worms. If you really want this check, put it in boot/head.S
and use BIOS I/O.

>The CPU generates an unimplemented instruction trap, right? Would it
>be doable to write a quick and dirty handler for that trap? (That's
>the method I used to get Xinu up and running on the LSI03).

Only if the handler, the IRQ code and all the code it calls is
guaranteed to have clean instructions. 2 cans of worms.

[*] -m386 to guarantee it will run everywhere. You could use -m586 as
    a minimum level on these files when the user specifies P-II or
    higher but you will still have problems with bogomips - this loop
    does not use the same code as that loop.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:20 EST