s390x: support for LOADPARM
cover s390x: support for LOADPARM
This patchset implements the LOADPARM machine property. This is exposed via SCLP and diagnose 308 to the guest. It will be used by the bios to select a boot entry; guest operating systems can use it as well.
Cornelia Huck (1):
pc-bios/s390-ccw.img: update image
Eugene (jno) Dvurechenski (2):
pc-bios/s390-ccw: Make ebcdic/ascii conversion public pc-bios/s390-ccw: add boot entry selection to El Torito routine
Farhan Ali (8):
hw/s390x: provide loadparm property for the machine hw/s390x/ipl: enable LOADPARM in IPIB for a boot device hw/s390x/sclp: update LOADPARM in SCP Info util/qemu-config: Add loadparm to qemu machine_opts pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info pc-bios/s390-ccw: provide a function to interpret LOADPARM value pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk pc-bios/s390-ccw: add boot entry selection for ECKD DASD
hw/s390x/ipl.c | 31 ++++++++++++++++++++++--
hw/s390x/ipl.h | 3 +++
hw/s390x/s390-virtio-ccw.c | 37 +++++++++++++++++++++++++++++
hw/s390x/sclp.c | 9 +++++++
include/hw/s390x/s390-virtio-ccw.h | 1 +
pc-bios/s390-ccw.img | Bin 26456 -> 26472 bytes
pc-bios/s390-ccw/Makefile | 2 +-
pc-bios/s390-ccw/bootmap.c | 34 +++++++++++++++++---------
pc-bios/s390-ccw/bootmap.h | 24 +------------------
pc-bios/s390-ccw/main.c | 38 +++++++++++++++++++++++++++++-
pc-bios/s390-ccw/s390-ccw.h | 17 ++++++++++++-
pc-bios/s390-ccw/{sclp-ascii.c => sclp.c} | 12 ++++++++++
pc-bios/s390-ccw/sclp.h | 2 ++
util/qemu-config.c | 6 +++++
14 files changed, 177 insertions(+), 39 deletions(-)
rename pc-bios/s390-ccw/{sclp-ascii.c => sclp.c} (87%)Signature · 1 line
2.11.0
PATCH 1/11 hw/s390x: provide loadparm property for the machine
From: Farhan Ali <[email protected]>
In order to specify the LOADPARM value one may now add ",loadparm=xxx" parameter to the "-machine s390-ccw-virtio" option.
The property setter will normalize and check the value provided much like the way the HMC does.
The value is stored, but not used at the moment.
Initial patch from Eugene (jno) Dvurechenski.
--- hw/s390x/s390-virtio-ccw.c | 37 +++++++++++++++++++++++++++++++++++++ include/hw/s390x/s390-virtio-ccw.h | 1 + 2 files changed, 38 insertions(+)
hw/s390x/s390-virtio-ccw.c +37 -0
@@ -274,6 +274,36 @@ bool cpu_model_allowed(void)return true; } +static char *machine_get_loadparm (Object *obj,Error **errp) +{ +S390CcwMachineState *ms =S390_CCW_MACHINE (obj); + +return g_memdup (ms->loadparm,sizeof (ms->loadparm)); +} + +static void machine_set_loadparm (Object *obj,const char *val,Error **errp) +{ +S390CcwMachineState *ms =S390_CCW_MACHINE (obj); +int i; + +for (i =0 ; i <sizeof (ms->loadparm) && val[i]; i++) { +uint8_t c =toupper (val[i]);/* mimic HMC */ + +if (('A' <= c && c <='Z' ) || ('0' <= c && c <='9' ) || (c =='.' ) || + (c ==' ' )) { + ms->loadparm[i] = c; + }else { +error_setg (errp,"LOADPARM: invalid character '%c' (ASCII 0x%02x)" , + c, c); +return ; + } + } + +for (; i <sizeof (ms->loadparm); i++) { + ms->loadparm[i] =' ' ;/* pad right with spaces */ + } +} +static inline void s390_machine_initfn (Object *obj) { object_property_add_bool(obj, "aes-key-wrap",
@@ -291,6 +321,13 @@ static inline void s390_machine_initfn(Object *obj)"enable/disable DEA key wrapping using the CPACF wrapping key" , NULL);object_property_set_bool (obj, true,"dea-key-wrap" ,NULL ); +object_property_add_str (obj,"loadparm" , + machine_get_loadparm, machine_set_loadparm,NULL ); +object_property_set_description (obj,"loadparm" , +"Up to 8 chars in set of [A-Za-z0-9. ] (lower case chars converted" +" to upper case) to pass to machine loader, boot manager," +" and guest kernel" , +NULL ); }static const TypeInfo ccw_machine_info = {
include/hw/s390x/s390-virtio-ccw.h +1 -0
@@ -28,6 +28,7 @@ typedef struct S390CcwMachineState {/*< public >*/ bool aes_key_wrap;bool dea_key_wrap; +uint8_t loadparm[8 ]; } S390CcwMachineState; typedef struct S390CcwMachineClass {
Signature · 1 line
2.11.0
PATCH 2/11 hw/s390x/ipl: enable LOADPARM in IPIB for a boot device
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
Insert the LOADPARM value to the IPL Information Parameter Block.
An IPL Information Parameter Block is created when "bootindex" is specified for a device. If a user specifies "loadparm=", then we store the loadparm value in the created IPIB for that boot device.
Initial patch from Eugene (jno) Dvurechenski.
--- hw/s390x/ipl.c | 31 +++++++++++++++++++++++++++++-- hw/s390x/ipl.h | 3 +++ 2 files changed, 32 insertions(+), 2 deletions(-)
hw/s390x/ipl.c +29 -2
@@ -17,8 +17,10 @@#include "cpu.h" #include "elf.h" #include "hw/loader.h" +#include "hw/boards.h" #include "hw/s390x/virtio-ccw.h" #include "hw/s390x/css.h" +#include "hw/s390x/ebcdic.h" #include "ipl.h" #include "qemu/error-report.h"
@@ -243,7 +245,6 @@ static bool s390_gen_initial_iplb(S390IPLState *ipl) ipl->iplb.pbt =S390_IPL_TYPE_CCW ; ipl->iplb.ccw.devno =cpu_to_be16 (ccw_dev->sch->devno); ipl->iplb.ccw.ssid = ccw_dev->sch->ssid &3 ; -return true; }else if (sd) {SCSIBus *bus =scsi_bus_from_device (sd);VirtIOSCSI *vdev =container_of (bus, VirtIOSCSI, bus);
@@ -259,13 +260,39 @@ static bool s390_gen_initial_iplb(S390IPLState *ipl) ipl->iplb.scsi.channel =cpu_to_be16 (sd->channel); ipl->iplb.scsi.devno =cpu_to_be16 (ccw_dev->sch->devno); ipl->iplb.scsi.ssid = ccw_dev->sch->ssid &3 ; -return true; + }else { +return false;/* unknown device */ + } + +if (!s390_ipl_set_loadparm (ipl->iplb.loadparm)) { + ipl->iplb.flags |=DIAG308_FLAGS_LP_VALID ; } +return true; }return false; } +int s390_ipl_set_loadparm (uint8_t *loadparm) +{ +MachineState *machine =MACHINE (qdev_get_machine ()); +char *lp =object_property_get_str (OBJECT (machine),"loadparm" ,NULL ); + +if (lp) { +int i; + +/* lp is an uppercase string without leading/embedded spaces */ +for (i =0 ; i <8 && lp[i]; i++) { + loadparm[i] = ascii2ebcdic[(uint8_t ) lp[i]]; + } + +g_free (lp); +return 0 ; + } + +return -1 ; +} +static int load_netboot_image (Error **errp) {S390IPLState *ipl =get_ipl_device ();
hw/s390x/ipl.h +3 -0
@@ -57,6 +57,8 @@ struct IplBlockQemuScsi { }QEMU_PACKED ;typedef struct IplBlockQemuScsi IplBlockQemuScsi ; +#define DIAG308_FLAGS_LP_VALID 0x80 + union IplParameterBlock { struct { uint32_t len;
@@ -82,6 +84,7 @@ union IplParameterBlock { }QEMU_PACKED ;typedef union IplParameterBlock IplParameterBlock ; +int s390_ipl_set_loadparm (uint8_t *loadparm);void s390_ipl_update_diag308 (IplParameterBlock *iplb);void s390_ipl_prepare_cpu (S390CPU *cpu);IplParameterBlock *s390_ipl_get_iplb (void );
Signature · 1 line
2.11.0
PATCH 3/11 hw/s390x/sclp: update LOADPARM in SCP Info
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
LOADPARM has two copies:
1. in SCP Information Block
2. in IPL Information Parameter Block
So, update SCLP intrinsics now. We always store LOADPARM in SCP information block even if we don't have a valid IPL Information Parameter Block.
Initial patch from Eugene (jno) Dvurechenski.
--- hw/s390x/sclp.c | 9 +++++++++ 1 file changed, 9 insertions(+)
hw/s390x/sclp.c +9 -0
@@ -23,6 +23,7 @@#include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" #include "hw/s390x/s390-pci-bus.h" +#include "hw/s390x/ipl.h" static inline SCLPDevice *get_sclp_device (void ) {
@@ -57,6 +58,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)int cpu_count =0 ;int rnsize, rnmax;int slots =MIN (machine->ram_slots,s390_get_memslot_count (kvm_state)); +IplParameterBlock *ipib =s390_ipl_get_iplb ();CPU_FOREACH (cpu) { cpu_count++;
@@ -129,6 +131,13 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) read_info->rnmax2 =cpu_to_be64 (rnmax); } +if (ipib && ipib->flags &DIAG308_FLAGS_LP_VALID ) { +memcpy (&read_info->loadparm, &ipib->loadparm, +sizeof (read_info->loadparm)); + }else { +s390_ipl_set_loadparm (read_info->loadparm); + } + sccb->h.response_code =cpu_to_be16 (SCLP_RC_NORMAL_READ_COMPLETION ); }
Signature · 1 line
2.11.0
PATCH 4/11 util/qemu-config: Add loadparm to qemu machine_opts
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
Add S390CcwMachineState machine parameter "loadparm" to qemu machine_opts so libvirt can query for it.
--- util/qemu-config.c | 6 ++++++ 1 file changed, 6 insertions(+)
util/qemu-config.c +6 -0
@@ -227,6 +227,12 @@ static QemuOptsList machine_opts = { .name = "dea-key-wrap", .type = QEMU_OPT_BOOL, .help = "enable/disable DEA key wrapping using the CPACF wrapping key", + },{ + .name = "loadparm", + .type = QEMU_OPT_STRING, + .help = "Up to 8 chars in set of [A-Za-z0-9. ](lower case chars" + " converted to upper case) to pass to machine" + " loader, boot manager, and guest kernel", }, {/* End of list */ } }
Signature · 1 line
2.11.0
PATCH 5/11 pc-bios/s390-ccw: Make ebcdic/ascii conversion public
In reply to Cornelia HuckFrom: "Eugene (jno) Dvurechenski" <[email protected]>
Make the ebcdic_to_ascii function public to the rest of the "bios" code, as the volume label is no more the single thing to be converted.
--- pc-bios/s390-ccw/bootmap.h | 22 ---------------------- pc-bios/s390-ccw/main.c | 11 +++++++++++ pc-bios/s390-ccw/s390-ccw.h | 13 +++++++++++++ 3 files changed, 24 insertions(+), 22 deletions(-)
pc-bios/s390-ccw/bootmap.h +0 -22
@@ -264,28 +264,6 @@ typedef enum {/* utility code below */ -static const unsigned char ebc2asc[256 ] = -/* 0123456789abcdef0123456789abcdef */ -"................................" /* 1F */ -"................................" /* 3F */ -" ...........<(+|&.........!$*);." /* 5F first.chr.here.is.real.space */ -"-/.........,%_>?.........`:#@'=\"" /* 7F */ -".abcdefghi.......jklmnopqr......" /* 9F */ -"..stuvwxyz......................" /* BF */ -".ABCDEFGHI.......JKLMNOPQR......" /* DF */ -"..STUVWXYZ......0123456789......" ;/* FF */ - -static inline void ebcdic_to_ascii (const char *src, -char *dst, -unsigned int size) -{ -unsigned int i; -for (i =0 ; i < size; i++) { -unsigned c = src[i]; - dst[i] = ebc2asc[c]; - } -} -static inline void print_volser (const void *volser) {char ascii[8 ];
pc-bios/s390-ccw/main.c +11 -0
@@ -15,6 +15,17 @@ char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));static SubChannelId blk_schid = { .one =1 }; IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE))); +const unsigned char ebc2asc[256 ] = +/* 0123456789abcdef0123456789abcdef */ +"................................" /* 1F */ +"................................" /* 3F */ +" ...........<(+|&.........!$*);." /* 5F first.chr.here.is.real.space */ +"-/.........,%_>?.........`:#@'=\"" /* 7F */ +".abcdefghi.......jklmnopqr......" /* 9F */ +"..stuvwxyz......................" /* BF */ +".ABCDEFGHI.......JKLMNOPQR......" /* DF */ +"..STUVWXYZ......0123456789......" ;/* FF */ +/* * Priniciples of Operations (SA22-7832-09) chapter 17 requires that * a subsystem-identification is at 184-187 and bytes 188-191 are zero
pc-bios/s390-ccw/s390-ccw.h +13 -0
@@ -189,4 +189,17 @@ static inline void IPL_check(bool term, const char *message) } } +extern const unsigned char ebc2asc[256 ]; +static inline void ebcdic_to_ascii (const char *src, +char *dst, +unsigned int size) +{ +unsigned int i; + +for (i =0 ; i < size; i++) { +unsigned c = src[i]; + dst[i] = ebc2asc[c]; + } +} +#endif /* S390_CCW_H */
Signature · 1 line
2.11.0
PATCH 6/11 pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
Obtain the loadparm value stored in SCP Read Info by performing a SCLP Read Info request.
Rename sclp-ascii.c to sclp.c to reflect the changed scope of the file.
---
pc-bios/s390-ccw/Makefile | 2 +-
pc-bios/s390-ccw/s390-ccw.h | 3 ++-
pc-bios/s390-ccw/{sclp-ascii.c => sclp.c} | 12 ++++++++++++
pc-bios/s390-ccw/sclp.h | 2 ++
4 files changed, 17 insertions(+), 2 deletions(-)
rename pc-bios/s390-ccw/{sclp-ascii.c => sclp.c} (87%)pc-bios/s390-ccw/Makefile +1 -1
@@ -9,7 +9,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) .PHONY : all clean build-all -OBJECTS = start.o main.o bootmap.o sclp-ascii.o virtio.o virtio-scsi.o +OBJECTS = start.o main.o bootmap.o sclp.o virtio.o virtio-scsi.o QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
pc-bios/s390-ccw/s390-ccw.h +2 -1
@@ -63,9 +63,10 @@ void panic(const char *string);void write_subsystem_identification (void ); extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE))); -/* sclp-ascii.c */ +/* sclp.c */ void sclp_print (const char *string);void sclp_setup (void ); +void sclp_get_loadparm_ascii (char *loadparm);/* virtio.c */ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,
pc-bios/s390-ccw/sclp.c renamed from pc-bios/s390-ccw/sclp-ascii.c +12 -0
@@ -80,3 +80,15 @@ void sclp_print(const char *str)sclp_service_call (SCLP_CMD_WRITE_EVENT_DATA , sccb); } + +void sclp_get_loadparm_ascii (char *loadparm) +{ + +ReadInfo *sccb = (void *)_sccb; + +memset ((char *)_sccb,0 ,sizeof (ReadInfo)); + sccb->h.length =sizeof (ReadInfo); +if (!sclp_service_call (SCLP_CMDW_READ_SCP_INFO , sccb)) { +ebcdic_to_ascii ((char *) sccb->loadparm, loadparm,8 ); + } +}
pc-bios/s390-ccw/sclp.h +2 -0
@@ -55,6 +55,8 @@ typedef struct ReadInfo {SCCBHeader h;uint16_t rnmax;uint8_t rnsize; +uint8_t reserved[13 ]; +uint8_t loadparm[8 ]; } __attribute__((packed)) ReadInfo; typedef struct SCCB {
Signature · 1 line
2.11.0
PATCH 7/11 pc-bios/s390-ccw: provide a function to interpret LOADPARM value
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
The LOADPARM value is fetched from SCP Read Info, but it's applied only at the phase of bootmap interpretation. So let's read the LOARPARM value and store it. Also provide a parsing function to detect numbers in the LOADPARM which can be used during bootmap interpretation.
Remove a stray whitespace.
Initial patch from Eugene (jno) Dvurechenski.
--- pc-bios/s390-ccw/main.c | 27 ++++++++++++++++++++++++++- pc-bios/s390-ccw/s390-ccw.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/main.c +26 -1
@@ -14,6 +14,7 @@ char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));static SubChannelId blk_schid = { .one =1 }; IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE))); +static char loadparm[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };const unsigned char ebc2asc[256 ] = /* 0123456789abcdef0123456789abcdef */
@@ -40,7 +41,6 @@ void write_subsystem_identification(void) *zeroes =0 ; } -void panic (const char *string) {sclp_print (string);
@@ -48,6 +48,26 @@ void panic(const char *string)while (1 ) { } } +unsigned int get_loadparm_index (void ) +{ +const char *lp = loadparm; +int i; +unsigned int idx =0 ; + +for (i =0 ; i <8 ; i++) { +char c = lp[i]; + +if (c <'0' || c >'9' ) { +break ; + } + + idx *=10 ; + idx += c -'0' ; + } + +return idx; +} +static bool find_dev (Schib *schib,int dev_no) {int i, r;
@@ -84,6 +104,7 @@ static void virtio_setup(void)int ssid;bool found = false;uint16_t dev_no; +char ldp[] ="LOADPARM=[________]\n" ;VDev *vdev =virtio_get_device ();/*
@@ -93,6 +114,10 @@ static void virtio_setup(void)*/ enable_mss_facility (); +sclp_get_loadparm_ascii (loadparm); +memcpy (ldp +10 , loadparm,8 ); +sclp_print (ldp); +if (store_iplb (&iplb)) {switch (iplb.pbt) {case S390_IPL_TYPE_CCW :
pc-bios/s390-ccw/s390-ccw.h +1 -0
@@ -62,6 +62,7 @@ void consume_sclp_int(void);void panic (const char *string);void write_subsystem_identification (void ); extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE))); +unsigned int get_loadparm_index (void );/* sclp.c */ void sclp_print (const char *string);
Signature · 1 line
2.11.0
PATCH 8/11 pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
Fix SCSI bootmap interpreter to make use of any specified entry of the Program Table using the leftmost numeric value from the LOADPARM, if specified.
Initial patch from Eugene (jno) Dvurechenski.
--- pc-bios/s390-ccw/bootmap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
pc-bios/s390-ccw/bootmap.c +6 -5
@@ -444,7 +444,8 @@ static void ipl_scsi(void)uint8_t *ns, *ns_end;int program_table_entries =0 ;const int pte_len =sizeof (ScsiBlockPtr); -ScsiBlockPtr *prog_table_entry; +ScsiBlockPtr *prog_table_entry =NULL ; +unsigned int loadparm =get_loadparm_index ();/* Grab the MBR */ memset (sec,FREE_SPACE_FILLER ,sizeof (sec));
@@ -467,6 +468,7 @@ static void ipl_scsi(void)IPL_assert (magic_match (sec,ZIPL_MAGIC ),"No zIPL magic in PT" ); +debug_print_int ("loadparm index" , loadparm); ns_end = sec +virtio_get_block_size ();for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns += pte_len) { prog_table_entry = (ScsiBlockPtr *)ns;
@@ -475,16 +477,15 @@ static void ipl_scsi(void) } program_table_entries++; +if (program_table_entries == loadparm +1 ) { +break ;/* selected entry found */ + } }debug_print_int ("program table entries" , program_table_entries);IPL_assert (program_table_entries !=0 ,"Empty Program Table" ); -/* Run the default entry */ - - prog_table_entry = (ScsiBlockPtr *)(sec + pte_len); -zipl_run (prog_table_entry);/* no return */ }
Signature · 1 line
2.11.0
PATCH 9/11 pc-bios/s390-ccw: add boot entry selection for ECKD DASD
In reply to Cornelia HuckFrom: Farhan Ali <[email protected]>
1. change a bit definition of ScsiMbr to allow an array of pointers
2. add loadparm fetch to boot script processing
3. apply loadparm index to boot entry selection, if any
Initial patch from Eugene (jno) Dvurechenski.
--- pc-bios/s390-ccw/bootmap.c | 16 +++++++++++----- pc-bios/s390-ccw/bootmap.h | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-)
pc-bios/s390-ccw/bootmap.c +11 -5
@@ -183,15 +183,21 @@ static block_number_t load_eckd_segments(block_number_t blk, uint64_t *address)static void run_eckd_boot_script (block_number_t mbr_block_nr) {int i; +unsigned int loadparm =get_loadparm_index ();block_number_t block_nr;uint64_t address; -ScsiMbr *scsi_mbr = (void *)sec; +ScsiMbr *bte = (void *)sec;/* Eckd bootmap table entry */ BootMapScript *bms = (void *)sec; +debug_print_int ("loadparm" , loadparm); +IPL_assert (loadparm <31 ,"loadparm value greater than" +" maximum number of boot entries allowed" ); +memset (sec,FREE_SPACE_FILLER ,sizeof (sec));read_block (mbr_block_nr, sec,"Cannot read MBR" ); - block_nr =eckd_block_num ((void *)&(scsi_mbr->blockptr)); + block_nr =eckd_block_num ((void *)&(bte->blockptr[loadparm])); +IPL_assert (block_nr !=-1 ,"No Boot Map" );memset (sec,FREE_SPACE_FILLER ,sizeof (sec));read_block (block_nr, sec,"Cannot read Boot Map Script" );
@@ -459,11 +465,11 @@ static void ipl_scsi(void)debug_print_int ("MBR Version" , mbr->version_id);IPL_check (mbr->version_id ==1 ,"Unknown MBR layout version, assuming version 1" ); -debug_print_int ("program table" , mbr->blockptr.blockno); -IPL_assert (mbr->blockptr.blockno,"No Program Table" ); +debug_print_int ("program table" , mbr->blockptr[0 ].blockno); +IPL_assert (mbr->blockptr[0 ].blockno,"No Program Table" );/* Parse the program table */ -read_block (mbr->blockptr.blockno, sec, +read_block (mbr->blockptr[0 ].blockno, sec,"Error reading Program Table" );IPL_assert (magic_match (sec,ZIPL_MAGIC ),"No zIPL magic in PT" );
pc-bios/s390-ccw/bootmap.h +1 -1
@@ -70,7 +70,7 @@ typedef struct ScsiMbr {uint8_t magic[4 ];uint32_t version_id;uint8_t reserved[8 ]; -ScsiBlockPtr blockptr; +ScsiBlockPtr blockptr[]; } __attribute__ ((packed)) ScsiMbr;#define ZIPL_MAGIC "zIPL"
Signature · 1 line
2.11.0
PATCH 10/11 pc-bios/s390-ccw: add boot entry selection to El Torito routine
In reply to Cornelia HuckFrom: "Eugene (jno) Dvurechenski" <[email protected]>
If there is no LOADPARM given or '0' specified, then IPL the first matched entry. Otherwise IPL the matching entry of that number.
--- pc-bios/s390-ccw/bootmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/bootmap.c +6 -1
@@ -655,6 +655,7 @@ static IsoBcSection *find_iso_bc_entry(void)IsoBcEntry *e = (IsoBcEntry *)sec;uint32_t offset =find_iso_bc ();int i; +unsigned int loadparm =get_loadparm_index ();if (!offset) {return NULL ;
@@ -675,7 +676,11 @@ static IsoBcSection *find_iso_bc_entry(void)for (i =1 ; i <ISO_BC_ENTRY_PER_SECTOR ; i++) {if (e[i].id ==ISO_BC_BOOTABLE_SECTION ) {if (is_iso_bc_entry_compatible (&e[i].body.sect)) { -return &e[i].body.sect; +if (loadparm <=1 ) { +/* found, default, or unspecified */ +return &e[i].body.sect; + } + loadparm--; } } }
Signature · 1 line
2.11.0
PATCH 11/11 pc-bios/s390-ccw.img: update image
In reply to Cornelia HuckContains the following commits:
- pc-bios/s390-ccw: Make ebcdic/ascii conversion public
- pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info
- pc-bios/s390-ccw: provide a function to interpret LOADPARM value
- pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk
- pc-bios/s390-ccw: add boot entry selection for ECKD DASD
- pc-bios/s390-ccw: add boot entry selection to El Torito routine
--- pc-bios/s390-ccw.img | Bin 26456 -> 26472 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-ccw.img binary +0 -0
Signature · 1 line
2.11.0