summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/pci_def.h19
-rw-r--r--src/include/device/resource.h5
2 files changed, 18 insertions, 6 deletions
diff --git a/src/include/device/pci_def.h b/src/include/device/pci_def.h
index 06114363f6..1c4a3e76ef 100644
--- a/src/include/device/pci_def.h
+++ b/src/include/device/pci_def.h
@@ -460,10 +460,11 @@
#define PCI_EXT_CAP_ID_PWR 4
/* Extended Capability lists*/
-#define PCIE_EXT_CAP_OFFSET 0x100
-#define PCIE_EXT_CAP_AER_ID 0x0001
-#define PCIE_EXT_CAP_L1SS_ID 0x001E
-#define PCIE_EXT_CAP_LTR_ID 0x0018
+#define PCIE_EXT_CAP_OFFSET 0x100
+#define PCIE_EXT_CAP_AER_ID 0x0001
+#define PCIE_EXT_CAP_L1SS_ID 0x001E
+#define PCIE_EXT_CAP_LTR_ID 0x0018
+#define PCIE_EXT_CAP_RESIZABLE_BAR 0x0015
/* Advanced Error Reporting */
#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
@@ -527,6 +528,16 @@
#define PCI_LTR_MAX_SNOOP 4
#define PCI_LTR_MAX_NOSNOOP 6
+/* PCIe Resizable BARs */
+#define PCI_REBAR_CAP_OFFSET 0x4
+#define PCI_REBAR_CAP_SIZE_MASK 0xfffffff0
+#define PCI_REBAR_CTRL_OFFSET 0x8
+#define PCI_REBAR_CTRL_NBARS_MASK 0xe0
+#define PCI_REBAR_CTRL_NBARS_SHIFT 5
+#define PCI_REBAR_CTRL_IDX_MASK 0x07
+#define PCI_REBAR_CTRL_SIZE_MASK 0xffff0000
+#define PCI_REBAR_CTRL_SIZE_SHIFT 16
+
/*
* The PCI interface treats multi-function devices as independent
* devices. The slot/function address of each device is encoded
diff --git a/src/include/device/resource.h b/src/include/device/resource.h
index 098d0b653a..fb1f691190 100644
--- a/src/include/device/resource.h
+++ b/src/include/device/resource.h
@@ -36,8 +36,9 @@
#define IORESOURCE_FIXED 0x80000000
/* PCI specific resource bits (IORESOURCE_BITS) */
-#define IORESOURCE_PCI64 (1<<0) /* 64bit long pci resource */
-#define IORESOURCE_PCI_BRIDGE (1<<1) /* A bridge pci resource */
+#define IORESOURCE_PCI64 (1<<0) /* 64bit long pci resource */
+#define IORESOURCE_PCI_BRIDGE (1<<1) /* A bridge pci resource */
+#define IORESOURCE_PCIE_RESIZABLE_BAR (1<<2) /* A Resizable BAR */
typedef u64 resource_t;
struct resource {