From: Michal Vaner Date: Sat, 30 Aug 2008 17:04:59 +0000 (+0200) Subject: Help about ID syntak X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d98da1be1dffbf7a323d09cdcc2fea60664e0260;p=pciids.git Help about ID syntak --- diff --git a/PciIds/Address/PciClass.pm b/PciIds/Address/PciClass.pm index 46623c5..13656ef 100644 --- a/PciIds/Address/PciClass.pm +++ b/PciIds/Address/PciClass.pm @@ -29,12 +29,12 @@ sub pretty( $ ) { sub restrictRex( $$ ) { my( $self, $restrict ) = @_; - my( $result ) = ( $restrict =~ /^([a-f0-9]{1,4})/ );#TODO every time? + my( $result ) = ( $restrict =~ /^([a-f0-9]{1,2})/ );#TODO every time? return $result; } sub leaf( $ ) { - #TODO + return shift->get() =~ /\/.*\/.*\//; } sub append( $$ ) { diff --git a/PciIds/Html/Help.pm b/PciIds/Html/Help.pm index 3f869c3..4a361d7 100644 --- a/PciIds/Html/Help.pm +++ b/PciIds/Html/Help.pm @@ -18,7 +18,7 @@ sub getHelp( $$ ) { chomp $head; genHtmlHead( $req, $head, undef ); my $addr = PciIds::Address::new( $req->uri() ); - print "

$head".( defined $addr ? "(".$addr->pretty().")" : "" )."

\n"; + print "

$head".( defined $addr ? " (".$addr->pretty().")" : "" )."

\n"; genMenu( $req, $addr, $args, $auth, undef ); genPath( $req, $addr, 1 ); my $url = setAddrPrefix( $req->uri(), 'read' ).buildExcept( 'help', $args ).'?help='; diff --git a/help/pci b/help/pci new file mode 100644 index 0000000..5e13c36 --- /dev/null +++ b/help/pci @@ -0,0 +1,20 @@ +PCI devices +

Vendors

+

+The top level of hierarchy is a vendor list. +Each vendor has a 2-byte long id, stored in database as 4 hexadecimal digits (with lowercase letters). +They can be browsed here. + +

Devices

+

+Each vendor contains a list of its devices. +Each device in the list has a 2-byte long id, stored the same way as vendor id (4 hexadecimal letters). + +

Sub-systems

+A device can consist of more sub-systems. +Each sub-system has 4-byte long id, stored as 8 hexadecimal letters, split in the middle by a space (for example 1234 abcd could be a sub-system id). +The first quad of digits is considered a vendor id (from the same list of vendors). The vendor of the sub-system can be different than vendor of the device. + +

See also

+

+You can have a look at PCI device classes. diff --git a/help/pci_class b/help/pci_class new file mode 100644 index 0000000..427932d --- /dev/null +++ b/help/pci_class @@ -0,0 +1,18 @@ +PCI device classes +

Device classes

+

+Device class is identified by a single byte. It is stored as 2 hexadecimal digits (all in lowercase). +They can be examined here. + +

Device subclasses

+

+A device class is divided into subclasses. +Each subclass is identified in a same way as a device class, by single byte represented by 2 hexadecimal letters. + +

Program interface

+

+A subclass can have different program interfaces. +An interface is identified by a single byte represented by 2 hexadecimal letters. + +

See also

+You can have a look at PCI devices.