summaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw
AgeCommit message (Collapse)AuthorFilesLines
2014-02-27s390-ccw.img: Fix sporadic errors with ccw boot image - initialize cssChristian Borntraeger1-2/+1
We have to set the cssid to 0, otherwise the stsch code will return an operand exception without the m bit. In the same way we should set m=0. This case was triggered in some cases during reboot, if for some reason the location of blk_schid.cssid contains 1 and m was 0. Turns out that the qemu elf loader does not zero out the bss section on reboot. The symptom was an dump of the old kernel with several areas overwritten. The bootloader does not register a program check handler, so bios exception jumped back into the old kernel. Lets just use a local struct with a designed initializer. That will guarantee that all other subelements are initialized to 0. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-02-27s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idxChristian Borntraeger1-0/+1
The current code does not initialize next_idx in the virtio ring. As the ccw bios will always use guest memory at a fixed location, this queue might != 0 after a reboot. Lets make the initialization explicit. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-09-20s390/ipl: Fix waiting for virtio processingCornelia Huck2-3/+5
The guest side must not manipulate the index for the used buffers. Instead, remember the state of the used buffer locally and wait until it has moved. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2013-07-29s390/IPL: Allow boot from other ssid than 0Dominik Dingel4-0/+46
We now take the subchannel set id also into account to find the boot device. If we want to use a subchannel set other than the default set 0, we first need to enable the mss facility. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-31s390/ipl: Fix spurious errors in virtioChristian Borntraeger1-0/+5
With the ccw ipl code sometimes an error message like "virtio: trying to map MMIO memory" or "Guest moved used index from %u to %u" appeared. Turns out that the ccw bios did not zero out the vring, which might cause stale values in avail->idx and friends, especially on reboot. Lets zero out the relevant fields. To activate the patch we need to rebuild s390-ccw.img as well. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1369309901-418-1-git-send-email-borntraeger@de.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06S390: BIOS boot from given deviceDominik Dingel2-6/+20
Use the passed device, if there is no device, use the first applicable device. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Get queue config from host.Cornelia Huck2-3/+12
Ask the host about the configuration instead of guessing it. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Rudimentary error checking.Cornelia Huck1-6/+15
Try to handle at least some of the errors that may happen. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Enhance drain_irqs().Cornelia Huck1-2/+11
- Use tpi + tsch to get interrupts. - Return an error if the irb indicates problems. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Detect devices with stsch.Cornelia Huck1-3/+6
stsch is the canonical way to detect devices. As a bonus, we can abort the loop if we get cc 3, and we need to check only the valid devices (dnv set). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Fix compile warning in s390 ccw virtio codeChristian Borntraeger1-1/+3
Lets fix this gcc warning: virtio.c: In function ‘vring_send_buf’: virtio.c:125:35: error: operation on ‘vr->next_idx’ may be undefined [-Werror=sequence-point] Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Take care of the elf->img transitionChristian Borntraeger1-2/+2
We have to call strip with s390-ccw.elf as input and s390-ccw.img as output Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: replace while loop with a disabled wait on s390 biosChristian Borntraeger3-0/+20
dont waste cpu power on an error condition. Lets stop the guest with a disabled wait. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add MakefileAlexander Graf1-0/+26
This patch adds a makefile, so we can build our ccw firmware. Also add the resulting binaries to .gitignore, so that nobody is annoyed they might be in the tree. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add bootmap interpreterAlexander Graf1-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>
2013-04-26S390: ccw firmware: Add glue headerAlexander Graf1-0/+131
Like all great programs, we have to call between different functions in different object files. And all of them need a common ground of defines. Provide a file that provides these defines. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add virtio device driversAlexander Graf3-0/+754
In order to boot, we need to be able to access a virtio-blk device through the CCW bus. Implement support for this. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add sclp outputAlexander Graf2-0/+188
In order to communicate with the user, we need an I/O mechanism that he can read. Implement SCLP ASCII support, which happens to be the default in the s390 ccw machine. This file is missing read support for now. It can only print messages. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add main programAlexander Graf1-0/+56
This C file is the main driving piece of the s390 ccw firmware. It provides a search for a workable block device, sets it as the default to boot off of and boots from it. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add start assemblyAlexander Graf1-0/+16
We want to write most of our code in C, so add a small assembly stub that jumps straight into C code for us to continue booting. Signed-off-by: Alexander Graf <agraf@suse.de>