freebsd-dev/sys/riscv
Mitchell Horne 08241f9192 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
2020-11-20 15:21:10 +00:00
..
conf RISC-V LINT kernel config 2020-10-09 14:45:41 +00:00
include riscv: make use of SBI legacy replacement extensions 2020-10-26 19:13:22 +00:00
riscv riscv: always initialize the static kernel environment 2020-11-20 15:21:10 +00:00
sifive riscv/sifive: add FE310 Always-on driver 2020-04-02 00:33:15 +00:00