Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

PCI_COMMON_CONFIG (Structures)
 
.
Summary
TODO - a short description

C# Definition:

    public struct PCI_COMMON_CONFIG
    {
        public ushort VendorID;
        public ushort DeviceID;
        public ushort Command;
        public ushort Status;
        public byte RevisionID;
        public byte ProgIf;
        public byte SubClass;
        public byte BaseClass;
        public byte CacheLineSize;
        public byte LatencyTimer;
        public byte HeaderType;
        public byte BIST;
        public u u;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 192)]
        public byte DeviceSpecific;
    }

    [StructLayout(LayoutKind.Explicit)]
    public struct u
    {
        [FieldOffset(0)]
        public PCI_HEADER_TYPE_0 type0;
        [FieldOffset(0)]
        public PCI_HEADER_TYPE_1 type1;
        [FieldOffset(0)]
        public PCI_HEADER_TYPE_2 type2;
    }

    const int PCI_TYPE0_ADDRESSES = 6;
    public struct PCI_HEADER_TYPE_0
    {
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = PCI_TYPE0_ADDRESSES)]
        public uint[] BaseAddresses;
        public uint CIS; // scum
        public uint CIS;
        public ushort SubVendorID;
        public ushort SubSystemID;
        public uint RomBaseAddress;
        public byte CapabilitiesPtr;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        public byte[] Reserved1;
        public uint Reserved2;
        public byte InterruptLine;
        public byte InterruptPin;
        public byte MinimumGrant;
        public byte MaximumLatency;
    }

    const int PCI_TYPE1_ADDRESSES = 2;
    // PCI to PCI Bridge
    public struct PCI_HEADER_TYPE_1
    struct PCI_HEADER_TYPE_1
    {
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = PCI_TYPE1_ADDRESSES)]
        public uint[] BaseAddresses;
        public byte PrimaryBus;
        public byte SecondaryBus;
        public byte SubordinateBus;
        public byte SecondaryLatency;
        public byte IOBase;
        public byte IOLimit;
        public ushort SecondaryStatus;
        public ushort MemoryBase;
        public ushort MemoryLimit;
        public ushort PrefetchBase;
        public ushort PrefetchLimit;
        public uint PrefetchBaseUpper32;
        public uint PrefetchLimitUpper32;
        public ushort IOBaseUpper16;
        public ushort IOLimitUpper16;
        public byte CapabilitiesPtr;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        public byte[] Reserved1;
        public uint ROMBaseAddress;
        public byte InterruptLine;
        public byte InterruptPin;
        public ushort BridgeControl;
    }

    const int PCI_TYPE2_ADDRESSES = 5;
    // PCI to CARDBUS Bridge
    public struct PCI_HEADER_TYPE_2
    struct PCI_HEADER_TYPE_2
    {
        public uint SocketRegistersBaseAddress;
        public byte CapabilitiesPtr;
        public byte Reserved;
        public ushort SecondaryStatus;
        public byte PrimaryBus;
        public byte SecondaryBus;
        public byte SubordinateBus;
        public byte SecondaryLatency;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = PCI_TYPE2_ADDRESSES - 1)]
        RANGE[] Range;
        public byte InterruptLine;
        public byte InterruptPin;
        public ushort BridgeControl;
    }

    public struct RANGE
    struct RANGE
    {
        public uint Base;
        public uint Limit;
    }

VB Definition:

Structure PCI_COMMON_CONFIG
   Public TODO
End Structure

User-Defined Field Types:

None.

Notes:

Untested code, just a straight conversion from the header in the DDK

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions