]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 1c808fcd859f: Allocate BAR for ENA MSIx vector table
authorMichal Krawczyk <mk@semihalf.com>
Thu, 18 Feb 2021 09:00:58 +0000 (10:00 +0100)
committerMarcin Wojtas <mw@FreeBSD.org>
Mon, 22 Feb 2021 16:29:40 +0000 (17:29 +0100)
commit5de955fe436a208f93359e84a059b74bb0169ce6
tree7a4bf3214ecaa8a75d5734f7ad4a2b1f60b2bc84
parent1d0d443daa570c8eaa60ec2c2accbe19554a6c12
MFC 1c808fcd859f: Allocate BAR for ENA MSIx vector table

In the new ENA-based instances like c6gn, the vector table moved to a
new PCIe bar - BAR1. Previously it was always located on the BAR0, so
the resources were already allocated together with the registers.

As the FreeBSD isn't doing any resource allocation behind the scenes,
the driver is responsible to allocate them explicitly, before other
parts of the OS (like the PCI code allocating MSIx) will be able to
access them.

To determine dynamically BAR on which the MSIx vector table is present
the pci_msix_table_bar() is being used and the new BAR is allocated if
needed.

Approved by: re (gjb)
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc

(cherry picked from commit 1c808fcd859f5ce24132a903a4c7c9996e0513b1)
(cherry picked from commit e540e45097e54aaae553ea12468801ceab473d47)
sys/dev/ena/ena.c
sys/dev/ena/ena.h