news 2026/10/20 2:34:27

关于处理节点BAT1的时候会调用ACPI!GetOpRegionScope和处理节点BAT2的时候就不用调用ACPI!GetOpRegionScope函数了!!!

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
关于处理节点BAT1的时候会调用ACPI!GetOpRegionScope和处理节点BAT2的时候就不用调用ACPI!GetOpRegionScope函数了!!!

关于处理节点BAT1的时候会调用ACPI!GetOpRegionScope和处理节点BAT2的时候就不用调用ACPI!GetOpRegionScope函数了!!!

第一部分:时间上在前。

https://chenghao.blog.csdn.net/article/details/157065028
处理节点BAT1的时候回调用ACPI!GetOpRegionScope
1: kd> kc
#
00 ACPI!AsyncEvalObject
01 ACPI!AMLIAsyncEvalObject
02 ACPI!ACPIGet
03 ACPI!IsPciDeviceWorker
04 ACPI!IsPciDevice
05 ACPI!GetOpRegionScopeWorker
06 ACPI!GetOpRegionScope
07 ACPI!PciConfigSpaceHandlerWorker

08 ACPI!PciConfigSpaceHandler
09 ACPI!InternalOpRegionHandler
0a ACPI!WriteCookAccess
0b ACPI!RunContext
0c ACPI!InsertReadyQueue
0d ACPI!RestartCtxtPassive
0e ACPI!ACPIWorker
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup


NTSTATUS
EXPORT
PciConfigSpaceHandlerWorker(
IN PNSOBJ AcpiObject,
IN NTSTATUS CompletionStatus,
IN POBJDATA Result,
IN PVOID Context
)
{

if (!state->OpRegion->Context) {

if (!(state->Flags & PCISUPP_GOT_SCOPE)) {

state->Flags |= PCISUPP_GOT_SCOPE;

status = GetOpRegionScope(state->OpRegion,
PciConfigSpaceHandlerWorker,
(PVOID)state,
&((PNSOBJ)(state->OpRegion->Context)));

if (status == STATUS_PENDING) {
return status;
}

if (!NT_SUCCESS(status)) {
status = STATUS_SUCCESS;
goto PciConfigSpaceHandlerWorkerDone;
}
}
}

第二部分:时间上在后。


处理节点BAT2的时候就不用调用ACPI!GetOpRegionScope函数了!!!


1: kd> kc
#
00 ACPI!GetPciAddress
01 ACPI!PciConfigSpaceHandlerWorker

02 ACPI!PciConfigSpaceHandler
03 ACPI!InternalOpRegionHandler
04 ACPI!WriteCookAccess
05 ACPI!RunContext
06 ACPI!InsertReadyQueue
07 ACPI!RestartCtxtPassive
08 ACPI!ACPIWorker
09 nt!PspSystemThreadStartup
0a nt!KiThreadStartup

NTSTATUS
EXPORT
PciConfigSpaceHandlerWorker(
IN PNSOBJ AcpiObject,
IN NTSTATUS CompletionStatus,
IN POBJDATA Result,
IN PVOID Context
)
{

//
// If we have not seen this OpRegion before, we need to
// fill in the dwContext with the PNSOBJ of the
// PCI device which the OpRegion relates to.
//

if (!state->OpRegion->Context) {

if (!(state->Flags & PCISUPP_GOT_SCOPE)) {

state->Flags |= PCISUPP_GOT_SCOPE;

status = GetOpRegionScope(state->OpRegion,
PciConfigSpaceHandlerWorker,
(PVOID)state,
&((PNSOBJ)(state->OpRegion->Context)));

if (status == STATUS_PENDING) {
return status;
}

if (!NT_SUCCESS(status)) {
status = STATUS_SUCCESS;
goto PciConfigSpaceHandlerWorkerDone;
}
}
}

//
// Identify the PCI device, that device's extension,
// and the pointer to the interface within the PCI
// driver that does PCI config space reads and writes.
//

state->PciObj = (PNSOBJ)state->OpRegion->Context;

pciDeviceFilter = (PDEVICE_EXTENSION)state->PciObj->Context;

if (pciDeviceFilter == NULL) {

//
// The device has not been initialized yet, we cannot perform
// PCI config cycles to it. Fail gracefully and return all 0xFF
//
bytes = 0;
status = STATUS_SUCCESS;
goto PciConfigSpaceHandlerWorkerDone;
}

ASSERT(pciDeviceFilter);

interface = pciDeviceFilter->Filter.Interface;

ASSERT(interface ? (interface->Size == sizeof(BUS_INTERFACE_STANDARD)) : TRUE);

//
// If interface is non-zero, we have enumerated this PCI
// device. So use the PCI driver to do config ops.
// If it is zero, make some attempt to figure out what
// device this request is for. The result will be
// used in calls to the HAL.
//

if (!interface) {

if (!(state->Flags & PCISUPP_GOT_SLOT_INFO)) {

state->Flags |= PCISUPP_GOT_SLOT_INFO;

status = GetPciAddress(state->PciObj,
PciConfigSpaceHandlerWorker,
(PVOID)state,
&state->Bus,
&state->Slot);

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

文献检索的方法与技巧:提升学术研究效率的关键策略

做科研的第一道坎,往往不是做实验,也不是写论文,而是——找文献。 很多新手科研小白会陷入一个怪圈:在知网、Google Scholar 上不断换关键词,结果要么信息过载,要么完全抓不到重点。今天分享几个长期使用的…

作者头像 李华
网站建设 2026/10/18 22:02:04

大蒜蒸煮机口碑绝佳,这家技术公司凭啥脱颖而出引关注?

《蒸煮机哪家好:排名前五专业深度测评》 开篇:定下基调 在食品加工行业中,蒸煮机作为关键设备,其性能优劣直接影响着产品的质量和生产效率。本次测评旨在为对蒸煮机感兴趣的人群,提供一份客观、专业的产品评估报告&a…

作者头像 李华
网站建设 2026/10/19 10:14:14

ThreadLocal

目录一、使用方式&#xff1a;二、ThreadLocalMap一、使用方式&#xff1a; public class ThreadLocalManager {private final Map<String, String> map new HashMap<>();private static final ThreadLocal<ThreadLocalManager> THREAD_LOCAL ThreadLocal.…

作者头像 李华
网站建设 2026/10/19 12:28:34

如何在 iOS 设备上理解和分析 CPU 使用率(windows环境)

在日常测试或调试中&#xff0c;CPU 使用率几乎是最容易被提到、却也最容易被误解的指标。 有人看到 CPU 一度飙高就紧张&#xff0c;也有人在卡顿出现时却发现 CPU 看起来“还好”。 真正有价值的不是某个瞬时百分比&#xff0c;而是在什么操作下、哪个进程、持续了多久。 下面…

作者头像 李华