CVSROOT: /cvs Module name: src Changes by: v...@cvs.openbsd.org 2022/01/18 00:44:37
Modified files: sys/arch/riscv64/dev: plic.c Log message: plic: Fix cpuid handling Make `cpu' signed so that the possible return value -1 from plic_get_cpuid() gets handled correctly in the (cpu < 0) condition. This prevents plic_attach() from updating sc_contexts[] out of bounds. When plic_get_cpuid() returns -1, ignore the entry and continue processing. The error is not fatal. It is normal that secondary CPUs are not found when running a non-MULTIPROCESSOR kernel on a multiprocessor machine. OK kettenis@