Re: lspci memory behind bridge reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[+cc Martin (lspci maintainer)]

On Wed, Dec 21, 2016 at 04:53:30PM +0000, Harry Mallon wrote:
> Hello all,
> 
> I am currently debugging a PCIE BAR assignment issue and am working on a patch to save me some time in future with lspci. Would patches like this be considered? Does anyone have any input on the proposed formats of the readouts?
> 
> 1. Currently if a bridge has no memory behind bridge it displays messages like the following, for reasons of PCI implementation detail.
> 
> I/O behind bridge: 0000f000-00000fff
> Memory behind bridge: fff00000-000fffff
> Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
> 
> I would prefer:
> I/O behind bridge: None
> Memory behind bridge: None
> Prefetchable memory behind bridge: None

Thanks for the suggestions, Harry.  I would like this, too.  Maybe
this with "-v":

  I/O behind bridge: None

and this with "-vv":

  I/O behind bridge: None (0000f000-00000fff)

There are many register values that disable the windows, and it's
conceivable that somebody would want to match the actual register
values with an analyzer trace or a piece of code.

> 2. It would be useful for me to have access to the amount of memory in these chunks (my mental hex subtraction is pretty terrible). Maybe this would be displayed something like
> 
> I/O behind bridge: 0000c000-0000dfff [8.00K]
> Memory behind bridge: f4000000-f65fffff [38.00M]
> Prefetchable memory behind bridge: 00000000e0000000-00000000f3ffffff [320.00M]

This makes sense to me, too, though I would use the same size format
lspci already uses for endpoint BARs, e.g.,

  Memory at f1000000 (64-bit, non-prefetchable) [size=8K]

Of course, BARs are always a nice power-of-two, so there's no need for
fractions, while bridge window sizes are much less constrained.  I
don't know whether it's better to use decimal places as you did, or to
use the largest unit size (K, M, G) that expresses the size as a whole
number.

Be sure to send any patches to Martin directly; I doubt he monitors
linux-pci closely.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux