当前位置: 首页 > news >正文

ACPI!GetPciAddressWorker函数中的hal!HalGetBusDataByOffset参数是父总线号和父插槽号--重要

ACPI!GetPciAddressWorker函数中的hal!HalGetBusDataByOffset参数是父总线号和父插槽号

第0部分:

//
// Read the config space for this device.
//
bytesRead = HalGetBusDataByOffset(PCIConfiguration,
state->ParentBus,父总线
state->ParentSlot.u.AsULONG,父插槽
buffer,
0,
PCI_COMMON_HDR_LENGTH);

第一部分:


关键断点:
bp ACPI!GetPciAddressWorker+0x127
bp ACPI!GetPciAddressWorker+0x12d
关键断点:

第二部分:

1: kd> g
| | | | | | | AsyncCallBack(pctxt=895c6000,rc=0,Obj=\_SB.PCI0._BBN,pdataCallBack=8996826c,pvContext=89968240)
AMLI:| | | | | | | | AMLIFreeDataBuffs(pdata=8996826c,icData=1)
AMLI:| | | | | | | | | FreeDataBuffs(adata=8996826c,icData=1)
AMLI:| | | | | | | | | FreeDataBuff!
AMLI:| | | | | | | | AMLIFreeDataBuffs!
Breakpoint 6 hit
eax=00000000 ebx=00000000 ecx=8996cd78 edx=00000013 esi=895901f8 edi=00000103
eip=804f25ee esp=f791abdc ebp=f791ac48 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
hal!HalGetBusDataByOffset:
804f25ee 55 push ebp
1: kd> kc
#
00 hal!HalGetBusDataByOffset
01 ACPI!GetPciAddressWorker
02 ACPI!GetPciAddressWorker
03 ACPI!ACPIGetWorkerForInteger
04 ACPI!AsyncCallBack
05 ACPI!RunContext
06 ACPI!DispatchCtxtQueue
07 ACPI!StartTimeSlicePassive
08 ACPI!ACPIWorker
09 nt!PspSystemThreadStartup
0a nt!KiThreadStartup

1: kd> dv
BusDataType = PCIConfiguration (0n4)
BusNumber = 0
SlotNumber = 0x11
Buffer = 0xf791ac04
Offset = 0
Length = 0x40
bus = struct _BUS_HANDLER

1: kd> gu

*** ISR at f7409b10 took over .5 second
eax=00000040 ebx=00000000 ecx=00000000 edx=00000000 esi=895901f8 edi=00000103
eip=f740d017 esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x12d:
f740d017 85c0 test eax,eax
1: kd> p
eax=00000040 ebx=00000000 ecx=00000000 edx=00000000 esi=895901f8 edi=00000103
eip=f740d019 esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x12f:
f740d019 0f84a1000000 je ACPI!GetPciAddressWorker+0x1d6 (f740d0c0) [br=0]


1: kd> dt acpi!pci_common_config 0xf791ac04
+0x000 VendorID : 0x15ad
+0x002 DeviceID : 0x790
+0x004 Command : 7
+0x006 Status : 0x290
+0x008 RevisionID : 0x2 ''
+0x009 ProgIf : 0x1 ''
+0x00a SubClass : 0x4 ''
+0x00b BaseClass : 0x6 ''
+0x00c CacheLineSize : 0x8 ''
+0x00d LatencyTimer : 0x40 '@'
+0x00e HeaderType : 0x1 ''关键数据:PCI_BRIDGE_TYPE 是PCI桥!!!
+0x00f BIST : 0 ''
+0x010 u : __unnamed
+0x040 DeviceSpecific : [192] "RE???"

pciConfig = (PPCI_COMMON_CONFIG)buffer;

if (pciConfig->HeaderType != PCI_BRIDGE_TYPE) {


#define PCI_BRIDGE_TYPE 0x01
#define PCI_CARDBUS_BRIDGE_TYPE 0x02


+0x000 type1 : _PCI_HEADER_TYPE_1
+0x000 BaseAddresses : [2] 0
+0x008 PrimaryBus : 0 '' +0x008 PrimaryBus : 0
+0x009 SecondaryBus : 0x2 '' +0x009 SecondaryBus : 0x2 ''
+0x00a SubordinateBus : 0x2 '' +0x00a SubordinateBus : 0x2 ''

+0x00b SecondaryLatency : 0x44 'D'
+0x00c IOBase : 0xf0 ''
+0x00d IOLimit : 0 ''
+0x00e SecondaryStatus : 0x280
+0x010 MemoryBase : 0xfff0
+0x012 MemoryLimit : 0
+0x014 PrefetchBase : 0xfff1
+0x016 PrefetchLimit : 1
+0x018 PrefetchBaseUpper32 : 0
+0x01c PrefetchLimitUpper32 : 0
+0x020 IOBaseUpper16 : 0
+0x022 IOLimitUpper16 : 0
+0x024 CapabilitiesPtr : 0x40 '@'
+0x025 Reserved1 : [3] ""
+0x028 ROMBaseAddress : 0
+0x02c InterruptLine : 0xff ''
+0x02d InterruptPin : 0 ''
+0x02e BridgeControl : 4

F:\srv03rtm>grep "u.type1.SecondaryBus" -nr F:\srv03rtm\base\busdrv\acpi |grep -v "inary"
F:\srv03rtm\base\busdrv\acpi/driver/nt/pciopregion.c:317: if (pciData.u.type1.SecondaryBus != 0) {
F:\srv03rtm\base\busdrv\acpi/driver/nt/pciopregion.c:323: HalSetMaxLegacyPciBusNumber(pciData.u.type1.SecondaryBus);
F:\srv03rtm\base\busdrv\acpi/driver/nt/pciopregion.c:1135: *state->Bus = pciConfig->u.type1.SecondaryBus;


//
// Success. Record the actual bus number of
// the secondary PCI bus and exit.
// 成功,记录真正的总线号。
*state->Bus = pciConfig->u.type1.SecondaryBus;

status = STATUS_SUCCESS;
goto GetPciAddressWorkerExit; 不会运行下面的// Is there a _BBN to run?

}

//
// Is there a _BBN to run?
//
tempObj = ACPIAmliGetNamedChild(bus, PACKED_BBN);
if (tempObj) {


1: kd> p
eax=00000040 ebx=00000000 ecx=00000000 edx=00000000 esi=895901f8 edi=00000103
eip=f740d029 esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x13f:
f740d029 8b4604 mov eax,dword ptr [esi+4] ds:0023:895901fc=89986fc0
1: kd> p
eax=89986fc0 ebx=00000000 ecx=00000000 edx=00000000 esi=895901f8 edi=00000103
eip=f740d02c esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x142:
f740d02c 8a4dd5 mov cl,byte ptr [ebp-2Bh] ss:0010:f791ac1d=02
1: kd> p
eax=89986fc0 ebx=00000000 ecx=00000002 edx=00000000 esi=895901f8 edi=00000103
eip=f740d02f esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x145:
f740d02f 8808 mov byte ptr [eax],cl ds:0023:89986fc0=00
1: kd> dd 89986fc0
89986fc0 00000000 00000000 00000000 00000000
89986fd0 00000000 00000000 00000000 00000000
89986fe0 00000000 00000000 00000000 00000000
89986ff0 00000000 8996e010 00000000 00000000
89987000 0a690000 20707249 03400006 00000000
89987010 00000000 00000000 89987018 89987018
89987020 00000000 00000000 15140000 00000000
89987030 00000000 00000000 00000000 00000000
1: kd> dt GET_ADDRESS_CONTEXT 895901f8
ACPI!GET_ADDRESS_CONTEXT
+0x000 PciObject : 0x8996e010 _NSObj
+0x004 Bus : 0x89986fc0 ""
+0x008 Slot : 0x89986fbc _PCI_SLOT_NUMBER
+0x00c ParentBus : 0 ''
+0x010 ParentSlot : _PCI_SLOT_NUMBER
+0x014 Flags : 0x128
+0x018 Address : 0x30000
+0x01c BaseBusNumber : 0
+0x020 RunCompletion : 0n2
+0x024 CompletionRoutine : 0xf740d62c void ACPI!PciConfigSpaceHandlerWorker+0
+0x028 CompletionContext : 0x89986f88 Void
1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!unsigned char *)0x89986fc0)
((ACPI!unsigned char *)0x89986fc0) : 0x89986fc0 : 0x0 [Type: unsigned char *]
0x0 [Type: unsigned char]

1: kd> p
eax=89986fc0 ebx=00000000 ecx=00000002 edx=00000000 esi=895901f8 edi=00000103
eip=f740d031 esp=f791abf8 ebp=f791ac48 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!GetPciAddressWorker+0x147:
f740d031 e98a000000 jmp ACPI!GetPciAddressWorker+0x1d6 (f740d0c0)
1: kd> dt GET_ADDRESS_CONTEXT 895901f8
ACPI!GET_ADDRESS_CONTEXT
+0x000 PciObject : 0x8996e010 _NSObj
+0x004 Bus : 0x89986fc0 "???"
+0x008 Slot : 0x89986fbc _PCI_SLOT_NUMBER
+0x00c ParentBus : 0 ''
+0x010 ParentSlot : _PCI_SLOT_NUMBER
+0x014 Flags : 0x128
+0x018 Address : 0x30000
+0x01c BaseBusNumber : 0
+0x020 RunCompletion : 0n2
+0x024 CompletionRoutine : 0xf740d62c void ACPI!PciConfigSpaceHandlerWorker+0
+0x028 CompletionContext : 0x89986f88 Void
1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!unsigned char *)0x89986fc0)
((ACPI!unsigned char *)0x89986fc0) : 0x89986fc0 : 0x2 [Type: unsigned char *]
0x2 [Type: unsigned char] 总线号=2

1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_NSObj *)0x8996e010)
((ACPI!_NSObj *)0x8996e010) : 0x8996e010 [Type: _NSObj *]
[+0x000] list [Type: _List]
[+0x008] pnsParent : 0x8996cd78 [Type: _NSObj *]
[+0x00c] pnsFirstChild : 0x8996e054 [Type: _NSObj *]
[+0x010] dwNameSeg : 0x30463453 [Type: unsigned long]
[+0x014] hOwner : 0x899af330 [Type: void *]
[+0x018] pnsOwnedNext : 0x8996dfcc [Type: _NSObj *]
[+0x01c] ObjData [Type: _ObjData]
[+0x030] Context : 0x89968688 [Type: void *]
[+0x034] dwRefCount : 0x0 [Type: unsigned long]
1: kd> db 0x8996e010
8996e010 38 dc 96 89 e8 e3 96 89-78 cd 96 89 54 e0 96 89 8.......x...T...
8996e020 53 34 46 30 30 f3 9a 89-cc df 96 89 00 00 06 00 S4F00...........
8996e030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
8996e040 88 86 96 89 00 00 00 00-48 4e 53 4f 44 00 00 00 ........HNSOD...
8996e050 00 90 96 89 a4 e3 96 89-98 e0 96 89 10 e0 96 89 ................
8996e060 00 00 00 00 5f 41 44 52-30 f3 9a 89 10 e0 96 89 ...._ADR0.......
8996e070 00 00 01 00 00 00 00 00-00 00 03 00 00 00 00 00 ................
8996e080 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO
1: kd> db 0x8996cd78
8996cd78 38 cc 96 89 88 4f 97 89-ac ff 9a 89 f0 cd 96 89 8....O..........
8996cd88 50 32 50 30 30 f3 9a 89-38 cc 96 89 00 00 06 00 P2P00...8.......
8996cd98 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
8996cda8 a0 8e 96 89 00 00 00 00-48 4f 52 47 34 00 00 00 ........HORG4...
8996cdb8 00 90 96 89 00 00 00 00-04 00 00 00 02 00 00 00 ................
8996cdc8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
8996cdd8 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO
8996cde8 44 00 00 00 00 90 96 89-b0 4b 97 89 b4 ce 96 89 D........K......


Device (P2P0)
{
Name (_ADR, 0x00110000) // _ADR: Address

Device (S4F0)
{
Name (_ADR, 0x00030000) // _ADR: Address
Name (_SUN, 0x23) // _SUN: Slot User Number
OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}

Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (BSTA (ID))
}

1: kd> dt _PCI_SLOT_NUMBER 0x89986fbc -r
hal!_PCI_SLOT_NUMBER
+0x000 u : __unnamed
+0x000 bits : __unnamed
+0x000 DeviceNumber : 0y00011 (0x3)
+0x000 FunctionNumber : 0y000
+0x000 Reserved : 0y000000000000000000000000 (0)
+0x000 AsULONG : 3


1: kd> kc
#
00 ACPI!GetPciAddressWorker
01 ACPI!GetPciAddressWorker
02 ACPI!ACPIGetWorkerForInteger
03 ACPI!AsyncCallBack
04 ACPI!RunContext
05 ACPI!DispatchCtxtQueue
06 ACPI!StartTimeSlicePassive
07 ACPI!ACPIWorker
08 nt!PspSystemThreadStartup
09 nt!KiThreadStartup
1: kd> kv
# ChildEBP RetAddr Args to Child
00 f791ac48 f740d0d2 899b00ac 00000000 00000000 ACPI!GetPciAddressWorker+0x147 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 1138]
01 f791acb0 f7407433 899b00ac 00000000 00000000 ACPI!GetPciAddressWorker+0x1e8 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 1207]
02 f791acd8 f741f89b 899b00ac 00000000 8996826c ACPI!ACPIGetWorkerForInteger+0xcf (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 4814]
03 f791ad10 f741d905 f7407364 00000000 f743a934 ACPI!AsyncCallBack+0xe7 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sync.c @ 81]
04 f791ad34 f742042d 00000000 f7433d3c f743a928 ACPI!RunContext+0x1f5 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\ctxt.c @ 649]
05 f791ad4c f74204ec f743a950 f743b318 f743a9b8 ACPI!DispatchCtxtQueue+0xaf (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sched.c @ 150]
06 f791ad64 f74133c5 f743a928 00000000 89981ca0 ACPI!StartTimeSlicePassive+0x57 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sched.c @ 107]
07 f791adac 80d391f0 00000000 00000000 00000000 ACPI!ACPIWorker+0xbf (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\worker.c @ 302]
08 f791addc 80b00d52 f7413306 00000000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
09 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]


http://www.cnnetsun.cn/news/574441.html

相关文章:

  • Baklib 制造业解决方案:助力智能制造数字化升级
  • 【爆肝技术】EAG-RAG:大模型+智能体=企业级知识问答系统的黑科技,小白也能上手!
  • 企业级翻译场景落地|HY-MT1.5-7B镜像上下文与格式保留实践
  • MiDaS模型性能对比:硬件
  • 程序员必看!12条AI智能体架构设计原则,让大模型不再“智商欠费“
  • 腾讯开源翻译大模型实践|HY-MT1.5-7B部署与术语干预详解
  • MiDaS模型实战:室内场景深度估计案例解析
  • 支持术语干预与上下文翻译|HY-MT1.5-7B镜像实战
  • Intel MiDaS应用案例:自动驾驶场景深度感知实战
  • 冷启动分类模型优化:云端GPU+迁移学习,准确率1天提升40%
  • AI 3D重建进阶:基于MiDaS的多视角融合技术
  • 小白必看!AI万能分类器保姆级教程:0配置云端体验
  • 小样本分类器训练:云端GPU性价比之选,50元搞定POC
  • 2026年1104报表制度更新解读
  • 老旧电脑焕新生:通过云端GPU运行最新AI分类器
  • Llama3+分类器组合方案:云端GPU双模型同跑,1小时2块全体验
  • MiDaS模型在机器人导航中的应用实战案例解析
  • 5大热门分类模型对比:云端GPU 3小时完成选型,成本不到5元
  • uni-app实现网络离线定位
  • 万能分类器实时分类方案:云端流处理,延迟低于500ms
  • 链游开发成本大揭秘:从50万到2亿,你的项目该选哪条路?
  • MiDaS模型调优:提升深度估计精度的技巧
  • 混合语言翻译怎么破?HY-MT1.5-7B镜像高级功能详解
  • AGI-Next前沿峰会「沉思报告」——中国AGI背后的产业逻辑与战略分野
  • 未来 5 年 “黄金专业” TOP4!人才缺口超百万,毕业即月薪过万,现在报考还不晚!
  • 导师严选8个AI论文网站,专科生搞定毕业论文必备!
  • AI MiDaS指南:处理低光照图像的深度估计
  • 【VTK手册036】网格拓扑简化工具:vtkCleanPolyData 使用指南
  • 文献查询免费网站推荐与使用指南:高效获取学术资源的实用工具平台
  • 软件测试之压力测试