blob: f250698c89e1320cb8b5a3f2f18c279d1e15b271 [file] [log] [blame]
Gerd Hoffmanncbf30732013-05-31 09:23:26 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Gerd Hoffmanncbf30732013-05-31 09:23:26 +020013 */
14
15#include <cpu/cpu.h>
16#include <device/device.h>
Gerd Hoffmann59598b22015-09-10 10:58:52 +020017#include <cpu/x86/lapic.h>
18
19static void qemu_cpu_init(struct device *dev)
20{
21 setup_lapic();
22}
Gerd Hoffmanncbf30732013-05-31 09:23:26 +020023
24static struct device_operations cpu_dev_ops = {
Gerd Hoffmann59598b22015-09-10 10:58:52 +020025 .init = qemu_cpu_init,
Gerd Hoffmanncbf30732013-05-31 09:23:26 +020026};
27
Jonathan Neuschäfer8f06ce32017-11-20 01:56:44 +010028static const struct cpu_device_id cpu_table[] = {
Gerd Hoffmanncbf30732013-05-31 09:23:26 +020029 { X86_VENDOR_ANY, 0 },
30 { 0, 0 },
31};
32
33static const struct cpu_driver driver __cpu_driver = {
34 .ops = &cpu_dev_ops,
35 .id_table = cpu_table,
36};
37
Patrick Rudolph5a61cc52018-11-17 20:56:21 +010038struct chip_operations cpu_qemu_x86_ops = {
Gerd Hoffmanncbf30732013-05-31 09:23:26 +020039 CHIP_NAME("QEMU x86 CPU")
40};