Index: sys/kern/kern_mib.c =================================================================== --- sys/kern/kern_mib.c +++ sys/kern/kern_mib.c @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -262,6 +263,11 @@ proc_machine_arch(struct proc *p) { +#ifdef __riscv + if ((p->p_elf_flags & EF_RISCV_FLOAT_ABI_MASK) == + EF_RISCV_FLOAT_ABI_SOFT) + return (MACHINE_ARCH "sf"); +#endif #ifdef COMPAT_FREEBSD32 if (SV_PROC_FLAG(p, SV_ILP32)) return (MACHINE_ARCH32); Index: sys/riscv/include/param.h =================================================================== --- sys/riscv/include/param.h +++ sys/riscv/include/param.h @@ -46,18 +46,10 @@ #define MACHINE "riscv" #endif #ifndef MACHINE_ARCH -/* - * Check to see if we're building with hardware floating instructions - * allowed. We check this instead of hard vs soft float ABI because we build the - * kernel with soft float ABI to avoid hard float instruction generation. If - * we ever allow a 'soft ABI but with hard floats' userland, then we'll need - * to rethink this. - */ -#ifdef __riscv_flen #define MACHINE_ARCH "riscv64" -#else -#define MACHINE_ARCH "riscv64sf" #endif +#ifdef _KERNEL +#define MACHINE_ARCHES "riscv64 riscv64sf" #endif #ifdef SMP