Contribute
Register

<< Solved >> AMD WX4170 dGPU on ZBook G5 17 Laptop

Status
Not open for further replies.
I think i found how command modules contacts with datatables.
If begging of the file starts from first data table, then 2 command modules was researched are talking with real data table offsets.
View attachment 521615
The move instruction copies a value from one register to another.
Of course, then if we shift/move commands then these hard coded offsets will be wrong.
Same if the swapped command has different offsets, so we would need to trickle down all the offsets inside the affected commands as well as change the offset references for commands that belong to a different rom.
This could be the piece we were missing!
 
Of course, then if we shift/move commands then these hard coded offsets will be wrong.
Same if the swapped command has different offsets, so we would need to trickle down all the offsets inside the affected commands as well as change the offset references for commands that belong to a different rom.
This could be the piece we were missing!
I will try to look inside Apple 560x rom for research. But still we don’t know how to read data tables used by software. Data tables for vbios is simply to understand, because commands use registers with added offset to read data and simply compare two diff vbioses we can understand what they want. But key to sw data and command modules are in MacOS driver, they also use same map reading offsets, but we don’t know what file in Mac is doing that

As I don’t have 555x rom, we will test builds on your gpu. Recommend to buy programmer and clip if you haven’t this stuff
 
Last edited:
I have a programer but would hate to be forced to use it since I'm using liquid metal cooling, and removing the heat sink is always a gamble that I just don't want to take unnecessarily.
 
I have a programer but would hate to be forced to use it since I'm using liquid metal cooling, and removing the heat sink is always a gamble that I just don't want to take unnecessarily.
Only for emergency usage. Non post gpu will always load system bios. If Intel is hybrid, the rom can be easy restored with Ubuntu. And it’s simply to disable amd drivers or use safe graphics mode
 
I dont think we should use 560x vbios as base for mod. Only as reference for research, that`s why:
CODENAME GPU FREQ. VRAM FREQ. SHADERS LAPTOP BIOS NAME NAME ID
Polaris 11 1090 - 1292 6000 1024 mbp14.3 113-C9801AU-A02 Radeon Pro 560 67EF
Polaris 21 855 5080 768 mbp14.3 113-C9801AP-A02 Radeon Pro 555 67EF
Polaris 11 1172 - 1275 6000 1024 mbp15.1 113-C97501U-005 Radeon Pro 560X 67EF
Polaris 21 855 5080 768 mbp15.1 113-C97501P-005 Radeon Pro 555X 67EF
Polaris 11 1002-1053 7000 896 ZBOOK WX 4150 67E8
Polaris 11 1002-1053 7000 1024 ZBOOK WX 4170 67E0
mbp14.3 113-C9801AL-A02 unknwn 67EF
mbp14.3 113-C9801A0-015P2 unknwn 67E0

Did you try to make boot kext debug with 560x vbios? We can use it only for research and start from replacing Aonomorhid modules with apple one. Full block replacement.

Edit1. Mobile view destroys table structure, use pc instead


Edit2. Usefull link to linux atomfirmware


Edit3. Found another usefull app for rebuilding tables
More info to follow, this bat file was created by@Lard and updated by @kizwan

Table_Calculator.zip 2k .zip file

Edit4.
Still working under simple method of import, zeros analyze and build new tables map. Will add all connections Sets and Calls CMD+DAT_TABLES ANALYZER_Vaguhn.zip
 

Attachments

  • CMD+DAT_TABLES ANALYZER_Vaguhn.zip
    109.3 KB · Views: 26
Last edited:
I am increasingly coming to the conclusion that the 4150 and 4170 are the same GPU. the difference in mine is that it has fewer shader units. For this reason, it requires less power and possibly the 4150 has lower timings to reduce power consumption.

I think you should try to build hybrid vbios based on oem and dell modules. Then patch timings and PowerPlayInfo. I will help you with connectors module

Shaders are not software blocked. I read somewhere, that amd produce one silicon chip 4170 and then making laser cut shader traces, physically switching controllers off, 4150, and few with software disabling 4130, 4100. If shaders was unlocked, users would burn their GPUs
 
Last edited:
I dont think we should use 560x vbios as base for mod. Only as reference for research, that`s why:
I don't see the reason, can you elaborate?
Did you try to make boot kext debug with 560x vbios? We can use it only for research and start from replacing Aonomorhid modules with apple one. Full block replacement.
I did but I can't get the same level of verbose from my boot log that you get, I think Lilu is to blame for that, and I can't boot without Lilu because my Coffee lake GPU needs patching, and since I can't use a bad rom for discrete mode, I'm forced to use Hybrid/Lilu.

I tried to build my hybrid (Aomorhid/Crane) rom and copied every Data and Command module from Crane's rom to my Aomorhid firmware, and then adjusted the table's offset in the header, but It will not work.

Also unfortunately all of my (differing from Crane's) Aomorhid's modules have a different size to any of our "compatible" rom's modules, so I would need to start changing individual command offsets for any affected commands, and trickle those offsets to any subsequent commands and that list can be quite big even if only changing one module.

I will keep analyzing the de-compiled modules and try to find the difference that makes it work.

The catch right now is that we don't know exactly which module/s is the one that changes things or why it changes things. All we know is that the firmware is not the issue (since your hybrid rom works) and uses a firmware that didn't boot Catalina previously, but swapping the commands and data from another rom that does boot Catalina, it works. So the difference could be in the modules. Also, swapping the different data tables didn't really make a difference in my case, so whatever it is, it will most likely be in the commands table. We also know that what stalls in AMDRadeonX4000.kext in your case is AMDSIUVDHWEngine MetaClass, but we don't know why it stalls. Or how to properly coax it to continue booting without a brute force reloading of all the AMD kexts and basically booting but not work.
In my case AMDRadeonX4000 and all AMD kexts fiish loading with Aomorhid rom so the stall is not in those kexts, but probably in Skylight framework or some other Window Server component.

We need the help of a Lilu or Whatevergreen expert if we're to patch on the OS side, which I prefer to patching the rom side.
 
Last edited:
The 4170 gpu freq is 1200
Yeah, I rechecked. Used amd officials info. Maybe Hp overclock core.
I don't see the reason, can you elaborate?
The 560x is different from 4170. Different vram clocks. Too many differences in vga firmware. 555x is fully another gpu, so I don’t think that this one is good idea. The only useful is for modules research, but registers will make impossible to rebuild vbios. There are thousands of them. And we even have no idea how they operate. I saw old 32 bit app, that can read registers from vram, but this not working today.

I will keep analyzing the de-compiled modules and try to find the difference that makes it work
I think that the key is in OR commands. But it will get us to rewriting vbios.
I did but I can't get the same level of verbose from my boot log that you get,
Maybe you’re not disabling integrity protection. Or clover is better for this
 
You can try my two 4170 vbios rebuilds (non GOP).
First of all begin with (Aomorhid_Crane_hybrid+portsPatchG5) - Based on Crane modules +G5 Connector patch
Secondary (AomCran+Ports+PPI.rom) - Same as previous, but replaced PowerPlayInfo module, to get same core voltages and frequencies.


!!! Do not use in discrete mode (no GOP-UEFI). Do not edit rom before testing !!!



Report any issues:
1. Rom name
2. Windows testing is first: will driver fail (if failed need pixel patch) (P.S. Enterprise driver have no CRC checks), power stability (AC and battery core frequencies), connectors test (only with hybrid mode by disabling intel gpu), driver center options (i dont know how driver control center is named), and at the end test performance with report from second tab of GPU-Z and HWinfo64 (gpu sensors).
3. If fail, run Ubuntu Safe Graphic mode to recover gpu firmware using Software method. (DO NOT FORGET BACKUP ORIGINAL ROM (on FAT32 usb drive)


IMPORTANT!!!!
I compared VRAM sections of Vaguhn and Aomorhid, and they are fully same (values, timings, names
). So Dell Crane is fully compatible by VRAM, and faster then HP (for me)
 

Attachments

  • Builds.zip
    276.4 KB · Views: 42
Last edited:
Status
Not open for further replies.
Back
Top