Ignore:
Timestamp:
Aug 7, 2021, 9:02:29 AM (3 years ago)
Author:
aitotat
Message:
  • COMMAND_IDLE was not enough to disable standby timer from 1,8" Toshiba HDD. Apparently idle mode is the default mode. Added COMMAND_STAND_BY and that does what COMMAND_IDLE was supposed to do. Without COMMAND_STAND_BY the 1,8" Toshiba HDD experienced some random pauses (=>retry/abort... prompts) especially with Freedos 1.3RC4 but MS-DOS 7.10 (Win98) was mostly OK.
  • Added FEATURE_ENABLE_ADVANCED_POWER_MANAGEMENT command to set drive to maximum performance mode when standby timer is disabled. This feature needs a bit more work. See TODO comments in sources.
File:
1 edited

Legend:

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

    r589 r615  
    101101%endif ; MODULE_8BIT_IDE_ADVANCED
    102102%endif ; MODULE_8BIT_IDE
     103
     104
     105;--------------------------------------------------------------------
     106; Enable/disable advanced power management command can be used to scale
     107; power consumption and performance. Drive supporting Enable APM might not
     108; support Disable AMP so we set the drive to max performance if stand by
     109; timer value is 0 (idle/standby disabled)
     110;
     111;
     112; AH23h_EnableOrDisableAdvancedPowerManagement
     113;   Parameters:
     114;       DL:     Stand By timer value (0=disable APM)
     115;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     116;       SS:BP:  Ptr to IDEPACK
     117;   Returns:
     118;       AH:     Int 13h return status
     119;       CF:     0 if successful, 1 if error
     120;   Corrupts registers:
     121;       AL, BX, CX, DX, SI
     122;--------------------------------------------------------------------
     123%ifdef MODULE_POWER_MANAGEMENT
     124AH23h_EnableOrDisableAdvancedPowerManagement:
     125    mov     si, FEATURE_ENABLE_ADVANCED_POWER_MANAGEMENT
     126    test    dl, dl
     127    jnz     SHORT .EnablePowerSave
     128    dec     dx
     129    dec     dx      ; DL = FEh = Maximum performance
     130    jmp     AH23h_SetControllerFeatures
     131   
     132; TODO: We should add power management level to IDEVARS to be adjustable with xtidecfg
     133.EnablePowerSave:
     134    mov     dl, 0BFh    ; For Toshiba 1.8" HDD: 80h...BFh = Mode 1
     135    jmp     AH23h_SetControllerFeatures
     136%endif ; %ifdef MODULE_POWER_MANAGEMENT
Note: See TracChangeset for help on using the changeset viewer.