From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: qemu-devel@nongnu.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de
Subject: [Qemu-devel] [PATCH for-2.1 1/3] pc-bios/s390-ccw: store proper subsystem information word
Date: Mon, 7 Jul 2014 15:55:35 +0200 [thread overview]
Message-ID: <1404741337-26666-2-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1404741337-26666-1-git-send-email-cornelia.huck@de.ibm.com>
From: Christian Borntraeger <borntraeger@de.ibm.com>
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/bootmap.c | 2 ++
pc-bios/s390-ccw/main.c | 17 ++++++++++++++++-
pc-bios/s390-ccw/s390-ccw.h | 1 +
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index fa54abb..f175679 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -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
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index dbfb40e..f9ec215 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -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;
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index 959aed0..2b773de 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -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);
--
1.7.9.5
next prev parent reply other threads:[~2014-07-07 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 13:55 [Qemu-devel] [PATCH for-2.1 0/3] s390x: two bugfixes Cornelia Huck
2014-07-07 13:55 ` Cornelia Huck [this message]
2014-07-07 13:55 ` [Qemu-devel] [PATCH for-2.1 2/3] pc-bios/s390-ccw: update binary Cornelia Huck
2014-07-07 13:55 ` [Qemu-devel] [PATCH for-2.1 3/3] s390x/css: reflect cpa in scsw Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404741337-26666-2-git-send-email-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).