1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

Kernel: Populate ELF::AuxilaryValue::Platform from Processor object.

Move this to the processor object so it can easily be implemented
when Serenity is compiled for a different architecture.
This commit is contained in:
Brian Gianforcaro 2021-02-21 07:58:57 -08:00 committed by Andreas Kling
parent 1e3a6ba572
commit 26bba8e100
3 changed files with 8 additions and 2 deletions

View file

@ -650,8 +650,7 @@ static Vector<ELF::AuxiliaryValue> generate_auxiliary_vector(FlatPtr load_base,
auxv.append({ ELF::AuxiliaryValue::Gid, (long)gid });
auxv.append({ ELF::AuxiliaryValue::EGid, (long)egid });
// FIXME: Don't hard code this? We might support other platforms later.. (e.g. x86_64)
auxv.append({ ELF::AuxiliaryValue::Platform, "i386" });
auxv.append({ ELF::AuxiliaryValue::Platform, Processor::current().platform_string() });
// FIXME: This is platform specific
auxv.append({ ELF::AuxiliaryValue::HwCap, (long)CPUID(1).edx() });