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
-
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/