1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

Kernel: Add Aarch64 CPU feature detection

This commit is contained in:
konrad 2023-01-08 00:01:25 +01:00 committed by Jelle Raaijmakers
parent 9f736d782c
commit 97dce5d001
4 changed files with 53 additions and 16 deletions

View file

@ -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 };