Changeset 616 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Aug 8, 2021, 7:03:21 PM (3 years ago)
Author:
Tomi Tilli
Message:
  • Added check for APM
Location:
trunk/XTIDE_Universal_BIOS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc

    r589 r616  
    7272%ifdef MODULE_POWER_MANAGEMENT
    7373    FLGH_DPT_POWER_MANAGEMENT_SUPPORTED EQU (1<<3)              ; Bit 3, Drive supports power management (must be bit 3!)
     74    FLGH_DPT_APM_SUPPORTED              EQU (1<<4)              ; Bit 4, Drive supports advanced power management (must be bit 4!)
    7475%endif
    7576%ifdef MODULE_ADVANCED_ATA
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm

    r608 r616  
    4747.DetectPowerManagementSupport:
    4848    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
    4952    and     al, A6_wSetSup82_POWERMAN   ; A6_wSetSup82_POWERMAN (bit 3) is the same
    50     or      [di+DPT.bFlagsHigh], al     ; bit as FLGH_DPT_POWER_MANAGEMENT_SUPPORTED
     53    or      al, ah
     54    or      [di+DPT.bFlagsHigh], al     ; bit as FLGH_DPT_POWER_MANAGEMENT_SUPPORTED and FLGH_DPT_APM_SUPPORTED
    5155%endif ; MODULE_POWER_MANAGEMENT
    5256
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm

    r615 r616  
    197197;;; InitStandbyTimer
    198198    ; Initialize the standby timer (if supported)
    199     test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED
     199    mov     dh, [di+DPT.bFlagsHigh]
     200    test    dh, FLGH_DPT_POWER_MANAGEMENT_SUPPORTED
    200201    jz      SHORT .NoPowerManagementSupport
    201202
    202203    ; Do we need to disable APM?
    203 ;TODO: We should check APM feature set flag from ATA ID word 83. The above
    204 ;FLGH_DPT_POWER_MANAGEMENT_SUPPORTED is from ATA ID word 82
    205204    mov     dl, [cs:ROMVARS.bIdleTimeout]
    206205    push    dx
    207206    push    dx
     207    test    dh, FLGH_DPT_APM_SUPPORTED
     208    jz      SHORT .NoAdvancedPowerManagementSupport
    208209    call    AH23h_EnableOrDisableAdvancedPowerManagement
     210.NoAdvancedPowerManagementSupport:
    209211
    210212    ; COMMAND_IDLE is not enough for Toshiba 1,8" HDD since idle mode is the default mode
Note: See TracChangeset for help on using the changeset viewer.