aboutsummaryrefslogtreecommitdiff
path: root/cmd/cpu.c
diff options
context:
space:
mode:
authorSimon Glass2016-03-06 19:27:49 -0700
committerBin Meng2016-03-17 10:27:22 +0800
commit740d5d34b12f49b5e6c48e06dd8f519d9563a7e3 (patch)
treea303a6b6ecd24167d18784f59221a91ab274a138 /cmd/cpu.c
parente23c6c28b01785547e0356667ab435ef904af531 (diff)
cpu: Add support for microcode version and CPU ID
Some CPUs use microcode and each core can have a different version of microcode loaded. Also some CPUs support the concept of an integer ID used for identification purposes. Add support for these in the CPU uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'cmd/cpu.c')
-rw-r--r--cmd/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/cpu.c b/cmd/cpu.c
index b4af64f54f9..bc4dc5c529b 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -14,6 +14,7 @@
static const char *cpu_feature_name[CPU_FEAT_COUNT] = {
"L1 cache",
"MMU",
+ "Microcode",
};
static int print_cpu_list(bool detail)
@@ -58,6 +59,12 @@ static int print_cpu_list(bool detail)
}
}
printf("\n");
+ if (info.features & (1 << CPU_FEAT_UCODE)) {
+ printf("\tMicrocode version %#x\n",
+ plat->ucode_version);
+ }
+ if (info.features & (1 << CPU_FEAT_DEVICE_ID))
+ printf("\tDevice ID %#lx\n", plat->device_id);
}
return 0;