[277] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
| 2 | ; Description : Serial Server Defines
|
---|
| 3 |
|
---|
| 4 | %ifndef SERIALSERVER_INC
|
---|
| 5 | %define SERIALSERVER_INC
|
---|
| 6 |
|
---|
| 7 | %include "Serial.inc"
|
---|
| 8 |
|
---|
| 9 | ;
|
---|
| 10 | ; Command codes
|
---|
| 11 | ;
|
---|
| 12 | SerialServer_Command_Header EQU 0a0h
|
---|
| 13 | SerialServer_Command_Write EQU (SerialServer_Command_Header | 3)
|
---|
| 14 | SerialServer_Command_Read EQU (SerialServer_Command_Header | 2)
|
---|
| 15 | SerialServer_Command_Inquire EQU (SerialServer_Command_Header | 0)
|
---|
| 16 | SerialServer_Command_Custom_Read EQU (SerialServer_Command_Header | 4)
|
---|
| 17 | SerialServer_Command_Custom_Write EQU (SerialServer_Command_Header | 5)
|
---|
| 18 |
|
---|
| 19 | SerialServer_SubCommand_Image_SendInitiate EQU 1
|
---|
| 20 | SerialServer_SubCommand_Image_SendSectors EQU 2
|
---|
| 21 | SerialServer_SubCommand_Image_SendComplete EQU 3
|
---|
| 22 |
|
---|
| 23 | ;
|
---|
| 24 | ; Locations within the ATA 512-byte Inquire structure, taken from the "Vendor specific area",
|
---|
| 25 | ; for serial port specific information that is returned by the server for an inquire.
|
---|
| 26 | ;
|
---|
| 27 | ; NOTE: These are byte offsets (because of the "*2"), which is more convenient here, while
|
---|
| 28 | ; the ATA structure defines these in terms of word offsets.
|
---|
| 29 | ;
|
---|
| 30 | SerialServer_ATA_wServerVersion EQU (157*2)
|
---|
[334] | 31 | SerialServer_ATA_wDriveFlags EQU (158*2)
|
---|
[277] | 32 | SerialServer_ATA_wPortAndBaud EQU (159*2)
|
---|
| 33 |
|
---|
| 34 | ;
|
---|
| 35 | ; Command structure passed to SerialServer_SendReceive. This mirrors IDEPACK in the XTIDE Universal BIOS,
|
---|
| 36 | ; since that structure is passed directly without copying values into this structure.
|
---|
| 37 | ;
|
---|
| 38 | struc SerialServer_Command
|
---|
| 39 | .wCommandAndCustom:
|
---|
| 40 | .bCommand resb 1
|
---|
| 41 |
|
---|
| 42 | .bCustomCommand:
|
---|
| 43 | .bDrvAndHead resb 1 ; LBA28 27...24
|
---|
| 44 |
|
---|
| 45 | .wSectorCountAndLbaLow:
|
---|
| 46 | .bSectorCount resb 1
|
---|
| 47 |
|
---|
| 48 | .bCustomData3:
|
---|
| 49 | .bSectorNumber:
|
---|
| 50 | .bLbaLow resb 1 ; LBA 7...0
|
---|
| 51 |
|
---|
| 52 | .wCustomData1:
|
---|
| 53 | .bCustomData1:
|
---|
| 54 | .wCylinder:
|
---|
| 55 | .wLbaMiddleAndHigh:
|
---|
| 56 | .bLbaMiddle resb 1 ; LBA 15...8
|
---|
| 57 |
|
---|
| 58 | .bCustomData2:
|
---|
| 59 | .bLbaHigh resb 1 ; LBA 23...16
|
---|
| 60 | endstruc
|
---|
| 61 |
|
---|
| 62 | %endif
|
---|
| 63 |
|
---|