From 59598b2e475b50e359c821e35fe1ab60dfce641e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 10 Sep 2015 10:58:52 +0200 Subject: 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: commit b8eb5512fd8a115f164edbbe897cdf8884920ccb Author: Nadav Amit 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 Message-Id: <1428881529-29459-2-git-send-email-namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini Change-Id: I022f3742475d3f3477fc838b1e2bce69287b6b8e Signed-off-by: Gerd Hoffmann Reviewed-on: http://review.coreboot.org/11611 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Patrick Georgi --- src/cpu/qemu-x86/qemu.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/cpu/qemu-x86') 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 #include +#include + +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[] = { -- cgit v1.2.3