Theory of Operation
R
34
SATA Programmer’s Reference Manual
// simultaneously if necessary
//
Method( EPRT, 1) {
Store( 1, Local0) // Set max attempts
Store( Arg0, Local1)
While( LNotEqual( Local0, 0)){
Or( Arg0, PCS, PCS) // enable Port(s)
Sleep( 500) // Wait 500ms. Some devices respond
// very quickly, some longer. This loop will
// account for worse case. This is an
// example and could be better optimized
Decrement( Local0) // account for this attempt
Store( PCS, Local2) // fetch port presence bits
// Check if we are enabling Port 0
If( LAnd( Arg0, 0x01) {
If( LAnd( Local2, 0x10)) {
Decrement( Local1) // Port 0 is enabled
}
Else {
//
// Since a device detect failed, we disable the port. This will
// insure that the port remains disabled - this is not
// required, but is part of a good power conservation policy.
//
And( PCS, 0x02, PCS) // disable Port 0
}
}
// Check if we are enabling Port 1
If( LAnd( Arg0, 0x02) {
If( LAnd( Local2, 0x20)) {
Decrement( Local1) // Port 1 is enabled
}
Else {
And( PCS, 0x01, PCS) // disable Port 1
}
}
If( LEqual( Local1, Zero)) { // all ports enabled?
Store( Zero, Local0) // terminate loop
}
} // end while
}
Device( PRID) { // Primary channel
Name( _ADR, 0) // Logical primary channel (Port 0 or 1, BIOS selectable).
// Assumes BIOS populated the SATA timing registers appropriately
Содержание 82801EB
Страница 6: ...R 6 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 8: ...Introduction R 8 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 10: ...Conventions R 10 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 30: ...Theory of Operation R 30 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 46: ...Theory of Operation R 46 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 59: ...Theory of Operation R SATA Programmer s Reference Manual 59...