Board index Do you have a BIOS problem? Power Management problems Powering the hard drive down programatically using bios

Powering the hard drive down programatically using bios

APM/ACPI BIOS questions
kbeers New visitors - please read the rules.
Recommended by Wim's BIOS... BIOS Agent scan: Upgrade your BIOS! Driver Agent scan: Instant Access to 116,215 Device Drivers Updates!

kbeers New visitors - please read the rules.

Posts: 1
My boss has a program (run in DOS) that will send command sequences to the bios. He has asked me to find out how we can shut the power off to a hard drive using this program. Are there any command sequences or interrupts related to this issue that anyone is aware of?

I am familiar with the "park heads" interrupt, but that is specific to a PS/2 system.


Post Mon Sep 23, 2002 7:37 pm
Rainbow User avatar
The UniFlasher

Posts: 3122
Location: Slovakia

I don't think that there is something like that. However it's easy to communicate with IDE HDDs so you can send the stand-by command. Here is a short code that I did some years ago:
; E0h = Stand-By
; E1h = Idle
; E2h = Timed Stand-By
; E3h = Timed Idle
; E6h = Sleep
.model tiny
.code
org 100h
start:
       HddSDH1  EQU 01F6h                       ; SDH register
       HddCmd1  EQU 01F7h                       ; Command register
       HddSDH2  EQU 0176h                       ; SDH register
       HddCmd2  EQU 0177h                       ; Command register
       Drive0   EQU 00h                         ; 00=Master, 10=slave
       Drive1   EQU 10h                         ; 00=Master, 10=slave

       MOV AL,Drive0                            ; Drive 0 - master
       MOV DX,HddSDH1                           ; Address of SDH register
       OUT DX,AL                                ; Set the SDH register

       MOV AL,0E0h                              ; Stand-By command
       MOV DX,HDDCMD1                           ; Address of Command register
       OUT DX,AL                                ; Send command

       MOV AL,Drive1                            ; Drive 1 - slave
       MOV DX,HddSDH1                           ; Address of SDH register
       OUT DX,AL                                ; Set the SDH register

       MOV AL,0E0h                              ; Stand-By command
       MOV DX,HDDCMD1                           ; Address of Command register
       OUT DX,AL                                ; Send command

       MOV AL,Drive0                            ; Drive 0 - master
       MOV DX,HddSDH2                           ; Address of SDH register
       OUT DX,AL                                ; Set the SDH register

       MOV AL,0E0h                              ; Stand-By command
       MOV DX,HDDCMD2                           ; Address of Command register
       OUT DX,AL                                ; Send command

       MOV AL,Drive1                            ; Drive 1 - slave
       MOV DX,HddSDH2                           ; Address of SDH register
       OUT DX,AL                                ; Set the SDH register

       MOV AL,0E0h                              ; Stand-By command
       MOV DX,HDDCMD2                           ; Address of Command register
       OUT DX,AL                                ; Send command

       int 20h                                  ; Exit .COM program
end start
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere http://www.uniflash.org

Recommended by Wim's BIOS... BIOS Agent scan: Upgrade your BIOS! Driver Agent scan: Instant Access to 116,215 Device Drivers Updates!

Return to Power Management problems

 


  • Related topics
    Replies
    Views
    Last post