]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/pci: Add missing macros for PCI config
authorPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>
Tue, 22 Aug 2023 21:59:19 +0000 (00:59 +0300)
committerPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>
Tue, 22 Aug 2023 22:18:43 +0000 (01:18 +0300)
Our current PCI configuration is missing some values which will
be requiered by future drivers we implement.

plat/common/include/pci/pci_bus.h

index 643583b4c027861e3007653a233b6ffad6400a76..537b52d5f8893bdd36613b3562d4a02c1f95afaf 100644 (file)
@@ -226,6 +226,10 @@ static struct pci_bus_handler ph __unused;
 #define PCI_CONF_SUBCLASS_ID_SHFT     (16)
 #define PCI_CONF_SUBCLASS_ID_MASK     (0x00FF)
 
+#define PCI_CONF_COMMAND              (0x04)
+#define PCI_CONF_COMMAND_SHFT         (0)
+#define PCI_CONF_COMMAND_MASK         (0xFFFF)
+
 #define PCI_CONF_SECONDARY_BUS          (0x18)
 #define PCI_CONF_SECONDARY_BUS_SHFT     (8)
 #define PCI_CONF_SECONDARY_BUS_MASK     (0xFF)
@@ -247,6 +251,30 @@ static struct pci_bus_handler ph __unused;
 #define PCI_CONF_IOBAR_SHFT         (0x0)
 #define PCI_CONF_IOBAR_MASK         (~0x3)
 
+#define PCI_CONF_BAR0              (0x10)
+#define PCI_CONF_BAR0_SHFT         (0)
+#define PCI_CONF_BAR0_MASK         (0xFFFFFFFF)
+
+#define PCI_CONF_BAR1              (0x14)
+#define PCI_CONF_BAR1_SHFT         (0)
+#define PCI_CONF_BAR1_MASK         (0xFFFFFFFF)
+
+#define PCI_CONF_BAR2              (0x18)
+#define PCI_CONF_BAR2_SHFT         (0)
+#define PCI_CONF_BAR2_MASK         (0xFFFFFFFF)
+
+#define PCI_CONF_BAR3              (0x1c)
+#define PCI_CONF_BAR3_SHFT         (0)
+#define PCI_CONF_BAR3_MASK         (0xFFFFFFFF)
+
+#define PCI_CONF_BAR4              (0x20)
+#define PCI_CONF_BAR4_SHFT         (0)
+#define PCI_CONF_BAR4_MASK         (0xFFFFFFFF)
+
+#define PCI_CONF_BAR5              (0x24)
+#define PCI_CONF_BAR5_SHFT         (0)
+#define PCI_CONF_BAR5_MASK         (0xFFFFFFFF)
+
 #define PCI_BASE_ADDRESS_0     0x10    /* 32 bits */
 #define PCI_BASE_ADDRESS_1     0x14    /* 32 bits */
 #define PCI_BASE_ADDRESS_2     0x18    /* 32 bits */