none
Access the PCI configuration RRS feed

  • Question

  • I want implement a PCH driver for SMBus, the driver need access the PCI configuration area, so I reference this page https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/obtaining-device-configuration-information-at-irql---dispatch-level

    But the compiler give the below error

    device.cpp(69): error C2065: 'GUID_BUS_INTERFACE_STANDARD': undeclared identifier

    And I researched on the MSDN, it page shows removed. 

    So my question is how can I access the PCI configuration? Can you give an example?

    Thanks!

    Monday, January 29, 2018 8:13 AM

All replies

  • Normally, the driver gets the hardware resources given to it as part of the EVT_WDF_DEVICE_PREPARE_HARDWARE callback, why do you think you need to query the interface directly?


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Monday, January 29, 2018 11:47 AM
  • Thanks for your reply.

    I want port a driver from Linux, and the linux driver need access the PCI configure to set a register. 

    /* set I2C_EN bit in configuration register */
    pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &hostc);
    pci_write_config_byte(priv->pci_dev, SMBHSTCFG,
          hostc | SMBHSTCFG_I2C_EN);

    So I need access those memory.


    Tuesday, January 30, 2018 5:31 AM
  • That GUID is in WDMGUID.h

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Wednesday, January 31, 2018 2:14 AM
    Moderator