diff options
author | Simon Horman <horms@verge.net.au> | 2008-03-17 10:25:43 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-03-18 11:34:44 +0900 |
commit | 3973e307e10c865712ad59b3f609e27f1e2bddfc (patch) | |
tree | b1fbee6624b7763278fd92ab243a9ecee0b37177 /kexec/arch/mips/kexec-mips.h | |
parent | bbe2590b0b03240ff54cb24b563e9a853b6dd4a2 (diff) |
kexec-tools: mips: support big-endian mips (repost)
[ Reposted with correct linux-mips address ]
Hi,
this patch switches the mips support in kexec-tools around a little bit.
All the files and directories containing "mipsel" have been renamed
to contain "mips" instead.
This is kind of consistent with the way that ARCH=mips in the kernel
works for both big and little endian.
After a small amount of tweaking, which is also included in this patch, the
code compiles and works fine for big endian mips as well as small endian
mips. All you need to do is compile using an appropriate compiler.
That is to say, kexec-tools's build system doesn't need to
be told about which endienness the code is being compiled for.
I have added kept mipsel as a supported "architecture" via ./configure,
though its just an alias for mips now. This is consistent with how
other architectures such as sh are treated. But I'm happy to remove
mipsel from ./configure if the mips people want that.
I tested this patch using qemu and the 2.6.24.3 tag of the mips-2.6 git
tree compiled for the qemu machine type for both big and little endian.
The qemu machine type has subsequently been removed, and kexec-tools
needs some work in order to function with qemu - as far as I understand
the way the boot parameters are passed needs to be fixed, likely
in purgatory. However, this is not related to the changes
introduced in this patch.
I intend to merge this patch into kexec-tools-testing if
no alarm bells are sounded.
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/mips/kexec-mips.h')
-rw-r--r-- | kexec/arch/mips/kexec-mips.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kexec/arch/mips/kexec-mips.h b/kexec/arch/mips/kexec-mips.h new file mode 100644 index 0000000..13f82be --- /dev/null +++ b/kexec/arch/mips/kexec-mips.h @@ -0,0 +1,17 @@ +#ifndef KEXEC_MIPS_H +#define KEXEC_MIPS_H + +extern unsigned char setup_simple_start[]; +extern uint32_t setup_simple_size; + +extern struct { + uint32_t spr8; + uint32_t spr9; +} setup_simple_regs; + +int elf_mips_probe(const char *buf, off_t len); +int elf_mips_load(int argc, char **argv, const char *buf, off_t len, + struct kexec_info *info); +void elf_mips_usage(void); + +#endif /* KEXEC_MIPS_H */ |