From nobody Mon Nov 10 12:49:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556199567; cv=none; d=zoho.com; s=zohoarc; b=dfqoRQ+52boFa4lbbYAivPWk2j8aH7P4ea+dg1rsViPZE05YFlRER2H4kADj1BROC8pVQNqiUa6eQ+4O3V0xeDNRQc7Q/39kJYjnVoOGyHIZP7okIyzYYxNS9vwoSzVXPGwcwIeRaz4aNV7bybFlPDMUzIV1QIIPSN5XaBi5FqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556199567; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=7w87epcwPw6OZI12rlzJW28AWhE2S8WILAroUjnHBkU=; b=T4C9B3kiBZQc0MpL1WSzZ4FHxt6LdetueblIDWWHVyWql+qtboBpb/ex71GaP5ay6GSsFpJsHRkzRk7g3G6IxCN2M5btN3oqqtHKZKIqMZsawVk3A4yKKSYzcVrfCLTDf6Q1WKo/VagUIN8oaqNcZQP5R+yVhbzJiFPm+qM6F8Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556199567612515.069481307673; Thu, 25 Apr 2019 06:39:27 -0700 (PDT) Received: from localhost ([127.0.0.1]:57342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJeax-0000bW-DN for importer@patchew.org; Thu, 25 Apr 2019 09:39:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJeKH-0003Wf-5D for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJeKG-0003uB-63 for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:22:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJeKF-0003tX-To; Thu, 25 Apr 2019 09:22:08 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CD253158793; Thu, 25 Apr 2019 13:22:07 +0000 (UTC) Received: from localhost (dhcp-192-187.str.redhat.com [10.33.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB5B35D70A; Thu, 25 Apr 2019 13:22:06 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Date: Thu, 25 Apr 2019 15:21:29 +0200 Message-Id: <20190425132134.2839-15-cohuck@redhat.com> In-Reply-To: <20190425132134.2839-1-cohuck@redhat.com> References: <20190425132134.2839-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 25 Apr 2019 13:22:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 14/19] s390-bios: Add channel command codes/structs needed for dasd-ipl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason J. Herne" , qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Jason J. Herne" The dasd IPL procedure needs to execute a few previously unused channel commands. Let's define them and their associated data structures. Signed-off-by: Jason J. Herne Acked-by: Cornelia Huck Acked-by: Thomas Huth Message-Id: <1554388475-18329-15-git-send-email-jjherne@linux.ibm.com> Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/cio.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pc-bios/s390-ccw/cio.h b/pc-bios/s390-ccw/cio.h index 1637e32070f3..aaa432deddb9 100644 --- a/pc-bios/s390-ccw/cio.h +++ b/pc-bios/s390-ccw/cio.h @@ -200,11 +200,14 @@ typedef struct ccw1 { #define CCW_FLAG_IDA 0x04 #define CCW_FLAG_SUSPEND 0x02 =20 +/* Common CCW commands */ +#define CCW_CMD_READ_IPL 0x02 #define CCW_CMD_NOOP 0x03 #define CCW_CMD_BASIC_SENSE 0x04 #define CCW_CMD_TIC 0x08 #define CCW_CMD_SENSE_ID 0xe4 =20 +/* Virtio CCW commands */ #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 #define CCW_CMD_READ_FEAT 0x12 @@ -216,6 +219,12 @@ typedef struct ccw1 { #define CCW_CMD_SET_CONF_IND 0x53 #define CCW_CMD_READ_VQ_CONF 0x32 =20 +/* DASD CCW commands */ +#define CCW_CMD_DASD_READ 0x06 +#define CCW_CMD_DASD_SEEK 0x07 +#define CCW_CMD_DASD_SEARCH_ID_EQ 0x31 +#define CCW_CMD_DASD_READ_MT 0x86 + /* * Command-mode operation request block */ @@ -333,6 +342,20 @@ typedef struct irb { __u32 emw[8]; } __attribute__ ((packed, aligned(4))) Irb; =20 +/* Used for SEEK ccw commands */ +typedef struct CcwSeekData { + uint16_t reserved; + uint16_t cyl; + uint16_t head; +} __attribute__((packed)) CcwSeekData; + +/* Used for SEARCH ID ccw commands */ +typedef struct CcwSearchIdData { + uint16_t cyl; + uint16_t head; + uint8_t record; +} __attribute__((packed)) CcwSearchIdData; + int enable_mss_facility(void); void enable_subchannel(SubChannelId schid); uint16_t cu_type(SubChannelId schid); --=20 2.17.2