summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/mp_init.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-03-12 05:07:09 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2016-03-17 02:27:25 (GMT)
commit6bcb675b2f6a3251d0107673949988c619ec18ec (patch)
treebb3ecbbc6c754ed19c78f12c5afc721de7a3eb97 /arch/x86/cpu/mp_init.c
parentf7d35bc148de7ebca7f51a07fc9a45715f8e6d29 (diff)
downloadu-boot-fsl-qoriq-6bcb675b2f6a3251d0107673949988c619ec18ec.tar.xz
x86: Record the CPU details when starting each core
As each core starts up, record its microcode version and CPU ID so these can be presented with the 'cpu detail' command. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/mp_init.c')
-rw-r--r--arch/x86/cpu/mp_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index ca47e9e..4cc6555 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -15,6 +15,7 @@
#include <asm/cpu.h>
#include <asm/interrupt.h>
#include <asm/lapic.h>
+#include <asm/microcode.h>
#include <asm/mp.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
@@ -560,12 +561,16 @@ int mp_init(struct mp_params *p)
int mp_init_cpu(struct udevice *cpu, void *unused)
{
+ struct cpu_platdata *plat = dev_get_parent_platdata(cpu);
+
/*
* Multiple APs are brought up simultaneously and they may get the same
* seq num in the uclass_resolve_seq() during device_probe(). To avoid
* this, set req_seq to the reg number in the device tree in advance.
*/
cpu->req_seq = fdtdec_get_int(gd->fdt_blob, cpu->of_offset, "reg", -1);
+ plat->ucode_version = microcode_read_rev();
+ plat->device_id = gd->arch.x86_device;
return device_probe(cpu);
}