HomeFreeBSD

riscv: always initialize the static kernel environment

Description

riscv: always initialize the static kernel environment

Ensure we initialize the static environment when not booting via
loader(8), and provide a static buffer if this is the case. This fixes
two issues.

First, performing the initialization ensures that kenv variables set in
the kernel's config file are honored. Previously, any new or overridden
values were ignored.

Second, providing the static buffer allows variables to be set in the
device tree's bootargs property of the chosen node. This can be set by
u-boot or by QEMU's '-append' flag. Attempting to this prior to this
change resulted in an early panic, since the static environment had no
buffer backing it.

Submitted by: syrinx (earlier version)
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D25034

Details

Provenance
mhorneAuthored on
Reviewer
kp
Differential Revision
D25034: riscv: honor the environment set via the kernel config file
Parents
rS367895: msdosfs: suspend around unmount or remount rw->ro.
Branches
Unknown
Tags
Unknown