Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCIe: add API to get BAR region size #26491

Closed
andrewboie opened this issue Jun 26, 2020 · 1 comment
Closed

PCIe: add API to get BAR region size #26491

andrewboie opened this issue Jun 26, 2020 · 1 comment
Labels
area: Drivers area: PCI Peripheral Component Interconnect Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug

Comments

@andrewboie
Copy link
Contributor

andrewboie commented Jun 26, 2020

Is your enhancement proposal related to a problem? Please describe.
We have pcie_get_mbar() to get a BAR MMIO base address, but no API to also obtain the region size. This means that memory-mapping drivers needs to use hard-coded region sizes instead of just querying it.

Describe the solution you'd like
An API to obtain a BAR region size given a BDF and a BAR index.

Describe alternatives you've considered
Change pcie_get_mbar() to return both address and size instead of just address.

Additional context
This is more of an annoyance since driver code already "knows" the bounds since it's written against a datasheet and you can just #define it.

@andrewboie andrewboie added Enhancement Changes/Updates/Additions to existing features area: PCI Peripheral Component Interconnect area: Drivers priority: low Low impact/importance bug labels Jun 26, 2020
@dcpleung
Copy link
Member

Done in #29818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: PCI Peripheral Component Interconnect Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants