news 2026/2/7 21:39:07

ACPI!ACPIDetectPdoDevices函数中ACPIGetDevicePresenceSync宏定义没有找到_STA方法对象的情况建立了PCI0设备

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
ACPI!ACPIDetectPdoDevices函数中ACPIGetDevicePresenceSync宏定义没有找到_STA方法对象的情况建立了PCI0设备

ACPI!ACPIDetectPdoDevices函数中ACPIGetDevicePresenceSync宏定义没有找到_STA方法对象的情况建立了PCI0设备

0: kd> g
Breakpoint 8 hit
eax=00000000 ebx=f743b620 ecx=f789a22c edx=00402000 esi=899c0d58 edi=899c0e78
eip=f74076b8 esp=f789a1f8 ebp=f789a250 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet:
f74076b8 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGet
01 ACPI!ACPIDetectPdoDevices
02 ACPI!ACPIRootIrpQueryBusRelations
03 ACPI!ACPIRootIrpQueryDeviceRelations
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 nt!IopSynchronousCall
07 nt!IopQueryDeviceRelations
08 nt!PipEnumerateDevice
09 nt!PipProcessDevNodeTree
0a nt!PipDeviceActionWorker
0b nt!PipRequestDeviceAction
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup
0: kd> dv
Target = 0x899c0d58
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000


0: kd> dt acpi!_DEVICE_EXTENSION 0x899c0d58
+0x000 Flags : 0x00402000`02010108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c11d0 "ACPI\PNP0A03"
+0x10c Address : 0x899c11d0
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n83
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899affac _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0d38 - 0x8990efe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ae150 - 0x89981b58 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0ea8 - 0x899c0ea8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0eb0 - 0x899c0eb0 ]
0: kd> db 0x899affac
899affac 4c ff 9a 89 ac 40 9b 89-f0 f0 9a 89 24 00 9b 89 L....@......$...
899affbc 50 43 49 30 30 f3 9a 89-4c ff 9a 89 00 00 06 00 PCI00...L.......

Flags = 0x20040802
#define GET_REQUEST_INTEGER 0x00040000


#define GET_REQUEST_BUFFER 0x00010000
#define GET_REQUEST_DATA 0x00020000
#define GET_REQUEST_INTEGER 0x00040000
#define GET_REQUEST_STRING 0x00080000
#define GET_REQUEST_NOTHING 0x00100000


//
// 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 \
)


#define PACKED_STA ((ULONG)'ATS_')


0: kd> r
eax=00000000 ebx=f743b620 ecx=f789a22c edx=00402000 esi=899c0d58 edi=899c0e78
eip=f74076b8 esp=f789a1f8 ebp=f789a250 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet:
f74076b8 55 push ebp
0: kd> dd f789a1f8
f789a1f8 f7400300 899c0d58 4154535f 20040802
f789a208 00000000 00000000 00000000 00000000
f789a218 f789a22c 00000000 80ae2bca 00000000
f789a228 89981a18 0000000c 00000000 89981a18
f789a238 00000000 89981b58 00000000 89981a18
f789a248 00000000 004edc6c f789a270 f744e9d7
f789a258 89981b98 f789a2a4 804edc6c 00000000
f789a268 899bf5b0 00000007 f789a2ac f744ee67
0: kd> db f789a1f8
f789a1f8 00 03 40 f7 58 0d 9c 89-5f 53 54 41 02 08 04 20 ..@.X..._STA...
f789a208 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................


//
// Propogate the information that the caller provided
//
request->Flags = Flags;
request->ObjectID = ObjectID;


if ( (Flags & GET_PROP_ASYNCHRONOUS) ) {

async = TRUE;

}

#define GET_PROP_ASYNCHRONOUS 0x40000000

0: kd> dv async
async = 0x00 ''


//
// We need to allocate the request to hold the context information
// We have no choice but to allocate this from NonPagedPool --- the
// interpreter will be calling us at DPC level
//
request = ExAllocatePoolWithTag(
NonPagedPool,
sizeof(ACPI_GET_REQUEST),
ACPI_MISC_POOLTAG
);


0: kd> p
eax=899ae278 ebx=899c0d58 ecx=000004bb edx=00000009 esi=899ae278 edi=00000000
eip=f7407833 esp=f789a1b8 ebp=f789a1f4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet+0x17b:
f7407833 3bf7 cmp esi,edi

0: kd> dt ACPI_GET_REQUEST 899ae278
+0x000 Flags : 0
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4435535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x89906008 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x8991f8f8 _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a15c -> (null)
+0x024 BufferSize : (null)
+0x028 Status : 0n-1073741772
+0x02c ResultData : _ObjData

//
// Propogate the information that the caller provided
//
request->Flags = Flags;
request->ObjectID = ObjectID;
request->DeviceExtension = deviceExtension;
request->AcpiObject = acpiObject;
request->CallBackRoutine = CallBackRoutine;
request->CallBackContext = CallBackContext;
request->Buffer = Buffer;
request->BufferSize = BufferSize;


0: kd> dt ACPI_GET_REQUEST 899ae278
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000c Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData

InsertTailList(
&(AcpiGetListEntry),
&(request->ListEntry)
);


0: kd> x acpi!AcpiGetListEntry
f743b940 ACPI!AcpiGetListEntry = struct _LIST_ENTRY [ 0x899ae280 - 0xf743b940 ]
0: kd> dx -r1 (*((ACPI!_LIST_ENTRY *)0xf743b940))
(*((ACPI!_LIST_ENTRY *)0xf743b940)) [Type: _LIST_ENTRY]
[+0x000] Flink : 0x899ae280 [Type: _LIST_ENTRY *]
[+0x004] Blink : 0xf743b940 [Type: _LIST_ENTRY *]

0: kd> dt ACPI_GET_REQUEST 0x899ae280-8
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000c Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData

//
// Go out and see if the requested object is present
//
acpiObject = ACPIAmliGetNamedChild(
acpiObject,
ObjectID
);
if (!acpiObject) {

status = STATUS_OBJECT_NAME_NOT_FOUND;
goto ACPIGetExit;

}

#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)

0: kd> p
eax=00000000 ebx=f743b938 ecx=899affac edx=00000000 esi=899ae278 edi=899ae280
eip=f74078dd esp=f789a1b8 ebp=f789a1f4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGet+0x225:
f74078dd 85c0 test eax,eax
0: kd> bp f74078dd
15 e Disable Clear f74078dd [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 251] 0001 (0001) ACPI!ACPIGet+0x225


//
// Go out and see if the requested object is present
//
acpiObject = ACPIAmliGetNamedChild(
acpiObject,
ObjectID
);
if (!acpiObject) { 没有找到名称为_STA的子对象

status = STATUS_OBJECT_NAME_NOT_FOUND;
goto ACPIGetExit;

}
0: kd> dv completionRoutine
completionRoutine = 0xf7407364
0: kd> u f7407364
ACPI!ACPIGetWorkerForInteger [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 4707]:
f7407364 55 push ebp
f7407365 8bec mov ebp,esp
f7407367 51 push ecx
f7407368 53 push ebx
f7407369 8b5d0c mov ebx,dword ptr [ebp+0Ch]
f740736c 85db test ebx,ebx
f740736e 56 push esi
f740736f 57 push edi


0: kd> t
eax=c0000034 ebx=f743b938 ecx=899ae2a4 edx=00000000 esi=899ae278 edi=899ae280
eip=f7407364 esp=f789a1a4 ebp=f789a1f4 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGetWorkerForInteger:
f7407364 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGetWorkerForInteger
01 ACPI!ACPIGet
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
0: kd> dv
AcpiObject = 0x00000000
Status = 0n-1073741772
Result = 0x899ae2a4
Context = 0x899ae278
freeData = 0x00 ''


0: kd> ?0n-1073741772
Evaluate expression: -1073741772 = c0000034


#define GET_CONVERT_TO_DEVICE_PRESENCE 0x00000800

0: kd> dv Context
Context = 0x899ae278

0: kd> dt ACPI_GET_REQUEST 0x899ae278
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000c Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData

} else if (request->Flags & GET_CONVERT_TO_DEVICE_PRESENCE) {

status = ACPIGetConvertToDevicePresence(
request->DeviceExtension,
Status,
Result,
request->Flags,
request->Buffer,
request->BufferSize
);

0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x402000 02010108 [Type: unsigned __int64]

NTSTATUS
ACPIDetectPdoDevices(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_RELATIONS *DeviceRelations
)
{
//
// Update the current device status
//
status = ACPIGetDevicePresenceSync(
deviceExtension,
(PVOID *) &deviceStatus,
NULL
);

//
// If the device exists
//
if ( NT_SUCCESS(status) &&
!(deviceExtension->Flags & DEV_MASK_NOT_PRESENT) ) {

#define DEV_MASK_NOT_PRESENT (DEV_TYPE_NOT_PRESENT | DEV_PROP_FAILED_INIT)

#define DEV_TYPE_NOT_PRESENT 0x0000000000000002

#define DEV_PROP_FAILED_INIT 0x00020000 00000000

参考:
DevNode 0x89db5008 for PDO 0x89db5cb8
InstancePath is "ACPI_HAL\PNP0C08\0"
ServiceName is "ACPI"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0x89d26558 for PDO 0x89d38bf0
InstancePath is "ACPI\PNP0A03\2&daba3ff&0"
ServiceName is "pci"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0x89977178 for PDO 0x89db9290
InstancePath is "PCI\VEN_8086&DEV_7190&SUBSYS_00000000&REV_01\3&61aaa01&0&00"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
参考:


#define DEV_CAP_PROCESSOR 0x00000010 00000000

0: kd> t
eax=f789a22c ebx=c0000034 ecx=20040802 edx=00000000 esi=899ae278 edi=899ae2a4
eip=f7406cd6 esp=f789a174 ebp=f789a1a0 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGetConvertToDevicePresence:
f7406cd6 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGetConvertToDevicePresence
01 ACPI!ACPIGetWorkerForInteger
02 ACPI!ACPIGet
03 ACPI!ACPIDetectPdoDevices
04 ACPI!ACPIRootIrpQueryBusRelations
05 ACPI!ACPIRootIrpQueryDeviceRelations
06 ACPI!ACPIDispatchIrp
07 nt!IofCallDriver
08 nt!IopSynchronousCall
09 nt!IopQueryDeviceRelations
0a nt!PipEnumerateDevice
0b nt!PipProcessDevNodeTree
0c nt!PipDeviceActionWorker
0d nt!PipRequestDeviceAction
0e nt!IopInitializeBootDrivers
0f nt!IoInitSystem
10 nt!Phase1Initialization
11 nt!PspSystemThreadStartup
12 nt!KiThreadStartup
0: kd> dv
DeviceExtension = 0x899c0d58
Status = 0n-1073741772
Result = 0x899ae2a4
Flags = 0x20040802
Buffer = 0xf789a22c
BufferSize = 0x00000000
deviceStatus = 8
0: kd> ?0n-1073741772
Evaluate expression: -1073741772 = c0000034


#define STA_STATUS_PRESENT 0x00000001
#define STA_STATUS_ENABLED 0x00000002
#define STA_STATUS_USER_INTERFACE 0x00000004
#define STA_STATUS_WORKING_OK 0x00000008
#define STA_STATUS_DEFAULT ( STA_STATUS_PRESENT | \
STA_STATUS_ENABLED | \
STA_STATUS_USER_INTERFACE | \
STA_STATUS_WORKING_OK)


if (Status == STATUS_OBJECT_NAME_NOT_FOUND) {

//
// We do make exceptions in the case that this is a processor object
// and we didn't find a control method. In this case, we check the
// processor affinity mask to see if this processor exists. The reason
// that we do this is that older multi-proc capable systems with only
// a single processor will errorneously report both processors.
//
if (DeviceExtension->Flags & DEV_CAP_PROCESSOR) { 不符合


ACPIGetConvertToDevicePresenceExit:

//
// Update the device status
//
ACPIInternalUpdateDeviceStatus( DeviceExtension, deviceStatus );

0: kd> kc
#
00 ACPI!ACPIInternalUpdateDeviceStatus
01 ACPI!ACPIGetConvertToDevicePresence
02 ACPI!ACPIGetWorkerForInteger
03 ACPI!ACPIGet
04 ACPI!ACPIDetectPdoDevices
05 ACPI!ACPIRootIrpQueryBusRelations
06 ACPI!ACPIRootIrpQueryDeviceRelations
07 ACPI!ACPIDispatchIrp
08 nt!IofCallDriver
09 nt!IopSynchronousCall
0a nt!IopQueryDeviceRelations
0b nt!PipEnumerateDevice
0c nt!PipProcessDevNodeTree
0d nt!PipDeviceActionWorker
0e nt!PipRequestDeviceAction
0f nt!IopInitializeBootDrivers
10 nt!IoInitSystem
11 nt!Phase1Initialization
12 nt!PspSystemThreadStartup
13 nt!KiThreadStartup
0: kd> dv
DeviceExtension = 0x899c0d58
DeviceStatus = 0xf
oldIrql = 0x00 ''

#define STA_STATUS_PRESENT 0x00000001
#define STA_STATUS_ENABLED 0x00000002
#define STA_STATUS_USER_INTERFACE 0x00000004
#define STA_STATUS_WORKING_OK 0x00000008
#define STA_STATUS_DEFAULT ( STA_STATUS_PRESENT | \
STA_STATUS_ENABLED | \
STA_STATUS_USER_INTERFACE | \
STA_STATUS_WORKING_OK)


ULONGLONG
ACPIInternalUpdateFlags(
IN PULONGLONG FlagLocation,
IN ULONGLONG NewFlags,
IN BOOLEAN Clear
)


//
// Is the device working okay?
//
originalFlags = ACPIInternalUpdateFlags(
&(DeviceExtension->Flags),
DEV_PROP_DEVICE_FAILED,
(BOOLEAN) (DeviceStatus & STA_STATUS_WORKING_OK)
);

#define DEV_PROP_DEVICE_FAILED 0x00800000 00000000

#define DEV_PROP_DEVICE_ENABLED 0x0040000000000000
#define DEV_PROP_DEVICE_FAILED 0x0080000000000000

0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x402000 02010108 [Type: unsigned __int64]

#define DEV_CAP_NO_SHOW_IN_UI 0x00000000 20000000

//
// Is the device meant to be shown in the UI?
//
originalFlags = ACPIInternalUpdateFlags(
&(DeviceExtension->Flags),
DEV_CAP_NO_SHOW_IN_UI,
(BOOLEAN) (DeviceStatus & STA_STATUS_USER_INTERFACE)
);


0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x402000 02010108 [Type: unsigned __int64]

//
// Is the device decoding its resources?
//
originalFlags = ACPIInternalUpdateFlags(
&(DeviceExtension->Flags),
DEV_PROP_DEVICE_ENABLED,
(BOOLEAN) !(DeviceStatus & STA_STATUS_ENABLED)
);
#define DEV_PROP_DEVICE_ENABLED 0x0040 0000 00000000

0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x402000 02010108 [Type: unsigned __int64]

#define DEV_TYPE_NOT_PRESENT 0x0000000000000002

//
// Update the extensions flags bassed on wether or not STA_STATUS_PRESENT is
// set
//
originalFlags = ACPIInternalUpdateFlags(
&(DeviceExtension->Flags),
DEV_TYPE_NOT_PRESENT,
(BOOLEAN) (DeviceStatus & STA_STATUS_PRESENT)
);

ACPIGetConvertToDevicePresenceExit2:

//
// Set the value for the status
//
*( (PULONG) Buffer) = deviceStatus;
if (BufferSize != NULL) {

*BufferSize = sizeof(ULONG);

}

return STATUS_SUCCESS;

}

*( (PULONG) Buffer) = deviceStatus;

0: kd> dv
DeviceExtension = 0x899c0d58
Status = 0n-1073741772
Result = 0x899ae2a4
Flags = 0x20040802
Buffer = 0xf789a22c
BufferSize = 0x00000000
deviceStatus = 0xf
0: kd> dx -r1 ((ACPI!void * *)0xf789a22c)
((ACPI!void * *)0xf789a22c) : 0xf789a22c [Type: void * *]
0xf [Type: void *] 返回结果!!!

0: kd> p
eax=00000000 ebx=c0000034 ecx=00402000 edx=00000000 esi=899ae278 edi=899ae2a4
eip=f7406df2 esp=f789a164 ebp=f789a170 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIGetConvertToDevicePresence+0x11c:
f7406df2 c9 leave

eax=00000000

return STATUS_SUCCESS;

} else if (request->Flags & GET_CONVERT_TO_DEVICE_PRESENCE) {

status = ACPIGetConvertToDevicePresence(
request->DeviceExtension,
Status,
Result,
request->Flags,
request->Buffer,
request->BufferSize
); 返回到这里:

ACPIGetWorkerForIntegerExit:
//
// Make sure that the request is updated with the current state of
// the request
//
request->Status = status;


0: kd> dt ACPI_GET_REQUEST 0x899ae278
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000f Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData


//
// Call the completion routine to actually do the post-processing
//
(completionRoutine)(
acpiObject,
status,
&(request->ResultData),
request
); 返回到这里:

//
// Get the real status value from the completion routine
//
status = request->Status;

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/1/30 12:17:55

传统vs AI:创建Windows虚拟机效率提升10倍实测

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 请生成两份对比方案:1.传统手动配置Windows 10虚拟机的详细步骤文档 2.AI自动生成的同等配置方案。要求包含:系统版本选择、驱动安装、功能组件启用、性能优…

作者头像 李华
网站建设 2026/1/29 17:48:08

如何用AI工具快速解析UFS文件系统

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个基于AI的UFS文件系统解析工具,能够自动识别UFS分区结构,提取文件元数据,并支持数据恢复功能。工具应具备以下功能:1. 自动扫…

作者头像 李华
网站建设 2026/2/2 17:23:40

AI如何革新SSH工具开发?快马平台实战解析

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 使用快马平台开发一个AI增强的SSH远程工具,需包含以下功能:1. 基于Python的SSH客户端核心功能 2. AI智能命令补全(学习用户习惯命令&#xff09…

作者头像 李华
网站建设 2026/2/2 23:19:39

基于Transformer架构的指数期权时间序列预测系统设计与实现

系统功能与作用说明 本系统旨在利用Transformer深度学习架构对指数期权的时间序列数据进行建模与预测。通过捕捉金融市场中的非线性关系和长程依赖特性,系统能够为交易决策提供量化支持。核心功能包括多维度特征工程、时序数据预处理、Transformer模型构建、训练验证…

作者头像 李华
网站建设 2026/1/30 9:34:31

学长亲荐!专科生必看8款AI论文写作软件测评

学长亲荐!专科生必看8款AI论文写作软件测评推荐1:「千笔AI」—— 一站式学术支持“专家”,学术写作全场景王者(推荐指数:★★★★★) 在众多AI论文写作工具中,「千笔AI」无疑是最具实力的选手之…

作者头像 李华
网站建设 2026/2/4 22:08:54

vue基于springboot的疫苗发布和接种管理系统的设计与实现_932m5091

目录摘要关键技术开发技术核心代码参考示例1.建立用户稀疏矩阵,用于用户相似度计算【相似度矩阵】2.计算目标用户与其他用户的相似度总结源码文档获取/同行可拿货,招校园代理 :文章底部获取博主联系方式!摘要 该系统采用前后端分离架构&…

作者头像 李华