cpu/intel/hyperthreading: Use CPUID leaf 0xb without X2APIC
It is not a requirement to have X2APIC mode enabled to use CPUID leaf 0xb EDX to detect logical CPU is a hyperthreading sibling. Change-Id: I288f2df5a392c396f92bb6d18908df35de55915d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58383 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
		
				
					committed by
					
						
						Felix Held
					
				
			
			
				
	
			
			
			
						parent
						
							b31b033ccc
						
					
				
				
					commit
					5f4ae427ed
				
			@@ -23,12 +23,10 @@ bool intel_ht_sibling(void)
 | 
				
			|||||||
	if (!intel_ht_supported())
 | 
						if (!intel_ht_supported())
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (is_x2apic_mode()) {
 | 
						if (cpuid_eax(0) >= 0xb) {
 | 
				
			||||||
		if (cpuid_eax(0) >= 0xb) {
 | 
							result = cpuid_ext(0xb, 0);
 | 
				
			||||||
			result = cpuid_ext(0xb, 0);
 | 
							const uint32_t div = 1 << (result.eax & 0x1f);
 | 
				
			||||||
			const uint32_t div = 1 << (result.eax & 0x1f);
 | 
							return result.edx % div > 0;
 | 
				
			||||||
			return result.edx % div > 0;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apic_ids = 1;
 | 
						apic_ids = 1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user