at v6.19 106 lines 2.9 kB view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * S390 version 4 * Copyright IBM Corp. 1999, 2017 5 */ 6#ifndef _ASM_S390_SETUP_H 7#define _ASM_S390_SETUP_H 8 9#include <linux/bits.h> 10#include <uapi/asm/setup.h> 11#include <linux/build_bug.h> 12 13#define PARMAREA 0x10400 14 15#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE 16 17#define LPP_MAGIC BIT(31) 18#define LPP_PID_MASK _AC(0xffffffff, UL) 19 20/* Offsets to entry points in kernel/head.S */ 21 22#define STARTUP_NORMAL_OFFSET 0x10000 23#define STARTUP_KDUMP_OFFSET 0x10010 24 25#define LEGACY_COMMAND_LINE_SIZE 896 26 27#ifndef __ASSEMBLER__ 28 29#include <asm/lowcore.h> 30#include <asm/types.h> 31 32struct parmarea { 33 unsigned long ipl_device; /* 0x10400 */ 34 unsigned long initrd_start; /* 0x10408 */ 35 unsigned long initrd_size; /* 0x10410 */ 36 unsigned long oldmem_base; /* 0x10418 */ 37 unsigned long oldmem_size; /* 0x10420 */ 38 unsigned long kernel_version; /* 0x10428 */ 39 unsigned long max_command_line_size; /* 0x10430 */ 40 char pad1[0x10480-0x10438]; /* 0x10438 - 0x10480 */ 41 char command_line[COMMAND_LINE_SIZE]; /* 0x10480 */ 42}; 43 44extern char arch_hw_string[128]; 45 46extern struct parmarea parmarea; 47 48extern unsigned int zlib_dfltcc_support; 49#define ZLIB_DFLTCC_DISABLED 0 50#define ZLIB_DFLTCC_FULL 1 51#define ZLIB_DFLTCC_DEFLATE_ONLY 2 52#define ZLIB_DFLTCC_INFLATE_ONLY 3 53#define ZLIB_DFLTCC_FULL_DEBUG 4 54 55extern unsigned long ident_map_size; 56extern unsigned long max_mappable; 57 58/* The Write Back bit position in the physaddr is given by the SLPC PCI */ 59extern unsigned long mio_wb_bit_mask; 60 61/* 62 * Console mode. Override with conmode= 63 */ 64extern unsigned int console_mode; 65extern unsigned int console_devno; 66extern unsigned int console_irq; 67 68#define CONSOLE_IS_UNDEFINED (console_mode == 0) 69#define CONSOLE_IS_SCLP (console_mode == 1) 70#define CONSOLE_IS_3215 (console_mode == 2) 71#define CONSOLE_IS_3270 (console_mode == 3) 72#define CONSOLE_IS_VT220 (console_mode == 4) 73#define CONSOLE_IS_HVC (console_mode == 5) 74#define SET_CONSOLE_SCLP do { console_mode = 1; } while (0) 75#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 76#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 77#define SET_CONSOLE_VT220 do { console_mode = 4; } while (0) 78#define SET_CONSOLE_HVC do { console_mode = 5; } while (0) 79 80void register_early_console(void); 81 82#ifdef CONFIG_VMCP 83void vmcp_cma_reserve(void); 84#else 85static inline void vmcp_cma_reserve(void) { } 86#endif 87 88void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault); 89 90extern void (*_machine_restart)(char *command); 91extern void (*_machine_halt)(void); 92extern void (*_machine_power_off)(void); 93 94struct oldmem_data { 95 unsigned long start; 96 unsigned long size; 97}; 98extern struct oldmem_data oldmem_data; 99 100static __always_inline u32 gen_lpswe(unsigned long addr) 101{ 102 BUILD_BUG_ON(addr > 0xfff); 103 return 0xb2b20000 | addr; 104} 105#endif /* __ASSEMBLER__ */ 106#endif /* _ASM_S390_SETUP_H */