Jump to content

CardBus/PCMCIA PC Cards for Tiger


  • Please log in to reply
160 replies to this topic

#41
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow

Hi Slice,Is it possible for you to post your FULL source code package of AGPGart or let me know where I can download it? Thanks.Chun-Nan

No problem!My sources based on joblo AGPGart22 is on www.x86dev.org.The incompatibility comes from IOPCIFamily that close PCI2PCIBridge so AGPGart can't attach to the AGPBridge.

My latest sources with more tunings and output is here.Free for any purpose.

BTW I still don't understand your idea about bus numbering. Can you explain?

#42
~Eureka

~Eureka

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 400 posts
Hi guys,

I have updated rev2 of IOPCIFamily and IOPCCardFamily.
http://forum.insanel...showtopic=81048

In this revision, I have fixed some "device/bridge command" bugs and it also included the latest IOPCCardFamily-47.
Hopefully, it will work better. Please let me know the result if possible, especially Firewire device. Thanks

Chun-Nan

#43
fingerr

fingerr

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 260 posts
  • Gender:Male
  • Location:Poland

Hi guys,

I have updated rev2 of IOPCIFamily and IOPCCardFamily.
http://forum.insanel...showtopic=81048

In this revision, I have fixed some "device/bridge command" bugs and it also included the latest IOPCCardFamily-47.
Hopefully, it will work better. Please let me know the result if possible, especially Firewire device. Thanks

Chun-Nan

Hi Chun-Nan,

here is dmesg from tiger + rev2:
PCI configuration changed (BUS free=0 needed=1 added=1)PCI configuration changed (bridge=0 device=3 yenta=1)USB caused wake event (EHCI)IOPCCard info:   Intel PCIC probe:   TI XX12 rev 00FireWire (OHCI) TI ID 803a PCI now active, GUID 00080da0d13f83df; max speed s400.Extension "com.apple.driver.iTunesPhoneDriver" has no kernel dependency.IOPCCard info:   cs: cb_alloc(bus 8): vendor 0x1106, device 0x3038IOPCCard info:   cs: cb_alloc(bus 8): found 3 functionsIOCardBusDevice: binding socket 0 function 0 to card services.IOPCCard info:   cs: cb_config(bus 8)IOPCCard info:     fn 0 bar 2: mem 0xa0004000-0xa00040ffIOPCCard info:     fn 0 bar 5: io 0x120-0x13fIOPCCard info:     fn 1 bar 2: mem 0xa0003000-0xa00030ffIOPCCard info:     fn 1 bar 5: io 0x100-0x11fIOPCCard info:     fn 2 bar 1: mem 0xa0002000-0xa00020ffIOPCCard info:     fn 2 bar 2: mem 0xa0001000-0xa00010ffIOPCCard info:     irq 18IOCardBusDevice: binding socket 0 function 1 to card services.IOCardBusDevice: binding socket 0 function 2 to card services.

SystemProfiler says unknow device when connected my DVD->FW adapter (same like in leo).

Regards,
Mariusz.

#44
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow
Hi Chun-Nan!
Thank you for new codes and for cpu_number. It's a pity in my system it is not compilable so I stay with no-rendevouz variant.
I apply your changes to my project and have some questions:
kIOPCIResetKey
I have no the definition as well as ConfigurationReset
if (0 & gIOPCISkip)	//Chun-Nan
The result always = 0 despite on all previous calculations. May be you want to write
(0 | gIOPCISkip)?
//Chun-Nan
			if (childRange->type == kIOPCIResourceTypeBusNumber)
			{
				if (allocators[childRange->type]->getFreeCount() <= waitCounts[childRange->type])
				{

The compiler give me warning about different types. I don't want to ignore any warning because of run-time error.

/*! @function getFreeCount
	@abstract Totals the sizes of the free fragments.
	@discussion This method returns the total of the sizes of the fragments on the free list.
	@result Returns the total of the free fragments sizes. 
*/

	virtual IORangeScalar getFreeCount( void );


#45
ole2

ole2

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 180 posts
  • Gender:Male
  • Location:Grenoble, France
[quote name='Slice' date='Jan 30 2008, 02:21 PM' post='600903']
if (0 & gIOPCISkip)	//Chun-Nan
The result always = 0 despite on all previous calculations. May be you want to write
(0 | gIOPCISkip)?

no, unless he mean "temporary disabled clause" there must be some variable or complex mask instead of simple "0",
because "0 | variable" means nothing but just "variable" itself, which makes "0" useless also.

#46
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow
2 Chun-Nan
May be you mean
/*! @function getFragmentCount	@abstract Accessor to return the number of free fragments in the range.
	@discussion This method returns a count of free fragments. Each fragment describes a non-contiguous free range - deallocations will merge contiguous fragments together.	@result Returns the count of free fragments. */

	virtual UInt32 getFragmentCount( void );
With this changes I have good results

ACPI: System State [S0 S3 S4 S5] (S3)
PCI configuration changed (BUS free=0 needed=1 added=1)
PCI configuration changed (bridge=0 device=5 yenta=1)
Security auditing service present
BSM auditing present disabled
From path: "uuid",
Waiting for boot volume with UUID 9CC40CE1-BF73-35EC-B1D3-5CA85DBA141AWaiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
IOPCCard info: Intel PCIC probe: Ricoh RL5C475 rev b8
AppleATIIXPATA: ATI ATA (CMD 0x170, CTR 0x374, IRQ 15, BM 0x8078)
AppleATIIXPATA: ATI ATA (CMD 0x1f0, CTR 0x3f4, IRQ 14, BM 0x8070)
USBF: 24.468 AppleUSBOHCI[0x285c000]::start OHCI controller will be unloaded across sleep
USBF: 24.470 AppleUSBOHCI[0x2b6d800]::UIMInitialize Non-NULL hcDoneHead: 0x9dda0
USBF: 24.480 AppleUSBOHCI[0x2b6d800]::start OHCI controller will be unloaded across sleep
FireWire (OHCI) VendorID 1180 ID 551 PCI now active, GUID 0000f041200a3c37; max speed s400.

But without AGPGart.
With this version it loaded and trying to attach to any devices. It is probably my mistake but with default IOPCIFamily all is OK!

#47
~Eureka

~Eureka

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 400 posts

No problem!My sources based on joblo AGPGart22 is on www.x86dev.org.The incompatibility comes from IOPCIFamily that close PCI2PCIBridge so AGPGart can't attach to the AGPBridge.

My latest sources with more tunings and output is here.Free for any purpose.

BTW I still don't understand your idea about bus numbering. Can you explain?


Hi Slice,

Thank you for the source code file. I will check the source code when I have more time. (School starts so maybe on the weekend)

About bus numbering, here is the sample link. I am sure you can search more on the internet.

http://www.science.u...100000000000000

About "kIOPCIResetKey", it should be defined in IOPCIPrivate.h.

About "getFreeCount()", it relates to the problem of "IOPCCardBridge::checkBridgeBusIDs invalid sub/cardbus/pci settings of 0x0". Because it doesn't have free bus/range resources, it cause "0x0".
You can check this message on your dmesg "PCI configuration changed (BUS free=0 needed=1 added=1)".

About "gIOPCISkip", that is correct because I don't want it to run the following command but I also don't want to mess up the original source code in case other place needs it.
Thus, I put "int gIOPCISkip = 0;" in the beginning.
Then I put the following codes:
===============================
fPCIBridgeIndex = 0;
fPCIBridgeTailIndex = 0;
do
{
bridge = fPCIBridgeList[fPCIBridgeIndex++];

FOREACH_CHILD(bridge, child)
{
if (child->headerType == kPCIHeaderType2)
{
++fPCIBridgeTailIndex;
// pciBridgeCheckConfiguration(bridge);
gIOPCISkip++;
pciBridgeAllocateResource(bridge);
pciBridgeDistributeResource(bridge);
gIOPCISkip--;
}
}
}
while (fPCIBridgeIndex <= fPCIBridgeTailIndex);
================================
Then I put "if (0 & gIOPCISkip)". Therefore, if gIOPCISkip != 0, it will skip the following command while if gIOPCISkip = 0, it won't.

Chun-Nan

#48
EqUaTe

EqUaTe

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Gender:Male
  • Location:Babylon 5
Hey guys,

I've just tried rev1fix and rev2 on an old Dell C640.
I'm using AGPGart 2.2 - the gfx card is an ATI Radeon Mobility 7500. (I have QE on it! Yay!).


Anyway, neither version crashes for me, WITH agpgart 2.2 starting normally.


I'm attaching a set of 4 ioreg dumps I took while testing the various permutations. They're attached in the order I made them. I used ioreg -lx -w0


BTW Slice,
Ever compiled a linux kernel? Compiler warnings are generally ignored - only if there are actual problems do people even consider them - most, especially about different types, can be ignored regardless. It's basically lazy code, relying on the compiler to make it work correctly. GCC is very good at this.



EqUaTe


Attached File  agpgart_ioreg.txt   439.77KB   12 downloads
Attached File  noagp_ioreg.txt   439.28KB   2 downloads
Attached File  noagp_pcmcia.rev2_ioreg.txt   446.17KB   4 downloads
Attached File  agp_pcmcia.rev2_ioreg.txt   446.76KB   3 downloads

#49
~Eureka

~Eureka

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 400 posts
Hi slice,

What is the difference between agpgart 2.2 and your agpgart revsion?

Chun-Nan

#50
barbie

barbie

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

Hi guys,

I have updated rev2 of IOPCIFamily and IOPCCardFamily.


Hi Chun-Nan,

Your rev 2 of IOPCI still causing error in my comp. It is about USBF AppleUSBUHCI: UIMInitialize - ioMap is NULL unable to initialize UIM something... just like error generated by the rev 1 IOPCI...

regards

Barbie

#51
~Eureka

~Eureka

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 400 posts

Hi Chun-Nan,

Your rev 2 of IOPCI still causing error in my comp. It is about USBF AppleUSBUHCI: UIMInitialize - ioMap is NULL unable to initialize UIM something... just like error generated by the rev 1 IOPCI...

regards

Barbie


Hi Barbie,

Can you boot with rev2 but without AGPGart loaded and see if the error is still there? I would like to know if the AGPGart caused the problem. BTW, did your system crash this time?

Which version of IOUSBFamily are you using now? Can you boot into single user mode to get the dmesg information?

Thanks.

Chun-Nan

#52
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow

About bus numbering, here is the sample link. I am sure you can search more on the internet.
http://www.science.u...100000000000000

Thanks for explanation

About "kIOPCIResetKey", it should be defined in IOPCIPrivate.h.

OK! It is Leo property that I have no.

About "getFreeCount()", it relates to the problem of "IOPCCardBridge::checkBridgeBusIDs invalid sub/cardbus/pci settings of 0x0". Because it doesn't have free bus/range resources, it cause "0x0".
You can check this message on your dmesg "PCI configuration changed (BUS free=0 needed=1 added=1)".

I think you are wrong. getFreeCount() good ONLY if zero. You might use getFragmentCount()

Then I put "if (0 & gIOPCISkip)". Therefore, if gIOPCISkip != 0, it will skip the following command while if gIOPCISkip = 0, it won't.

NO! :D The result always 0. So you always skip command.
You might write if(!gIOPCISkip)

2 EqUaTe
This warning means that we compare Ranges and Counts. Both is integer so warning only, but they have different sense :P Linux will never be good :(

#53
EqUaTe

EqUaTe

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Gender:Male
  • Location:Babylon 5
I can't agree - linux is already very good, and a large percentage of 3rd party drivers have been ported from linux to OSX.. (Though why we're not porting from BSD, I'm not really sure..).

And if I'm reading what Chun-Nan said, actually it will NEVER skip the command.


Anyway - the important thing about my post is that I have agpgart & Chun-Nan's IOPCIFamily/IOPCCardFamily working happily together.

#54
barbie

barbie

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

Hi Barbie,

Can you boot with rev2 but without AGPGart loaded and see if the error is still there? I would like to know if the AGPGart caused the problem. BTW, did your system crash this time?

Which version of IOUSBFamily are you using now? Can you boot into single user mode to get the dmesg information?

Thanks.

Chun-Nan


Hi Chun-Nan,

Good news, with rev2 but without AGPGart loaded, computer boot well.
with AGPGart loaded, my comp get freeze after some long list message on the screen (verbose mode), but it can boot into single user mode and here is the dmesg result as attached.
My version of IOUSBFamily is 2.7.7

regards,

Barbie

Attached Files



#55
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow

I can't agree - linux is already very good, and a large percentage of 3rd party drivers have been ported from linux to OSX.. (Though why we're not porting from BSD, I'm not really sure..).

I use Ubuntu during half a year. Every weeks download 100Mb patches. When it finished? System became spagetti because of thousand libs in one place with incompatible versions.

You are right. Linux world have more developers with more experience about drivers then HackOSX.

And if I'm reading what Chun-Nan said, actually it will NEVER skip the command.

if(0 & gIOPCISkip) is the same as if(0) that means NEVER EXEC, always SKIP.

Anyway - the important thing about my post is that I have agpgart & Chun-Nan's IOPCIFamily/IOPCCardFamily working happily together.

Interesting news. I think it depends on PCI hardware configuration.
I also trying to resolve the issue.
AGPGart 2.2 and 2.4 have a difference in ATI RS300 bus support. For you it is probably the same.

#56
EqUaTe

EqUaTe

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Gender:Male
  • Location:Babylon 5

I use Ubuntu during half a year. Every weeks download 100Mb patches. When it finished? System became spagetti because of thousand libs in one place with incompatible versions.

Sounds like you did an upgrade from one release to another. They only just really got that working, and imo it's still a bit hacky.
I don't like Ubuntu. Debian is far better :)

You are right. Linux world have more developers with more experience about drivers then HackOSX.

if(0 & gIOPCISkip) is the same as if(0) that means NEVER EXEC, always SKIP.

Hrm.. Yet it does seem to allocate bridges?

Interesting news. I think it depends on PCI hardware configuration.
I also trying to resolve the issue.
AGPGart 2.2 and 2.4 have a difference in ATI RS300 bus support. For you it is probably the same.


Well, I haven't tried your one.. But this is fairly old hardware.. Dell C640. Intel chipset board, radeon 7500m..
But no crashes, at all.

Might be worth having a look at yourself..


EqUaTe

#57
~Eureka

~Eureka

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 400 posts
Hi Slice,

I think you are right with "(0 & gIOPCISkip)". I will fix it in the next revision. However, I did want to skip it. Otherwise, it will set all command to "0".

Chun-Nan

========

Hi Barbie,

Can you post the dmesg without AGPGart loadded? Thanks.

Chun-Nan

#58
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow
Hi All!
I found a mistake in AGPGart all version from 2.2 and later.
Tomorrow I'll give you new one after own testing.
the mistake in rewriting getBridgeSpace() method... ;)

#59
barbie

barbie

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

Hi Barbie,

Can you post the dmesg without AGPGart loadded? Thanks.

Chun-Nan


Hi Chun-Nan,

ok, here it is dmesg without AGPGart loadded as attached.

regards,

Barbie

Attached Files



#60
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,022 posts
  • Gender:Male
  • Location:Moscow
Hi Chun-Nan!

I have a problem.
AGPGart started repeatedly many times with
PCI configuration changed...
many USB errors (bus 38 is already talken) and finally kernel panic even in -s mode.
Seems it is not only my problem or I can't understand what is happen.

Your changes influence on all bridges but may be restrict it to CardBus?

(0 & gIOPCISkip) - not influence in any combinations
always 0
always 1
gIOPCISkip
!gIOPCISkip





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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