Changeset 480 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Oct 27, 2012, 11:26:11 AM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r473 r480 108 108 ;;; Set XT-CF mode 109 109 %ifdef MODULE_8BIT_IDE 110 call AccessDPT_IsThisDeviceXTCF111 jne SHORT .DoNotSetXTCFmode112 113 110 call AccessDPT_GetIdevarsToCSBX 114 111 mov al, [cs:bx+IDEVARS.bXTCFcontrolRegister] 115 call AH 1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL112 call AH9h_SetModeFromALtoXTCF 116 113 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_XTCF_MODE 117 114 .DoNotSetXTCFmode: 118 %endif 115 116 117 ;;; Set 8-bit PIO mode 118 call AH9h_Enable8bitModeForDevice8bitAta 119 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_8BIT_MODE 120 .DoNotSet8bitMode: 121 %endif ; MODULE_8BIT_IDE 119 122 120 123 … … 261 264 .NoErrorFlagToSet: 262 265 ret 266 267 268 %ifdef MODULE_8BIT_IDE 269 ;-------------------------------------------------------------------- 270 ; AH9h_SetModeFromALtoXTCF 271 ; Parameters: 272 ; AL: XT-CF Mode to set 273 ; DS:DI: Ptr to DPT (in RAMVARS segment) 274 ; SS:BP: Ptr to IDEPACK 275 ; Returns: 276 ; AH: Int 13h return status 277 ; CF: Clear if successful or device is not XT-CF 278 ; Set if failed to set mode for XT-CF 279 ; Corrupts registers: 280 ; AL, BX, CX, DX, SI 281 ;-------------------------------------------------------------------- 282 AH9h_SetModeFromALtoXTCF: 283 call AccessDPT_IsThisDeviceXTCF 284 jne SHORT IgnoreInvalidCommandError 285 jmp AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL 286 287 288 ;-------------------------------------------------------------------- 289 ; AH9h_Enable8bitModeForDevice8bitAta 290 ; Parameters: 291 ; DS:DI: Ptr to DPT (in RAMVARS segment) 292 ; SS:BP: Ptr to IDEPACK 293 ; Returns: 294 ; AH: Int 13h return status 295 ; CF: Clear if successful or device is not DEVICE_8BIT_ATA 296 ; Set if failed to set 8-bit mode for DEVICE_8BIT_ATA 297 ; Corrupts registers: 298 ; AL, BX, CX, DX, SI 299 ;-------------------------------------------------------------------- 300 AH9h_Enable8bitModeForDevice8bitAta: 301 cmp BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA 302 jne SHORT IgnoreInvalidCommandError 303 jmp AH23h_Enable8bitPioMode 304 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r477 r480 95 95 Prepare_BufferToESSIforOldInt13hTransfer: 96 96 mov si, [bp+IDEPACK.intpack+INTPACK.bx] ; Load offset 97 98 %ifdef MODULE_8BIT_IDE 99 cmp BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA 100 jne SHORT .NormalizeForSmallestPossibleOffset 101 102 ; DMA transfers do not need to normalize pointer 103 ; (it will be converted to physical address in IdeDmaTransfer.asm) 104 mov es, [bp+IDEPACK.intpack+INTPACK.es] 105 jmp SHORT Prepare_ByValidatingSectorsInALforOldInt13h 106 %endif ; MODULE_8BIT_IDE 107 108 ; Normalize segment for 16b pages 109 .NormalizeForSmallestPossibleOffset: 110 mov bx, si 111 eSHR_IM bx, 4 ; Divide offset by 16 112 add bx, [bp+IDEPACK.intpack+INTPACK.es] 113 mov es, bx ; Segment normalized 114 and si, BYTE 0Fh ; Offset normalized 97 mov es, [bp+IDEPACK.intpack+INTPACK.es] ; Load segment 115 98 ; Fall to Prepare_ByValidatingSectorsInALforOldInt13h 116 117 99 118 100 ;---------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.