Posted 15 March 2009 - 02:10 PM

If what you mean is a natit like thing with only the function of injecting required entries (already present in plist file) into IORegistry, it should be easy that anyone can write one.

But it won't be so easy if these entries need to be determined by checking the card at boot time as I'm not very familiar with the meanings of those entries yet. If anyone has a clue of this, we may give it a try.

Posted 17 March 2009 - 06:20 AM

netkas

InsanelyMac Legend

Developers

616 posts

Gender:Male

Dong, no, injecting works with natit just fine, vga bios does some initialization of card (using atombios prolly) , so the card can be used by osx drivers, if no initializayion was done - osx drivers will not detect any output on card. so, atm, we cant use dual card solutions using ati.
(dual card - for 4 monitors)

Posted 17 March 2009 - 09:50 PM

dong

InsanelyMac Sage

Retired Developers

366 posts

Gender:Male

Dong, no, injecting works with natit just fine, vga bios does some initialization of card (using atombios prolly) , so the card can be used by osx drivers, if no initializayion was done - osx drivers will not detect any output on card. so, atm, we cant use dual card solutions using ati. (dual card - for 4 monitors)

Ok, I now got what you mean.

After reading some posts on the web, I got the information like that there is no such initialization problem for dual NVidia cards, but ATI cards just won't POST if plugged in as secondary card.

It looks to me that the issue here is how to get the secondary ATI card POSTed. I rechecked codes in radeonHD linux driver, they are using int10 in a simulated real mode to boot the BIOS on the secondary card, which is not so easy to port to OSX in my opinion.

And I'm a little confused here about whether just running the card BIOS got it POSTed or you have to additionaly running ATOM init functions to get job done?

Without int10, there is also another problem of accessing the video BIOS as it's not located at 0xC0000 (already used by primary card) and you got no idea where it will be (maybe not in system memory at all). Without access to the BIOS image, there is no way to call ATOM init functions.

Edit: well, I checked ATY_Megalodon and found it did provide a way to read BIOS by interacting with IO registers of the card (0x1600 - 0x1620, 0x1798 - 0x17A0 for setting card to enter/exit BIOS reading state, and 0xA8, 0xAC for actually reading, 4 bytes each time). I will test it to see if this is general for any ATI cards.

Update: I tried these registers on my mobility x1400, but not working. But I saw similar code in radeonHD (RHDReadPCIBios), it does confirm that it depends on the type of card. Some time will be needed to test with it.

Posted 20 March 2009 - 12:05 AM

And I'm a little confused here about whether just running the card BIOS got it POSTed or you have to additionaly running ATOM init functions to get job done?

Without int10, there is also another problem of accessing the video BIOS as it's not located at 0xC0000 (already used by primary card) and you got no idea where it will be (maybe not in system memory at all). Without access to the BIOS image, there is no way to call ATOM init functions.

Maybe you can get all that info by calling IOACPIPlatformDevice methods:

Posted 21 March 2009 - 05:36 PM

Netkas, I put rhdAtomInit related stuff together. It's compiled ok but not tested yet. If it does not do its job or causes KP for some reason, don't blame me.

In the probe function, I assume BIOS can be read from IOPCIDevice's "ATY,bin_image". You have to make sure Natit load before this and set that to IOPCIDevice.Now if BIOS can not be read from "ATY,bin_image", the BIOS at legacy address will be used instead. Adding this is because I don't have a "ATY,bin_image" to debug the code.

Posted 22 March 2009 - 03:18 PM

Posted 22 March 2009 - 04:36 PM

dong

InsanelyMac Sage

Retired Developers

366 posts

Gender:Male

panics in atomSaveRegisters function

Don't know exactly what caused it, possibly the memory allocation/deallocation stuff. And I do not see how useful can this function be, it seems only backup the registers each time when there is a writing but I do not find out where they are used to restore the values. So a simple suggestion to avoid this panic is to comment out all occasions of atomSaveRegisters in the code.

Posted 25 March 2009 - 03:40 AM

LeoMark

InsanelyMac Protégé

Members

10 posts

Hi, netkas and dong, congratulations for the project! I am a user ati mobility hd2400, I have followed the work of you and I'm anxious for news, some hope for the LVDS connector? sorry for english, I'm Brazilian