mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 07:12:52 -04:00
Some RISC-V CPUs contain a "monitor core" with limited functionality (no MMU). These cores appear in some device trees, but we don't run the kernel on them; in early CPU start-up code we skip them, and they have no impact on mp_ncpu. It seems the new trend is to mark these monitor cores with a 'status' property of 'disabled'. However, we still instantiate an ofw_cpu pseudo device for the disabled core. This is generally harmless, but there is an impact when attempting to attach the cpufreq_dt driver. It counts more OFW CPU devices (unit number) than logical CPUs (mp_ncpus), and therefore fails to attach for the last logical CPU. The solution is to check the status property in ofw_cpu_probe(), and fail if the core is marked "disabled". This is subject to the same exception already in ofw_cpu_early_foreach(); that is, if a disabled CPU has an 'enable-method' property, it can be used by the kernel. Reviewed by: andrew, jrtc27 MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48123 |
||
|---|---|---|
| .. | ||
| ofw_bus.h | ||
| ofw_bus_if.m | ||
| ofw_bus_subr.c | ||
| ofw_bus_subr.h | ||
| ofw_console.c | ||
| ofw_cpu.c | ||
| ofw_cpu.h | ||
| ofw_disk.c | ||
| ofw_fdt.c | ||
| ofw_firmware.c | ||
| ofw_graph.c | ||
| ofw_graph.h | ||
| ofw_if.m | ||
| ofw_pci.c | ||
| ofw_pci.h | ||
| ofw_pcib.c | ||
| ofw_standard.c | ||
| ofw_subr.c | ||
| ofw_subr.h | ||
| ofwbus.c | ||
| ofwpci.h | ||
| ofwvar.h | ||
| openfirm.c | ||
| openfirm.h | ||
| openfirmio.c | ||
| openfirmio.h | ||