struct BootOptions

Defined at line 31 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

Public Members

bool aslr_disabled
uint8_t aslr_entropy_bits
bool cprng_reseed_require_hw_rng
bool cprng_reseed_require_jitterentropy
bool cprng_seed_require_hw_rng
bool cprng_disable_jitterentropy
bool cprng_disable_hw_rng
bool cprng_seed_require_jitterentropy
bool cprng_seed_require_cmdline
RedactedHex entropy_mixin
uint32_t jitterentropy_bs
uint32_t jitterentropy_bc
uint32_t jitterentropy_ml
uint32_t jitterentropy_ll
bool jitterentropy_raw
uint32_t jitterentropy_entropy_per_1000_bytes
uint64_t lockup_detector_critical_section_threshold_ms
uint64_t lockup_detector_critical_section_fatal_threshold_ms
uint64_t lockup_detector_heartbeat_period_ms
uint64_t lockup_detector_heartbeat_age_threshold_ms
uint64_t lockup_detector_age_fatal_threshold_ms
uint64_t lockup_detector_diagnostic_query_timeout_ms
OomBehavior oom_behavior
uint32_t oom_timeout_ms
bool mexec_force_high_ramdisk
bool mexec_pci_shutdown
bool oom_enabled
uint64_t oom_out_of_memory_threshold_mb
uint64_t oom_critical_threshold_mb
uint64_t oom_warning_threshold_mb
uint64_t oom_debounce_mb
bool oom_evict_at_warning
bool oom_evict_continuous
uint64_t oom_eviction_delay_ms
bool oom_evict_with_min_target
uint64_t oom_eviction_delta_at_oom_mb
uint64_t oom_hysteresis_seconds
uint64_t oom_imminent_oom_delta_mb
bool oom_trigger_on_alloc_failure
array phys_next
bool phys_verbose
uint32_t phys_backtrace_max
uint32_t phys_print_stack_max
bool ppb_borrow_on_mru
bool ppb_loan
bool ppb_replace_on_unloan
bool render_dlog_to_crashlog
Config serial
bool always_use_next_vdso
bool vdso_ticks_get_force_syscall
bool vdso_clock_get_force_syscall
uint64_t userpager_overtime_wait_seconds
uint64_t userpager_overtime_timeout_seconds
uint32_t userpager_overtime_printout_limit
bool enable_virtual_heap
uint64_t heap_max_size_mb
uint64_t heap_alloc_fill_threshold
uint64_t bufferchain_reserve_pages
bool bypass_debuglog
bool debug_uart_poll
bool enable_debugging_syscalls
SerialDebugSyscalls enable_serial_syscalls
EntropyTestSource entropy_test_src
uint64_t entropy_test_len
bool force_watchdog_disabled
bool halt_on_panic
uint32_t ktrace_bufsize
uint32_t ktrace_grpmask
bool memory_limit_dbg
uint64_t memory_limit_mb
bool page_scanner_enable_eviction
PageTableEvictionPolicy page_scanner_page_table_eviction_policy
uint32_t page_scanner_page_table_eviction_period_ms
uint32_t page_scanner_min_aging_interval_ms
uint32_t page_scanner_max_aging_interval_ms
uint32_t page_scanner_accessed_scan_interval_ms
uint32_t page_scanner_active_ratio_multiplier
bool page_scanner_start_at_boot
uint64_t page_scanner_zero_page_scans_per_second
ScannerLruAction lru_action
bool random_debug_compress
CompressionStrategy compression_strategy
CompressionStorageStrategy compression_storage_strategy
uint32_t compression_threshold
uint32_t compression_lz4_acceleration
bool compression_at_memory_pressure
bool compression_reclaim_anonymous
bool compression_reclaim_zero_forks
CheckFailAction pmm_checker_action
CheckerEnable pmm_checker_enabled
AutoOr pmm_checker_fill_size
bool pmm_alloc_random_should_wait
uint64_t stack_canary_percent_free
uint64_t port_observer_reserve_pages
uint64_t port_packet_reserve_pages
RootJobBehavior root_job_behavior
array root_job_notice
bool shell
array shell_script
bool smp_ht_enabled
optional test_ram_reserve
uint64_t max_port_observers
array select
array userboot
bool scheduler_prefer_little_cpus
bool enable_new_wakeup_accounting
CheckFailAction ubsan_action
bool debug_boot_spin
bool experimental_allow_debug_uart_suspend
bool x86_disable_spec_mitigations
bool x86_hwp
IntelHwpPolicy x86_hwp_policy
bool x86_md_clear_on_user_return
bool x86_spec_store_bypass_disable
bool x86_turbo
bool x86_enable_pcid
uint32_t x86_smp_max_cpus
WallclockType x86_wallclock
uint32_t test_uint32
uint64_t test_uint64
bool test_bool
array test_smallstring
TestEnum test_enum
TestStruct test_struct
RedactedHex test_redacted_hex
AutoOr test_auto_or_uint64
uint32_t smp_max_cpus

Public Methods

const BootOptions * Get ()

This returns the only instance of BootOptions that ever exists outside

test code. It's implemented separately in phys and kernel proper: phys

creates and fills it as well as using it, then hands it off to the kernel,

which only reads it. It returns nullptr in very early phys initialization

code. Once the options are parsed, it always returns the same object.

Defined at line 32 of file ../../zircon/kernel/phys/boot-options.cc

std::optional<int64_t> ParseInt (std::string_view , std::string_view * rest)

Parse a string to an integer in C syntax.

Defined at line 38 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

std::optional<int64_t> ParseInt (std::string_view , std::string_view * rest)

Parse a string to an integer in C syntax.

Defined at line 38 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

char SanitizeChar (char c)

General string values get this done to each character.

Defined at line 40 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

size_t SanitizeString (char * out, size_t out_size, std::string_view in)

Return the length in the out buffer filled with the sanitized contents of

the input string.

Defined at line 60 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

size_t SanitizeString (char * out, size_t out_size, std::string_view in)

Return the length in the out buffer filled with the sanitized contents of

the input string.

Defined at line 60 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

size_t SanitizeString (char * out, size_t out_size, std::string_view in)

Return the length in the out buffer filled with the sanitized contents of

the input string.

Defined at line 60 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

size_t SanitizeString (char * out, size_t out_size, std::string_view in)

Return the length in the out buffer filled with the sanitized contents of

the input string.

Defined at line 60 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

void Redact (std::string_view string)

This modifies the string in place even though it's const.

Defined at line 66 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

void Redact (std::string_view string)

This modifies the string in place even though it's const.

Defined at line 66 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

template <typename T>
void Print (std::string_view key, const T & value, FILE * out)

Write out "key=value".

Defined at line 94 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

template <typename T>
void Print (std::string_view key, const T & value, FILE * out)

Write out "key=value".

Defined at line 94 of file ../../zircon/kernel/lib/boot-options/include/lib/boot-options/boot-options.h

void SetMany (std::string_view cmdline, FILE * complain)

Split the command line into words and parse each one as an option. This

can be called multiple times with separate command line fragments. Each

word is processed in order and sets its corresponding member in this

struct, replacing any earlier option argument or the initial default.

If complain is set, print messages there if a key is not recognized.

Defined at line 212 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void SetMany (std::string_view cmdline, FILE * complain)

Split the command line into words and parse each one as an option. This

can be called multiple times with separate command line fragments. Each

word is processed in order and sets its corresponding member in this

struct, replacing any earlier option argument or the initial default.

If complain is set, print messages there if a key is not recognized.

Defined at line 212 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

int Show (std::string_view key, bool defaults, FILE * out)

Display the key, its value, and its default.

Defined at line 243 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

int Show (std::string_view key, bool defaults, FILE * out)

Display the key, its value, and its default.

Defined at line 243 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void Show (bool defaults, FILE * out)

Display all keys, values, and defaults.

Defined at line 258 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void Show (bool defaults, FILE * out)

Display all keys, values, and defaults.

Defined at line 258 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

bool Parse (std::string_view , bool BootOptions::* member)

Overloads for various types.

Defined at line 298 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

bool Parse (std::string_view , bool BootOptions::* member)

Overloads for various types.

Defined at line 298 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const bool & value, FILE * out)

Defined at line 304 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const bool & value, FILE * out)

Defined at line 304 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint64_t & value, FILE * out)

Defined at line 312 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint64_t & value, FILE * out)

Defined at line 312 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint64_t & value, FILE * out)

Defined at line 312 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint32_t & value, FILE * out)

Defined at line 318 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint32_t & value, FILE * out)

Defined at line 318 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint8_t & value, FILE * out)

Defined at line 324 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uint8_t & value, FILE * out)

Defined at line 324 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SmallString & value, FILE * out)

Defined at line 335 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SmallString & value, FILE * out)

Defined at line 335 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SmallString & value, FILE * out)

Defined at line 335 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SmallString & value, FILE * out)

Defined at line 335 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const RedactedHex & value, FILE * out)

Defined at line 349 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const RedactedHex & value, FILE * out)

Defined at line 349 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const AutoOr<uint64_t> & value, FILE * out)

Defined at line 368 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const AutoOr<uint64_t> & value, FILE * out)

Defined at line 368 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const AutoOr<uint64_t> & value, FILE * out)

Defined at line 368 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const OomBehavior & value, FILE * out)

Defined at line 396 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const OomBehavior & value, FILE * out)

Defined at line 396 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const EntropyTestSource & value, FILE * out)

Defined at line 404 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const EntropyTestSource & value, FILE * out)

Defined at line 404 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SerialDebugSyscalls & value, FILE * out)

Defined at line 420 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const SerialDebugSyscalls & value, FILE * out)

Defined at line 420 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const PageTableEvictionPolicy & value, FILE * out)

Defined at line 412 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const PageTableEvictionPolicy & value, FILE * out)

Defined at line 412 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const RootJobBehavior & value, FILE * out)

Defined at line 428 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const RootJobBehavior & value, FILE * out)

Defined at line 428 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const WallclockType & value, FILE * out)

Defined at line 436 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const WallclockType & value, FILE * out)

Defined at line 436 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const ScannerLruAction & value, FILE * out)

Defined at line 444 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const ScannerLruAction & value, FILE * out)

Defined at line 444 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CompressionStrategy & value, FILE * out)

Defined at line 452 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CompressionStrategy & value, FILE * out)

Defined at line 452 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CompressionStorageStrategy & value, FILE * out)

Defined at line 476 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CompressionStorageStrategy & value, FILE * out)

Defined at line 476 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CheckFailAction & value, FILE * out)

Defined at line 460 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CheckFailAction & value, FILE * out)

Defined at line 460 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CheckerEnable & value, FILE * out)

Defined at line 468 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const CheckerEnable & value, FILE * out)

Defined at line 468 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const std::optional<RamReservation> & value, FILE * out)

Defined at line 503 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const std::optional<RamReservation> & value, FILE * out)

Defined at line 503 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const TestEnum & value, FILE * out)

Defined at line 518 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const TestEnum & value, FILE * out)

Defined at line 518 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const TestStruct & value, FILE * out)

Defined at line 533 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const TestStruct & value, FILE * out)

Defined at line 533 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const Arm64PhysPsciReset & value, FILE * out)

Defined at line 543 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const Arm64AlternateVbar & value, FILE * out)

Defined at line 551 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const IntelHwpPolicy & value, FILE * out)

Defined at line 563 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const IntelHwpPolicy & value, FILE * out)

Defined at line 563 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uart::all::Config<> & value, FILE * out)

Defined at line 388 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uart::all::Config<> & value, FILE * out)

Defined at line 388 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uart::all::Config<> & value, FILE * out)

Defined at line 388 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uart::all::Config<> & value, FILE * out)

Defined at line 388 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

void PrintValue (const uart::all::Config<> & value, FILE * out)

Defined at line 388 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

WordResult ParseWord (std::string_view )

Returns true if the command-line word matches a known "key=value" or "key"

string. If the value was parsable for the type of the key's member, then

the member was updated, else it wasn't touched (but still returns true).

Defined at line 182 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

WordResult ParseWord (std::string_view )

Returns true if the command-line word matches a known "key=value" or "key"

string. If the value was parsable for the type of the key's member, then

the member was updated, else it wasn't touched (but still returns true).

Defined at line 182 of file ../../zircon/kernel/lib/boot-options/boot-options.cc

Records