Add support for Hygon Dhyana processor
-Add vendor identification
-Support in get_cpu_cache
Background:
    Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture
    between AMD and Haiguang Information Technology Co.,Ltd., aims at
    providing high performance x86 processor for China server market.
    Its first generation processor codename is Dhyana, which
    originates from AMD technology and shares most of the
    architecture with AMD's family 17h, but with different CPU Vendor
    ID("HygonGenuine")/Family series number(Family 18h).
Related Hygon kernel patch can be found on:
http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn
Signed-off-by: Jinke Fan <fanjinke@hygon.cn>
			
			
This commit is contained in:
		
							parent
							
								
									f5a5a23ea8
								
							
						
					
					
						commit
						ee7e49e193
					
				|  | @ -706,7 +706,8 @@ format_proc_cpuinfo (void *, char *&destbuf) | ||||||
| 
 | 
 | ||||||
|       /* Vendor identification. */ |       /* Vendor identification. */ | ||||||
|       bool is_amd = false, is_intel = false; |       bool is_amd = false, is_intel = false; | ||||||
|       if (!strcmp ((char*)vendor_id, "AuthenticAMD")) |       if (!strcmp ((char*)vendor_id, "AuthenticAMD") | ||||||
|  |           || !strcmp((char*)vendor_id, "HygonGenuine")) | ||||||
| 	is_amd = true; | 	is_amd = true; | ||||||
|       else if (!strcmp ((char*)vendor_id, "GenuineIntel")) |       else if (!strcmp ((char*)vendor_id, "GenuineIntel")) | ||||||
| 	is_intel = true; | 	is_intel = true; | ||||||
|  |  | ||||||
|  | @ -486,7 +486,8 @@ get_cpu_cache (int in) | ||||||
|   vendor_id[3] = 0; |   vendor_id[3] = 0; | ||||||
|   if (!strcmp ((char*) vendor_id, "GenuineIntel")) |   if (!strcmp ((char*) vendor_id, "GenuineIntel")) | ||||||
|     return get_cpu_cache_intel (in, maxf & 0xffff); |     return get_cpu_cache_intel (in, maxf & 0xffff); | ||||||
|   else if (!strcmp ((char*)vendor_id, "AuthenticAMD")) |   else if (!strcmp ((char*)vendor_id, "AuthenticAMD") | ||||||
|  |            || !strcmp((char*)vendor_id, "HygonGenuine")) | ||||||
|     { |     { | ||||||
|       uint32_t maxe = 0, unused; |       uint32_t maxe = 0, unused; | ||||||
|       cpuid (&maxe, &unused, &unused, &unused, 0x80000000); |       cpuid (&maxe, &unused, &unused, &unused, 0x80000000); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue