Changeset 507 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Timestamp:
- Mar 1, 2013, 5:12:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r501 r507 20 20 ; Section containing code 21 21 SECTION .text 22 23 ;-------------------------------------------------------------------- 24 ; IdeCommand_ResetMasterAndSlaveController 25 ; Parameters: 26 ; DS:DI: Ptr to DPT (in RAMVARS segment) 27 ; Returns: 28 ; AH: INT 13h Error Code 29 ; CF: Cleared if success, Set if error 30 ; Corrupts registers: 31 ; AL, BX, CX, DX 32 ;-------------------------------------------------------------------- 33 IdeCommand_ResetMasterAndSlaveController: 34 ; HSR0: Set_SRST 35 call AccessDPT_GetDeviceControlByteToAL 36 or al, FLG_DEVCONTROL_SRST | FLG_DEVCONTROL_nIEN ; Set Reset bit 37 OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out 38 mov ax, HSR0_RESET_WAIT_US 39 call Timer_DelayMicrosecondsFromAX 40 41 ; HSR1: Clear_wait 42 call AccessDPT_GetDeviceControlByteToAL 43 or al, FLG_DEVCONTROL_nIEN 44 and al, ~FLG_DEVCONTROL_SRST ; Clear reset bit 45 OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out 46 mov ax, HSR1_RESET_WAIT_US 47 call Timer_DelayMicrosecondsFromAX 48 49 ; HSR2: Check_status 50 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MAXIMUM, FLG_STATUS_BSY) 51 jmp IdeWait_PollStatusFlagInBLwithTimeoutInBH 52 22 53 23 54 ;-------------------------------------------------------------------- … … 49 80 test bh, FLG_DRVNHEAD_DRV ; Wait already done for Master 50 81 jnz SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 51 call AHDh_WaitUntilDriveMotorHasReachedFullSpeed 82 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_MOTOR_STARTUP, FLG_STATUS_DRDY) 83 call IdeWait_PollStatusFlagInBLwithTimeoutInBH 52 84 .SkipLongWaitSinceDriveIsNotPrimaryMaster: 53 85
Note:
See TracChangeset
for help on using the changeset viewer.