diff --git a/examples/kitty/board/qemu_virt_aarch64/framebuffer_vmm_images/linux.dts b/examples/kitty/board/qemu_virt_aarch64/framebuffer_vmm_images/linux.dts index e4363d9f..c7040789 100644 --- a/examples/kitty/board/qemu_virt_aarch64/framebuffer_vmm_images/linux.dts +++ b/examples/kitty/board/qemu_virt_aarch64/framebuffer_vmm_images/linux.dts @@ -2,6 +2,7 @@ / { interrupt-parent = <0x8002>; + dma-coherent; model = "linux,dummy-virt"; #size-cells = <0x02>; #address-cells = <0x02>; @@ -13,11 +14,11 @@ cpu_off = <0x84000002>; cpu_suspend = <0xc4000001>; method = "smc"; - compatible = "arm,psci-1.0\0arm,psci-0.2\0arm,psci"; + compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci"; }; memory@40000000 { - reg = <0x00 0x40000000 0x00 0x10000000>; + reg = <0x00 0x40000000 0x00 0x80000000>; device_type = "memory"; }; @@ -26,7 +27,7 @@ ranges = <0x00 0x00 0xc000000 0x2000000>; #address-cells = <0x01>; #size-cells = <0x01>; - compatible = "qemu,platform\0simple-bus"; + compatible = "qemu,platform", "simple-bus"; }; fw-cfg@9020000 { @@ -49,12 +50,12 @@ compatible = "virtio,mmio"; }; - // virtio_mmio@a000400 { - // dma-coherent; - // interrupts = <0x00 0x12 0x01>; - // reg = <0x00 0xa000400 0x00 0x200>; - // compatible = "virtio,mmio"; - // }; + virtio_mmio@a000400 { + dma-coherent; + interrupts = <0x00 0x12 0x01>; + reg = <0x00 0xa000400 0x00 0x200>; + compatible = "virtio,mmio"; + }; virtio_mmio@a000600 { dma-coherent; @@ -203,6 +204,62 @@ compatible = "virtio,mmio"; }; + virtio_mmio@a003000 { + dma-coherent; + interrupts = <0x00 0x28 0x01>; + reg = <0x00 0xa003000 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003200 { + dma-coherent; + interrupts = <0x00 0x29 0x01>; + reg = <0x00 0xa003200 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003400 { + dma-coherent; + interrupts = <0x00 0x2a 0x01>; + reg = <0x00 0xa003400 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003600 { + dma-coherent; + interrupts = <0x00 0x2b 0x01>; + reg = <0x00 0xa003600 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003800 { + dma-coherent; + interrupts = <0x00 0x2c 0x01>; + reg = <0x00 0xa003800 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003a00 { + dma-coherent; + interrupts = <0x00 0x2d 0x01>; + reg = <0x00 0xa003a00 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003c00 { + dma-coherent; + interrupts = <0x00 0x2e 0x01>; + reg = <0x00 0xa003c00 0x00 0x200>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@a003e00 { + dma-coherent; + interrupts = <0x00 0x2f 0x01>; + reg = <0x00 0xa003e00 0x00 0x200>; + compatible = "virtio,mmio"; + }; + gpio-keys { compatible = "gpio-keys"; @@ -213,19 +270,22 @@ }; }; + pl061@9030000 { + phandle = <0x8004>; + clock-names = "apb_pclk"; + clocks = <0x8000>; + interrupts = <0x00 0x07 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + compatible = "arm,pl061", "arm,primecell"; + reg = <0x00 0x9030000 0x00 0x1000>; + }; + pcie@10000000 { interrupt-map-mask = <0x1800 0x00 0x00 0x07>; interrupt-map = <0x00 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x03 0x04 0x00 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x04 0x04 0x800 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x05 0x04 0x800 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x05 0x04 0x1000 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x06 0x04 0x1000 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x06 0x04 0x1800 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x03 0x04 0x1800 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x05 0x04>; #interrupt-cells = <0x01>; - ranges = <0x1000000 0x00 0x00 - 0x00 0x3eff0000 - 0x00 0x10000 - 0x2000000 0x00 0x10000000 - 0x00 0x10000000 - 0x00 0x2eff0000 - 0x3000000 0x80 0x00 - 0x80 0x00 - 0x80 0x00>; + ranges = <0x1000000 0x00 0x00 0x00 0x3eff0000 0x00 0x10000 0x2000000 0x00 0x10000000 0x00 0x10000000 0x00 0x2eff0000 0x3000000 0x80 0x00 0x80 0x00 0x80 0x00>; reg = <0x40 0x10000000 0x00 0x10000000>; msi-map = <0x00 0x8003 0x00 0x10000>; dma-coherent; @@ -237,6 +297,22 @@ compatible = "pci-host-ecam-generic"; }; + pl031@9010000 { + clock-names = "apb_pclk"; + clocks = <0x8000>; + interrupts = <0x00 0x02 0x04>; + reg = <0x00 0x9010000 0x00 0x1000>; + compatible = "arm,pl031", "arm,primecell"; + }; + + pl011@9000000 { + clock-names = "uartclk", "apb_pclk"; + clocks = <0x8000 0x8000>; + interrupts = <0x00 0x01 0x04>; + reg = <0x00 0x9000000 0x00 0x1000>; + compatible = "arm,pl011", "arm,primecell"; + }; + pmu { interrupts = <0x01 0x07 0x104>; compatible = "arm,armv8-pmuv3"; @@ -265,7 +341,6 @@ bank-width = <0x04>; reg = <0x00 0x00 0x00 0x4000000 0x00 0x4000000 0x00 0x4000000>; compatible = "cfi-flash"; - status = "disabled"; }; cpus { @@ -296,7 +371,7 @@ timer { interrupts = <0x01 0x0d 0x104 0x01 0x0e 0x104 0x01 0x0b 0x104 0x01 0x0a 0x104>; always-on; - compatible = "arm,armv8-timer\0arm,armv7-timer"; + compatible = "arm,armv8-timer", "arm,armv7-timer"; }; apb-pclk { @@ -307,16 +382,85 @@ compatible = "fixed-clock"; }; + aliases { + serial0 = "/pl011@9000000"; + }; + + chosen { + stdout-path = "/pl011@9000000"; + rng-seed = <0x44f12b71 0x29e46ae4 0xa3e78714 0x5540132d 0xac25914b 0x1fc92c3c 0xe8b6abea 0xa3335de7>; + kaslr-seed = <0x12f0cbff 0x99fc6530>; + }; +}; + +/* + * Overlay + */ +/ { + /delete-node/ virtio_mmio@a000000; + /delete-node/ virtio_mmio@a000200; + /delete-node/ virtio_mmio@a000400; + /delete-node/ virtio_mmio@a000600; + /delete-node/ virtio_mmio@a000800; + /delete-node/ virtio_mmio@a000a00; + /delete-node/ virtio_mmio@a000c00; + /delete-node/ virtio_mmio@a000e00; + /delete-node/ virtio_mmio@a001000; + /delete-node/ virtio_mmio@a001200; + /delete-node/ virtio_mmio@a001400; + /delete-node/ virtio_mmio@a001600; + /delete-node/ virtio_mmio@a001800; + /delete-node/ virtio_mmio@a001a00; + /delete-node/ virtio_mmio@a001c00; + /delete-node/ virtio_mmio@a001e00; + /delete-node/ virtio_mmio@a002000; + /delete-node/ virtio_mmio@a002200; + /delete-node/ virtio_mmio@a002400; + /delete-node/ virtio_mmio@a002600; + /delete-node/ virtio_mmio@a002800; + /delete-node/ virtio_mmio@a002a00; + /delete-node/ virtio_mmio@a002c00; + /delete-node/ virtio_mmio@a002e00; + /delete-node/ virtio_mmio@a003000; + /delete-node/ virtio_mmio@a003200; + /delete-node/ virtio_mmio@a003400; + /delete-node/ virtio_mmio@a003600; + /delete-node/ virtio_mmio@a003800; + /delete-node/ virtio_mmio@a003a00; + /delete-node/ virtio_mmio@a003e00; + + flash@0 { + status = "disabled"; + }; + + pcie@10000000 { + status = "disabled"; + }; + + pl031@9010000 { + status = "disabled"; + }; + + pl061@9030000 { + status = "disabled"; + }; + + /delete-node/ pl011@9000000; + uio { compatible = "generic-uio\0uio"; reg = <0x00 0x30000000 0x00 0x2000000>; interrupts = <0x00 0x12 0x04>; }; + memory@40000000 { + reg = <0x00 0x40000000 0x00 0x10000000>; + device_type = "memory"; + }; + chosen { bootargs = "console=ttynull uio_pdrv_genirq.of_id=generic-uio pci=nomsi vt.global_cursor_default=0 logo.nologo"; linux,initrd-start = <0x4d000000>; linux,initrd-end = <0x4f000000>; - // vt.global_cursor_default=0 logo.nologo }; }; diff --git a/examples/kitty/board/qemu_virt_aarch64/kitty.system b/examples/kitty/board/qemu_virt_aarch64/kitty.system index 16da3946..eabe10b8 100644 --- a/examples/kitty/board/qemu_virt_aarch64/kitty.system +++ b/examples/kitty/board/qemu_virt_aarch64/kitty.system @@ -5,7 +5,7 @@ --> - + @@ -72,7 +72,7 @@ - + @@ -213,11 +213,7 @@ - - - - @@ -227,18 +223,13 @@ - - - - + + - - - - + diff --git a/examples/kitty/kitty.mk b/examples/kitty/kitty.mk index 0abefca6..b0d1f67b 100644 --- a/examples/kitty/kitty.mk +++ b/examples/kitty/kitty.mk @@ -222,10 +222,10 @@ qemu: $(IMAGE_FILE) -serial mon:stdio \ -device loader,file=$(IMAGE_FILE),addr=0x70000000,cpu-num=0 \ -m size=2G \ + -global virtio-mmio.force-legacy=false \ -device virtio-net-device,netdev=netdev0 \ -netdev user,id=netdev0 \ - -global virtio-mmio.force-legacy=false \ - -device virtio-gpu-pci + -device virtio-gpu-device,edid=off,blob=off,max_outputs=1,indirect_desc=off,event_idx=off clean:: ${RM} -f *.elf .depend* $ diff --git a/examples/kitty/src/vmm/vmm.c b/examples/kitty/src/vmm/vmm.c index bdc07b86..74ce5388 100644 --- a/examples/kitty/src/vmm/vmm.c +++ b/examples/kitty/src/vmm/vmm.c @@ -57,7 +57,7 @@ uintptr_t guest_ram_vaddr; #if defined(CONFIG_PLAT_ODROIDC4) uint32_t irqs[] = { 192, 193, 194, 5, 246, 89, 35 }; #elif defined(CONFIG_PLAT_QEMU_ARM_VIRT) -uint32_t irqs[] = { 35, 36, 37, 38 }; +uint32_t irqs[] = { 78 }; #else #error "Need to define platform specific pass-through IRQs" #endif