Theory of Operation
R
44
SATA Programmer’s Reference Manual
Store( MAP, Local1)
Store( PCS, Local2)
// make sure the P-ATA is not the primary channel
If( LLess( Local1, 0x06))
{
// Not P-ATA device. Must be SATA.
Store( Zero, Local3)
Store( Zero, Local4)
Store( Zero, Local5)
If( LAnd( Local2, 0x10))
{
Store( One, Local3)
// Port 0 device present
}
If( LAnd( Local2, 0x20))
{
Store( One, Local4)
// Port 1 device present
}
// Now we need to figure out which is master and slave (if
// applicable)
If( LNot( LAnd( Local1, 0x01))) // is Port 0 master?
{
// Port 0 is master
Store( Local3, Local5)
If( LAnd( Local1, 0x04)) // Is combined mode?
{
// yes, set the slave device status (Port 1)
Or( ShiftLeft( Local4, 1, Local4), Local5)
}
}
Else
{
// Port 1 is master
Store( Local4, Local5)
If( LAnd( Local1, 0x04)) // Is combined mode?
{
// yes, set the slave device status (Port 0)
Or( ShiftLeft( Local3, 1, Local3), Local5)
}
}
Return( LocaL5)
}
Else
{
// P-ATA is primary. Indicate device status unknown
Summary of Contents for 82801EB
Page 6: ...R 6 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 8: ...Introduction R 8 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 10: ...Conventions R 10 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 59: ...Theory of Operation R SATA Programmer s Reference Manual 59...