From: "Jason J. Herne" <jjherne@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: pasic@linux.ibm.com, borntraeger@de.ibm.com,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH 10/15] s390-bios: Support for running format-0/1 channel programs
Date: Wed, 9 Jan 2019 15:01:19 -0500 [thread overview]
Message-ID: <18c1ba75-84f6-e928-64a9-ccf5044d92b5@linux.ibm.com> (raw)
In-Reply-To: <20190109193406.616fcf66.cohuck@redhat.com>
On 1/9/19 1:34 PM, Cornelia Huck wrote:
> On Wed, 9 Jan 2019 13:10:26 -0500
> "Jason J. Herne" <jjherne@linux.ibm.com> wrote:
>
>> On 1/7/19 2:02 PM, Jason J. Herne wrote:
>>>>> +
>>>>> /*
>>>>> * sense-id response buffer layout
>>>>> */
>>>>> @@ -205,6 +265,61 @@ typedef struct senseid {
>>>>> struct ciw ciw[62];
>>>>> } __attribute__ ((packed, aligned(4))) SenseId;
>>>>> +/* architected values for first sense byte */
>>>>> +#define SNS0_CMD_REJECT 0x80
>>>>> +#define SNS0_INTERVENTION_REQ 0x40
>>>>> +#define SNS0_BUS_OUT_CHECK 0x20
>>>>> +#define SNS0_EQUIPMENT_CHECK 0x10
>>>>> +#define SNS0_DATA_CHECK 0x08
>>>>> +#define SNS0_OVERRUN 0x04
>>>>> +#define SNS0_INCOMPL_DOMAIN 0x01
>>>>
>>>> IIRC, only byte 0 is device independent, and the others below are
>>>> (ECKD) dasd specific?
>>>>
>>>>> +
>>>>> +/* architectured values for second sense byte */
>>>>> +#define SNS1_PERM_ERR 0x80
>>>>> +#define SNS1_INV_TRACK_FORMAT 0x40
>>>>> +#define SNS1_EOC 0x20
>>>>> +#define SNS1_MESSAGE_TO_OPER 0x10
>>>>> +#define SNS1_NO_REC_FOUND 0x08
>>>>> +#define SNS1_FILE_PROTECTED 0x04
>>>>> +#define SNS1_WRITE_INHIBITED 0x02
>>>>> +#define SNS1_INPRECISE_END 0x01
>>>>> +
>>>>> +/* architectured values for third sense byte */
>>>>> +#define SNS2_REQ_INH_WRITE 0x80
>>>>> +#define SNS2_CORRECTABLE 0x40
>>>>> +#define SNS2_FIRST_LOG_ERR 0x20
>>>>> +#define SNS2_ENV_DATA_PRESENT 0x10
>>>>> +#define SNS2_INPRECISE_END 0x04
>>>>> +
>>>>> +/* 24-byte Sense fmt/msg codes */
>>>>> +#define SENSE24_FMT_PROG_SYS 0x0
>>>>> +#define SENSE24_FMT_EQUIPMENT 0x2
>>>>> +#define SENSE24_FMT_CONTROLLER 0x3
>>>>> +#define SENSE24_FMT_MISC 0xF
>>>>> +
>>>>> +#define SENSE24_FMT0_MSG_RESET_NOTIFICATION 0x16
>>>>> +
>>>>> +/* basic sense response buffer layout */
>>>>> +typedef struct senseData {
>>>>> + uint8_t status[3];
>>>>> + uint8_t res_count;
>>>>> + uint8_t phys_drive_id;
>>>>> + uint8_t low_cyl_addr;
>>>>> + uint8_t head_high_cyl_addr;
>>>>> + uint8_t fmt_msg;
>>>>> + uint64_t fmt_dependent_info[2];
>>>>> + uint8_t reserved;
>>>>> + uint8_t program_action_code;
>>>>> + uint16_t config_info;
>>>>> + uint8_t mcode_hicyl;
>>>>> + uint8_t cyl_head_addr[3];
>>>>> +} __attribute__ ((packed, aligned(4))) SenseData;
>>>>
>>>> And this looks _really_ dasd specific.
>>>>
>>>
>>> Yep, I glossed over those details while I was furiously tracking down the reset bug. I'll
>>> take a look at redesigning this.
>>
>> All of my information for creating these data structures came from an internal ECKD DASD
>> reference. There are probably some things that could stand a bit of cleanup or renaming.
>> Aside from that, considering this is in a DASD only (ECKD DASD only at the moment) code
>> path are you okay with my renaming the struct to senseDataECKD or something similar?
>
> Renaming this makes sense.
>
>> I'm not sure what value there is in abstracting sense at the moment. I'm not even sure
>> what other device's sense data looks like. Since my description of the SENSE CCW comes
>> from an ECKD reference I have not been able to verify any areas of the data that are
>> common across device types. Thoughts?
>
> There's SA22-7204-01 ("Common I/O Device Commands"), which is from 1992
> (this is what I have on my disk -- is there anything newer?). It
> specifies what bits 0-5 of byte 0 mean and states that bytes 1-31 are
> optional and device-specific.
>
> Maybe some other bits have been specified after 1992, but I have not
> come across documentation for them.
That publication is no longer available. According to my quick research it has been
replaced by an internal only publication. I'll see what I can find.
--
-- Jason J. Herne (jjherne@linux.ibm.com)
next prev parent reply other threads:[~2019-01-09 20:01 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 14:11 [Qemu-devel] [PATCH 00/15] s390: vfio-ccw dasd ipl support Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 01/15] s390 vfio-ccw: Add bootindex property and IPLB data Jason J. Herne
2018-12-12 15:22 ` [Qemu-devel] [qemu-s390x] " Jason J. Herne
2018-12-13 16:48 ` [Qemu-devel] " Cornelia Huck
2018-12-12 14:11 ` [Qemu-devel] [PATCH 02/15] s390-bios: decouple cio setup from virtio Jason J. Herne
2018-12-13 13:14 ` Farhan Ali
2018-12-12 14:11 ` [Qemu-devel] [PATCH 03/15] s390-bios: decouple common boot logic " Jason J. Herne
2018-12-13 13:17 ` Farhan Ali
2018-12-12 14:11 ` [Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio devices Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 05/15] s390-bios: Factor finding boot device out of virtio code path Jason J. Herne
2018-12-13 13:55 ` Farhan Ali
2018-12-12 14:11 ` [Qemu-devel] [PATCH 06/15] s390-bios: Clean up cio.h Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 07/15] s390-bios: Decouple channel i/o logic from virtio Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 08/15] s390-bios: Map low core memory Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 09/15] s390-bios: ptr2u32 and u32toptr Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 10/15] s390-bios: Support for running format-0/1 channel programs Jason J. Herne
2018-12-13 16:54 ` Farhan Ali
2018-12-13 17:21 ` Cornelia Huck
2019-01-07 19:02 ` Jason J. Herne
2019-01-08 11:07 ` Cornelia Huck
2019-01-09 18:10 ` [Qemu-devel] [qemu-s390x] " Jason J. Herne
2019-01-09 18:34 ` Cornelia Huck
2019-01-09 20:01 ` Jason J. Herne [this message]
2019-01-10 12:15 ` Cornelia Huck
2019-01-10 15:02 ` Jason J. Herne
2019-01-10 15:21 ` Cornelia Huck
2019-01-16 15:19 ` Jason J. Herne
2019-01-14 18:44 ` Jason J. Herne
2019-01-15 8:54 ` Cornelia Huck
2018-12-12 14:11 ` [Qemu-devel] [PATCH 11/15] s390-bios: cio error handling Jason J. Herne
2018-12-13 17:11 ` Farhan Ali
2018-12-13 17:26 ` Cornelia Huck
2018-12-12 14:11 ` [Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel programs via cio Jason J. Herne
2018-12-14 13:04 ` Cornelia Huck
2019-01-10 16:12 ` Jason J. Herne
2019-01-10 16:19 ` Cornelia Huck
2018-12-12 14:11 ` [Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine boot method Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 14/15] s390-bios: Add channel command codes/structs needed for dasd-ipl Jason J. Herne
2018-12-12 14:11 ` [Qemu-devel] [PATCH 15/15] s390-bios: Support booting from real dasd device Jason J. Herne
2018-12-12 14:34 ` [Qemu-devel] [PATCH 00/15] s390: vfio-ccw dasd ipl support Cornelia Huck
2018-12-12 14:47 ` Jason J. Herne
2019-01-08 16:37 ` Jason J. Herne
2019-01-08 17:36 ` [Qemu-devel] [qemu-s390x] " Halil Pasic
2019-01-09 9:57 ` Cornelia Huck
2018-12-12 20:28 ` [Qemu-devel] " no-reply
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=18c1ba75-84f6-e928-64a9-ccf5044d92b5@linux.ibm.com \
--to=jjherne@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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).