mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03: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:
parent
1e3a6ba572
commit
26bba8e100
Notes:
sideshowbarker
2024-07-18 22:03:09 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/26bba8e1004 Pull-request: https://github.com/SerenityOS/serenity/pull/5453
@ -1013,6 +1013,11 @@ String Processor::features_string() const
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
String Processor::platform_string() const
|
||||
{
|
||||
return "i386";
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void Processor::early_initialize(u32 cpu)
|
||||
{
|
||||
m_self = this;
|
||||
|
@ -1069,6 +1069,8 @@ public:
|
||||
static Vector<FlatPtr> capture_stack_trace(Thread& thread, size_t max_frames = 0);
|
||||
|
||||
void set_thread_specific(u8* data, size_t len);
|
||||
|
||||
String platform_string() const;
|
||||
};
|
||||
|
||||
class ScopedCritical {
|
||||
|
@ -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() });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user