| # Copyright 2023 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/assembly/board_input_bundle.gni") |
| import("//build/assembly/board_input_bundle_set.gni") |
| import("//build/bazel/assembly/bazel_board_configuration.gni") |
| import("//build/info/info.gni") |
| |
| assert(current_toolchain == default_toolchain, |
| "The x64 board can only be defined in the default toolchain.") |
| assert(current_cpu == "x64", |
| "The x64 board can only be defined in an x64 toolchain.") |
| |
| bazel_board_configuration("x64") { |
| testonly = true |
| bazel_board_configuration_target = "//boards/x64" |
| deps = [ ":x64.bazel_input" ] |
| } |
| |
| bazel_board_configuration("reduced_perf_variation") { |
| testonly = true |
| bazel_board_configuration_target = "//boards/x64:reduced_perf_variation" |
| deps = [ ":reduced_perf_variation.bazel_input" ] |
| } |
| |
| group("x64.bazel_input") { |
| testonly = true |
| deps = [ |
| ":paver.bazel_inputs", |
| ":x64_bibs.bazel_input", |
| "//src/firmware/gigaboot/cpp:esp.bazel_input", |
| ] |
| } |
| |
| group("reduced_perf_variation.bazel_input") { |
| testonly = true |
| deps = [ |
| ":paver.bazel_inputs", |
| ":reduced_perf_variation_args.bazel_inputs", |
| ":x64_bibs.bazel_input", |
| "//src/firmware/gigaboot/cpp:esp.bazel_input", |
| ] |
| } |
| |
| board_input_bundle("reduced_perf_variation_args") { |
| kernel_cmdline = [ |
| # Disable page scanning in all its forms. Page scanning is intended to |
| # provide a memory benefit to final systems, but the operation of the |
| # scanner and its unpredictable de-duplication or eviction of memory in use |
| # by benchmarks could cause noticeable variation. |
| "kernel.page-scanner.start-at-boot=false", |
| "kernel.page-scanner.zero-page-scans-per-second=0", |
| "kernel.page-scanner.enable-eviction=false", |
| |
| # Disable Intel Turbo Boost. Turbo Boost provides a significant speed-up to |
| # many workloads, but -- because CPU frequencies vary based on previous |
| # work, work in other cores, system temperature, etc -- makes performance |
| # of systems less predictable. We prefer stability in our performance |
| # comparison benchmarks. |
| "kernel.x86.turbo=false", |
| |
| # Set the Intel HWP performance profile to be "stable", trying to keep the |
| # CPU clock rate stable. With turbo boost disabled, this has only a small |
| # effect, but helps ensure that wake ups from idle are fixed. |
| "kernel.x86.hwp_policy=stable-performance", |
| |
| # Disable hyper-threading. Hyper-threading reduces predictability of |
| # benchmarks, because the performance of a thread is significantly affected |
| # by other threads on the core. |
| "kernel.smp.ht=false", |
| |
| # Disable spectre mitigations. Spectre mitigations have significant |
| # performance impact, but are currently only carried out on a subset of the |
| # NUC fleet. This means that different devices have significantly different |
| # performance characteristics, meaning that benchmark results vary |
| # significantly based on the device running it. |
| # |
| # TODO(https://fxbug.dev/42108327): Ideally, we should load microcode during Zircon boot, |
| # which should bring all devices to the same patch level, removing the |
| # performance differences when spectre mitigations are in place. |
| "kernel.x86.disable_spec_mitigations=true", |
| ] |
| version = build_info_version |
| } |
| |
| board_input_bundle("main_bundle") { |
| drivers = [ |
| { |
| package_target = "//src/connectivity/ethernet/drivers/gvnic:gvnic-package" |
| package_set = "bootfs" |
| driver_components = [ "meta/gvnic.cm" ] |
| }, |
| { |
| package_target = |
| "//src/connectivity/ethernet/drivers/realtek-8111:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/realtek-8111.cm" ] |
| }, |
| { |
| package_target = "//src/devices/serial/drivers/uart16550:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/uart16550.cm" ] |
| }, |
| { |
| package_target = "//src/connectivity/bluetooth/hci/vendor/intel:intel" |
| package_set = "base" |
| driver_components = [ "meta/bt-hci-intel.cm" ] |
| }, |
| ] |
| base_packages = [ |
| # Goldfish devices are provided by femu/aemu. |
| "//src/graphics/lib/goldfish-vulkan/gnbuild:goldfish", |
| |
| # Lavapipe used in some scenarios |
| "//src/graphics/lib/lavapipe-vulkan:lavapipe_pkg", |
| |
| # Vulkan ICD for virtio-gpu |
| "//src/graphics/drivers/gfxstream-vulkan", |
| ] |
| version = build_info_version |
| } |
| |
| board_input_bundle("x64_common") { |
| configuration = { |
| power_manager = |
| "//src/power/power-manager/node_config/base_node_config.json5" |
| sysmem_format_costs = [ "//src/sysmem/format_costs/intel" ] |
| } |
| |
| drivers = [ |
| { |
| package_target = "//src/devices/block/drivers/ahci:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/ahci.cm" ] |
| }, |
| { |
| package_target = "//src/devices/block/drivers/nvme:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/nvme.cm" ] |
| }, |
| { |
| package_target = "//src/devices/block/drivers/pci-sdhci:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/pci-sdhci.cm" ] |
| }, |
| { |
| package_target = "//src/devices/board/drivers/x86:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/platform-bus-x86.cm" ] |
| }, |
| { |
| package_target = "//src/devices/bus/drivers/pci:bus-pci-package" |
| package_set = "bootfs" |
| driver_components = [ "meta/bus-pci.cm" ] |
| }, |
| { |
| package_target = "//src/devices/i2c/drivers/intel-i2c:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/intel-i2c.cm" ] |
| }, |
| { |
| package_target = "//src/devices/rtc/drivers/intel-rtc:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/intel-rtc.cm" ] |
| }, |
| { |
| package_target = "//src/devices/tpm/drivers/tpm:tpm-pkg" |
| package_set = "bootfs" |
| driver_components = [ "meta/tpm-driver.cm" ] |
| }, |
| { |
| package_target = "//src/graphics/display/drivers/intel-display:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/intel-display.cm" ] |
| }, |
| { |
| package_target = "//src/media/audio/drivers/codecs/alc5514:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/alc5514.cm" ] |
| }, |
| { |
| package_target = "//src/media/audio/drivers/codecs/alc5663:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/alc5663.cm" ] |
| }, |
| { |
| package_target = "//src/media/audio/drivers/codecs/max98373:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/max98373.cm" ] |
| }, |
| { |
| package_target = "//src/media/audio/drivers/codecs/max98927:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/max98927.cm" ] |
| }, |
| { |
| package_target = "//src/ui/input/drivers/pc-ps2:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/pc-ps2.cm" ] |
| }, |
| { |
| package_target = "//src/devices/acpi/drivers/acpi-battery:acpi-battery" |
| package_set = "base" |
| driver_components = [ "meta/acpi-battery.cm" ] |
| }, |
| { |
| package_target = "//src/devices/acpi/drivers/intel-thermal:intel-thermal" |
| package_set = "base" |
| driver_components = [ "meta/intel-thermal.cm" ] |
| }, |
| { |
| package_target = "//src/graphics/drivers/msd-intel-gen:msd-intel-gen" |
| package_set = "base" |
| driver_components = [ "meta/libmsd_intel.cm" ] |
| }, |
| ] |
| |
| # Additional drivers to support running as a virtualization guest. |
| drivers += [ |
| { |
| package_target = |
| "//src/connectivity/ethernet/drivers/third_party/igc:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/igc.cm" ] |
| }, |
| { |
| package_target = |
| "//src/graphics/display/drivers/framebuffer-amd-display:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/framebuffer-amd-display.cm" ] |
| }, |
| { |
| package_target = |
| "//src/graphics/display/drivers/framebuffer-bochs-display:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/framebuffer-bochs-display.cm" ] |
| }, |
| { |
| package_target = |
| "//src/graphics/display/drivers/framebuffer-intel-display:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/framebuffer-intel-display.cm" ] |
| }, |
| { |
| package_target = "//zircon/third_party/dev/ethernet/e1000:package" |
| package_set = "bootfs" |
| driver_components = [ "meta/e1000.cm" ] |
| }, |
| ] |
| version = build_info_version |
| } |
| |
| board_input_bundle("paver") { |
| bootfs_or_base_packages = [ "//src/bringup/bin/paver:package-uefi" ] |
| version = build_info_version |
| } |
| |
| board_input_bundle_set("x64_bibs") { |
| board_input_bundles = [ |
| ":x64_common", |
| ":main_bundle", |
| "//boards/emulation/virtio", |
| ] |
| version = build_info_version |
| } |