Jump to content

fluid | fixed

Editing custom personalities for ATI Radeon HD[45]xxx


  • Please log in to reply
652 replies to this topic

#641
k3nny

k3nny

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 333 posts
  • Gender:Male
Hi,

I want to share my results for the XFX Radeon HD 7870 DD (Device Id: 1002 6818, Subsystem Id: 1682 3250):

Connectors: 2x DVI, 2x MiniDP, 1x HDMI

(1) DVI 1:
04000000-14020000-0001-0100-10-00-01-06
(2) DVI 2:
04000000-14020000-0001-0200-21-03-02-05
(3) HDMI:
00080000-04020000-0001-0300-11-02-03-03
(4) MiniDP 1:
00040000-04030000-0001-0400-12-04-04-01
(5) MiniDP 2:
00040000-04030000-0001-0500-22-05-05-02

Find in ATI7000Controller (FB "Chutoro", 5 ports):
0200000000010000090101001204030300040000040300000001020011020101000400000001000000090300210302020004000000010000000904002205040400040000040300000001050010000505

Replace with:
0400000014020000000101001000010604000000140200000001020021030205000800000402000000010300110203030004000004030000000104001204040100040000040300000001050022050502



#642
myradon

myradon

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts
  • Gender:Male
I've got a question concerning patching my Sapphire ATI 5770 with Vervet personality? 2nd screen has loads of artifacts after (re)booting. When I reconnect or fiddle with screen-resolutions artfiacts are gone. After reboot bam crap again. I followed Alexander's [Guide] Getting XFX HD6850 connectors to work to the letter, i mean I believe I did but doesn't help for 2nd screen artifacts. I did  connector-patching in Clover bootloader confg.plist.

Ati-personality.pl dump
Personality: Vervet
ConnectorInfo count in decimal: 4
Disk offset in decimal 166224
0000000 00 04 00 00 00 04 00 00 00 71 00 00 12 04 04 02
0000010 04 00 00 00 14 00 00 00 00 71 00 00 01 12 01 04
0000020 00 02 00 00 14 00 00 00 00 71 00 00 00 00 06 03
0000030 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 01


Output radeon_bios_decoder
mercury:~ raymond$ sudo /Users/raymond/Desktop/radeon_bios_decode < /Volumes/efi/EFI/misc/c0000.bin
ATOM BIOS Rom:
SubsystemVendorID: 0x174b SubsystemID: 0x1482
IOBaseAddress: 0xe000
Filename: 148X0300.S26
BIOS Bootup Message:
JUNIPER BIOS UCODEv:126													
PCI ID: 1002:68b8
Connector at index 0
Type [@offset 44576]: DisplayPort (10)
Encoder [@offset 44580]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 44704]: 0x91, OSX senseid: 0x2 <-- 02
Connector at index 1
Type [@offset 44586]: HDMI-A (11)
Encoder [@offset 44590]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 44731]: 0x90, OSX senseid: 0x1 <-- 01
Connector at index 2
Type [@offset 44596]: DVI-I (2)
Encoder [@offset 44600]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 44768]: 0x93, OSX senseid: 0x4 <-- 04
Connector at index 3
Type [@offset 44606]: DVI-I (2)
Encoder [@offset 44610]: INTERNAL_KLDSCP_DAC2 (0x16)
i2cid [@offset 44768]: 0x93, OSX senseid: 0x4 <-- 04
Connector at index 4
Type [@offset 44616]: DVI-I (2)
Encoder [@offset 44620]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 44805]: 0x92, OSX senseid: 0x3 <-- 03
Connector at index 5
Type [@offset 44626]: DVI-I (2)
Encoder [@offset 44630]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 44805]: 0x92, OSX senseid: 0x3 <-- 03


Output redsock_bios_decoder
mercury:~ raymond$ sudo /Users/raymond/Desktop/redsock_bios_decoder < /Volumes/efi/EFI/misc/c0000.bin
148X0300.S26:
JUNIPER BIOS UCODEv:126													
Subsystem Vendor ID: 174b
	 Subsystem ID: 1482
Object Header Structure Size: 413
Connector Object Table Offset: 52
Router Object Table Offset: 0
Encoder Object Table Offset: 12c
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 [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 [0x16] which is [INTERNAL_KLDSCP_DAC2] 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


So I came up with this modified personality;

0000000 00 04 00 00 00 04 00 00 00 71 00 00 12 04 04 02
0000010 04 00 00 00 14 00 00 00 00 71 00 00 11 02 01 04
0000020 04 00 00 00 14 00 00 00 00 71 00 00 10 00 06 03
0000030 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 01


Injection with Clover
	 <key>ATIConnectorsController</key>
<string>5000</string>
<key>ATIConnectorsData</key>
<string>000000000040000000400000071000012040402000001004000000140000000071000001120104000002000020000140000000071000000000603000003000080000000200000071000022050501</string>
<key>ATIConnectorsPatch</key>
<string>000000000040000000400000071000012040402000003000080000000200000071000022050501000002004000000140000000071000010000603000001004000000140000000071000011020104</string>


Okay I know both DVI's are duallink cause my 27" 2560x1440px works on both ports, when only connecting 1 screen. I didn't alter HDMI and DP connector-IDs, only DVI's where not okay. I tried PCIRootUID=0/1, GraphicsInjector=Yes/No, FBName=Vervet is in. I also tried boot-args=WithKexts to be sure kext will be patched. I'm out of ideas Anyone got some real intelligent remark :superman: ?!

#643
mclaughlin

mclaughlin

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
Edit: Moved post as a new thread to Graphics Cards->Ati : http://www.insanelym...nalitypl-issue/

#644
elmad

elmad

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts

View Postbcc9, on 28 February 2011 - 04:38 AM, said:

Hope this helps others with non-working ports or with HDMI audio problems.
Questions/comments?

Hi,
this is my first message and I have an uncommon question. In first instance, thank you for your info & job.

I had a problem with my laptop and I think that the problem is that video bios was corrupted. Surfing the web for infos I came in this forum where I found precious informations. Now I'd like to use your tool "radeon_bios_decode" on the dump of my corrupted bios to analyze it, but I haven't an OsX installation to execute it.

Could you release open source code or something else that I can run on linux? Or could you suggest me a way to run your code on linux?


Best regards

#645
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,155 posts
  • Gender:Male
I did already post the source in this very thread, here: http://www.insanelym...ost__p__1843525
(Zero feedback from anyone on that BTW).  The code builds fine under linux last I touched it.

From linux, you can just run your X server with debug logging and see much of the same details.

I do think my model of parsing the bios details from a file is preferable for analysis to parsing the bios at run time from a driver (or bootloader).

#646
elmad

elmad

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts

View Postbcc9, on 03 May 2013 - 08:26 AM, said:

I did already post the source in this very thread, here: http://www.insanelym...ost__p__1843525
(Zero feedback from anyone on that BTW).  The code builds fine under linux last I touched it.

From linux, you can just run your X server with debug logging and see much of the same details.

I do think my model of parsing the bios details from a file is preferable for analysis to parsing the bios at run time from a driver (or bootloader).

Thank you very much, the code built fine.

As I supposed, my problem seems a bios corruption. LVDS connector is missing. Here is the output of radeon-bios-decode:

ATOM BIOS Rom:
	SubsystemVendorID: 0x1028 SubsystemID: 0x02be
	IOBaseAddress: 0x2000
	Filename: BR32787.001
	BIOS Bootup Message:
BR32787-001 M92 GDDR3 64bit 500e/800m									   

PCI ID: 1002:9553
Connector at index 0
	Type [@offset 45712]: VGA (1)
	Encoder [@offset 45716]: INTERNAL_KLDSCP_DAC1 (0x15)
	i2cid [@offset 45774]: 0x95, OSX senseid: 0x6
Connector at index 1
	Type [@offset 45722]: HDMI-A (11)
	Encoder [@offset 45726]: INTERNAL_UNIPHY (0x1e)
	i2cid [@offset 45797]: 0x91, OSX senseid: 0x2




I dont know why, but it's happened when I used on linux "radeontool light off". Now, if I can ask, what way could you suggest me:

1. Copy the bios from a working laptop (equal model, a friend brought one in the same time).
2. Rebuild in some way the LVDS connector info on my bios.

#647
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,155 posts
  • Gender:Male

View Postelmad, on 03 May 2013 - 08:47 AM, said:

I dont know why, but it's happened when I used on linux "radeontool light off". Now, if I can ask, what way could you suggest me:

1. Copy the bios from a working laptop (equal model, a friend brought one in the same time).
2. Rebuild in some way the LVDS connector info on my bios.
If it was me, I'd first get to the bottom of exactly how radeontool corrupted the video bios, to be sure it's really corrupted.  Maybe it's something more basic like the discrete video got turned off in your bios config?  Looks to me like radeontool just does some DMA to the device which shouldn't result in the bios magically being reflashed.  Normally you have to write a magic pattern to memory to initiate a flash, it wouldn't just happen by accident.  You did of course power cycle the system fully?
Next, your laptop vendor may have a bios/firmware update you could use that would update the video bios.
Failing that, I think, yes, you could copy the bios from a system running the exact same bios revision as what you have.  I'd verify matching version numbers with radeon_bios_decode of the other system's bios before trying to flash it yourself.

#648
elmad

elmad

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts

View Postbcc9, on 03 May 2013 - 05:06 PM, said:

If it was me, I'd first get to the bottom of exactly how radeontool corrupted the video bios, to be sure it's really corrupted.  Maybe it's something more basic like the discrete video got turned off in your bios config?  Looks to me like radeontool just does some DMA to the device which shouldn't result in the bios magically being reflashed.  Normally you have to write a magic pattern to memory to initiate a flash, it wouldn't just happen by accident.  You did of course power cycle the system fully?
Next, your laptop vendor may have a bios/firmware update you could use that would update the video bios.
Failing that, I think, yes, you could copy the bios from a system running the exact same bios revision as what you have.  I'd verify matching version numbers with radeon_bios_decode of the other system's bios before trying to flash it yourself.

I'm not 100% sure about how it's happened, but here is the output from my friend bios:

ATOM BIOS Rom:
SubsystemVendorID: 0x1028 SubsystemID: 0x02be
IOBaseAddress: 0x2000
Filename: BR32787.001
BIOS Bootup Message:
BR32787-001 M92 GDDR3 64bit 500e/800m									
PCI ID: 1002:9553
Connector at index 0
Type [@offset 45712]: VGA (1)
Encoder [@offset 45716]: INTERNAL_KLDSCP_DAC1 (0x15)
i2cid [@offset 45774]: 0x95, OSX senseid: 0x6
Connector at index 1
Type [@offset 45722]: HDMI-A (11)
Encoder [@offset 45726]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 45797]: 0x91, OSX senseid: 0x2
Connector at index 2
Type [@offset 45732]: LVDS (7)
Encoder [@offset 45736]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 45824]: 0x90, OSX senseid: 0x1


As you can see here there is info on LVDS connector that instead on my bios is missing. Now only VGA and HDMI connectors work in my laptop.

I tried to flash this bios, but every tool that I tried failed. Atiflash from dos, atiwinflash from windows7, I tried with linux but rom sysfs file is read-only. Maybe I can try to write some register with radeontool but I dont know what register.

And Dell didnt release any bios update tool for graphic card. I am on a blind spot now.

#649
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,155 posts
  • Gender:Male

View Postelmad, on 03 May 2013 - 06:50 PM, said:

I'm not 100% sure about how it's happened, but here is the output from my friend bios:
I'd still try to get to the bottom of that before proceeding if it was me.  Last I tried, atiflash worked for me, but I don't use mobile ati hardware.
I would check netkas's forum for info on what's current with ati flashing tools, as those guys seem to flash their cards regularly (I don't).
Those bioses look like an exact match, maybe you should do a binary comparison to see if you can figure out whether just a couple bytes got clobbered in yours or what.


#650
elmad

elmad

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts

View Postbcc9, on 03 May 2013 - 09:44 PM, said:

I'd still try to get to the bottom of that before proceeding if it was me.  Last I tried, atiflash worked for me, but I don't use mobile ati hardware.[/size]
I would check netkas's forum for info on what's current with ati flashing tools, as those guys seem to flash their cards regularly (I don't).
Those bioses look like an exact match, maybe you should do a binary comparison to see if you can figure out whether just a couple bytes got clobbered in yours or what.


Thank you for your time.

Finally I fixed it. The video bios wasn't corrupted. I learnt that in my laptop video bios was flashed inside the system bios.

But something was corrupted and this was... the EEPROM of LCD panel! I don't know how radeontool corrupted the eeprom, but I think that was it to corrupt the EDID informations. Video bios seemed corrupted because in some way, at the boot, the notebook disabled at runtime LVDS output in the video bios, because of the corrupted EDID. I fixed the EDID byte by byte comparing to the standard EDID and to EDID from my friend's LCD panel. To access it I had to boot my laptop with the working LCD panel and when the system was on I swapped LCD panel with my panel. In this way LCD was on and working, and I analyzed its EEPROM and fixed by i2c-bus.

Hard work, but now I know something more :)

Thank you for your replies.

#651
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,155 posts
  • Gender:Male
Interesting.  Since your EDID is something that is checked at run-time, then you were looking at a shadow copy of your bios in ram, and you never had a dump of your actual bios.  Glad you got the underlying problem figured out.

#652
Slice

Slice

    InsanelyMac Deity

  • Local Moderators
  • 1,828 posts
  • Gender:Male
  • Location:Moscow

View Postbcc9, on 03 May 2013 - 08:26 AM, said:

I did already post the source in this very thread, here: http://www.insanelym...ost__p__1843525
(Zero feedback from anyone on that BTW).  The code builds fine under linux last I touched it.
No feedback because I have nothing to report. The idea to add something into bootloader remains idea only.

#653
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,155 posts
  • Gender:Male

View PostSlice, on 21 May 2013 - 10:41 AM, said:

No feedback because I have nothing to report. The idea to add something into bootloader remains idea only.
For this kind of involved patching to OSX, I believe it's best to keep the smarts out of the bootloader.  But I know some have the motivation to keep /S/L/E unmodified and wish the bootloader to do all the actual patching on the fly at every boot.  For that scenario, perhaps we can standardize on an xml patch file syntax (that is not boot loader specific) that can provide this.  Something general purpose that could be used for any hackintosh kext changes.  Maybe bsdiff encapsulated in xml for binary patches, and a lighter weight match/replace for text diffs.  I know clover has some of my patches built-in but the syntax is clover-specific.  If there was a standard general purpose patch syntax we could agree upon then scripts like the one here could just generate the patch config for the bootloader.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2013 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy