x86: qemu: add a cpu uclass driver for qemu target
authorMiao Yan <yanmiaobest@gmail.com>
Thu, 7 Jan 2016 09:32:01 +0000 (01:32 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 13 Jan 2016 04:20:15 +0000 (12:20 +0800)
commit5a694056febfd5ee20677475cd4968c8e728c19c
tree6c1fc8aa599e4449746441941d3bf3fb4240aa0c
parentf60df20aa966c3de850afafe3cce70a51d0b261c
x86: qemu: add a cpu uclass driver for qemu target

Add a cpu uclass driver for qemu. Previously, the qemu target gets cpu
number from board dts files, which are manually created at compile time.
This does not scale when more cpus are assigned to guest as the dts files
must be modified as well.

This patch adds a cpu uclass driver for qemu targets to directly read
online cpu number from firmware.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/qemu/Makefile
arch/x86/cpu/qemu/cpu.c [new file with mode: 0644]
arch/x86/dts/qemu-x86_i440fx.dts
arch/x86/dts/qemu-x86_q35.dts