2 * s390-tools/zipl/include/zipl.h
3 * zSeries Initial Program Loader tool.
5 * Copyright IBM Corp. 2001, 2006.
7 * Author(s): Carsten Otte <cotte@de.ibm.com>
8 * Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
15 #include "zt_common.h"
17 #define ZIPL_MAGIC "zIPL"
18 #define ZIPL_MAGIC_SIZE 4
19 #define DISK_LAYOUT_ID 0x00000001
21 #define ZIPL_STAGE2_LOAD_ADDRESS 0x2000
22 #define ZIPL_STAGE3_ENTRY_ADDRESS 0xa028LL
23 #define DEFAULT_PARMFILE_ADDRESS 0x1000LL
24 #define DEFAULT_STAGE3_ADDRESS 0xa000LL
25 #define DEFAULT_IMAGE_ADDRESS 0x10000LL
26 #define MINIMUM_ADDRESS 0x10000LL
27 #define ADDRESS_LIMIT 0x80000000LL
28 #define UNSPECIFIED_ADDRESS -1ULL
29 #define MAXIMUM_PARMLINE_SIZE 0x1000
30 #define MAXIMUM_STAGE3_SIZE 0x1000
31 #define MAXIMUM_PHYSICAL_BLOCKSIZE 0x1000
33 #define PSW_ADDRESS_MASK 0x000000007fffffffLL
34 #define PSW_LOAD 0x0008000080000000LL
35 #define PSW_DISABLED_WAIT 0x000a000000000000LL
37 #define KERNEL_HEADER_SIZE 65536
38 #define BOOTMAP_FILENAME "bootmap"
39 #define BOOTMAP_TEMPLATE_FILENAME "bootmap_temp.XXXXXX"
41 #define ZIPL_CONF_VAR "ZIPLCONF"
42 #define ZIPL_DEFAULT_CONF "/etc/zipl.conf"
44 #define FSDUMP_IMAGE STRINGIFY(ZFCPDUMP_DIR) "/" STRINGIFY(ZFCPDUMP_IMAGE)
45 #define FSDUMP_RAMDISK STRINGIFY(ZFCPDUMP_DIR) "/" STRINGIFY(ZFCPDUMP_RD)
47 #define MAX_DUMP_VOLUMES 32
49 /* Internal component load address type */
50 typedef uint64_t address_t
;
52 /* Type for address calculations */
53 #define VOID_ADD(ptr, offset) ((void *) (((unsigned long) ptr) + \
54 ((unsigned long) offset)))
56 /* Call a function depending on the value of dry_run and return either the
57 * resulting return code or 0. */
58 #define DRY_RUN_FUNC(x) (dry_run ? 0 : (x))
60 #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
61 #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
64 extern int interactive
;
67 #endif /* not ZIPL_H */