From de2451e55354990a14e99782e2146a3048a22714 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 12 Nov 2022 12:56:13 +0100 Subject: [PATCH] Kernel: Change up the logging in the kernel's PRNG --- kernel/src/rand/Init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/rand/Init.cpp b/kernel/src/rand/Init.cpp index c984281c..79f9569b 100644 --- a/kernel/src/rand/Init.cpp +++ b/kernel/src/rand/Init.cpp @@ -38,11 +38,11 @@ static uint64_t rdrand() void Mersenne::init() { - kdbgln("Preparing random number generator"); - has_rdrand = CPU::has_feature(CPU::Features::RDRAND); has_rdseed = asm_test_rdseed(); + if (!has_rdrand && !has_rdseed) kwarnln("CPU does not support either RDRAND or RDSEED"); + state ^= (0x45fe1024UL + __moon_version_major()) * (__moon_version_minor() ^ 200UL); state ^= 0xe0e4f5332ea75b;