Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

can windbg dd command check memory-mapped virtual address which is mapped given PCI BAR

tony_zhutony_zhu Member Posts: 31

suppose i get the PCI BAR address d000000c in WDDM miniport display driver, then i use DxgkCbMapMemory defined in WDK Dispmprt.h , then this function should return me the mapped virtual address that can allow me to access PCI device registers.
like this c++ code
uint32_t result = *(MmrBase + offset);
with this line of code, my driver can retrieve the value.

but if i use dd command in windbg, i can not get the value.

Can someone tell me what i did wrong?


  • tony_zhutony_zhu Member Posts: 31

    i am pretty sure i am mapping memory address space instead of IO space.

  • tony_zhutony_zhu Member Posts: 31

    7: kd> ??(pCgs->pMmrBase + offset)
    unsigned int * 0xffffa2002525a800 7: kd> ??(pCgs->pMmrBase) unsigned int * 0xffffa20025200000
    7: kd> ??(offset)
    unsigned int 0x16a00
    7: kd> dd 0xffffa20025200000+0x16a00*4 L1 ffffa2002525a800 00000002

    sorry, found my problem. please ignore my post

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE