summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/cpu.c7
-rw-r--r--include/cpu.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/cmd/cpu.c b/cmd/cpu.c
index b4af64f..bc4dc5c 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;
diff --git a/include/cpu.h b/include/cpu.h
index bfb0db2..bda5315 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -15,15 +15,20 @@
* device.
*
* @cpu_id: Platform-specific way of identifying the CPU.
+ * @ucode_version: Microcode version, if CPU_FEAT_UCODE is set
*/
struct cpu_platdata {
int cpu_id;
+ int ucode_version;
+ ulong device_id;
};
/* CPU features - mostly just a placeholder for now */
enum {
CPU_FEAT_L1_CACHE = 0, /* Supports level 1 cache */
CPU_FEAT_MMU = 1, /* Supports virtual memory */
+ CPU_FEAT_UCODE = 2, /* Requires/uses microcode */
+ CPU_FEAT_DEVICE_ID = 3, /* Provides a device ID */
CPU_FEAT_COUNT,
};