From cbac61d18433d121a9bc13c92dcfeae9561c6b9e Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 18 Sep 2022 15:23:08 +0200 Subject: [PATCH] Rename _test_rdseed to asm_test_rdseed --- kernel/src/rand/Init.asm | 4 ++-- kernel/src/rand/Init.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/src/rand/Init.asm b/kernel/src/rand/Init.asm index 54449791..d7ad53b2 100644 --- a/kernel/src/rand/Init.asm +++ b/kernel/src/rand/Init.asm @@ -1,6 +1,6 @@ -global _test_rdseed +global asm_test_rdseed -_test_rdseed: +asm_test_rdseed: mov eax, 7 mov ecx, 0 cpuid diff --git a/kernel/src/rand/Init.cpp b/kernel/src/rand/Init.cpp index d91d7d91..b322db51 100644 --- a/kernel/src/rand/Init.cpp +++ b/kernel/src/rand/Init.cpp @@ -9,10 +9,11 @@ static uint64_t state = 0xf5026f5ae96319e9; -extern "C" int _test_rdseed(); static bool has_rdrand = false; static bool has_rdseed = false; +extern "C" int asm_test_rdseed(); + static uint64_t rdtsc() { uint64_t result1; @@ -40,7 +41,7 @@ void Mersenne::init() kdbgln("Preparing random number generator"); has_rdrand = CPU::has_feature(CPU::Features::RDRAND); - has_rdseed = _test_rdseed(); + has_rdseed = asm_test_rdseed(); state ^= (0x45fe1024UL + MOON_MAJOR) * (MOON_MINOR ^ 200UL);