Commit 15ceb8c9 authored by Philipp Rudo's avatar Philipp Rudo Committed by Martin Schwidefsky

s390/kexec_file: Prepare setup.h for kexec_file_load

kexec_file_load needs to prepare the new kernels before they are loaded.
For that it has to know the offsets in head.S, e.g. to register the new
command line. Unfortunately there are no macros right now defining those
offsets. Define them now.
Signed-off-by: default avatarPhilipp Rudo <prudo@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 760dd0ee
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
/* /*
* S390 version * S390 version
* Copyright IBM Corp. 1999, 2010 * Copyright IBM Corp. 1999, 2017
*/ */
#ifndef _ASM_S390_SETUP_H #ifndef _ASM_S390_SETUP_H
#define _ASM_S390_SETUP_H #define _ASM_S390_SETUP_H
...@@ -37,17 +37,31 @@ ...@@ -37,17 +37,31 @@
#define LPP_MAGIC _BITUL(31) #define LPP_MAGIC _BITUL(31)
#define LPP_PID_MASK _AC(0xffffffff, UL) #define LPP_PID_MASK _AC(0xffffffff, UL)
/* Offsets to entry points in kernel/head.S */
#define STARTUP_NORMAL_OFFSET 0x10000
#define STARTUP_KDUMP_OFFSET 0x10010
/* Offsets to parameters in kernel/head.S */
#define IPL_DEVICE_OFFSET 0x10400
#define INITRD_START_OFFSET 0x10408
#define INITRD_SIZE_OFFSET 0x10410
#define OLDMEM_BASE_OFFSET 0x10418
#define OLDMEM_SIZE_OFFSET 0x10420
#define COMMAND_LINE_OFFSET 0x10480
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/lowcore.h> #include <asm/lowcore.h>
#include <asm/types.h> #include <asm/types.h>
#define IPL_DEVICE (*(unsigned long *) (0x10400)) #define IPL_DEVICE (*(unsigned long *) (IPL_DEVICE_OFFSET))
#define INITRD_START (*(unsigned long *) (0x10408)) #define INITRD_START (*(unsigned long *) (INITRD_START_OFFSET))
#define INITRD_SIZE (*(unsigned long *) (0x10410)) #define INITRD_SIZE (*(unsigned long *) (INITRD_SIZE_OFFSET))
#define OLDMEM_BASE (*(unsigned long *) (0x10418)) #define OLDMEM_BASE (*(unsigned long *) (OLDMEM_BASE_OFFSET))
#define OLDMEM_SIZE (*(unsigned long *) (0x10420)) #define OLDMEM_SIZE (*(unsigned long *) (OLDMEM_SIZE_OFFSET))
#define COMMAND_LINE ((char *) (0x10480)) #define COMMAND_LINE ((char *) (COMMAND_LINE_OFFSET))
extern int memory_end_set; extern int memory_end_set;
extern unsigned long memory_end; extern unsigned long memory_end;
...@@ -121,12 +135,12 @@ extern void (*_machine_power_off)(void); ...@@ -121,12 +135,12 @@ extern void (*_machine_power_off)(void);
#else /* __ASSEMBLY__ */ #else /* __ASSEMBLY__ */
#define IPL_DEVICE 0x10400 #define IPL_DEVICE (IPL_DEVICE_OFFSET)
#define INITRD_START 0x10408 #define INITRD_START (INITRD_START_OFFSET)
#define INITRD_SIZE 0x10410 #define INITRD_SIZE (INITRD_SIZE_OFFSET)
#define OLDMEM_BASE 0x10418 #define OLDMEM_BASE (OLDMEM_BASE_OFFSET)
#define OLDMEM_SIZE 0x10420 #define OLDMEM_SIZE (OLDMEM_SIZE_OFFSET)
#define COMMAND_LINE 0x10480 #define COMMAND_LINE (COMMAND_LINE_OFFSET)
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_S390_SETUP_H */ #endif /* _ASM_S390_SETUP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment