Attention is currently required from: Lance Zhao, Nico Huber, Jamie Ryu, Furquan Shaikh, Wonkyu Kim, Ravishankar Sarawadi, Subrata Banik, Srinidhi N Kaushik, Raj Astekar, Patrick Rudolph.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51725 )
Change subject: cpu/intel/common: use lapicid api
......................................................................
Patch Set 11:
(1 comment)
File src/cpu/intel/common/hyperthreading.c:
https://review.coreboot.org/c/coreboot/+/51725/comment/f3cdb125_83c3ddff
PS11, Line 26: apic_ids = lapicid();
The SDM says this is the "maximum number of addressable IDs for logical processors in this physical […]
Reading further: in x2APIC mode, this would need to be done using CPUID leaf 0xb (or 0x1f). One would use EAX bits 4..0 from sub-leaf 0 (SMT level) to know how many x2APIC ID bits correspond to SMT level, and use this to know if a logical processor is an HT sibling.
I haven't tested it, but this should work for x2APIC:
if (x2apic) {
if (cpuid_eax(0) >= 0xb) {
result = cpuid_ext(0xb, 0);
const uint32_t div = 1 << (result.eax & 0x1f);
if (div == 0)
return false;
return result.edx % div > 0;
}
}
--
To view, visit
https://review.coreboot.org/c/coreboot/+/51725
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5ca5b09ae67941adcc07dfafdfe4ba78b0f81009
Gerrit-Change-Number: 51725
Gerrit-PatchSet: 11
Gerrit-Owner: Wonkyu Kim
wonkyu.kim@intel.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Furquan Shaikh
furquan@google.com
Gerrit-Reviewer: Jamie Ryu
jamie.m.ryu@intel.com
Gerrit-Reviewer: Lance Zhao
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Raj Astekar
raj.astekar@intel.com
Gerrit-Reviewer: Ravishankar Sarawadi
ravishankar.sarawadi@intel.com
Gerrit-Reviewer: Srinidhi N Kaushik
srinidhi.n.kaushik@intel.com
Gerrit-Reviewer: Subrata Banik
subrata.banik@intel.com
Gerrit-Reviewer: Wonkyu Kim
wonkyu.kim@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Attention: Lance Zhao
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Jamie Ryu
jamie.m.ryu@intel.com
Gerrit-Attention: Furquan Shaikh
furquan@google.com
Gerrit-Attention: Wonkyu Kim
wonkyu.kim@intel.com
Gerrit-Attention: Ravishankar Sarawadi
ravishankar.sarawadi@intel.com
Gerrit-Attention: Subrata Banik
subrata.banik@intel.com
Gerrit-Attention: Srinidhi N Kaushik
srinidhi.n.kaushik@intel.com
Gerrit-Attention: Raj Astekar
raj.astekar@intel.com
Gerrit-Attention: Patrick Rudolph
siro@das-labor.org
Gerrit-Comment-Date: Fri, 09 Apr 2021 10:00:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons
th3fanbus@gmail.com
Gerrit-MessageType: comment