mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Kernel: Don't expose processor information for aarch64 in sysfs
We do not (yet) acquire this information for the aarch64 processors.
This commit is contained in:
parent
32f4c8df6c
commit
fcbb6b79ac
1 changed files with 11 additions and 1 deletions
|
@ -5,7 +5,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/JsonObjectSerializer.h>
|
#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/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h>
|
||||||
#include <Kernel/Sections.h>
|
#include <Kernel/Sections.h>
|
||||||
|
|
||||||
|
@ -23,6 +25,7 @@ UNMAP_AFTER_INIT NonnullLockRefPtr<SysFSCPUInformation> SysFSCPUInformation::mus
|
||||||
|
|
||||||
ErrorOr<void> SysFSCPUInformation::try_generate(KBufferBuilder& builder)
|
ErrorOr<void> SysFSCPUInformation::try_generate(KBufferBuilder& builder)
|
||||||
{
|
{
|
||||||
|
#if ARCH(I386) || ARCH(X86_64)
|
||||||
auto array = TRY(JsonArraySerializer<>::try_create(builder));
|
auto array = TRY(JsonArraySerializer<>::try_create(builder));
|
||||||
TRY(Processor::try_for_each(
|
TRY(Processor::try_for_each(
|
||||||
[&](Processor& proc) -> ErrorOr<void> {
|
[&](Processor& proc) -> ErrorOr<void> {
|
||||||
|
@ -78,6 +81,13 @@ ErrorOr<void> SysFSCPUInformation::try_generate(KBufferBuilder& builder)
|
||||||
}));
|
}));
|
||||||
TRY(array.finish());
|
TRY(array.finish());
|
||||||
return {};
|
return {};
|
||||||
|
#elif ARCH(AARCH64)
|
||||||
|
(void)builder;
|
||||||
|
dmesgln("TODO: Implement ProcessorInfo for AArch64!");
|
||||||
|
return Error::from_errno(EINVAL);
|
||||||
|
#else
|
||||||
|
# error Unknown architecture
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue