diff options
author | James Mintram <me@jamesrm.com> | 2021-10-14 00:07:37 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-14 01:23:08 +0100 |
commit | 545ce5b5957df8f21de574e15453a711770262f0 (patch) | |
tree | 2c59bbef8056d9678b46202ec7c085f069bc7e29 /Kernel/Arch/aarch64/Processor.h | |
parent | 23676bee1f95ab3d441a44b4601670ab7fcabf0d (diff) | |
download | serenity-545ce5b5957df8f21de574e15453a711770262f0.zip |
Kernel: Add per platform Processor.h headers
The platform independent Processor.h file includes the shared processor
code and includes the specific platform header file.
All references to the Arch/x86/Processor.h file have been replaced with
a reference to Arch/Processor.h.
Diffstat (limited to 'Kernel/Arch/aarch64/Processor.h')
-rw-r--r-- | Kernel/Arch/aarch64/Processor.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h new file mode 100644 index 0000000000..89143a35f8 --- /dev/null +++ b/Kernel/Arch/aarch64/Processor.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2018-2021, James Mintram <me@jamesrm.com> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/Array.h> +#include <AK/Concepts.h> +#include <AK/Function.h> +#include <AK/Types.h> + +namespace Kernel { + +class Thread; + +//FIXME This needs to go behind some sort of platform abstraction +// it is used between Thread and Processor. +struct [[gnu::aligned(16)]] FPUState +{ + u8 buffer[512]; +}; + +class Processor { +public: + void set_specific(ProcessorSpecificDataID /*specific_id*/, void* /*ptr*/) { } + template<typename T> + T* get_specific() { return 0; } + + ALWAYS_INLINE static void pause() { } + ALWAYS_INLINE static void wait_check() { } + + ALWAYS_INLINE static bool is_initialized() + { + return false; + } + + ALWAYS_INLINE static u32 current_id() + { + return 0; + } + + ALWAYS_INLINE static Thread* current_thread() + { + return 0; + } + + ALWAYS_INLINE static FlatPtr current_in_irq() + { + return 0; + } + + ALWAYS_INLINE static void enter_critical() { } + ALWAYS_INLINE static void leave_critical() { } + ALWAYS_INLINE static u32 in_critical() + { + return 0; + } + + ALWAYS_INLINE static Processor& current() { return *((Processor*)0); } + + static void deferred_call_queue(Function<void()> /* callback */) { } +}; + +} |