summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/qemu/qemu.c
diff options
context:
space:
mode:
authorMiao Yan <yanmiaobest@gmail.com>2016-01-07 01:32:00 -0800
committerBin Meng <bmeng.cn@gmail.com>2016-01-13 12:20:15 +0800
commitf60df20aa966c3de850afafe3cce70a51d0b261c (patch)
tree9a21ee8258c606f021cc575208a0055ee09be2f6 /arch/x86/cpu/qemu/qemu.c
parentece5c37f0cae1277a147e1c17f9d1bfabc3d2e95 (diff)
x86: qemu: add fw_cfg support
The QEMU fw_cfg interface allows the guest to retrieve various data information from QEMU. For example, APCI/SMBios tables, number of online cpus, kernel data and command line, etc. This patch adds support for QEMU fw_cfg interface. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/qemu/qemu.c')
-rw-r--r--arch/x86/cpu/qemu/qemu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 1f93f72dc8..46111c9cf0 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -11,6 +11,7 @@
#include <asm/processor.h>
#include <asm/arch/device.h>
#include <asm/arch/qemu.h>
+#include <asm/fw_cfg.h>
static bool i440fx;
@@ -57,6 +58,8 @@ static void qemu_chipset_init(void)
x86_pci_write_config32(PCI_BDF(0, 0, 0), PCIEX_BAR,
CONFIG_PCIE_ECAM_BASE | BAR_EN);
}
+
+ qemu_fwcfg_init();
}
int arch_cpu_init(void)