]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
configs: Update F2A88XM-HD3 config
authorValentine Sinitsyn <valentine.sinitsyn@gmail.com>
Wed, 11 Mar 2015 19:36:15 +0000 (00:36 +0500)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 20 Mar 2015 06:10:39 +0000 (07:10 +0100)
Add single IOMMU entry that covers all built-in peripherals.
Also, include all missing bits of configuration data (mostly
PCI-related anyway).

Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
configs/f2a88xm-hd3.c

index b570c583e902560eae829fb366e5f4c4e0f5df94..2736496c258d22c217b1222c306da5d95095a7db 100644 (file)
 #include <linux/types.h>
 #include <jailhouse/cell-config.h>
 
-#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
 struct {
        struct jailhouse_system header;
        __u64 cpus[1];
-       struct jailhouse_memory mem_regions[33];
+       struct jailhouse_memory mem_regions[35];
        struct jailhouse_irqchip irqchips[2];
        __u8 pio_bitmap[0x2000];
-       struct jailhouse_pci_device pci_devices[24];
-       struct jailhouse_pci_capability pci_caps[26];
+       struct jailhouse_pci_device pci_devices[26];
+       struct jailhouse_pci_capability pci_caps[27];
 } __attribute__((packed)) config = {
        .header = {
                .hypervisor_memory = {
@@ -40,7 +40,12 @@ struct {
                        .mmconfig_base = 0xe0000000,
                        .mmconfig_end_bus = 0xff,
                        .pm_timer_address = 0x808,
+                       .iommu_base = {
+                               0xfeb80000,
+                       },
                },
+               .device_limit = 128,
+               .interrupt_limit = 256,
                .root_cell = {
                        .name = "F2A88XM-HD3",
                        .cpu_set_size = sizeof(config.cpus),
@@ -86,34 +91,50 @@ struct {
                        .size = 0x20000,
                        .flags = JAILHOUSE_MEM_READ,
                },
-               /* MemRegion: 00100000-3affffff : System RAM */
+               /* MemRegion: 00100000-00ffffff : System RAM */
                {
                        .phys_start = 0x100000,
                        .virt_start = 0x100000,
-                       .size = 0x3af00000,
+                       .size = 0xf00000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
                },
-               /* MemRegion: 3f200000-6c046fff : System RAM */
+               /* MemRegion: 01000000-01ffffff : Kernel */
+               {
+                       .phys_start = 0x1000000,
+                       .virt_start = 0x1000000,
+                       .size = 0x1000000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
+               },
+               /* MemRegion: 02000000-3affffff : System RAM */
+               {
+                       .phys_start = 0x2000000,
+                       .virt_start = 0x2000000,
+                       .size = 0x39000000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
+               },
+               /* MemRegion: 3f200000-6b8ecfff : System RAM */
                {
                        .phys_start = 0x3f200000,
                        .virt_start = 0x3f200000,
-                       .size = 0x2ce47000,
+                       .size = 0x2c6ed000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
                },
-               /* MemRegion: 6c077000-6c339fff : System RAM */
+               /* MemRegion: 6b91d000-6bbdffff : System RAM */
                {
-                       .phys_start = 0x6c077000,
-                       .virt_start = 0x6c077000,
+                       .phys_start = 0x6b91d000,
+                       .virt_start = 0x6b91d000,
                        .size = 0x2c3000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
                },
-               /* MemRegion: 6c33a000-6c407fff : ACPI Non-volatile Storage */
+               /* MemRegion: 6bbe0000-6bcadfff : ACPI Non-volatile Storage */
                {
-                       .phys_start = 0x6c33a000,
-                       .virt_start = 0x6c33a000,
+                       .phys_start = 0x6bbe0000,
+                       .virt_start = 0x6bbe0000,
                        .size = 0xce000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
                },
@@ -268,7 +289,7 @@ struct {
                        .size = 0x1000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
                },
-               /* MemRegion: feb80000-febfffff : amd_iommu */
+               /* MemRegion: feb80000-febfffff : pnp 00:02 */
                {
                        .phys_start = 0xfeb80000,
                        .virt_start = 0xfeb80000,
@@ -282,7 +303,7 @@ struct {
                        .size = 0x1000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
                },
-               /* MemRegion: fed61000-fed70fff : pnp 00:0a */
+               /* MemRegion: fed61000-fed70fff : pnp 00:09 */
                {
                        .phys_start = 0xfed61000,
                        .virt_start = 0xfed61000,
@@ -339,190 +360,361 @@ struct {
                        .bdf = 0x0,
                        .caps_start = 0,
                        .num_caps = 0,
-               },
-               /* PCIDevice: 00:00.2 */
-               {
-                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
-                       .domain = 0x0,
-                       .bdf = 0x2,
-                       .caps_start = 0,
-                       .num_caps = 3,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:01.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x8,
                        .caps_start = 3,
-                       .num_caps = 3,
+                       .num_caps = 4,
+                       .num_msi_vectors = 1,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:01.1 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x9,
                        .caps_start = 3,
-                       .num_caps = 3,
+                       .num_caps = 4,
+                       .num_msi_vectors = 1,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
-               /* PCIDevice: 00:04.0 */
+               /* PCIDevice: 00:02.0 */
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
+                       .domain = 0x0,
+                       .bdf = 0x10,
+                       .caps_start = 0,
+                       .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
+               },
+               /* PCIDevice: 00:03.0 */
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
+                       .domain = 0x0,
+                       .bdf = 0x18,
+                       .caps_start = 0,
+                       .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
+               },
+               /* PCIDevice: 00:03.1 */
                {
                        .type = JAILHOUSE_PCI_TYPE_BRIDGE,
+                       .iommu = 0,
                        .domain = 0x0,
-                       .bdf = 0x20,
-                       .caps_start = 6,
+                       .bdf = 0x19,
+                       .caps_start = 7,
                        .num_caps = 5,
+                       .num_msi_vectors = 1,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
+               },
+               /* PCIDevice: 00:04.0 */
+               {
+                       .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
+                       .domain = 0x0,
+                       .bdf = 0x20,
+                       .caps_start = 0,
+                       .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:10.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x80,
-                       .caps_start = 11,
+                       .caps_start = 12,
                        .num_caps = 4,
+                       .num_msi_vectors = 8,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 8,
+                       .msix_region_size = 0x1000,
+                       .msix_address = 0xfeb6b000,
                },
                /* PCIDevice: 00:10.1 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x81,
-                       .caps_start = 11,
+                       .caps_start = 12,
                        .num_caps = 4,
+                       .num_msi_vectors = 8,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 8,
+                       .msix_region_size = 0x1000,
+                       .msix_address = 0xfeb69000,
                },
                /* PCIDevice: 00:11.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x88,
-                       .caps_start = 15,
+                       .caps_start = 16,
                        .num_caps = 2,
+                       .num_msi_vectors = 8,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:12.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x90,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:12.2 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x92,
-                       .caps_start = 17,
+                       .caps_start = 18,
                        .num_caps = 2,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:13.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x98,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:13.2 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x9a,
-                       .caps_start = 17,
+                       .caps_start = 18,
                        .num_caps = 2,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:14.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xa0,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:14.2 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xa2,
-                       .caps_start = 19,
+                       .caps_start = 20,
                        .num_caps = 1,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:14.3 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xa3,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:14.4 */
                {
                        .type = JAILHOUSE_PCI_TYPE_BRIDGE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xa4,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:14.5 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xa5,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc0,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.1 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc1,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.2 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc2,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.3 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc3,
-                       .caps_start = 20,
+                       .caps_start = 21,
                        .num_caps = 1,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.4 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc4,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 00:18.5 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0xc5,
                        .caps_start = 0,
                        .num_caps = 0,
+                       .num_msi_vectors = 0,
+                       .msi_64bits = 0,
+                       .num_msix_vectors = 0,
+                       .msix_region_size = 0x0,
+                       .msix_address = 0x0,
                },
                /* PCIDevice: 01:00.0 */
                {
                        .type = JAILHOUSE_PCI_TYPE_DEVICE,
+                       .iommu = 0,
                        .domain = 0x0,
                        .bdf = 0x100,
-                       .caps_start = 21,
+                       .caps_start = 22,
                        .num_caps = 5,
+                       .num_msi_vectors = 1,
+                       .msi_64bits = 1,
+                       .num_msix_vectors = 4,
+                       .msix_region_size = 0x1000,
+                       .msix_address = 0xd0800000,
                },
        },
 
@@ -548,6 +740,12 @@ struct {
                },
                /* PCIDevice: 00:01.0 */
                /* PCIDevice: 00:01.1 */
+               {
+                       .id = 0x9,
+                       .start = 0x48,
+                       .len = 2,
+                       .flags = 0,
+               },
                {
                        .id = 0x1,
                        .start = 0x50,
@@ -566,7 +764,7 @@ struct {
                        .len = 14,
                        .flags = JAILHOUSE_PCICAPS_WRITE,
                },
-               /* PCIDevice: 00:04.0 */
+               /* PCIDevice: 00:03.1 */
                {
                        .id = 0x1,
                        .start = 0x50,