Changeset 567 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Timestamp:
- May 26, 2014, 1:25:15 PM (11 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm
r564 r567 34 34 IdeDPT_Finalize: 35 35 36 %ifdef MODULE_ FEATURE_SETS36 %ifdef MODULE_POWER_MANAGEMENT 37 37 ;-------------------------------------------------------------------- 38 38 ; .DetectPowerManagementSupport … … 43 43 ; Nothing 44 44 ; Corrupts registers: 45 ; Nothing45 ; AL 46 46 ;-------------------------------------------------------------------- 47 47 .DetectPowerManagementSupport: 48 test BYTE [es:si+ATA6.wSetSup82], A6_wSetSup82_POWERMAN 49 jz SHORT .NoPowerManagementSupport 50 or BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 51 .NoPowerManagementSupport: 52 %endif ; MODULE_FEATURE_SETS 48 mov al, [es:si+ATA6.wSetSup82] 49 and al, A6_wSetSup82_POWERMAN ; A6_wSetSup82_POWERMAN (bit 3) is the same 50 or [di+DPT.bFlagsHigh], al ; bit as FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 51 %endif ; MODULE_POWER_MANAGEMENT 53 52 54 53 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
r558 r567 2 2 ; Description : IDE Read/Write functions for transferring block using DMA. 3 3 ; These functions should only be called from IdeTransfer.asm. 4 5 ; Modified JJP 05-Jun-136 4 7 5 ; … … 91 89 ; Calculate bytes for first page 92 90 mov ax, di 93 neg ax ; 2s compl iment91 neg ax ; 2s complement 94 92 95 93 ; If DI was zero carry flag will be cleared (and set otherwise) … … 187 185 jz SHORT .TransferNextBlock ; All bytes transferred? 188 186 %else ; Fast DMA code - perform computed number of transfers, then check DMA status register to be sure 189 add cx, BYTE 15 ; We'll divide transfers in 16-byte atomic transfers, 190 eSHR_IM cx, 4 ; so include any partial block, which will be terminated 191 ALIGN JUMP_ALIGN ; by the DMA controller raising T/C 187 ; We'll divide transfers in 16-byte atomic transfers, so include any partial block, which will be terminated by the DMA controller raising T/C 188 add cx, BYTE 15 189 190 %ifdef USE_186 191 shr cx, 4 192 %else 193 xchg cx, ax 194 mov cl, 4 195 shr ax, cl 196 xchg cx, ax 197 %endif 198 199 ALIGN JUMP_ALIGN 192 200 .TransferNextDmaBlock: 193 201 out dx, al ; Transfer up to 16 bytes to/from XT-CF card -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm
r566 r567 20 20 ; Section containing code 21 21 SECTION .text 22 23 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 24 %if $ <> PollBsyOnly.End 25 %error "IdeError.asm must come immediately after IdeWait.asm (PollBsyOnly falls into IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL)!" 26 %endif 27 %endif 22 28 23 29 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm
r558 r567 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 19 ; 20 21 ; Modified by JJP for XT-CFv3 support, Mar-1322 20 23 21 ; Section containing code -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r558 r567 228 228 229 229 ; Get transfer function based on bus type 230 xchg ax, bx ; Lookup table offset to AX231 mov bl, [di+DPT_ATA.bDevice]230 mov al, [di+DPT_ATA.bDevice] 231 add bx, ax 232 232 %ifdef MODULE_8BIT_IDE_ADVANCED 233 mov dl, bl 234 %endif 235 add bx, ax 233 cmp al, DEVICE_8BIT_XTCF_DMA 234 %endif 236 235 mov ax, [cs:bx] ; Load offset to transfer function 237 236 mov [bp+PIOVARS.fnXfer], ax … … 239 238 ; Normalize pointer for PIO-transfers and convert to physical address for DMA transfers 240 239 %ifdef MODULE_8BIT_IDE_ADVANCED 241 cmp dl, DEVICE_8BIT_XTCF_DMA242 240 jb SHORT IdeTransfer_NormalizePointerInESSI 243 241 244 242 ; Convert ES:SI to physical address 245 %ifdef USE_186 ; Bytes EU Cycles(286) 243 %ifdef USE_186 244 ; Bytes EU Cycles(286) 246 245 mov ax, es ; 2 2 247 246 rol ax, 4 ; 3 9 … … 255 254 ; 18 24 256 255 %else ; 808x 257 258 %if 0259 256 ; Bytes EU Cycles(808x) 260 257 mov al, 4 ; 2 4 … … 279 276 ; In other words, we could use a real world test here. 280 277 ; 281 % endif ;0278 %if 0 282 279 ; Bytes EU Cycles(808x/286) 283 280 xor dx, dx ; 2 3/2 … … 291 288 mov es, dx ; 2 2/2 292 289 ;------------------------------------ 293 %endif ; 26 29/26 294 clc 295 ret 290 ; 26 29/26 291 %endif ; 0 292 %endif 293 294 ret ; With CF cleared (taken care of by the physical address conversion) 296 295 %endif ; MODULE_8BIT_IDE_ADVANCED 297 296 ; Fall to IdeTransfer_NormalizePointerInESSI if no MODULE_8BIT_IDE_ADVANCED -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
r532 r567 130 130 call Timer_SetCFifTimeout ; Update timeout counter 131 131 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 132 jmp SHORT IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 132 .End: ; Label used for sanity check during assembly 133 ; Fall to IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 134
Note:
See TracChangeset
for help on using the changeset viewer.