Ignore:
Timestamp:
Jun 3, 2015, 12:30:54 PM (9 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Fixed a bug in AH24h_HSetBlocks.asm from r550. Trying to set a too large block size with an XT-CF card in DMA transfer mode would corrupt the stack.
  • Fixed a bug from r545 where the list of devices under g_szDeviceTypeValues in Strings.asm was no longer up to date causing the boot menu to display the wrong string for devices numbered higher than DEVICE_8BIT_XTCF_PIO8.
  • Made some fairly significant changes to the XT-CF code to reduce size. Two changes in functionality; 1) Added a simple check to validate the request for a change of the XT-CF transfer mode. 2) Changing transfer mode to use DMA no longer calls AH24h_SetBlockSize if the block size already is within the limits of DMA transfers. UNTESTED
  • XTIDECFG now clears IDEVARS.bIRQ when changing IDE controller to a serial device to keep the boot menu from displaying it since the serial device doesn't use IRQs at all.
  • Other minor optimizations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm

    r567 r588  
    234234
    235235
     236%ifdef MODULE_8BIT_IDE
     237;--------------------------------------------------------------------
     238; AH9h_Enable8bitModeForDevice8bitAta
     239;   Parameters:
     240;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     241;       SS:BP:  Ptr to IDEPACK
     242;   Returns:
     243;       AH:     Int 13h return status
     244;       CF:     Clear if successful or device is not DEVICE_8BIT_ATA
     245;               Set if failed to set 8-bit mode for DEVICE_8BIT_ATA
     246;   Corrupts registers:
     247;       AL, BX, CX, DX, SI
     248;--------------------------------------------------------------------
     249AH9h_Enable8bitModeForDevice8bitAta:
     250    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA
     251%ifdef MODULE_8BIT_IDE_ADVANCED
     252    jne     SHORT IgnoreInvalidCommandError
     253    jmp     AH23h_Enable8bitPioMode
     254%else ; ~MODULE_8BIT_IDE_ADVANCED
     255    je      AH23h_Enable8bitPioMode
     256    ; Fall to IgnoreInvalidCommandError
     257%endif ; MODULE_8BIT_IDE_ADVANCED
     258%endif ; MODULE_8BIT_IDE
     259
     260
     261%ifdef MODULE_8BIT_IDE_ADVANCED
     262;--------------------------------------------------------------------
     263; AH9h_SetModeFromALtoXTCF
     264;   Parameters:
     265;       AL:     XT-CF Mode to set
     266;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     267;       SS:BP:  Ptr to IDEPACK
     268;   Returns:
     269;       AH:     Int 13h return status
     270;       CF:     Clear if successful or device is not XT-CF
     271;               Set if failed to set mode for XT-CF
     272;   Corrupts registers:
     273;       AL, BX, CX, DX, SI
     274;--------------------------------------------------------------------
     275AH9h_SetModeFromALtoXTCF:
     276    call    AccessDPT_IsThisDeviceXTCF
     277    jnc     AH1Eh_ChangeXTCFmodeBasedOnModeInAL
     278    ; Fall to IgnoreInvalidCommandError
     279%endif ; MODULE_8BIT_IDE_ADVANCED
     280
     281
    236282;--------------------------------------------------------------------
    237283; SetErrorFlagFromALwithErrorCodeInAH
     
    259305.NoErrorFlagToSet:
    260306    ret
    261 
    262 
    263 %ifdef MODULE_8BIT_IDE_ADVANCED
    264 ;--------------------------------------------------------------------
    265 ; AH9h_SetModeFromALtoXTCF
    266 ;   Parameters:
    267 ;       AL:     XT-CF Mode to set
    268 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    269 ;       SS:BP:  Ptr to IDEPACK
    270 ;   Returns:
    271 ;       AH:     Int 13h return status
    272 ;       CF:     Clear if successful or device is not XT-CF
    273 ;               Set if failed to set mode for XT-CF
    274 ;   Corrupts registers:
    275 ;       AL, BX, CX, DX, SI
    276 ;--------------------------------------------------------------------
    277 AH9h_SetModeFromALtoXTCF:
    278     call    AccessDPT_IsThisDeviceXTCF
    279     jne     SHORT IgnoreInvalidCommandError
    280     jmp     AH1Eh_ChangeXTCFmodeBasedOnModeInAL
    281 %endif ; MODULE_8BIT_IDE_ADVANCED
    282 
    283 
    284 %ifdef MODULE_8BIT_IDE
    285 ;--------------------------------------------------------------------
    286 ; AH9h_Enable8bitModeForDevice8bitAta
    287 ;   Parameters:
    288 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    289 ;       SS:BP:  Ptr to IDEPACK
    290 ;   Returns:
    291 ;       AH:     Int 13h return status
    292 ;       CF:     Clear if successful or device is not DEVICE_8BIT_ATA
    293 ;               Set if failed to set 8-bit mode for DEVICE_8BIT_ATA
    294 ;   Corrupts registers:
    295 ;       AL, BX, CX, DX, SI
    296 ;--------------------------------------------------------------------
    297 AH9h_Enable8bitModeForDevice8bitAta:
    298     cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA
    299     jne     SHORT IgnoreInvalidCommandError
    300     jmp     AH23h_Enable8bitPioMode
    301 %endif ; MODULE_8BIT_IDE
Note: See TracChangeset for help on using the changeset viewer.