| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//src/devices/bus/drivers/pci/pci.gni") |
| |
| bind_rules("qemu_bus_bind") { |
| rules = "qemu_bus.bind" |
| output = "qemu_bus_bind.h" |
| tests = "bind_tests.json" |
| deps = [ "//src/devices/bind/fuchsia.platform" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":qemu_bus_bind_test" ] |
| } |
| |
| driver_module("qemu-arm64") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| sources = [ |
| "qemu-bus.cc", |
| "qemu-display.cc", |
| "qemu-kpci.cc", |
| "qemu-rtc.cc", |
| "qemu-sysmem.cc", |
| ] |
| deps = [ |
| ":qemu_bus_bind", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp", |
| "//sdk/banjo/fuchsia.sysmem", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/devices/lib/driver", |
| "//src/devices/pci/lib/pci", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxc", |
| ] |
| |
| if (platform_enable_user_pci) { |
| defines = [ "ENABLE_USER_PCI" ] |
| sources -= [ "qemu-kpci.cc" ] |
| sources += [ "qemu-pci.cc" ] |
| } |
| |
| if (current_cpu == "arm64") { |
| # TODO(fxbug.dev/47406): restore some form of data dependency on qemu |
| # boot shims. |
| } |
| } |