|
@@ -21,6 +21,11 @@ class ProcessorInfo {
|
|
public:
|
|
public:
|
|
ProcessorInfo(Processor const& processor);
|
|
ProcessorInfo(Processor const& processor);
|
|
|
|
|
|
|
|
+ struct Cache {
|
|
|
|
+ u64 size;
|
|
|
|
+ u64 line_size;
|
|
|
|
+ };
|
|
|
|
+
|
|
StringView vendor_id_string() const { return m_vendor_id_string->view(); }
|
|
StringView vendor_id_string() const { return m_vendor_id_string->view(); }
|
|
StringView hypervisor_vendor_id_string() const { return m_hypervisor_vendor_id_string->view(); }
|
|
StringView hypervisor_vendor_id_string() const { return m_hypervisor_vendor_id_string->view(); }
|
|
StringView brand_string() const { return m_brand_string->view(); }
|
|
StringView brand_string() const { return m_brand_string->view(); }
|
|
@@ -30,6 +35,10 @@ public:
|
|
u32 stepping() const { return m_stepping; }
|
|
u32 stepping() const { return m_stepping; }
|
|
u32 type() const { return m_type; }
|
|
u32 type() const { return m_type; }
|
|
u32 apic_id() const { return m_apic_id; }
|
|
u32 apic_id() const { return m_apic_id; }
|
|
|
|
+ Optional<Cache> const& l1_data_cache() const { return m_l1_data_cache; }
|
|
|
|
+ Optional<Cache> const& l1_instruction_cache() const { return m_l1_instruction_cache; }
|
|
|
|
+ Optional<Cache> const& l2_cache() const { return m_l2_cache; }
|
|
|
|
+ Optional<Cache> const& l3_cache() const { return m_l3_cache; }
|
|
|
|
|
|
void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
|
|
void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
|
|
|
|
|
|
@@ -39,6 +48,8 @@ private:
|
|
static NonnullOwnPtr<KString> build_brand_string();
|
|
static NonnullOwnPtr<KString> build_brand_string();
|
|
static NonnullOwnPtr<KString> build_features_string(Processor const&);
|
|
static NonnullOwnPtr<KString> build_features_string(Processor const&);
|
|
|
|
|
|
|
|
+ void populate_cache_sizes();
|
|
|
|
+
|
|
NonnullOwnPtr<KString> m_vendor_id_string;
|
|
NonnullOwnPtr<KString> m_vendor_id_string;
|
|
NonnullOwnPtr<KString> m_hypervisor_vendor_id_string;
|
|
NonnullOwnPtr<KString> m_hypervisor_vendor_id_string;
|
|
NonnullOwnPtr<KString> m_brand_string;
|
|
NonnullOwnPtr<KString> m_brand_string;
|
|
@@ -48,6 +59,11 @@ private:
|
|
u32 m_stepping { 0 };
|
|
u32 m_stepping { 0 };
|
|
u32 m_type { 0 };
|
|
u32 m_type { 0 };
|
|
u32 m_apic_id { 0 };
|
|
u32 m_apic_id { 0 };
|
|
|
|
+
|
|
|
|
+ Optional<Cache> m_l1_data_cache;
|
|
|
|
+ Optional<Cache> m_l1_instruction_cache;
|
|
|
|
+ Optional<Cache> m_l2_cache;
|
|
|
|
+ Optional<Cache> m_l3_cache;
|
|
};
|
|
};
|
|
|
|
|
|
}
|
|
}
|