Ignore:
Timestamp:
Apr 8, 2013, 5:09:44 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • AH=48h now returns Device Parameter Table Extension when RETURN_DPTE_ON_AH48H is defined.
  • Removed few unnecessary instructions from hardware interrupt handler.
  • P-Cylinders returned by AH=48h are no longer calculated from L-CHS capacity.
File:
1 edited

Legend:

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

    r526 r535  
    4343    mov     BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
    4444    mov     WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h
     45
     46%ifdef RETURN_DPTE_ON_AH48H
     47    call    AH41h_GetSupportBitsToCX
     48    mov     [bp+IDEPACK.intpack+INTPACK.cx], cx
     49%else
    4550    mov     WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT
     51%endif
     52
    4653    and     BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF  ; Return with CF cleared
    4754    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
    4855.EbiosNotSupported:
    4956    jmp     Int13h_DirectCallToAnotherBios
     57
     58
     59%ifdef RETURN_DPTE_ON_AH48H
     60;--------------------------------------------------------------------
     61; AH41h_GetSupportBitsToCX
     62;   Parameters:
     63;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     64;   Returns:
     65;       CX:     Support bits returned by AH=41h
     66;   Corrupts registers:
     67;       Nothing
     68;--------------------------------------------------------------------
     69AH41h_GetSupportBitsToCX:
     70    mov     cx, ENHANCED_DRIVE_ACCESS_SUPPORT
     71
     72    ; DPTE needs buffer from RAM so do not return it in lite mode
     73%ifndef USE_AT
     74    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
     75    jz      SHORT .DoNotSetEDDflag
     76%endif
     77
     78%ifdef MODULE_8BIT_IDE OR MODULE_SERIAL
     79    ; DPTE contains information for device drivers. We should not return
     80    ; DPTE for 8-bit devices since software would think they are 16-bit devices.
     81    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA
     82    jae     SHORT .DoNotSetEDDflag
     83%endif
     84
     85    or      cl, ENHANCED_DISK_DRIVE_SUPPORT ; AH=48h returns DPTE
     86.DoNotSetEDDflag:
     87    ret
     88
     89%endif ; RETURN_DPTE_ON_AH48H
Note: See TracChangeset for help on using the changeset viewer.