Changeset 618 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE


Ignore:
Timestamp:
Aug 31, 2021, 2:17:47 PM (3 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • Updated the BIOS makefile. Added the NO_ATAID_CORRECTION define back to the Tiny build as I've realized that the correction code should not be needed for builds without MODULE_EBIOS. Also added a new makefile target 'custom' to make it easier for people to make custom builds.
  • Fixed a bug where calling INT 13h/AH=15h for drives not handled by XUB (floppy drives for example) would return an error due to the fact that any non-zero return value in AH from the other BIOS would cause the CF to be set in Int13h_SetErrorCodeToIntpackInSSBPfromAH. The return path is now via Int13h_ReturnFromHandlerWithoutStoringErrorCode which means that no status/error code will be returned in the BDA but that should not be a problem as the other BIOS should do that anyway. This change also fixed another potential problem where return values in DL from the other BIOS were assumed to be drive numbers when MODULE_SERIAL_FLOPPY is included in the build.
  • Minor optimizations and fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm

    r616 r618  
    4343;       Nothing
    4444;   Corrupts registers:
    45 ;       AL
     45;       AX
    4646;--------------------------------------------------------------------
    4747.DetectPowerManagementSupport:
    48     mov     al, [es:si+ATA6.wSetSup82]
    49     mov     ah, [es:si+ATA6.wSetSup83]
    50     and     ah, A6_wSetSup83_APM
    51     shl     ah, 1                       ; APM bit 3 to bit 4
    52     and     al, A6_wSetSup82_POWERMAN   ; A6_wSetSup82_POWERMAN (bit 3) is the same
     48    mov     ax, A6_wSetSup83_APM << 8 | A6_wSetSup82_POWERMAN   ; Both of these flags are bit 3
     49    and     ah, [es:si+ATA6.wSetSup83]
     50    and     al, [es:si+ATA6.wSetSup82]
     51    eSHL_IM ah, 1                       ; APM bit 3 to bit 4 (same as FLGH_DPT_APM_SUPPORTED)
    5352    or      al, ah
    54     or      [di+DPT.bFlagsHigh], al     ; bit as FLGH_DPT_POWER_MANAGEMENT_SUPPORTED and FLGH_DPT_APM_SUPPORTED
     53    or      [di+DPT.bFlagsHigh], al     ; FLGH_DPT_POWER_MANAGEMENT_SUPPORTED and FLGH_DPT_APM_SUPPORTED
    5554%endif ; MODULE_POWER_MANAGEMENT
    5655
     
    118117    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_32BIT_ATA
    119118    ja      SHORT .NoAdvancedControllerDetected
    120    
     119
    121120    mov     bx, [di+DPT.wBasePort]
    122121    call    AdvAtaInit_DetectControllerForIdeBaseInBX
Note: See TracChangeset for help on using the changeset viewer.