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 | |
| 28 | static struct cpu_device_id cpu_table[] = { |
| 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 | |
| 38 | struct chip_operations cpu_x86_qemu_ops = { |
| 39 | CHIP_NAME("QEMU x86 CPU") |
| 40 | }; |