1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

Kernel: Expose cache size for Intel CPUs

The patch also prevents any try if the CPU's vendor isn't known and
improves the const-correctness of the AMD version.
This commit is contained in:
Lucas CHOLLET 2022-05-29 23:58:32 +02:00 committed by Linus Groh
parent be36557198
commit a506ec08d8
2 changed files with 38 additions and 7 deletions

View file

@ -42,13 +42,17 @@ public:
void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
static constexpr StringView s_amd_vendor_id = "AuthenticAMD";
static constexpr StringView s_intel_vendor_id = "GenuineIntel";
private:
static NonnullOwnPtr<KString> build_vendor_id_string();
static NonnullOwnPtr<KString> build_hypervisor_vendor_id_string(Processor const&);
static NonnullOwnPtr<KString> build_brand_string();
static NonnullOwnPtr<KString> build_features_string(Processor const&);
void populate_cache_sizes();
void populate_cache_sizes_amd();
void populate_cache_sizes_intel();
NonnullOwnPtr<KString> m_vendor_id_string;
NonnullOwnPtr<KString> m_hypervisor_vendor_id_string;