Jump to content

AnV IOPCIFamily 2.5 build 243


69 posts in this topic

Recommended Posts

I don't know if AnV is still watching this thread, but there is some issues with the conversion to snprintf you might want to fix.

	
	if ((subVendor || subProduct) && ((subVendor != vendor) || (subProduct != product)))
{
	out += snprintf(out, sizeof(out), "pci%lx,%lx", subVendor, subProduct) + 1;
}
out += snprintf(out, sizeof(out), "pci%lx,%lx", vendor, product) + 1;
out += snprintf(out, sizeof(out), "pciclass,%06lx", classCode) + 1;

 

This code isn't going to do the same thing as the sprintf version. What you want is something more like:

	if ((subVendor || subProduct) && ((subVendor != vendor) || (subProduct != product)))
{
	out += snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pci%lx,%lx", subVendor, subProduct) + 1;
}
out += snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pci%lx,%lx", vendor, product) + 1;
out += snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pciclass,%06lx", classCode) + 1;

 

The second parameter to snprintf is how many bytes to write. When you put sizeof(out) in there, you are telling it to write 8 bytes (on a 64 bit os). snprintf will return -1 if there isn't enough room, but will return the length needed if you pass it a size of 0. In this case, it shouldn't hurt because the string is guaranteed to fit(as is, though that may not be true if the code changes further). For example, if any of these calls exactly fills up the buffer then there would be a problem.

	if ((subVendor || subProduct) && ((subVendor != vendor) || (subProduct != product)))
{
	written= snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pci%lx,%lx", subVendor, subProduct);
		if(written>=0){
		  out +=written+1
		} else {
		  *out = 0;
		}
}
   if(sizeof(compatBuf) > (out-compatBuf) {
 written= snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pci%lx,%lx", vendor, product);
 if(written>=0){
	out +=written+1
 } else {
	*out = 0;//if a partial copy is okay you can do *(out+sizeof(compatBuf)-(out-compatBuf)-1)=0
 }
}
if(sizeof(compatBuf) > (out-compatBuf) {
 written= snprintf(out, sizeof(compatBuf)-(out-compatBuf), "pciclass,%06lx", classCode);
 if(written>=0){
	out +=written+1
 } else {
	*out = 0;
 }
}

 

A dynamic buffer could also be used:

			
		UInt32 size = snprintf(NULL, 0, "pci%lx,%lx", subVendor, subProduct) + 1;			
		size += snprintf(NULL, 0, "pci%lx,%lx", vendor, product) + 1;
		size += snprintf(NULL, 0, "pciclass,%06lx", classCode) + 1;

		char* buffer = new char[size];
		out=buffer;
					int written=0;
		written+=snprintf(out+written, size-written, "pci%lx,%lx", subVendor, subProduct) + 1;			
		written += snprintf(out+written, size-written, "pci%lx,%lx", vendor, product) + 1;
		written += snprintf(out+written, size-written, "pciclass,%06lx", classCode) + 1;
		....
		delete [] buffer;

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

SLICE had made that SL version already !

I dont know the link but attatched that new SL IOPCI here.

Be sure to fix rights (sudo chown -R root:wheel ....) before using it and also update .mkext (normaly automatic or do an sudo touch /System/Extensions )

 

The attatched IOPCI is Snow Leo ONLY!!!

IOPCIFamily.kext.zip

Link to comment
Share on other sites

hi mitch, thanks for attaching that kext. I already tried it before and it does not have any positive effect on my system.

 

An old version from Chun Nan (he made it for 10.5.6) is Snow Leo compatible and offers the remapping I need for getting LAN & WLAN miniPCIe to work. I attached it. It does not work in /Extra/Extensions but only in S/ L/ E.

 

Now the only thing not working on my Snow Leo 10.6.1 HackBook is wake-up from Sleep (black screen).

IOPCIFamily.zip

Link to comment
Share on other sites

That problem may not be fixed (only) by that modded .kext. It fixes only some interut handling and make sd-card readers seen. Mostyl nothinh to do with sleep. At least sleep with 10.5.8 + SL is more problematic that Version up to 10.5.7.

Link to comment
Share on other sites

Does anyone have a working IOPCIFamily.kext for Snow Leopard, that works on an Acer Aspire 5920G? I have tried several of this thread, and none seem to crash my machine, but don't seem to do anything either - wireless card and ethernet still not picked up (I have replaced the built in wireless with an Apple Airport N Broaccom card).

 

I also have the source for the kext, and providing someone can point me in the right direction as to what I need to edit, I am willing to give it a go. I will make the kext available too in case it helps anyone else.

 

I'm not bothered about getting the cardreader working, but graphics and wireless are my two main issues I would like to get resolved. Cheers in advance.

 

Edit: Post 58 (BugsB) had a link for a kext which has sort of worked for me. I'm now getting the Airport icon but can't turn Airport on. So near yet so far! As for remapping, if someone can tell me what to look for or change in the source to get mine to work, I'll try and help others also.

 

Edit 2: After a reboot the airport card worked fine, and is connecting to networks fine with no issues. Gfx is still a no go, and no ethernet as yet.

Link to comment
Share on other sites

  • 1 month later...
same here using the Travelmate 6410 , iv back to vanilla 10.5.6 kext but nothing to do ...wireless (dell 1390) wont back to work!

 

 

FIXED with the 254 rel that iv found in SLICE signature :(

 

download it here: http://forum.insanelymac.com/index.php?act...st&id=40552

 

I have problem in my acer 6930 after using this IOPCFamily brodacom start but i have Kernel Panic.

 

Anybody help?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hi ^^

 

I have a problem on my Aspire 5739g (Cantiga PM45) with Snow 10.6.5

The Lan and Wifi don't work.

 

Reading the Ioreg I noticed that Bridge IORanges and MemoryRange are respectively 0x0 e 0xfff and they are the same for others Pci Bridge

 

 

iobridge.png

 

 

The Lan card's error is:

 

localhost kernel[0]: [AttansicL1eEthernet] Error: Couldn't map io regs

localhost kernel[0]: [AttansicL1eEthernet] Error: Couldn't probe adapter

 

How can I solve these problems ? This kext can be the solution?

Link to comment
Share on other sites

Hi ^^

 

I have a problem on my Aspire 5739g (Cantiga PM45) with Snow 10.6.5

The Lan and Wifi don't work.

 

Reading the Ioreg I noticed that Bridge IORanges and MemoryRange are respectively 0x0 e 0xfff and they are the same for others Pci Bridge

 

 

iobridge.png

 

 

The Lan card's error is:

 

localhost kernel[0]: [AttansicL1eEthernet] Error: Couldn't map io regs

localhost kernel[0]: [AttansicL1eEthernet] Error: Couldn't probe adapter

 

How can I solve these problems ? This kext can be the solution?

 

 

Up

Link to comment
Share on other sites

 Share

×
×
  • Create New...