Jump to content

[HOW TO] Modification of AMD FB + Clover injection

AMD Radeon Frame Buffer

  • Please log in to reply
366 replies to this topic

#1
Vlada.

Vlada.

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 113 posts
  • Gender:Male
  • Location:Serbia

*
POPULAR

Mostly because of my partly success in making proper patch for all Radeon R9 270 Series GPU-s described in Radeon R9 270X FrameBuffer issue topic, but also because I see that many of you are still searching for some sort of help, I was coming to an idea to share some of my conclusions via this tutorial, in hope that it will resolve all of your current troubles. Once when you check this tutorial and you use it, you will understand better where is the problem and eventually, after you determinate what is what you will be able to fix it. It is important to say, that this tutorial is universal and it can be used for any AMD GPU.

 
So lets start… 
 
Modifying the AMD driver is one of the advanced hacker's technique, however, recently with clover in combination, the whole process can be reduced to a decent minimum. This tutorial aims to discover what specific digits in the code do and basically to educate so that everyone can make necessary modification alone and w/o further assistant. All you need is a bit of good will and some patience.
 
---------------------------------------------------------------------------------------------------------
 
Extracting ROM file - Step 1 involves extraction of the original ROM file from your graphics card. This could be done from Windows by applications such as GPU-Z or some other similar, or from Mac OS X via DPCIManager application. Extracted ROM file you’ll need to save and then switch again in your Mac OS X.
 
---------------------------------------------------------------------------------------------------------
 
Finding proper FB - Step 2 involves finding proper frame buffer that can be used by your GPU. In order to do this properly, we will need a terminal and corresponding ATI FrameBuffers script. We need this one to extract FB code inside AMDXXXXControllers.kexts. 

 

Download ATI FrameBuffers php scripts by Pavo. Unpack the zip file on the desktop, then switch to terminal. Type php then simply drag the script in the terminal and press enter.
 
What you’ll get is a long series of codes together with the exact names of the frame buffers inside certain AMD Controller kexts.
 

Although by using this patching method we can modified any FB, it is recommended that you find the proper one for your GPU, which might already work with your card. The point with this is to locate those that contain the same number of connectors, so per example:
 
My GPU has 4 connectors: 2xDVI, 1xHDMI and 1xDP  -  so this means that I need to use FB with 4 connectors.
 
In the AMD personality dump file, just under the first line with FB name, we can find info that we need.
 
Personality: Futomaki
ConnectorInfo count in decimal: 4
 
So this means that I should check those FB-s first. 
 

Copy the code from the terminal in the Text Editor and save it on the desktop. Then take a look carefully extracted code, and write all frame buffers from the AMD Controller kext that drives your video card. For example, Radeon R9 270X that I’m using, is driven by AMD7000Controller.kext which containing the following list of frame buffers: MaguroS, Maguro, KaniS, Kani, Junsai, IkuraS, Ikura, OPM, Hamachi, Futomaki, Gari, Ebi, Dashimaki, Chutoro, Buri, Aji. For Radeon 6850HD it is necessary to look at the list of FB extracted from AMD6000Controller.kext, etc. ...
 
Now that you have the names of FB-s you will need to determine which of them your card can use. The simplest way of doing this is Clover, although it is possible to do the same thing with Chameleon boot loader, but I'll be focusing exclusively this time on Clover.
 
So open Clover Configurator and in the Graphics section of the FB Name field, type the first FB from your list. Then restart computer and reboot again in OS X. If all goes well, your graphics will work immediately (with or without GL quartz enabled), however, there are two more situations that may occur.
 
First one is a situation where you will get a black screen, but the monitor will stays on. This also means that assigned FB works, but the connectors code inside dedicated AMD Controller kext is mismatched. In this situation pressing the ALT+CMD+Eject buttons on Apple keyboards and WIN+ALT+F12 on PC keyboards will simply sleep your computer. After waking from sleep your computer will activate the screen again. Basically, this is the one of the most common situation which requires further patching.
 
In all other situations, most likely your monitor will automatically be switched off. This means that the assigned FB does not work, or another word that is not compatible with your GPU. In this situation my recommendation would be that you simply restart your computer. The best way to do that is to implement the software restart by pressing CTRL+CMD+Eject buttons on Apple keyboards or for PC keyboards that would be CRTL+ALT+F12, after which the computer will just restart immediately.
 
By modifying Clover Boot options from its menu, where you can rename assigned FB or simply remove all enabled Graphics options that you are previously assigned, you will be able to re-boot OS X normally again. Basically, this is the part that will certainly take you some time before you discover which FB best suits to your card, but when you do this, you're ready for the next step.
 
---------------------------------------------------------------------------------------------------------
 
FB Code Construction - Step 3 is the most important and involves modifying the original driver or more precisely, it considers changing hexadecimal values inside the driver that are defining the connector output signal from your graphic card.
 
For this maneuver we will need correct values extracted from the existing ROM file, and that can be done through the two scripts: radeon_bios_decode  and redsock_bios_decoder scripts. It is necessary to use both because they are giving different results. Basically only with both results we can collect all the necessary data that we need.
 
Scripts can be used in a similar way. You’ll need to open the terminal, drag the first script in a terminal then press once space, than type  <  than once space again and now drag your ROM file in the terminal and simply hit Enter. The obtained result will look something like this (example R9 270X)
 
localhost:~ Vladimir$ /Users/Vladimir/Developer/Ati\ Workbench/AMD\ Graphics\ tool/Radeon\ BIOS\ decoders/radeon_bios_decode < /Users/Vladimir/Developer/Ati\ Workbench/AMD\ Graphics\ tool/AMD\ BIOS/Pitcairn.rom
 
radeon_bios_decode will give the following result:



ATOM BIOS Rom:
  SubsystemVendorID: 0x148c SubsystemID: 0x2336
  IOBaseAddress: 0x0000
  Filename: E8B11LCC.HHW
  BIOS Bootup Message:
C63101 CURACAO XT 2GB GDDR5 64Mx32 E8B11LCC.HHW 2013
PCI ID 1002: 6810
Connector at index 0
  Type [offset 43522]: DisplayPort (10)
  Encoder [offset 43526]: INTERNAL_UNIPHY2 (0x21)
  i2cid [offset 43632]: 0x90, OSX senseid: 0x1
Connector at index 1
  Type [offset 43532]: HDMI-A (11)
  Encoder [offset 43536]: INTERNAL_UNIPHY2 (0x21)
  i2cid [offset 43659]: 0x92, OSX senseid: 0x3
Connector at index 2
  Type [offset 43542]: DVI-I (2)
  Encoder [offset 43546]: INTERNAL_UNIPHY (0x1e)
  i2cid [offset 43696]: 0x95, OSX senseid: 0x6
Connector at index 3
  Type [offset 43552]: DVI-I (2)
  Encoder [offset 43556]: INTERNAL_KLDSCP_DAC1 (0x15)
  i2cid [offset 43696]: 0x95, OSX senseid: 0x6
Connector at index 4
  Type [offset 43562]: DVI-D (3)
  Encoder [offset 43566]: INTERNAL_UNIPHY1 (0x20)
  i2cid [offset 43723]: 0x94, OSX senseid: 0x5

redsock_bios_decoder will give the following result:

E8B11LCC.HHW:
C63101 CURACAO XT 2GB GDDR5 64Mx32 E8B11LCC.HHW 2013
Subsystem Vendor ID: 148c
  Subsystem ID: 2336
Object Header Structure Size: 355
Connector Object Table Offset: 48
Router Table Object Offset: 0
Encoder Object Table Offset: fd
Display Path Table Offset: 12
Connector Object Id [19] which is [DISPLAY_PORT]
  encoder obj id [0x21] which is [INTERNAL_UNIPHY2 (osx txmit 0x12 [duallink 0x2] enc 0x4)] linkb: false
Connector Object Id [12] which is [HDMI_TYPE_A]
  encoder obj id [0x21] which is [INTERNAL_UNIPHY2 (osx txmit 0x22 [duallink 0x2] enc 0x5)] linkb: true
Connector Object Id [2] which is [DVI_I]
  encoder obj id [0x1e] which is [INTERNAL_UNIPHY (osx txmit 0x10 [duallink 0x0] enc 0x0)] linkb: false
Connector Object Id [2] which is [DVI_I]
  encoder obj id [0x15] which is [INTERNAL_KLDSCP_DAC1 (osx txmit 0x00 0x10 enc)] linkb: false
Connector Object Id [4] which is [DVI_D]
  encoder obj id [0x20] which is [INTERNAL_UNIPHY1 (osx txmit 0x11 [duallink 0x1] enc 0x2)] linkb: false

Copy and paste the results into Text Editor and save it. Then extract the following items from both results like in this example by following the color order:
 
01 [DISPLAY_PORT] 
redsock_bios_decoder :
enc obj 0x21 transmitter 0x12 dual link 0x2 enc 0x4
radeon_bios_decode:
Connector at index 0
Type [@offset 43522]: DisplayPort (10)
Encoder [@offset 43526]: INTERNAL_UNIPHY2 (0x21) 
i2cid [@offset 43632]: 0x90, OSX senseid: 0x1
 
Code construction: 12 04 01 01
 
02 [HDMI_TYPE_A] 
redsock_bios_decoder :
enc obj 0x21 transmitter 0x22 dual link 0x2 enc 0x5
radeon_bios_decode:
Connector at index 1
Type [@offset 43532]: HDMI-A (11)
Encoder [@offset 43536]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 43659]: 0x92, OSX senseid: 0x3
 
Code construction: 22 05 02 03
 
03 [DVI_I] 
redsock_bios_decoder :
enc obj 0x1e transmitter 0x10 dual link 0x0 enc 0x0
radeon_bios_decode:
Connector at index 2
Type [@offset 43542]: DVI-I (2)
Encoder [@offset 43546]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 43696]: 0x95, OSX senseid: 0x6
 
Code construction: 10 00 03 06
 
04 [DVI_I] 
redsock_bios_decoder :
enc obj 0x15 transmitter 0x00 enc 0x10
radeon_bios_decode:
Connector at index 3
Type [@offset 43552]: DVI-I (2)
Encoder [@offset 43556]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 43696]: 0x95, OSX senseid: 0x6
 
Code construction: 00 10 04 06
 
05 [DVI_D] 
redsock_bios_decoder :
enc obj 0x20 transmitter 0x11 dual link 0x1 enc 0x2
radeon_bios_decode:
Connector at index 4
Type [@offset 43562]: DVI-D (3)
Encoder [@offset 43566]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 43723]: 0x94, OSX senseid: 0x5
 
Code construction: 11 02 05 05
 
Now let's look at the original source code extracted from the original driver for the FB Futomaki that activates R9 270X:
 
Personality: Futomaki 10.9.2
ConnectorInfo count in decimal: 4
Disk offset in decimal 811280
00 04 00 00 04 03 00 00 00 01 01 01 12 04 04 01
00 04 00 00 04 03 00 00 00 01 02 01 22 05 05 02
04 00 00 00 14 02 00 00 00 01 03 00 00 00 06 06
00 08 00 00 04 02 00 00 00 01 04 00 11 02 01 03
 
 
Each row represents definition for the one connector. In this case we have 4 of them.
In order to better understand what is what I will separate first line from the code as an example:
 
00 04 00 00 04 03 00 00 00 01 01 01 12 04 04 01
 
Divided into segments:
 
00 04 00 00 / Connector type
04 03 00 00 / ATY, ControlFlags
00 01 01 01 / Features
12 / Transmitter
04 / Encoder
04 / hotplug ID
01 / Sense ID
 
What this means?
 
First I’ll put the list of all types of connectors:
 
Connector Type LVDS 0 × 00000002 = 02 00 00 00 Note: Laptop Monitor
Connector Type DVIDL 0 × 00000004 = 04 00 00 00 Note: Dual Link DVI
Connector Type VGA 0 × 00000010 = 10 00 00 00
Connector Type SV 0 × 00000080 = 08 00 00 00
Connector Type DP = 0 × 00000400 00 04 00 00
Connector Type HDMI 0 × 00000800 = 00 08 00 00
Connector Type DVISL 0 × 00000200 = 00 02 00 00 Note: Single Link DVI
 
So now it's clear that first 4 pair of numbers represents the type of connector in the code:
 
00 04 00 00 04 03 00 00 00 01 01 01 12 04 04 01 / Display Port
00 04 00 00 04 03 00 00 00 01 02 01 22 05 05 02 / Display Port
04 00 00 00 14 02 00 00 00 01 03 00 00 00 06 06 / DVI-D
00 08 00 00 04 02 00 00 00 01 04 00 11 02 01 03 / HDMI
 
Constructed FB is made this way, mostly due to the fact that Apple monitors are using DP as the primary connection and then we have beneath in order all others.
 
In the vast majority of cases there, you will need to change only the last 4 digits, which are also the most important for proper connector injection, or eventually you will need to assign further a DVI-I (SL) connection for your monitor. In this case, it is basically a mandatory thing mostly because the original code does not have it. Therefore, we will need to change the second row from DP into DVI-SL.  The initial input of first four pairs of digits we will need to change from 00 04 00 00 to 00 02 00 00, which is the proper input for DVI-SL.
 
00 02 00 00
 
Then follows the explanation of the second set of digits:
 
0×0002 : LVDS               ControlFlag : 0×0040 and 0×0100
0×0004 : DVI                  ControlFlag : 0×0016, 0×0014, and 0×214
0×0010 : VGA                ControlFlag : 0×0010
0×0080 : S-Video           ControlFlag : 0×0002
0×0200 : DVI                  ControlFlag : 0×0014, 0×0214, and 0×0204
0×0400 : DisplayPort     ControlFlag : 0×0100, 0×0104, 0×0304, 0×0604, and 0×0400
0×0800 : HDMI               ControlFlag : 0×0200 
0×1000 : DVI                   ControlFlag : 0×0016
 
Translated in to:
 
Connector Type DP 04 03 00 00
Connector Type DP 04 03 00 00
Connector Type HDMI 00 02 00 00
Connector Type DVIDL 14 02 00 00
Connector Type_DVISL C 04 02 00 00
Connector Type_DVISL 04 02 00 00
 
From this example it is clear that in the modified row we should add further 04 02 00 00 according to the matched connector name. So after first 00 02 00 00 we will need to add the following 4 pair of digits 04 02 00 00 and all together it looks like this:
 
00 02 00 00 04 02 00 00
 
The following is the part that relates to the ATY,Features (hex digits):
 
The first pair of numbers:
 
0 × 0002: LVDS * 0x09 = 09
0 × 0004: DVI 0x00 = 00
0 × 0010: VGA 0x00 = 00
0 × 0080: S-Video 0x04 = 04
0 × 0200: DVI 0x00 = 00
0 × 0400: Display Port 0 × 00 = 00
0 × 0800: HDMI 0 × 00 = 00
0 × 1000: DVI 0x00 = 00
 
The second pair of numbers:
 
Use Internal * 0 × 01 = 01
Use RGB YUV On 0 × 04 = 04
Use Backlight * 0 × 08 = 08
Backlight Inverted 0 × 10 = 10
Use Clamshell 0 × 20 = 20
 
A third pair of numbers represents the order of connector activation
 
01 = first active connector
02 = second active connector
03 = third active connector
etc. ...
 
I suggest that you mark as first, connector raw that your monitor will use it as primary. 
 
The fourth two numbers are listed as Unknown:
 
You can leave the same like in the original code (usually stands 01 or 00) or simply replace it with zeros - 00. I will in this demonstration left the original values:
 
Finally, we add the following digits:
 
00 02 00 00 04 02 00 00 00 01 01 01
 
Last four digits simply rewrite from the above constructed table:
 
03 [DVI_I] 
redsock_bios_decoder :
enc obj 0x1e transmitter 0x10 dual link 0x0 enc 0x0
radeon_bios_decode:
Connector at index 2
Type [@offset 43542]: DVI-I (2)
Encoder [@offset 43546]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 43696]: 0x95, OSX senseid: 0x6
 
Code construction: 10 00 03 06
 
I will explain in short, what is what here, but that would not be important much anyway. The only one thing important it is the order of digits that we need to use and the patch will work. So here it is:
 
Transmitter - the first two digits
Encoder - the second two digits
Hotplug ID - third two digits
Sense ID - Fourth two digits
 
---------------------------------------------------------------------------------------------
 
So that was detail explanation, however, we can simplify this procedure by using next basic code schematics per connector:
 
LVDS / 02000000 40000000 08010000+ (add your code construction)
VGA / 10000000 10000000 00010000+ (add your code construction)
DP / 00040000 04030000 00010000 / + (add your code construction)
DVI-SL / 00020000 04020000 00010000 /  + (add your code construction)
DVI-DL / 04000000 14020000 00010000 /  + (add your code construction)
HDMI / 00080000 00020000 00010000+ (add your code construction)
 
As you can see, all you have to do is to add the last 8 digits which you need to construct by yourself (see example above)

 

Sierra is using additional digits in the code, so you'll need to add extra zero segments in front of your code construction and after it. Check example bellow:

 

00080000 00020000 00010000 00000000 + (add your code construction) 00000000

 
-----------------------------------------------------------------------------------------------
 
So this is it, and here we have final construction.
 
00 02 00 00 04 02 00 00 00 01 01 01 10 00 03 06
 
Except for the above modification, like I said, in most cases you will need to replace only the last four values:
 
Original code:
00 04 00 00 04 03 00 00 00 01 01 01 12 04 04 01 - DP
00 04 00 00 04 03 00 00 00 01 02 01 22 05 05 02 - DP
04 00 00 00 14 02 00 00 00 01 03 00 00 00 06 06 - DVI-DL
00 08 00 00 04 02 00 00 00 01 04 00 11 02 01 03 - HDMI
 
Modified code:
 

00 04 00 00 04 03 00 00 00 01 02 01 12 04 01 01 - DP
00 02 00 00 04 02 00 00 00 01 01 01 10 00 03 06 - DVI-I
04 00 00 00 14 02 00 00 00 01 03 00 11 02 05 05 - DVI-D
00 08 00 00 00 02 00 00 00 01 04 00 22 05 02 03 - HDMI
 
 
With this, the whole thing is completed and you are now ready for the final step.
 
---------------------------------------------------------------------------------------------------------
 
Clover Injection - Step 4 involves injection of the code and its activation.
 
This can be done in several ways: kext patching by some hex tool or making the Binary patch, however, none of these methods are sufficiently elegant, mostly because in this case we will need to patch driver every time when we make system upgrade.
 
Luckily we have a Clover, which is able to apply such modification "on the fly" which is ideal concept, or other words, this method represents a permanent solution that does not depend from the future system upgrades.
 
Open Clover Configurator, and go to the Kernel & Kext patches. Click on the plus sign in the KextsToPatch field :
 
Attached File  ecbe62e8c9_690x411.png   424.79KB   531 downloads
 
Then type the name of the kext you want to patch, in this case this is AMD7000Controller. In the next field, enter the original hex code extracted from the driver, and next to it write a new one that you have created. Eventually, you can add notes in the next field (par example: Connectors patch) and that was it. You are ready for testing.
 
Attached File  ad579c8b7f_690x459.png   422.17KB   360 downloads
 
If you are all done properly everything will work from the first attempt. If not you will need to work further on it. But if something goes wrong, you can always change the name of the FB or simply to uncheck the options that you have activated in the Graphics panel and thus everything will be back to its initial state.

Attached Files



#2
kvonlinee

kvonlinee

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 618 posts
I will try it later. Thank

#3
Ultimatebadass

Ultimatebadass

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts

Thank you for this! Is there a chance of solving the 290x multi-screeen issues by following this?



#4
Vlada.

Vlada.

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 113 posts
  • Gender:Male
  • Location:Serbia

Thank you for this! Is there a chance of solving the 290x multi-screeen issues by following this?

 

Yes. Per example I got a problem with second DVI connector on Radeon 6850 HD which I was been able to fix by using this method.



#5
Ultimatebadass

Ultimatebadass

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts

Yes. Per example I got a problem with second DVI connector on Radeon 6850 HD which I was been able to fix by using this method.

 

Well, I tried but unfortunately it seems this method is not enough for the 290x. I followed your tutorial and made a few patches for the Baladi personality (the only one in AMD8000Controller) but none of them seem to make any difference - boots fine with one screen, as soon as you plug another one in -> black screen.

 

It was worth a shot I guess :) Thanks for the effort, hopefully someone will figure this out one day.

 

I'm attaching my "notepad" from this, maybe it will be of use to someone: http://pastebin.com/zMJbg8xP



#6
jamiethemorris

jamiethemorris

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,038 posts
  • Gender:Male
  • Location:San Rafael, CA

There are several guides out there already for connector patching, but last time i had to patch a framebuffer I had to get the information from like 3 different places. Now it's all in one place. Thank you for such a comprehensive guide. 



#7
VirusX

VirusX

    InsanelyMac Sage

  • Donators
  • 465 posts
  • Gender:Male
  • Location:Germany

great summary - thank you!

This should be pinned @ Mods :)



#8
Awesome Donkey

Awesome Donkey

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 108 posts
  • Gender:Male
  • Location:United States

Well, I tried but unfortunately it seems this method is not enough for the 290x. I followed your tutorial and made a few patches for the Baladi personality (the only one in AMD8000Controller) but none of them seem to make any difference - boots fine with one screen, as soon as you plug another one in -> black screen.

 

It was worth a shot I guess :) Thanks for the effort, hopefully someone will figure this out one day.

 

I'm attaching my "notepad" from this, maybe it will be of use to someone: http://pastebin.com/zMJbg8xP

 

My 290X (ASUS 290X DirectCU II OC) results are the same as yours (came up with the exact same patch using this guide), however every time I try either DVI-D port it never works - just black screens on boot. DVI-D is the only output my monitor displays, so I'm stuck with it. What Clover settings do you use?



#9
Ultimatebadass

Ultimatebadass

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts

My 290X (ASUS 290X DirectCU II OC) results are the same as yours (came up with the exact same patch using this guide), however every time I try either DVI-D port it never works - just black screens on boot. DVI-D is the only output my monitor displays, so I'm stuck with it. What Clover settings do you use?

 

Just barebone defaults with imac14,2 preset and trimenabler patch, no graphic injections.



#10
Awesome Donkey

Awesome Donkey

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 108 posts
  • Gender:Male
  • Location:United States

Just barebone defaults with imac14,2 preset and trimenabler patch, no graphic injections.

Hmmm, odd. Can you post your Clover config.plist? Thanks!



#11
Ultimatebadass

Ultimatebadass

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts

Hmmm, odd. Can you post your Clover config.plist? Thanks!

 

Sure thing, this is without the patches: (be aware that serial numbers are replaced with 0s, easy enough to fix with cloverconfigurator if you want to use it)

 

http://pastebin.com/h2F0ezk7



#12
Awesome Donkey

Awesome Donkey

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 108 posts
  • Gender:Male
  • Location:United States

Thanks. Unfortunately, no matter what I do I can't get stable DVI-D output. Either the patch(es) cause black screens upon boot indicating the patch is a failure, or it boots normally with the glitchy DVI-D output causing me to put OS X to sleep then immediately wake it to workaround the DVI glitches.



#13
archfan

archfan

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
  • Gender:Male
  • Location:EU

Same here. It doesn't really work. :/



#14
ipurc

ipurc

    InsanelyMac Protégé

  • Members
  • PipPip
  • 57 posts
  • Gender:Male

i dont understan in step 3,, 
where you get this code ? --- = First I’ll put the list of all types of connectors:

 

Connector Type LVDS 0 × 00000002 = 02 00 00 00 Note: Laptop Monitor

Connector Type DVIDL 0 × 00000004 = 04 00 00 00 Note: Dual Link DVI

Connector Type VGA 0 × 00000010 = 10 00 00 00

Connector Type SV 0 × 00000080 = 08 00 00 00

Connector Type DP = 0 × 00000400 00 04 00 00

Connector Type HDMI 0 × 00000800 = 00 08 00 00

Connector Type DVISL 0 × 00000200 = 00 02 00 00 Note: Single Link DVI



#15
langweiler94

langweiler94

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

Well, it seems like I am the first one to be successful and  praise your outstanding post:  (I did this for cosmetic fix in System Profiler )

 

I got an Asus R9 280x (R9280X-DC2T-3GD5), with vBIOS version: 6798HB.15.39.0.0.AS04 (113-AD47800-100) , I extracted the BIOS with GPU-Z v0.8.0. 

 

Like you calculated, i got similar results: 

Typ 1: DP:  	21 03 01 04
Typ 2: HDMI:	11 02 02 03
Typ 3: DVI-I:	12 04 03 02
Typ 4: DVI-I:	00 10 04 02
Typ 5: DVI-D:	10 00 05 06

My Graphics Card was using Futomaki before (atleast 1 Screen worked, i have a DSDT injection for the Framebuffer), so I decided to use it as well.  (But this shouldn't bother us in any way, since we are going to modify it completely anyways, right?).  Since i have two DVI- Dual-Link Screens connected, I wanted to have two DVI Lines, so my final Code was:

00040000  04030000  00010401  21030104  <- DP    (init. as last) 
04000000  14020000  00010101  12040302  <- DVI-I (init. as first)
04000000  14020000  00010200  10000506  <- DVI-D (init. as second)
00080000  04020000  00010300  11020203  <- HDMI  (init. as third) 

I used the Clover Method with Patch AMD7000Controller, and it is working like a charm. 

 

:thumbsup_anim: Thank you, thank you, thank you  :thumbsup_anim:

  

 



#16
MOudz

MOudz

    InsanelyMac Protégé

  • Members
  • Pip
  • 5 posts

Thanks for the great info..

My graphics card is Mobility Radeon 4870 on an Alienware m17xR2 .. i got it working with 10.10 Exotic pack QE/CI works .. my only issue that i can't get the HDMI connector to work thats the contents of the info.plisit file in the AMDFramebuffer.kext in S/L/E :

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com...yList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14A378</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>AMDFramebuffer</string>
<key>CFBundleGetInfoString</key>
<string>AMDFramebuffer 1.28.29 14796</string>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDFramebuffer</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AMD Framebuffer</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.28.29</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.8</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>6A280m</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>14A359</string>
<key>DTSDKName</key>
<string>macosx10.10internal</string>
<key>DTXcode</key>
<string>0600</string>
<key>DTXcodeBuild</key>
<string>6A280m</string>
<key>IOKitPersonalities</key>
<dict>
<key>Framebuffer_Personality</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDFramebuffer</string>
<key>IOClass</key>
<string>AMDFramebuffer</string>
<key>IOMatchCategory</key>
<string>IOFramebuffer</string>
<key>IONameMatch</key>
<string>display</string>
<key>IOProbeScore</key>
<integer>65050</integer>
<key>IOProviderClass</key>
<string>AtiFbStub</string>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOACPIFamily</key>
<string>1.2</string>
<key>com.apple.iokit.IOGraphicsFamily</key>
<string>1.3</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.2</string>
<key>com.apple.kext.AMDSupport</key>
<string>1.2.8</string>
<key>com.apple.kpi.bsd</key>
<string>8.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0.0</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>8.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Safe Boot</string>
</dict>
</plist>
 
 
where should i add my FB Personalities to get the HDMI to work ... Thanks in advance :)


#17
peanutman314

peanutman314

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts

Thanks for the tutorial! I always wanted to know how you made your driver packs. I'm happy I can do it myself now if needed.

However, I have an Asus 270 (non-X) and have some questions about some things that were not entirely clear from your guide:

 

- I understand the device id for the 270X is already in AMD7000Controller but the one for the 270 is not. I guess I can add it manually, but I was wondering if there was an update-proof way? What if I use clover's fakeid feature to set it to the 270X id (the hardware is very similar, no?). Will this work or will things go wrong.

 

- Do I still need to enable the "Inject ATI" feature in Clover? What does it do anyway... 

 

- Do I still need something like ATYinjector.kext from your original pack? What was its purpose, is it the same as the Clover Inject ATI? I always assumed if your id was in the kext the driver would be loaded and if the framebuffer is correct it would work. But apparently you needed this for the 270X so I'm curious what it does.

 

I was hoping you could help me figure out these details so I can get my 270 working with your method.

Thanks again!



#18
Vlada.

Vlada.

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 113 posts
  • Gender:Male
  • Location:Serbia

i dont understan in step 3,, 
where you get this code ? --- = First I’ll put the list of all types of connectors:
 
Connector Type LVDS 0 × 00000002 = 02 00 00 00 Note: Laptop Monitor
Connector Type DVIDL 0 × 00000004 = 04 00 00 00 Note: Dual Link DVI
Connector Type VGA 0 × 00000010 = 10 00 00 00
Connector Type SV 0 × 00000080 = 08 00 00 00
Connector Type DP = 0 × 00000400 00 04 00 00
Connector Type HDMI 0 × 00000800 = 00 08 00 00
Connector Type DVISL 0 × 00000200 = 00 02 00 00 Note: Single Link DVI


Those lines represents definitions of all connectors inside the code. This is just example or explanation so that you know what is what! 
 

Thanks for the tutorial! I always wanted to know how you made your driver packs. I'm happy I can do it myself now if needed.
However, I have an Asus 270 (non-X) and have some questions about some things that were not entirely clear from your guide:
 
- I understand the device id for the 270X is already in AMD7000Controller but the one for the 270 is not. I guess I can add it manually, but I was wondering if there was an update-proof way? What if I use clover's fakeid feature to set it to the 270X id (the hardware is very similar, no?). Will this work or will things go wrong.
 
- Do I still need to enable the "Inject ATI" feature in Clover? What does it do anyway... 
 
- Do I still need something like ATYinjector.kext from your original pack? What was its purpose, is it the same as the Clover Inject ATI? I always assumed if your id was in the kext the driver would be loaded and if the framebuffer is correct it would work. But apparently you needed this for the 270X so I'm curious what it does.
 
I was hoping you could help me figure out these details so I can get my 270 working with your method.
Thanks again!

 
1. Clover should do the trick with fake serial number, but you'll need to patch kexts too (AMD7000Controller.kext and AMDRadeonX4000.kext). Check the Step - 4 in this tutorial.
 
2. Yes. This option injects proper FB + in your case fake serial number
 
3. No. You don't need ATYInjector.kext from the pack. Inject ATI option via Clover do the same thing, so you don't need it.



#19
maleorderbride

maleorderbride

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 537 posts
  • Gender:Male

Thanks for this topic!

 

I have a XFX DD 270X on 10.9.5. I was using the default radeon FB, but was unable to get 2560x1440 DVI DL display+ 1920x1080 DVI/HDMI display working with it.

 

Loading FB via DSDT and can confirm it is loading.

 

Why can I not get my Dual-Link DVI working at full resolution? See below. Thanks!

Is it possible to get my mini-DPs working? Any ideas?

 

 

 

I have edited Futomaki to the following:

 

00 04 00 00 04 03 00 00 00 01 03 01 12 04 01 01 :: Not working mini-DP (tested with single-link active mini-DP to DVI cable)

00 08 00 00 04 02 00 00 00 01 02 00 11 02 03 03 :: Fully working HDMI

04 00 00 00 14 02 00 00 00 01 01 01 10 00 04 06 :: Dual Link DVI-I (only working as single-link; if I plug in my dual-link DVI then screen stays black, but IOreg shows attached display here)

00 02 00 00 14 00 00 00 00 01 05 00 21 03 06 05 :: Fully Working Single Link DVI-D

 

 

Not using:

00 04 00 00 04 03 00 00 00 01 04 01 22 05 02 02 :: Another DP (did not work when tried it earlier)

04 00 00 00 14 02 00 00 00 01 01 01 00 10 05 06 :: Dual Link DVI-I Internal KLDSCP_DAC1

 

 

EDIT:

Switched Futomaki to:

04 00 00 00 14 02 00 00 00 01 01 01 00 10 05 06 :: Dual Link DVI-I Internal KLDSCP_DAC1

00 08 00 00 04 02 00 00 00 01 02 00 11 02 03 03 :: HDMI no longer hotplugs, but will work as second monitor with the Dual-Link DVI plugged in!

04 00 00 00 14 02 00 00 00 01 01 01 10 00 04 06 :: Dual Link DVI-I (Now works as Dual-Link DVI-I if replugged after loading OS X) 

00 02 00 00 14 00 00 00 00 01 05 00 21 03 06 05 :: Single Link DVI-D no longer hotplugs, does not work at all with Dual-Link DVI plugged in and prevents Dual-Link DVI from showing anything.

 

 

 

 

radeon BIOS

PCI ID: 1002:6810
Connector at index 0
Type [@offset 43056]: DisplayPort (10)
Encoder [@offset 43060]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 43184]: 0x90, OSX senseid: 0x1
Connector at index 1
Type [@offset 43066]: DisplayPort (10)
Encoder [@offset 43070]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 43211]: 0x91, OSX senseid: 0x2
Connector at index 2
Type [@offset 43076]: HDMI-A (11)
Encoder [@offset 43080]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 43238]: 0x92, OSX senseid: 0x3
Connector at index 3
Type [@offset 43086]: DVI-I (2)
Encoder [@offset 43090]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 43275]: 0x95, OSX senseid: 0x6
Connector at index 4
Type [@offset 43096]: DVI-I (2)
Encoder [@offset 43100]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 43275]: 0x95, OSX senseid: 0x6
Connector at index 5
Type [@offset 43106]: DVI-D (3)
Encoder [@offset 43110]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 43302]: 0x94, OSX senseid: 0x5
bash-3.2# ./redsock_bios_decoder < /Users/MacPro/Dropbox/XFX\ 270X\ Editing/XFX270X.rom 
270CDF22.W8 :

Redsock

Connector Object Id [19] which is [DISPLAY_PORT]
encoder obj id [0x21] which is [INTERNAL_UNIPHY2 (osx txmit 0x12 [duallink 0x2] enc 0x4)] linkb: false
Connector Object Id [19] which is [DISPLAY_PORT]
encoder obj id [0x21] which is [INTERNAL_UNIPHY2 (osx txmit 0x22 [duallink 0x2] enc 0x5)] linkb: true
Connector Object Id [12] which is [HDMI_TYPE_A]
encoder obj id [0x20] which is [INTERNAL_UNIPHY1 (osx txmit 0x11 [duallink 0x1] enc 0x2)] linkb: false
Connector Object Id [2] which is [DVI_I]
encoder obj id [0x1e] which is [INTERNAL_UNIPHY (osx txmit 0x10 [duallink 0x0] enc 0x0)] linkb: false
Connector Object Id [2] which is [DVI_I]
encoder obj id [0x15] which is [INTERNAL_KLDSCP_DAC1 (osx txmit 0x00 enc 0x10?)] linkb: false
Connector Object Id [3] which is [DVI_D]
encoder obj id [0x20] which is [INTERNAL_UNIPHY1 (osx txmit 0x21 [duallink 0x1] enc 0x3)] linkb: true


#20
maleorderbride

maleorderbride

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 537 posts
  • Gender:Male

Well, that was bittersweet.

 

I went back to a vanilla AMD7000Controller.kext out of curiosity and the DVI Dual Link + HDMI (or SL DVI) works OOB. Turns out my version of 223x chameleon was too old to make the default radeonFB work properly (I guess) =/

 

Installed 2510 and the defaultFB just works.







Also tagged with one or more of these keywords: AMD, Radeon, Frame Buffer


2 user(s) are reading this topic

1 members, 1 guests, 0 anonymous users


© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy