summaryrefslogtreecommitdiff
path: root/Kernel/Arch/aarch64/Processor.h
diff options
context:
space:
mode:
authorkonrad <konrad@serenityos.org>2023-01-08 00:01:25 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-01-18 22:58:42 +0100
commit97dce5d00114c3630b7e090f739f4912a372ddd8 (patch)
treed3f621984cad812f42686feb4855e2f05ec7ca4d /Kernel/Arch/aarch64/Processor.h
parent9f736d782c051f6d6dbe7cb472d4794a28f74551 (diff)
downloadserenity-97dce5d00114c3630b7e090f739f4912a372ddd8.zip
Kernel: Add Aarch64 CPU feature detection
Diffstat (limited to 'Kernel/Arch/aarch64/Processor.h')
-rw-r--r--Kernel/Arch/aarch64/Processor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h
index cc2f2f60e6..b06b3714db 100644
--- a/Kernel/Arch/aarch64/Processor.h
+++ b/Kernel/Arch/aarch64/Processor.h
@@ -12,6 +12,7 @@
#include <AK/Types.h>
#include <Kernel/Arch/ProcessorSpecificDataID.h>
+#include <Kernel/Arch/aarch64/CPUID.h>
#include <Kernel/Arch/aarch64/Registers.h>
#include <Kernel/VirtualAddress.h>
@@ -136,6 +137,11 @@ public:
return false;
}
+ ALWAYS_INLINE bool has_feature(CPUFeature::Type const& feature) const
+ {
+ return m_features.has_flag(feature);
+ }
+
ALWAYS_INLINE static FlatPtr current_in_irq()
{
return current().m_in_irq;
@@ -277,6 +283,8 @@ public:
private:
Processor(Processor const&) = delete;
+ CPUFeature::Type m_features;
+
Thread* m_current_thread;
Thread* m_idle_thread;
u32 m_in_critical { 0 };