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


Ignore:
Timestamp:
Mar 29, 2012, 4:40:50 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added some missing PIO mode timings to ATA_ID.inc (based on info from http://www.singlix.net/specs/cfspc4_0.pdf)
  • Updated Configuration_FullMode.txt but it may need additional changes as the Tandy info doesn't match the wiki.
  • Optimizations.
  • Excluded some unused code from XTIDECFG.
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

    r365 r370  
    227227;               Set if error flag was set
    228228;   Corrupts registers:
    229 ;       BX, ES
     229;       Nothing
    230230;--------------------------------------------------------------------
    231231SetErrorFlagFromALwithErrorCodeInAH:
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r369 r370  
    5252
    5353    ; Initialize Master and Slave drives
    54     eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]    ; (AL) pointer to controller we are looking to reset
     54    eMOVZX  ax, [di+DPT.bIdevarsOffset]         ; (AL) pointer to controller we are looking to reset
    5555                                                ; (AH) initialize error code, assume success
    5656
     
    8585IterateAndResetDrives:
    8686    cmp     al, [di+DPT.bIdevarsOffset]         ; The right controller?
    87     jne     .done
     87    jne     .Done
     88    push    cx
    8889    push    ax
    89     push    cx
    9090    call    AH9h_InitializeDriveForUse          ; Reset Master and Slave (Master will come first in DPT list)
    9191
    9292%ifdef MODULE_ADVANCED_ATA
    9393    jc      SHORT .SkipControllerInitSinceError
    94     call    InitializeAdvancedIdeControllers    ; Done after drive init so drives are first set to advanced PIO mode, then the controller
     94    ; Here we initialize the more advanced controllers (VLB and PCI) to get better performance for systems with 32-bit bus.
     95    ; This step is optional since the controllers use slowest possible settings by default if they are not initialized.
     96
     97    pop     ax
     98    push    ax
     99    cmp     al, [di+LARGEST_DPT_SIZE+DPT.bIdevarsOffset]    ; We check if next DPT is for the same IDE controller.
     100    je      SHORT .SkipInitializationUntilNextDrive         ; If it is, we skip the initialization.
     101    call    AdvAtaInit_InitializeControllerForDPTinDSDI     ; Done after drive init so drives are first set to advanced PIO mode, then the controller
     102.SkipInitializationUntilNextDrive:
    95103.SkipControllerInitSinceError:
    96 %endif
     104%endif  ; MODULE_ADVANCED_ATA
    97105
     106    pop     ax
    98107    pop     cx
    99     pop     ax
    100     jnc     .done
     108    jnc     .Done
    101109    or      ah, (RET_HD_RESETFAIL << 1) | 1     ; OR in Reset Failed error code and CF, will SHR into position later
    102 .done:
     110.Done:
    103111    stc                                         ; From IterateAllDPTs perspective, the DPT is never found (continue iteration)
    104112    ret
    105113
    106 
    107 %ifdef MODULE_ADVANCED_ATA
    108 ;--------------------------------------------------------------------
    109 ; Here we initialize the more advanced controllers (VLB and PCI)
    110 ; to get better performance for systems with 32-bit bus.
    111 ;
    112 ; This step is optional since the controllers use slowest possible
    113 ; settings by default if they are not initialized.
    114 ;
    115 ; InitializeAdvancedIdeController
    116 ;   Parameters:
    117 ;       DS:DI:  Ptr to DPT
    118 ;   Returns:
    119 ;       CF:     Cleared if success or no controller to initialize
    120 ;               Set if error
    121 ;   Corrupts registers:
    122 ;       AX, BX, CX, DX
    123 ;--------------------------------------------------------------------
    124 InitializeAdvancedIdeControllers:
    125     ; We want to initialize the advanced controller only after both
    126     ; Master and Slave drive are initialized to correct PIO mode.
    127     ; We check if next DPT is for the same IDE controller. If it is,
    128     ; we skip the initialization.
    129     mov     al, [di+DPT.bIdevarsOffset]
    130     cmp     al, [di++LARGEST_DPT_SIZE+DPT.bIdevarsOffset]
    131     je      SHORT .SkipInitializationUntilNextDrive ; CF cleared
    132 
    133     jmp     AdvAtaInit_InitializeControllerForDPTinDSDI
    134 .SkipInitializationUntilNextDrive:
    135     clc
    136     ret
    137 
    138 %endif  ; MODULE_ADVANCED_ATA
Note: See TracChangeset for help on using the changeset viewer.