Jump to content

GMA X4500


aldo77
 Share

1,615 posts in this topic

Recommended Posts

Negativity, negativity, negativity. Why must people be so closed minded? In case you haven't noticed, Apple is not the only entity on the planet that makes device drivers!

 

I think most mac people are just plain spoiled. You get all the drivers handed to you on a silver platter! So if some certain driver for some certain device does not exist yet, some people just immediately jump and say "Its never going to happen, not in a million years"

 

Never say never!

 

A team of developers? Who says it requires a team? All it takes is 1 person.

 

Its pretty difficult to believe that not 1 person in the entire world, is interested in making this driver for mac.

 

If you believed that not a single person is interested, you were wrong!

 

I am that person, and I am going to attempt to develop this driver, for the GMA 4500M!

 

device id: 0x2a24

vendor id: 0x8086 (Intel of course)

 

 

However there's one thing that will help out a lot in speeding this up. I need your help, but you don't have to know how to code to help me out.

 

Can anyone on find me a source code for a video device driver for mac? If someone could find that for me, when and if I'm successful I will post it up here on this forum free for anyone to download! I know its a hard thing to find, since mac people that have real macs never have to make them, unless they work for Apple. But it would be more appreciated then your euro's or whatever currency you use. As it would help in the process...

 

I always stay positive no matter what happens. I dislike when people are negative! As a wiseman once said, positivelyness is next to Godliness! :P

 

I want to thank you though Hurt, for being so negative (although I hate it). It makes me more positive!! Maybe without your comment I would've never attempted this...

 

There will soon be a day when all of us GMA 4500m owners can rejoice in the ^_^ clouds :) , champagne will fall from the heavens, children will be dancing in the street, and you WILL have hardware accelerated graphics for your "Mac"

 

:)

 

http://developer.apple.com/documentation/P...ntro/intro.html

 

Bravo! This is the best damn thing I read the whole day! All the best and will try to help you in any way I can! :)

Link to comment
Share on other sites

Just stopped by to see how things are going on... It is good to know that someone is willing to write a driver. All the best.

 

But my 2 cents :

If screen resolution is your high priority , I will suggest you to go behind grub2 patch method. We have discussed about it extensively here. Just give an attempt and if you face any issues, go thru my steps :

http://www.insanelymac.com/forum/index.php...t&p=1137602.

It is more easier and quicker than writing a driver. But if your interest is running applications that requires QE CI / and developing a driver to help us, All the best to You.

 

I am glad to help ...

Link to comment
Share on other sites

Can anyone on find me a source code for a video device driver for mac? If someone could find that for me, when and if I'm successful I will post it up here on this forum free for anyone to download! I know its a hard thing to find, since mac people that have real macs never have to make them, unless they work for Apple. But it would be more appreciated then your euro's or whatever currency you use. As it would help in the process...

 

Kudos on your optimism. Let me offer a few starting points.

 

1. You won't find much source code, but IOKit is stunningly logical in how it works (in an OO-sense). So first look at the structure of IODisplay, IOGraphicsFamily and most importantly the IOFrameBuffer class.

 

graphicsfamily.gif

 

2. Apple doesn't release code for classes like AppleGraphicsControl, AppleGraphicsPowerManagement, or the direct device drivers like AppleIntelGMAX3100FB, AppleIntelGMAX3100GA, AppleIntelGMAX3100GLDriver, and AppleIntelGMAX3100VADriver. But by examining the dependencies, you should be able to find out what inherits from what, what is in-kernel and what is in user-mode. A long time ago Apple had a sample frameuffer in their IOKitExamples called AppleSampleBuffer.kext. If you can find that, it would be really helpful!

 

3. Search the darwin-developers list for references to framebuffer, video, display etc. You may get some hints on sample code, or at least find people who have been attempting to write display drivers. Since display drivers have generally been Apple's sole province, you'll not find too much. However, you might be able to find people who can help. Please beware that any hint of OSx86 is frowned upon there! Here's a search on framebuffer.

 

4. If you can get access to this paper: http://portal.acm.org/citation.cfm?id=1278248, you may find some source that is beneficial. They hacked together a way that a Mac laptop can control 30! other displays.

 

5. What I would suggest as a start, is an approach that is far simpler. See if the 4500 has a compatibility mode for the 3500/3100 or even the GMA950 technology.

 

Since the 3100 and 950 do support CI/QE and OpenGL, this may do the trick for many users (but it won't be as much fun as a developer :D )

 

And you might not even have to do a kext, if you could inject the initialization using nattit or EFI strings and a nub that makes OSX think you have a 3100 or 950.

 

6. Start the project on github or code.google.com, and structure your project so that you have small iterations along the way (agile programing style). That would encourage others to join in.

 

I don't have access to a 4500 (might change in the next two weeks), so I can't help.

(Also, you won't find me on here much since I've never been able to log in to my original account after the insanelymac upgrade. If you need to reach me, PM me here, and I'll give you my direct email address).

 

Best of luck!

-u

Link to comment
Share on other sites

GMA4500 EXPERIMENTERS Wanted!

 

Dr. Hurt said the 4500 architecture is very different from the 3100. I've looked over Intel's docs on the 4500, and I find broad compatibility in the architectures. Intel has moved more features into the chipset (versus relying on the CPU) in the evolution from the GMA900 to the GMA4500, and they've added support for different display connections like LDVS.

 

I think it's worth trying to see if the GMAX3100 kexts in Leopard can drive the 4500 series. So could someone try the following experiment and report back?

 

1. My (10.5.6) AppleIntelGMAX3100.kext/Contents/Info.plist has:

 

<key>IOPCIClassMatch</key>
  <string>0x03000000&0xff000000</string>
  <key>IOPCIPrimaryMatch</key><string>0x2A028086</string>

The translation is that this matches any PCI device of class code 0x03 (display) and vendor 8086 (Intel) AND vendor Intel (8086) and device id: 0x2A02.

 

2. My AppleIntelGMAX3100FB.kext/Info.plist has:

<key>IOPCIClassMatch</key>
  <string>0x03000000&0xff000000</string>
  <key>IOPCIPrimaryMatch</key>
  <string>0x2A028086</string>

The translation is that this matches any PCI device of class code 0x03 and vendor 8086 (Intel) AND vendor Intel (8086) and device id: 0x2A02.

 

3. Edit AppleIntelGMAX3100FB.kext/Info.plist to be:

<key>IOPCIClassMatch</key>
 <string>0x03000000&0xff000000</string>
 <key>IOPCIPrimaryMatch</key>
 <string>0x2A428086 0x2A438086 0x2E128086 0x2E138086 0x2E028086 0x2E038086 0x2E228086 0x2E238086 0x2E328086 0x2E338086</string>

These are the device IDs for the 4500MHD (2A42 2A43), 4500 (2E12 2E13), X4500 and X4500HD (2E02 2E03 2E22 2E23 2E32 2E33). You could just put in your device id here.

 

4. Now comes the annoying part. As BlackCH has noted, you need to hexedit your device id into the kexts themselves. So, with an hex editor open up /S/L/E/AppleIntelGMAX3100FB/AppleIntelGMAX3100FB (the binary kext itself) and do a Find and Replace...

 

Find: 86 80 02 2A

Replace: byte-reversed version of your device id. So if you have a 4500MHD with device id 2A42 (0x2A428086 in the plist), use: 86 80 42 2A (do not use the 0x).

 

5. Do the same for the other kext: /S/L/E/AppleIntelGMAX3100.kext/Contents/MacOS/AppleIntelGMAX3100

 

6. Reboot with -f (force reload of kexts) and -v. If it boots, Check Utilities/Console and look for any text related to the GMA kexts. Also open a terminal window and do:

{:content:}gt; kextstat | grep AppleIntelGMAX3100

If the 3100 kext is not running, there will be no output. If it is running, check that ioreg has it bound in correctly. Then try to enable QE/CI.

 

It's quite likely that this won't work at all, since the kext will be doing probing for properties that are not exposed via the Info.plist. But it's worth a try!

 

Thanks,

-u

Link to comment
Share on other sites

I'll be trying this in a few minutes, as soon as I replug my osX86 disk in my laptop :D Thanks for the efforts :P

 

 

I Tried. Replaced 80 occurences in AppleIntelGMAX3100FB and 6 occurences in AppleIntelGMAX3100...

Doesn't work. I have a blue screen after boot.....

Link to comment
Share on other sites

I'll put the kext's up for you, but you should give me your device ID (you can find it in system profiler under graphics/display) so I can patch the kext specifically for your hardware..

Link to comment
Share on other sites

I Tried. Replaced 80 occurences in AppleIntelGMAX3100FB and 6 occurences in AppleIntelGMAX3100...

Doesn't work. I have a blue screen after boot.....

 

80! I'm sorry but you didn't do that right. My AppleIntelGMAX3100FB has 9 occurrences of 8680022A.

 

-u

 

you got more than me then :) I just got a black screen.. Log is attached down here somewhere, if you need more info, just ask :unsure:

 

Moe,

 

What is your 4500 device id?

 

Also, I see many matching failed in your log. Do you have a normal log that I can diff the new one you sent?

 

Thanks.

-u

Link to comment
Share on other sites

Hi all,

Did you think about using an injector after patching the kexts ? Blue screen means framebuffer initialised but no injection most of the time.

 

add that to your DSDT :

 

Device (GFX0)
		{
			Name (_ADR, 0x00020000)
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package ()
					{
						"AAPL,slot-name", 
						Buffer ()
						{
							"Built in"
						},

						"AAPL,HasPanel", 
						Buffer ()
						{
							0x01, 0x00, 0x00, 0x00
						}, 

						"model", 
						Buffer ()
						{
							"GMA 4500"
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

 

Cheers

Link to comment
Share on other sites

Hi all,

Did you think about using an injector after patching the kexts ? Blue screen means framebuffer initialised but no injection most of the time.

 

Cheers

 

Trauma,

 

Could you clarify? While I'm an old hand with Unix/C/C++, I've only been running OSx86 for the last year, without learning about injection. Is the basic idea injecting values into PCI device space? What would we need to be injecting?

 

-u

Link to comment
Share on other sites

In real Mac EFI provide some information to the driver, on Hacks we need to inject those missing informations into the register in order the driver loads correctly.

 

You can use EFI strings, Natit for GMA 950 Laptop, or the DSDT code i have paste on previous post.

 

This part of code is variable between diff computers ACPI :

Device (GFX0)
		{
			Name (_ADR, 0x00020000)

I use exactly the same trick on drivers for my GMA 950, and symptoms are the sames if your forget to inject stuff.

 

Cheers.

Link to comment
Share on other sites

In real Mac EFI provide some information to the driver, on Hacks we need to inject those missing informations into the register in order the driver loads correctly.

 

You can use EFI strings, Natit for GMA 950 Laptop, or the DSDT code i have paste on previous post.

 

This part of code is variable between diff computers ACPI :

Device (GFX0)
		 {
			 Name (_ADR, 0x00020000)

I use exactly the same trick on drivers for my GMA 950, and symptoms are the sames if your forget to inject stuff.

 

Cheers.

 

I just installed the GMA950 a and b kexts from the iPC distro for my laptop (which I assume use Natit or EFI strings or both). Later, when I patched my DSDT (still learning what to do there), I found I have the _ADR you mentioned. I'm halfway between the two methods, and when I move to 10.5.7, I want to just try DSDT because I have artifacts now.

 

Re: 4500-- How might we determine what needs to be put in the DSDT? Thru IORegistryExplorer?

 

-u

Link to comment
Share on other sites

I'll put the kext's up for you, but you should give me your device ID (you can find it in system profiler under graphics/display) so I can patch the kext specifically for your hardware..
Tipo: Pantalla

Bus: Integrado

VRAM (total): 64 MB de memoria de sistema compartida

Fabricante: Intel (0x8086)

ID del dispositivo: 0x2a42

ID de la revisión: 0x0007

Información de la extensión del kernel: Ninguna extensión de kernel (kext) cargada

Pantallas:

Pantalla:

Resolución: 1366 x 768

Profundidad: Color de 32 bits

Core Image: Software

Pantalla principal: Sí

Duplicado: Desactivado

En línea: Sí

Quartz Extreme: Incompatible

 

thanks in advance!

Link to comment
Share on other sites

@enzobelmont: I attached my kexts in this post, I have the same device ID. (file is modified.zip)

don't forget to make a backup of ur original kexts, so you can revert to them in case it doesn't work (which is very likely the case)

 

 

@coldequation: I attached two logs, one with the modified extensions, and one with the original unaltered exts. It's just my system.log, I hope this is what you need? Otherwise tell me what to give in extra ;) (file is logs.zip)

 

@trauma:

 

How do I actually go about making a new DSDT? I've used a script to disassemble my dsdt, so I have it in dsdt.txt (using iasl and getDSDT). If I add your DSDT code at the end of my DSDT.txt and try to compile it to DSDT.aml, I get errors about non ascii characters in my code, don't get which charachters these would be, since I just use the same as in all the other files, and I write to my files using VIm (which should write out in ascii..)

 

I'm using the chameleon 2 RC1 bootloader, which can load custom DSDT normally (if I put it in the /Extra folder on my root, or in /Extra in my EFI partition..)

 

Edit: removed my kexts, use trauma's or coldequations patcher.

Logs.zip

Link to comment
Share on other sites

@coldequation: I attached two logs, one with the modified extensions, and one with the original unaltered exts. It's just my system.log, I hope this is what you need? Otherwise tell me what to give in extra :) (file is logs.zip)

 

Interesting. It appears that the X3100 framebuffer and the X3100 kext are loading, but these lines are an issue:

 

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: General state base address = 0x00000000

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: Surface state base address = 0x00000000

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: Indirect object base address = 0x00000000

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: Generate state address upper bound = 0x00000000

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: Indirect indirect object access = 0x00000000

Jul 1 20:43:25 etienne-van-bogaerts-satellite-l300 kernel[0]: System instruction pointer = 0x00000000

 

The General state base address, Surface state base address, and Generate state address upper bound should be non-zero (I googled and found a dump of these from a MacBook Pro 15").

 

We need to do some collaborative googling/debugging to find out what is going on.

 

Tienneke, or whoever is getting the blue screen, can you boot into single user mode? (Use -s).

 

Once there, follow the directions to mount your / drive (I forget the commands but it's a combo of fsck and mount).

 

Then cd to your Desktop and run the following command:

ioreg -f -l -w 0 >ioregoutput.txt

 

Then attach the txt file to your reply. We might be able to sort out what's there with some detailed info.

 

Thanks.

-u

Link to comment
Share on other sites

 Share

×
×
  • Create New...