Changeset 480 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h


Ignore:
Timestamp:
Oct 27, 2012, 11:26:11 AM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • XT-CF DMA transfers should now work.
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  
    108108;;; Set XT-CF mode
    109109%ifdef MODULE_8BIT_IDE
    110     call    AccessDPT_IsThisDeviceXTCF
    111     jne     SHORT .DoNotSetXTCFmode
    112 
    113110    call    AccessDPT_GetIdevarsToCSBX
    114111    mov     al, [cs:bx+IDEVARS.bXTCFcontrolRegister]
    115     call    AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL
     112    call    AH9h_SetModeFromALtoXTCF
    116113    STORE_ERROR_FLAG_TO_DPT     FLG_INITERROR_FAILED_TO_SET_XTCF_MODE
    117114.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
    119122
    120123
     
    261264.NoErrorFlagToSet:
    262265    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;--------------------------------------------------------------------
     282AH9h_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;--------------------------------------------------------------------
     300AH9h_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  
    9595Prepare_BufferToESSIforOldInt13hTransfer:
    9696    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
    11598    ; Fall to Prepare_ByValidatingSectorsInALforOldInt13h
    116 
    11799
    118100;---------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.