Files
s390-tools/zipl/include/zipl.h
Eduard Shishkin d6b702d579 zipl/src: add basic support for multiple target base disks
. Modify disk_get_info() to process multiple sets of target parameters
  provided by the helper script and store it in the array of "targets"
  of the structure job_target_data;
. Besides the logical device, maintain an array of physical base disks
  in the disk_info structure;
. Use the logical target device only to create bootmap (it is
  automatically mirrored by the respective linux driver (dm, or md)
  managing the mirrored target). In contrast, install bootstrap blocks
  to each physical base disk individually, bypassing that driver;
. Report in verbose mode on which base disks the bootstrap
  installation was performed;
. Use the following logic of setting @info->device (which is printed
  as "Device...:" in verbose mode):
  . source_auto   - the target base disk is set;
  . source_script - the target (logical) device is set;
  . source_user   - the device specified by user (via --targetbase
                    option), or config file is set.

Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2024-08-26 10:40:21 +02:00

67 lines
1.8 KiB
C

/*
* s390-tools/zipl/include/zipl.h
* zSeries Initial Program Loader tool.
*
* Copyright IBM Corp. 2001, 2017
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*
*/
#ifndef ZIPL_H
#define ZIPL_H
#include <stdint.h>
#include "lib/zt_common.h"
#include "lib/util_base.h"
#include "boot/loaders_layout.h"
#define ADDRESS_LIMIT 0x80000000UL
#define UNSPECIFIED_ADDRESS -1UL
#define LEGACY_MAXIMUM_PARMLINE_SIZE 0x380UL
#define MAXIMUM_PARMLINE_SIZE 0x10000UL
#define MAXIMUM_PHYSICAL_BLOCKSIZE 0x1000UL
#define BOOTMAP_FILENAME "bootmap"
#define BOOTMAP_TEMPLATE_FILENAME "bootmap_temp.XXXXXX"
#define DUMP_TEMP_MOUNT_POINT_NAME "zipl-dump-mount-point-XXXXXX"
#define DEFAULTBOOT_SECTION "defaultboot"
#define ZIPL_CONF_VAR "ZIPLCONF"
#define ZIPL_RUNTIME_CONF "/run/zipl/zipl.conf"
#define ZIPL_DEFAULT_CONF TOOLS_SYSCONFDIR "/zipl.conf"
#define ZIPL_MINIMAL_CONF TOOLS_LIBDIR "/zipl.conf"
#define ZIPL_DEFAULT_BLSDIR "/boot/loader/entries"
#define ZIPL_STAGE3_PATH util_libdir_path("stage3.bin")
#define ZIPL_SIPL_PATH "/sys/firmware/ipl/has_secure"
#define MENU_DEFAULT_PROMPT 0
#define MENU_DEFAULT_TIMEOUT 0
#define MAX_DUMP_VOLUMES 32
#define MAX_TARGETS 32
#define SECURE_BOOT_UNDEFINED -1
#define SECURE_BOOT_DISABLED 0
#define SECURE_BOOT_ENABLED 1
#define SECURE_BOOT_AUTO 2
/* Internal component load address type */
typedef uint64_t address_t;
/* Type for address calculations */
#define VOID_ADD(ptr, offset) ((void *) (((unsigned long) ptr) + \
((unsigned long) offset)))
/* Call a function depending on the value of dry_run and return either the
* resulting return code or 0. */
#define DRY_RUN_FUNC(x) (dry_run ? 0 : (x))
extern int verbose;
extern int interactive;
extern int dry_run;
#endif /* not ZIPL_H */