diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2022-10-25 18:50:45 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2022-10-26 20:01:45 +0200 |
commit | fcbb6b79ac50fa2a69ce060282094c15ee3d3305 (patch) | |
tree | ae06d773875da572e896474689bea9b6752203d3 /Kernel/FileSystem/SysFS | |
parent | 32f4c8df6ca097288b8d49e253b52b01e5cdbb26 (diff) | |
download | serenity-fcbb6b79ac50fa2a69ce060282094c15ee3d3305.zip |
Kernel: Don't expose processor information for aarch64 in sysfs
We do not (yet) acquire this information for the aarch64 processors.
Diffstat (limited to 'Kernel/FileSystem/SysFS')
-rw-r--r-- | Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.cpp index 096e400794..4d5ff93ed1 100644 --- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.cpp +++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.cpp @@ -5,7 +5,9 @@ */ #include <AK/JsonObjectSerializer.h> -#include <Kernel/Arch/x86/ProcessorInfo.h> +#if ARCH(I386) || ARCH(X86_64) +# include <Kernel/Arch/x86/ProcessorInfo.h> +#endif #include <Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h> #include <Kernel/Sections.h> @@ -23,6 +25,7 @@ UNMAP_AFTER_INIT NonnullLockRefPtr<SysFSCPUInformation> SysFSCPUInformation::mus ErrorOr<void> SysFSCPUInformation::try_generate(KBufferBuilder& builder) { +#if ARCH(I386) || ARCH(X86_64) auto array = TRY(JsonArraySerializer<>::try_create(builder)); TRY(Processor::try_for_each( [&](Processor& proc) -> ErrorOr<void> { @@ -78,6 +81,13 @@ ErrorOr<void> SysFSCPUInformation::try_generate(KBufferBuilder& builder) })); TRY(array.finish()); return {}; +#elif ARCH(AARCH64) + (void)builder; + dmesgln("TODO: Implement ProcessorInfo for AArch64!"); + return Error::from_errno(EINVAL); +#else +# error Unknown architecture +#endif } } |