AuroraRuntime/Include/Aurora/HWInfo/CpuInfo.hpp

68 lines
1.5 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: CpuInfo.hpp
Date: 2021-6-10
Author: Reece
***/
#pragma once
#include "CpuBitId.hpp"
#include "CpuId.hpp"
namespace Aurora::HWInfo
{
struct CpuInfo
{
Aurora::Build::EArchitecture cpuArch;
/// Total number of sockets reported by the hypervisor
AuUInt8 uSocket;
/// Total number of cores (Shared HV threads, e-cores, ...)
AuUInt8 uCores;
/// Total number of threads (hyperthreaded and e-cores)
AuUInt8 uThreads;
/// @deprecated small mask
AuList<AuInt64> threadTopology;
/// Each cores' thread mask no matter the socket
AuList<CpuBitId> coreTopology;
/// Each p-core's thread mask no matter the socket or cache inheritance
AuList<CpuBitId> pCoreTopology;
/// Each e-core in a single CpuBitId mask
CpuBitId maskECores;
/// Each p-core in a single CpuBitId mask
CpuBitId maskPCores;
/// Each core in a single CpuBitIdMask
CpuBitId maskAllCores;
/// @deprecated
bool bMaskMTContig;
/// @deprecated
bool bMaskMTHalf;
///
AuUInt32 dwCacheLine;
/// Most likely thread cache
AuUInt32 dwCacheL1;
/// Most likely core cache
AuUInt32 dwCacheL2;
/// Most likely package cache
AuUInt32 dwCacheL3;
CpuId cpuId;
};
AUKN_SYM const CpuInfo &GetCPUInfo();
}