Changeset 507 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- Mar 1, 2013, 5:12:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
r501 r507 55 55 %else ; IDE 56 56 Device_FinalizeDPT EQU IdeDPT_Finalize 57 %endif 58 59 60 ;-------------------------------------------------------------------- 61 ; Device_ResetMasterAndSlaveController 62 ; Parameters: 63 ; DS:DI: Ptr to DPT (in RAMVARS segment) 64 ; Returns: 65 ; AH: INT 13h Error Code 66 ; CF: Cleared if success, Set if error 67 ; Corrupts registers: 68 ; AL, BX, CX, DX 69 ;-------------------------------------------------------------------- 70 %ifdef MODULE_SERIAL ; IDE + Serial 71 Device_ResetMasterAndSlaveController: 72 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE ReturnSuccessForSerialPort 73 jmp IdeCommand_ResetMasterAndSlaveController 74 75 %else ; IDE 76 Device_ResetMasterAndSlaveController EQU IdeCommand_ResetMasterAndSlaveController 57 77 %endif 58 78 -
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.