diff options
author | Geoff Levand <geoff@infradead.org> | 2016-09-21 18:14:25 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2016-09-29 09:36:56 +0200 |
commit | 522df5f7217fda01ece3f6ac3e9987b0320c2bb0 (patch) | |
tree | 5886c37cd98e07de434cddc6c8d90fa6d9f13c9f /kexec/arch/arm64/kexec-image-arm64.c | |
parent | 217bcc00c9309416a6c6cd0584196559d28a9259 (diff) |
arm64: Add arm64 kexec support
Add kexec reboot support for ARM64 platforms.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Tested-By: Pratyush Anand <panand@redhat.com>
Tested-By: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/arm64/kexec-image-arm64.c')
-rw-r--r-- | kexec/arch/arm64/kexec-image-arm64.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c new file mode 100644 index 0000000..42d2ea7 --- /dev/null +++ b/kexec/arch/arm64/kexec-image-arm64.c @@ -0,0 +1,41 @@ +/* + * ARM64 kexec binary image support. + */ + +#define _GNU_SOURCE +#include "kexec-arm64.h" + +int image_arm64_probe(const char *kernel_buf, off_t kernel_size) +{ + const struct arm64_image_header *h; + + if (kernel_size < sizeof(struct arm64_image_header)) { + dbgprintf("%s: No arm64 image header.\n", __func__); + return -1; + } + + h = (const struct arm64_image_header *)(kernel_buf); + + if (!arm64_header_check_magic(h)) { + dbgprintf("%s: Bad arm64 image header.\n", __func__); + return -1; + } + + fprintf(stderr, "kexec: ARM64 binary image files are currently NOT SUPPORTED.\n"); + return -1; +} + +int image_arm64_load(int argc, char **argv, const char *kernel_buf, + off_t kernel_size, struct kexec_info *info) +{ + return -1; +} + +void image_arm64_usage(void) +{ + printf( +" An ARM64 binary image, compressed or not, big or little endian.\n" +" Typically an Image, Image.gz or Image.lzma file.\n\n"); + printf( +" ARM64 binary image files are currently NOT SUPPORTED.\n\n"); +} |