Jump to content

Editing custom personalities for ATI Radeon HD[45]xx


bcc9
 Share

775 posts in this topic

Recommended Posts

Hey bcc9, hat's off to ya for all your early and continued effort on all this.

 

Its been many moons since I did anything with my quick hackjob for redsock_bios_decoder, from memory, the only reason I did it was to cross-reference the actual output flags that were scattered from different sources with part of your effort as I had been scratching down lots of hand-written notes when I was playing around with it all.

 

Let me know if y'all want me to dust off my notes as well.

 

Cheers

Thanks. You could make diffs to apply to radeon_bios_decode that I could merge in and or merge in radeon_bios_decode to what you have if you want. I'm happy to let anyone else take over on this; I'm not claiming any copyright over this (it's all cribbed from open source). If the xf86 & linux source got synced/cleaned up maybe the code could be re-based off of a newer version of that code as well.
Link to comment
Share on other sites

  • 2 weeks later...

@bcc9:

 

Thanks for the post, and truning me back on to try and fix my HDMI audio...

 

I am not a techie or anything, but am an avid reader and obssessive perfectionist, so I want my HDMI audio. I dont understand a few things on your post, but for now my problem is somewhat strange. Running the radeondump I get "ATOMBios signature not found" or something similar. My XFX HD 6670 (2GB) works OOB (3 port DVI, DP, HDMI) to the extent that resolutions work, dashboard ripples, I can select 720p and underscan, and it is fully installed in my Windows 7 side (dont know what that helps for). HDMI video is great, and movies run. BUT DVD Player crashes. Cinebench gives 25 fps (??).

 

1. Why is the dumper not able to find an ATOMBios signature. Like I said I did not have to use any boot flags, etc. and the card just came up on the video side fine. I have not checked any other ports.

 

2 Also, my IoregExplorer lists HDMI as 0 - it loads the default generic framebuffer.

 

I dont know if this makes any sense but I am a little suspicious about the ATOMBios not found. Does that simply mean that no proper framebuffer is loaded and my card is treated as "generic"

 

3. Kabyl's boot does not work for me since it just reboots after loading. It looks like kabyl's boot is only 10.6.8 ????

 

Thanks for any comments. I am at work so I do not have any pics to upload !??!!

Link to comment
Share on other sites

Hi bcc9,

Thank you for the sources. You are right, Clover's patch is far from perfect and I have an idea to improve it. To do this I need a sources to work with ATOMBios.

Did you have an objection on including part of your sources in Clover?

 

I just have to do

1. Choose a framebuffer. Already done.

2. Find a connection table in the kext. Just rewrite procedures from Perl into C.

3. Choose an order of connectors. May be let user to write it into config,plist

4. Took senseid from ATOMBIOS as radeon-bios-decode does.

5. Write this info into the kext. Already done.

That's all!

Not sure other values are significant.

Link to comment
Share on other sites

Did you have an objection on including part of your sources in Clover?

That would be fine, it's all based off of open source in the first place. However I still think a general purpose auto-patch script would be nice rather than a solution that is tied to just 1 bootloader (most of us users still use chameleon after all).

 

Another problem is that my perl script parses the assembly code output from otool on the fly, so you would have to do something different with clover for determining the connector tables. Such as statically pre-determining what the tables look like, and building that into clover.

Link to comment
Share on other sites

1. Why is the dumper not able to find an ATOMBios signature.

radeon_bios_decode does find the signature in all my test cases. If it is not for you, I suspect you are not correctly inputing a valid dump to the program.

Link to comment
Share on other sites

That would be fine, it's all based off of open source in the first place. However I still think a general purpose auto-patch script would be nice rather than a solution that is tied to just 1 bootloader (most of us users still use chameleon after all).

 

Another problem is that my perl script parses the assembly code output from otool on the fly, so you would have to do something different with clover for determining the connector tables. Such as statically pre-determining what the tables look like, and building that into clover.

Yes, perl script is a problem to repeat so why I still didn't do this.

About Chameleon. I know it is still popular.

But see (around the discussion)

http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/trunk/i386/libsaio/ati.c

line:1177 is wrong.

And this is not a last mistake of ATI injection by Chameleon.

Link to comment
Share on other sites

Yes, perl script is a problem to repeat so why I still didn't do this.

About Chameleon. I know it is still popular.

But see (around the discussion)

http://forge.voodoop...6/libsaio/ati.c

line:1177 is wrong.

And this is not a last mistake of ATI injection by Chameleon.

If you're aware of some important outstanding bug with chameleon, I'm sure you could get it fixed if you brought it to their attention. I've had good luck getting attention for fixes when I've had something important to address (like the MSR flex ratio bug).

 

In any case, I'm not sure what your argument is. Chameleon is a somewhat complex project, and yes the code is often not well commented and the code contains many conflicting coding styles.... Like any evolving sw project, there are outstanding bugs. efi-based bootloaders contain a lot more lines of code and so the number of outstanding bugs we can expect are even greater...

 

As for the problem at hand:

I'm still thinking it's best done via a general purpose auto-patch script. At least until we figure out what config options and mods work for most users. Care to help?

Link to comment
Share on other sites

Hey guys!

 

I've created this excel paper to help the creation of personalitys :)

Tell me if it helped you

This is empty?

Screen shot 2012-09-17 at 17.05.36.png

How did you propose to use it?

 

 

@bcc9

In your case, Chameleon+script you get patched kext (and cache next time) until System Update. Then you have to do the patch again, and create kernelcache again.

In my case I wrote the patched connectors in config.plist and it works independent on updates.

Nonetheless we have the common purpose to find a better way to patch connectors.

My experience

GA AMD Radeon HD6670 (10.8.1)

Pithecia

	04 00 00 00 1402 00 00 00 01 00 00 00 00 04 06
	00 04 00 00 0403 00 00 00 01 00 00 21 03 02 03
	10 00 00 00 1000 00 00 00 01 00 00 00 00 00 01

Ipomoea

 04 00 00 00  04 03 00 00  00 01  00 00  10  00  01  06
 10 00 00 00  10 00 00 00  00 01  00 00  00  00  00  01
 00 08 00 00  04 02 00 00  00 01  00 00  12  04  04  03

See! They are different but both are working.

Transmitters - no matter.

Flags - no matter.

Encoders - it is better to set zero.

Exchange 2 and 3 - no matter. In both cases I can boot with VGA connected display. As well as I can boot with my main DVI monitor.

 

VTX vendor AMD Radeon HD5570

Baboon (10.7.2)

04 00 00 00 14 00 00 00 00 01 00 00 01 00 01 04

00 08 00 00 00 02 00 00 00 71 00 00 22 00 02 05

10 00 00 00 10 00 00 00 00 01 00 00 00 00 00 02

so here I just decided to set senseid only and zero encoders. Other digits are native.

It works! Main display is VGA connected monitor.

 

PS. I also want to say that in both cases I can enter desktop without GraphicsInjector (native framebuffer) but DVDPlayer crashing.

Without the Connectors Patch I can't enter desktop with any monitor.

6670 - black screen (system works)

5570 - empty desktop with galaxy. All info out of the desktop.

And with this Connector Patch I have full success.

Link to comment
Share on other sites

  • 2 weeks later...

Hi bcc9,

 

My ATI 4570 (mobility) works in Lion but the whole system hang when running Chess (opengl problem??). I want to try Mountain Lion but do you think the Lion problem will be inherited in ML too? I'm still figuring out whether buying ML will be worth it. I don't have other computer I want to hackintosh. I have X79 desktop computer but CPU is not supported, so I don't want to use ML on that. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Hello, i would need more help... i got a Gateway NV5909h laptop with a radeon mobility 5650, and i can't boot my Mountain Lion 10.8 using GraphicsEnabler=Yes. All i get is a black screen.

 

I tried editing the manual override with the following.

 

DisplayVendorID-756e6b6e/DisplayProductID-717

 

Here is my Display file as follow :

 

 

<?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>DisplayProductID</key>

<integer>1815</integer>

<key>DisplayProductName</key>

<string>Color LCD</string>

<key>DisplayVendorID</key>

<integer>1970170734</integer>

<key>IODisplayEDID</key>

<data>

AP///////wBMo0FBAAAAAAATAQOAIhN4Co2lnVtVnCYZUFQAAAABAQEBAQEBAQEBAQEB

AQEBQRxWoFAAFjAwICUAWMEQAAAZAAAADwAAAAAAAAAAAB60AnQAAAAA/gBTQU1TVU5H

CiAgICAgAAAA/gAxNTZBVDAyLUEwNAogAO8=

</data>

</dict>

</plist>

 

everything seems OK, i get a black screen at boot using GraphicsEnabler=Yes, if i plug an HDMI connector, i get the screen and my radeon card is detected..... i think i can't get my LVDS to work

 

I dumped the VBIOS.DMP using AIA64. I am stuck right now... is there any way somebody can edit my Ati5000Controller.Kext

 

Here is my EDID, my VBIOS attached. Thanks !

ioregSaved.txt

vgabios.zip

good EID.txt

Link to comment
Share on other sites

hello

 

maybe somebody can help me to accomplish my targets.

my english is verry bad, and the instructionguide is to diffecult to understand for me cause it`s all in english !!

maybe sombody of you is speaking german !! it would be much easier for me !!

 

my problem is: i don`t get any picture on my internal lcd of my notebook. i always get a blackscreen with graphicsenabler=yes

 

at vga everthing ist allright !

 

 

 

the following steps i have allready done:

 

-device id´s added in kext

-LCD force edid in the DisplayProductID-717 enscribed

 

 

 

every framebuffer in the org.chameleon.Boot.plist tried with and without GraphicsEnabler

 

i still need help !! and i think i`m at the right place to get support !! sooo please help me !!!!

Kasi99 ATIROM EverestDump.zip

Kasi99 DSDT Stock.zip

post-1056614-0-10665300-1350240445_thumb.png

post-1056614-0-04229300-1350240469_thumb.png

Registry Dump.zip

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I have patched my graphics succesfully with shrike personality and it using open GL settings of ATI 4670.

post-775552-0-37754700-1351111191_thumb.jpg

 

My question is - Is the graphics card 4670 supports HDMI?, if so what is the HDMI ID. (as 5xxx series has 1002_aa50) of ATI 4670/46xx series?

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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 {censored} 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: ?!

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 Share

×
×
  • Create New...