diff options
Diffstat (limited to 'lib/mlibc/options/internal/aarch64-include')
-rw-r--r-- | lib/mlibc/options/internal/aarch64-include/mlibc/arch-defs.hpp | 12 | ||||
-rw-r--r-- | lib/mlibc/options/internal/aarch64-include/mlibc/thread.hpp | 21 |
2 files changed, 0 insertions, 33 deletions
diff --git a/lib/mlibc/options/internal/aarch64-include/mlibc/arch-defs.hpp b/lib/mlibc/options/internal/aarch64-include/mlibc/arch-defs.hpp deleted file mode 100644 index 0a4789f..0000000 --- a/lib/mlibc/options/internal/aarch64-include/mlibc/arch-defs.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef MLIBC_ARCH_DEFS_HPP -#define MLIBC_ARCH_DEFS_HPP - -#include <stddef.h> - -namespace mlibc { - -inline constexpr size_t page_size = 0x1000; - -} // namespace mlibc - -#endif // MLIBC_ARCH_DEFS_HPP diff --git a/lib/mlibc/options/internal/aarch64-include/mlibc/thread.hpp b/lib/mlibc/options/internal/aarch64-include/mlibc/thread.hpp deleted file mode 100644 index b62d832..0000000 --- a/lib/mlibc/options/internal/aarch64-include/mlibc/thread.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include <stdint.h> -#include <mlibc/tcb.hpp> - -namespace mlibc { - -inline Tcb *get_current_tcb() { - // On AArch64, TPIDR_EL0 points to 0x10 bytes before the first TLS block. - uintptr_t ptr; - asm ("mrs %0, tpidr_el0" : "=r"(ptr)); - return reinterpret_cast<Tcb *>(ptr + 0x10 - sizeof(Tcb)); -} - -inline uintptr_t get_sp() { - uintptr_t sp; - asm ("mov %0, sp" : "=r"(sp)); - return sp; -} - -} // namespace mlibc |