Browsing this Thread:
1 Anonymous Users
Question about pci.hidd |
||
|---|---|---|
|
Joined:
2008/2/5 6:58 From Sunny Finland
Group:
Member Posts:
757
![]() |
Hello!
I'm in the process of making some ugly copy/paste coding... but ran into a little problem. In "my" code i'm already in pci enumerator, but i would need to check what my southbridge chip is... so is there in Aros something like pci_get_device as in linux pci. Or do i just modify and paste the enumerator code to my sources? Just to clarify it a bit more, i don't need to get hold on any structures, just to check if my southbridge chip is any one from some list that i have. Well i could write another enumerator and check it beforehand... or browse through the list myself...
Posted on: 2008/11/5 7:56
|
|
Transfer
|
||
Re: Question about pci.hidd |
||
|---|---|---|
Joined:
2004/3/30 23:19 From Clausthal-Zellerfeld, Germany
Group:
Member Posts:
376
![]() |
Show me the code :)
Posted on: 2008/11/5 9:10
|
|
Transfer
|
||
Re: Question about pci.hidd |
||
|---|---|---|
|
Joined:
2008/2/5 6:58 From Sunny Finland
Group:
Member Posts:
757
![]() |
Hello dr.Schulz!
Well there is not much to show. It basicly is our current ata.hidd with my futile attempt to make it work with my chipset... in via.h i have static const struct via { UWORD VendorID, ProductID; } support[] = { { 0x1106, 0x0571, }, { 0x1106, 0x0581, }, { 0x1106, 0x1571, }, { 0x1106, 0x3164, }, { 0x1106, 0x5324, }, { 0x0000, 0x0000, } }; static const struct via_isa_bridge { const char *name; UWORD id; UBYTE rev_min; UBYTE rev_max; UWORD flags; } via_isa_bridges[] = { { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, . . . and of course all needed via definitions in ata_init.c i've added this in enumerator, doesn't do much more. I understand that in linux they use probes and such things and that their drivers are designed to be patched with what ever and that my code is at best a hack /* * obtain more or less useful data */ OOP_GetAttr(Device, aHidd_PCIDevice_ProductID, &ProductID); OOP_GetAttr(Device, aHidd_PCIDevice_VendorID, &VendorID); bug("[ATAVIA] Enumerator: checking productid %d vendorid %d\n", ProductID, VendorID); /* And try to match it with supported cards */ while (sup->VendorID){ BOOL foundvia = FALSE; if ((sup->VendorID == VendorID) && (sup->ProductID == ProductID)){ bug("[ATAVIA] Enumerator: found matching chip... Banging little sense into it...\n"); foundvia = TRUE; /* To find out how the IDE will behave and what features we actually have to look at the bridge not the IDE controller */ for (config = via_isa_bridges; config->id; config++){ bug("%s\n",config->name); // if ((isa = pci_get_device(PCI_VENDOR_ID_VIA +!!(config->flags & VIA_BAD_ID),config->id, NULL))){ // if (isa->revision >= config->rev_min && isa->revision <= config->rev_max) // break; // pci_dev_put(isa); // } } } sup++; } OOP_GetAttr(Device, aHidd_PCIDevice_Base4, &DMABase);
Posted on: 2008/11/6 0:50
|
|
Transfer
|
||
Re: Question about pci.hidd |
||
|---|---|---|
|
Joined:
2008/2/5 6:58 From Sunny Finland
Group:
Member Posts:
757
![]() |
Hello again...
It seems that not even Ubuntu is able to cope with my Via chipset (vt8237), because under heavy disk use it has random freezes. I have now set up ide prefetch to disabled in bios and it seems to cure that... hopefully... I had previously an Intel chipset motherboard, which had only one issue that sound chip had interrupt set on Aros at 255 (bad...), but now i have IDE's interrupt set at 255... I would REALLY, REALLY like if i386 got APIC support. But the second problem is that ata.hidd does not find the second port from any units. It only shows master from either channel (ide1/ide2). It seems that there is cure for that in linux sources and that is what i'm trying to incorporate in ata.hidd, or i might aswell write atavia.hidd (cathchy name i think... but that does not get it any further as I'm a very poor coder...)
Posted on: 2008/11/7 1:10
|
|
Transfer
|
||
Re: Question about pci.hidd |
||
|---|---|---|
Joined:
2007/6/17 16:42 Group:
Member Posts:
90
![]() |
Here is my old RTL8139 that I was writing on my own a few years back. This is different than what is in the source tree as it does not stop at finding the first ethernet card. *gripe* At some point (like making a router), you *WANT* multiple ethernet card supports.
Basically, it goes around enum all PCI devices against the known PCI chip/ID for RTL8139. Very similar to what you are looking for. #define STANDALONE if you want to run it as a standalone program. It prints out the setting of the Ethernet registers for the cards it can identify. Sorry AROS ate my files, so I can't find my rtl8139.h It is not important to show how to use the enum function. *Edit* guess I cannot attach c source code: :( Excuse the large wall of text here:
Posted on: 2008/11/7 17:08
|
|
Transfer
|
||
Re: Question about pci.hidd |
||
|---|---|---|
|
Joined:
2008/2/5 6:58 From Sunny Finland
Group:
Member Posts:
757
![]() |
Hello!
Thank you for your replie, but that was not exactly what i was after. I already knew in some level how the Enumerator works in pci.hidd, it was clearly documented in source as well as in separate document and for that i'm really grateful, but I was looking for a way to check if my southbridge chip id's could be found, while in the enumerator code that was setup to look for ide capable devices... This could easily be accomplished by separate Enum search for bridges, or by via's prodid's, but i was hoping for a leaner solution, but by now i have given up with that sh*tty excuse for a motherboard and moved back to intel based mobo. I just could not stand for those random freezes. It might be that there was something else wrong with that mb beside the buggy chipset, but i lost interest with it.
Posted on: 2008/11/8 7:31
|
|
Transfer
|
||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.


Transfer








