]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
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>
Thu, 18 Feb 2021 12:54:36 +0000 (13:54 +0100)
commit1c808fcd859f5ce24132a903a4c7c9996e0513b1
tree24fd487f6ade4b0c6e4cbf33a6654cefe7319b6d
parente13e4fa6c4eba72de5c4685942de5dbe8f43db73
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.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc
MFC after: 3 days
sys/dev/ena/ena.c
sys/dev/ena/ena.h