ACPI!ACPIBuildProcessRunMethodPhaseCheckSta函数和ACPI!ACPIDetectPdoDevices函数都调用了ACPIGetDevicePresenceAsync--有必要吗
1: kd> kc
#
00 ACPI!ACPIAmliGetNamedChild
01 ACPI!ACPIGet
02 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
03 ACPI!ACPIBuildProcessGenericList
04 ACPI!ACPIBuildDeviceDpc
05 nt!KiRetireDpcList
06 nt!KiDispatchInterrupt
NTSTATUS
ACPIBuildProcessRunMethodPhaseCheckSta(
IN PACPI_BUILD_REQUEST BuildRequest
)
{
//
// Do we have to check the device status?
//
if (BuildRequest->RunRequest.Flags & RUN_REQUEST_CHECK_STATUS) {
//
// Get the device status
//
status = ACPIGetDevicePresenceAsync(
deviceExtension,
ACPIBuildCompleteMustSucceed,
BuildRequest,
(PVOID *) &(BuildRequest->Integer),
NULL
);
0: kd> kc
#
00 nt!IoCreateDevice
01 ACPI!ACPIBuildPdo
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
NTSTATUS
ACPIDetectPdoDevices(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_RELATIONS *DeviceRelations
)
{
//
// Update the current device status
//
status = ACPIGetDevicePresenceSync(
deviceExtension,
(PVOID *) &deviceStatus,
NULL
);
//
// This macro is used to get the device status synchronously
//
#define ACPIGetDevicePresenceSync( \
DeviceExtension, \
Buffer, \
BufferSize \
) \
ACPIGetDevicePresence( \
DeviceExtension, \
GET_PROP_SKIP_CALLBACK, \
NULL, \
NULL, \
Buffer, \
BufferSize \
)
//
// This macro is used to get the device presence
//
#define ACPIGetDevicePresence( \
DeviceExtension, \
Flags, \
CallBack, \
Context, \
Buffer, \
BufferSize \
) \
ACPIGet( \
DeviceExtension, \
PACKED_STA, \
(GET_REQUEST_INTEGER | \
GET_TYPE_INTEGER | \
GET_CONVERT_TO_DEVICE_PRESENCE | \
Flags ), \
NULL, \
0, \
CallBack, \
Context, \
(PVOID *) Buffer, \
(PULONG) BufferSize \
)