diff --git a/inc/hgl/platform/SOC.h b/inc/hgl/platform/SOC.h
index 73262e2..87bf7da 100644
--- a/inc/hgl/platform/SOC.h
+++ b/inc/hgl/platform/SOC.h
@@ -87,7 +87,10 @@ namespace hgl
uint32 value;
};
- struct ARMCpuInfo
+ /**
+ * ARM CPU 核心信息
+ */
+ struct ARMCpuCoreInfo
{
ARMCpuName name;
@@ -97,9 +100,9 @@ namespace hgl
bool support_64bit;
};
- const uint32 ParseARMCpuName(const char *); ///<根据字符串解晰ARM CPU名称ID
+ const uint32 ParseARMCpuName(const char *); ///<根据字符串解晰ARM CPU名称ID
- bool ParseARMCpuInfo(ARMCpuInfo *,const uint32 &cpu_name_id); ///<根据ARM CPU名字ID解晰CPU信息
+ bool ParseARMCpuCoreInfo(ARMCpuCoreInfo *,const uint32 &cpu_name_id); ///<根据ARM CPU名字ID解晰CPU信息
enum class KryoArchLevel
{
@@ -111,12 +114,12 @@ namespace hgl
};
/**
- * 高通 Kryo CPU核心信息
+ * ARM CPU簇信息
* 注:这里的频率单位为MHz,而且只是默认频率,实际频率可能会更高或更低
*/
- struct KryoCpuCoreInfo
+ struct ARMCpuClusterInfo
{
- ARMCpuInfo arm; ///<对应的ARM处理器
+ ARMCpuCoreInfo arm; ///<对应的ARM核心信息
uint core_count; ///<核心数量
@@ -124,29 +127,18 @@ namespace hgl
uint boost_freq; ///<最高频率
};
- struct KryoCPUInfo
- {
- /**
- * Kryo CPU 型号
- * 旧系列直接使用数字型号,新的6gen1/7gen1/8gen1之类,直接写为601/701/801
- */
- uint model;
-
- KryoCpuCoreInfo core[size_t(KryoArchLevel::RANGE_SIZE)];
- };
-
- struct SOCModel
+ struct SOCInfo
{
SOCVendor vendor;
char model[32];
public:
- CompOperatorMemcmp(const SOCModel &);
+ CompOperatorMemcmp(const SOCInfo &);
};
/**
* 根据收集到的SOC信息,解晰具体的SOC厂商和主要型号
*/
- bool ParseSOCModel(SOCModel &,const char *);
+ bool ParseSOCInfo(SOCInfo &,const char *);
}//namespace hgl
diff --git a/src/SOC/ARMCpuInfo.cpp b/src/SOC/ARMCpuInfo.cpp
index 412d8f1..93b48e6 100644
--- a/src/SOC/ARMCpuInfo.cpp
+++ b/src/SOC/ARMCpuInfo.cpp
@@ -58,7 +58,7 @@ namespace hgl
return arm_cpu_name.value;
}
- bool ParseARMCpuInfo(ARMCpuInfo *info,const uint32 &cpu_name_id)
+ bool ParseARMCpuCoreInfo(ARMCpuCoreInfo *info,const uint32 &cpu_name_id)
{
if(!info)return(false);
if(cpu_name_id==0)return(false);
diff --git a/src/SOC/SOC.cpp b/src/SOC/SOC.cpp
index 5b8acc6..18b4cdc 100644
--- a/src/SOC/SOC.cpp
+++ b/src/SOC/SOC.cpp
@@ -5,7 +5,7 @@ using namespace hgl;
namespace
{
- bool isQualcomm(SOCModel &soc,const char *soc_name)
+ bool isQualcomm(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"Qualcomm ",9);
@@ -36,7 +36,7 @@ namespace
return(true);
}
- bool isMediaTek(SOCModel &soc,const char *soc_name)
+ bool isMediaTek(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"MTK ",4);
@@ -62,7 +62,7 @@ namespace
return(true);
}
- bool isUnisoc(SOCModel &soc,const char *soc_name)
+ bool isUnisoc(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"Unisoc",6);
@@ -83,7 +83,7 @@ namespace
return(true);
}
- bool isKirin(SOCModel &soc,const char *soc_name)
+ bool isKirin(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"Kirin",5);
@@ -97,7 +97,7 @@ namespace
return(true);
}
- bool isExynos(SOCModel &soc,const char *soc_name)
+ bool isExynos(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"Exynos",6);
@@ -115,7 +115,7 @@ namespace
return(true);
}
- bool isSpreadtrum(SOCModel &soc,const char *soc_name)
+ bool isSpreadtrum(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"Spreadtrum",10);
@@ -133,7 +133,7 @@ namespace
return(true);
}
- bool isJLQ(SOCModel &soc,const char *soc_name)
+ bool isJLQ(SOCInfo &soc,const char *soc_name)
{
const char *p=hgl::stristr(soc_name,hgl::strlen(soc_name),"JLQ ",4);
@@ -152,7 +152,7 @@ namespace
namespace hgl
{
- bool ParseSOCModel(SOCModel &soc,const char *soc_name)
+ bool ParseSOCInfo(SOCInfo &soc,const char *soc_name)
{
hgl_zero(soc);