From 27b002857aa7dac524a9876db42595df5c875991 Mon Sep 17 00:00:00 2001 From: Veselin Georgiev Date: Fri, 16 Jul 2021 01:39:53 +0300 Subject: [PATCH] Fix #150: CPU Family/Model is used as Ext.Family/Model This is a documentation-only issue; explain more verbosely what the `ext_family` and `ext_model` fields in `struct cpu_id_t` are. --- libcpuid/libcpuid.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libcpuid/libcpuid.h b/libcpuid/libcpuid.h index 7b54f5d..3179e0c 100644 --- a/libcpuid/libcpuid.h +++ b/libcpuid/libcpuid.h @@ -247,19 +247,22 @@ struct cpu_id_t { */ uint8_t flags[CPU_FLAGS_MAX]; - /** CPU family */ + /** CPU family (BaseFamily[3:0]) */ int32_t family; - /** CPU model */ + /** CPU model (BaseModel[3:0]) */ int32_t model; /** CPU stepping */ int32_t stepping; - /** CPU extended family */ + /** CPU display ("true") family (computed as BaseFamily[3:0]+ExtendedFamily[7:0]) */ int32_t ext_family; - /** CPU extended model */ + /** + * CPU display ("true") model (computed as (ExtendedModel[3:0]<<4) + BaseModel[3:0]) + * For detailed discussion about what BaseModel / ExtendedModel / Model are, see Github issue #150. + */ int32_t ext_model; /** Number of CPU cores on the current processor */