From 9e09ea46609ea7fadd8212ecf3d0e95f8553f2af Mon Sep 17 00:00:00 2001 From: Chris Guikema Date: Mon, 24 Oct 2022 16:25:04 -0400 Subject: [PATCH] trivial: allow zynqmp to use vpci Signed-off-by: Chris Guikema --- components/VM_Arm/CMakeLists.txt | 4 ++-- .../plat_include/zynqmp/virtio/virtio_plat.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 libs/libvirtio/plat_include/zynqmp/virtio/virtio_plat.h diff --git a/components/VM_Arm/CMakeLists.txt b/components/VM_Arm/CMakeLists.txt index d192e586..f88c6085 100644 --- a/components/VM_Arm/CMakeLists.txt +++ b/components/VM_Arm/CMakeLists.txt @@ -32,7 +32,7 @@ config_option( VM_PCI_SUPPORT "Enable virtual pci device support" DEPENDS - "KernelPlatformExynos5410 OR KernelPlatformExynos5422 OR KernelPlatformTx2 OR KernelPlatformQEMUArmVirt OR KernelPlatformOdroidc2" + "KernelPlatformExynos5410 OR KernelPlatformExynos5422 OR KernelPlatformTx2 OR KernelPlatformQEMUArmVirt OR KernelPlatformOdroidc2 OR KernelPlatformZynqmp" DEFAULT OFF ) @@ -52,7 +52,7 @@ config_option( VM_VIRTIO_NET_VIRTQUEUE "Enable virtio net virtqueue forwarding module" DEPENDS - "KernelPlatformExynos5410 OR KernelPlatformExynos5422 OR KernelPlatformTx2 OR KernelPlatformQEMUArmVirt;VmPCISupport" + "KernelPlatformExynos5410 OR KernelPlatformExynos5422 OR KernelPlatformTx2 OR KernelPlatformQEMUArmVirt OR KernelPlatformZynqmp;VmPCISupport" DEFAULT OFF ) diff --git a/libs/libvirtio/plat_include/zynqmp/virtio/virtio_plat.h b/libs/libvirtio/plat_include/zynqmp/virtio/virtio_plat.h new file mode 100644 index 00000000..9d31ff47 --- /dev/null +++ b/libs/libvirtio/plat_include/zynqmp/virtio/virtio_plat.h @@ -0,0 +1,13 @@ +/* + * Copyright 2019, DornerWorks + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#define IRQ_SPI_OFFSET 32 + +/* 158 chosen because it doesn't correspond to a physical interrupt */ +#define VIRTIO_NET_PLAT_INTERRUPT_LINE (158 + IRQ_SPI_OFFSET) +#define VIRTIO_CON_PLAT_INTERRUPT_LINE (158 + IRQ_SPI_OFFSET)