file_load.c (c95baf12f5077419db01313ab61c2aac007d40cd) | file_load.c (19031275a5881233b4fc31b7dee68bf0b0758bbc) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* | 1// SPDX-License-Identifier: GPL-2.0-only 2/* |
3 * ppc64 code to implement the kexec_file_load syscall | 3 * powerpc code to implement the kexec_file_load syscall |
4 * 5 * Copyright (C) 2004 Adam Litke (agl@us.ibm.com) 6 * Copyright (C) 2004 IBM Corp. 7 * Copyright (C) 2004,2005 Milton D Miller II, IBM Corporation 8 * Copyright (C) 2005 R Sharada (sharada@in.ibm.com) 9 * Copyright (C) 2006 Mohan Kumar M (mohan@in.ibm.com) 10 * Copyright (C) 2016 IBM Corporation 11 * 12 * Based on kexec-tools' kexec-elf-ppc64.c, fs2dt.c. 13 * Heavily modified for the kernel by 14 * Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>. 15 */ 16 17#include <linux/slab.h> 18#include <linux/kexec.h> 19#include <linux/of_fdt.h> 20#include <linux/libfdt.h> 21#include <asm/ima.h> 22 | 4 * 5 * Copyright (C) 2004 Adam Litke (agl@us.ibm.com) 6 * Copyright (C) 2004 IBM Corp. 7 * Copyright (C) 2004,2005 Milton D Miller II, IBM Corporation 8 * Copyright (C) 2005 R Sharada (sharada@in.ibm.com) 9 * Copyright (C) 2006 Mohan Kumar M (mohan@in.ibm.com) 10 * Copyright (C) 2016 IBM Corporation 11 * 12 * Based on kexec-tools' kexec-elf-ppc64.c, fs2dt.c. 13 * Heavily modified for the kernel by 14 * Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>. 15 */ 16 17#include <linux/slab.h> 18#include <linux/kexec.h> 19#include <linux/of_fdt.h> 20#include <linux/libfdt.h> 21#include <asm/ima.h> 22 |
23#define SLAVE_CODE_SIZE 256 | 23#define SLAVE_CODE_SIZE 256 /* First 0x100 bytes */ |
24 | 24 |
25const struct kexec_file_ops * const kexec_file_loaders[] = { 26 &kexec_elf64_ops, 27 NULL 28}; 29 30int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, 31 unsigned long buf_len) 32{ 33 /* We don't support crash kernels yet. */ 34 if (image->type == KEXEC_TYPE_CRASH) 35 return -EOPNOTSUPP; 36 37 return kexec_image_probe_default(image, buf, buf_len); 38} 39 | |
40/** 41 * setup_purgatory - initialize the purgatory's global variables 42 * @image: kexec image. 43 * @slave_code: Slave code for the purgatory. 44 * @fdt: Flattened device tree for the next kernel. 45 * @kernel_load_addr: Address where the kernel is loaded. 46 * @fdt_load_addr: Address where the flattened device tree is loaded. 47 * --- 207 unchanged lines hidden --- | 25/** 26 * setup_purgatory - initialize the purgatory's global variables 27 * @image: kexec image. 28 * @slave_code: Slave code for the purgatory. 29 * @fdt: Flattened device tree for the next kernel. 30 * @kernel_load_addr: Address where the kernel is loaded. 31 * @fdt_load_addr: Address where the flattened device tree is loaded. 32 * --- 207 unchanged lines hidden --- |