feat: make kernel architecture-agnostic; primitive work on arm port

This commit is contained in:
daniel committed 2026-10-24 21:25:18 +02:00
1 parent dab7d5427b
commit 1bae77ec84
164 files changed
+3664 -1641

No files matched your search

+3 -4
View File
@@ -5,6 +5,7 @@
*/
#include "Gpt.hpp"
#include <Arch/Cpu.hpp>
#include "BlockDevice.hpp"
#include <Terminal/Terminal.hpp>
#include <CppLib/Stream.hpp>
@@ -565,13 +566,11 @@ namespace Drivers::Storage::Gpt {
}
// -------------------------------------------------------------------------
// Simple GUID generation from RDTSC + mixing
// Simple GUID generation from the CPU timestamp counter + mixing
// -------------------------------------------------------------------------
static uint64_t SimpleRand64() {
uint32_t lo, hi;
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
uint64_t val = ((uint64_t)hi << 32) | lo;
uint64_t val = Arch::ReadTimestamp();
// xorshift64
val ^= val << 13;
val ^= val >> 7;