From e90b72ec3082588b296956730bd2930cf8d5d671 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 10 Jul 2026 11:31:46 +0800 Subject: refactor: promote new architecture to repository root Archive the deprecated implementation under lume-legacy, make the new kernel the default root-level build, and update repository entry points without changing kernel behavior. --- arch/riscv/lib/random.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 arch/riscv/lib/random.cc (limited to 'arch/riscv/lib') diff --git a/arch/riscv/lib/random.cc b/arch/riscv/lib/random.cc new file mode 100644 index 0000000..afc0078 --- /dev/null +++ b/arch/riscv/lib/random.cc @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (C) 2026 Richard Qin */ + +#include +#include + +namespace arch { + +bool get_hw_random(uint64& value) +{ + /* + * Real implementation would check for Zkr extension and execute: + * csrr x, seed + * + * Since QEMU virt doesn't guarantee Zkr, we return false to + * force the MI layer to use the timer fallback. + */ + return false; +} + +} // namespace arch -- cgit v1.2.3