blob: 1175ba7f500bce904c387c5c61f305f094419eea [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
zx_library("pc") {
kernel = true
sources = [
"cmos_bootbyte.cc",
"console.cc",
"debug.cc",
"hpet.cc",
"interrupts.cc",
"keyboard.cc",
"memory.cc",
"pcie_quirks.cc",
"pic.cc",
"platform.cc",
"platform_pcie.cc",
"power.cc",
"smbios.cc",
"timer.cc",
]
deps = [
":tests",
"$zx/kernel/dev/interrupt",
"$zx/kernel/dev/pcie",
"$zx/kernel/lib/acpi_tables",
"$zx/kernel/lib/arch",
"$zx/kernel/lib/cbuf",
"$zx/kernel/lib/cmdline",
"$zx/kernel/lib/console",
"$zx/kernel/lib/counters",
"$zx/kernel/lib/efi",
"$zx/kernel/lib/fbl",
"$zx/kernel/lib/fixed_point",
"$zx/kernel/lib/gfxconsole",
"$zx/kernel/lib/init",
"$zx/kernel/lib/ktl",
"$zx/kernel/lib/lockdep",
"$zx/kernel/lib/memory_limit",
"$zx/kernel/lib/pow2_range_allocator",
"$zx/kernel/lib/topology",
"$zx/kernel/lib/unittest",
"$zx/system/ulib/explicit-memory",
"$zx/system/ulib/smbios",
"$zx/system/ulib/zbi",
"$zx/third_party/lib/acpica",
"$zx/third_party/ulib/cksum",
]
public_deps = [
# <platform/pc/smbios.h> has #include <lib/smbios/smbios.h>.
"$zx/system/ulib/smbios:headers",
# <platform/pc/acpi.h> has #include <acpica/acpi.h>.
"$zx/third_party/lib/acpica:headers",
]
if (toolchain.environment == "kernel") {
public_deps += [
# <platform/pc/timer.h> has #include <lib/affine/ratio.h>.
"$zx/system/ulib/affine",
]
}
}
source_set("tests") {
# TODO: testonly = true
sources = [
"debug_test.cc",
"interrupts_test.cc",
]
deps = [
":headers",
"$zx/kernel/dev/interrupt",
"$zx/kernel/lib/console",
"$zx/kernel/lib/pow2_range_allocator",
"$zx/kernel/lib/unittest",
]
}