Skip to contentSkip to conversation

kexec aka linux booting linux

RFC PATCH New Eric W. Biederman 1 participant 1 message Apr 3, 2002

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 kexec aka linux booting linux

I am in the final stages of polishing up my kexec patches before submitting them for inclusion in the kernel. I have come to one last design question. Currently I am reusing the sys_reboot with a different magic number. Is this appropriate or do I want to modify the code so it uses it's own syscall number?

The user space prototype is:

struct kexec_segment {
       void *buf;
       size_t bufsz;
       void *mem;
       size_t memsz;
};

int sys_kexec(void *start, int nr_segments, struct kexec_segment *segments);

For x86 the code places you in 32bit protected mode with paging disabled. Giving trivial access to the first 4GB of memory. All of the registers are initially zeroed except stack pointer which is pointed to a location which is good for a few bytes of storage. The segment registers are all loaded with flat 32bit segments with a base address of 0.

For other architectures a similar interface is possible.

After so many changes and so much time I need to clean up and retest my alpha port. This is the next step. That and cleaning up my user space tools that make use of this.

ftp://download.lnxi.com/pub/src/linux-kernel-patches/kexec/ ftp://download.lnxi.com/pub/src/linux-kernel-patches/kexec/linux-2.5.7.kexec.diff ftp://download.lnxi.com/pub/src/linux-kernel-patches/kexec/linux-2.5.7.kexec.long
http://www.xmission.com/~ebiederm/files/kexec/linux-2.5.7.kexec.diff
http://www.xmission.com/~ebiederm/files/kexec/linux-2.5.7.kexec.log

Eric