Hardware/CPU/AMDCPU.cs
changeset 197 fb66f749b7ff
parent 196 5e9a8595296c
child 236 763675f19ff4
     1.1 --- a/Hardware/CPU/AMDCPU.cs	Wed Sep 22 19:12:12 2010 +0000
     1.2 +++ b/Hardware/CPU/AMDCPU.cs	Wed Sep 22 20:44:34 2010 +0000
     1.3 @@ -48,14 +48,17 @@
     1.4        : base(processorIndex, cpuid, settings) { }
     1.5  
     1.6      protected uint GetPciAddress(byte function, ushort deviceId) {
     1.7 +      
     1.8 +      // assemble the pci address
     1.9        uint address = WinRing0.GetPciAddress(PCI_BUS,
    1.10          (byte)(PCI_BASE_DEVICE + processorIndex), function);
    1.11  
    1.12 +      // verify that we have the correct bus, device and function
    1.13        uint deviceVendor;
    1.14        if (!WinRing0.ReadPciConfigDwordEx(
    1.15          address, DEVICE_VENDOR_ID_REGISTER, out deviceVendor))
    1.16          return WinRing0.InvalidPciAddress;
    1.17 -
    1.18 +      
    1.19        if (deviceVendor != (deviceId << 16 | AMD_VENDOR_ID))
    1.20          return WinRing0.InvalidPciAddress;
    1.21