0

I would like to understand how a linux kernel identifies that a particular PCIe device attached is supporting multiple physical functions during enumeration process? Is there a particular configuration register that can be read to understand the total no. of PFs supported?

I tried googling and reading some docs online but not able to find/understand how it happens. I need to read that particular register. I am able to read and confirm the register for VF count.

0

1 Answer 1

0

Software simply checks the vendor id register in the config space for each function. If it is FFFF, then the function is not present.

There is a bit in the config space for function 0 that indicates whether there are any other functions. (Offset 0E, bit 7.) If this bit is 0, software can skip checking the other seven functions, as an optimization. If the bit is 1, software should check the vendor id of all of the other seven functions to find out which ones are present.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, thanks for your reply. How can i check the value of offset 0E register? Will "lspci -d <vendor id>: -x gives? I am getting below values for my device. 00: 72 11 00 00 06 01 10 00 01 00 00 ff 08 00 80 00
Yes, that dump shows that bit 7 of byte 0E is 1, so it is a multifunction device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.