mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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
Notes:
sideshowbarker
2024-07-17 20:22:04 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/fcbb6b79ac Pull-request: https://github.com/SerenityOS/serenity/pull/15794 Reviewed-by: https://github.com/nico ✅
1 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue