Add resizable BAR infrastructure, including defines and helper functions to read the possible sizes of a BAR and update its size. See PCIe r3.1, sec 7.22.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -939,9 +939,13 @@ · 938 unmodified lines | |||
| 939 | #define PCI_SATA_SIZEOF_LONG 16 | 939 | #define PCI_SATA_SIZEOF_LONG 16 |
| 940 | 940 | ||
| 941 | /* Resizable BARs */ | 941 | /* Resizable BARs */ |
| 942 | #define PCI_REBAR_CAP 4 /* capability register */ | ||
| 943 | #define PCI_REBAR_CAP_SIZES 0x00FFFFF0 /* supported BAR sizes */ | ||
| 942 | #define PCI_REBAR_CTRL 8 /* control register */ | 944 | #define PCI_REBAR_CTRL 8 /* control register */ |
| 943 | #define PCI_REBAR_CTRL_NBAR_MASK (7 << 5) /* mask for # bars */ | 945 | #define PCI_REBAR_CTRL_BAR_IDX 0x00000007 /* BAR index */ |
| 944 | #define PCI_REBAR_CTRL_NBAR_SHIFT 5 /* shift for # bars */ | 946 | #define PCI_REBAR_CTRL_NBAR_MASK 0x000000E0 /* # of resizable BARs */ |
| 947 | #define PCI_REBAR_CTRL_NBAR_SHIFT 5 /* shift for # of BARs */ | ||
| 948 | #define PCI_REBAR_CTRL_BAR_SIZE 0x00001F00 /* BAR size */ | ||
| 945 | 949 | ||
| 946 | /* Dynamic Power Allocation */ | 950 | /* Dynamic Power Allocation */ |
| 947 | #define PCI_DPA_CAP 4 /* capability register */ | 951 | #define PCI_DPA_CAP 4 /* capability register */ |