summaryrefslogtreecommitdiffstats
path: root/pc-bios/s390-ccw/bootmap.c
Commit message (Collapse)AuthorAgeFilesLines
* pc-bios/s390-ccw: fix sparse warningsChristian Borntraeger2015-02-031-2/+2
| | | | | | | Fix some sparse warnings in the s390-ccw bios. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: Do proper console setupChristian Borntraeger2014-09-011-5/+5
| | | | | | | | | | | The final newline/return must happen before we reset the sclp via diag 308. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* pc-bios/s390-ccw: IPL from DASD with format variationsEugene (jno) Dvurechenski2014-09-011-23/+29
| | | | | | | | | | | | | | | | | | | | | | | | | There are two known cases of DASD format where signatures are incomplete or absent: 1. result of <dasdfmt -d ldl -L ...> (ECKD_LDL_UNLABELED) 2. CDL with zero keys in IPL1 and IPL2 records Now the code attempts to 1. find zIPL and use SCSI layout 2. find IPL1 and use CDL layout 3. find CMS1 and use LDL layout 3. find LNX1 and use LDL layout 4. find zIPL and use unlabeled LDL layout 5. find zIPL and use CDL layout 6. die in this sequence. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* pc-bios/s390-ccw Really big EAV ECKD DASD handlingEugene (jno) Dvurechenski2014-09-011-16/+15
| | | | | | | | | | | | | For EAV ECKD DASD, the cylinder count will have the magic value 0xfffeU. Therefore, use the block number to test for valid eckd addresses instead. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* pc-bios/s390-ccw Improve ECKD informational messageEugene (jno) Dvurechenski2014-09-011-2/+20
| | | | | | | | | | | Add block size display to ECKD scheme report. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* pc-bios/s390-ccw: store proper subsystem information wordChristian Borntraeger2014-07-081-0/+2
| | | | | | | | | | | | POP chapter 17 requires to store a subsystem information word at 184 during IPL. Furthermore bytes 188-191 should be zero. The bootmap might contain data blocks that are written to the first page. We have to write these values after we processed the bootmap and before the final IPL. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: IPL from LDL/CMS-formatted ECKD DASDEugene (jno) Dvurechenski2014-06-271-7/+85
| | | | | | | | | | Add code that allows us to start from two further ECKD DASD disk layouts: LDL (Linux disk layout) and CMS (cms-formatted disk). Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: IPL from CDL-formatted ECKD DASDEugene (jno) Dvurechenski2014-06-271-0/+168
| | | | | | | | | | | Add code that allows us to start from ECKD DASD using the z/OS compatible disk layout (CDL), which is the most common format for ECKD DASD. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: factor out ipl codeEugene (jno) Dvurechenski2014-06-271-38/+45
| | | | | | | | | | | Move the scsi-disk specific ipl code from zipl_load() into a new function ipl_scsi(). This makes it easier to add ipl routines for other disk types. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: Unify error handlingEugene (jno) Dvurechenski2014-06-271-61/+21
| | | | | | | | | Convert to IPL_assert and friends Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: add some utility codeEugene (jno) Dvurechenski2014-06-271-14/+1
| | | | | | | | | | | | IPL_assert(term,message) is introduced to handle error conditions. ebcdic_to_ascii() to convert chars (mostly to print VOLSERs). read_block() provision for unified block-number handling. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: handle different sector sizesEugene (jno) Dvurechenski2014-06-271-5/+7
| | | | | | | | | | | Use the virtio device's configuration to figure out the disk geometry and use a sector size based upon the layout. [CH: s/SECTOR_SIZE/MAX_SECTOR_SIZE/g] Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: cleanup and enhance bootmap defintionsEugene (jno) Dvurechenski2014-06-271-51/+15
| | | | | | | | | | | Add declarations to describe structure of different dasd IPL sources (eckd and fba). Move the structure definitions to a new header bootmap.h. While we are at it, change structs to typedefs. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: make checkpatch happyEugene (jno) Dvurechenski2014-06-271-17/+20
| | | | | | | | | Remove tabs, tweak whitespace and comments. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: fix for fragmented SCSI bootmapEugene (jno) Dvurechenski2014-06-231-0/+27
| | | | | | | | | | | | | | | We need to interpret the last entry of the bootmap with zero block count as "continuation pointer". The "last entry" is being detected by pre-filling of the scratch space with known values and respective look-ahead. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* pc-bios/s390-ccw: do a subsystem reset before running the guestChristian Borntraeger2014-06-231-8/+47
| | | | | | | | | | | | | | The loader BIOS has already activated several devices. Let's do a subsystem reset before jumping into the guest. As there is no direct way of doing so, we use diagnose 308 to bring the system in a defined state. This is similar to what kdump on s390 uses. We have to define a small trampoline function that restores the low bytes to whatever the bootmap has written there. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* S390: ccw firmware: Add bootmap interpreterAlexander Graf2013-04-261-0/+235
On s390, there is an architected boot map format that we can read to boot a certain entry off the disk. Implement a simple reader for this that always boots the first (default) entry. Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud