]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
smbios: move smbios code into a common folder
authorWei Huang <wei@redhat.com>
Wed, 12 Aug 2015 02:08:20 +0000 (22:08 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 13 Aug 2015 11:08:30 +0000 (14:08 +0300)
To share smbios among different architectures, this patch moves SMBIOS
code (smbios.c and smbios.h) from x86 specific folders into new
hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in
x86 default config files.

Acked-by: Gabriel Somlo <somlo@cmu.edu>
Tested-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Wei Huang <wei@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 files changed:
arch_init.c
default-configs/i386-softmmu.mak
default-configs/x86_64-softmmu.mak
hw/Makefile.objs
hw/i386/Makefile.objs
hw/i386/pc.c
hw/i386/pc_piix.c
hw/i386/pc_q35.c
hw/smbios/Makefile.objs [new file with mode: 0644]
hw/smbios/smbios.c [moved from hw/i386/smbios.c with 99% similarity]
include/hw/smbios/smbios.h [moved from include/hw/i386/smbios.h with 100% similarity]
tests/bios-tables-test.c
vl.c

index 725c638ece5a0d780d340b7a498821a5f960f185..38f5fb9c22c75b8f68eb91d77676800fa55919e6 100644 (file)
@@ -26,7 +26,7 @@
 #include "sysemu/arch_init.h"
 #include "hw/pci/pci.h"
 #include "hw/audio/audio.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qmp-commands.h"
index 48b57623f7a00bb26e9c0bdd8f7b0baa2a4bc7dc..5eaafa18d0f40ce79d477e947203cda00016d412 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_MEM_HOTPLUG=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
+CONFIG_SMBIOS=y
index 4962ed70af77d34adb1b9217ad785359197e2714..28e2099187ea442a2d51849db1e48652078923e8 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_MEM_HOTPLUG=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
+CONFIG_SMBIOS=y
index 73afa41b3278d5b0bf4c21f3d44620b9e12b851c..7e7c24110426086f9ddc74085d4c806b4aa9b581 100644 (file)
@@ -31,6 +31,7 @@ devices-dirs-$(CONFIG_VIRTIO) += virtio/
 devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
 devices-dirs-$(CONFIG_SOFTMMU) += xen/
 devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/
+devices-dirs-$(CONFIG_SMBIOS) += smbios/
 devices-dirs-y += core/
 common-obj-y += $(devices-dirs-y)
 obj-y += $(devices-dirs-y)
index ecdb40099d2aedba74b7c1ec23c4df8a34112854..ebd1015a081f735e541a7376b995aed4761dff0f 100644 (file)
@@ -1,5 +1,5 @@
 obj-$(CONFIG_KVM) += kvm/
-obj-y += multiboot.o smbios.o
+obj-y += multiboot.o
 obj-y += pc.o pc_piix.o pc_q35.o
 obj-y += pc_sysfw.o
 obj-y += intel_iommu.o
index 0973596c9ebcefd6a500b2ff7d8d5cd3a04c551d..9f2924e5df82f1f8af83dbcb4242bd3a11ae671f 100644 (file)
@@ -33,7 +33,7 @@
 #include "hw/pci/pci_bus.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/timer/hpet.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "hw/loader.h"
 #include "elf.h"
 #include "multiboot.h"
index ce51cd1c2c0709e1feb06271ba728449899da2d8..95584676e244df5be183bbbdece2b51a2d5627ab 100644 (file)
@@ -28,7 +28,7 @@
 #include "hw/loader.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/apic.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_ids.h"
 #include "hw/usb.h"
index cd4ecc32f70c47d8c875f9c2f527028b464dbf5f..c07d65bc46b52f021a0bfab185a6814ef2b41585 100644 (file)
@@ -39,7 +39,7 @@
 #include "hw/pci-host/q35.h"
 #include "exec/address-spaces.h"
 #include "hw/i386/ich9.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "hw/ide/pci.h"
 #include "hw/ide/ahci.h"
 #include "hw/usb.h"
diff --git a/hw/smbios/Makefile.objs b/hw/smbios/Makefile.objs
new file mode 100644 (file)
index 0000000..f69a92f
--- /dev/null
@@ -0,0 +1 @@
+common-obj-$(CONFIG_SMBIOS) += smbios.o
similarity index 99%
rename from hw/i386/smbios.c
rename to hw/smbios/smbios.c
index 6f715c641b6e7b54e17344b30178e5b94dd6f2c5..efdbb5de6fb5034b4801bb6defef4c1d32a0e3d5 100644 (file)
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/cpus.h"
-#include "hw/i386/pc.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "hw/loader.h"
-
+#include "exec/cpu-common.h"
 
 /* legacy structures and constants for <= 2.0 machines */
 struct smbios_header {
index 0de1742d7dfd28c3246c43916ac6cb94e6513707..613867ab9992b93df710c9e20cc3e220ff54cc82 100644 (file)
@@ -18,7 +18,7 @@
 #include "libqtest.h"
 #include "qemu/compiler.h"
 #include "hw/acpi/acpi-defs.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "qemu/bitmap.h"
 
 #define MACHINE_PC "pc"
diff --git a/vl.c b/vl.c
index 0adbbd6747ab9a9a8fe879863a5ba1d26cbc4b4d..584ca88ddabd0f1a99f9ff2ebc344ced0e74c740 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
 #include "hw/isa/isa.h"
 #include "hw/bt.h"
 #include "sysemu/watchdog.h"
-#include "hw/i386/smbios.h"
+#include "hw/smbios/smbios.h"
 #include "hw/xen/xen.h"
 #include "hw/qdev.h"
 #include "hw/loader.h"