3
i'm trying to figure out how to interpret the the resource
and resource<number>
files under PCI
bus. Let's look at a specific example.
Here is what I get when I run lspci -tvvv
-[0000:00]-+-00.0 Intel Corporation 440FX - 82441FX PMC [Natoma]
+-01.0 Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
+-01.1 Intel Corporation 82371AB/EB/MB PIIX4 IDE
+-02.0 InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
+-03.0 Intel Corporation 82540EM Gigabit Ethernet Controller
+-04.0 InnoTek Systemberatung GmbH VirtualBox Guest Service
+-05.0 Intel Corporation 82801AA AC'97 Audio Controller
+-06.0 Apple Inc. KeyLargo/Intrepid USB
+-07.0 Intel Corporation 82371AB/EB/MB PIIX4 ACPI
\-0d.0 Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode]
When I run tree /sys/bus/pci/devices/0000\:00\:00.0/
I get the following:
/sys/bus/pci/devices/0000:00:00.0/
├── broken_parity_status
├── class
├── config
├── consistent_dma_mask_bits
├── d3cold_allowed
├── device
├── dma_mask_bits
├── driver_override
├── enable
├── firmware_node -> ../../LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP8390:00
├── irq
├── local_cpulist
├── local_cpus
├── modalias
├── msi_bus
├── numa_node
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── remove
├── rescan
├── resource
├── subsystem -> ../../../bus/pci
├── subsystem_device
├── subsystem_vendor
├── uevent
└── vendor
When I run tree /sys/bus/pci/devices/0000\:00\:03.0
I get the following:
/sys/bus/pci/devices/0000:00:03.0
├── broken_parity_status
├── class
├── config
├── consistent_dma_mask_bits
├── d3cold_allowed
├── device
├── dma_mask_bits
├── driver -> ../../../bus/pci/drivers/e1000
├── driver_override
├── enable
├── irq
├── local_cpulist
├── local_cpus
├── modalias
├── msi_bus
├── net
│ └── eth0
│ ├── addr_assign_type
│ ├── address
│ ├── addr_len
│ ├── broadcast
│ ├── carrier
│ ├── carrier_changes
│ ├── device -> ../../../0000:00:03.0
│ ├── dev_id
│ ├── dev_port
│ ├── dormant
│ ├── duplex
│ ├── flags
│ ├── gro_flush_timeout
│ ├── ifalias
│ ├── ifindex
│ ├── iflink
│ ├── link_mode
│ ├── mtu
│ ├── name_assign_type
│ ├── netdev_group
│ ├── operstate
│ ├── phys_port_id
│ ├── phys_switch_id
│ ├── power
│ │ ├── async
│ │ ├── autosuspend_delay_ms
│ │ ├── control
│ │ ├── runtime_active_kids
│ │ ├── runtime_active_time
│ │ ├── runtime_enabled
│ │ ├── runtime_status
│ │ ├── runtime_suspended_time
│ │ └── runtime_usage
│ ├── queues
│ │ ├── rx-0
│ │ │ ├── rps_cpus
│ │ │ └── rps_flow_cnt
│ │ └── tx-0
│ │ ├── byte_queue_limits
│ │ │ ├── hold_time
│ │ │ ├── inflight
│ │ │ ├── limit
│ │ │ ├── limit_max
│ │ │ └── limit_min
│ │ ├── tx_timeout
│ │ └── xps_cpus
│ ├── speed
│ ├── statistics
│ │ ├── collisions
│ │ ├── multicast
│ │ ├── rx_bytes
│ │ ├── rx_compressed
│ │ ├── rx_crc_errors
│ │ ├── rx_dropped
│ │ ├── rx_errors
│ │ ├── rx_fifo_errors
│ │ ├── rx_frame_errors
│ │ ├── rx_length_errors
│ │ ├── rx_missed_errors
│ │ ├── rx_over_errors
│ │ ├── rx_packets
│ │ ├── tx_aborted_errors
│ │ ├── tx_bytes
│ │ ├── tx_carrier_errors
│ │ ├── tx_compressed
│ │ ├── tx_dropped
│ │ ├── tx_errors
│ │ ├── tx_fifo_errors
│ │ ├── tx_heartbeat_errors
│ │ ├── tx_packets
│ │ └── tx_window_errors
│ ├── subsystem -> ../../../../../class/net
│ ├── tx_queue_len
│ ├── type
│ └── uevent
├── numa_node
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── remove
├── rescan
├── reset
├── resource
├── resource0
├── resource2
├── subsystem -> ../../../bus/pci
├── subsystem_device
├── subsystem_vendor
├── uevent
└── vendor
What are resources, i.e. resource
, resource0
, resource2
? Are those BAR registers? If they are then a number in the name, i.e. 2 in resource2
would mean BAR2. In this case what does resource
represent?
Any help is appreciated.
1Here’s some documentation. – Daniel B – 2016-06-16T17:45:27.967
@DanielB It says that
resource0..N
meansPCI resource N
. Do you know what is meant byPCI resource
? Does anyone? – flashburn – 2016-06-16T17:58:14.223Not really, sorry. The only other thing I found is this Stack Overflow q/a. I can’t check whether that’s correct, however.
– Daniel B – 2016-06-16T18:02:52.803Is it answered ? what does the number means ? – ransh – 2019-11-21T09:59:57.250