Changeset 507 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Mar 1, 2013, 5:12:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r505 r507 119 119 jz SHORT .ErrorCodeNotUsed 120 120 mov bl, [di+DPT.bIdevarsOffset] ; replace drive number with Idevars pointer for cmp with dl 121 .ErrorCodeNotUsed: 121 122 122 .ErrorCodeNotUsed: ; BH will be garbage on exit if this entry point is used, 123 mov si, ControllerResetForDPTinDSDI 124 call .CallSIforEveryDrive ; Reset all drives to power on settings 125 mov si, AH9h_InitializeDriveForUse 126 ; Fall to .CallSIforEveryDrive ; Initialize all drives 127 128 .CallSIforEveryDrive: ; BH will be garbage on exit if this entry point is used, 123 129 ; but reset of all drives will still happen 124 130 … … 130 136 ; will point to them. Performance isn't an issue, as this is a reset operation. 131 137 ; 132 mov cx, (ROMVARS.ideVarsEnd - ROMVARS.ideVarsBegin) / IDEVARS_size138 mov cx, NUMBER_OF_IDEVARS 133 139 134 140 .loop: 141 push si 135 142 call FindDPT_ForIdevarsOffsetInDL ; look for the first drive on this controller, if any 143 pop si 136 144 jc SHORT .notFound 137 145 138 call AHDh_ResetDrive ; reset master and slave on that controller 146 push bx 147 push cx 148 push dx 149 call si ; Reset Master AND Slave or initialize Master OR Slave drive 150 pop dx 151 pop cx 152 pop bx 139 153 call BackupErrorCodeFromTheRequestedDriveToBH ; save error code if same controller as drive from entry 140 154 … … 142 156 add dl, IDEVARS_size ; move Idevars pointer forward 143 157 loop .loop 158 ret 144 159 145 .done: 146 ret 160 161 ;-------------------------------------------------------------------- 162 ; ControllerResetForDPTinDSDI 163 ; Parameters: 164 ; DS:DI: Ptr to DPT for drive to reset (resets both Master and Slave drive) 165 ; SS:BP: Ptr to IDEPACK 166 ; Returns: 167 ; AH: Int 13h return status 168 ; CF: 0 if successful, 1 if error 169 ; Corrupts registers: 170 ; AL, BX, CX, DX 171 ;-------------------------------------------------------------------- 172 ControllerResetForDPTinDSDI: 173 %ifdef MODULE_IRQ 174 call Interrupts_UnmaskInterruptControllerForDriveInDSDI 175 %endif 176 %ifdef MODULE_ADVANCED_ATA 177 call Device_ResetMasterAndSlaveController 178 jmp AdvAtaInit_InitializeControllerForDPTinDSDI 179 %else 180 jmp Device_ResetMasterAndSlaveController 181 %endif
Note:
See TracChangeset
for help on using the changeset viewer.