ProcessorInfo.h 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/String.h>
  8. #include <AK/Types.h>
  9. namespace Kernel {
  10. class Processor;
  11. class ProcessorInfo {
  12. Processor& m_processor;
  13. String m_cpuid;
  14. String m_brandstr;
  15. String m_features;
  16. u32 m_display_model;
  17. u32 m_display_family;
  18. u32 m_stepping;
  19. u32 m_type;
  20. u32 m_apic_id;
  21. public:
  22. ProcessorInfo(Processor& processor);
  23. const String& cpuid() const { return m_cpuid; }
  24. const String& brandstr() const { return m_brandstr; }
  25. const String& features() const { return m_features; }
  26. u32 display_model() const { return m_display_model; }
  27. u32 display_family() const { return m_display_family; }
  28. u32 stepping() const { return m_stepping; }
  29. u32 type() const { return m_type; }
  30. u32 apic_id() const { return m_apic_id; }
  31. void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
  32. };
  33. }