This thread will chronicle my efforts to get the AMD card working on these class machines.
in the PC world, the AMD FirePro W7170M is a high-end graphics card for mobile workstations. It is based on the same Tonga-chip as the AMD Radeon R9 M390X and has comperable 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 will concentrate on the older iMacs as the 2011 iMacs have an issue with the NVRAM reboot causing a "black screen". I will continue to post in the 2011 thread as new data and discoveries emerge to make it more compatible there.
Tested Machines:
iMac (27-inch, Mid 2010)
iMac (27-inch, Late 2009)
MacOS Integration:
This GPU-type is actually used internally in a iMac (Retina 5K, 27-inch, Late 2015), model Identifier: iMac17,1, and therefore has native MacOS support! It uses the AMD9000Controller.kext and the AMDTongaGraphicsAcccelerator - RadeonX4000.kext which also natively runs in MacOS. The AMDMTLBronzeDriver is used to initialize its Metal capability. The default framebuffer is in use: RadeonFrameBuffer:
The device ID for my particular card 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 card is electrically detected by the machine and initializes at bootup:
Code:
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!
vBios Mods:
The vbios is the typical ATOMBIOS used by AMD which is limited by its BAR to 128kb. This is just enough space for the header information, vga_bootloader info, data & command tables, and finally a modest sized GOP. Unfortunately a Mac_GOP will not fit within the 128Kb size limitation. 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 the firmwareinfo bootupVDDCIVoltage to 950mV (I wonder if this will help integration into the 2011 models?)
- I turned on the bit that is responsible for firmware posting, 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 this for us.
- If in the future we integrate this with a EFI Mac_GOP, I will add the correct header information. For now, the DELL original works perfect.
- 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 will not get a native MacOS boot picker screen, but instead the OpenCore one.
OpenCore (OCLP) Mods:
Thank you to @khronokernel for his incredible work on this.
Tested on OCLP 0.3.3, but should work with latest release:
Release 0.4.3 · dortania/OpenCore-Legacy-Patcher
With today's macOS 12.3 release, I decided it would be best to release this build of OpenCore Legacy Patcher to ensure some important issues are resolved with today's release (namely Open/Save dial...
github.com
locate
<key>DeviceProperties</key>
, modify <key>PciRoot (0x0)/Pci(0x3,0x0)/Pci (0x0, 0x0)</key>
as previously stated in other posts, thank you @Ausdauersportler for his exploration of these:
Code:
<dict>
<key>rebuild-device-tree</key>
<integer>1</integer>
<key>agdpmod</key>
<string>pikera</string>
<key>CAIL,CAIL_DisableDrmdmaPowerGating</key>
<data>AQAAAA==</data>
<key>CAIL,CAIL_DisableGfxCGPowerGating</key>
<data>AQAAAA==</data>
<key>CAIL,CAIL_DisableUVDPowerGating</key>
<data>AQAAAA==</data>
<key>CAIL,CAIL_DisableVCEPowerGating</key>
<data>AQAAAA==</data>
</dict>
This ROM should be compatible with the following VRAMs:
Hynix, H5GC4H24AJR (my test card)
Samsung, K4G41325FC
Micron, EDW4032BABG
Volt Mods:
I used the following reference to make adjustments to the power play table:
dragon410c/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h at master · leapmotion/dragon410c
kernel source of dragon410c for LeapMotion. Contribute to leapmotion/dragon410c development by creating an account on GitHub.
github.com
From my experience, GDDR5 due to it's spec of 1.5V MVDDC wouldn't work past 1375MHz at 11xx mV. So make sure not to push it.
I had to modify the PolarisBiosEditor to work with these GNC Amethyst based cards; I will be linking the project and my progress for this soon. You can see that I've had to add a "Low", "Medium" and "High" values for the GPU voltages. This is different that previous versions of these GNC cards:
MacOS Testing:
-High Sierra (used for testing)
-It will likely show up as "AMD R9 xxx" with certain versions of OCLP (Lilu+Whatevergreen). This however does not affect functioning, 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 Windows 7 BootCamp partition; I have not tried Windows 10
-There is full control of brightness natively
-sleep works okay
-reboot works okay
- I was able to get the secondary display working as well:
- temp monitoring is not available (I use macFans)
Windows 7 Bootcamp:
- uninstall the driver that windows 7 bootcamp loads up automatically by going into Device Manager/Display Adapters
- It will go to 640x800 bit mode once uninstalled
- run the following application from the AMD.com website: radeon-software-adrenalin-2020-22.2.3-minimalsetup-220224_web; It will want to install R9 M390X, this is correct.
- it will install drivers and full software in the C:\AMD folder.
- it will asked to restart the machine
- you will ofcourse need to add the
EnableBrightnessControl =1
and RMBrightnessControlFlags 0x400
to the:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{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:
Performance:
The scores are not very impressive, because I have a stock core i3 that I tested it on. The FPS became 60s average when I was initially testing it on the 2011 iMac - corei7 before discovering the nvram issue:
I am able to play ASTRONEER® on Steam comfortably, even on a corei3 computer!
I would still consider this card experimental, but I have been using it now for a few months without problems.
I'm unsure of the price, but usually they increase once word gets out of a vbios that is MacOS compatible.
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 ideas and testing.
Enjoy
"This is Insanely Great!"
-Steve Jobs
Attachments
Last edited: