Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#94 closed bug (fixed)

Update pcihdr.h

Reported by: johndrinkwater Owned by: korli
Priority: normal Milestone: R1
Component: Preferences Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This file is dated 30 Jun 2003 and could do with an update.

Attachments (7)

pci-clean (1.9 KB) - added by johndrinkwater 13 years ago.
First revision of the PCI header cleaner
pci-clean.2 (1.9 KB) - added by johndrinkwater 13 years ago.
incorporates Korli's suggestion
pci-clean-awk (4.6 KB) - added by johndrinkwater 13 years ago.
An awk script to handle pciids.sourceforge.net/pci.ids
pci-clean-awk.2 (4.9 KB) - added by johndrinkwater 13 years ago.
Fixes the escapement problems
pci-clean-awk-verdev (4.8 KB) - added by johndrinkwater 13 years ago.
Less memory hungry
pci-header.awk (5.7 KB) - added by johndrinkwater 13 years ago.
A new version, doesnt require pipe usage
pci-header.2.awk (6.7 KB) - added by johndrinkwater 13 years ago.
Cleaner, nicer formatting, and w/ comments

Download all attachments as: .zip

Change History (48)

comment:1 Changed 13 years ago by johndrinkwater

bug_file_loc: http://www.pcidatabase.com/pci_c_header.php

comment:2 Changed 13 years ago by johndrinkwater

After having words with Korli on IRC; A script it required to make updating this file easier; the output from the source isn't the cleanest in the world.

Jan 17 18:52:50 <Korli> [Beta] the problem is the one I can find is pretty dirty : I have to clean up bad entries myself, weird <Korli> you'll see there are some bad values in it <Korli> maybe a regular expression could filter it to check for good entries <Korli> this one is funny : { 0x11D1, VXP520, "tag4769", "Video card" } , <Korli> some even don't have vendor and device names, they are useless <Korli> a little script could be written, filtering this file and committed along the pci header to ease future updates

Changed 13 years ago by johndrinkwater

Attachment: pci-clean added

First revision of the PCI header cleaner

comment:3 Changed 13 years ago by korli

Status: newassigned

comment:4 Changed 13 years ago by korli

I did a test and result is :

/boot/home/svnhaiku/trunk/src/preferences/devices/pcihdr.h:3453: unknown escape sequence `\V' /boot/home/svnhaiku/trunk/src/preferences/devices/pcihdr.h:3541: unknown escape sequence `\V' /boot/home/svnhaiku/trunk/src/preferences/devices/pcihdr.h:3701: unknown escape sequence `\M' /boot/home/svnhaiku/trunk/src/preferences/devices/pcihdr.h:5625: unknown escape sequence `\V'

I think you should replace '\' with '
'. Thanks.

comment:5 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

comment:6 Changed 13 years ago by korli

I committed a fixed header, but I doubt it's usable after all, ie vendor info for the vga device in VPC : { 0x5333, "S3 Graphics", "kevin humphreys" }. It's just an example of wrong data, which were good before. I think I'll revert to the previous version, I can't see how to solve this header with such bad information. Maybe we should take a pci header from another OS instead.

comment:7 Changed 13 years ago by korli

Could you have a look at http://pciids.sourceforge.net/ ? It seems license compatible and clean. We would need a script (awk ?) to convert pci.ids in a valider header. [Beta], what's your opinion ?

comment:8 Changed 13 years ago by johndrinkwater

I'll look into it..

Please, revert the pcihdr.h change; i'd hope we could get a clean (and filtered) source before any changes occured.

There are alot of differences between the new pcihdr.h, and the old; but its from the same source. So its a good idea we're leaving it.

Changed 13 years ago by johndrinkwater

Attachment: pci-clean.2 added

incorporates Korli's suggestion

comment:9 Changed 13 years ago by johndrinkwater

http://pciids.sourceforge.net/pci.db looks like a good candidate.

There is a problem though; this data doesnt supply short Vendor name, nor a separate chip/chipset field. Would a revised PCI_DEVTABLE & PCI_VENTABLE struct be ok? If not, should/could fields be duplicated into each?

Like: { 0x0675, 0x1700, "IS64PH ISDN Adapter", "IS64PH ISDN Adapter" }

comment:10 Changed 13 years ago by korli

Sure. As of now, we only use :

  • PCI_VENTABLE_LEN, PciVenTable[i].VenId, PciVenTable[i].VenFull
  • PCI_DEVTABLE_LEN, PciDevTable[i].VenId, PciDevTable[i].DevId,

PciDevTable[i].ChipDesc

and maybe classe informations (bottom of pcihdr.h)

comment:11 Changed 13 years ago by korli

pci.ids seems better than pci.db, because pci.db also contains non validated, and deleted data.

comment:12 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

Changed 13 years ago by johndrinkwater

Attachment: pci-clean-awk added

An awk script to handle pciids.sourceforge.net/pci.ids

comment:13 Changed 13 years ago by korli

Tested: a problem appeared with " in strings. " should be escaped in device and vendor strings.

comment:14 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

comment:15 Changed 13 years ago by johndrinkwater

bug_file_loc: http://www.pcidatabase.com/pci_c_header.phphttp://pciids.sourceforge.net/pci.ids

comment:16 Changed 13 years ago by korli

Bugs again:

{ 0x10de, 0x01ec, "nForce2 Memory Controller 2"@@,

{ 0x10ee, 0x0410, "Wildcard TE410P (2nd Gen)"@@,

comment:17 Changed 13 years ago by johndrinkwater

I'm afraid I dont see this problem: [john@ezri64 Desktop]$ awk --version GNU Awk 3.1.4 <snip>

{ 0x10de, 0x01eb, "nForce2 Memory Controller 1" }, { 0x10de, 0x01ec, "nForce2 Memory Controller 2" }, { 0x10de, 0x01ed, "nForce2 Memory Controller 3" },

I'm wondering if its to do with the amount of memory the list needs, I can probably fix that with a quick regig.

Could you tell me how long it takes to process?

comment:18 Changed 13 years ago by korli

Resolution: fixed

comment:19 Changed 13 years ago by korli

I integrated this "less memory hungry" version as it works very well (no bugs and fast) in revision 16080. I think code guidelines don t apply on generated code AFAIK. Thanks for this hard work.

comment:20 Changed 13 years ago by korli

Status: assignedclosed

comment:21 Changed 13 years ago by korli

Still an error : pcihdr.h is used also by the pci bus manager. It makes use of Chip and VendorShort. I added them empty ... to fix the build. I'll investigate if they're useful at all.

comment:22 Changed 13 years ago by johndrinkwater

Resolution: fixed

comment:23 Changed 13 years ago by johndrinkwater

I wonder what we're going to do for a source of PCI information, if we distrust pcidatabase, and require more information from pciids.

hmm :/

[if the pci bus manager requires this file as well, should we move it into a more relevant space, re: headers/private(?)]

comment:24 Changed 13 years ago by johndrinkwater

Status: closedreopened

Changed 13 years ago by johndrinkwater

Attachment: pci-clean-awk.2 added

Fixes the escapement problems

Changed 13 years ago by johndrinkwater

Attachment: pci-clean-awk-verdev added

Less memory hungry

comment:25 Changed 13 years ago by korli

Why did you reopen the bug ?

comment:26 Changed 13 years ago by johndrinkwater

sorry, accidental.

comment:27 Changed 13 years ago by johndrinkwater

Status: reopenedclosed

comment:28 Changed 13 years ago by johndrinkwater

Resolution: fixed

comment:29 Changed 13 years ago by johndrinkwater

Cc: axeld@… added

comment:30 Changed 13 years ago by johndrinkwater

Status: closedreopened

comment:31 Changed 13 years ago by johndrinkwater

Resolution: fixed

comment:32 Changed 13 years ago by johndrinkwater

Looked at a reworking of this script, after some errors on output

comment:33 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

comment:34 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

comment:35 Changed 13 years ago by korli

taken into account in revision 16199. to be tested by Axel or Marcus

comment:36 Changed 13 years ago by korli

Cc: marcus@… added

Changed 13 years ago by johndrinkwater

Attachment: pci-header.awk added

A new version, doesnt require pipe usage

comment:37 Changed 13 years ago by axeld

Status: reopenedclosed

comment:38 Changed 13 years ago by axeld

This seems to work with the original R5 awk. BTW it might be a problem of Fran?ois' pipefs implementation, as that's what I'm using under R5.

comment:39 Changed 13 years ago by axeld

Resolution: fixed

comment:40 Changed 13 years ago by johndrinkwater

attachments.isobsolete: 01

Changed 13 years ago by johndrinkwater

Attachment: pci-header.2.awk added

Cleaner, nicer formatting, and w/ comments

comment:41 Changed 13 years ago by korli

Committed in revision #16214, as before I added empty VenShort and Chip fields.

Note: See TracTickets for help on using tickets.