feat: make kernel architecture-agnostic; primitive work on arm port
This commit is contained in:
1 parent
dab7d5427b
commit
1bae77ec84
164 files changed
+3664
-1641
No files matched your search
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Arch.hpp
|
||||
* Target architecture selection
|
||||
* Copyright (c) 2026 Daniel Hammer
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Everything outside src/Arch/ is architecture-neutral and talks to the CPU
|
||||
// only through the interfaces in src/Arch/*.hpp. Each supported architecture
|
||||
// implements them under src/Arch/<arch>/; the build compiles only the
|
||||
// directory matching ARCH. See docs/porting.md.
|
||||
//
|
||||
// Interface headers that need inline (per-arch) definitions include the
|
||||
// matching implementation header at their end, selected below.
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define MONTAUK_ARCH_X86_64 1
|
||||
#define MONTAUK_ARCH_NAME "x86_64"
|
||||
#elif defined(__aarch64__)
|
||||
#define MONTAUK_ARCH_AARCH64 1
|
||||
#define MONTAUK_ARCH_NAME "aarch64"
|
||||
#else
|
||||
#error "MontaukOS: unsupported target architecture (add one under src/Arch/)"
|
||||
#endif
|
||||
Reference in new issue
Block a user