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( $$ ) {
chomp $head;
genHtmlHead( $req, $head, undef );
my $addr = PciIds::Address::new( $req->uri() );
- print "<h1>$head".( defined $addr ? "(".$addr->pretty().")" : "" )."</h1>\n";
+ print "<h1>$head".( defined $addr ? " (".$addr->pretty().")" : "" )."</h1>\n";
genMenu( $req, $addr, $args, $auth, undef );
genPath( $req, $addr, 1 );
my $url = setAddrPrefix( $req->uri(), 'read' ).buildExcept( 'help', $args ).'?help=';
--- /dev/null
+PCI devices
+<h2>Vendors</h2>
+<p>
+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 <a href='/read/PC'>here</a>.
+
+<h2>Devices</h2>
+<p>
+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).
+
+<h2>Sub-systems</h2>
+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 <tt>1234 abcd</tt> 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.
+
+<h2>See also</h2>
+<p>
+You can have a look at <a href='$HELP_URL$pci_class'>PCI device classes</a>.
--- /dev/null
+PCI device classes
+<h2>Device classes</h2>
+<p>
+Device class is identified by a single byte. It is stored as 2 hexadecimal digits (all in lowercase).
+They can be examined <a href='/read/PD'>here</a>.
+
+<h2>Device subclasses</h2>
+<p>
+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.
+
+<h2>Program interface</h2>
+<p>
+A subclass can have different program interfaces.
+An interface is identified by a single byte represented by 2 hexadecimal letters.
+
+<h2>See also</h2>
+You can have a look at <a href='/read/PC'>PCI devices</a>.