blob: ad23e634e5e4ba1b9b19f1def5124a8a9aa64eda [file] [log] [blame] [edit]
// Copyright 2020 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
// This file is #include'd multiple times with the DEFINE_OPTION macro defined.
//
// #define DEFINE_OPTION(name, type, member, {init}, docstring) ...
// #include "options.inc"
// #undef DEFINE_OPTION
//
// See boot-options.h for admonitions about what kinds of types can be used, as
// well as test-optons.inc for basic examples.
// RedactedHex parses an arbitrary-length (but bounded like SmallString) string
// of ASCII hex digits, and then overwrites those digits in the original
// command line text in the ZBI's physical memory so the entropy_mixin string
// in the BootOptions struct is the only place that has those bits.
DEFINE_OPTION("kernel.entropy-mixin", RedactedHex, entropy_mixin, {}, R"""(
Provides entropy to be mixed into the kernel's CPRNG. The value must be a
string of lowercase hexadecimal digits.
The original value will be scrubbed from memory as soon as possible and will be
redacted from all diagnostic output.
)""")
DEFINE_OPTION("kernel.serial", uart::all::Driver, serial, {}, R"""(
TODO(53594)
)""")
// x86-specific options are included here for all the kernel places.
// In the generator program, they're included separately.
#if defined(__x86_64__) && !BOOT_OPTIONS_GENERATOR
#include "x86.inc"
#endif
#if BOOT_OPTIONS_TESTONLY_OPTIONS
#include "test-options.inc"
#endif