Theory of Operation
R
SATA Programmer’s Reference Manual
33
nextStack->Parameters.ReadWriteConfig.Buffer = pBuf;
nextStack->Parameters.ReadWriteConfig.Offset = Offset;
nextStack->Parameters.ReadWriteConfig.Length = Length;
status = IoCallDriver( pDO, irp);
if( status == STATUS_PENDING) {
//
// Request did not complete. Need to wait until it does
//
KeWaitForSingleObject( &event, Suspended, KernelMode, FALSE, NULL);
status = pIrp->IoStatus.Status;
}
return( status);
}
A.2
Enabling/Disabling SATA Ports in the _PSx Control
Method
//
// This sample ASL code demonstrates how to enable and disable the SATA port(s)
// from the _PS0 and _PS3 control methods
//
OperationRegion(IDEC,PCI_Config,0x90,3)
Field(IDEC,ByteAcc,NoLock,Preserve)
{
MAP, 8, // SATA Map register – Offset 90h
, 8, // skip 8 bits
PCS, 8 // SATA Port status and control register – Offset 92h
}
Device( IDE1) {
// SATA controller
Name(_ADR, 0x01f0002) // Device 31, Function 2
//
// EPRT – Enable the SATA ports. This assumes the controller is in combined
// mode. This would be need to modified to handle non-combined modes.
//
Entry:
//
arg0
bit map indicating which port(s) to enable:
//
bit 0 set, enable Port 0
//
bit 1 set, enable Port 1
//
all other bits must be zero
//
//
// Since the ports operate independently, we can enable both
Содержание 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...