summaryrefslogtreecommitdiff
path: root/Kernel/Random.h
diff options
context:
space:
mode:
authorJames Mintram <me@jamesrm.com>2022-04-02 23:47:47 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-04-02 19:34:20 -0700
commit783a44b18ed837ac1aa8891acc47cf06d629817f (patch)
tree83ecf37df0c4b1416d44ffa639789d8db699fb0e /Kernel/Random.h
parent0d7eee625f9251a80b74b485a201e7d26144649f (diff)
downloadserenity-783a44b18ed837ac1aa8891acc47cf06d629817f.zip
Kernel: Make PhysicalRegion.cpp compile on aarch64
Diffstat (limited to 'Kernel/Random.h')
-rw-r--r--Kernel/Random.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Random.h b/Kernel/Random.h
index 8aaf0eaaf7..0213b83c9d 100644
--- a/Kernel/Random.h
+++ b/Kernel/Random.h
@@ -10,6 +10,7 @@
#include <AK/Assertions.h>
#include <AK/ByteBuffer.h>
#include <AK/Types.h>
+#include <Kernel/Arch/Processor.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/StdLib.h>
#include <LibCrypto/Cipher/AES.h>
@@ -163,7 +164,7 @@ public:
auto& kernel_rng = KernelRng::the();
SpinlockLocker lock(kernel_rng.get_lock());
// We don't lock this because on the off chance a pool is corrupted, entropy isn't lost.
- Event<T> event = { read_tsc(), m_source, event_data };
+ Event<T> event = { Processor::read_cpu_counter(), m_source, event_data };
kernel_rng.add_random_event(event, m_pool);
m_pool++;
kernel_rng.wake_if_ready();