Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 1 | /* |
| 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 Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | #include <cpu/cpu.h> |
| 16 | #include <device/device.h> |
Gerd Hoffmann | 59598b2 | 2015-09-10 10:58:52 +0200 | [diff] [blame] | 17 | #include <cpu/x86/lapic.h> |
| 18 | |
| 19 | static void qemu_cpu_init(struct device *dev) |
| 20 | { |
| 21 | setup_lapic(); |
| 22 | } |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 23 | |
| 24 | static struct device_operations cpu_dev_ops = { |
Gerd Hoffmann | 59598b2 | 2015-09-10 10:58:52 +0200 | [diff] [blame] | 25 | .init = qemu_cpu_init, |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 26 | }; |
| 27 | |
Jonathan Neuschäfer | 8f06ce3 | 2017-11-20 01:56:44 +0100 | [diff] [blame] | 28 | static const struct cpu_device_id cpu_table[] = { |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 29 | { X86_VENDOR_ANY, 0 }, |
| 30 | { 0, 0 }, |
| 31 | }; |
| 32 | |
| 33 | static const struct cpu_driver driver __cpu_driver = { |
| 34 | .ops = &cpu_dev_ops, |
| 35 | .id_table = cpu_table, |
| 36 | }; |
| 37 | |
Patrick Rudolph | 5a61cc5 | 2018-11-17 20:56:21 +0100 | [diff] [blame^] | 38 | struct chip_operations cpu_qemu_x86_ops = { |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 39 | CHIP_NAME("QEMU x86 CPU") |
| 40 | }; |