mirror of https://github.com/xemu-project/xemu.git
Bugfixes for s390x: set subsystem id in the lowcore when booting from the
s390-ccw bios, and set the channel-program address after I/O completion, when applicable. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJTu++cAAoJEN7Pa5PG8C+vGUQP/3oxPbmoTKxLHM50bODFgt/Y 4hOrq6VkMk5hGl6bUw+XUg0S6rschk6CjlE2jE03uRvPEgazqfcvXOPnQodeewIn smk4L5zBKZyzWdAVElw52f6eB1cWCEVwj+VBXlYarUi09vJHO5zVs3Og5HE4Yj2C s0JVxJJR2N7lzspGaNvRxr5opKIEr/NLNiO3qEpOrPxd2M/FvGd9GP1nmnixatDh eyvesblhDffFu/3yEd5uM7E/Z7KH3SdpAuUH7Zr6lG5Rc8TjhfLoeP95KnHC7QCA vVjKccbaJFfaqlBP6LpJx0rcOJOd+gVnlwnbt6UZAP2DhgsJU4jYBY5VyVLv+RBg SsXFSq27JuPAEvnQ8EmJz+5VMmRuRbd4dAe1+FCPIR9rsbpF643n96HngYMytavX qjB9nLVrBY1bgUm/wS9WDJxwBgi1lUy0QUcU8X7pQiWHma7V+ul2hETw/yhuRSi8 X9gGhOGb0GW8Lzo2o9HsxvGRvCa2bG+BBPZtMljxQ6MtCMZA4SUKqnzuSS+FoL/K I9CsEFO1ax9UQ4NpU9534U0DQlQoRFqh3hT6S6mMHrEmPuokI/jP+LNRXAxPpzb2 VkIbvIelwuRglBOcODciF6HAx96a1OQxEZASZ2QEH/AF1d08RnBOwNfUHbq5aRaO xcq6aTAihXOhQ3vioIrz =BVvp -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20140708' into staging Bugfixes for s390x: set subsystem id in the lowcore when booting from the s390-ccw bios, and set the channel-program address after I/O completion, when applicable. # gpg: Signature made Tue 08 Jul 2014 14:18:20 BST using RSA key ID C6F02FAF # gpg: Can't check signature: public key not found * remotes/cohuck/tags/s390x-20140708: s390x/css: reflect cpa in scsw pc-bios/s390-ccw: update binary pc-bios/s390-ccw: store proper subsystem information word Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
d614cb68da
|
@ -200,6 +200,7 @@ static void sch_handle_halt_func(SubchDev *sch)
|
|||
|
||||
PMCW *p = &sch->curr_status.pmcw;
|
||||
SCSW *s = &sch->curr_status.scsw;
|
||||
hwaddr curr_ccw = sch->channel_prog;
|
||||
int path;
|
||||
|
||||
/* Path management: In our simple css, we always choose the only path. */
|
||||
|
@ -216,6 +217,10 @@ static void sch_handle_halt_func(SubchDev *sch)
|
|||
(s->ctrl & SCSW_ACTL_SUSP))) {
|
||||
s->dstat = SCSW_DSTAT_DEVICE_END;
|
||||
}
|
||||
if ((s->ctrl & (SCSW_ACTL_SUBCH_ACTIVE | SCSW_ACTL_DEVICE_ACTIVE)) ||
|
||||
(s->ctrl & SCSW_ACTL_SUSP)) {
|
||||
s->cpa = curr_ccw + 8;
|
||||
}
|
||||
s->cstat = 0;
|
||||
p->lpum = path;
|
||||
|
||||
|
@ -398,6 +403,7 @@ static void sch_handle_start_func(SubchDev *sch, ORB *orb)
|
|||
s->ctrl |= SCSW_STCTL_PRIMARY | SCSW_STCTL_SECONDARY |
|
||||
SCSW_STCTL_STATUS_PEND;
|
||||
s->dstat = SCSW_DSTAT_CHANNEL_END | SCSW_DSTAT_DEVICE_END;
|
||||
s->cpa = sch->channel_prog + 8;
|
||||
break;
|
||||
case -ENOSYS:
|
||||
/* unsupported command, generate unit check (command reject) */
|
||||
|
@ -408,6 +414,7 @@ static void sch_handle_start_func(SubchDev *sch, ORB *orb)
|
|||
s->ctrl &= ~SCSW_CTRL_MASK_STCTL;
|
||||
s->ctrl |= SCSW_STCTL_PRIMARY | SCSW_STCTL_SECONDARY |
|
||||
SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
|
||||
s->cpa = sch->channel_prog + 8;
|
||||
break;
|
||||
case -EFAULT:
|
||||
/* memory problem, generate channel data check */
|
||||
|
@ -416,6 +423,7 @@ static void sch_handle_start_func(SubchDev *sch, ORB *orb)
|
|||
s->ctrl &= ~SCSW_CTRL_MASK_STCTL;
|
||||
s->ctrl |= SCSW_STCTL_PRIMARY | SCSW_STCTL_SECONDARY |
|
||||
SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
|
||||
s->cpa = sch->channel_prog + 8;
|
||||
break;
|
||||
case -EBUSY:
|
||||
/* subchannel busy, generate deferred cc 1 */
|
||||
|
@ -436,6 +444,7 @@ static void sch_handle_start_func(SubchDev *sch, ORB *orb)
|
|||
s->ctrl &= ~SCSW_CTRL_MASK_STCTL;
|
||||
s->ctrl |= SCSW_STCTL_PRIMARY | SCSW_STCTL_SECONDARY |
|
||||
SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
|
||||
s->cpa = sch->channel_prog + 8;
|
||||
break;
|
||||
}
|
||||
} while (ret == -EAGAIN);
|
||||
|
|
Binary file not shown.
|
@ -51,6 +51,8 @@ static void jump_to_IPL_2(void)
|
|||
|
||||
static void jump_to_IPL_code(uint64_t address)
|
||||
{
|
||||
/* store the subsystem information _after_ the bootmap was loaded */
|
||||
write_subsystem_identification();
|
||||
/*
|
||||
* The IPL PSW is at address 0. We also must not overwrite the
|
||||
* content of non-BIOS memory after we loaded the guest, so we
|
||||
|
|
|
@ -13,6 +13,22 @@
|
|||
|
||||
char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
|
||||
uint64_t boot_value;
|
||||
struct subchannel_id blk_schid = { .one = 1 };
|
||||
|
||||
/*
|
||||
* Priniciples of Operations (SA22-7832-09) chapter 17 requires that
|
||||
* a subsystem-identification is at 184-187 and bytes 188-191 are zero
|
||||
* after list-directed-IPL and ccw-IPL.
|
||||
*/
|
||||
void write_subsystem_identification(void)
|
||||
{
|
||||
struct subchannel_id *schid = (struct subchannel_id *) 184;
|
||||
uint32_t *zeroes = (uint32_t *) 188;
|
||||
|
||||
*schid = blk_schid;
|
||||
*zeroes = 0;
|
||||
}
|
||||
|
||||
|
||||
void virtio_panic(const char *string)
|
||||
{
|
||||
|
@ -23,7 +39,6 @@ void virtio_panic(const char *string)
|
|||
|
||||
static void virtio_setup(uint64_t dev_info)
|
||||
{
|
||||
struct subchannel_id blk_schid = { .one = 1 };
|
||||
struct schib schib;
|
||||
int i;
|
||||
int r;
|
||||
|
|
|
@ -50,6 +50,7 @@ void disabled_wait(void);
|
|||
|
||||
/* main.c */
|
||||
void virtio_panic(const char *string);
|
||||
void write_subsystem_identification(void);
|
||||
|
||||
/* sclp-ascii.c */
|
||||
void sclp_print(const char *string);
|
||||
|
|
Loading…
Reference in New Issue