2020-05-05 22:49:26 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2013-05-31 09:23:26 +02:00
|
|
|
|
|
|
|
#include <cpu/cpu.h>
|
|
|
|
#include <device/device.h>
|
2015-09-10 10:58:52 +02:00
|
|
|
#include <cpu/x86/lapic.h>
|
|
|
|
|
|
|
|
static void qemu_cpu_init(struct device *dev)
|
|
|
|
{
|
|
|
|
setup_lapic();
|
|
|
|
}
|
2013-05-31 09:23:26 +02:00
|
|
|
|
|
|
|
static struct device_operations cpu_dev_ops = {
|
2015-09-10 10:58:52 +02:00
|
|
|
.init = qemu_cpu_init,
|
2013-05-31 09:23:26 +02:00
|
|
|
};
|
|
|
|
|
2017-11-20 01:56:44 +01:00
|
|
|
static const struct cpu_device_id cpu_table[] = {
|
2013-05-31 09:23:26 +02:00
|
|
|
{ X86_VENDOR_ANY, 0 },
|
|
|
|
{ 0, 0 },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct cpu_driver driver __cpu_driver = {
|
|
|
|
.ops = &cpu_dev_ops,
|
|
|
|
.id_table = cpu_table,
|
|
|
|
};
|
|
|
|
|
2018-11-17 20:56:21 +01:00
|
|
|
struct chip_operations cpu_qemu_x86_ops = {
|
2013-05-31 09:23:26 +02:00
|
|
|
CHIP_NAME("QEMU x86 CPU")
|
|
|
|
};
|