Ignore:
Timestamp:
May 26, 2014, 1:25:15 PM (10 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Renamed MODULE_FEATURE_SETS to MODULE_POWER_MANAGEMENT.
  • Renamed MODULE_VERY_LATE_INITIALIZATION to MODULE_VERY_LATE_INIT and removed it from the official builds.
  • Removed the code that skips detection of slave drives on XT-CF controllers since slave drives can be used with Lo-tech ISA CompactFlash boards.
  • Added autodetection of the SVC ADP50L controller to XTIDECFG.
  • The autodetection of XT-CF controllers now requires MODULE_8BIT_IDE_ADVANCED in the loaded BIOS.
  • Fixed a bug in XTIDECFG from r502 where the "Base (cmd block) address" menu option would be displayed when a serial device was selected as the IDE controller.
  • XTIDECFG would display the "Enable interrupt" menu option for the XTIDE r1 but not for the XTIDE r2. It's now displayed for both controller types.
  • Disabled the "Internal Write Cache" menu option in the Master/Slave Drive menus for serial device type drives.
  • Optimizations and other fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r526 r567  
    7575    jb      SHORT .DiskIsNotHandledByThisBIOS
    7676%endif
    77     ; fall-through to CalcDPTForDriveNumber
     77    ; Fall to .CalcDPTForDriveNumber
    7878
    7979;--------------------------------------------------------------------
     
    8181; Not intended to be called except by FindDPT_ForDriveNumberInDL
    8282;
    83 ; CalcDPTForDriveNumber
     83; .CalcDPTForDriveNumber
    8484;   Parameters:
    8585;       DL:     Drive number
    8686;       DS:     RAMVARS segment
    87 ;       DI:     Saved copy of AX from entry at FindDPT_ForDriveNumberInDL
     87;       DI:     Saved copy of AX from entry at FindDPT_ForDriveNumberInDL
    8888;   Returns:
    8989;       DS:DI:  Ptr to DPT
    90 ;       CF:     Clear
     90;       CF:     Clear
    9191;   Corrupts registers:
    9292;       Nothing
     
    136136
    137137;--------------------------------------------------------------------
    138 ; FindDPT_MasterOrSingleForIdevarsOffsetInDL
    139 ;   Parameters:
    140 ;       DL:     Offset to IDEVARS to search for
    141 ;       DS:     RAMVARS segment
    142 ;   Returns:
    143 ;       DS:DI:      Ptr to first DPT with same IDEVARS as in DL
    144 ;       CF:         Clear if wanted DPT found
    145 ;                   Set if DPT not found, or no DPTs present
    146 ;   Corrupts registers:
    147 ;       SI
    148 ;--------------------------------------------------------------------
    149 FindDPT_MasterOrSingleForIdevarsOffsetInDL:
    150     mov     si, IterateFindFirstDPTforIdevars           ; iteration routine (see below)
    151     jmp     SHORT FindDPT_IterateAllDPTs                ; look for the first drive on this controller, if any
    152 
    153 ;--------------------------------------------------------------------
    154 ; FindDPT_SlaveForIdevarsOffsetInDL
    155 ;   Parameters:
    156 ;       DL:     Offset to IDEVARS to search for
    157 ;       DS:     RAMVARS segment
    158 ;   Returns:
    159 ;       DS:DI:      Ptr to second DPT with same IDEVARS as in DL
    160 ;       CF:         Clear if wanted DPT found
    161 ;                   Set if DPT not found, or no DPTs present
    162 ;   Corrupts registers:
    163 ;       SI
    164 ;--------------------------------------------------------------------
    165 FindDPT_SlaveForIdevarsOffsetInDL:
    166     mov     si, IterateFindSecondDPTforIdevars          ; iteration routine (see below)
    167     jmp     SHORT FindDPT_IterateAllDPTs                ; look for the second drive on this controller, if any
    168 
    169 ;--------------------------------------------------------------------
    170138; Iteration routines for FindDPT_MasterOrSingleForIdevarsOffsetInDL and
    171139; FindDPT_SlaveForIdevarsOffsetInDL, for use with IterateAllDPTs
     
    175143; IterateFindSecondDPTforIdevars
    176144; IterateFindFirstDPTforIdevars
    177 ;       DL:     Offset to IDEVARS to search from DPTs
     145;       DL:     Offset to IDEVARS to search from DPTs
    178146;       SI:     Offset to this callback function
    179147;       DS:DI:  Ptr to DPT to examine
    180148;   Returns:
    181 ;       CF:     Clear if wanted DPT found
     149;       CF:     Cleared if wanted DPT found
    182150;               Set if wrong DPT
    183151;--------------------------------------------------------------------
     
    192160IterateFindFirstDPTforIdevars:
    193161    cmp     dl, [di+DPT.bIdevarsOffset]         ; Clears CF if matched
    194     je      .done
     162    je      .Done
    195163    stc                                         ; Set CF for not found
    196 .done:
     164.Done:
    197165    ret
    198166
     
    221189%endif
    222190
    223     jmp     short FindDPT_ForDriveNumberInDL.CalcDPTForNewDrive
     191    jmp     SHORT FindDPT_ForDriveNumberInDL.CalcDPTForNewDrive
    224192
    225193;--------------------------------------------------------------------
     
    227195;   Parameters:
    228196;       DS:DI:  Ptr to DPT to examine
    229 ;       BL:     Bit(s) to test in DPT.bFlagsHigh
    230 ;   Returns:
    231 ;       CF:     Clear if wanted DPT found
     197;       BL:     Bit(s) to test in DPT.bFlagsHigh
     198;   Returns:
     199;       CF:     Cleared if wanted DPT found
    232200;               Set if wrong DPT
    233201;   Corrupts registers:
    234202;       Nothing
    235203;--------------------------------------------------------------------
     204%ifdef MODULE_SERIAL
    236205ALIGN JUMP_ALIGN
    237206IterateToDptWithFlagsHighInBL:
     
    241210.ReturnRightDPT:
    242211    ret
     212%endif
    243213
    244214;--------------------------------------------------------------------
     
    248218;   Returns:
    249219;       DS:DI:  Ptr to DPT
    250 ;       CF:     Set if wanted DPT found
    251 ;               Cleared if DPT not found
     220;       CF:     Cleared if wanted DPT found
     221;               Set if DPT not found, or no DPTs present
    252222;   Corrupts registers:
    253223;       SI
     
    257227FindDPT_ToDSDIforSerialDevice:
    258228    mov     bl, FLGH_DPT_SERIAL_DEVICE
    259 ; fall-through
    260 %endif
    261 
    262 ;--------------------------------------------------------------------
    263 ; FindDPT_ToDSDIforFlagsHigh
    264 ;   Parameters:
    265 ;       DS:     RAMVARS segment
    266 ;       BL:     Bit(s) to test in DPT.bFlagsHigh
     229    ; Fall to FindDPT_ToDSDIforFlagsHighInBL
     230%endif
     231
     232;--------------------------------------------------------------------
     233; FindDPT_ToDSDIforFlagsHighInBL
     234;   Parameters:
     235;       DS:     RAMVARS segment
     236;       BL:     Bit(s) to test in DPT.bFlagsHigh
    267237;   Returns:
    268238;       DS:DI:  Ptr to DPT
    269 ;       CF:     Set if wanted DPT found
    270 ;               Cleared if DPT not found
     239;       CF:     Cleared if wanted DPT found
     240;               Set if DPT not found, or no DPTs present
    271241;   Corrupts registers:
    272242;       SI
    273243;--------------------------------------------------------------------
    274 %ifdef MODULE_IRQ
    275 ALIGN JUMP_ALIGN
    276 FindDPT_ToDSDIforFlagsHighInBL:
    277 %endif
     244%ifdef MODULE_SERIAL
     245;%ifdef MODULE_IRQ
     246;ALIGN JUMP_ALIGN
     247;FindDPT_ToDSDIforFlagsHighInBL:    ; This label is unused
     248;%endif
    278249    mov     si, IterateToDptWithFlagsHighInBL
    279     ; Fall to IterateAllDPTs
     250    jmp     SHORT FindDPT_IterateAllDPTs
     251%endif
     252
     253;--------------------------------------------------------------------
     254; FindDPT_MasterOrSingleForIdevarsOffsetInDL
     255;   Parameters:
     256;       DL:     Offset to IDEVARS to search for
     257;       DS:     RAMVARS segment
     258;   Returns:
     259;       DS:DI:  Ptr to first DPT with same IDEVARS as in DL
     260;       CF:     Cleared if wanted DPT found
     261;               Set if DPT not found, or no DPTs present
     262;   Corrupts registers:
     263;       SI
     264;--------------------------------------------------------------------
     265FindDPT_MasterOrSingleForIdevarsOffsetInDL:
     266    mov     si, IterateFindFirstDPTforIdevars
     267    jmp     SHORT FindDPT_IterateAllDPTs
     268
     269;--------------------------------------------------------------------
     270; FindDPT_SlaveForIdevarsOffsetInDL
     271;   Parameters:
     272;       DL:     Offset to IDEVARS to search for
     273;       DS:     RAMVARS segment
     274;   Returns:
     275;       DS:DI:  Ptr to second DPT with same IDEVARS as in DL
     276;       CF:     Cleared if wanted DPT found
     277;               Set if DPT not found, or no DPTs present
     278;   Corrupts registers:
     279;       SI
     280;--------------------------------------------------------------------
     281FindDPT_SlaveForIdevarsOffsetInDL:
     282    mov     si, IterateFindSecondDPTforIdevars
     283    ; Fall to FindDPT_IterateAllDPTs
    280284
    281285;--------------------------------------------------------------------
     
    286290;       AX,BX,DX:   Parameters to callback function
    287291;       CS:SI:      Ptr to callback function
    288 ;                   Callback routine should return CF=clear if found
     292;                   Callback routine should return CF=clear if found
    289293;       DS:         RAMVARS segment
    290294;   Returns:
    291295;       DS:DI:      Ptr to wanted DPT (if found)
    292296;                   If not found, points to first empty DPT
    293 ;       CF:         Clear if wanted DPT found
     297;       CF:         Cleared if wanted DPT found
    294298;                   Set if DPT not found, or no DPTs present
    295299;   Corrupts registers:
Note: See TracChangeset for help on using the changeset viewer.