aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/qemu-x86
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-09-10 10:58:52 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-09-14 17:23:26 +0000
commit59598b2e475b50e359c821e35fe1ab60dfce641e (patch)
treefa94c3a0e0bb9e08a434a0e29ed6222af8cd81cf /src/cpu/qemu-x86
parentdc37dab7fda215b996867eff5c4511b09f7aa37a (diff)
qemu: initialize lapic
Recently qemu stopped doing a basic lapic setup and expects the firmware to handle this properly (like on real hardware). So let's do that so coreboot works properly on qemu 2.4+. Here is the qemu commit message for the change: <quote> commit b8eb5512fd8a115f164edbbe897cdf8884920ccb Author: Nadav Amit <namit@cs.technion.ac.il> Date: Mon Apr 13 02:32:08 2015 +0300 target-i386: disable LINT0 after reset Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is long gone and therefore this hack is no longer needed. Since it violates the specifications, it is removed. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Message-Id: <1428881529-29459-2-git-send-email-namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> </quote> Change-Id: I022f3742475d3f3477fc838b1e2bce69287b6b8e Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-on: http://review.coreboot.org/11611 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/cpu/qemu-x86')
-rw-r--r--src/cpu/qemu-x86/qemu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/qemu-x86/qemu.c b/src/cpu/qemu-x86/qemu.c
index 4704bb8a96..b6f0ad5835 100644
--- a/src/cpu/qemu-x86/qemu.c
+++ b/src/cpu/qemu-x86/qemu.c
@@ -18,8 +18,15 @@
#include <cpu/cpu.h>
#include <device/device.h>
+#include <cpu/x86/lapic.h>
+
+static void qemu_cpu_init(struct device *dev)
+{
+ setup_lapic();
+}
static struct device_operations cpu_dev_ops = {
+ .init = qemu_cpu_init,
};
static struct cpu_device_id cpu_table[] = {