5 Usage of IOP331 adapter
6 =======================
8 (All In/Out is in IOP331's view)
13 - InitThread message and return code
15 2. Doorbell is used for RS-232 emulation
16 ----------------------------------------
21 zDRIVER DATA WRITE OK)
23 data out has been read
29 (IOP331 DATA WRITE OK)
37 ============ ==========================================
38 offset 0xf00 for RS232 out (request buffer)
39 offset 0xe00 for RS232 in (scratch buffer)
40 offset 0xa00 for inbound message code message_rwbuffer
41 (driver send to IOP331)
42 offset 0xa00 for outbound message code message_rwbuffer
43 (IOP331 send to driver)
44 ============ ==========================================
49 Currently 128 byte buffer is used:
51 ============ =====================
52 1st uint32_t Data length (1--124)
53 Byte 4--127 Max 124 bytes of data
54 ============ =====================
59 All SCSI Command must be sent through postQ:
62 Request frame must be 32 bytes aligned:
67 real address (bit27--bit31) of post arcmsr_cdb
69 ===== ===================
70 bit31 == ===============
74 bit30 == ==============
81 ===== ===================
89 real address (bit27--bit31) of reply arcmsr_cdb
91 ===== =======================================================
92 bit31 must be 0 (for this type of reply)
93 bit30 reserved for BIOS handshake
95 bit28 == ===================================================
96 0 no error, ignore AdapStatus/DevStatus/SenseData
97 1 Error, error code in AdapStatus/DevStatus/SenseData
98 == ===================================================
100 ===== =======================================================
105 All BIOS request is the same with request from PostQ
109 Request frame is sent from configuration space:
111 ============ ==========================
112 offset: 0x78 Request Frame (bit30 == 1)
113 offset: 0x18 writeonly to generate
115 ============ ==========================
117 Completion of request::
119 (bit30 == 0, bit28==err flag)
121 7. Definition of SGL entry (structure)
122 --------------------------------------
124 8. Message1 Out - Diag Status Code (????)
125 -----------------------------------------
127 9. Message0 message code
128 ------------------------
130 ====== =================================================================
133 ->offset 0xa00 :for outbound message code message_rwbuffer
134 (IOP331 send to driver)
136 ===================== ==========================================
137 Signature 0x87974060(4)
138 Request len 0x00000200(4)
139 numbers of queue 0x00000100(4)
140 SDRAM Size 0x00000100(4)-->256 MB
141 IDE Channels 0x00000008(4)
144 FirmVer 16 bytes char
145 Device Map 16 bytes char
146 FirmwareVersion DWORD
148 - Added for checking of
149 new firmware capability
150 ===================== ==========================================
152 ->offset 0xa00 :for inbound message code message_rwbuffer
153 (driver send to IOP331)
155 ========================= ==================
156 Signature 0x87974063(4)
157 UPPER32 of Request Frame (4)-->Driver Only
158 ========================= ==================
159 0x03 Reset (Abort all queued Command)
160 0x04 Stop Background Activity
162 0x06 Start Background Activity
163 (re-start if background is halted)
164 0x07 Check If Host Command Pending
165 (Novell May Need This Function)
166 0x08 Set controller time
167 ->offset 0xa00 for inbound message code message_rwbuffer
170 ====== ==================
171 byte 0 0xaa <-- signature
172 byte 1 0x55 <-- signature
177 byte 6 minute (0..59)
178 byte 7 second (0..59)
179 ====== ==================
180 ====== =================================================================
183 RS-232 Interface for Areca Raid Controller
184 ==========================================
186 The low level command interface is exclusive with VT100 terminal
188 1. Sequence of command execution
189 --------------------------------
192 3 bytes sequence (0x5E, 0x01, 0x61)
195 variable length of data including length,
196 command code, data and checksum byte
199 variable length of data
205 command block length (low byte)
208 command block length (high byte)
210 .. Note:: command block length shouldn't > 2040 bytes,
211 length excludes these two bytes
216 (D) 4th and following bytes
217 variable length data bytes
219 depends on command code
222 checksum byte (sum of 1st byte until last data byte)
224 3. Command code and associated data
225 -----------------------------------
227 The following are command code defined in raid controller Command
228 code 0x10--0x1? are used for system level management,
229 no password checking is needed and should be implemented in separate
230 well controlled utility and not for end user access.
231 Command code 0x20--0x?? always check the password,
232 password must be entered to enable these command::
243 GUI_SET_ETHERNET_ADDR,
248 // GUI_QUICK_CREATE=0x20, (function removed)
254 GUI_MUTE_BEEPER=0x30,
257 GUI_HOST_INTERFACE_MODE,
258 GUI_REBUILD_PRIORITY,
260 GUI_RESET_CONTROLLER,
261 GUI_COM_PORT_SETTING,
264 GUI_CREATE_PASS_THROUGH=0x40,
265 GUI_MODIFY_PASS_THROUGH,
266 GUI_DELETE_PASS_THROUGH,
268 GUI_CREATE_RAIDSET=0x50,
271 GUI_ACTIVATE_RAIDSET,
272 GUI_CREATE_HOT_SPARE,
273 GUI_DELETE_HOT_SPARE,
274 GUI_CREATE_VOLUME=0x60,
277 GUI_START_CHECK_VOLUME,
278 GUI_STOP_CHECK_VOLUME
285 Set the controller serial#
287 ================ =============================================
289 byte 2 command code 0x10
290 byte 3 password length (should be 0x0f)
291 byte 4-0x13 should be "ArEcATecHnoLogY"
292 byte 0x14--0x23 Serial number string (must be 16 bytes)
293 ================ =============================================
296 Set vendor string for the controller
298 ================ =============================================
300 byte 2 command code 0x11
301 byte 3 password length (should be 0x08)
302 byte 4-0x13 should be "ArEcAvAr"
303 byte 0x14--0x3B vendor string (must be 40 bytes)
304 ================ =============================================
307 Set the model name of the controller
309 ================ =============================================
311 byte 2 command code 0x12
312 byte 3 password length (should be 0x08)
313 byte 4-0x13 should be "ArEcAvAr"
314 byte 0x14--0x1B model string (must be 8 bytes)
315 ================ =============================================
320 ================ =============================================
322 byte 2 command code 0x13
323 return "Areca RAID Subsystem "
324 ================ =============================================
329 ================ =============================================
331 byte 2 command code 0x14
332 byte 3 password length
333 byte 4-0x?? user password to be checked
334 ================ =============================================
337 Logout GUI (force password checking on next command)
339 ================ =============================================
341 byte 2 command code 0x15
342 ================ =============================================
345 HTTP interface (reserved for Http proxy service)(0x16)
347 GUI_SET_ETHERNET_ADDR
348 Set the ethernet MAC address
350 ================ =============================================
352 byte 2 command code 0x17
353 byte 3 password length (should be 0x08)
354 byte 4-0x13 should be "ArEcAvAr"
355 byte 0x14--0x19 Ethernet MAC address (must be 6 bytes)
356 ================ =============================================
361 ================ =============================================
363 byte 2 command code 0x18
364 byte 3 Page# (0/1/2/3) (0xff --> clear OEM logo)
365 byte 4/5/6/7 0x55/0xaa/0xa5/0x5a
366 byte 8 TITLE.JPG data (each page must be 2000 bytes)
368 .. Note:: page0 1st 2 byte must be
369 actual length of the JPG file
370 ================ =============================================
373 Poll If Event Log Changed
375 ================ =============================================
377 byte 2 command code 0x19
378 ================ =============================================
383 ================ =============================================
385 byte 2 command code 0x1a
386 byte 3 Event Page (0:1st page/1/2/3:last page)
387 ================ =============================================
392 ================ =============================================
394 byte 2 command code 0x1b
395 byte 3 # of FANs(example 2)
396 byte 4 # of Voltage sensor(example 3)
397 byte 5 # of temperature sensor(example 2)
401 byte 11/12 Voltage#0 original value in ``*1000``
402 byte 13/14 Voltage#0 value
403 byte 15/16 Voltage#1 org
405 byte 19/20 Voltage#2 org
409 byte 25 Power indicator (bit0 power#0,
411 byte 26 UPS indicator
412 ================ =============================================
415 Quick create raid/volume set
417 ================ ==============================================
419 byte 2 command code 0x20
420 byte 3/4/5/6 raw capacity
424 byte 10/11/12/13 device mask (the devices to create raid/volume)
425 ================ ==============================================
427 This function is removed, application like
428 to implement quick create function
430 need to use GUI_CREATE_RAIDSET and GUI_CREATE_VOLUMESET function.
433 Get Raid Set Information
435 ================ =============================================
437 byte 2 command code 0x20
439 ================ =============================================
443 typedef struct sGUI_RAIDSET
445 BYTE grsRaidSetName[16];
449 BYTE grsDevArray[32];
450 BYTE grsMemberDevices;
451 BYTE grsNewMemberDevices;
454 BYTE grsVolumeList[16];
458 BYTE grsFreeSegments;
459 DWORD grsRawStripes[8];
461 DWORD grsRes5; // Total to 128 bytes
462 DWORD grsRes6; // Total to 128 bytes
463 } sGUI_RAIDSET, *pGUI_RAIDSET;
466 Get Volume Set Information
468 ================ =============================================
470 byte 2 command code 0x21
472 ================ =============================================
476 typedef struct sGUI_VOLUMESET
478 BYTE gvsVolumeName[16]; // 16
483 DWORD gvsNewFailMask;
484 DWORD gvsNewStripeSize;
485 DWORD gvsVolumeStatus;
486 DWORD gvsProgress; // 32
489 BYTE gvsRaidLevel; // 8
490 BYTE gvsNewMemberDisks;
491 BYTE gvsNewRaidLevel;
492 BYTE gvsRaidSetNumber;
494 BYTE gvsRes1[4]; // 64 bytes
495 } sGUI_VOLUMESET, *pGUI_VOLUMESET;
498 Get Physical Drive Information
500 ================ =============================================
502 byte 2 command code 0x22
503 byte 3 drive # (from 0 to max-channels - 1)
504 ================ =============================================
508 typedef struct sGUI_PHY_DRV
510 BYTE gpdModelName[40];
511 BYTE gpdSerialNumber[20];
514 DWORD gpdCapacityX; // Reserved for expansion
517 BYTE gpdCurrentUdmaMode;
520 BYTE gpdRaidNumber; // 0xff if not belongs to a raid set
522 BYTE gpdReserved[40]; // Total to 128 bytes
523 } sGUI_PHY_DRV, *pGUI_PHY_DRV;
526 Get System Information
528 ================ =============================================
530 byte 2 command code 0x23
531 ================ =============================================
535 typedef struct sCOM_ATTR
542 } sCOM_ATTR, *pCOM_ATTR;
543 typedef struct sSYSTEM_INFO
545 BYTE gsiVendorName[40];
546 BYTE gsiSerialNumber[16];
547 BYTE gsiFirmVersion[16];
548 BYTE gsiBootVersion[16];
549 BYTE gsiMbVersion[16];
550 BYTE gsiModelName[8];
552 BYTE gsiCurrentIp[4];
559 DWORD gsiMemorySpeed;
561 BYTE gsiMacAddress[6];
564 BYTE gsiChannelUsage;
566 BYTE gsiSdramEcc; // 1:if ECC enabled
567 BYTE gsiRebuildPriority;
568 sCOM_ATTR gsiComA; // 5 bytes
569 sCOM_ATTR gsiComB; // 5 bytes
571 BYTE gsiScsiHostChannels;
572 BYTE gsiIdeHostChannels;
573 BYTE gsiMaxVolumeSet;
575 BYTE gsiEtherPort; // 1:if ether net port supported
576 BYTE gsiRaid6Engine; // 1:Raid6 engine supported
578 } sSYSTEM_INFO, *pSYSTEM_INFO;
583 ================ =============================================
585 byte 2 command code 0x24
586 ================ =============================================
591 ================ =============================================
593 byte 2 command code 0x30
594 ================ =============================================
598 ================ =============================================
600 byte 2 command code 0x31
601 byte 3 0->disable, 1->enable
602 ================ =============================================
607 ================ =============================================
609 byte 2 command code 0x32
610 byte 3 pass word length ( must <= 15 )
611 byte 4 password (must be alpha-numerical)
612 ================ =============================================
614 GUI_HOST_INTERFACE_MODE
615 Set host interface mode
617 ================ =============================================
619 byte 2 command code 0x33
620 byte 3 0->Independent, 1->cluster
621 ================ =============================================
626 ================ =============================================
628 byte 2 command code 0x34
629 byte 3 0/1/2/3 (low->high)
630 ================ =============================================
633 Set maximum ATA mode to be used
635 ================ =============================================
637 byte 2 command code 0x35
638 byte 3 0/1/2/3 (133/100/66/33)
639 ================ =============================================
644 ================ =============================================
646 byte 2 command code 0x36
647 * Response with VT100 screen (discard it)
648 ================ =============================================
653 ================ =================================================
655 byte 2 command code 0x37
656 byte 3 0->COMA (term port),
658 byte 4 0/1/2/3/4/5/6/7
659 (1200/2400/4800/9600/19200/38400/57600/115200)
661 (0:7 bit, 1:8 bit must be 8 bit)
662 byte 6 stop bit (0:1, 1:2 stop bits)
663 byte 7 parity (0:none, 1:off, 2:even)
665 (0:none, 1:xon/xoff, 2:hardware => must use none)
666 ================ =================================================
671 ================ =============================================
673 byte 2 command code 0x38
674 ================ =============================================
677 Set DHCP option and local IP address
679 ================ =============================================
681 byte 2 command code 0x39
682 byte 3 0:dhcp disabled, 1:dhcp enabled
683 byte 4/5/6/7 IP address
684 ================ =============================================
686 GUI_CREATE_PASS_THROUGH
687 Create pass through disk
689 ================ =============================================
691 byte 2 command code 0x40
693 byte 4 scsi channel (0/1)
694 byte 5 scsi id (0-->15)
695 byte 6 scsi lun (0-->7)
696 byte 7 tagged queue (1 enabled)
697 byte 8 cache mode (1 enabled)
698 byte 9 max speed (0/1/2/3/4,
699 async/20/40/80/160 for scsi)
700 (0/1/2/3/4, 33/66/100/133/150 for ide )
701 ================ =============================================
703 GUI_MODIFY_PASS_THROUGH
704 Modify pass through disk
706 ================ =============================================
708 byte 2 command code 0x41
710 byte 4 scsi channel (0/1)
711 byte 5 scsi id (0-->15)
712 byte 6 scsi lun (0-->7)
713 byte 7 tagged queue (1 enabled)
714 byte 8 cache mode (1 enabled)
715 byte 9 max speed (0/1/2/3/4,
716 async/20/40/80/160 for scsi)
717 (0/1/2/3/4, 33/66/100/133/150 for ide )
718 ================ =============================================
720 GUI_DELETE_PASS_THROUGH
721 Delete pass through disk
723 ================ =============================================
725 byte 2 command code 0x42
726 byte 3 device# to be deleted
727 ================ =============================================
731 ================ =============================================
733 byte 2 command code 0x43
735 (0:flash selected, 1:flash not selected)
736 byte 4/5/6/7 IDE device mask to be flashed
737 .. Note:: no response data available
738 ================ =============================================
743 ================ =============================================
745 byte 2 command code 0x50
746 byte 3/4/5/6 device mask
747 byte 7-22 raidset name (if byte 7 == 0:use default)
748 ================ =============================================
753 ================ =============================================
755 byte 2 command code 0x51
757 ================ =============================================
762 ================ =============================================
764 byte 2 command code 0x52
766 byte 4/5/6/7 device mask for expansion
767 byte 8/9/10 (8:0 no change, 1 change, 0xff:terminate,
770 0/1/2/3/4/5->4/8/16/32/64/128K )
771 byte 11/12/13 repeat for each volume in the raidset
772 ================ =============================================
775 Activate incomplete raid set
777 ================ =============================================
779 byte 2 command code 0x53
781 ================ =============================================
784 Create hot spare disk
786 ================ =============================================
788 byte 2 command code 0x54
789 byte 3/4/5/6 device mask for hot spare creation
790 ================ =============================================
793 Delete hot spare disk
795 ================ =============================================
797 byte 2 command code 0x55
798 byte 3/4/5/6 device mask for hot spare deletion
799 ================ =============================================
804 ================ =============================================
806 byte 2 command code 0x60
808 byte 4-19 volume set name
809 (if byte4 == 0, use default)
810 byte 20-27 volume capacity (blocks)
813 (0/1/2/3/4/5->4/8/16/32/64/128K)
818 byte 34 1 enable cache
820 (0/1/2/3/4->async/20/40/80/160 for scsi)
821 (0/1/2/3/4->33/66/100/133/150 for IDE )
822 byte 36 1 to select quick init
823 ================ =============================================
828 ================ =============================================
830 byte 2 command code 0x61
832 byte 4-19 new volume set name
833 (if byte4 == 0, not change)
834 byte 20-27 new volume capacity (reserved)
835 byte 28 new raid level
836 byte 29 new stripe size
837 (0/1/2/3/4/5->4/8/16/32/64/128K)
842 byte 34 1 enable cache
844 (0/1/2/3/4->async/20/40/80/160 for scsi)
845 (0/1/2/3/4->33/66/100/133/150 for IDE )
846 ================ =============================================
851 ================ =============================================
853 byte 2 command code 0x62
855 ================ =============================================
857 GUI_START_CHECK_VOLUME
858 Start volume consistency check
860 ================ =============================================
862 byte 2 command code 0x63
864 ================ =============================================
866 GUI_STOP_CHECK_VOLUME
867 Stop volume consistency check
869 ================ =============================================
871 byte 2 command code 0x64
872 ================ =============================================
878 3 bytes sequence (0x5E, 0x01, 0x61)
881 (low byte 1st, excludes length and checksum byte)
885 1) If length == 1 ==> 1 byte status code::
888 #define GUI_RAIDSET_NOT_NORMAL 0x42
889 #define GUI_VOLUMESET_NOT_NORMAL 0x43
890 #define GUI_NO_RAIDSET 0x44
891 #define GUI_NO_VOLUMESET 0x45
892 #define GUI_NO_PHYSICAL_DRIVE 0x46
893 #define GUI_PARAMETER_ERROR 0x47
894 #define GUI_UNSUPPORTED_COMMAND 0x48
895 #define GUI_DISK_CONFIG_CHANGED 0x49
896 #define GUI_INVALID_PASSWORD 0x4a
897 #define GUI_NO_DISK_SPACE 0x4b
898 #define GUI_CHECKSUM_ERROR 0x4c
899 #define GUI_PASSWORD_REQUIRED 0x4d
903 data block returned from controller
904 and the contents depends on the command code
907 checksum of length and status or data byte