Re: [CFT] kexec syscall for 2.5.43 (linux booting linux)

Werner Almesberger
2002-10-19T17:12:16Z

Eric W. Biederman wrote:
> Cool. What fails with X11. Fixing it might be as simple as calling
> int 0x10 early in the new image.

The graphic engine (i810) simply doesn't switch back to text mode.
Yes, 0x10 helps. I've attached a little patch that does this in a
relatively safe way. (Alternative, one could also use set_80x25,
but I think always forcing mode 3 is slightly more reliable.
Except for MGA users, of course :-)

If you get a new boot loader type code from Peter Anvin, this
should even be good enough for inclusion into the mainstream
kernel. Alternatively, we could also pick a new loader flag to
indicate that the firmware didn't initialize the system.

> [vmlinux] specifies incorrect physical
> addresses, and it expects to be passed a whole host of strange values,
> in weird places.

I see. Perhaps you could say then that mkelfImage fixes flaws in
the vmlinux ELF image meta-data, or such:

| A kernel reformater is makes images that seem to boot more reliably is at:
| ftp://ftp.lnxi.com/pub/mkelfImage/mkelfImage-1.17.tar.gz

This sounds more like "if I kick it here, it usually works,
but I have no idea why" :-)

And yes, if it's not too intrusive, fixing the ELF meta-data
along with the addition of kexec might be a good idea.

- Werner

---------------------------------- cut here -----------------------------------

--- linux-2.5.44/arch/i386/boot/video.S.orig Sat Oct 19 12:55:14 2002
+++ linux-2.5.44/arch/i386/boot/video.S Sat Oct 19 13:51:19 2002
@@ -148,6 +148,13 @@
cmpb $0x10, %bl # No, it's a CGA/MDA/HGA card.
je basret

+ cmpb $0xff,type_of_loader # are we using kexec ?
+ jne novgareset
+
+ movw $0x3, %ax # reset EGA/VGA to 80x25 text
+ int $0x10
+
+novgareset:
incb adapter
movw $0x1a00, %ax # Check EGA or VGA?
int $0x10

--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/