Project

General

Profile

EWSD SCSI drive emulation » History » Version 4

jolly, 12/03/2023 10:11 AM
Add MO drive support

1 1 laforge
h1. EWSD SCSI drive emulation
2
3
h2. Introduction
4
5
EWSD requires special hard drives. They are approved by Siemens and have special behaviors. What is it what makes them work with EWSD? This document describes how to tweak ZuluSCSI emulator to work with EWSD.
6
7
h2. Firmware quirks
8
9
h3. Check Condition
10
11
The emulation must report “Check Condition” SCSI Status as first response to a command:
12
<pre>
13
root@scsi:~# sg_raw -r 1k /dev/sdd 0x28 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0x01 0x00
14
SCSI Status: Check Condition
15
16
Sense Information:
17
Fixed format, current; Sense key: Unit Attention
18
19
Additional sense: Power on occurred
20
21
Error 6 occurred, no data received
22
</pre>
23 4 jolly
MO drive returns a different Unit attention:
24
<pre>
25
Additional sense: Power on, reset, or bus device reset occurred
26
</pre>
27 1 laforge
It is not enough to enable @EnableUnitAttention = 1@ in @zuluscsi.ini@ on SD card. The firmware must be patched so that the Unit Attention must only be sent once after power on or insert of the SD card. If not, the boot loader will read drive information in an endless loop. This means that once the Unit Attention is sent, the emulation must not send Unit Attention again.
28
29 4 jolly
Depending on the emulated disk type (fixed or MO), the additional sense information must be returned. I don’t know if it is really required, but it is no big deal to emulate that.
30
31 1 laforge
Without it, the EWSD will use wrong block numbers when trying to read the drive. This is obviously because the EWSD did not provide READ CAPACITY command to retrieve proper disk size and block size.
32 4 jolly
33
h3. Request Sense
34
35
After the Check Condition status above, the EWSD controller will request sense information. The 8th byte indicates additional length. It does not work, if the returned length exceeds these 8 bytes plus the indicated additional length. To fix this, the additional length is set to 0x0e (14) and the returned length is set to 22 (8 + 14).
36 1 laforge
37
h3. Status Delay
38
39 2 jolly
The EWSD will not boot, if there is not a delay before SCSI status reply. A delay of 1 ms work. Don’t ask me why!
40 1 laforge
41
h3. PMI on ReadCapacity
42
43
> A PMI bit set to one specifies that the device server return information on the last logical block after that specified in the LOGICAL BLOCK ADDRESS field before a substantial vendor-specific delay in data transfer may be encountered.
44
45
This is obsolete, but without it, EWSD will not accept the drive. (DIAGMDD) Some value, captured from a real hard drive works well: @0x00001053@
46
47 3 jolly
h2. Use ZuluSCSI in EWSD
48 1 laforge
49
* Use exFAT FS to format the SD card. This allows HD images larger than 4 Gig.
50
* Remove D203. (diode connects between Termination pin and +5V) The device will then be power by the BERG connector. Connect 5V and ground to the DEVB’s power supply.
51
* Keep all switches off, especially termination. You don’t want to feed power to the IOPUNI via termination power when the IOPUNI is not powered.
52
* Copy @zuluscsi.ini@ to SD card and enable @Quirks = 10@.
53
* Create a hard disk file @HD0.img@ on the SD card.
54
* If you want to power off ZuluSCSI emulation: Turn PSU of IOPUNI off and then turn PSU of ZuluSCSI off. This prevents from power loss while writing to the SD card.
55
56
h2. Problems
57
58
* SD card must have MBR, not GPT.
59
* If the LED lights long and the emulator stalls, check SCSI cabling and termination. On first read after powering on, it seems ok that the LED light long.
60
* If EWSD show something like read-only when showing files on the drive (DISPFILE): Check if SD card is broken and refuses to write.
61
62
h2. Conclusion
63
64
It is possible to emulate hard drive that is accepted by EWSD using ZuluSCSI with the quirks described in this document.
65
66
There is no special inquiry data stored on the original hard drives, nor there is special firmware used by Siemens. All these quirks are required, due to bugs in the EWSD firmware.
67
68
Patches will be submitted to the GIT repository, to support EWSD without patching firmware.
Add picture from clipboard (Maximum size: 48.8 MB)