Contribute
Register

macOS Sierra PB: Need testers for new AMD Radeon drivers!

Status
Not open for further replies.
Joined
Apr 10, 2011
Messages
77
Motherboard
Gigabyte GA-Z87X-D3H
CPU
Intel Core i7-4770K
Graphics
AMD R9 290X 4GB
Mac
  1. iMac
Mobile Phone
  1. Android
R9 290X and GT 610 are not working with Sierra yet. R9 290X only works with the Dual monitor one connected to the iGPU and the other to the AMD Card. any workarounds?
 

wildwillow

Moderator
Joined
Jun 26, 2012
Messages
4,569
Motherboard
Z170 Deluxe
CPU
i5-6600K
Graphics
GTX 970
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
  2. Other
I had the same problem, the only matching connector to my Sapphire R9 380 Nitro injecting the Greyhound framebuffer was the Display Port. Looks like Apple and/or AMD have re-written the drivers in MacOS Sierra.
I've tested the init/boot problem that we've been plagued with Since 10.11 with these Tonga dGPU's in MacOS Sierra and the problem still persists. Good news is if anyone wants a ready-made framebuffer patch for this card I've created one and tested it thoroughly. Hotplugging on all three of the patched connectors work, there are 4 connectors in the Greyhound framebuffer but the DP matches it correctly and is my primary display. None of the edits for the 3 connectors conflicts with the DP. If you require HDMI audio this can be achieved over DP and/or the HDMI port using toleda's SSDT/cloverHDMI.

To start you want to connect up to the DP, its the only one that'll get you to the desktop. If you don't have a display port cable/adapter/monitor use the integrated graphics until you patch the connectors in your config.plist.
I've patched each connector individually other than patching the entire framebuffer.
Config.plist/KernelandKextPatches/KextsToPatch.

1. You'll want to inject the Framebuffer "Greyhound" and inject ATI as in the screen shot:

Screen Shot 2016-07-10 at 14.33.30.png


2. Display Port to HDMI connector:
  • Comment : 10.12_Port0x0-DP2HDMI
  • Find <00040000 04030000 00010123 00000000 10000103 00000000>
  • Name : AMD9000Controller.kext
  • Replace <00080000 04020000 00010123 00000000 21030503 00000000>
Screen Shot 2016-07-10 at 14.37.08.png


3. Display Port to DVI-D connector:
  • Comment : 10.12_Port0x1-DP2DVI-D
  • Find <00040000 04030000 00010213 00000000 20010204 00000000>
  • Name : AMD9000Controller.kext
  • Replace <04000000 04020000 00010213 00000000 12040106 00000000>
Screen Shot 2016-07-10 at 14.36.29.png


4. Display Port to DVI-S connector:
  • Comment : 10.12_Port0x3-DP2DVI-S
  • Find <00040000 04030000 00010433 00000000 21030402 00000000>
  • Name : AMD9000Controller.kext
  • Replace <00020000 14020000 00010433 00000000 10000605 00000000>
Screen Shot 2016-07-10 at 14.34.57.png


You may not need all the connector patches but once you've added them you should be ok to plug and play when and if needs arise.
 

Fl0r!an

Moderator
Joined
Jul 6, 2010
Messages
2,681
Motherboard
Asus Z170M-Plus
CPU
i5-6600K
Graphics
R9 280
Mac
  1. MacBook Pro
  2. Mac Pro
Mobile Phone
  1. iOS
Interesting. So it seems Apple has changed the framebuffer structure from 16 byte per connector to 24 byte. I already noted that when investigating the AMD9500Controller, but I didn't think about the other kexts. Will have a look at the remaining AMDx000Controller.kexts for changes in the structure...

Btw, I've updated the first post with latest discoveries from this thread & elsewhere.
 

wildwillow

Moderator
Joined
Jun 26, 2012
Messages
4,569
Motherboard
Z170 Deluxe
CPU
i5-6600K
Graphics
GTX 970
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
  2. Other
There are a couple of extra framebuffers in the AMD9000Controller.kext/10.12. One that may work better than Greyhound in dual monitor configuration but I haven't had the time to check them out yet. From here Lagotto could work on the R9 380 leaving out a DVI-S connector. The HDMI and DP connectors are exactly the same as my HDMI/DP Greyhound binary patches.
EDIT: Updated Lagotto for the full framebuffer dump.
Code:
Lagotto (4) @ 0x1d38e0

DP, HDMI, DDVI, DDVI

000400000403000000010100000000001102040100000000 - DP
000800000402000000010200000000002103050300000000 - HDMI
040000000402000000010300000000000000010500000000 - DDVI
040000000402000000010400000000000204060600000000 - DDVI

MalteseS

000800000402000000010100000000001204030100000000 - HDMI

Maltese

000400000403000000010123000000001000010300000000 - DP
000400000403000000010213000000002001020400000000 - DP
000400000403000000010343000000001102030100000000 - DP
000400000403000000010433000000002103040200000000 - DP
 
Last edited:

wildwillow

Moderator
Joined
Jun 26, 2012
Messages
4,569
Motherboard
Z170 Deluxe
CPU
i5-6600K
Graphics
GTX 970
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
  2. Other
Update : Using Lagotto allows for dual monitors over Display Port and HDMI with the R9 380 and no patches required. The DVI-D port works too, just switched from HDMI to DVI-D and bingo, works. Time to test PCIe as first priority. Didn't make a difference, same bug persists.
Screen Shot 2016-07-10 at 20.26.58.png Screen Shot 2016-07-10 at 20.27.45.png
 
Last edited:

Fl0r!an

Moderator
Joined
Jul 6, 2010
Messages
2,681
Motherboard
Asus Z170M-Plus
CPU
i5-6600K
Graphics
R9 280
Mac
  1. MacBook Pro
  2. Mac Pro
Mobile Phone
  1. iOS
Wow, good find! It's even better than you've expected: Your dump is incomplete, full dump looks like this:

Code:
Lagotto (4) @ 0x1d38e0
DP, HDMI, DDVI, DDVI
000400000403000000010100000000001102040100000000
000800000402000000010200000000002103050300000000
040000000402000000010300000000000000010500000000
040000000402000000010400000000000204060600000000

That's a 100% match with reference R9 380! :eek:

EDIT: For sake of completeness, here's the full dump for all relevant AMD framebuffers (as of PB1):
Code:
-------------------------AMD7000Controller.kext-------------------------

Ramen (6) @ 0x1d5850
LVDS, HDMI, DP, DP, DP, DP
020000000001000039050108000000002001050600000000
000800000402000000010200000000001000030500000000
000400000403000000010343000000001102010100000000
000400000001000000010431000000002103040300000000
000400000403000000010563000000001204020200000000
000400000001000000010651000000002205040300000000

Tako (6) @ 0x1d5950
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010151000000002205020400000000
020000000001000000010261010000001204010300000000
000400000403000000010343000000001102030100000000
000400000001000000010431000000002103050500000000
000400000403000000010523000000001000040200000000
000400000001000000010611000000002001050500000000

Namako (4) @ 0x1d59e0
LVDS, LVDS, DP, DP
020000000001000000010151000000002205020200000000
020000000001000000010261010000001204010100000000
000400000403000000010343000000001102030300000000
000400000403000000010433000000002103040400000000

Aji (4) @ 0x1d5aa0
DP, DP, DDVI, HDMI
000400000403000000010101000000001204050100000000
000400000403000000010201000000002205040200000000
040000001402000000010300000000000000030600000000
000800000402000000010400000000001102010400000000

Buri (4) @ 0x1d5b00
LVDS, DP, DP, HDMI
020000000001000039050100000000001000050500000000
000400000403000000090200000000001102010100000000
000400000403000000090300000000002103020200000000
000800000402000000010400000000001204030300000000

Chutoro (5) @ 0x1d5b60
LVDS, DP, DP, DP, DP
020000000001000019010100000000001204030300000000
000400000403000000010201000000001102010100000000
000400000001000000090300000000002103020200000000
000400000001000000090400000000002205040400000000
000400000403000000010500000000001000050500000000

Dashimaki (4) @ 0x1d5be0
DP, DP, DDVI, HDMI
000400000403000000010101000000001204020200000000
000400000403000000010200000000002205030500000000
040000001402000000010301000000000000040400000000
000800000402000000010400000000001102010100000000

Ebi (5) @ 0x1d5c40
LVDS, DP, DP, DP, DP
020000000001000019010100000000001204030300000000
000400000403000000010201000000001102010100000000
000400000001000000090301000000002103020200000000
000400000001000000090401000000002205040400000000
000400000403000000010501000000001000050500000000

Gari (5) @ 0x1d5cc0
LVDS, DP, DP, DP, DP
020000000001000019010100000000001204030300000000
000400000403000000010201000000001102010100000000
000400000001000000090300000000002103020200000000
000400000001000000090400000000002205040400000000
000400000403000000010500000000001000050500000000

Futomaki (4) @ 0x1d5d70
DP, DP, DDVI, HDMI
000400000403000000010101000000001204040100000000
000400000403000000010201000000002205050200000000
040000001402000000010300000000000000060600000000
000800000402000000010400000000001102010300000000

Hamachi (4) @ 0x1d5dd0
DP, DP, DDVI, HDMI
000400000403000000010101000000001204050100000000
000400000403000000010201000000002205040200000000
040000001402000000010300000000000000030600000000
000800000402000000010400000000001102010400000000

OPM (6) @ 0x1d5e70
DP, DP, DP, DP, DP, DP
000400000403000000010001000000001102010100000000
000400000403000000010001000000002103020200000000
000400000403000000010001000000001204030300000000
000400000403000000010001000000002205040400000000
000400000403000000010001000000001000050500000000
000400001403000000010001000000002001060600000000

Ikura (1) @ 0x1d5f00
HDMI
000800000402000000010100000000001204030100000000

IkuraS (6) @ 0x1d5f20
DP, DP, DP, DP, DP, DP
000400000403000000010143000000001102010300000000
000400000403000000010233000000002103020400000000
000400000403000000010363000000001204030100000000
000400000403000000010453000000002205040200000000
000400000403000000010523000000001000050500000000
000400000403000000010613000000002001060600000000

Junsai (6) @ 0x1d5fb0
DP, DP, DP, DP, DP, DP
000400000403000000010001000000001204030100000000
000400000403000000010001000000002205040200000000
000400000403000000010001000000001102010300000000
000400000403000000010001000000002103020400000000
000400000403000000010001000000001000050500000000
000400000403000000010001000000002001060600000000

Kani (1) @ 0x1d6040
HDMI
000800000402000000010100000000001204030100000000

KaniS (6) @ 0x1d6060
DP, DP, DP, DP, DP, DP
000400000403000000010143000000001102010300000000
000400000403000000010233000000002103020400000000
000400000403000000010363000000001204030100000000
000400000403000000010453000000002205040200000000
000400000403000000010523000000001000050500000000
000400000403000000010613000000002001060600000000

DashimakiS (4) @ 0x1d60f0
DP, DP, DDVI, HDMI
000400000403000000010101000000001204020200000000
000400000403000000010201000000002205030500000000
040000001402000000010300000000000000040400000000
000800000402000000010400000000001102010100000000

Maguro (1) @ 0x1d6150
HDMI
000800000402000000010100000000001204030100000000

MaguroS (6) @ 0x1d6170
DP, DP, DP, DP, DP, DP
000400000403000000010143000000001102010300000000
000400000403000000010233000000002103020400000000
000400000403000000010363000000001204030100000000
000400000403000000010453000000002205040200000000
000400000403000000010523000000001000050500000000
000400000403000000010613000000002001060600000000

-------------------------AMD8000Controller.kext-------------------------

Exmoor (6) @ 0x1d2790
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010151000000002205020400000000
020000000001000000010261010000001204010300000000
000400000403000000010343000000001102030100000000
000400000001000000010431000000002103050500000000
000400000403000000010523000000001000040200000000
000400000001000000010611000000002001050500000000

Baladi (6) @ 0x1d2920
DP, DP, DP, DP, DP, DP
000400000403000000010300000000001204030300000000
000400000403000000010100000000001102010100000000
000400000403000000010200000000002103020200000000
000400000403000000010400000000002205040400000000
000400000403000000010500000000001000050500000000
000400000403000000010600000000002001060600000000

-------------------------AMD9000Controller.kext-------------------------

Exmoor (6) @ 0x1d37a0
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010151000000002205020400000000
020000000001000000010261010000001204010300000000
000400000403000000010343000000001102030100000000
000400000001000000010431000000002103050500000000
000400000403000000010523000000001000040200000000
000400000001000000010611000000002001050500000000

OPM (6) @ 0x1d3830
DP, DP, DP, DP, DP, DP
000400000403000000000001000000001000010100000000
000400000403000000000001000000002001020200000000
000400000403000000000001000000001102030300000000
000400000403000000000001000000002103040400000000
000400000403000000000001000000001204050500000000
000400000403000000000001000000002205060600000000

MalteseS (1) @ 0x1d38c0
HDMI
000800000402000000010100000000001204030100000000

Lagotto (4) @ 0x1d38e0
DP, HDMI, DDVI, DDVI
000400000403000000010100000000001102040100000000
000800000402000000010200000000002103050300000000
040000000402000000010300000000000000010500000000
040000000402000000010400000000000204060600000000

GreyhoundS (1) @ 0x1d3940
HDMI
000800000402000000010100000000001204030100000000

Maltese (6) @ 0x1d39d0
DP, DP, DP, DP, DP, DP
000400000403000000010123000000001000010300000000
000400000403000000010213000000002001020400000000
000400000403000000010343000000001102030100000000
000400000403000000010433000000002103040200000000
000400000403000000010563000000001204050500000000
000400000403000000010653000000002205060600000000

Labrador (6) @ 0x1d3a80
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010131000000002103020400000000
020000000001000000010241010000001102010300000000
000400000403000000010323000000001000030100000000
000400000001000000010411000000002001050500000000
000400000403000000010563000000001204040200000000
000400000001000000010651000000002205050500000000

Basset (4) @ 0x1d3b10
LVDS, LVDS, DP, DP
020000000001000000010131000000002103020200000000
020000000001000000010241010000001102010100000000
000400000403000000010323000000001000030300000000
000400000403000000010413000000002001040400000000

Greyhound (6) @ 0x1d3bf0
DP, DP, DP, DP, DP, DP
000400000403000000010123000000001000010300000000
000400000403000000010213000000002001020400000000
000400000403000000010343000000001102030100000000
000400000403000000010433000000002103040200000000
000400000403000000010563000000001204050500000000
000400000403000000010653000000002205060600000000

Baladi (6) @ 0x1d3ca0
DP, DP, DP, DP, DP, DP
000400000403000000010300000000001204030300000000
000400000403000000010100000000001102010100000000
000400000403000000010200000000002103020200000000
000400000403000000010400000000002205040400000000
000400000403000000010500000000001000050500000000
000400000403000000010600000000002001060600000000

-------------------------AMD9500Controller.kext-------------------------

Exmoor (6) @ 0x1d87b0
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010151000000002205020400000000
020000000001000000010261010000001204010300000000
000400000403000000010343000000001102030100000000
000400000001000000010431000000002103050500000000
000400000403000000010523000000001000040200000000
000400000001000000010611000000002001050500000000

Berbice (5) @ 0x1d8840
LVDS, DP, DP, DP, DP
020000000001000039050108000000002001010100000000
000400000001000000010233000000001000020200000000
000400000403000000010313000000002103030300000000
000400000403000000010453000000001102040400000000
000400000403000000010533000000001204050500000000

Elqui (5) @ 0x1d88c0
LVDS, LVDS, DP, DP, DP
020000000001000000010141000000001102020400000000
020000000001000000010231010000002103010300000000
000400000403000000010303000000002001030100000000
000400000403000000010403000000001204040200000000
000400000403000000010501000000001000050500000000

Acre (3) @ 0x1d89a0
DP, HDMI, DDVI
000400000403000000010101000000001102020100000000
000800000402000000010200000000002103050400000000
040000000402000000010300000000000000030500000000

Caroni (5) @ 0x1d8a60
LVDS, LVDS, DP, DP, DP
020000000001000000010141000000001102020400000000
020000000001000000010231010000002103010300000000
000400000403000000010303000000002001030100000000
000400000403000000010403000000001204040200000000
000400000403000000010501000000001000050500000000

Florin (6) @ 0x1d8b40
LVDS, LVDS, DP, DP, DP, DP
020000000001000000010141000000001102020400000000
020000000001000000010231010000002103010300000000
000400000403000000010313000000002001030100000000
000400000403000000010421000000001000050500000000
000400000403000000010553000000002205040200000000
000400000403000000010661000000001204060600000000

Dayman (6) @ 0x1d8bf0
DP, DP, DP, HDMI, DDVI, DP
000400000403000000010101000000001204060100000000
000400000403000000010201000000002205040300000000
000400000403000000010301000000001102010200000000
000800000402000000010400000000002103050400000000
040000000402000000010500000000000000030600000000
000400000001000000010601000000002001020500000000

Baladi (6) @ 0x1d8ca0
DP, DP, DP, DP, DP, DP
000400000403000000010300000000001204030300000000
000400000403000000010100000000001102010100000000
000400000403000000010200000000002103020200000000
000400000403000000010400000000002205040400000000
000400000403000000010500000000001000050500000000
000400000403000000010600000000002001060600000000

OPM (5) @ 0x1d8d30
DP, DP, DP, DP, DP
000400000403000000000001000000001102020200000000
000400000403000000000001000000002103030300000000
000400000403000000000001000000001204010100000000
000400000403000000000001000000001000040400000000
000400000403000000000001000000002001050500000000
 
Last edited:

wildwillow

Moderator
Joined
Jun 26, 2012
Messages
4,569
Motherboard
Z170 Deluxe
CPU
i5-6600K
Graphics
GTX 970
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
  2. Other
I thought something was wrong with the dump, I'm using the info to get the framebuffer info here Apple Intel AMD/ATI Framebuffers | tonymacx86.com
I've ran it a couple of times and it is incomplete. This could be the framebuffer that we've been waiting for.
How are you getting your dump from AMD9000Controller.kext?
 
Last edited:

Fl0r!an

Moderator
Joined
Jul 6, 2010
Messages
2,681
Motherboard
Asus Z170M-Plus
CPU
i5-6600K
Graphics
R9 280
Mac
  1. MacBook Pro
  2. Mac Pro
Mobile Phone
  1. iOS
Same script, but with modified connector data length:
Code:
<?php
function padHex($d,$l) {return str_pad(dechex($d),$l,'0',STR_PAD_LEFT);}
function toHex($s){$i=0;$t='';while(isset($s[$i])){$t.=padHex(ord($s[$i++]),2);}return $t;}
function toStr($h){$s='';$i=4;while($i-->0){$s.=chr($h>>(8*$i)&0xFF);}return $s;}
$ctype=array('02000000'=>'LVDS','04000000'=>'DDVI','80000000'=>'SVIDEO','10000000'=>'VGA','00020000'=>'SDVI','00040000'=>'DP','00080000'=>'HDMI','00100000'=>'????');
foreach(glob('/System/Library/Extensions/'.(file_exists('/System/Library/Extensions/AMD6000Controller.kext') ? 'AMD' : 'ATI').'*Controller.kext') as $file) {
    echo str_pad(substr(strrchr($file,'/'),1),72,'-',STR_PAD_BOTH)."\n\n";
    $file=array_pop(glob("$file/Contents/MacOS/*"));
    $a=popen("otool -XvQt $file",'r');
    $b=fopen($file,'r');
    while ($l=fgets($a)) {
        if (strncmp($l,'__ZN',4)!=0 || ($i=strpos($l,'Info10createInfo'))===false) continue;
        $f=new stdClass();
        $f->name=substr($l,5+is_numeric($l[5]),$i-5-is_numeric($l[5]));
        while(($l=fgets($a)) && strpos($l,'ret')===false) {
            if (strpos($l,'leaq')!==false) $f->addr=hexdec(substr($l,6,strpos($l,'(')-6));
            if (!isset($f->ports) && strpos($l,"movb\t$")!==false) $f->ports=hexdec(substr($l,strpos($l,'$'),strpos($l,',')-strpos($l,'$')))&0xFF;
            if (strpos($l,'jl')!==false) $i=hexdec(substr($l,4));
            if (strpos($l,'jmp')!==false) $i=hexdec(substr($l,4)) + 0x1A;
        }
        $f->addr+=$i;
        echo "$f->name ($f->ports) @ 0x".dechex($f->addr)."\n";
        $t=$p=array();
        fseek($b,$f->addr);
        while($f->ports-- > 0) $p[]=$ctype[substr($t[]=toHex(fread($b,24)),0,8)];
        echo implode(', ',$p)."\n";
        echo implode("\n",$t)."\n\n";
    }
    pclose($a);
    fclose($b);
}

EDIT: Highlighting the code didn't work. Relevant line is this one:
while($f->ports-- > 0) $p[]=$ctype[substr($t[]=toHex(fread($b,24)),0,8)];
 

wildwillow

Moderator
Joined
Jun 26, 2012
Messages
4,569
Motherboard
Z170 Deluxe
CPU
i5-6600K
Graphics
GTX 970
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
  2. Other
Thanks, I've edited my post with the correct/full data dump for Lagotto. Great result here Fl0r!an.
 
Status
Not open for further replies.
Top