board-inspector: collect address bits of processors

This patch updates the board inspector to collect the bits of physical and
linear addresses of the processors and generate this information to the
board XML for further uses at configuration phase.

Tracked-On: #6292
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao 2021-08-06 11:09:20 +08:00 committed by wenlingz
parent 3b41713c7e
commit 0f4275b041
2 changed files with 11 additions and 0 deletions

View File

@ -751,3 +751,8 @@ class LEAF_80000008(CPUID):
leaf = 0x80000008
physical_address_bits = cpuidfield(EAX, 7, 0, doc="# Physical Address bits")
linear_address_bits = cpuidfield(EAX, 15, 8, doc="# Linear Address bits")
attribute_bits = [
"physical_address_bits",
"linear_address_bits",
]

View File

@ -52,6 +52,12 @@ def extract_model(processors_node, cpu_id, family_id, model_id, core_type, nativ
if getattr(leaf_data, cap) == 1:
add_child(n, "capability", id=cap)
leaves = [(0x80000008, 0)]
for leaf in leaves:
leaf_data = parse_cpuid(leaf[0], leaf[1], cpu_id)
for cap in leaf_data.attribute_bits:
add_child(n, "attribute", str(getattr(leaf_data, cap)), id=cap)
def extract_topology(processors_node):
cpu_ids = get_online_cpu_ids()
for cpu_id in cpu_ids: