I try use inpout32.dll to read/write PCI bus port to find out SMBUS controler base address, but the result read back is not correct. I can use WinIO to get correct result, but their x64 driver didn't signed.
the code like
// C# scan pci bus
for (io_cf8 = 0x80000000; io_cf8 < 0x80ffff00; io_cf8 += 0x100)
DlPortWritePortUlong(cf8, io_cf8) ;
io_cfc = DlPortReadPortUlong(0xcfc);
if ((io_cfc != 0x00000000) && (io_cfc != 0xffffffff) && (io_cfc != io_cfc_bak))
DlPortWritePortUlong(0xcf8, io_cf8 + 8 ) ;
UInt32 classcode = DlPortReadPortUlong(0xcfc);
if ((classcode / 0x100) == SMBUS_Classcode)
Bus = (io_cf8 - 0x80000000) / 0x10000;
Device = ((((io_cf8 - 0x80000000) & 0xffff) & 0xff00) >> 3) / 0x100;
Func = ((((io_cf8 - 0x80000000) & 0xffff) & 0xff00) & 0x7ff) / 0x100;
on Asus M2V motherboard(AMD cpu), to find smbus controller, when io_cf8=2147524608 (0x8000a000),
iocfc read back shold be 1132793858 (0x43851002), should be differernt on other morthboard.
But it always return 65536.
Does anybody know why or have been seen this issue.?
My x64 port of InpOut32
2 posts • Page 1 of 1