diff options
author | Alexander Graf <agraf@suse.de> | 2016-08-19 01:23:26 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2016-10-19 09:01:51 +0200 |
commit | 6f192ddcbd8e13351a8f13365e7c714e7b61a79e (patch) | |
tree | 7b96d3e0f38df77b1fe6f24220bccd1bf585668f /arch/x86 | |
parent | e824cf3fb5857ef452bb84018da854328d816514 (diff) | |
download | u-boot-imx-6f192ddcbd8e13351a8f13365e7c714e7b61a79e.zip u-boot-imx-6f192ddcbd8e13351a8f13365e7c714e7b61a79e.tar.gz u-boot-imx-6f192ddcbd8e13351a8f13365e7c714e7b61a79e.tar.bz2 |
cpu: Add DMTF id and family fields
For SMBIOS tables we need to know the CPU family as well as CPU IDs. This
patches allocates some space for them in the cpu device and populates it
on x86.
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/cpu/cpu_x86.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c index 0941041..39004ee 100644 --- a/arch/x86/cpu/cpu_x86.c +++ b/arch/x86/cpu/cpu_x86.c @@ -15,9 +15,14 @@ DECLARE_GLOBAL_DATA_PTR; int cpu_x86_bind(struct udevice *dev) { struct cpu_platdata *plat = dev_get_parent_platdata(dev); + struct cpuid_result res; plat->cpu_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "intel,apic-id", -1); + plat->family = gd->arch.x86; + res = cpuid(1); + plat->id[0] = res.eax; + plat->id[1] = res.edx; return 0; } |