Intel 82801EB Programmer's Reference Manual page 38

Serial ata controller
Table of Contents

Advertisement

Theory of Operation
//
BYTE bMAP = OS_ReadPCI( 0x90); // read the map register
//
// It is assumed that the port is enabled and the device and PHY are not in a
// slumber state as this is required in order for the port presence bits to be
// accurate.
//
BYTE bPCS = OS_ReadPCI( 0x92); // read the port/status control register
//
// check the status of port 0
//
INT iPort0Status, iPort1Status, iAllStatus = 0;
//
// make sure the P-ATA is not the primary channel
//
if( bMAP < 0x06) {
//
// Not P-ATA device. Must be SATA.
//
if( bPCS & 0x10)
iPort0Status = 1; // Port 0 device present
if( bPCS & 0x20)
iPort1Status = 1; // Port 1 device present
// Now we need to figure out which is master and slave (if applicable)
if( !(bMAP & 0x01)) {
// Port 0 is master
iAllStatus = iPort0Status;
// check if combined mode
if( bMAP & 0x04) // Is combined mode?
// yes, set the slave device status (Port 1)
}
else {
// Port 1 is master
iAllStatus = iPort1Status;
if( bMAP & 0x04) // Is combined mode?
// yes, set the slave device status (Port 0)
iAllStatus |= iPort0Status << 1;
}
}
else
// P-ATA does not support this. Indicate connect status unknown
iAllStatus = -1;
//
38
// is Port 0 master?
iAllStatus |= iPort1Status << 1;
SATA Programmer's Reference Manual
R

Advertisement

Table of Contents
loading

This manual is also suitable for:

82801erIch5Ich5r

Table of Contents