Improve performance of Skylake SMBus.#60
Conversation
|
Do you have the protocol portions for writing reverse engineered? I just picked up an X299 system (ASUS TUF X299 Mark 2, i7 7800X). I've added this driver to OpenRGB as X299 support has been a hole in our hardware support since the beginning but I didn't have the hardware to test it. Just received my CPU today and got it set up. The driver does detect the bus and it shows in OpenRGB's list of buses, but none of the commands I try (basically equivalents to i2cdetect/i2cdump) using quick or read operations detect any devices. I'm using the released version but I want to try compiling and testing this against some RGB RAM devices. |
Unfortunately no, but I can take a look into my old sources again and pass you all information I have after I've tried myself. You'll have to test writes yourself though.
As far as I remember that i2cdetect is not going to work. The read operations should work fine though, I have no issues on my MSI X299 RAIDER and one of my testers has ASUS Pro WS X299 SAGE II also without issues. The usage is a bit different than the other SMBuses. That'll not work out of the box. Ping me in a week if nothing has changed. |
|
Trying to compile your branch and I'm getting some errors, looks like something's changed in the core since the last time I've built from source. Do you know how to solve the following issues: Also, you can email me the documentation if you want or on Discord. My username @ gmail. |
|
I decided to try asking Google's AI to see if it had any information on this. I found some other code for an Intel IMC I2C interface that seemed to point to unrelated registers. From what I gathered through Google, the interface you're using is a high level mailbox interface while there are other PCI devices for the bare metal I2C controllers for IMC0 and IMC1. The Google AI documentation seemed to know how to send read and write commands to this interface. It was referencing Intel datasheets (and the datasheet referenced called out the i7 7800X by name) but I'm taking everything it said with a huge grain of salt. Just putting it out there that this seems to be at least partially documented in an Intel datasheet and has made it into AI data sets. x299 pci device 1e function 5 - Google Search.pdf Edit: It might just be hallucinating based on the code, the datasheet does have the IMC SMBus interfaces but I am not seeing this mailbox interface explicitly called out in the same document. Maybe it's pulling from a different series or maybe not, but I'm not sure the info about how to interact with this mailbox interface is trustworthy. |
I've checked the github build to adjust mine, I think you're just missing PawnIO.Modules/.github/workflows/ci.yml Line 23 in 47832e9 |
Oh hell no. I've tried asking countless AIs asking on this but they all just delivered crap as they don't have access to the proper documents.
I can send you the correct PDFs when I'm back on my machine. |
|
@CalcProgrammer1 I've sent you an email this morning. I pushed some changes for write support, you can check and/or test that if you like. Edit: SMBus should now work exactly like the others, so no more magic for the arguments which are being passed in. |
|
For some reason this setup does not want to load self-compiled modules. I've tried building and test signing the module and copying it into my OpenRGB folder, but OpenRGB logs show the module is not initializing properly. I also tried with PawnIOUtil.exe test SmbusIntelSkylakeIMC.amx and it says "failed loading PawnIO module: 80070057". To sanity check, I built LpcIO.p and tried loading that .amx as well, and got the same error. I've uninstalled and reinstalled PawnIO multiple times, choosing the unrestricted edition each time. Windows is in test signing mode and shows the watermark (Windows 10 Pro Build 19041). I never had these issues running on my other machine. This is using a really old install of Windows that I hadn't touched in years and was installed without UEFI so I'm not sure if that matters. I can try pulling the drive from my other PawnIO development machine and booting it on this one later. Also, I noticed the version of the Pawn compiler is newer than the one mentioned in the wiki, not sure if that matters. I got some build errors trying to build SmbusNCT6793 and SMBusI801 that I know weren't there previously. |
|
Please note that you need to use an older PawnIO unrestricted version as the current 2.2.0 does not work. |
|
I am able to load this now after downgrading PawnIO but it does not seem to be working for me. OpenRGB loads it but trying to use the i2cdetect functionality with either quick or read operations returns no detected devices. I installed RWEverything to look at the PCI devices and looking at Bus 16, Device 1E, Function 05 I am not seeing any data change when issuing commands with this PawnIO driver. I am not doing anything special when initializing this driver, do I need to set index? Also, the PCI ID that OpenRGB sees for this is 8086:2085/8086:0000, is that normal? |
Please see my e-mail. Test / Debug it with RAMSPDToolkit and see if that works for you.
Intel device & 0x2085 seems to be correct, yes. |
|
I just added a bunch of debug_print statements and also added initializing the index to OpenRGB. I now create two instances, one at index 0 and one at index 1. I am able to i2cdetect using the READ_DATA method and i2cdump SPD addresses. So it looks like I can access SPD. However, QUICK and BYTE (not BYTE_DATA) operations don't seem to work. I believe OpenRGB requires BYTE operations in many places but can operate without QUICK. Also, it did not detect anything outside of the SPD range and I know address 0x27 should show up because I have a single HyperX Predator DDR4 stick on each side of the CPU. I also have some ENE DRAM which I believe should be at 0x77 in its default state (these get remapped by software during detection normally). |
|
Looking at SPD_OPCODE and TSOD_OPCODE these look like they might just be bit shifted from the upper bits of the address? |
They are not implemented yet. |
|
It looks like your SetBankCore function is just using the same command pipeline to issue the 1 or 0 write to 0x36? I'm not sure why this needs special case handling, none of the other SMBus modules do this. I would think the standard program flow that allows for any registers to be written would be sufficient. It seems like you've added a lot of SPD-specific code paths in this code that could be omitted by allowing full access to any address. Edit: |
|
Please feel free to adjust it. I've only tested it for what I require. |
|
I'll continue this investigation in my MR #62 |





Improve performance of Skylake SMBus and add block read.