Changeset 428 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- May 29, 2012, 7:24:58 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r421 r428 79 79 test bh, FLG_DRVNHEAD_DRV 80 80 jnz SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 81 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_DRDY) 82 call IdeWait_PollStatusFlagInBLwithTimeoutInBH 81 call AHDh_WaitUnilDriveMotorHasReachedFullSpeed 83 82 .SkipLongWaitSinceDriveIsNotPrimaryMaster: 84 83 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r398 r428 106 106 push cx 107 107 push ax 108 call AH9h_InitializeDriveForUse ; Reset Master and Slave (Master will come first in DPT list) 108 call AHDh_WaitUnilDriveMotorHasReachedFullSpeed 109 call AH9h_InitializeDriveForUse ; Initialize Master or Slave (Master will come first in DPT list) 109 110 110 111 %ifdef MODULE_ADVANCED_ATA … … 130 131 ret 131 132 133 134 ;-------------------------------------------------------------------- 135 ; AHDh_WaitUnilDriveMotorHasReachedFullSpeed 136 ; Parameters: 137 ; DS:DI: Ptr to DPT 138 ; Returns: 139 ; AH: Int 13h return status 140 ; CF: 0 if successful, 1 if error 141 ; Corrupts registers: 142 ; AL, BX, CX, DX 143 ;-------------------------------------------------------------------- 144 AHDh_WaitUnilDriveMotorHasReachedFullSpeed: 145 %ifdef MODULE_SERIAL 146 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 147 jz SHORT .WaitSinceRealHardDisk 148 ret 149 .WaitSinceRealHardDisk: 150 %endif 151 152 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_BSY) 153 jmp IdeWait_PollStatusFlagInBLwithTimeoutInBH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm
r392 r428 73 73 74 74 .ReadRetryLoop: 75 call .ResetBootDriveFromDL76 75 call .LoadFirstSectorFromDLtoESBX 77 76 jnc SHORT .Return 78 dec di ; Decrement retry counter 79 jnz SHORT .ReadRetryLoop ; Loop while retries left 80 .Return: 81 ret 77 dec di ; Decrement retry counter (preserve CF) 78 jz SHORT .Return ; Loop while retries left 82 79 83 ;-------------------------------------------------------------------- 84 ; .ResetBootDriveFromDL 85 ; Parameters: 86 ; DL: Drive to boot from (translated, 00h or 80h) 87 ; Returns: 88 ; AH: INT 13h error code 89 ; CF: Cleared if read successful 90 ; Set if any error 91 ; Corrupts registers: 92 ; AL 93 ;-------------------------------------------------------------------- 94 .ResetBootDriveFromDL: 80 ; Reset drive and retry 95 81 xor ax, ax ; AH=0h, Disk Controller Reset 96 82 test dl, dl ; Floppy drive? 97 jns SHORT .SkipAltReset 98 mov ah, 0Dh ; AH=Dh, Reset Hard Disk (Alternate reset) 99 .SkipAltReset: 83 eCMOVS ah, RESET_HARD_DISK ; AH=Dh, Reset Hard Disk (Alternate reset) 100 84 int BIOS_DISK_INTERRUPT_13h 101 ret 85 jmp SHORT .ReadRetryLoop 86 102 87 103 88 ;-------------------------------------------------------------------- … … 119 104 xor dh, dh ; Head 0 120 105 int BIOS_DISK_INTERRUPT_13h 106 .Return: 121 107 ret
Note:
See TracChangeset
for help on using the changeset viewer.