none
SpbTestTool sample / I2C EEPROM / OnPrepareHardware / WdfCmResourceListGetCount == 0 RRS feed

  • Question

  • I am using the SpbTestTool sample to support an I2C EEPROM.  I have noticed that in OnPrepareHardware the WdfCmResourceListGetCount returns 0.

    The sample at this point does the following in device.cpp:

        //

        // An SPB resource is required.
        //

        if (fSpbResourceFound == FALSE)
        {
            status = STATUS_NOT_FOUND;
            Trace(
                TRACE_LEVEL_ERROR,
                TRACE_FLAG_WDFLOADING,
                "SPB resource not found - %!STATUS!", 
                status);
        }

    which causes OnPrepareHardware to return STATUS_NOT_FOUND and the driver then fails to load.

    QUESTION  Should the EEPROM have resources or is this a bug in the sample driver?  Other thoughts?

    Friday, April 3, 2015 12:02 AM

All replies

  • The device is an  Atmel AT24C02D-XHM-T

    Details on the EEPROM are here:

    http://www.digikey.com/product-detail/en/AT24C02D-XHM-T/AT24C02D-XHM-TCT-ND/4557097?WT.srch=1&mkwid=sZ6A0WnN0&pcrid=62954397555&pkw=_cat:integrated+circuits+ics&pmt=b&pdv=c

    Spec Sheet is here:

    http://www.atmel.com/Images/Atmel-8871-SEEPROM-AT24C01D-02D-Datasheet.pdf

    Friday, April 3, 2015 9:34 PM
  • how did you install the driver? Devcon install will create a root enumerated stack, you need to use devcon update. Did you update the acpi tables?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, April 3, 2015 11:29 PM
  • Thanks Doron,

    I used the following:

    devcon.exe update SpbTestTool.inf ACPI\<hwid>  (With the hwid changed)

    and I did update the ACPI tables.


    Saturday, April 4, 2015 12:55 AM
  • Here is the PCI debug output right before the driver loads.  Are there any debug tips for digging into this further?

    3: kd> !pcitree
    Bus 0x0 (FDO Ext ffffe00183817190)
      (d=0,  f=0) 80860f00 devext 0xffffe001838131b0 devstack 0xffffe00183813060 0600 Bridge/HOST to PCI
      (d=2,  f=0) 80860f31 devext 0xffffe001838139d0 devstack 0xffffe00183813880 0300 Display Controller/VGA
      (d=13, f=0) 80860f23 devext 0xffffe001838121b0 devstack 0xffffe00183812060 0106 Mass Storage Controller/Unknown Sub Class
      (d=14, f=0) 80860f35 devext 0xffffe001838129d0 devstack 0xffffe00183812880 0c03 Serial Bus Controller/USB
      (d=1a, f=0) 80860f18 devext 0xffffe001838111b0 devstack 0xffffe00183811060 1080 Unknown Base Class/Unknown Sub Class
      (d=1b, f=0) 80860f04 devext 0xffffe001838119d0 devstack 0xffffe00183811880 0403 Multimedia Device/Unknown Sub Class
      (d=1c, f=0) 80860f48 devext 0xffffe001838101b0 devstack 0xffffe00183810060 0604 Bridge/PCI to PCI
      Bus 0x1 (FDO Ext ffffe0018380bcf0)
        No devices have been enumerated on this bus.
      (d=1c, f=1) 80860f4a devext 0xffffe001838109d0 devstack 0xffffe00183810880 0604 Bridge/PCI to PCI
      Bus 0x2 (FDO Ext ffffe00183808a30)
        No devices have been enumerated on this bus.
      (d=1c, f=2) 80860f4c devext 0xffffe0018380f1b0 devstack 0xffffe0018380f060 0604 Bridge/PCI to PCI
      Bus 0x3 (FDO Ext ffffe00183807cf0)
        No devices have been enumerated on this bus.
      (d=1c, f=3) 80860f4e devext 0xffffe0018380f9d0 devstack 0xffffe0018380f880 0604 Bridge/PCI to PCI
      Bus 0x4 (FDO Ext ffffe00183806cf0)
        (d=0,  f=0) 80861533 devext 0xffffe001839526b0 devstack 0xffffe00183952560 0200 Network Controller/Ethernet
      (d=1f, f=0) 80860f1c devext 0xffffe0018380e1b0 devstack 0xffffe0018380e060 0601 Bridge/PCI to ISA
      (d=1f, f=3) 80860f12 devext 0xffffe0018380e9d0 devstack 0xffffe0018380e880 0c05 Serial Bus Controller/Unknown Sub Class
    Total PCI Root busses processed = 1
    Total PCI Segments processed = 1
    3: kd> !pci 144

    PCI Configuration Space (Segment:0000 Bus:00 Device:00 Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f00
        04: Command        0007 IOSpaceEn MemSpaceEn BusInitiate 
        06: Status         0000 
        08: RevisionID     11
        09: ProgIF         00
        0a: SubClass       00 Host Bridge
        0b: BaseClass      06 Bridge Device
        0c: CacheLineSize  0000
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           00000000
        14: BAR1           00000000
        18: BAR2           00000000
        1c: BAR3           00000000
        20: BAR4           00000000
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f31
        30: ROMBAR         00000000
        34: CapPtr         00
        3c: IntLine        00
        3d: IntPin         00
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 00000000 00000000 00000000 00000000
        50: 00000000 00000000 00000000 00000000
        60: 00000000 00000000 00000000 00000000
        70: 00000000 00000000 00000000 00000000
        80: 00000000 00000000 00000000 00000000
        90: 00000000 00000000 00000000 00000000
        a0: 00000000 00000000 00000000 00000000
        b0: 00000000 00000000 00000000 00000000
        c0: 00000000 00000000 00000000 00000000
        d0: 00000000 00000000 00000000 00000000
        e0: 00000000 00000000 00000000 00000000
        f0: 00000066 00000000 00000000 00000000
    01
    PCI Configuration Space (Segment:0000 Bus:00 Device:02 Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f31
        04: Command        0407 IOSpaceEn MemSpaceEn BusInitiate InterruptDis 
        06: Status         0010 CapList 
        08: RevisionID     11
        09: ProgIF         00 VGA
        0a: SubClass       00 VGA Compatible Controller
        0b: BaseClass      03 Display Controller
        0c: CacheLineSize  0000
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           d0000000
        14: BAR1           00000000
        18: BAR2           c0000008
        1c: BAR3           00000000
        20: BAR4           0000e081
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f31
        30: ROMBAR         00000000
        34: CapPtr         d0
        3c: IntLine        0b
        3d: IntPin         01
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 00000000 00000000 00000000 00000000
        50: 00000211 00000000 00000000 bb000001
        60: 00020000 00000000 00000000 00000000
        70: bae00001 00000007 00000000 00000000
        80: 00000000 00000000 00000000 00000000
        90: 0000b005 00000000 00000000 00000000
        a0: 00000000 03060013 00000000 00000000
        b0: 01070009 00000000 00000000 00000000
        c0: 00000000 00000000 00000000 00000000
        d0: 00229001 00000000 00000000 00000000
        e0: 00008000 00000000 00000000 00000000
        f0: 00000000 00000000 00010fd1 b9769018
    Capabilities:
        d0: CapID          01 PwrMgmt Capability 
        d1: NextPtr        90
        d2: PwrMgmtCap     0022 DSI Version=2
        d4: PwrMgmtCtrl    0000 DataScale:0 DataSel:0 D0 

        90: CapID          05 MSI Capability 
        91: NextPtr        b0
        92: MsgCtrl        MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
        94: MsgAddr        0
        98: MsData         0

        b0: CapID          09 Vendor Specific Capability 
        b1: NextPtr        00

    12
    PCI Configuration Space (Segment:0000 Bus:00 Device:13 Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f23
        04: Command        0007 IOSpaceEn MemSpaceEn BusInitiate 
        06: Status         02b0 CapList 66MHzCapable FB2BCapable DEVSELTiming:1
        08: RevisionID     11
        09: ProgIF         01
        0a: SubClass       06
        0b: BaseClass      01
        0c: CacheLineSize  0000
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           0000e071
        14: BAR1           0000e061
        18: BAR2           0000e051
        1c: BAR3           0000e041
        20: BAR4           0000e021
        24: BAR5           d0720000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f23
        30: ROMBAR         00000000
        34: CapPtr         80
        3c: IntLine        13
        3d: IntPin         01
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 80008000 00000000 00000000 00000000
        50: 00000000 00000000 00000000 00000000
        60: 00000000 00000000 00000000 00000000
        70: 4003a801 00000008 00000000 00000000
        80: 00007005 00000000 00000000 00000000
        90: 81010e60 3e000183 22dc0220 80007000
        a0: 000000f4 00000000 00100012 00000048
        b0: 03060013 00000000 00000000 00000000
        c0: 00000000 00000000 00000000 00000000
        d0: 00000000 00000000 00000000 00000000
        e0: 00000000 00000000 00000000 00000000
        f0: 00000000 00000000 01110f1a 00000000
    Capabilities:
        80: CapID          05 MSI Capability 
        81: NextPtr        70
        82: MsgCtrl        MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
        84: MsgAddr        0
        88: MsData         0

        70: CapID          01 PwrMgmt Capability 
        71: NextPtr        a8
        72: PwrMgmtCap     4003 PMED3Hot Version=3
        74: PwrMgmtCtrl    0008 DataScale:0 DataSel:0 D0 

        a8: CapID          12 Unknown Capability 
        a9: NextPtr        00


    PCI Configuration Space (Segment:0000 Bus:00 Device:14 Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f35
        04: Command        0406 MemSpaceEn BusInitiate InterruptDis 
        06: Status         0290 CapList FB2BCapable DEVSELTiming:1
        08: RevisionID     11
        09: ProgIF         30
        0a: SubClass       03
        0b: BaseClass      0c
        0c: CacheLineSize  0000
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           d0700004
        14: BAR1           00000000
        18: BAR2           00000000
        1c: BAR3           00000000
        20: BAR4           00000000
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f35
        30: ROMBAR         00000000
        34: CapPtr         70
        3c: IntLine        00
        3d: IntPin         01
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 800401fd 83cfc68f 00000000 00000000
        50: 0bce6e5f 00000000 00000000 00000000
        60: 00002030 00000000 00000000 00000000
        70: c1c28001 00000008 00000000 00000000
        80: 00b70005 fee0f00c 00000000 000049b8
        90: 00000000 00000000 00000000 00000000
        a0: 00040100 00000000 00000000 00000000
        b0: 0000008f 00000000 00000000 00000000
        c0: 00000c03 00000000 00000001 00000000
        d0: 0000003f 0000003f 00000001 00000001
        e0: 00002c30 00000000 00000000 0000d8d8
        f0: 00000000 00000000 01110f1a 00000000
    Capabilities:
        70: CapID          01 PwrMgmt Capability 
        71: NextPtr        80
        72: PwrMgmtCap     c1c2 PMED3Hot PMED3Cold Version=2
        74: PwrMgmtCtrl    0008 DataScale:0 DataSel:0 D0 

        80: CapID          05 MSI Capability 
        81: NextPtr        00
        82: MsgCtrl        64BitCapable MSIEnable MultipleMsgEnable:3 (0x8) MultipleMsgCapable:3 (0x8)
        84: MsgAddr        fee0f00c
        88: MsgAddrHi      0
        8c: MsData         49b8

    19
    PCI Configuration Space (Segment:0000 Bus:00 Device:1a Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f18
        04: Command        0106 MemSpaceEn BusInitiate SERREn 
        06: Status         0010 CapList 
        08: RevisionID     11
        09: ProgIF         00
        0a: SubClass       80 Other Encryption Controller
        0b: BaseClass      10 Encryption Controller
        0c: CacheLineSize  0010 BurstDisabled 
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           d0500000
        14: BAR1           d0400000
        18: BAR2           00000000
        1c: BAR3           00000000
        20: BAR4           00000000
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f18
        30: ROMBAR         00000000
        34: CapPtr         80
        3c: IntLine        0b
        3d: IntPin         01
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 1f0000d5 80004000 69000000 00000000
        50: 0000000c 00000104 00000000 00000000
        60: 10000000 00000001 00000000 00000000
        70: 00000000 00000000 00000000 00000000
        80: 4803a001 00000008 00000000 00000000
        90: 00000000 00000000 00000000 00000000
        a0: 00000005 00000000 00000000 00000000
        b0: 80000000 00000000 00000000 00000000
        c0: 00001009 bf000000 01000000 00000000
        d0: 00003008 00000000 00000000 00000000
        e0: 00000000 00000000 00000000 00000000
        f0: 00000000 00000000 01110f1a 00000000
    Capabilities:
        80: CapID          01 PwrMgmt Capability 
        81: NextPtr        a0
        82: PwrMgmtCap     4803 PMED0 PMED3Hot Version=3
        84: PwrMgmtCtrl    0008 DataScale:0 DataSel:0 D0 

        a0: CapID          05 MSI Capability 
        a1: NextPtr        00
        a2: MsgCtrl        MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
        a4: MsgAddr        0
        a8: MsData         0


    PCI Configuration Space (Segment:0000 Bus:00 Device:1b Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f04
        04: Command        0006 MemSpaceEn BusInitiate 
        06: Status         0010 CapList 
        08: RevisionID     11
        09: ProgIF         00
        0a: SubClass       03
        0b: BaseClass      04
        0c: CacheLineSize  0010 BurstDisabled 
        0d: LatencyTimer   00
        0e: HeaderType     00
        0f: BIST           00
        10: BAR0           d0710004
        14: BAR1           00000000
        18: BAR2           00000000
        1c: BAR3           00000000
        20: BAR4           00000000
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       7270
        30: ROMBAR         00000000
        34: CapPtr         50
        3c: IntLine        16
        3d: IntPin         01
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 5d000001 ffffffff ffffffff 00000000
        50: c8426001 00000000 ffffffff ffffffff
        60: 00800005 00000000 00000000 00000000
        70: 00910010 10000000 00100800 ffffffff
        80: ffffffff ffffffff ffffffff ffffffff
        90: ffffffff ffffffff ffffffff ffffffff
        a0: ffffffff ffffffff ffffffff ffffffff
        b0: ffffffff ffffffff ffffffff ffffffff
        c0: 01e00400 4c002402 82a30000 02330010
        d0: 02a30c00 02330010 ffffffff ffffffff
        e0: ffffffff ffffffff ffffffff ffffffff
        f0: ffffffff ffffffff 01110f1a ffffffff
    Capabilities:
        50: CapID          01 PwrMgmt Capability 
        51: NextPtr        60
        52: PwrMgmtCap     c842 PMED0 PMED3Hot PMED3Cold Version=2
        54: PwrMgmtCtrl    0000 DataScale:0 DataSel:0 D0 

        60: CapID          05 MSI Capability 
        61: NextPtr        00
        62: MsgCtrl        64BitCapable MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
        64: MsgAddr        0
        68: MsgAddrHi      0
        6c: MsData         0


    PCI Configuration Space (Segment:0000 Bus:00 Device:1c Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f48
        04: Command        0004 BusInitiate 
        06: Status         0010 CapList 
        08: RevisionID     11
        09: ProgIF         00
        0a: SubClass       04 PCI-PCI Bridge
        0b: BaseClass      06 Bridge Device
        0c: CacheLineSize  0010 BurstDisabled 
        0d: LatencyTimer   00
        0e: HeaderType     81
        0f: BIST           00
        10: BAR0           00000000
        14: BAR1           00000000
        18: PriBusNum      00
        19: SecBusNum      01
        1a: SubBusNum      01
        1b: SecLatencyTmr  00
        1c: IOBase         f0
        1d: IOLimit        00
        1e: SecStatus      2000 InitiatorAbort 
        20: MemBase        fff0
        22: MemLimit       0000
        24: PrefMemBase    fff1
        26: PrefMemLimit   0001
        28: PrefBaseHi     00000000
        2c: PrefLimitHi    00000000
        30: IOBaseHi       0000
        32: IOLimitHi      0000
        34: CapPtr         40
        38: ROMBAR         00000000
        3c: IntLine        10
        3d: IntPin         01
        3e: BridgeCtrl     0000 
    Device Private:
        40: 01428010 00008000 00100000 01313c12
        50: 10010040 0004b260 00000000 00000000
        60: 00000000 00000016 00000000 00000000
        70: 00010002 00000000 00000000 00000000
        80: 00009005 00000000 00000000 00000000
        90: 0000a00d 0f488086 00000000 00000000
        a0: c8030001 00000000 00000000 00000000
        b0: 00000000 00000000 00000000 00000000
        c0: 00000000 00000000 00000000 00000000
        d0: 0000c000 00000842 c9118000 00000000
        e0: 00000000 00000000 00000004 00000000
        f0: 00000050 000000c0 01110f1a 01000000
    Capabilities:
        40: CapID          10 PCI Express Capability 
        41: NextPtr        80
        42: Express Caps   0142 (ver. 2) Type:Root port
        44: Device Caps    00008000
        48: Device Control 0000 MRR:128 ns ap pf et MP:128 ro ur fe nf ce
        4a: Device Status  0010 tp AP ur fe nf ce
        4c: Link Caps      01313c12
        50: Link Control   0040 es CC rl ld RCB:64 ASPM:None 
        52: Link Status    1001 SCC lt lte NLW:x0 LS:2.5 
        64: DeviceCaps2    00000016 CTR:6 CTDIS arifwd aor aoc32 aoc64 cas128 noro ltr TPH:0 OBFF:0 extfmt eetlp EETLPMax:0
        68: DeviceControl2 0000 CTVal:0 ctdis arifwd aor aoeb idoreq idocom ltr OBFF:0 eetlp
        54: Slot Caps      0004b260 
        58: Slot Control   0000 pcc PI:?? AI:?? hpi cc pde mrls pfd ab 
        5a: Slot Status    0000 pds hpi cc pdc ms pfd ab 
        5c: Root Control   0000 pmei fs nfs cs 
        5e: Reserved       0000 
        60: Root Status    00000000 pmep pmes ID:0 

        80: CapID          05 MSI Capability 
        81: NextPtr        90
        82: MsgCtrl        MultipleMsgEnable:0 (0x1) MultipleMsgCapable:0 (0x1)
        84: MsgAddr        0
        88: MsData         0

        90: CapID          0d Subsystem ID Capability 
        91: NextPtr        a0
        94: SubVendorID    8086
        96: SubSystemID    0f48

        a0: CapID          01 PwrMgmt Capability 
        a1: NextPtr        00
        a2: PwrMgmtCap     c803 PMED0 PMED3Hot PMED3Cold Version=3
        a4: PwrMgmtCtrl    0000 DataScale:0 DataSel:0 D0 


    1e
    PCI Configuration Space (Segment:0000 Bus:00 Device:1f Function:00)
    Common Header:
        00: VendorID       8086 Intel Corporation
        02: DeviceID       0f1c
        04: Command        0007 IOSpaceEn MemSpaceEn BusInitiate 
        06: Status         0210 CapList DEVSELTiming:1
        08: RevisionID     11
        09: ProgIF         00
        0a: SubClass       01 ISA Bridge
        0b: BaseClass      06 Bridge Device
        0c: CacheLineSize  0000
        0d: LatencyTimer   00
        0e: HeaderType     80
        0f: BIST           00
        10: BAR0           00000000
        14: BAR1           00000000
        18: BAR2           00000000
        1c: BAR3           00000000
        20: BAR4           00000000
        24: BAR5           00000000
        28: CBCISPtr       00000000
        2c: SubSysVenID    8086
        2e: SubSysID       0f1c
        30: ROMBAR         00000000
        34: CapPtr         e0
        3c: IntLine        00
        3d: IntPin         00
        3e: MinGnt         00
        3f: MaxLat         00
    Device Private:
        40: 00000403 fed03002 00000503 fed0c002
        50: fed08002 fed01002 fef00002 fed05002
        60: 00000000 00000000 00000000 00000000
        70: 00000000 00000000 00000000 00000000
        80: 00000001 00000000 00000000 00000000
        90: 00000000 00000000 00000000 00000000
        a0: 00000000 00000000 00000000 00000000
        b0: 00000000 00000000 00000000 00000000
        c0: 00000000 00000000 00000000 00000000
        d0: 00000000 00000000 0000ffcf 00000000
        e0: 100c0009 00000000 00000000 00000000
        f0: fed1c001 00000000 01110f1a 00000303
    Capabilities:
        e0: CapID          09 Vendor Specific Capability 
        e1: NextPtr        00

    Wednesday, April 8, 2015 11:00 PM