mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv:cpu-caps:refine processor family and model info
v3 -> v4: Refine commit message and code stype 1. SDM Vol. 2A 3-211 states DisplayFamily = Extended_Family_ID + Family_ID when Family_ID == 0FH. So it should be family += ((eax >> 20U) & 0xffU) when Family_ID == 0FH. 2. IF (Family_ID = 06H or Family_ID = 0FH) THEN DisplayModel = (Extended_Model_ID « 4) + Model_ID; While previous code this logic: IF (DisplayFamily = 06H or DisplayFamily = 0FH) Fix the bug about calculation of display family and display model according to SDM definition. 3. use variable name to distinguish Family ID/Display Family/Model ID/Display Model, then the code is more clear to avoid some mistake Tracked-On:#3675 Signed-off-by: liujunming <junming.liu@intel.com> Reviewed-by: Wu Xiangyang <xiangyang.wu@linux.intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -32,7 +32,10 @@
|
||||
#define FEATURE_WORDS 15U
|
||||
|
||||
struct cpuinfo_x86 {
|
||||
uint8_t family, model;
|
||||
/* SDM 2-2 Vol.4 Table 2-1 uses DisplayFamily_DisplayModel to
|
||||
* distinguish Processor Families/Processor Number Series.
|
||||
*/
|
||||
uint8_t displayfamily, displaymodel;
|
||||
uint8_t virt_bits;
|
||||
uint8_t phys_bits;
|
||||
uint32_t cpuid_level;
|
||||
|
Reference in New Issue
Block a user