iMac 2010 graphics card – AMD FirePro W7170M

This thread will chronicle my efforts to get the AMD card to work on these class machines.

in the PC world, the AMD FirePro W7170M is a high-end graphics card for mobile workstations. It’s based on the same Tonga chip as the AMD Radeon R9 M390X and has comparable clock speeds. Therefore, the card is based on the third generation of the GCN architecture (GCN 1.2) and supports DirectX 12 (FL 12_0).

I’m going to focus on older iMacs because 2011 iMacs have an issue with NVRAM reboot causing a “black screen”. I will continue to post in the 2011 thread as new data and findings emerge to make it more compatible there.

Devices tested:
iMac (27 inch, mid 2010)
iMac (27 inch, late 2009)
iMac (27 inch, late 2011) fails reboot

macOS integration:
This type of GPU is actually used internally in an iMac (Retina 5K, 27 inch, late 2015), Model Identifier: iMac17.1, and therefore has native MacOS support! It uses AMD9000Controller.kext and AMDTongaGraphicsAccelerator – RadeonX4000.kext which also runs natively on MacOS. AMDMTLBronzeDriver is used to initialize its Metal capability. The default framebuffer is used: RadeonFrameBuffer:

AMD9000Controller_log.png

My particular card’s device ID is 0x6921-1002, as you can see it is already natively supported.

SSH access:
The first thing we do before any reverse engineering is to see if the board is electrically detected by the machine and initializes on boot:

Coded:

Adapter  0    SEG=0000, BN=01, DN=00, PCIID=69211002, SSID=69211002)
    Asic Family        :  Tonga (Slave)
    Flash Type         :  MX25L1005   (128 KB)
    Product Name       :  DELL Miramar Amethyst XTGL A1 G5 4GB 128Mx32 300e/150m MXM (OPM)
    Bios Config File   :  BR46629.001 
    Bios P/N           :  P/N Not Available
    Bios Version       :  015.048.000.069.046629
    Bios Date          :  11/13/15,01:56:3
    ROM Image Type     :  Hybrid Images
    ROM Image Details  :
        Image[0]: Size(65536 Bytes), Type(Legacy Image)        <-- legacy vbios recognized!
        Image[1]: Size(61440 Bytes), Type(EFI Image)        <-- PCI option ROM/UEFI recognized!

We can see here that the Vbios base is a DELL revision BR46629.001

vBios modules:
The vbios is the typical ATOMBIOS used by AMD which is limited by its BAR to 128kb. That’s just enough space for header information, vga_bootloader information, data and command tables, and finally a modestly sized GOP. Unfortunately, a Mac_GOP does not fit within the 128 KB size limit. So this vBios mod depends on OCLP for full use:
– I modified the object table to work with our current iMac models: eDP:14, GraphicObjectsID:2021, I2CID:92, SenseID:03.
– I increased firmwareinfo bootupVDDCIVoltage to 950mV (wonder if this will help integration in 2011 models?)
– I activated the bit responsible for releasing the firmware, 0x403e changed to 0x403f
– I did NOT use an IM17.1 header to trick AppleGraphicsPolicy into accepting it as native, because OCLP takes care of that for us.
– If in the future we integrate this with an EFI Mac_GOP, I will add the correct header information. So far the original DELL is working perfectly.
– I used a PC UEFI GOP (AMD GOP 1.69.0.15.50 – signature removed) as our GOP of choice to communicate with OC and/or OCLP, so you won’t get a native MacOS boot selection screen, but instead the OpenCore one.

OpenCore Modules (OCLP):
Thanks to @khronokernel for his amazing work on this.
Tested on OCLP 0.3.3, but should work with the latest version:

In your hidden EFI/OC folder you will need to modify the config.plist
Locate DevicePropertiesto modify PciRoot (0x0)/Pci(0x3,0x0)/Pci (0x0, 0x0)

as previously stated in other articles, thanks @Ausdauersportler for his exploration of these:

Coded:


rebuild-device-tree
1
agdpmod
pikera
CAIL,CAIL_DisableDrmdmaPowerGating
AQAAAA==
CAIL,CAIL_DisableGfxCGPowerGating
AQAAAA==
CAIL,CAIL_DisableUVDPowerGating
AQAAAA==
CAIL,CAIL_DisableVCEPowerGating
AQAAAA==

This ROM must be compatible with the following VRAMs:
Hynix, H5GC4H24AJR (my test board)
Samsung, K4G41325FC
Micron, EDW4032BABG

Volt mods:
I used the following reference to make adjustments to the power play table:

The usVddgfxoffset value in all Tonga/Amethyst roms is B4FF (FFB4=65460), this offset value looks like a dynamic value and so it looks like Tonga has “Dynamic VDDCI”.

In my experience GDDR5 due to its 1.5V MVDDC specification would not work above 1375MHz at 11xx mV. So make sure you don’t push it.
I had to modify PolarisBiosEditor to work with these GNC Amethyst based boards; I’ll link the project to my progress for that soon. You can see that I had to add “Low”, “Medium” and “High” values ​​for the GPU voltages. This is different from previous versions of these GNC boards:

AmethystBiosEditor_screenshot.png

macOS review:
-High Sierra (used for testing)
-It will probably appear as “AMD R9 xxx” with some versions of OCLP (Lilu+Whatevergreen). This however does not affect operation, it is only cosmetic
-I have not tested this on higher versions of MacOS; But I see no reason to believe it won’t work
-I was able to get it recognized in the Windows 7 BootCamp partition; I have not tried Windows 10
-There is full brightness control natively
-sleep works well
– reboot works fine
– I was able to make the secondary display work as well:
– temperature monitoring is not available (I use macFans)

W7170M_corei3.png
Poster_W7170M.png

Windows 7 boot camp:
– uninstall the driver that Windows 7 bootcamp automatically loads by going to Device Manager/Display Adapters
– It will switch to 640×800 bit mode when uninstalled
– launch the following application from the AMD.com site: radeon-software-adrenalin-2020-22.2.3-minimalsetup-220224_web; It will want to install R9 M390X, that is correct.
– it will install drivers and full software in the C:AMD folder.
– you will be asked to restart the machine
– you will of course have to add the EnableBrightnessControl =1 and RMBrightnessControlFlags 0x400 to the:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlVideo{6B6D9927-652B-4CEB-9650-5A45EE49FDF0}; It has the most entries: 0000, 0001, 0002, 0003, 0004, 0005
– now if you go to Display Adapters you will see: “AMD Radeon (TM) R9 M390X”, this is the correct driver set for this video card:

R9_M390X_850Mhz_AMD_drivers_gpuz.gif

Performance:
The scores aren’t very impressive, as I have a stock core i3 that I tested it on. The FPS became the 60s average when I initially tested it on the 2011 iMac – corei7 before I discovered the nvram issue:

W7170M_Valley_Scores.png

I can comfortably play ASTRONEER® on Steam, even on a corei3 computer!
I would still consider this card experimentalbut I’ve been using it for a few months now with no problem.
I’m not sure of the price, but usually they go up once word gets out of a macOS compatible vbios.
I will continue to update this post as new ideas emerge.

I’ll thank the usual suspects: @Ausdauersportler, @internetzel, @m0bil, @dfranetic, @khronokernel and others for their insights and testing.
Enjoy;)

“That’s unbelievably awesome!”
-Steve Jobs