Changeset 370 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Mar 29, 2012, 4:40:50 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r365 r370 102 102 ; Return number of successfully read sectors 103 103 ReturnWithTransferErrorInAH: 104 %ifdef USE_386 105 movzx cx, [bp+PIOVARS.bSectorsDone] 106 %else 104 107 mov cl, [bp+PIOVARS.bSectorsDone] 105 108 mov ch, 0 ; Preserve CF 109 %endif 106 110 ret 107 111 … … 180 184 ; Store sizes 181 185 mov [bp+PIOVARS.bSectorsLeft], ah 182 eMOVZX ax, BYTE[di+DPT_ATA.bBlockSize]186 eMOVZX ax, [di+DPT_ATA.bBlockSize] 183 187 mov [bp+PIOVARS.wSectorsInBlock], ax 184 188 mov [bp+PIOVARS.bSectorsDone], ah ; Zero … … 218 222 ReadBlockFromXtideRev1: 219 223 UNROLL_SECTORS_IN_CX_TO_QWORDS 220 mov b x, 8 ; Bit mask for toggling data low/high reg224 mov bl, 8 ; Bit mask for toggling data low/high reg 221 225 ALIGN JUMP_ALIGN 222 226 .InswLoop: … … 287 291 push bx 288 292 UNROLL_SECTORS_IN_CX_TO_QWORDS 289 mov b x, 8 ; Bit mask for toggling data low/high reg293 mov bl, 8 ; Bit mask for toggling data low/high reg 290 294 push es ; Copy ES... 291 295 pop ds ; ...to DS -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r365 r370 227 227 ; Set if error flag was set 228 228 ; Corrupts registers: 229 ; BX, ES229 ; Nothing 230 230 ;-------------------------------------------------------------------- 231 231 SetErrorFlagFromALwithErrorCodeInAH: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r369 r370 52 52 53 53 ; Initialize Master and Slave drives 54 eMOVZX ax, BYTE [di+DPT.bIdevarsOffset]; (AL) pointer to controller we are looking to reset54 eMOVZX ax, [di+DPT.bIdevarsOffset] ; (AL) pointer to controller we are looking to reset 55 55 ; (AH) initialize error code, assume success 56 56 … … 85 85 IterateAndResetDrives: 86 86 cmp al, [di+DPT.bIdevarsOffset] ; The right controller? 87 jne .done 87 jne .Done 88 push cx 88 89 push ax 89 push cx90 90 call AH9h_InitializeDriveForUse ; Reset Master and Slave (Master will come first in DPT list) 91 91 92 92 %ifdef MODULE_ADVANCED_ATA 93 93 jc SHORT .SkipControllerInitSinceError 94 call InitializeAdvancedIdeControllers ; Done after drive init so drives are first set to advanced PIO mode, then the controller 94 ; Here we initialize the more advanced controllers (VLB and PCI) to get better performance for systems with 32-bit bus. 95 ; This step is optional since the controllers use slowest possible settings by default if they are not initialized. 96 97 pop ax 98 push ax 99 cmp al, [di+LARGEST_DPT_SIZE+DPT.bIdevarsOffset] ; We check if next DPT is for the same IDE controller. 100 je SHORT .SkipInitializationUntilNextDrive ; If it is, we skip the initialization. 101 call AdvAtaInit_InitializeControllerForDPTinDSDI ; Done after drive init so drives are first set to advanced PIO mode, then the controller 102 .SkipInitializationUntilNextDrive: 95 103 .SkipControllerInitSinceError: 96 %endif 104 %endif ; MODULE_ADVANCED_ATA 97 105 106 pop ax 98 107 pop cx 99 pop ax 100 jnc .done 108 jnc .Done 101 109 or ah, (RET_HD_RESETFAIL << 1) | 1 ; OR in Reset Failed error code and CF, will SHR into position later 102 . done:110 .Done: 103 111 stc ; From IterateAllDPTs perspective, the DPT is never found (continue iteration) 104 112 ret 105 113 106 107 %ifdef MODULE_ADVANCED_ATA108 ;--------------------------------------------------------------------109 ; Here we initialize the more advanced controllers (VLB and PCI)110 ; to get better performance for systems with 32-bit bus.111 ;112 ; This step is optional since the controllers use slowest possible113 ; settings by default if they are not initialized.114 ;115 ; InitializeAdvancedIdeController116 ; Parameters:117 ; DS:DI: Ptr to DPT118 ; Returns:119 ; CF: Cleared if success or no controller to initialize120 ; Set if error121 ; Corrupts registers:122 ; AX, BX, CX, DX123 ;--------------------------------------------------------------------124 InitializeAdvancedIdeControllers:125 ; We want to initialize the advanced controller only after both126 ; Master and Slave drive are initialized to correct PIO mode.127 ; We check if next DPT is for the same IDE controller. If it is,128 ; we skip the initialization.129 mov al, [di+DPT.bIdevarsOffset]130 cmp al, [di++LARGEST_DPT_SIZE+DPT.bIdevarsOffset]131 je SHORT .SkipInitializationUntilNextDrive ; CF cleared132 133 jmp AdvAtaInit_InitializeControllerForDPTinDSDI134 .SkipInitializationUntilNextDrive:135 clc136 ret137 138 %endif ; MODULE_ADVANCED_ATA -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvAtaInit.asm
r364 r370 114 114 ;-------------------------------------------------------------------- 115 115 AdvAtaInit_SelectSlowestCommonPioTimingsToBXandCXfromDSSIandDSDI: 116 eMOVZX bx, BYTE[di+DPT_ADVANCED_ATA.bPioMode]116 eMOVZX bx, [di+DPT_ADVANCED_ATA.bPioMode] 117 117 mov cx, [di+DPT_ADVANCED_ATA.wMinPioCycleTime] 118 118 test si, si -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r364 r370 89 89 ; Get PIO mode and cycle time for PIO 0...2 90 90 mov bx, [es:si+ATA1.bPioMode] 91 mov ax, bx ; AH = 0, AL = PIO mode 0, 1 or 2 91 92 shl bx, 1 ; Shift for WORD lookup 92 93 mov cx, [cs:bx+.rgwPio0to2CycleTimeInNanosecs] 93 shr bx, 194 xchg ax, bx ; AH = 0, AL = PIO mode 0, 1 or 295 94 96 95 ; Check if IORDY is supported … … 105 104 ; Get Advanced PIO mode 106 105 ; (Hard Disks supports up to 4 but CF cards can support 5 and 6) 107 mov b x, [es:si+ATA2.bPIOSupp]106 mov bl, [es:si+ATA2.bPIOSupp] 108 107 .CheckNextFlag: 109 108 inc ax 110 shr b x, 1109 shr bl, 1 111 110 jnz SHORT .CheckNextFlag 112 111 MIN_U al, 6 ; Make sure not above lookup tables -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Vision.asm
r364 r370 45 45 IsConfigRegisterWithIDinAL: 46 46 mov ah, al 47 and a h, MASK_QDCONFIG_CONTROLLER_ID48 cmp a h, ID_QD6500 << 447 and al, MASK_QDCONFIG_CONTROLLER_ID 48 cmp al, ID_QD6500 << 4 49 49 je SHORT VisionControllerDetected 50 cmp a h, ID_QD6580 << 450 cmp al, ID_QD6580 << 4 51 51 je SHORT VisionControllerDetected 52 cmp a h, ID_QD6580_ALTERNATE << 452 cmp al, ID_QD6580_ALTERNATE << 4 53 53 VisionControllerDetected: 54 xchg ah, al 54 55 ret 55 56 … … 175 176 mov bp, QD6500_MAX_ACTIVE_TIME_CLOCKS | (QD6500_MIN_ACTIVE_TIME_CLOCKS << 8) 176 177 177 ; We need the PIO Cycle Time in CX to calculate Active and Recovery Times. 178 ; We need the PIO Cycle Time in CX to calculate Active and Recovery Times. 178 179 .CalculateTimingsForQD65xx: 179 180 call AdvAtaInit_SelectSlowestCommonPioTimingsToBXandCXfromDSSIandDSDI
Note:
See TracChangeset
for help on using the changeset viewer.