Page MenuHomeFreeBSD

riscv: Include syscon_power device driver in GENERIC kernel config
ClosedPublic

Authored by jrtc27 on Jul 19 2020, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 9:18 AM
Unknown Object (File)
Dec 23 2023, 12:57 AM
Unknown Object (File)
Aug 10 2023, 5:42 PM
Unknown Object (File)
Aug 10 2023, 5:41 PM
Unknown Object (File)
Aug 8 2023, 8:33 AM
Unknown Object (File)
Aug 5 2023, 10:37 AM
Unknown Object (File)
Apr 26 2023, 3:53 AM
Unknown Object (File)
Apr 25 2023, 2:52 AM
Subscribers

Details

Summary

QEMU's RISC-V virt machine provides syscon-power and syscon-reset
devices as the means by which to shutdown and reboot. We also need to
ensure that we have attached the syscon_generic device before attaching
any syscon_power devices, and so we introduce a new riscv_syscon device
akin to aw_syscon added in r327936. Currently the SiFive test finisher
is used as the specific implementation of such a syscon device.

Test Plan

Running reboot on QEMU causes the system to reboot, rather than falling back
on cpu_reset which on RISC-V just powers off via SBI.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrtc27 created this revision.
This revision is now accepted and ready to land.Jul 20 2020, 8:59 PM
sys/riscv/riscv/riscv_syscon.c
4 ↗(On Diff #74654)

this copyright is not needed

sys/riscv/riscv/riscv_syscon.c
4 ↗(On Diff #74654)

But aw_syscon is copyright kevans@, which is where most of this code comes from? As in, I copied that file, changed aw to riscv everywhere, updated compat_data, the device description and comments. But it's basically the same code.

br added inline comments.
sys/riscv/riscv/riscv_syscon.c
4 ↗(On Diff #74654)

Since you copied then yes, otherwise it looks like a basic FDT driver template