Files
MontaukOS/kernel/src/Arch/Arch.hpp
T

26 lines
801 B
C++

/*
* 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