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

Before Posting...

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

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

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

tony_zhutony_zhu Member Posts: 41

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: 41

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

  • tony_zhutony_zhu Member Posts: 41

    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. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Writing WDF Drivers TBD 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online