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. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
Patrick Georgi | b890a12 | 2015-03-26 15:17:45 +0100 | [diff] [blame] | 16 | * Foundation, Inc. |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 17 | */ |
| 18 | |
| 19 | #include <cpu/cpu.h> |
| 20 | #include <device/device.h> |
Gerd Hoffmann | 59598b2 | 2015-09-10 10:58:52 +0200 | [diff] [blame^] | 21 | #include <cpu/x86/lapic.h> |
| 22 | |
| 23 | static void qemu_cpu_init(struct device *dev) |
| 24 | { |
| 25 | setup_lapic(); |
| 26 | } |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 27 | |
| 28 | static struct device_operations cpu_dev_ops = { |
Gerd Hoffmann | 59598b2 | 2015-09-10 10:58:52 +0200 | [diff] [blame^] | 29 | .init = qemu_cpu_init, |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | static struct cpu_device_id cpu_table[] = { |
| 33 | { X86_VENDOR_ANY, 0 }, |
| 34 | { 0, 0 }, |
| 35 | }; |
| 36 | |
| 37 | static const struct cpu_driver driver __cpu_driver = { |
| 38 | .ops = &cpu_dev_ops, |
| 39 | .id_table = cpu_table, |
| 40 | }; |
| 41 | |
| 42 | struct chip_operations cpu_x86_qemu_ops = { |
| 43 | CHIP_NAME("QEMU x86 CPU") |
| 44 | }; |