blob: 473b33e6ad286b68d6876ba8887386f0308ed281 [file] [log] [blame]
# 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("$zx/public/gn/config/levels.gni")
declare_args() {
# Maximum number of CPUs the kernel will run on (others will be ignored).
smp_max_cpus = 32
if (current_cpu == "arm64") {
smp_max_cpus = 16
}
# Virtual address where the kernel is mapped statically. This is the
# base of addresses that appear in the kernel symbol table. At runtime
# KASLR relocation processing adjusts addresses in memory from this base
# to the actual runtime virtual address.
if (current_cpu == "arm64") {
kernel_base = "0xffffffff00000000"
} else if (current_cpu == "x64") {
kernel_base = "0xffffffff80100000" # Has KERNEL_LOAD_OFFSET baked into it.
}
# Virtual address where the kernel address space begins.
# Below this is the user address space.
if (current_cpu == "arm64") {
kernel_aspace_base = "0xffff000000000000"
} else if (current_cpu == "x64") {
kernel_aspace_base = "0xffffff8000000000UL" # -512GB
}
# Enable kernel lock dependency tracking.
enable_lock_dep = false
# Select an available scheduler.
# Valid values are: "legacy", "fair", "unified"
select_scheduler = "fair"
# Enable detailed scheduler traces.
detailed_scheduler_tracing = false
# Enable userspace PCI and disable kernel PCI.
enable_user_pci = false
# Extra macro definitions for kernel code, e.g. "DISABLE_KASLR",
# "ENABLE_KERNEL_LL_DEBUG".
kernel_extra_defines = []
# Enables various kernel debugging and diagnostic features. Valid
# values are between 0-3. The higher the value, the more that are
# enabled. A value of 0 disables all of them.
#
# TODO(41790): This value is derived from assert_level. Decouple
# the two and set kernel_debug_level independently.
kernel_debug_level = assert_level
}
declare_args() {
# Enable kernel lock dependency tracking tests. By default this is
# enabled when tracking is enabled, but can also be eanbled independently
# to assess whether the tests build and *fail correctly* when lockdep is
# disabled.
enable_lock_dep_tests = enable_lock_dep
}