2020-06-27 17:06:33 -06:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-06-27 17:06:33 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/String.h>
|
|
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
|
|
class Processor;
|
|
|
|
|
|
2020-09-18 09:49:51 +02:00
|
|
|
class ProcessorInfo {
|
2020-06-27 17:06:33 -06:00
|
|
|
Processor& m_processor;
|
|
|
|
|
String m_cpuid;
|
|
|
|
|
String m_brandstr;
|
2020-07-03 10:23:09 -06:00
|
|
|
String m_features;
|
2020-06-27 17:06:33 -06:00
|
|
|
u32 m_display_model;
|
|
|
|
|
u32 m_display_family;
|
|
|
|
|
u32 m_stepping;
|
|
|
|
|
u32 m_type;
|
2020-07-06 07:27:22 -06:00
|
|
|
u32 m_apic_id;
|
2020-06-27 17:06:33 -06:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ProcessorInfo(Processor& processor);
|
2020-09-18 09:49:51 +02:00
|
|
|
|
2020-06-27 17:06:33 -06:00
|
|
|
const String& cpuid() const { return m_cpuid; }
|
|
|
|
|
const String& brandstr() const { return m_brandstr; }
|
2020-07-03 10:23:09 -06:00
|
|
|
const String& features() const { return m_features; }
|
2020-06-27 17:06:33 -06:00
|
|
|
u32 display_model() const { return m_display_model; }
|
|
|
|
|
u32 display_family() const { return m_display_family; }
|
|
|
|
|
u32 stepping() const { return m_stepping; }
|
|
|
|
|
u32 type() const { return m_type; }
|
2020-07-06 07:27:22 -06:00
|
|
|
u32 apic_id() const { return m_apic_id; }
|
|
|
|
|
|
|
|
|
|
void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
|
2020-06-27 17:06:33 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|