mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
Kernel: Convert ProcessorInfo to KString
This commit is contained in:
parent
b4ce1e2e62
commit
809870d519
2 changed files with 67 additions and 62 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/KString.h>
|
||||
|
||||
|
@ -18,20 +17,23 @@ namespace Kernel {
|
|||
class Processor;
|
||||
|
||||
class ProcessorInfo {
|
||||
String m_cpuid;
|
||||
String m_brand;
|
||||
NonnullOwnPtr<KString> m_cpuid;
|
||||
NonnullOwnPtr<KString> m_brand;
|
||||
NonnullOwnPtr<KString> m_features;
|
||||
u32 m_display_model;
|
||||
u32 m_display_family;
|
||||
u32 m_stepping;
|
||||
u32 m_type;
|
||||
u32 m_apic_id;
|
||||
u32 m_display_model { 0 };
|
||||
u32 m_display_family { 0 };
|
||||
u32 m_stepping { 0 };
|
||||
u32 m_type { 0 };
|
||||
u32 m_apic_id { 0 };
|
||||
|
||||
public:
|
||||
ProcessorInfo(Processor const& processor);
|
||||
|
||||
const String& cpuid() const { return m_cpuid; }
|
||||
const String& brand() const { return m_brand; }
|
||||
static NonnullOwnPtr<KString> query_processor_cpuid();
|
||||
static NonnullOwnPtr<KString> query_processor_brand();
|
||||
|
||||
StringView cpuid() const { return m_cpuid->view(); }
|
||||
StringView brand() const { return m_brand->view(); }
|
||||
StringView features() const { return m_features->view(); }
|
||||
u32 display_model() const { return m_display_model; }
|
||||
u32 display_family() const { return m_display_family; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue