zipl: add/move some definitions to header files

Make the listed changes which are needed to re-use some definitions
by the new zipl-debug(8) tool introduced by the next patch in the
series:

. Add definitions to boot_defs.h:
   . a named union disk_bloclkptr (instead of the anonymous one);
   . a named structure disk_program_table;
. Remove a 'typedef union disk_blockptr_t' from boot/stage2.h
  (cleanup), use the named union in boot_defs.h instead;
. Move the definition of scsi_layout types and the function
  get_scsi_layout() from install.c to install.h;
. Move definition of PROGRAM_TABLE_BLOCK_SIZE from bootmap.c to
  bootmap.h

Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Eduard Shishkin
2023-03-17 16:23:41 +01:00
committed by Jan Höppner
parent 94e0b644a7
commit 917d611883
10 changed files with 52 additions and 50 deletions

View File

@@ -195,15 +195,25 @@ struct boot_info_bp_dump {
uint8_t unused[16];
} __packed;
/* This represents on-disk pointer to a block on disk */
union disk_blockptr {
struct eckd_blockptr_legacy eckd_legacy;
struct eckd_blockptr eckd;
struct linear_blockptr linear;
};
struct boot_info_bp_ipl {
union {
struct eckd_blockptr_legacy eckd_legacy;
struct eckd_blockptr eckd;
struct linear_blockptr lin;
} bm_ptr;
union disk_blockptr bm_ptr;
uint8_t unused[16];
} __packed;
struct disk_program_table {
uint32_t magic;
uint32_t version;
uint64_t unused;
union disk_blockptr component_table[0];
} __packed;
struct boot_info {
char magic[4];
uint8_t version;